From kib at FreeBSD.org Fri Aug 1 04:05:14 2014 From: kib at FreeBSD.org (Konstantin Belousov) Date: Fri, 1 Aug 2014 04:05:13 +0000 (UTC) Subject: svn commit: r269367 - stable/10/sys/kern Message-ID: <201408010405.s7145DHx032884@svn.freebsd.org> Author: kib Date: Fri Aug 1 04:05:13 2014 New Revision: 269367 URL: http://svnweb.freebsd.org/changeset/base/269367 Log: MFC r269205: Simplify the expression. Modified: stable/10/sys/kern/kern_proc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_proc.c ============================================================================== --- stable/10/sys/kern/kern_proc.c Fri Aug 1 01:53:39 2014 (r269366) +++ stable/10/sys/kern/kern_proc.c Fri Aug 1 04:05:13 2014 (r269367) @@ -2148,7 +2148,7 @@ kern_proc_vmmap_resident(vm_map_t map, v obj = entry->object.vm_object; addr = entry->start; m_adv = NULL; - pi = OFF_TO_IDX(entry->offset + addr - entry->start); + pi = OFF_TO_IDX(entry->offset); for (; addr < entry->end; addr += IDX_TO_OFF(pi_adv), pi += pi_adv) { if (m_adv != NULL) { m = m_adv; From truckman at FreeBSD.org Fri Aug 1 15:04:47 2014 From: truckman at FreeBSD.org (Don Lewis) Date: Fri, 1 Aug 2014 15:04:46 +0000 (UTC) Subject: svn commit: r269383 - in stable/10: share/man/man9 sys/kern sys/sys Message-ID: <201408011504.s71F4k7u038574@svn.freebsd.org> Author: truckman Date: Fri Aug 1 15:04:46 2014 New Revision: 269383 URL: http://svnweb.freebsd.org/changeset/base/269383 Log: MFC r268780 Nuke the never-used RF_TIMESHARE feature, reducing the complexity of the code. The consensus on arch@ is that this feature might have been useful in the distant past, but is now just unnecessary bloat. The int_rman_activate_resource() and int_rman_deactivate_resource() functions become trivial, so manually inline them. The special deferred handling of RF_ACTIVE is no longer needed in reserve_resource_bound(), so eliminate the associated code at the end of the function. These changes reduce the object file size by more than 500 bytes on i386. Update the rman.9 man page to reflect the removal of the RF_TIMESHARE feature. Modified: stable/10/share/man/man9/rman.9 stable/10/sys/kern/subr_rman.c stable/10/sys/sys/rman.h Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man9/rman.9 ============================================================================== --- stable/10/share/man/man9/rman.9 Fri Aug 1 14:10:10 2014 (r269382) +++ stable/10/share/man/man9/rman.9 Fri Aug 1 15:04:46 2014 (r269383) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 29, 2011 +.Dd July 15, 2014 .Dt RMAN 9 .Os .Sh NAME @@ -141,13 +141,11 @@ represented by a 16-bit flag register, a #define RF_ALLOCATED 0x0001 /* resource has been reserved */ #define RF_ACTIVE 0x0002 /* resource allocation has been activated */ #define RF_SHAREABLE 0x0004 /* resource permits contemporaneous sharing */ -#define RF_TIMESHARE 0x0008 /* resource permits time-division sharing */ -#define RF_WANTED 0x0010 /* somebody is waiting for this resource */ #define RF_FIRSTSHARE 0x0020 /* first in sharing list */ #define RF_PREFETCHABLE 0x0040 /* resource is prefetchable */ .Ed .Pp -The remainder of the flag bits are used to represent the desired alignment +Bits 15:10 of the flag register are used to represent the desired alignment of the resource within the region. .Pp The @@ -299,12 +297,9 @@ The .Fa bound argument must be a power of two. It may be set to zero to specify no boundary restriction. -The default behavior is to allocate an exclusive segment, unless the +A shared segment will be allocated if the .Dv RF_SHAREABLE -or -.Dv RF_TIMESHARE -flags are set, in which case a shared -segment will be allocated. +flag is set, otherwise an exclusive segment will be allocated. If this shared segment already exists, the caller has its device added to the list of consumers. .Pp Modified: stable/10/sys/kern/subr_rman.c ============================================================================== --- stable/10/sys/kern/subr_rman.c Fri Aug 1 14:10:10 2014 (r269382) +++ stable/10/sys/kern/subr_rman.c Fri Aug 1 15:04:46 2014 (r269383) @@ -110,9 +110,6 @@ static MALLOC_DEFINE(M_RMAN, "rman", "Re struct rman_head rman_head; static struct mtx rman_mtx; /* mutex to protect rman_head */ -static int int_rman_activate_resource(struct rman *rm, struct resource_i *r, - struct resource_i **whohas); -static int int_rman_deactivate_resource(struct resource_i *r); static int int_rman_release_resource(struct rman *rm, struct resource_i *r); static __inline struct resource_i * @@ -322,7 +319,7 @@ rman_adjust_resource(struct resource *rr /* Not supported for shared resources. */ r = rr->__r_i; - if (r->r_flags & (RF_TIMESHARE | RF_SHAREABLE)) + if (r->r_flags & RF_SHAREABLE) return (EINVAL); /* @@ -435,7 +432,7 @@ rman_adjust_resource(struct resource *rr return (0); } -#define SHARE_TYPE(f) (f & (RF_SHAREABLE | RF_TIMESHARE | RF_PREFETCHABLE)) +#define SHARE_TYPE(f) (f & (RF_SHAREABLE | RF_PREFETCHABLE)) struct resource * rman_reserve_resource_bound(struct rman *rm, u_long start, u_long end, @@ -452,10 +449,9 @@ rman_reserve_resource_bound(struct rman "length %#lx, flags %u, device %s\n", rm->rm_descr, start, end, count, flags, dev == NULL ? "" : device_get_nameunit(dev))); - KASSERT((flags & (RF_WANTED | RF_FIRSTSHARE)) == 0, + KASSERT((flags & RF_FIRSTSHARE) == 0, ("invalid flags %#x", flags)); - new_rflags = (flags & ~(RF_ACTIVE | RF_WANTED | RF_FIRSTSHARE)) | - RF_ALLOCATED; + new_rflags = (flags & ~RF_FIRSTSHARE) | RF_ALLOCATED; mtx_lock(rm->rm_mtx); @@ -601,7 +597,7 @@ rman_reserve_resource_bound(struct rman * additional work, but this does not seem warranted.) */ DPRINTF(("no unshared regions found\n")); - if ((flags & (RF_SHAREABLE | RF_TIMESHARE)) == 0) + if ((flags & RF_SHAREABLE) == 0) goto out; for (s = r; s && s->r_end <= end; s = TAILQ_NEXT(s, r_link)) { @@ -636,25 +632,11 @@ rman_reserve_resource_bound(struct rman goto out; } } - /* * We couldn't find anything. */ -out: - /* - * If the user specified RF_ACTIVE in flags, we attempt to atomically - * activate the resource. If this fails, we release the resource - * and indicate overall failure. (This behavior probably doesn't - * make sense for RF_TIMESHARE-type resources.) - */ - if (rv && (flags & RF_ACTIVE) != 0) { - struct resource_i *whohas; - if (int_rman_activate_resource(rm, rv, &whohas)) { - int_rman_release_resource(rm, rv); - rv = NULL; - } - } +out: mtx_unlock(rm->rm_mtx); return (rv == NULL ? NULL : &rv->r_r); } @@ -668,91 +650,17 @@ rman_reserve_resource(struct rman *rm, u dev)); } -static int -int_rman_activate_resource(struct rman *rm, struct resource_i *r, - struct resource_i **whohas) -{ - struct resource_i *s; - int ok; - - /* - * If we are not timesharing, then there is nothing much to do. - * If we already have the resource, then there is nothing at all to do. - * If we are not on a sharing list with anybody else, then there is - * little to do. - */ - if ((r->r_flags & RF_TIMESHARE) == 0 - || (r->r_flags & RF_ACTIVE) != 0 - || r->r_sharehead == NULL) { - r->r_flags |= RF_ACTIVE; - return 0; - } - - ok = 1; - for (s = LIST_FIRST(r->r_sharehead); s && ok; - s = LIST_NEXT(s, r_sharelink)) { - if ((s->r_flags & RF_ACTIVE) != 0) { - ok = 0; - *whohas = s; - } - } - if (ok) { - r->r_flags |= RF_ACTIVE; - return 0; - } - return EBUSY; -} - int rman_activate_resource(struct resource *re) { - int rv; - struct resource_i *r, *whohas; + struct resource_i *r; struct rman *rm; r = re->__r_i; rm = r->r_rm; mtx_lock(rm->rm_mtx); - rv = int_rman_activate_resource(rm, r, &whohas); + r->r_flags |= RF_ACTIVE; mtx_unlock(rm->rm_mtx); - return rv; -} - -int -rman_await_resource(struct resource *re, int pri, int timo) -{ - int rv; - struct resource_i *r, *whohas; - struct rman *rm; - - r = re->__r_i; - rm = r->r_rm; - mtx_lock(rm->rm_mtx); - for (;;) { - rv = int_rman_activate_resource(rm, r, &whohas); - if (rv != EBUSY) - return (rv); /* returns with mutex held */ - - if (r->r_sharehead == NULL) - panic("rman_await_resource"); - whohas->r_flags |= RF_WANTED; - rv = msleep(r->r_sharehead, rm->rm_mtx, pri, "rmwait", timo); - if (rv) { - mtx_unlock(rm->rm_mtx); - return (rv); - } - } -} - -static int -int_rman_deactivate_resource(struct resource_i *r) -{ - - r->r_flags &= ~RF_ACTIVE; - if (r->r_flags & RF_WANTED) { - r->r_flags &= ~RF_WANTED; - wakeup(r->r_sharehead); - } return 0; } @@ -763,7 +671,7 @@ rman_deactivate_resource(struct resource rm = r->__r_i->r_rm; mtx_lock(rm->rm_mtx); - int_rman_deactivate_resource(r->__r_i); + r->__r_i->r_flags &= ~RF_ACTIVE; mtx_unlock(rm->rm_mtx); return 0; } @@ -774,7 +682,7 @@ int_rman_release_resource(struct rman *r struct resource_i *s, *t; if (r->r_flags & RF_ACTIVE) - int_rman_deactivate_resource(r); + r->r_flags &= ~RF_ACTIVE; /* * Check for a sharing list first. If there is one, then we don't Modified: stable/10/sys/sys/rman.h ============================================================================== --- stable/10/sys/sys/rman.h Fri Aug 1 14:10:10 2014 (r269382) +++ stable/10/sys/sys/rman.h Fri Aug 1 15:04:46 2014 (r269383) @@ -42,8 +42,8 @@ #define RF_ALLOCATED 0x0001 /* resource has been reserved */ #define RF_ACTIVE 0x0002 /* resource allocation has been activated */ #define RF_SHAREABLE 0x0004 /* resource permits contemporaneous sharing */ -#define RF_TIMESHARE 0x0008 /* resource permits time-division sharing */ -#define RF_WANTED 0x0010 /* somebody is waiting for this resource */ +#define RF_SPARE1 0x0008 +#define RF_SPARE2 0x0010 #define RF_FIRSTSHARE 0x0020 /* first in sharing list */ #define RF_PREFETCHABLE 0x0040 /* resource is prefetchable */ #define RF_OPTIONAL 0x0080 /* for bus_alloc_resources() */ From truckman at FreeBSD.org Fri Aug 1 15:08:49 2014 From: truckman at FreeBSD.org (Don Lewis) Date: Fri, 1 Aug 2014 15:08:48 +0000 (UTC) Subject: svn commit: r269384 - in stable/9: share/man/man9 sys/kern sys/sys Message-ID: <201408011508.s71F8ms2039608@svn.freebsd.org> Author: truckman Date: Fri Aug 1 15:08:47 2014 New Revision: 269384 URL: http://svnweb.freebsd.org/changeset/base/269384 Log: MFC r268780 Nuke the never-used RF_TIMESHARE feature, reducing the complexity of the code. The consensus on arch@ is that this feature might have been useful in the distant past, but is now just unnecessary bloat. The int_rman_activate_resource() and int_rman_deactivate_resource() functions become trivial, so manually inline them. The special deferred handling of RF_ACTIVE is no longer needed in reserve_resource_bound(), so eliminate the associated code at the end of the function. These changes reduce the object file size by more than 500 bytes on i386. Update the rman.9 man page to reflect the removal of the RF_TIMESHARE feature. Modified: stable/9/share/man/man9/rman.9 stable/9/sys/kern/subr_rman.c stable/9/sys/sys/rman.h Directory Properties: stable/9/share/man/man9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/share/man/man9/rman.9 ============================================================================== --- stable/9/share/man/man9/rman.9 Fri Aug 1 15:04:46 2014 (r269383) +++ stable/9/share/man/man9/rman.9 Fri Aug 1 15:08:47 2014 (r269384) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 29, 2011 +.Dd July 15, 2014 .Dt RMAN 9 .Os .Sh NAME @@ -141,13 +141,11 @@ represented by a 16-bit flag register, a #define RF_ALLOCATED 0x0001 /* resource has been reserved */ #define RF_ACTIVE 0x0002 /* resource allocation has been activated */ #define RF_SHAREABLE 0x0004 /* resource permits contemporaneous sharing */ -#define RF_TIMESHARE 0x0008 /* resource permits time-division sharing */ -#define RF_WANTED 0x0010 /* somebody is waiting for this resource */ #define RF_FIRSTSHARE 0x0020 /* first in sharing list */ #define RF_PREFETCHABLE 0x0040 /* resource is prefetchable */ .Ed .Pp -The remainder of the flag bits are used to represent the desired alignment +Bits 15:10 of the flag register are used to represent the desired alignment of the resource within the region. .Pp The @@ -299,12 +297,9 @@ The .Fa bound argument must be a power of two. It may be set to zero to specify no boundary restriction. -The default behavior is to allocate an exclusive segment, unless the +A shared segment will be allocated if the .Dv RF_SHAREABLE -or -.Dv RF_TIMESHARE -flags are set, in which case a shared -segment will be allocated. +flag is set, otherwise an exclusive segment will be allocated. If this shared segment already exists, the caller has its device added to the list of consumers. .Pp Modified: stable/9/sys/kern/subr_rman.c ============================================================================== --- stable/9/sys/kern/subr_rman.c Fri Aug 1 15:04:46 2014 (r269383) +++ stable/9/sys/kern/subr_rman.c Fri Aug 1 15:08:47 2014 (r269384) @@ -110,9 +110,6 @@ static MALLOC_DEFINE(M_RMAN, "rman", "Re struct rman_head rman_head; static struct mtx rman_mtx; /* mutex to protect rman_head */ -static int int_rman_activate_resource(struct rman *rm, struct resource_i *r, - struct resource_i **whohas); -static int int_rman_deactivate_resource(struct resource_i *r); static int int_rman_release_resource(struct rman *rm, struct resource_i *r); static __inline struct resource_i * @@ -317,7 +314,7 @@ rman_adjust_resource(struct resource *rr /* Not supported for shared resources. */ r = rr->__r_i; - if (r->r_flags & (RF_TIMESHARE | RF_SHAREABLE)) + if (r->r_flags & RF_SHAREABLE) return (EINVAL); /* @@ -430,7 +427,7 @@ rman_adjust_resource(struct resource *rr return (0); } -#define SHARE_TYPE(f) (f & (RF_SHAREABLE | RF_TIMESHARE | RF_PREFETCHABLE)) +#define SHARE_TYPE(f) (f & (RF_SHAREABLE | RF_PREFETCHABLE)) struct resource * rman_reserve_resource_bound(struct rman *rm, u_long start, u_long end, @@ -447,10 +444,9 @@ rman_reserve_resource_bound(struct rman "length %#lx, flags %u, device %s\n", rm->rm_descr, start, end, count, flags, dev == NULL ? "" : device_get_nameunit(dev))); - KASSERT((flags & (RF_WANTED | RF_FIRSTSHARE)) == 0, + KASSERT((flags & RF_FIRSTSHARE) == 0, ("invalid flags %#x", flags)); - new_rflags = (flags & ~(RF_ACTIVE | RF_WANTED | RF_FIRSTSHARE)) | - RF_ALLOCATED; + new_rflags = (flags & ~RF_FIRSTSHARE) | RF_ALLOCATED; mtx_lock(rm->rm_mtx); @@ -596,7 +592,7 @@ rman_reserve_resource_bound(struct rman * additional work, but this does not seem warranted.) */ DPRINTF(("no unshared regions found\n")); - if ((flags & (RF_SHAREABLE | RF_TIMESHARE)) == 0) + if ((flags & RF_SHAREABLE) == 0) goto out; for (s = r; s && s->r_end <= end; s = TAILQ_NEXT(s, r_link)) { @@ -631,25 +627,11 @@ rman_reserve_resource_bound(struct rman goto out; } } - /* * We couldn't find anything. */ -out: - /* - * If the user specified RF_ACTIVE in flags, we attempt to atomically - * activate the resource. If this fails, we release the resource - * and indicate overall failure. (This behavior probably doesn't - * make sense for RF_TIMESHARE-type resources.) - */ - if (rv && (flags & RF_ACTIVE) != 0) { - struct resource_i *whohas; - if (int_rman_activate_resource(rm, rv, &whohas)) { - int_rman_release_resource(rm, rv); - rv = NULL; - } - } +out: mtx_unlock(rm->rm_mtx); return (rv == NULL ? NULL : &rv->r_r); } @@ -663,91 +645,17 @@ rman_reserve_resource(struct rman *rm, u dev)); } -static int -int_rman_activate_resource(struct rman *rm, struct resource_i *r, - struct resource_i **whohas) -{ - struct resource_i *s; - int ok; - - /* - * If we are not timesharing, then there is nothing much to do. - * If we already have the resource, then there is nothing at all to do. - * If we are not on a sharing list with anybody else, then there is - * little to do. - */ - if ((r->r_flags & RF_TIMESHARE) == 0 - || (r->r_flags & RF_ACTIVE) != 0 - || r->r_sharehead == NULL) { - r->r_flags |= RF_ACTIVE; - return 0; - } - - ok = 1; - for (s = LIST_FIRST(r->r_sharehead); s && ok; - s = LIST_NEXT(s, r_sharelink)) { - if ((s->r_flags & RF_ACTIVE) != 0) { - ok = 0; - *whohas = s; - } - } - if (ok) { - r->r_flags |= RF_ACTIVE; - return 0; - } - return EBUSY; -} - int rman_activate_resource(struct resource *re) { - int rv; - struct resource_i *r, *whohas; + struct resource_i *r; struct rman *rm; r = re->__r_i; rm = r->r_rm; mtx_lock(rm->rm_mtx); - rv = int_rman_activate_resource(rm, r, &whohas); + r->r_flags |= RF_ACTIVE; mtx_unlock(rm->rm_mtx); - return rv; -} - -int -rman_await_resource(struct resource *re, int pri, int timo) -{ - int rv; - struct resource_i *r, *whohas; - struct rman *rm; - - r = re->__r_i; - rm = r->r_rm; - mtx_lock(rm->rm_mtx); - for (;;) { - rv = int_rman_activate_resource(rm, r, &whohas); - if (rv != EBUSY) - return (rv); /* returns with mutex held */ - - if (r->r_sharehead == NULL) - panic("rman_await_resource"); - whohas->r_flags |= RF_WANTED; - rv = msleep(r->r_sharehead, rm->rm_mtx, pri, "rmwait", timo); - if (rv) { - mtx_unlock(rm->rm_mtx); - return (rv); - } - } -} - -static int -int_rman_deactivate_resource(struct resource_i *r) -{ - - r->r_flags &= ~RF_ACTIVE; - if (r->r_flags & RF_WANTED) { - r->r_flags &= ~RF_WANTED; - wakeup(r->r_sharehead); - } return 0; } @@ -758,7 +666,7 @@ rman_deactivate_resource(struct resource rm = r->__r_i->r_rm; mtx_lock(rm->rm_mtx); - int_rman_deactivate_resource(r->__r_i); + r->__r_i->r_flags &= ~RF_ACTIVE; mtx_unlock(rm->rm_mtx); return 0; } @@ -769,7 +677,7 @@ int_rman_release_resource(struct rman *r struct resource_i *s, *t; if (r->r_flags & RF_ACTIVE) - int_rman_deactivate_resource(r); + r->r_flags &= ~RF_ACTIVE; /* * Check for a sharing list first. If there is one, then we don't Modified: stable/9/sys/sys/rman.h ============================================================================== --- stable/9/sys/sys/rman.h Fri Aug 1 15:04:46 2014 (r269383) +++ stable/9/sys/sys/rman.h Fri Aug 1 15:08:47 2014 (r269384) @@ -42,8 +42,8 @@ #define RF_ALLOCATED 0x0001 /* resource has been reserved */ #define RF_ACTIVE 0x0002 /* resource allocation has been activated */ #define RF_SHAREABLE 0x0004 /* resource permits contemporaneous sharing */ -#define RF_TIMESHARE 0x0008 /* resource permits time-division sharing */ -#define RF_WANTED 0x0010 /* somebody is waiting for this resource */ +#define RF_SPARE1 0x0008 +#define RF_SPARE2 0x0010 #define RF_FIRSTSHARE 0x0020 /* first in sharing list */ #define RF_PREFETCHABLE 0x0040 /* resource is prefetchable */ #define RF_OPTIONAL 0x0080 /* for bus_alloc_resources() */ From jhb at FreeBSD.org Fri Aug 1 21:00:18 2014 From: jhb at FreeBSD.org (John Baldwin) Date: Fri, 1 Aug 2014 21:00:18 +0000 (UTC) Subject: svn commit: r269397 - stable/10/share/examples/bhyve Message-ID: <201408012100.s71L0I2D006524@svn.freebsd.org> Author: jhb Date: Fri Aug 1 21:00:18 2014 New Revision: 269397 URL: http://svnweb.freebsd.org/changeset/base/269397 Log: MFC 256657,257423,264837,267559: Sync vmrun.sh with HEAD: - Add -e option to vmrun.sh passed to bhyveload(8) to set loader environment variables. - Stop passing unused -I option to bhyve(8). - Reformat the usage to fit in 80 colums and other cleanups. - Add -C option to specify the console device. - Add -H option to pass a host path to bhyveload(8). - Support for multiple disk and tap devices. Modified: stable/10/share/examples/bhyve/vmrun.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/share/examples/bhyve/vmrun.sh ============================================================================== --- stable/10/share/examples/bhyve/vmrun.sh Fri Aug 1 20:49:27 2014 (r269396) +++ stable/10/share/examples/bhyve/vmrun.sh Fri Aug 1 21:00:18 2014 (r269397) @@ -34,17 +34,25 @@ FBSDRUN=/usr/sbin/bhyve DEFAULT_MEMSIZE=512M DEFAULT_CPUS=2 DEFAULT_TAPDEV=tap0 +DEFAULT_CONSOLE=stdio DEFAULT_VIRTIO_DISK="./diskdev" DEFAULT_ISOFILE="./release.iso" usage() { - echo "Usage: vmrun.sh [-hai][-g ][-m ][-d ][-I ][-t ] " + echo "Usage: vmrun.sh [-ahi] [-c ] [-C ] [-d ]" + echo " [-e ] [-g ] [-H ]" + echo " [-I ] [-m ]" + echo " [-t ] " + echo "" echo " -h: display this help message" - echo " -a: force memory mapped local apic access" + echo " -a: force memory mapped local APIC access" echo " -c: number of virtual cpus (default is ${DEFAULT_CPUS})" + echo " -C: console device (default is ${DEFAULT_CONSOLE})" echo " -d: virtio diskdev file (default is ${DEFAULT_VIRTIO_DISK})" + echo " -e: set FreeBSD loader environment variable" echo " -g: listen for connection from kgdb at " + echo " -H: host filesystem to export to the loader" echo " -i: force boot of the Installation CDROM image" echo " -I: Installation CDROM image location (default is ${DEFAULT_ISOFILE})" echo " -m: memory size (default is ${DEFAULT_MEMSIZE})" @@ -68,24 +76,37 @@ fi force_install=0 isofile=${DEFAULT_ISOFILE} memsize=${DEFAULT_MEMSIZE} +console=${DEFAULT_CONSOLE} cpus=${DEFAULT_CPUS} -virtio_diskdev=${DEFAULT_VIRTIO_DISK} -tapdev=${DEFAULT_TAPDEV} +tap_total=0 +disk_total=0 apic_opt="" gdbport=0 +loader_opt="" -while getopts haic:g:I:m:d:t: c ; do +while getopts ac:C:d:e:g:hH:iI:m:t: c ; do case $c in - h) - usage - ;; a) apic_opt="-a" ;; + c) + cpus=${OPTARG} + ;; + C) + console=${OPTARG} + ;; d) - virtio_diskdev=${OPTARG} + eval "disk_dev${disk_total}=\"${OPTARG}\"" + disk_total=$(($disk_total + 1)) ;; - g) gdbport=${OPTARG} + e) + loader_opt="${loader_opt} -e ${OPTARG}" + ;; + g) + gdbport=${OPTARG} + ;; + H) + host_base=`realpath ${OPTARG}` ;; i) force_install=1 @@ -93,21 +114,29 @@ while getopts haic:g:I:m:d:t: c ; do I) isofile=${OPTARG} ;; - c) - cpus=${OPTARG} - ;; m) memsize=${OPTARG} ;; t) - tapdev=${OPTARG} + eval "tap_dev${tap_total}=\"${OPTARG}\"" + tap_total=$(($tap_total + 1)) ;; - \?) + *) usage ;; esac done +if [ $tap_total -eq 0 ] ; then + tap_total=1 + tap_dev0="${DEFAULT_TAPDEV}" +fi +if [ $disk_total -eq 0 ] ; then + disk_total=1 + disk_dev0="${DEFAULT_VIRTIO_DISK}" + +fi + shift $((${OPTIND} - 1)) if [ $# -ne 1 ]; then @@ -115,26 +144,35 @@ if [ $# -ne 1 ]; then fi vmname="$1" - -# Create the virtio diskdev file if needed -if [ ! -f ${virtio_diskdev} ]; then - echo "virtio disk device file \"${virtio_diskdev}\" does not exist." - echo "Creating it ..." - truncate -s 8G ${virtio_diskdev} > /dev/null -fi - -if [ ! -r ${virtio_diskdev} ]; then - echo "virtio disk device file \"${virtio_diskdev}\" is not readable" - exit 1 +if [ -n "${host_base}" ]; then + loader_opt="${loader_opt} -h ${host_base}" fi -if [ ! -w ${virtio_diskdev} ]; then - echo "virtio disk device file \"${virtio_diskdev}\" is not writable" - exit 1 -fi +make_and_check_diskdev() +{ + local virtio_diskdev="$1" + # Create the virtio diskdev file if needed + if [ ! -f ${virtio_diskdev} ]; then + echo "virtio disk device file \"${virtio_diskdev}\" does not exist." + echo "Creating it ..." + truncate -s 8G ${virtio_diskdev} > /dev/null + fi + + if [ ! -r ${virtio_diskdev} ]; then + echo "virtio disk device file \"${virtio_diskdev}\" is not readable" + exit 1 + fi + + if [ ! -w ${virtio_diskdev} ]; then + echo "virtio disk device file \"${virtio_diskdev}\" is not writable" + exit 1 + fi +} echo "Launching virtual machine \"$vmname\" ..." +virtio_diskdev="$disk_dev0" + while [ 1 ]; do ${BHYVECTL} --vm=${vmname} --destroy > /dev/null 2>&1 @@ -163,18 +201,40 @@ while [ 1 ]; do installer_opt="" fi - ${LOADER} -m ${memsize} -d ${BOOTDISK} ${vmname} + ${LOADER} -c ${console} -m ${memsize} -d ${BOOTDISK} ${loader_opt} \ + ${vmname} if [ $? -ne 0 ]; then break fi - ${FBSDRUN} -c ${cpus} -m ${memsize} ${apic_opt} -AI -H -P \ + # + # Build up args for additional tap and disk devices now. + # + nextslot=2 # slot 0 is hostbridge, slot 1 is lpc + devargs="" # accumulate disk/tap args here + i=0 + while [ $i -lt $tap_total ] ; do + eval "tapname=\$tap_dev${i}" + devargs="$devargs -s $nextslot:0,virtio-net,${tapname} " + nextslot=$(($nextslot + 1)) + i=$(($i + 1)) + done + + i=0 + while [ $i -lt $disk_total ] ; do + eval "disk=\$disk_dev${i}" + make_and_check_diskdev "${disk}" + devargs="$devargs -s $nextslot:0,virtio-blk,${disk} " + nextslot=$(($nextslot + 1)) + i=$(($i + 1)) + done + + ${FBSDRUN} -c ${cpus} -m ${memsize} ${apic_opt} -A -H -P \ -g ${gdbport} \ -s 0:0,hostbridge \ -s 1:0,lpc \ - -s 2:0,virtio-net,${tapdev} \ - -s 3:0,virtio-blk,${virtio_diskdev} \ - -l com1,stdio \ + ${devargs} \ + -l com1,${console} \ ${installer_opt} \ ${vmname} if [ $? -ne 0 ]; then From rmacklem at FreeBSD.org Fri Aug 1 21:10:44 2014 From: rmacklem at FreeBSD.org (Rick Macklem) Date: Fri, 1 Aug 2014 21:10:41 +0000 (UTC) Subject: svn commit: r269398 - in stable/10/sys: conf fs/nfs fs/nfsclient fs/nfsserver modules/krpc rpc Message-ID: <201408012110.s71LAf4c013741@svn.freebsd.org> Author: rmacklem Date: Fri Aug 1 21:10:41 2014 New Revision: 269398 URL: http://svnweb.freebsd.org/changeset/base/269398 Log: MFC: r268115 Merge the NFSv4.1 server code in projects/nfsv4.1-server over into head. The code is not believed to have any effect on the semantics of non-NFSv4.1 server behaviour. It is a rather large merge, but I am hoping that there will not be any regressions for the NFS server. Added: stable/10/sys/rpc/clnt_bck.c - copied unchanged from r268115, head/sys/rpc/clnt_bck.c Modified: stable/10/sys/conf/files stable/10/sys/fs/nfs/nfs.h stable/10/sys/fs/nfs/nfs_commonkrpc.c stable/10/sys/fs/nfs/nfs_commonport.c stable/10/sys/fs/nfs/nfs_commonsubs.c stable/10/sys/fs/nfs/nfs_var.h stable/10/sys/fs/nfs/nfsclstate.h stable/10/sys/fs/nfs/nfsdport.h stable/10/sys/fs/nfs/nfsport.h stable/10/sys/fs/nfs/nfsproto.h stable/10/sys/fs/nfs/nfsrvstate.h stable/10/sys/fs/nfsclient/nfs_clstate.c stable/10/sys/fs/nfsserver/nfs_nfsdcache.c stable/10/sys/fs/nfsserver/nfs_nfsdkrpc.c stable/10/sys/fs/nfsserver/nfs_nfsdport.c stable/10/sys/fs/nfsserver/nfs_nfsdserv.c stable/10/sys/fs/nfsserver/nfs_nfsdsocket.c stable/10/sys/fs/nfsserver/nfs_nfsdstate.c stable/10/sys/fs/nfsserver/nfs_nfsdsubs.c stable/10/sys/modules/krpc/Makefile stable/10/sys/rpc/krpc.h stable/10/sys/rpc/svc.h stable/10/sys/rpc/svc_vc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Fri Aug 1 21:00:18 2014 (r269397) +++ stable/10/sys/conf/files Fri Aug 1 21:10:41 2014 (r269398) @@ -3838,6 +3838,7 @@ pci/viapm.c optional viapm pci rpc/auth_none.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd rpc/auth_unix.c optional krpc | nfslockd | nfsclient | nfscl | nfsd rpc/authunix_prot.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd +rpc/clnt_bck.c optional krpc | nfslockd | nfsserver | nfscl | nfsd rpc/clnt_dg.c optional krpc | nfslockd | nfsclient | nfscl | nfsd rpc/clnt_rc.c optional krpc | nfslockd | nfsclient | nfscl | nfsd rpc/clnt_vc.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd Modified: stable/10/sys/fs/nfs/nfs.h ============================================================================== --- stable/10/sys/fs/nfs/nfs.h Fri Aug 1 21:00:18 2014 (r269397) +++ stable/10/sys/fs/nfs/nfs.h Fri Aug 1 21:10:41 2014 (r269398) @@ -50,7 +50,8 @@ #define NFS_MAXREXMIT 100 /* Stop counting after this many */ #define NFSV4_CALLBACKTIMEO (2 * NFS_HZ) /* Timeout in ticks */ #define NFSV4_CALLBACKRETRY 5 /* Number of retries before failure */ -#define NFSV4_CBSLOTS 8 /* Number of slots for session */ +#define NFSV4_SLOTS 64 /* Number of slots, fore channel */ +#define NFSV4_CBSLOTS 8 /* Number of slots, back channel */ #define NFSV4_CBRETRYCNT 4 /* # of CBRecall retries upon err */ #define NFSV4_UPCALLTIMEO (15 * NFS_HZ) /* Timeout in ticks for upcalls */ /* to gssd or nfsuserd */ @@ -91,6 +92,9 @@ #ifndef NFSLOCKHASHSIZE #define NFSLOCKHASHSIZE 20 /* Size of server nfslock hash table */ #endif +#ifndef NFSSESSIONHASHSIZE +#define NFSSESSIONHASHSIZE 20 /* Size of server session hash table */ +#endif #define NFSSTATEHASHSIZE 10 /* Size of server stateid hash table */ #ifndef NFSUSERHASHSIZE #define NFSUSERHASHSIZE 30 /* Size of user id hash table */ @@ -276,6 +280,8 @@ struct nfsreferral { #define LCL_GSSINTEGRITY 0x00002000 #define LCL_GSSPRIVACY 0x00004000 #define LCL_ADMINREVOKED 0x00008000 +#define LCL_RECLAIMCOMPLETE 0x00010000 +#define LCL_NFSV41 0x00020000 #define LCL_GSS LCL_KERBV /* Or of all mechs */ @@ -318,6 +324,11 @@ struct nfsreferral { #define NFSLCK_SETATTR 0x02000000 #define NFSLCK_DELEGPURGE 0x04000000 #define NFSLCK_DELEGRETURN 0x08000000 +#define NFSLCK_WANTWDELEG 0x10000000 +#define NFSLCK_WANTRDELEG 0x20000000 +#define NFSLCK_WANTNODELEG 0x40000000 +#define NFSLCK_WANTBITS \ + (NFSLCK_WANTWDELEG | NFSLCK_WANTRDELEG | NFSLCK_WANTNODELEG) /* And bits for nid_flag */ #define NFSID_INITIALIZE 0x0001 @@ -341,68 +352,120 @@ struct nfsreferral { * THE MACROS MUST BE MANUALLY MODIFIED IF NFSATTRBIT_MAXWORDS CHANGES!! * It is (NFSATTRBIT_MAX + 31) / 32. */ -#define NFSATTRBIT_MAXWORDS 2 +#define NFSATTRBIT_MAXWORDS 3 typedef struct { u_int32_t bits[NFSATTRBIT_MAXWORDS]; } nfsattrbit_t; -#define NFSZERO_ATTRBIT(b) do { (b)->bits[0] = 0; (b)->bits[1] = 0; } while (0) -#define NFSSET_ATTRBIT(t, f) do { (t)->bits[0] = (f)->bits[0]; \ - (t)->bits[1] = (f)->bits[1]; } while (0) +#define NFSZERO_ATTRBIT(b) do { \ + (b)->bits[0] = 0; \ + (b)->bits[1] = 0; \ + (b)->bits[2] = 0; \ +} while (0) + +#define NFSSET_ATTRBIT(t, f) do { \ + (t)->bits[0] = (f)->bits[0]; \ + (t)->bits[1] = (f)->bits[1]; \ + (t)->bits[2] = (f)->bits[2]; \ +} while (0) + #define NFSSETSUPP_ATTRBIT(b) do { \ (b)->bits[0] = NFSATTRBIT_SUPP0; \ - (b)->bits[1] = (NFSATTRBIT_SUPP1 | NFSATTRBIT_SUPPSETONLY); } while (0) + (b)->bits[1] = (NFSATTRBIT_SUPP1 | NFSATTRBIT_SUPPSETONLY); \ + (b)->bits[2] = NFSATTRBIT_SUPP2; \ +} while (0) + #define NFSISSET_ATTRBIT(b, p) ((b)->bits[(p) / 32] & (1 << ((p) % 32))) #define NFSSETBIT_ATTRBIT(b, p) ((b)->bits[(p) / 32] |= (1 << ((p) % 32))) #define NFSCLRBIT_ATTRBIT(b, p) ((b)->bits[(p) / 32] &= ~(1 << ((p) % 32))) + #define NFSCLRALL_ATTRBIT(b, a) do { \ - (b)->bits[0] &= ~((a)->bits[0]); \ - (b)->bits[1] &= ~((a)->bits[1]); \ - } while (0) + (b)->bits[0] &= ~((a)->bits[0]); \ + (b)->bits[1] &= ~((a)->bits[1]); \ + (b)->bits[2] &= ~((a)->bits[2]); \ +} while (0) + #define NFSCLRNOT_ATTRBIT(b, a) do { \ - (b)->bits[0] &= ((a)->bits[0]); \ - (b)->bits[1] &= ((a)->bits[1]); \ - } while (0) + (b)->bits[0] &= ((a)->bits[0]); \ + (b)->bits[1] &= ((a)->bits[1]); \ + (b)->bits[2] &= ((a)->bits[2]); \ +} while (0) + #define NFSCLRNOTFILLABLE_ATTRBIT(b) do { \ - (b)->bits[0] &= NFSATTRBIT_SUPP0; \ - (b)->bits[1] &= NFSATTRBIT_SUPP1; } while (0) + (b)->bits[0] &= NFSATTRBIT_SUPP0; \ + (b)->bits[1] &= NFSATTRBIT_SUPP1; \ + (b)->bits[2] &= NFSATTRBIT_SUPP2; \ +} while (0) + #define NFSCLRNOTSETABLE_ATTRBIT(b) do { \ - (b)->bits[0] &= NFSATTRBIT_SETABLE0; \ - (b)->bits[1] &= NFSATTRBIT_SETABLE1; } while (0) -#define NFSNONZERO_ATTRBIT(b) ((b)->bits[0] || (b)->bits[1]) -#define NFSEQUAL_ATTRBIT(b, p) \ - ((b)->bits[0] == (p)->bits[0] && (b)->bits[1] == (p)->bits[1]) + (b)->bits[0] &= NFSATTRBIT_SETABLE0; \ + (b)->bits[1] &= NFSATTRBIT_SETABLE1; \ + (b)->bits[2] &= NFSATTRBIT_SETABLE2; \ +} while (0) + +#define NFSNONZERO_ATTRBIT(b) ((b)->bits[0] || (b)->bits[1] || (b)->bits[2]) +#define NFSEQUAL_ATTRBIT(b, p) ((b)->bits[0] == (p)->bits[0] && \ + (b)->bits[1] == (p)->bits[1] && (b)->bits[2] == (p)->bits[2]) + #define NFSGETATTR_ATTRBIT(b) do { \ - (b)->bits[0] = NFSATTRBIT_GETATTR0; \ - (b)->bits[1] = NFSATTRBIT_GETATTR1; } while (0) + (b)->bits[0] = NFSATTRBIT_GETATTR0; \ + (b)->bits[1] = NFSATTRBIT_GETATTR1; \ + (b)->bits[2] = NFSATTRBIT_GETATTR2; \ +} while (0) + #define NFSWCCATTR_ATTRBIT(b) do { \ - (b)->bits[0] = NFSATTRBIT_WCCATTR0; \ - (b)->bits[1] = NFSATTRBIT_WCCATTR1; } while (0) + (b)->bits[0] = NFSATTRBIT_WCCATTR0; \ + (b)->bits[1] = NFSATTRBIT_WCCATTR1; \ + (b)->bits[2] = NFSATTRBIT_WCCATTR2; \ +} while (0) + #define NFSWRITEGETATTR_ATTRBIT(b) do { \ - (b)->bits[0] = NFSATTRBIT_WRITEGETATTR0; \ - (b)->bits[1] = NFSATTRBIT_WRITEGETATTR1; } while (0) + (b)->bits[0] = NFSATTRBIT_WRITEGETATTR0; \ + (b)->bits[1] = NFSATTRBIT_WRITEGETATTR1; \ + (b)->bits[2] = NFSATTRBIT_WRITEGETATTR2; \ +} while (0) + #define NFSCBGETATTR_ATTRBIT(b, c) do { \ - (c)->bits[0] = ((b)->bits[0] & NFSATTRBIT_CBGETATTR0); \ - (c)->bits[1] = ((b)->bits[1] & NFSATTRBIT_CBGETATTR1); } while (0) + (c)->bits[0] = ((b)->bits[0] & NFSATTRBIT_CBGETATTR0); \ + (c)->bits[1] = ((b)->bits[1] & NFSATTRBIT_CBGETATTR1); \ + (c)->bits[2] = ((b)->bits[2] & NFSATTRBIT_CBGETATTR2); \ +} while (0) + #define NFSPATHCONF_GETATTRBIT(b) do { \ - (b)->bits[0] = NFSGETATTRBIT_PATHCONF0; \ - (b)->bits[1] = NFSGETATTRBIT_PATHCONF1; } while (0) + (b)->bits[0] = NFSGETATTRBIT_PATHCONF0; \ + (b)->bits[1] = NFSGETATTRBIT_PATHCONF1; \ + (b)->bits[2] = NFSGETATTRBIT_PATHCONF2; \ +} while (0) + #define NFSSTATFS_GETATTRBIT(b) do { \ - (b)->bits[0] = NFSGETATTRBIT_STATFS0; \ - (b)->bits[1] = NFSGETATTRBIT_STATFS1; } while (0) + (b)->bits[0] = NFSGETATTRBIT_STATFS0; \ + (b)->bits[1] = NFSGETATTRBIT_STATFS1; \ + (b)->bits[2] = NFSGETATTRBIT_STATFS2; \ +} while (0) + #define NFSISSETSTATFS_ATTRBIT(b) \ (((b)->bits[0] & NFSATTRBIT_STATFS0) || \ - ((b)->bits[1] & NFSATTRBIT_STATFS1)) + ((b)->bits[1] & NFSATTRBIT_STATFS1) || \ + ((b)->bits[2] & NFSATTRBIT_STATFS2)) + #define NFSCLRSTATFS_ATTRBIT(b) do { \ - (b)->bits[0] &= ~NFSATTRBIT_STATFS0; \ - (b)->bits[1] &= ~NFSATTRBIT_STATFS1; } while (0) + (b)->bits[0] &= ~NFSATTRBIT_STATFS0; \ + (b)->bits[1] &= ~NFSATTRBIT_STATFS1; \ + (b)->bits[2] &= ~NFSATTRBIT_STATFS2; \ +} while (0) + #define NFSREADDIRPLUS_ATTRBIT(b) do { \ - (b)->bits[0] = NFSATTRBIT_READDIRPLUS0; \ - (b)->bits[1] = NFSATTRBIT_READDIRPLUS1; } while (0) + (b)->bits[0] = NFSATTRBIT_READDIRPLUS0; \ + (b)->bits[1] = NFSATTRBIT_READDIRPLUS1; \ + (b)->bits[2] = NFSATTRBIT_READDIRPLUS2; \ +} while (0) + #define NFSREFERRAL_ATTRBIT(b) do { \ - (b)->bits[0] = NFSATTRBIT_REFERRAL0; \ - (b)->bits[1] = NFSATTRBIT_REFERRAL1; } while (0) + (b)->bits[0] = NFSATTRBIT_REFERRAL0; \ + (b)->bits[1] = NFSATTRBIT_REFERRAL1; \ + (b)->bits[2] = NFSATTRBIT_REFERRAL2; \ +} while (0) /* * Store uid, gid creds that were used when the stateid was acquired. @@ -529,6 +592,9 @@ struct nfsrv_descript { int nd_gssnamelen; /* principal name length */ char *nd_gssname; /* principal name */ uint32_t *nd_slotseq; /* ptr to slot seq# in req */ + uint8_t nd_sessionid[NFSX_V4SESSIONID]; /* Session id */ + uint32_t nd_slotid; /* Slotid for this RPC */ + SVCXPRT *nd_xprt; /* Server RPC handle */ }; #define nd_princlen nd_gssnamelen @@ -562,6 +628,8 @@ struct nfsrv_descript { #define ND_NFSCL 0x01000000 #define ND_NFSV41 0x02000000 #define ND_HASSEQUENCE 0x04000000 +#define ND_CACHETHIS 0x08000000 +#define ND_LASTOP 0x10000000 /* * ND_GSS should be the "or" of all GSS type authentications. Modified: stable/10/sys/fs/nfs/nfs_commonkrpc.c ============================================================================== --- stable/10/sys/fs/nfs/nfs_commonkrpc.c Fri Aug 1 21:00:18 2014 (r269397) +++ stable/10/sys/fs/nfs/nfs_commonkrpc.c Fri Aug 1 21:10:41 2014 (r269398) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include @@ -739,8 +740,12 @@ tryagain: } nd->nd_mrep = NULL; - stat = CLNT_CALL_MBUF(nrp->nr_client, &ext, procnum, nd->nd_mreq, - &nd->nd_mrep, timo); + if (clp != NULL && sep != NULL) + stat = clnt_bck_call(nrp->nr_client, &ext, procnum, + nd->nd_mreq, &nd->nd_mrep, timo, sep->nfsess_xprt); + else + stat = CLNT_CALL_MBUF(nrp->nr_client, &ext, procnum, + nd->nd_mreq, &nd->nd_mrep, timo); if (rep != NULL) { /* @@ -795,7 +800,8 @@ tryagain: nd->nd_md = nd->nd_mrep; nd->nd_dpos = NFSMTOD(nd->nd_md, caddr_t); nd->nd_repstat = 0; - if (nd->nd_procnum != NFSPROC_NULL) { + if (nd->nd_procnum != NFSPROC_NULL && + nd->nd_procnum != NFSV4PROC_CBNULL) { /* If sep == NULL, set it to the default in nmp. */ if (sep == NULL && nmp != NULL) sep = NFSMNT_MDSSESSION(nmp); @@ -827,11 +833,20 @@ tryagain: /* * If the first op is Sequence, free up the slot. */ - if (nmp != NULL && i == NFSV4OP_SEQUENCE && j != 0) + if ((nmp != NULL && i == NFSV4OP_SEQUENCE && j != 0) || + (clp != NULL && i == NFSV4OP_CBSEQUENCE && j != 0)) NFSCL_DEBUG(1, "failed seq=%d\n", j); - if (nmp != NULL && i == NFSV4OP_SEQUENCE && j == 0) { - NFSM_DISSECT(tl, uint32_t *, NFSX_V4SESSIONID + - 5 * NFSX_UNSIGNED); + if ((nmp != NULL && i == NFSV4OP_SEQUENCE && j == 0) || + (clp != NULL && i == NFSV4OP_CBSEQUENCE && j == 0) + ) { + if (i == NFSV4OP_SEQUENCE) + NFSM_DISSECT(tl, uint32_t *, + NFSX_V4SESSIONID + + 5 * NFSX_UNSIGNED); + else + NFSM_DISSECT(tl, uint32_t *, + NFSX_V4SESSIONID + + 4 * NFSX_UNSIGNED); mtx_lock(&sep->nfsess_mtx); tl += NFSX_V4SESSIONID / NFSX_UNSIGNED; retseq = fxdr_unsigned(uint32_t, *tl++); Modified: stable/10/sys/fs/nfs/nfs_commonport.c ============================================================================== --- stable/10/sys/fs/nfs/nfs_commonport.c Fri Aug 1 21:00:18 2014 (r269397) +++ stable/10/sys/fs/nfs/nfs_commonport.c Fri Aug 1 21:10:41 2014 (r269398) @@ -112,6 +112,7 @@ MALLOC_DEFINE(M_NEWNFSDEVINFO, "NFSCL de MALLOC_DEFINE(M_NEWNFSSOCKREQ, "NFSCL sockreq", "NFS Sock Req"); MALLOC_DEFINE(M_NEWNFSCLDS, "NFSCL session", "NFSv4.1 Session"); MALLOC_DEFINE(M_NEWNFSLAYRECALL, "NFSCL layrecall", "NFSv4.1 Layout Recall"); +MALLOC_DEFINE(M_NEWNFSDSESSION, "NFSD session", "NFSD Session for a client"); /* * Definition of mutex locks. Modified: stable/10/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- stable/10/sys/fs/nfs/nfs_commonsubs.c Fri Aug 1 21:00:18 2014 (r269397) +++ stable/10/sys/fs/nfs/nfs_commonsubs.c Fri Aug 1 21:10:41 2014 (r269398) @@ -1733,6 +1733,23 @@ nfsv4_loadattr(struct nfsrv_descript *nd } attrsum += NFSX_HYPER; break; + case NFSATTRBIT_SUPPATTREXCLCREAT: + retnotsup = 0; + error = nfsrv_getattrbits(nd, &retattrbits, + &cnt, &retnotsup); + if (error) + goto nfsmout; + if (compare && !(*retcmpp)) { + NFSSETSUPP_ATTRBIT(&checkattrbits); + NFSCLRNOTSETABLE_ATTRBIT(&checkattrbits); + NFSCLRBIT_ATTRBIT(&checkattrbits, + NFSATTRBIT_TIMEACCESSSET); + if (!NFSEQUAL_ATTRBIT(&retattrbits, &checkattrbits) + || retnotsup) + *retcmpp = NFSERR_NOTSAME; + } + attrsum += cnt; + break; default: printf("EEK! nfsv4_loadattr unknown attr=%d\n", bitpos); @@ -2469,6 +2486,12 @@ nfsv4_fillattr(struct nfsrv_descript *nd txdr_hyper(uquad, tl); retnum += NFSX_HYPER; break; + case NFSATTRBIT_SUPPATTREXCLCREAT: + NFSSETSUPP_ATTRBIT(&attrbits); + NFSCLRNOTSETABLE_ATTRBIT(&attrbits); + NFSCLRBIT_ATTRBIT(&attrbits, NFSATTRBIT_TIMEACCESSSET); + retnum += nfsrv_putattrbit(nd, &attrbits); + break; default: printf("EEK! Bad V4 attribute bitpos=%d\n", bitpos); }; @@ -3663,6 +3686,9 @@ nfsmout: /* * Handle an NFSv4.1 Sequence request for the session. + * If reply != NULL, use it to return the cached reply, as required. + * The client gets a cached reply via this call for callbacks, however the + * server gets a cached reply via the nfsv4_seqsess_cachereply() call. */ int nfsv4_seqsession(uint32_t seqid, uint32_t slotid, uint32_t highslot, @@ -3671,7 +3697,8 @@ nfsv4_seqsession(uint32_t seqid, uint32_ int error; error = 0; - *reply = NULL; + if (reply != NULL) + *reply = NULL; if (slotid > maxslot) return (NFSERR_BADSLOT); if (seqid == slots[slotid].nfssl_seq) { @@ -3679,13 +3706,18 @@ nfsv4_seqsession(uint32_t seqid, uint32_ if (slots[slotid].nfssl_inprog != 0) error = NFSERR_DELAY; else if (slots[slotid].nfssl_reply != NULL) { - *reply = slots[slotid].nfssl_reply; - slots[slotid].nfssl_reply = NULL; + if (reply != NULL) { + *reply = slots[slotid].nfssl_reply; + slots[slotid].nfssl_reply = NULL; + } slots[slotid].nfssl_inprog = 1; + error = NFSERR_REPLYFROMCACHE; } else - error = NFSERR_SEQMISORDERED; + /* No reply cached, so just do it. */ + slots[slotid].nfssl_inprog = 1; } else if ((slots[slotid].nfssl_seq + 1) == seqid) { - m_freem(slots[slotid].nfssl_reply); + if (slots[slotid].nfssl_reply != NULL) + m_freem(slots[slotid].nfssl_reply); slots[slotid].nfssl_reply = NULL; slots[slotid].nfssl_inprog = 1; slots[slotid].nfssl_seq++; @@ -3696,12 +3728,22 @@ nfsv4_seqsession(uint32_t seqid, uint32_ /* * Cache this reply for the slot. + * Use the "rep" argument to return the cached reply if repstat is set to + * NFSERR_REPLYFROMCACHE. The client never sets repstat to this value. */ void -nfsv4_seqsess_cacherep(uint32_t slotid, struct nfsslot *slots, struct mbuf *rep) +nfsv4_seqsess_cacherep(uint32_t slotid, struct nfsslot *slots, int repstat, + struct mbuf **rep) { - slots[slotid].nfssl_reply = rep; + if (repstat == NFSERR_REPLYFROMCACHE) { + *rep = slots[slotid].nfssl_reply; + slots[slotid].nfssl_reply = NULL; + } else { + if (slots[slotid].nfssl_reply != NULL) + m_freem(slots[slotid].nfssl_reply); + slots[slotid].nfssl_reply = *rep; + } slots[slotid].nfssl_inprog = 0; } @@ -3713,9 +3755,36 @@ nfsv4_setsequence(struct nfsmount *nmp, struct nfsclsession *sep, int dont_replycache) { uint32_t *tl, slotseq = 0; + int error, maxslot, slotpos; + uint8_t sessionid[NFSX_V4SESSIONID]; + + error = nfsv4_sequencelookup(nmp, sep, &slotpos, &maxslot, &slotseq, + sessionid); + if (error != 0) + return; + KASSERT(maxslot >= 0, ("nfscl_setsequence neg maxslot")); + + /* Build the Sequence arguments. */ + NFSM_BUILD(tl, uint32_t *, NFSX_V4SESSIONID + 4 * NFSX_UNSIGNED); + bcopy(sessionid, tl, NFSX_V4SESSIONID); + tl += NFSX_V4SESSIONID / NFSX_UNSIGNED; + nd->nd_slotseq = tl; + *tl++ = txdr_unsigned(slotseq); + *tl++ = txdr_unsigned(slotpos); + *tl++ = txdr_unsigned(maxslot); + if (dont_replycache == 0) + *tl = newnfs_true; + else + *tl = newnfs_false; + nd->nd_flag |= ND_HASSEQUENCE; +} + +int +nfsv4_sequencelookup(struct nfsmount *nmp, struct nfsclsession *sep, + int *slotposp, int *maxslotp, uint32_t *slotseqp, uint8_t *sessionid) +{ int i, maxslot, slotpos; uint64_t bitval; - uint8_t sessionid[NFSX_V4SESSIONID]; /* Find an unused slot. */ slotpos = -1; @@ -3728,7 +3797,7 @@ nfsv4_setsequence(struct nfsmount *nmp, slotpos = i; sep->nfsess_slots |= bitval; sep->nfsess_slotseq[i]++; - slotseq = sep->nfsess_slotseq[i]; + *slotseqp = sep->nfsess_slotseq[i]; break; } bitval <<= 1; @@ -3739,10 +3808,11 @@ nfsv4_setsequence(struct nfsmount *nmp, * This RPC attempt will fail when it calls * newnfs_request(). */ - if ((nmp->nm_mountp->mnt_kern_flag & MNTK_UNMOUNTF) + if (nmp != NULL && + (nmp->nm_mountp->mnt_kern_flag & MNTK_UNMOUNTF) != 0) { mtx_unlock(&sep->nfsess_mtx); - return; + return (ESTALE); } /* Wake up once/sec, to check for a forced dismount. */ (void)mtx_sleep(&sep->nfsess_slots, &sep->nfsess_mtx, @@ -3758,21 +3828,9 @@ nfsv4_setsequence(struct nfsmount *nmp, } bcopy(sep->nfsess_sessionid, sessionid, NFSX_V4SESSIONID); mtx_unlock(&sep->nfsess_mtx); - KASSERT(maxslot >= 0, ("nfscl_setsequence neg maxslot")); - - /* Build the Sequence arguments. */ - NFSM_BUILD(tl, uint32_t *, NFSX_V4SESSIONID + 4 * NFSX_UNSIGNED); - bcopy(sessionid, tl, NFSX_V4SESSIONID); - tl += NFSX_V4SESSIONID / NFSX_UNSIGNED; - nd->nd_slotseq = tl; - *tl++ = txdr_unsigned(slotseq); - *tl++ = txdr_unsigned(slotpos); - *tl++ = txdr_unsigned(maxslot); - if (dont_replycache == 0) - *tl = newnfs_true; - else - *tl = newnfs_false; - nd->nd_flag |= ND_HASSEQUENCE; + *slotposp = slotpos; + *maxslotp = maxslot; + return (0); } /* Modified: stable/10/sys/fs/nfs/nfs_var.h ============================================================================== --- stable/10/sys/fs/nfs/nfs_var.h Fri Aug 1 21:00:18 2014 (r269397) +++ stable/10/sys/fs/nfs/nfs_var.h Fri Aug 1 21:10:41 2014 (r269398) @@ -61,6 +61,7 @@ union nethostaddr; struct nfsstate; struct nfslock; struct nfsclient; +struct nfsdsession; struct nfslockconflict; struct nfsd_idargs; struct nfsd_clid; @@ -90,8 +91,11 @@ NFS_READDIR_ARGS; /* nfs_nfsdstate.c */ int nfsrv_setclient(struct nfsrv_descript *, struct nfsclient **, nfsquad_t *, nfsquad_t *, NFSPROC_T *); -int nfsrv_getclient(nfsquad_t, int, struct nfsclient **, nfsquad_t, - struct nfsrv_descript *, NFSPROC_T *); +int nfsrv_getclient(nfsquad_t, int, struct nfsclient **, struct nfsdsession *, + nfsquad_t, uint32_t, struct nfsrv_descript *, NFSPROC_T *); +int nfsrv_destroyclient(nfsquad_t, NFSPROC_T *); +int nfsrv_destroysession(struct nfsrv_descript *, uint8_t *); +int nfsrv_freestateid(struct nfsrv_descript *, nfsv4stateid_t *, NFSPROC_T *); int nfsrv_adminrevoke(struct nfsd_clid *, NFSPROC_T *); void nfsrv_dumpclients(struct nfsd_dumpclients *, int); void nfsrv_dumplocks(vnode_t, struct nfsd_dumplocks *, int, NFSPROC_T *); @@ -105,8 +109,8 @@ int nfsrv_opencheck(nfsquad_t, nfsv4stat vnode_t, struct nfsrv_descript *, NFSPROC_T *, int); int nfsrv_openupdate(vnode_t, struct nfsstate *, nfsquad_t, nfsv4stateid_t *, struct nfsrv_descript *, NFSPROC_T *); -int nfsrv_delegupdate(nfsquad_t, nfsv4stateid_t *, vnode_t, int, - struct ucred *, NFSPROC_T *); +int nfsrv_delegupdate(struct nfsrv_descript *, nfsquad_t, nfsv4stateid_t *, + vnode_t, int, struct ucred *, NFSPROC_T *); int nfsrv_releaselckown(struct nfsstate *, nfsquad_t, NFSPROC_T *); void nfsrv_zapclient(struct nfsclient *, NFSPROC_T *); int nfssvc_idname(struct nfsd_idargs *); @@ -127,6 +131,10 @@ int nfsrv_checkgetattr(struct nfsrv_desc int nfsrv_nfsuserdport(u_short, NFSPROC_T *); void nfsrv_nfsuserddelport(void); void nfsrv_throwawayallstate(NFSPROC_T *); +int nfsrv_checksequence(struct nfsrv_descript *, uint32_t, uint32_t *, + uint32_t *, int, uint32_t *, NFSPROC_T *); +int nfsrv_checkreclaimcomplete(struct nfsrv_descript *); +void nfsrv_cache_session(uint8_t *, uint32_t, int, struct mbuf **); /* nfs_nfsdserv.c */ int nfsrvd_access(struct nfsrv_descript *, int, @@ -211,10 +219,27 @@ int nfsrvd_releaselckown(struct nfsrv_de vnode_t, NFSPROC_T *, struct nfsexstuff *); int nfsrvd_pathconf(struct nfsrv_descript *, int, vnode_t, NFSPROC_T *, struct nfsexstuff *); +int nfsrvd_exchangeid(struct nfsrv_descript *, int, + vnode_t, NFSPROC_T *, struct nfsexstuff *); +int nfsrvd_createsession(struct nfsrv_descript *, int, + vnode_t, NFSPROC_T *, struct nfsexstuff *); +int nfsrvd_sequence(struct nfsrv_descript *, int, + vnode_t, NFSPROC_T *, struct nfsexstuff *); +int nfsrvd_reclaimcomplete(struct nfsrv_descript *, int, + vnode_t, NFSPROC_T *, struct nfsexstuff *); +int nfsrvd_destroyclientid(struct nfsrv_descript *, int, + vnode_t, NFSPROC_T *, struct nfsexstuff *); +int nfsrvd_destroysession(struct nfsrv_descript *, int, + vnode_t, NFSPROC_T *, struct nfsexstuff *); +int nfsrvd_freestateid(struct nfsrv_descript *, int, + vnode_t, NFSPROC_T *, struct nfsexstuff *); +int nfsrvd_notsupp(struct nfsrv_descript *, int, + vnode_t, NFSPROC_T *, struct nfsexstuff *); /* nfs_nfsdsocket.c */ void nfsrvd_rephead(struct nfsrv_descript *); -void nfsrvd_dorpc(struct nfsrv_descript *, int, NFSPROC_T *); +void nfsrvd_dorpc(struct nfsrv_descript *, int, u_char *, int, u_int32_t, + NFSPROC_T *); /* nfs_nfsdcache.c */ void nfsrvd_initcache(void); @@ -264,9 +289,11 @@ int nfsv4_getipaddr(struct nfsrv_descrip int *); int nfsv4_seqsession(uint32_t, uint32_t, uint32_t, struct nfsslot *, struct mbuf **, uint16_t); -void nfsv4_seqsess_cacherep(uint32_t, struct nfsslot *, struct mbuf *); +void nfsv4_seqsess_cacherep(uint32_t, struct nfsslot *, int, struct mbuf **); void nfsv4_setsequence(struct nfsmount *, struct nfsrv_descript *, struct nfsclsession *, int); +int nfsv4_sequencelookup(struct nfsmount *, struct nfsclsession *, int *, + int *, uint32_t *, uint8_t *); void nfsv4_freeslot(struct nfsclsession *, int); /* nfs_clcomsubs.c */ @@ -322,6 +349,8 @@ int nfsrv_parsename(struct nfsrv_descrip NFSPATHLEN_T *); void nfsd_init(void); int nfsd_checkrootexp(struct nfsrv_descript *); +void nfsd_getminorvers(struct nfsrv_descript *, u_char *, u_char **, int *, + u_int32_t *); /* nfs_clvfsops.c */ void nfscl_retopts(struct nfsmount *, char *, size_t); @@ -628,6 +657,7 @@ int nfsvno_advlock(vnode_t, int, u_int64 int nfsrv_v4rootexport(void *, struct ucred *, NFSPROC_T *); int nfsvno_testexp(struct nfsrv_descript *, struct nfsexstuff *); uint32_t nfsrv_hashfh(fhandle_t *); +uint32_t nfsrv_hashsessionid(uint8_t *); void nfsrv_backupstable(void); /* nfs_commonkrpc.c */ Modified: stable/10/sys/fs/nfs/nfsclstate.h ============================================================================== --- stable/10/sys/fs/nfs/nfsclstate.h Fri Aug 1 21:00:18 2014 (r269397) +++ stable/10/sys/fs/nfs/nfsclstate.h Fri Aug 1 21:10:41 2014 (r269398) @@ -57,6 +57,7 @@ struct nfsclsession { struct mtx nfsess_mtx; struct nfsslot nfsess_cbslots[NFSV4_CBSLOTS]; nfsquad_t nfsess_clientid; + SVCXPRT *nfsess_xprt; /* For backchannel callback */ uint32_t nfsess_slotseq[64]; /* Max for 64bit nm_slots */ uint64_t nfsess_slots; uint32_t nfsess_sequenceid; Modified: stable/10/sys/fs/nfs/nfsdport.h ============================================================================== --- stable/10/sys/fs/nfs/nfsdport.h Fri Aug 1 21:00:18 2014 (r269397) +++ stable/10/sys/fs/nfs/nfsdport.h Fri Aug 1 21:10:41 2014 (r269398) @@ -115,3 +115,9 @@ struct nfsexstuff { #define NFSRV_MINFH (sizeof (fhandle_t)) #define NFSRV_MAXFH (sizeof (fhandle_t)) +/* Use this macro for debug printfs. */ +#define NFSD_DEBUG(level, ...) do { \ + if (nfsd_debuglevel >= (level)) \ + printf(__VA_ARGS__); \ + } while (0) + Modified: stable/10/sys/fs/nfs/nfsport.h ============================================================================== --- stable/10/sys/fs/nfs/nfsport.h Fri Aug 1 21:00:18 2014 (r269397) +++ stable/10/sys/fs/nfs/nfsport.h Fri Aug 1 21:10:41 2014 (r269398) @@ -637,6 +637,9 @@ void nfsrvd_rcv(struct socket *, void *, #define NFSUNLOCKSOCKREQ(r) mtx_unlock(&((r)->nr_mtx)) #define NFSLOCKDS(d) mtx_lock(&((d)->nfsclds_mtx)) #define NFSUNLOCKDS(d) mtx_unlock(&((d)->nfsclds_mtx)) +#define NFSSESSIONMUTEXPTR(s) (&((s)->mtx)) +#define NFSLOCKSESSION(s) mtx_lock(&((s)->mtx)) +#define NFSUNLOCKSESSION(s) mtx_unlock(&((s)->mtx)) /* * Use these macros to initialize/free a mutex. @@ -732,6 +735,7 @@ MALLOC_DECLARE(M_NEWNFSDEVINFO); MALLOC_DECLARE(M_NEWNFSSOCKREQ); MALLOC_DECLARE(M_NEWNFSCLDS); MALLOC_DECLARE(M_NEWNFSLAYRECALL); +MALLOC_DECLARE(M_NEWNFSDSESSION); #define M_NFSRVCACHE M_NEWNFSRVCACHE #define M_NFSDCLIENT M_NEWNFSDCLIENT #define M_NFSDSTATE M_NEWNFSDSTATE @@ -757,6 +761,7 @@ MALLOC_DECLARE(M_NEWNFSLAYRECALL); #define M_NFSSOCKREQ M_NEWNFSSOCKREQ #define M_NFSCLDS M_NEWNFSCLDS #define M_NFSLAYRECALL M_NEWNFSLAYRECALL +#define M_NFSDSESSION M_NEWNFSDSESSION #define NFSINT_SIGMASK(set) \ (SIGISMEMBER(set, SIGINT) || SIGISMEMBER(set, SIGTERM) || \ Modified: stable/10/sys/fs/nfs/nfsproto.h ============================================================================== --- stable/10/sys/fs/nfs/nfsproto.h Fri Aug 1 21:00:18 2014 (r269397) +++ stable/10/sys/fs/nfs/nfsproto.h Fri Aug 1 21:10:41 2014 (r269398) @@ -389,9 +389,13 @@ #define NFSV4OPEN_CLAIMPREVIOUS 1 #define NFSV4OPEN_CLAIMDELEGATECUR 2 #define NFSV4OPEN_CLAIMDELEGATEPREV 3 +#define NFSV4OPEN_CLAIMFH 4 +#define NFSV4OPEN_CLAIMDELEGATECURFH 5 +#define NFSV4OPEN_CLAIMDELEGATEPREVFH 6 #define NFSV4OPEN_DELEGATENONE 0 #define NFSV4OPEN_DELEGATEREAD 1 #define NFSV4OPEN_DELEGATEWRITE 2 +#define NFSV4OPEN_DELEGATENONEEXT 3 #define NFSV4OPEN_LIMITSIZE 1 #define NFSV4OPEN_LIMITBLOCKS 2 @@ -479,6 +483,14 @@ #define NFSV4OPEN_ACCESSREAD 0x00000001 #define NFSV4OPEN_ACCESSWRITE 0x00000002 #define NFSV4OPEN_ACCESSBOTH 0x00000003 +#define NFSV4OPEN_WANTDELEGMASK 0x0000ff00 +#define NFSV4OPEN_WANTREADDELEG 0x00000100 +#define NFSV4OPEN_WANTWRITEDELEG 0x00000200 +#define NFSV4OPEN_WANTANYDELEG 0x00000300 +#define NFSV4OPEN_WANTNODELEG 0x00000400 +#define NFSV4OPEN_WANTCANCEL 0x00000500 +#define NFSV4OPEN_WANTSIGNALDELEG 0x00010000 +#define NFSV4OPEN_WANTPUSHDELEG 0x00020000 #define NFSV4OPEN_DENYNONE 0x00000000 #define NFSV4OPEN_DENYREAD 0x00000001 @@ -486,16 +498,35 @@ #define NFSV4OPEN_DENYBOTH 0x00000003 /* + * Delegate_none_ext reply values. + */ +#define NFSV4OPEN_NOTWANTED 0 +#define NFSV4OPEN_CONTENTION 1 +#define NFSV4OPEN_RESOURCE 2 +#define NFSV4OPEN_NOTSUPPFTYPE 3 +#define NFSV4OPEN_NOTSUPPWRITEFTYPE 4 +#define NFSV4OPEN_NOTSUPPUPGRADE 5 +#define NFSV4OPEN_NOTSUPPDOWNGRADE 6 +#define NFSV4OPEN_CANCELLED 7 +#define NFSV4OPEN_ISDIR 8 + +/* * Open result flags - * (The first two are in the spec. The rest are used internally.) + * (The first four are in the spec. The rest are used internally.) */ #define NFSV4OPEN_RESULTCONFIRM 0x00000002 #define NFSV4OPEN_LOCKTYPEPOSIX 0x00000004 +#define NFSV4OPEN_PRESERVEUNLINKED 0x00000008 +#define NFSV4OPEN_MAYNOTIFYLOCK 0x00000020 #define NFSV4OPEN_RFLAGS \ - (NFSV4OPEN_RESULTCONFIRM | NFSV4OPEN_LOCKTYPEPOSIX) + (NFSV4OPEN_RESULTCONFIRM | NFSV4OPEN_LOCKTYPEPOSIX | \ + NFSV4OPEN_PRESERVEUNLINKED | NFSV4OPEN_MAYNOTIFYLOCK) #define NFSV4OPEN_RECALL 0x00010000 #define NFSV4OPEN_READDELEGATE 0x00020000 #define NFSV4OPEN_WRITEDELEGATE 0x00040000 +#define NFSV4OPEN_WDRESOURCE 0x00080000 +#define NFSV4OPEN_WDCONTENTION 0x00100000 +#define NFSV4OPEN_WDNOTWANTED 0x00200000 /* * NFS V4 File Handle types @@ -805,6 +836,27 @@ struct nfsv3_sattr { #define NFSATTRBIT_TIMEMODIFY 53 #define NFSATTRBIT_TIMEMODIFYSET 54 #define NFSATTRBIT_MOUNTEDONFILEID 55 +#define NFSATTRBIT_DIRNOTIFDELAY 56 +#define NFSATTRBIT_DIRENTNOTIFDELAY 57 +#define NFSATTRBIT_DACL 58 +#define NFSATTRBIT_SACL 59 +#define NFSATTRBIT_CHANGEPOLICY 60 +#define NFSATTRBIT_FSSTATUS 61 +#define NFSATTRBIT_FSLAYOUTTYPE 62 +#define NFSATTRBIT_LAYOUTHINT 63 +#define NFSATTRBIT_LAYOUTTYPE 64 +#define NFSATTRBIT_LAYOUTBLKSIZE 65 +#define NFSATTRBIT_LAYOUTALIGNMENT 66 +#define NFSATTRBIT_FSLOCATIONSINFO 67 +#define NFSATTRBIT_MDSTHRESHOLD 68 +#define NFSATTRBIT_RETENTIONGET 69 +#define NFSATTRBIT_RETENTIONSET 70 +#define NFSATTRBIT_RETENTEVTGET 71 +#define NFSATTRBIT_RETENTEVTSET 72 +#define NFSATTRBIT_RETENTIONHOLD 73 +#define NFSATTRBIT_MODESETMASKED 74 +#define NFSATTRBIT_SUPPATTREXCLCREAT 75 +#define NFSATTRBIT_FSCHARSETCAP 76 #define NFSATTRBM_SUPPORTEDATTRS 0x00000001 #define NFSATTRBM_TYPE 0x00000002 @@ -862,8 +914,29 @@ struct nfsv3_sattr { #define NFSATTRBM_TIMEMODIFY 0x00200000 #define NFSATTRBM_TIMEMODIFYSET 0x00400000 #define NFSATTRBM_MOUNTEDONFILEID 0x00800000 +#define NFSATTRBM_DIRNOTIFDELAY 0x01000000 +#define NFSATTRBM_DIRENTNOTIFDELAY 0x02000000 +#define NFSATTRBM_DACL 0x04000000 +#define NFSATTRBM_SACL 0x08000000 +#define NFSATTRBM_CHANGEPOLICY 0x10000000 +#define NFSATTRBM_FSSTATUS 0x20000000 +#define NFSATTRBM_FSLAYOUTTYPE 0x40000000 +#define NFSATTRBM_LAYOUTHINT 0x80000000 +#define NFSATTRBM_LAYOUTTYPE 0x00000001 +#define NFSATTRBM_LAYOUTBLKSIZE 0x00000002 +#define NFSATTRBM_LAYOUTALIGNMENT 0x00000004 +#define NFSATTRBM_FSLOCATIONSINFO 0x00000008 +#define NFSATTRBM_MDSTHRESHOLD 0x00000010 +#define NFSATTRBM_RETENTIONGET 0x00000020 +#define NFSATTRBM_RETENTIONSET 0x00000040 +#define NFSATTRBM_RETENTEVTGET 0x00000080 +#define NFSATTRBM_RETENTEVTSET 0x00000100 +#define NFSATTRBM_RETENTIONHOLD 0x00000200 +#define NFSATTRBM_MODESETMASKED 0x00000400 +#define NFSATTRBM_SUPPATTREXCLCREAT 0x00000800 +#define NFSATTRBM_FSCHARSETCAP 0x00001000 -#define NFSATTRBIT_MAX 56 +#define NFSATTRBIT_MAX 77 /* * Sets of attributes that are supported, by words in the bitmap. @@ -871,6 +944,7 @@ struct nfsv3_sattr { /* * NFSATTRBIT_SUPPORTED - SUPP0 - bits 0<->31 * SUPP1 - bits 32<->63 + * SUPP2 - bits 64<->95 */ #define NFSATTRBIT_SUPP0 \ (NFSATTRBM_SUPPORTEDATTRS | \ @@ -937,6 +1011,8 @@ struct nfsv3_sattr { #define NFSATTRBIT_SUPP1 NFSATTRBIT_S1 #endif +#define NFSATTRBIT_SUPP2 NFSATTRBM_SUPPATTREXCLCREAT + /* * NFSATTRBIT_SUPPSETONLY is the OR of NFSATTRBIT_TIMEACCESSSET and * NFSATTRBIT_TIMEMODIFYSET. @@ -947,6 +1023,7 @@ struct nfsv3_sattr { /* * NFSATTRBIT_SETABLE - SETABLE0 - bits 0<->31 * SETABLE1 - bits 32<->63 + * SETABLE2 - bits 64<->95 */ #define NFSATTRBIT_SETABLE0 \ (NFSATTRBM_SIZE | \ @@ -957,6 +1034,7 @@ struct nfsv3_sattr { NFSATTRBM_OWNERGROUP | \ NFSATTRBM_TIMEACCESSSET | \ NFSATTRBM_TIMEMODIFYSET) +#define NFSATTRBIT_SETABLE2 0 /* * Set of attributes that the getattr vnode op needs. @@ -987,6 +1065,11 @@ struct nfsv3_sattr { NFSATTRBM_TIMEMODIFY) /* + * NFSATTRBIT_GETATTR2 - bits 64<->95 + */ +#define NFSATTRBIT_GETATTR2 0 + +/* * Subset of the above that the Write RPC gets. * OR of the following bits. * NFSATTRBIT_WRITEGETATTR0 - bits 0<->31 @@ -1013,6 +1096,11 @@ struct nfsv3_sattr { NFSATTRBM_TIMEMODIFY) /* + * NFSATTRBIT_WRITEGETATTR2 - bits 64<->95 + */ +#define NFSATTRBIT_WRITEGETATTR2 0 + +/* * Set of attributes that the wccattr operation op needs. * OR of the following bits. * NFSATTRBIT_WCCATTR0 - bits 0<->31 @@ -1026,6 +1114,11 @@ struct nfsv3_sattr { (NFSATTRBM_TIMEMODIFY) /* + * NFSATTRBIT_WCCATTR2 - bits 64<->95 + */ +#define NFSATTRBIT_WCCATTR2 0 + +/* * NFSATTRBIT_CBGETATTR0 - bits 0<->31 */ #define NFSATTRBIT_CBGETATTR0 (NFSATTRBM_CHANGE | NFSATTRBM_SIZE) @@ -1036,6 +1129,11 @@ struct nfsv3_sattr { #define NFSATTRBIT_CBGETATTR1 0x0 /* + * NFSATTRBIT_CBGETATTR2 - bits 64<->95 + */ +#define NFSATTRBIT_CBGETATTR2 0x0 + +/* * Sets of attributes that require a VFS_STATFS() call to get the * values of. * NFSATTRBIT_STATFS0 - bits 0<->31 @@ -1067,6 +1165,11 @@ struct nfsv3_sattr { NFSATTRBM_TIMEDELTA) /* + * NFSATTRBIT_STATFS2 - bits 64<->95 + */ +#define NFSATTRBIT_STATFS2 0 + +/* * These are the bits that are needed by the nfs_statfs() call. * (The regular getattr bits are or'd in so the vnode gets the correct * type, etc.) @@ -1094,6 +1197,11 @@ struct nfsv3_sattr { NFSATTRBM_TIMEDELTA) /* + * NFSGETATTRBIT_STATFS2 - bits 64<->95 + */ +#define NFSGETATTRBIT_STATFS2 0 + +/* * Set of attributes for the equivalent of an nfsv3 pathconf rpc. * NFSGETATTRBIT_PATHCONF0 - bits 0<->31 */ @@ -1111,6 +1219,11 @@ struct nfsv3_sattr { NFSATTRBM_NOTRUNC) /* + * NFSGETATTRBIT_PATHCONF2 - bits 64<->95 + */ +#define NFSGETATTRBIT_PATHCONF2 0 + +/* * Sets of attributes required by readdir and readdirplus. * NFSATTRBIT_READDIRPLUS0 (NFSATTRBIT_GETATTR0 | NFSATTRBIT_FILEHANDLE | * NFSATTRBIT_RDATTRERROR) @@ -1118,6 +1231,7 @@ struct nfsv3_sattr { #define NFSATTRBIT_READDIRPLUS0 (NFSATTRBIT_GETATTR0 | NFSATTRBM_FILEHANDLE | \ NFSATTRBM_RDATTRERROR) #define NFSATTRBIT_READDIRPLUS1 NFSATTRBIT_GETATTR1 +#define NFSATTRBIT_READDIRPLUS2 0 /* * Set of attributes supported by Referral vnodes. @@ -1125,6 +1239,7 @@ struct nfsv3_sattr { #define NFSATTRBIT_REFERRAL0 (NFSATTRBM_TYPE | NFSATTRBM_FSID | \ NFSATTRBM_RDATTRERROR | NFSATTRBM_FSLOCATIONS) #define NFSATTRBIT_REFERRAL1 NFSATTRBM_MOUNTEDONFILEID +#define NFSATTRBIT_REFERRAL2 0 /* * Structure for data handled by the statfs rpc. Since some fields are Modified: stable/10/sys/fs/nfs/nfsrvstate.h ============================================================================== --- stable/10/sys/fs/nfs/nfsrvstate.h Fri Aug 1 21:00:18 2014 (r269397) +++ stable/10/sys/fs/nfs/nfsrvstate.h Fri Aug 1 21:10:41 2014 (r269398) @@ -42,6 +42,8 @@ LIST_HEAD(nfsclienthashhead, nfsclient); LIST_HEAD(nfsstatehead, nfsstate); LIST_HEAD(nfslockhead, nfslock); LIST_HEAD(nfslockhashhead, nfslockfile); +LIST_HEAD(nfssessionhead, nfsdsession); +LIST_HEAD(nfssessionhashhead, nfsdsession); /* * List head for nfsusrgrp. @@ -64,6 +66,13 @@ TAILQ_HEAD(nfsuserlruhead, nfsusrgrp); (&nfsgroupnamehash[((l)>=4?(*(p)+*((p)+1)+*((p)+2)+*((p)+3)):*(p)) \ % NFSGROUPHASHSIZE]) +struct nfssessionhash { + struct mtx mtx; + struct nfssessionhashhead list; +}; +#define NFSSESSIONHASH(f) \ + (&nfssessionhash[nfsrv_hashsessionid(f) % NFSSESSIONHASHSIZE]) + /* * Client server structure for V4. It is doubly linked into two lists. * The first is a hash table based on the clientid and the second is a @@ -76,6 +85,7 @@ struct nfsclient { struct nfsstatehead lc_open; /* Open owner list */ struct nfsstatehead lc_deleg; /* Delegations */ struct nfsstatehead lc_olddeleg; /* and old delegations */ + struct nfssessionhead lc_session; /* List of NFSv4.1 sessions */ time_t lc_expiry; /* Expiry time (sec) */ time_t lc_delegtime; /* Old deleg expiry (sec) */ nfsquad_t lc_clientid; /* 64 bit clientid */ @@ -101,6 +111,43 @@ struct nfsclient { #define CLOPS_RENEWOP 0x0004 /* + * Structure for an NFSv4.1 session. + * Locking rules for this structure. + * To add/delete one of these structures from the lists, you must lock + * both: NFSLOCKSESSION(session hashhead) and NFSLOCKSTATE() in that order. + * To traverse the lists looking for one of these, you must hold one + * of these two locks. + * The exception is if the thread holds the exclusive root sleep lock. + * In this case, all other nfsd threads are blocked, so locking the + * mutexes isn't required. + * When manipulating sess_refcnt, NFSLOCKSTATE() must be locked. + * When manipulating the fields withinsess_cbsess except nfsess_xprt, + * sess_cbsess.nfsess_mtx must be locked. + * When manipulating sess_slots and sess_cbsess.nfsess_xprt, + * NFSLOCKSESSION(session hashhead) must be locked. + */ +struct nfsdsession { + uint64_t sess_refcnt; /* Reference count. */ + LIST_ENTRY(nfsdsession) sess_hash; /* Hash list of sessions. */ + LIST_ENTRY(nfsdsession) sess_list; /* List of client sessions. */ + struct nfsslot sess_slots[NFSV4_SLOTS]; + struct nfsclient *sess_clp; /* Associated clientid. */ + uint32_t sess_crflags; + uint32_t sess_cbprogram; + uint32_t sess_maxreq; + uint32_t sess_maxresp; + uint32_t sess_maxrespcached; + uint32_t sess_maxops; + uint32_t sess_maxslots; + uint32_t sess_cbmaxreq; + uint32_t sess_cbmaxresp; + uint32_t sess_cbmaxrespcached; + uint32_t sess_cbmaxops; + uint8_t sess_sessionid[NFSX_V4SESSIONID]; + struct nfsclsession sess_cbsess; /* Callback session. */ +}; + +/* * Nfs state structure. I couldn't resist overloading this one, since * it makes cleanup, etc. simpler. These structures are used in four ways: * - open_owner structures chained off of nfsclient Modified: stable/10/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clstate.c Fri Aug 1 21:00:18 2014 (r269397) +++ stable/10/sys/fs/nfsclient/nfs_clstate.c Fri Aug 1 21:10:41 2014 (r269398) @@ -3548,7 +3548,7 @@ out: if (clp != NULL) { nfsv4_seqsess_cacherep(slotid, NFSMNT_MDSSESSION(clp->nfsc_nmp)->nfsess_cbslots, - rep); + NFSERR_OK, &rep); NFSUNLOCKCLSTATE(); } else { NFSUNLOCKCLSTATE(); Modified: stable/10/sys/fs/nfsserver/nfs_nfsdcache.c ============================================================================== --- stable/10/sys/fs/nfsserver/nfs_nfsdcache.c Fri Aug 1 21:00:18 2014 (r269397) +++ stable/10/sys/fs/nfsserver/nfs_nfsdcache.c Fri Aug 1 21:10:41 2014 (r269398) @@ -977,6 +977,9 @@ nfsrvd_refcache(struct nfsrvcache *rp) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From emaste at FreeBSD.org Fri Aug 1 21:14:02 2014 From: emaste at FreeBSD.org (Ed Maste) Date: Fri, 1 Aug 2014 21:14:02 +0000 (UTC) Subject: svn commit: r269399 - stable/10/etc/mtree Message-ID: <201408012114.s71LE2oV015350@svn.freebsd.org> Author: emaste Date: Fri Aug 1 21:14:02 2014 New Revision: 269399 URL: http://svnweb.freebsd.org/changeset/base/269399 Log: MFC r266902: Add missing libexec/bsdconfig subdirectories Modified: stable/10/etc/mtree/BSD.usr.dist Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.usr.dist ============================================================================== --- stable/10/etc/mtree/BSD.usr.dist Fri Aug 1 21:10:41 2014 (r269398) +++ stable/10/etc/mtree/BSD.usr.dist Fri Aug 1 21:14:02 2014 (r269399) @@ -101,6 +101,10 @@ .. include .. + includes + include + .. + .. .. bsdinstall .. From rmacklem at FreeBSD.org Fri Aug 1 21:24:20 2014 From: rmacklem at FreeBSD.org (Rick Macklem) Date: Fri, 1 Aug 2014 21:24:19 +0000 (UTC) Subject: svn commit: r269400 - stable/10/sys/sys Message-ID: <201408012124.s71LOJqB019846@svn.freebsd.org> Author: rmacklem Date: Fri Aug 1 21:24:19 2014 New Revision: 269400 URL: http://svnweb.freebsd.org/changeset/base/269400 Log: Bump __FreeBSD_version for r269398, since it changes the internal interfaces between the NFS related modules. This is a direct commit to stable/10. Modified: stable/10/sys/sys/param.h Modified: stable/10/sys/sys/param.h ============================================================================== --- stable/10/sys/sys/param.h Fri Aug 1 21:14:02 2014 (r269399) +++ stable/10/sys/sys/param.h Fri Aug 1 21:24:19 2014 (r269400) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1000711 /* Master, propagated to newvers */ +#define __FreeBSD_version 1000712 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From rmacklem at FreeBSD.org Fri Aug 1 21:28:59 2014 From: rmacklem at FreeBSD.org (Rick Macklem) Date: Fri, 1 Aug 2014 21:28:58 +0000 (UTC) Subject: svn commit: r269401 - stable/10 Message-ID: <201408012128.s71LSwcc020453@svn.freebsd.org> Author: rmacklem Date: Fri Aug 1 21:28:58 2014 New Revision: 269401 URL: http://svnweb.freebsd.org/changeset/base/269401 Log: Add an UPDATING entry for the __FreeBSD_version bump related to r269398. Modified: stable/10/UPDATING Modified: stable/10/UPDATING ============================================================================== --- stable/10/UPDATING Fri Aug 1 21:24:19 2014 (r269400) +++ stable/10/UPDATING Fri Aug 1 21:28:58 2014 (r269401) @@ -16,6 +16,11 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20140801: + The NFSv4.1 server committed by r269398 changes the internal + function call interfaces used between the NFS and krpc modules. + As such, __FreeBSD_version was bumped. + 20140717: It is no longer necessary to include the dwarf version in your DEBUG options in your kernel config file. The bug that required it to be From emaste at FreeBSD.org Fri Aug 1 21:40:42 2014 From: emaste at FreeBSD.org (Ed Maste) Date: Fri, 1 Aug 2014 21:40:42 +0000 (UTC) Subject: svn commit: r269402 - stable/10/sys/amd64/amd64 Message-ID: <201408012140.s71LegeQ027014@svn.freebsd.org> Author: emaste Date: Fri Aug 1 21:40:42 2014 New Revision: 269402 URL: http://svnweb.freebsd.org/changeset/base/269402 Log: MFC r258436: Refactor amd64 startup SMAP parsing Extracted from the projects/uefi branch, this change is a reasonable cleanup and will reduce the diffs to review when bringing in the UEFI work. Modified: stable/10/sys/amd64/amd64/machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/machdep.c ============================================================================== --- stable/10/sys/amd64/amd64/machdep.c Fri Aug 1 21:28:58 2014 (r269401) +++ stable/10/sys/amd64/amd64/machdep.c Fri Aug 1 21:40:42 2014 (r269402) @@ -1330,20 +1330,14 @@ isa_irq_pending(void) u_int basemem; static int -add_smap_entry(struct bios_smap *smap, vm_paddr_t *physmap, int *physmap_idxp) +add_physmap_entry(uint64_t base, uint64_t length, vm_paddr_t *physmap, + int *physmap_idxp) { int i, insert_idx, physmap_idx; physmap_idx = *physmap_idxp; - if (boothowto & RB_VERBOSE) - printf("SMAP type=%02x base=%016lx len=%016lx\n", - smap->type, smap->base, smap->length); - - if (smap->type != SMAP_TYPE_MEMORY) - return (1); - - if (smap->length == 0) + if (length == 0) return (1); /* @@ -1352,8 +1346,8 @@ add_smap_entry(struct bios_smap *smap, v */ insert_idx = physmap_idx + 2; for (i = 0; i <= physmap_idx; i += 2) { - if (smap->base < physmap[i + 1]) { - if (smap->base + smap->length <= physmap[i]) { + if (base < physmap[i + 1]) { + if (base + length <= physmap[i]) { insert_idx = i; break; } @@ -1365,15 +1359,14 @@ add_smap_entry(struct bios_smap *smap, v } /* See if we can prepend to the next entry. */ - if (insert_idx <= physmap_idx && - smap->base + smap->length == physmap[insert_idx]) { - physmap[insert_idx] = smap->base; + if (insert_idx <= physmap_idx && base + length == physmap[insert_idx]) { + physmap[insert_idx] = base; return (1); } /* See if we can append to the previous entry. */ - if (insert_idx > 0 && smap->base == physmap[insert_idx - 1]) { - physmap[insert_idx - 1] += smap->length; + if (insert_idx > 0 && base == physmap[insert_idx - 1]) { + physmap[insert_idx - 1] += length; return (1); } @@ -1395,11 +1388,42 @@ add_smap_entry(struct bios_smap *smap, v } /* Insert the new entry. */ - physmap[insert_idx] = smap->base; - physmap[insert_idx + 1] = smap->base + smap->length; + physmap[insert_idx] = base; + physmap[insert_idx + 1] = base + length; return (1); } +static void +add_smap_entries(struct bios_smap *smapbase, vm_paddr_t *physmap, + int *physmap_idx) +{ + struct bios_smap *smap, *smapend; + u_int32_t smapsize; + + /* + * Memory map from INT 15:E820. + * + * subr_module.c says: + * "Consumer may safely assume that size value precedes data." + * ie: an int32_t immediately precedes smap. + */ + smapsize = *((u_int32_t *)smapbase - 1); + smapend = (struct bios_smap *)((uintptr_t)smapbase + smapsize); + + for (smap = smapbase; smap < smapend; smap++) { + if (boothowto & RB_VERBOSE) + printf("SMAP type=%02x base=%016lx len=%016lx\n", + smap->type, smap->base, smap->length); + + if (smap->type != SMAP_TYPE_MEMORY) + continue; + + if (!add_physmap_entry(smap->base, smap->length, physmap, + physmap_idx)) + break; + } +} + /* * Populate the (physmap) array with base/bound pairs describing the * available physical memory in the system, then test this memory and @@ -1417,32 +1441,19 @@ getmemsize(caddr_t kmdp, u_int64_t first vm_paddr_t pa, physmap[PHYSMAP_SIZE]; u_long physmem_start, physmem_tunable, memtest; pt_entry_t *pte; - struct bios_smap *smapbase, *smap, *smapend; - u_int32_t smapsize; + struct bios_smap *smapbase; quad_t dcons_addr, dcons_size; bzero(physmap, sizeof(physmap)); basemem = 0; physmap_idx = 0; - /* - * get memory map from INT 15:E820, kindly supplied by the loader. - * - * subr_module.c says: - * "Consumer may safely assume that size value precedes data." - * ie: an int32_t immediately precedes smap. - */ smapbase = (struct bios_smap *)preload_search_info(kmdp, MODINFO_METADATA | MODINFOMD_SMAP); if (smapbase == NULL) panic("No BIOS smap info from loader!"); - smapsize = *((u_int32_t *)smapbase - 1); - smapend = (struct bios_smap *)((uintptr_t)smapbase + smapsize); - - for (smap = smapbase; smap < smapend; smap++) - if (!add_smap_entry(smap, physmap, &physmap_idx)) - break; + add_smap_entries(smapbase, physmap, &physmap_idx); /* * Find the 'base memory' segment for SMP From delphij at FreeBSD.org Sat Aug 2 03:56:09 2014 From: delphij at FreeBSD.org (Xin LI) Date: Sat, 2 Aug 2014 03:56:07 +0000 (UTC) Subject: svn commit: r269416 - in stable/10: cddl/contrib/opensolaris/cmd/ztest sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys Message-ID: <201408020356.s723u7ZL001571@svn.freebsd.org> Author: delphij Date: Sat Aug 2 03:56:06 2014 New Revision: 269416 URL: http://svnweb.freebsd.org/changeset/base/269416 Log: MFC r268855: MFV r268848: Instead of asserting all zio's be properly aligned, only assert on the logical ones. Cap uberblocks at 8k, otherwise with ashift=17, there would be only one uberblock. This fixes a problem that zdb would trip assert on pools with ashift >= 0xe (8k). While there, also change the code so it only attempt to condense space map unless the uncondensed size consumes greater than zfs_metaslab_condense_block_threshold blocks. Illumos issue: 4958 zdb trips assert on pools with ashift >= 0xe Modified: stable/10/cddl/contrib/opensolaris/cmd/ztest/ztest.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_debug.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/ztest/ztest.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/ztest/ztest.c Sat Aug 2 03:48:16 2014 (r269415) +++ stable/10/cddl/contrib/opensolaris/cmd/ztest/ztest.c Sat Aug 2 03:56:06 2014 (r269416) @@ -810,7 +810,7 @@ static uint64_t ztest_get_ashift(void) { if (ztest_opts.zo_ashift == 0) - return (SPA_MINBLOCKSHIFT + ztest_random(3)); + return (SPA_MINBLOCKSHIFT + ztest_random(5)); return (ztest_opts.zo_ashift); } @@ -969,11 +969,28 @@ ztest_random_spa_version(uint64_t initia return (version); } +/* + * Find the largest ashift used + */ +static uint64_t +ztest_spa_get_ashift() { + uint64_t i; + uint64_t ashift = SPA_MINBLOCKSHIFT; + vdev_t *rvd = ztest_spa->spa_root_vdev; + + for (i = 0; i < rvd->vdev_children; i++) { + ashift = MAX(ashift, rvd->vdev_child[i]->vdev_ashift); + } + return (ashift); +} + static int ztest_random_blocksize(void) { - return (1 << (SPA_MINBLOCKSHIFT + - ztest_random(SPA_MAXBLOCKSHIFT - SPA_MINBLOCKSHIFT + 1))); + // Choose a block size >= the ashift. + uint64_t block_shift = + ztest_random(SPA_MAXBLOCKSHIFT - ztest_spa_get_ashift() + 1); + return (1 << (SPA_MINBLOCKSHIFT + block_shift)); } static int @@ -5768,16 +5785,30 @@ ztest_freeze(void) spa_freeze(spa); /* + * Because it is hard to predict how much space a write will actually + * require beforehand, we leave ourselves some fudge space to write over + * capacity. + */ + uint64_t capacity = metaslab_class_get_space(spa_normal_class(spa)) / 2; + + /* * Run tests that generate log records but don't alter the pool config * or depend on DSL sync tasks (snapshots, objset create/destroy, etc). * We do a txg_wait_synced() after each iteration to force the txg * to increase well beyond the last synced value in the uberblock. * The ZIL should be OK with that. + * + * Run a random number of times less than zo_maxloops and ensure we do + * not run out of space on the pool. */ while (ztest_random(10) != 0 && - numloops++ < ztest_opts.zo_maxloops) { - ztest_dmu_write_parallel(zd, 0); - ztest_dmu_object_alloc_free(zd, 0); + numloops++ < ztest_opts.zo_maxloops && + metaslab_class_get_alloc(spa_normal_class(spa)) < capacity) { + ztest_od_t od; + ztest_od_init(&od, 0, FTAG, 0, DMU_OT_UINT64_OTHER, 0, 0); + VERIFY0(ztest_object_init(zd, &od, sizeof (od), B_FALSE)); + ztest_io(zd, od.od_object, + ztest_random(ZTEST_RANGE_LOCKS) << SPA_MAXBLOCKSHIFT); txg_wait_synced(spa_get_dsl(spa), 0); } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Sat Aug 2 03:48:16 2014 (r269415) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Sat Aug 2 03:56:06 2014 (r269416) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. */ Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Sat Aug 2 03:48:16 2014 (r269415) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Sat Aug 2 03:56:06 2014 (r269416) @@ -74,6 +74,21 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, condense_ " of in-memory counterpart"); /* + * Condensing a metaslab is not guaranteed to actually reduce the amount of + * space used on disk. In particular, a space map uses data in increments of + * MAX(1 << ashift, SPACE_MAP_INITIAL_BLOCKSIZE), so a metaslab might use the + * same number of blocks after condensing. Since the goal of condensing is to + * reduce the number of IOPs required to read the space map, we only want to + * condense when we can be sure we will reduce the number of blocks used by the + * space map. Unfortunately, we cannot precisely compute whether or not this is + * the case in metaslab_should_condense since we are holding ms_lock. Instead, + * we apply the following heuristic: do not condense a spacemap unless the + * uncondensed size consumes greater than zfs_metaslab_condense_block_threshold + * blocks. + */ +int zfs_metaslab_condense_block_threshold = 4; + +/* * The zfs_mg_noalloc_threshold defines which metaslab groups should * be eligible for allocation. The value is defined as a percentage of * a free space. Metaslab groups that have more free space than @@ -1371,6 +1386,8 @@ metaslab_group_preload(metaslab_group_t * times the size than the free space range tree representation * (i.e. zfs_condense_pct = 110 and in-core = 1MB, minimal = 1.1.MB). * + * 3. The on-disk size of the space map should actually decrease. + * * Checking the first condition is tricky since we don't want to walk * the entire AVL tree calculating the estimated on-disk size. Instead we * use the size-ordered range tree in the metaslab and calculate the @@ -1381,13 +1398,21 @@ metaslab_group_preload(metaslab_group_t * To determine the second criterion we use a best-case estimate and assume * each segment can be represented on-disk as a single 64-bit entry. We refer * to this best-case estimate as the space map's minimal form. + * + * Unfortunately, we cannot compute the on-disk size of the space map in this + * context because we cannot accurately compute the effects of compression, etc. + * Instead, we apply the heuristic described in the block comment for + * zfs_metaslab_condense_block_threshold - we only condense if the space used + * is greater than a threshold number of blocks. */ static boolean_t metaslab_should_condense(metaslab_t *msp) { space_map_t *sm = msp->ms_sm; range_seg_t *rs; - uint64_t size, entries, segsz; + uint64_t size, entries, segsz, object_size, optimal_size, record_size; + dmu_object_info_t doi; + uint64_t vdev_blocksize = 1 << msp->ms_group->mg_vd->vdev_ashift; ASSERT(MUTEX_HELD(&msp->ms_lock)); ASSERT(msp->ms_loaded); @@ -1411,9 +1436,15 @@ metaslab_should_condense(metaslab_t *msp entries = size / (MIN(size, SM_RUN_MAX)); segsz = entries * sizeof (uint64_t); - return (segsz <= space_map_length(msp->ms_sm) && - space_map_length(msp->ms_sm) >= (zfs_condense_pct * - sizeof (uint64_t) * avl_numnodes(&msp->ms_tree->rt_root)) / 100); + optimal_size = sizeof (uint64_t) * avl_numnodes(&msp->ms_tree->rt_root); + object_size = space_map_length(msp->ms_sm); + + dmu_object_info_from_db(sm->sm_dbuf, &doi); + record_size = MAX(doi.doi_data_block_size, vdev_blocksize); + + return (segsz <= object_size && + object_size >= (optimal_size * zfs_condense_pct / 100) && + object_size > zfs_metaslab_condense_block_threshold * record_size); } /* Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Sat Aug 2 03:48:16 2014 (r269415) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Sat Aug 2 03:56:06 2014 (r269416) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright 2013 Martin Matuska . All rights reserved. */ Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h Sat Aug 2 03:48:16 2014 (r269415) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h Sat Aug 2 03:56:06 2014 (r269416) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. */ #ifndef _SYS_VDEV_IMPL_H @@ -249,8 +249,11 @@ struct vdev { #define VDEV_PHYS_SIZE (112 << 10) #define VDEV_UBERBLOCK_RING (128 << 10) +/* The largest uberblock we support is 8k. */ +#define MAX_UBERBLOCK_SHIFT (13) #define VDEV_UBERBLOCK_SHIFT(vd) \ - MAX((vd)->vdev_top->vdev_ashift, UBERBLOCK_SHIFT) + MIN(MAX((vd)->vdev_top->vdev_ashift, UBERBLOCK_SHIFT), \ + MAX_UBERBLOCK_SHIFT) #define VDEV_UBERBLOCK_COUNT(vd) \ (VDEV_UBERBLOCK_RING >> VDEV_UBERBLOCK_SHIFT(vd)) #define VDEV_UBERBLOCK_OFFSET(vd, n) \ Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Sat Aug 2 03:48:16 2014 (r269415) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Sat Aug 2 03:56:06 2014 (r269416) @@ -165,19 +165,20 @@ enum zio_flag { ZIO_FLAG_RESILVER = 1 << 3, ZIO_FLAG_SCRUB = 1 << 4, ZIO_FLAG_SCAN_THREAD = 1 << 5, + ZIO_FLAG_PHYSICAL = 1 << 6, #define ZIO_FLAG_AGG_INHERIT (ZIO_FLAG_CANFAIL - 1) /* * Flags inherited by ddt, gang, and vdev children. */ - ZIO_FLAG_CANFAIL = 1 << 6, /* must be first for INHERIT */ - ZIO_FLAG_SPECULATIVE = 1 << 7, - ZIO_FLAG_CONFIG_WRITER = 1 << 8, - ZIO_FLAG_DONT_RETRY = 1 << 9, - ZIO_FLAG_DONT_CACHE = 1 << 10, - ZIO_FLAG_NODATA = 1 << 11, - ZIO_FLAG_INDUCE_DAMAGE = 1 << 12, + ZIO_FLAG_CANFAIL = 1 << 7, /* must be first for INHERIT */ + ZIO_FLAG_SPECULATIVE = 1 << 8, + ZIO_FLAG_CONFIG_WRITER = 1 << 9, + ZIO_FLAG_DONT_RETRY = 1 << 10, + ZIO_FLAG_DONT_CACHE = 1 << 11, + ZIO_FLAG_NODATA = 1 << 12, + ZIO_FLAG_INDUCE_DAMAGE = 1 << 13, #define ZIO_FLAG_DDT_INHERIT (ZIO_FLAG_IO_RETRY - 1) #define ZIO_FLAG_GANG_INHERIT (ZIO_FLAG_IO_RETRY - 1) @@ -185,27 +186,27 @@ enum zio_flag { /* * Flags inherited by vdev children. */ - ZIO_FLAG_IO_RETRY = 1 << 13, /* must be first for INHERIT */ - ZIO_FLAG_PROBE = 1 << 14, - ZIO_FLAG_TRYHARD = 1 << 15, - ZIO_FLAG_OPTIONAL = 1 << 16, + ZIO_FLAG_IO_RETRY = 1 << 14, /* must be first for INHERIT */ + ZIO_FLAG_PROBE = 1 << 15, + ZIO_FLAG_TRYHARD = 1 << 16, + ZIO_FLAG_OPTIONAL = 1 << 17, #define ZIO_FLAG_VDEV_INHERIT (ZIO_FLAG_DONT_QUEUE - 1) /* * Flags not inherited by any children. */ - ZIO_FLAG_DONT_QUEUE = 1 << 17, /* must be first for INHERIT */ - ZIO_FLAG_DONT_PROPAGATE = 1 << 18, - ZIO_FLAG_IO_BYPASS = 1 << 19, - ZIO_FLAG_IO_REWRITE = 1 << 20, - ZIO_FLAG_RAW = 1 << 21, - ZIO_FLAG_GANG_CHILD = 1 << 22, - ZIO_FLAG_DDT_CHILD = 1 << 23, - ZIO_FLAG_GODFATHER = 1 << 24, - ZIO_FLAG_NOPWRITE = 1 << 25, - ZIO_FLAG_REEXECUTED = 1 << 26, - ZIO_FLAG_DELEGATED = 1 << 27, + ZIO_FLAG_DONT_QUEUE = 1 << 18, /* must be first for INHERIT */ + ZIO_FLAG_DONT_PROPAGATE = 1 << 19, + ZIO_FLAG_IO_BYPASS = 1 << 20, + ZIO_FLAG_IO_REWRITE = 1 << 21, + ZIO_FLAG_RAW = 1 << 22, + ZIO_FLAG_GANG_CHILD = 1 << 23, + ZIO_FLAG_DDT_CHILD = 1 << 24, + ZIO_FLAG_GODFATHER = 1 << 25, + ZIO_FLAG_NOPWRITE = 1 << 26, + ZIO_FLAG_REEXECUTED = 1 << 27, + ZIO_FLAG_DELEGATED = 1 << 28, }; #define ZIO_FLAG_MUSTSUCCEED 0 Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_debug.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_debug.c Sat Aug 2 03:48:16 2014 (r269415) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_debug.c Sat Aug 2 03:56:06 2014 (r269416) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. */ #include @@ -57,7 +57,10 @@ zfs_dbgmsg_fini(void) * echo ::zfs_dbgmsg | mdb -k * * Monitor these messages by running: - * dtrace -q -n 'zfs-dbgmsg{printf("%s\n", stringof(arg0))}' + * dtrace -qn 'zfs-dbgmsg{printf("%s\n", stringof(arg0))}' + * + * When used with libzpool, monitor with: + * dtrace -qn 'zfs$pid::zfs_dbgmsg:probe1{printf("%s\n", copyinstr(arg1))}' */ void zfs_dbgmsg(const char *fmt, ...) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Sat Aug 2 03:48:16 2014 (r269415) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Sat Aug 2 03:56:06 2014 (r269416) @@ -886,8 +886,8 @@ zio_read_phys(zio_t *pio, vdev_t *vd, ui ASSERT3U(offset + size, <=, vd->vdev_psize); zio = zio_create(pio, vd->vdev_spa, 0, NULL, data, size, done, private, - ZIO_TYPE_READ, priority, flags, vd, offset, NULL, - ZIO_STAGE_OPEN, ZIO_READ_PHYS_PIPELINE); + ZIO_TYPE_READ, priority, flags | ZIO_FLAG_PHYSICAL, vd, offset, + NULL, ZIO_STAGE_OPEN, ZIO_READ_PHYS_PIPELINE); zio->io_prop.zp_checksum = checksum; @@ -907,8 +907,8 @@ zio_write_phys(zio_t *pio, vdev_t *vd, u ASSERT3U(offset + size, <=, vd->vdev_psize); zio = zio_create(pio, vd->vdev_spa, 0, NULL, data, size, done, private, - ZIO_TYPE_WRITE, priority, flags, vd, offset, NULL, - ZIO_STAGE_OPEN, ZIO_WRITE_PHYS_PIPELINE); + ZIO_TYPE_WRITE, priority, flags | ZIO_FLAG_PHYSICAL, vd, offset, + NULL, ZIO_STAGE_OPEN, ZIO_WRITE_PHYS_PIPELINE); zio->io_prop.zp_checksum = checksum; @@ -2621,7 +2621,9 @@ zio_vdev_io_start(zio_t **ziop) align = 1ULL << vd->vdev_top->vdev_ashift; - if (P2PHASE(zio->io_size, align) != 0) { + if (!(zio->io_flags & ZIO_FLAG_PHYSICAL) && + P2PHASE(zio->io_size, align) != 0) { + /* Transform logical writes to be a full physical block size. */ uint64_t asize = P2ROUNDUP(zio->io_size, align); char *abuf = NULL; if (zio->io_type == ZIO_TYPE_READ || @@ -2636,8 +2638,22 @@ zio_vdev_io_start(zio_t **ziop) zio_subblock); } - ASSERT(P2PHASE(zio->io_offset, align) == 0); - ASSERT(P2PHASE(zio->io_size, align) == 0); + /* + * If this is not a physical io, make sure that it is properly aligned + * before proceeding. + */ + if (!(zio->io_flags & ZIO_FLAG_PHYSICAL)) { + ASSERT0(P2PHASE(zio->io_offset, align)); + ASSERT0(P2PHASE(zio->io_size, align)); + } else { + /* + * For physical writes, we allow 512b aligned writes and assume + * the device will perform a read-modify-write as necessary. + */ + ASSERT0(P2PHASE(zio->io_offset, SPA_MINBLOCKSIZE)); + ASSERT0(P2PHASE(zio->io_size, SPA_MINBLOCKSIZE)); + } + VERIFY(zio->io_type == ZIO_TYPE_READ || spa_writeable(spa)); /* From delphij at FreeBSD.org Sat Aug 2 03:59:37 2014 From: delphij at FreeBSD.org (Xin LI) Date: Sat, 2 Aug 2014 03:59:36 +0000 (UTC) Subject: svn commit: r269417 - in stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys Message-ID: <201408020359.s723xa82002064@svn.freebsd.org> Author: delphij Date: Sat Aug 2 03:59:35 2014 New Revision: 269417 URL: http://svnweb.freebsd.org/changeset/base/269417 Log: MFC r268858: MFV r268850: Change the interaction between the DMU and ARC so that when the DMU is shutting down an objset, we do not evict the data from the ARC. Instead we simply coordinate the destruction of the DMU's data with the ARC. The only case where we actually need to explicitly evict from the ARC is when dbuf_rele_and_unlock() determines that the administrator has requested that it not be kept in memory, via the primarycache/secondarycache properties. In this case, we evict the data from the ARC by its blkptr_t, the same way as when a block is freed we explicitly evict it from the ARC. Illumos issue: 4631 zvol_get_stats triggering too many reads Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sat Aug 2 03:56:06 2014 (r269416) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sat Aug 2 03:59:35 2014 (r269417) @@ -104,7 +104,7 @@ * with the buffer may be evicted prior to the callback. The callback * must be made with *no locks held* (to prevent deadlock). Additionally, * the users of callbacks must ensure that their private data is - * protected from simultaneous callbacks from arc_buf_evict() + * protected from simultaneous callbacks from arc_clear_callback() * and arc_do_user_evicts(). * * Note that the majority of the performance stats are manipulated @@ -1647,8 +1647,12 @@ arc_buf_data_free(arc_buf_t *buf, void ( } } +/* + * Free up buf->b_data and if 'remove' is set, then pull the + * arc_buf_t off of the the arc_buf_hdr_t's list and free it. + */ static void -arc_buf_destroy(arc_buf_t *buf, boolean_t recycle, boolean_t all) +arc_buf_destroy(arc_buf_t *buf, boolean_t recycle, boolean_t remove) { arc_buf_t **bufp; @@ -1701,7 +1705,7 @@ arc_buf_destroy(arc_buf_t *buf, boolean_ } /* only remove the buf if requested */ - if (!all) + if (!remove) return; /* remove the buf from the hdr list */ @@ -2355,7 +2359,7 @@ restart: mutex_exit(&buf->b_evict_lock); if (buf->b_efunc != NULL) - VERIFY(buf->b_efunc(buf) == 0); + VERIFY0(buf->b_efunc(buf->b_private)); buf->b_efunc = NULL; buf->b_private = NULL; @@ -3490,16 +3494,25 @@ arc_freed(spa_t *spa, const blkptr_t *bp } /* - * This is used by the DMU to let the ARC know that a buffer is - * being evicted, so the ARC should clean up. If this arc buf - * is not yet in the evicted state, it will be put there. + * Clear the user eviction callback set by arc_set_callback(), first calling + * it if it exists. Because the presence of a callback keeps an arc_buf cached + * clearing the callback may result in the arc_buf being destroyed. However, + * it will not result in the *last* arc_buf being destroyed, hence the data + * will remain cached in the ARC. We make a copy of the arc buffer here so + * that we can process the callback without holding any locks. + * + * It's possible that the callback is already in the process of being cleared + * by another thread. In this case we can not clear the callback. + * + * Returns B_TRUE if the callback was successfully called and cleared. */ -int -arc_buf_evict(arc_buf_t *buf) +boolean_t +arc_clear_callback(arc_buf_t *buf) { arc_buf_hdr_t *hdr; kmutex_t *hash_lock; - arc_buf_t **bufp; + arc_evict_func_t *efunc = buf->b_efunc; + void *private = buf->b_private; list_t *list, *evicted_list; kmutex_t *lock, *evicted_lock; @@ -3511,17 +3524,16 @@ arc_buf_evict(arc_buf_t *buf) */ ASSERT(buf->b_data == NULL); mutex_exit(&buf->b_evict_lock); - return (0); + return (B_FALSE); } else if (buf->b_data == NULL) { - arc_buf_t copy = *buf; /* structure assignment */ /* * We are on the eviction list; process this buffer now * but let arc_do_user_evicts() do the reaping. */ buf->b_efunc = NULL; mutex_exit(&buf->b_evict_lock); - VERIFY(copy.b_efunc(©) == 0); - return (1); + VERIFY0(efunc(private)); + return (B_TRUE); } hash_lock = HDR_LOCK(hdr); mutex_enter(hash_lock); @@ -3531,50 +3543,21 @@ arc_buf_evict(arc_buf_t *buf) ASSERT3U(refcount_count(&hdr->b_refcnt), <, hdr->b_datacnt); ASSERT(hdr->b_state == arc_mru || hdr->b_state == arc_mfu); - /* - * Pull this buffer off of the hdr - */ - bufp = &hdr->b_buf; - while (*bufp != buf) - bufp = &(*bufp)->b_next; - *bufp = buf->b_next; - - ASSERT(buf->b_data != NULL); - arc_buf_destroy(buf, FALSE, FALSE); - - if (hdr->b_datacnt == 0) { - arc_state_t *old_state = hdr->b_state; - arc_state_t *evicted_state; - - ASSERT(hdr->b_buf == NULL); - ASSERT(refcount_is_zero(&hdr->b_refcnt)); - - evicted_state = - (old_state == arc_mru) ? arc_mru_ghost : arc_mfu_ghost; - - get_buf_info(hdr, old_state, &list, &lock); - get_buf_info(hdr, evicted_state, &evicted_list, &evicted_lock); - mutex_enter(lock); - mutex_enter(evicted_lock); - - arc_change_state(evicted_state, hdr, hash_lock); - ASSERT(HDR_IN_HASH_TABLE(hdr)); - hdr->b_flags |= ARC_IN_HASH_TABLE; - hdr->b_flags &= ~ARC_BUF_AVAILABLE; + buf->b_efunc = NULL; + buf->b_private = NULL; - mutex_exit(evicted_lock); - mutex_exit(lock); + if (hdr->b_datacnt > 1) { + mutex_exit(&buf->b_evict_lock); + arc_buf_destroy(buf, FALSE, TRUE); + } else { + ASSERT(buf == hdr->b_buf); + hdr->b_flags |= ARC_BUF_AVAILABLE; + mutex_exit(&buf->b_evict_lock); } - mutex_exit(hash_lock); - mutex_exit(&buf->b_evict_lock); - VERIFY(buf->b_efunc(buf) == 0); - buf->b_efunc = NULL; - buf->b_private = NULL; - buf->b_hdr = NULL; - buf->b_next = NULL; - kmem_cache_free(buf_cache, buf); - return (1); + mutex_exit(hash_lock); + VERIFY0(efunc(private)); + return (B_TRUE); } /* @@ -3724,17 +3707,6 @@ arc_released(arc_buf_t *buf) return (released); } -int -arc_has_callback(arc_buf_t *buf) -{ - int callback; - - mutex_enter(&buf->b_evict_lock); - callback = (buf->b_efunc != NULL); - mutex_exit(&buf->b_evict_lock); - return (callback); -} - #ifdef ZFS_DEBUG int arc_referenced(arc_buf_t *buf) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Sat Aug 2 03:56:06 2014 (r269416) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Sat Aug 2 03:59:35 2014 (r269417) @@ -181,8 +181,7 @@ dbuf_hash_insert(dmu_buf_impl_t *db) } /* - * Remove an entry from the hash table. This operation will - * fail if there are any existing holds on the db. + * Remove an entry from the hash table. It must be in the EVICTING state. */ static void dbuf_hash_remove(dmu_buf_impl_t *db) @@ -194,7 +193,7 @@ dbuf_hash_remove(dmu_buf_impl_t *db) dmu_buf_impl_t *dbf, **dbp; /* - * We musn't hold db_mtx to maintin lock ordering: + * We musn't hold db_mtx to maintain lock ordering: * DBUF_HASH_MUTEX > db_mtx. */ ASSERT(refcount_is_zero(&db->db_holds)); @@ -431,7 +430,6 @@ static void dbuf_set_data(dmu_buf_impl_t *db, arc_buf_t *buf) { ASSERT(MUTEX_HELD(&db->db_mtx)); - ASSERT(db->db_buf == NULL || !arc_has_callback(db->db_buf)); db->db_buf = buf; if (buf != NULL) { ASSERT(buf->b_data != NULL); @@ -1544,12 +1542,15 @@ dbuf_assign_arcbuf(dmu_buf_impl_t *db, a * when we are not holding the dn_dbufs_mtx, we can't clear the * entry in the dn_dbufs list. We have to wait until dbuf_destroy() * in this case. For callers from the DMU we will usually see: - * dbuf_clear()->arc_buf_evict()->dbuf_do_evict()->dbuf_destroy() + * dbuf_clear()->arc_clear_callback()->dbuf_do_evict()->dbuf_destroy() * For the arc callback, we will usually see: * dbuf_do_evict()->dbuf_clear();dbuf_destroy() * Sometimes, though, we will get a mix of these two: - * DMU: dbuf_clear()->arc_buf_evict() + * DMU: dbuf_clear()->arc_clear_callback() * ARC: dbuf_do_evict()->dbuf_destroy() + * + * This routine will dissociate the dbuf from the arc, by calling + * arc_clear_callback(), but will not evict the data from the ARC. */ void dbuf_clear(dmu_buf_impl_t *db) @@ -1557,7 +1558,7 @@ dbuf_clear(dmu_buf_impl_t *db) dnode_t *dn; dmu_buf_impl_t *parent = db->db_parent; dmu_buf_impl_t *dndb; - int dbuf_gone = FALSE; + boolean_t dbuf_gone = B_FALSE; ASSERT(MUTEX_HELD(&db->db_mtx)); ASSERT(refcount_is_zero(&db->db_holds)); @@ -1603,7 +1604,7 @@ dbuf_clear(dmu_buf_impl_t *db) } if (db->db_buf) - dbuf_gone = arc_buf_evict(db->db_buf); + dbuf_gone = arc_clear_callback(db->db_buf); if (!dbuf_gone) mutex_exit(&db->db_mtx); @@ -1771,8 +1772,7 @@ dbuf_create(dnode_t *dn, uint8_t level, static int dbuf_do_evict(void *private) { - arc_buf_t *buf = private; - dmu_buf_impl_t *db = buf->b_private; + dmu_buf_impl_t *db = private; if (!MUTEX_HELD(&db->db_mtx)) mutex_enter(&db->db_mtx); @@ -2135,11 +2135,23 @@ dbuf_rele_and_unlock(dmu_buf_impl_t *db, * block on-disk. If so, then we simply evict * ourselves. */ - if (!DBUF_IS_CACHEABLE(db) || - arc_buf_eviction_needed(db->db_buf)) + if (!DBUF_IS_CACHEABLE(db)) { + if (db->db_blkptr != NULL && + !BP_IS_HOLE(db->db_blkptr) && + !BP_IS_EMBEDDED(db->db_blkptr)) { + spa_t *spa = + dmu_objset_spa(db->db_objset); + blkptr_t bp = *db->db_blkptr; + dbuf_clear(db); + arc_freed(spa, &bp); + } else { + dbuf_clear(db); + } + } else if (arc_buf_eviction_needed(db->db_buf)) { dbuf_clear(db); - else + } else { mutex_exit(&db->db_mtx); + } } } else { mutex_exit(&db->db_mtx); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Sat Aug 2 03:56:06 2014 (r269416) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Sat Aug 2 03:59:35 2014 (r269417) @@ -95,7 +95,6 @@ boolean_t arc_buf_remove_ref(arc_buf_t * int arc_buf_size(arc_buf_t *buf); void arc_release(arc_buf_t *buf, void *tag); int arc_released(arc_buf_t *buf); -int arc_has_callback(arc_buf_t *buf); void arc_buf_freeze(arc_buf_t *buf); void arc_buf_thaw(arc_buf_t *buf); boolean_t arc_buf_eviction_needed(arc_buf_t *buf); @@ -114,7 +113,7 @@ zio_t *arc_write(zio_t *pio, spa_t *spa, void arc_freed(spa_t *spa, const blkptr_t *bp); void arc_set_callback(arc_buf_t *buf, arc_evict_func_t *func, void *priv); -int arc_buf_evict(arc_buf_t *buf); +boolean_t arc_clear_callback(arc_buf_t *buf); void arc_flush(spa_t *spa); void arc_tempreserve_clear(uint64_t reserve); From delphij at FreeBSD.org Sat Aug 2 04:01:46 2014 From: delphij at FreeBSD.org (Xin LI) Date: Sat, 2 Aug 2014 04:01:44 +0000 (UTC) Subject: svn commit: r269418 - in stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys Message-ID: <201408020401.s7241iKK005781@svn.freebsd.org> Author: delphij Date: Sat Aug 2 04:01:44 2014 New Revision: 269418 URL: http://svnweb.freebsd.org/changeset/base/269418 Log: MFC r268859: MFV r268851: When a sync task is waiting for a txg to complete, we should hurry it along by increasing the number of outstanding async writes (i.e. make vdev_queue_max_async_writes() return a larger number). Illumos issue: 4753 increase number of outstanding async writes when sync task is waiting Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/txg.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Sat Aug 2 03:59:35 2014 (r269417) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Sat Aug 2 04:01:44 2014 (r269418) @@ -1938,6 +1938,16 @@ spa_writeable(spa_t *spa) return (!!(spa->spa_mode & FWRITE)); } +/* + * Returns true if there is a pending sync task in any of the current + * syncing txg, the current quiescing txg, or the current open txg. + */ +boolean_t +spa_has_pending_synctask(spa_t *spa) +{ + return (!txg_all_lists_empty(&spa->spa_dsl_pool->dp_sync_tasks)); +} + int spa_mode(spa_t *spa) { Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Sat Aug 2 03:59:35 2014 (r269417) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Sat Aug 2 04:01:44 2014 (r269418) @@ -800,6 +800,7 @@ extern uint64_t bp_get_dsize(spa_t *spa, extern boolean_t spa_has_slogs(spa_t *spa); extern boolean_t spa_is_root(spa_t *spa); extern boolean_t spa_writeable(spa_t *spa); +extern boolean_t spa_has_pending_synctask(spa_t *spa); extern int spa_mode(spa_t *spa); extern uint64_t zfs_strtonum(const char *str, char **nptr); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/txg.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/txg.h Sat Aug 2 03:59:35 2014 (r269417) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/txg.h Sat Aug 2 04:01:44 2014 (r269418) @@ -23,7 +23,7 @@ * Use is subject to license terms. */ /* - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. */ #ifndef _SYS_TXG_H @@ -112,6 +112,7 @@ extern boolean_t txg_sync_waiting(struct extern void txg_list_create(txg_list_t *tl, size_t offset); extern void txg_list_destroy(txg_list_t *tl); extern boolean_t txg_list_empty(txg_list_t *tl, uint64_t txg); +extern boolean_t txg_all_lists_empty(txg_list_t *tl); extern boolean_t txg_list_add(txg_list_t *tl, void *p, uint64_t txg); extern boolean_t txg_list_add_tail(txg_list_t *tl, void *p, uint64_t txg); extern void *txg_list_remove(txg_list_t *tl, uint64_t txg); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Sat Aug 2 03:59:35 2014 (r269417) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Sat Aug 2 04:01:44 2014 (r269418) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Portions Copyright 2011 Martin Matuska - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. */ #include @@ -727,6 +727,24 @@ txg_list_empty(txg_list_t *tl, uint64_t } /* + * Returns true if all txg lists are empty. + * + * Warning: this is inherently racy (an item could be added immediately after this + * function returns). We don't bother with the lock because it wouldn't change the + * semantics. + */ +boolean_t +txg_all_lists_empty(txg_list_t *tl) +{ + for (int i = 0; i < TXG_SIZE; i++) { + if (!txg_list_empty(tl, i)) { + return (B_FALSE); + } + } + return (B_TRUE); +} + +/* * Add an entry to the list (unless it's already on the list). * Returns B_TRUE if it was actually added. */ Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Sat Aug 2 03:59:35 2014 (r269417) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Sat Aug 2 04:01:44 2014 (r269418) @@ -24,7 +24,7 @@ */ /* - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. */ #include @@ -408,14 +408,23 @@ vdev_queue_class_min_active(zio_priority } static int -vdev_queue_max_async_writes(uint64_t dirty) +vdev_queue_max_async_writes(spa_t *spa) { int writes; + uint64_t dirty = spa->spa_dsl_pool->dp_dirty_total; uint64_t min_bytes = zfs_dirty_data_max * zfs_vdev_async_write_active_min_dirty_percent / 100; uint64_t max_bytes = zfs_dirty_data_max * zfs_vdev_async_write_active_max_dirty_percent / 100; + /* + * Sync tasks correspond to interactive user actions. To reduce the + * execution time of those actions we push data out as fast as possible. + */ + if (spa_has_pending_synctask(spa)) { + return (zfs_vdev_async_write_max_active); + } + if (dirty < min_bytes) return (zfs_vdev_async_write_min_active); if (dirty > max_bytes) @@ -448,8 +457,7 @@ vdev_queue_class_max_active(spa_t *spa, case ZIO_PRIORITY_ASYNC_READ: return (zfs_vdev_async_read_max_active); case ZIO_PRIORITY_ASYNC_WRITE: - return (vdev_queue_max_async_writes( - spa->spa_dsl_pool->dp_dirty_total)); + return (vdev_queue_max_async_writes(spa)); case ZIO_PRIORITY_SCRUB: return (zfs_vdev_scrub_max_active); default: From delphij at FreeBSD.org Sat Aug 2 04:06:37 2014 From: delphij at FreeBSD.org (Xin LI) Date: Sat, 2 Aug 2014 04:06:35 +0000 (UTC) Subject: svn commit: r269419 - in stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys Message-ID: <201408020406.s7246ZsC006874@svn.freebsd.org> Author: delphij Date: Sat Aug 2 04:06:35 2014 New Revision: 269419 URL: http://svnweb.freebsd.org/changeset/base/269419 Log: MFC r268865: MFV r268852: Reduce lock contention on the z_teardown_lock under heavily cached read workload by splitting the single teardown rrw lock into RRM_NUM_LOCKS (17) of them. Read acquisitions are randomly distributed among these locks based on curthread pointer. Write acquisitions are going to all the locks, which for the usage of this type of lock should be rare. Illumos issue: 5008 lock contention (rrw_exit) while running a read only load Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/rrwlock.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/rrwlock.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/rrwlock.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/rrwlock.c Sat Aug 2 04:01:44 2014 (r269418) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/rrwlock.c Sat Aug 2 04:06:35 2014 (r269419) @@ -286,3 +286,91 @@ rrw_tsd_destroy(void *arg) (void *)curthread, (void *)rn->rn_rrl); } } + +/* + * A reader-mostly lock implementation, tuning above reader-writer locks + * for hightly parallel read acquisitions, while pessimizing writes. + * + * The idea is to split single busy lock into array of locks, so that + * each reader can lock only one of them for read, depending on result + * of simple hash function. That proportionally reduces lock congestion. + * Writer same time has to sequentially aquire write on all the locks. + * That makes write aquisition proportionally slower, but in places where + * it is used (filesystem unmount) performance is not critical. + * + * All the functions below are direct wrappers around functions above. + */ +void +rrm_init(rrmlock_t *rrl, boolean_t track_all) +{ + int i; + + for (i = 0; i < RRM_NUM_LOCKS; i++) + rrw_init(&rrl->locks[i], track_all); +} + +void +rrm_destroy(rrmlock_t *rrl) +{ + int i; + + for (i = 0; i < RRM_NUM_LOCKS; i++) + rrw_destroy(&rrl->locks[i]); +} + +void +rrm_enter(rrmlock_t *rrl, krw_t rw, void *tag) +{ + if (rw == RW_READER) + rrm_enter_read(rrl, tag); + else + rrm_enter_write(rrl); +} + +/* + * This maps the current thread to a specific lock. Note that the lock + * must be released by the same thread that acquired it. We do this + * mapping by taking the thread pointer mod a prime number. We examine + * only the low 32 bits of the thread pointer, because 32-bit division + * is faster than 64-bit division, and the high 32 bits have little + * entropy anyway. + */ +#define RRM_TD_LOCK() (((uint32_t)(uintptr_t)(curthread)) % RRM_NUM_LOCKS) + +void +rrm_enter_read(rrmlock_t *rrl, void *tag) +{ + rrw_enter_read(&rrl->locks[RRM_TD_LOCK()], tag); +} + +void +rrm_enter_write(rrmlock_t *rrl) +{ + int i; + + for (i = 0; i < RRM_NUM_LOCKS; i++) + rrw_enter_write(&rrl->locks[i]); +} + +void +rrm_exit(rrmlock_t *rrl, void *tag) +{ + int i; + + if (rrl->locks[0].rr_writer == curthread) { + for (i = 0; i < RRM_NUM_LOCKS; i++) + rrw_exit(&rrl->locks[i], tag); + } else { + rrw_exit(&rrl->locks[RRM_TD_LOCK()], tag); + } +} + +boolean_t +rrm_held(rrmlock_t *rrl, krw_t rw) +{ + if (rw == RW_WRITER) { + return (rrw_held(&rrl->locks[0], rw)); + } else { + return (rrw_held(&rrl->locks[RRM_TD_LOCK()], rw)); + } +} Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/rrwlock.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/rrwlock.h Sat Aug 2 04:01:44 2014 (r269418) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/rrwlock.h Sat Aug 2 04:06:35 2014 (r269419) @@ -79,6 +79,31 @@ void rrw_tsd_destroy(void *arg); #define RRW_LOCK_HELD(x) \ (rrw_held(x, RW_WRITER) || rrw_held(x, RW_READER)) +/* + * A reader-mostly lock implementation, tuning above reader-writer locks + * for hightly parallel read acquisitions, pessimizing write acquisitions. + * + * This should be a prime number. See comment in rrwlock.c near + * RRM_TD_LOCK() for details. + */ +#define RRM_NUM_LOCKS 17 +typedef struct rrmlock { + rrwlock_t locks[RRM_NUM_LOCKS]; +} rrmlock_t; + +void rrm_init(rrmlock_t *rrl, boolean_t track_all); +void rrm_destroy(rrmlock_t *rrl); +void rrm_enter(rrmlock_t *rrl, krw_t rw, void *tag); +void rrm_enter_read(rrmlock_t *rrl, void *tag); +void rrm_enter_write(rrmlock_t *rrl); +void rrm_exit(rrmlock_t *rrl, void *tag); +boolean_t rrm_held(rrmlock_t *rrl, krw_t rw); + +#define RRM_READ_HELD(x) rrm_held(x, RW_READER) +#define RRM_WRITE_HELD(x) rrm_held(x, RW_WRITER) +#define RRM_LOCK_HELD(x) \ + (rrm_held(x, RW_WRITER) || rrm_held(x, RW_READER)) + #ifdef __cplusplus } #endif Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h Sat Aug 2 04:01:44 2014 (r269418) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h Sat Aug 2 04:06:35 2014 (r269419) @@ -64,7 +64,7 @@ struct zfsvfs { int z_norm; /* normalization flags */ boolean_t z_atime; /* enable atimes mount option */ boolean_t z_unmounted; /* unmounted */ - rrwlock_t z_teardown_lock; + rrmlock_t z_teardown_lock; krwlock_t z_teardown_inactive_lock; list_t z_all_znodes; /* all vnodes in the fs */ kmutex_t z_znodes_lock; /* lock for z_all_znodes */ Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h Sat Aug 2 04:01:44 2014 (r269418) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h Sat Aug 2 04:06:35 2014 (r269419) @@ -256,7 +256,7 @@ VTOZ(vnode_t *vp) /* Called on entry to each ZFS vnode and vfs operation */ #define ZFS_ENTER(zfsvfs) \ { \ - rrw_enter_read(&(zfsvfs)->z_teardown_lock, FTAG); \ + rrm_enter_read(&(zfsvfs)->z_teardown_lock, FTAG); \ if ((zfsvfs)->z_unmounted) { \ ZFS_EXIT(zfsvfs); \ return (EIO); \ @@ -265,10 +265,10 @@ VTOZ(vnode_t *vp) /* Called on entry to each ZFS vnode and vfs operation that can not return EIO */ #define ZFS_ENTER_NOERROR(zfsvfs) \ - rrw_enter(&(zfsvfs)->z_teardown_lock, RW_READER, FTAG) + rrm_enter(&(zfsvfs)->z_teardown_lock, RW_READER, FTAG) /* Must be called before exiting the vop */ -#define ZFS_EXIT(zfsvfs) rrw_exit(&(zfsvfs)->z_teardown_lock, FTAG) +#define ZFS_EXIT(zfsvfs) rrm_exit(&(zfsvfs)->z_teardown_lock, FTAG) /* Verifies the znode is valid */ #define ZFS_VERIFY_ZP(zp) \ Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Sat Aug 2 04:01:44 2014 (r269418) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Sat Aug 2 04:06:35 2014 (r269419) @@ -1466,7 +1466,7 @@ zfsvfs_hold(const char *name, void *tag, if (getzfsvfs(name, zfvp) != 0) error = zfsvfs_create(name, zfvp); if (error == 0) { - rrw_enter(&(*zfvp)->z_teardown_lock, (writer) ? RW_WRITER : + rrm_enter(&(*zfvp)->z_teardown_lock, (writer) ? RW_WRITER : RW_READER, tag); if ((*zfvp)->z_unmounted) { /* @@ -1474,7 +1474,7 @@ zfsvfs_hold(const char *name, void *tag, * thread should be just about to disassociate the * objset from the zfsvfs. */ - rrw_exit(&(*zfvp)->z_teardown_lock, tag); + rrm_exit(&(*zfvp)->z_teardown_lock, tag); return (SET_ERROR(EBUSY)); } } @@ -1484,7 +1484,7 @@ zfsvfs_hold(const char *name, void *tag, static void zfsvfs_rele(zfsvfs_t *zfsvfs, void *tag) { - rrw_exit(&zfsvfs->z_teardown_lock, tag); + rrm_exit(&zfsvfs->z_teardown_lock, tag); if (zfsvfs->z_vfs) { VFS_RELE(zfsvfs->z_vfs); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sat Aug 2 04:01:44 2014 (r269418) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sat Aug 2 04:06:35 2014 (r269419) @@ -988,7 +988,7 @@ zfsvfs_create(const char *osname, zfsvfs mutex_init(&zfsvfs->z_lock, NULL, MUTEX_DEFAULT, NULL); list_create(&zfsvfs->z_all_znodes, sizeof (znode_t), offsetof(znode_t, z_link_node)); - rrw_init(&zfsvfs->z_teardown_lock, B_FALSE); + rrm_init(&zfsvfs->z_teardown_lock, B_FALSE); rw_init(&zfsvfs->z_teardown_inactive_lock, NULL, RW_DEFAULT, NULL); rw_init(&zfsvfs->z_fuid_lock, NULL, RW_DEFAULT, NULL); for (i = 0; i != ZFS_OBJ_MTX_SZ; i++) @@ -1104,7 +1104,7 @@ zfsvfs_free(zfsvfs_t *zfsvfs) mutex_destroy(&zfsvfs->z_znodes_lock); mutex_destroy(&zfsvfs->z_lock); list_destroy(&zfsvfs->z_all_znodes); - rrw_destroy(&zfsvfs->z_teardown_lock); + rrm_destroy(&zfsvfs->z_teardown_lock); rw_destroy(&zfsvfs->z_teardown_inactive_lock); rw_destroy(&zfsvfs->z_fuid_lock); for (i = 0; i != ZFS_OBJ_MTX_SZ; i++) @@ -1833,7 +1833,7 @@ zfsvfs_teardown(zfsvfs_t *zfsvfs, boolea { znode_t *zp; - rrw_enter(&zfsvfs->z_teardown_lock, RW_WRITER, FTAG); + rrm_enter(&zfsvfs->z_teardown_lock, RW_WRITER, FTAG); if (!unmounting) { /* @@ -1866,7 +1866,7 @@ zfsvfs_teardown(zfsvfs_t *zfsvfs, boolea */ if (!unmounting && (zfsvfs->z_unmounted || zfsvfs->z_os == NULL)) { rw_exit(&zfsvfs->z_teardown_inactive_lock); - rrw_exit(&zfsvfs->z_teardown_lock, FTAG); + rrm_exit(&zfsvfs->z_teardown_lock, FTAG); return (SET_ERROR(EIO)); } @@ -1893,7 +1893,7 @@ zfsvfs_teardown(zfsvfs_t *zfsvfs, boolea */ if (unmounting) { zfsvfs->z_unmounted = B_TRUE; - rrw_exit(&zfsvfs->z_teardown_lock, FTAG); + rrm_exit(&zfsvfs->z_teardown_lock, FTAG); rw_exit(&zfsvfs->z_teardown_inactive_lock); } @@ -1970,9 +1970,9 @@ zfs_umount(vfs_t *vfsp, int fflag) * vflush(FORCECLOSE). This way we ensure no future vnops * will be called and risk operating on DOOMED vnodes. */ - rrw_enter(&zfsvfs->z_teardown_lock, RW_WRITER, FTAG); + rrm_enter(&zfsvfs->z_teardown_lock, RW_WRITER, FTAG); zfsvfs->z_unmounted = B_TRUE; - rrw_exit(&zfsvfs->z_teardown_lock, FTAG); + rrm_exit(&zfsvfs->z_teardown_lock, FTAG); } /* @@ -2240,7 +2240,7 @@ zfs_resume_fs(zfsvfs_t *zfsvfs, const ch znode_t *zp; uint64_t sa_obj = 0; - ASSERT(RRW_WRITE_HELD(&zfsvfs->z_teardown_lock)); + ASSERT(RRM_WRITE_HELD(&zfsvfs->z_teardown_lock)); ASSERT(RW_WRITE_HELD(&zfsvfs->z_teardown_inactive_lock)); /* @@ -2296,7 +2296,7 @@ zfs_resume_fs(zfsvfs_t *zfsvfs, const ch bail: /* release the VOPs */ rw_exit(&zfsvfs->z_teardown_inactive_lock); - rrw_exit(&zfsvfs->z_teardown_lock, FTAG); + rrm_exit(&zfsvfs->z_teardown_lock, FTAG); if (err) { /* Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Sat Aug 2 04:01:44 2014 (r269418) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Sat Aug 2 04:06:35 2014 (r269419) @@ -276,7 +276,7 @@ zfs_znode_move(void *buf, void *newbuf, * can safely ensure that the filesystem is not and will not be * unmounted. The next statement is equivalent to ZFS_ENTER(). */ - rrw_enter(&zfsvfs->z_teardown_lock, RW_READER, FTAG); + rrm_enter(&zfsvfs->z_teardown_lock, RW_READER, FTAG); if (zfsvfs->z_unmounted) { ZFS_EXIT(zfsvfs); rw_exit(&zfsvfs_lock); From mav at FreeBSD.org Sat Aug 2 06:56:00 2014 From: mav at FreeBSD.org (Alexander Motin) Date: Sat, 2 Aug 2014 06:56:00 +0000 (UTC) Subject: svn commit: r269429 - stable/10/sys/cam/ctl Message-ID: <201408020656.s726u0Ll086464@svn.freebsd.org> Author: mav Date: Sat Aug 2 06:56:00 2014 New Revision: 269429 URL: http://svnweb.freebsd.org/changeset/base/269429 Log: MFC r269123: Implement separate I/O dispatch method for ZVOLs in "dev" mode. Unlike disk devices ZVOLs process all requests synchronously. That makes impossible sending multiple requests to them from single thread. From the other side ZVOLs have real d_read/d_write methods, which unlike d_strategy can handle uio scatter/gather and have no strict I/O size limitations. So, if ZVOL in "dev" mode is detected, use of d_read/d_write methods instead of d_strategy allows to avoid pointless splitting of large requests into MAXPHYS (128K) sized chunks. Modified: stable/10/sys/cam/ctl/ctl_backend_block.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Sat Aug 2 06:55:36 2014 (r269428) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Sat Aug 2 06:56:00 2014 (r269429) @@ -741,6 +741,88 @@ ctl_be_block_dispatch_file(struct ctl_be } static void +ctl_be_block_dispatch_zvol(struct ctl_be_block_lun *be_lun, + struct ctl_be_block_io *beio) +{ + struct ctl_be_block_devdata *dev_data; + union ctl_io *io; + struct uio xuio; + struct iovec *xiovec; + int flags; + int error, i; + + DPRINTF("entered\n"); + + dev_data = &be_lun->backend.dev; + io = beio->io; + flags = beio->bio_flags; + + bzero(&xuio, sizeof(xuio)); + if (beio->bio_cmd == BIO_READ) { + SDT_PROBE(cbb, kernel, read, file_start, 0, 0, 0, 0, 0); + xuio.uio_rw = UIO_READ; + } else { + SDT_PROBE(cbb, kernel, write, file_start, 0, 0, 0, 0, 0); + xuio.uio_rw = UIO_WRITE; + } + xuio.uio_offset = beio->io_offset; + xuio.uio_resid = beio->io_len; + xuio.uio_segflg = UIO_SYSSPACE; + xuio.uio_iov = beio->xiovecs; + xuio.uio_iovcnt = beio->num_segs; + xuio.uio_td = curthread; + + for (i = 0, xiovec = xuio.uio_iov; i < xuio.uio_iovcnt; i++, xiovec++) { + xiovec->iov_base = beio->sg_segs[i].addr; + xiovec->iov_len = beio->sg_segs[i].len; + } + + binuptime(&beio->ds_t0); + mtx_lock(&be_lun->io_lock); + devstat_start_transaction(beio->lun->disk_stats, &beio->ds_t0); + mtx_unlock(&be_lun->io_lock); + + if (beio->bio_cmd == BIO_READ) { + error = (*dev_data->csw->d_read)(dev_data->cdev, &xuio, 0); + SDT_PROBE(cbb, kernel, read, file_done, 0, 0, 0, 0, 0); + } else { + error = (*dev_data->csw->d_write)(dev_data->cdev, &xuio, 0); + SDT_PROBE(cbb, kernel, write, file_done, 0, 0, 0, 0, 0); + } + + mtx_lock(&be_lun->io_lock); + devstat_end_transaction(beio->lun->disk_stats, beio->io_len, + beio->ds_tag_type, beio->ds_trans_type, + /*now*/ NULL, /*then*/&beio->ds_t0); + mtx_unlock(&be_lun->io_lock); + + /* + * If we got an error, set the sense data to "MEDIUM ERROR" and + * return the I/O to the user. + */ + if (error != 0) { + ctl_set_medium_error(&io->scsiio); + ctl_complete_beio(beio); + return; + } + + /* + * If this is a write or a verify, we're all done. + * If this is a read, we can now send the data to the user. + */ + if ((beio->bio_cmd == BIO_WRITE) || + (ARGS(io)->flags & CTL_LLF_VERIFY)) { + ctl_set_success(&io->scsiio); + ctl_complete_beio(beio); + } else { +#ifdef CTL_TIME_IO + getbintime(&io->io_hdr.dma_start_bt); +#endif + ctl_datamove(io); + } +} + +static void ctl_be_block_flush_dev(struct ctl_be_block_lun *be_lun, struct ctl_be_block_io *beio) { @@ -1581,14 +1663,17 @@ ctl_be_block_open_dev(struct ctl_be_bloc params = &req->reqdata.create; be_lun->dev_type = CTL_BE_BLOCK_DEV; - be_lun->dispatch = ctl_be_block_dispatch_dev; - be_lun->lun_flush = ctl_be_block_flush_dev; - be_lun->unmap = ctl_be_block_unmap_dev; be_lun->backend.dev.cdev = be_lun->vn->v_rdev; be_lun->backend.dev.csw = dev_refthread(be_lun->backend.dev.cdev, &be_lun->backend.dev.dev_ref); if (be_lun->backend.dev.csw == NULL) panic("Unable to retrieve device switch"); + if (strcmp(be_lun->backend.dev.csw->d_name, "zvol") == 0) + be_lun->dispatch = ctl_be_block_dispatch_zvol; + else + be_lun->dispatch = ctl_be_block_dispatch_dev; + be_lun->lun_flush = ctl_be_block_flush_dev; + be_lun->unmap = ctl_be_block_unmap_dev; error = VOP_GETATTR(be_lun->vn, &vattr, NOCRED); if (error) { From marcel at FreeBSD.org Sat Aug 2 15:05:24 2014 From: marcel at FreeBSD.org (Marcel Moolenaar) Date: Sat, 2 Aug 2014 15:05:23 +0000 (UTC) Subject: svn commit: r269432 - stable/10/etc/etc.ia64 Message-ID: <201408021505.s72F5NIH012301@svn.freebsd.org> Author: marcel Date: Sat Aug 2 15:05:23 2014 New Revision: 269432 URL: http://svnweb.freebsd.org/changeset/base/269432 Log: Define both ttyu0 and ttyu1 as onifconsole. This is ideal for ia64 where the console can be on either, depending on the platform. Modified: stable/10/etc/etc.ia64/ttys Modified: stable/10/etc/etc.ia64/ttys ============================================================================== --- stable/10/etc/etc.ia64/ttys Sat Aug 2 08:34:22 2014 (r269431) +++ stable/10/etc/etc.ia64/ttys Sat Aug 2 15:05:23 2014 (r269432) @@ -41,8 +41,8 @@ ttyv7 "/usr/libexec/getty Pc" xterm off ttyv8 "/usr/local/bin/xdm -nodaemon" xterm off secure # Serial terminals. The 'dialup' keyword identifies dialin lines to login, # fingerd etc. -ttyu0 "/usr/libexec/getty std.9600" vt100 on secure -ttyu1 "/usr/libexec/getty std.9600" dialup off secure +ttyu0 "/usr/libexec/getty std.9600" vt100 onifconsole secure +ttyu1 "/usr/libexec/getty std.9600" vt100 onifconsole secure ttyu2 "/usr/libexec/getty std.9600" dialup off secure ttyu3 "/usr/libexec/getty std.9600" dialup off secure # Dumb console From rmacklem at FreeBSD.org Sat Aug 2 20:06:37 2014 From: rmacklem at FreeBSD.org (Rick Macklem) Date: Sat, 2 Aug 2014 20:06:37 +0000 (UTC) Subject: svn commit: r269443 - stable/10/usr.sbin/nfsd Message-ID: <201408022006.s72K6baa051891@svn.freebsd.org> Author: rmacklem Date: Sat Aug 2 20:06:36 2014 New Revision: 269443 URL: http://svnweb.freebsd.org/changeset/base/269443 Log: MFC: r268866 r243637 changed the default number of nfsd threads created, but the man page did not reflect this. This is a content change. Modified: stable/10/usr.sbin/nfsd/nfsd.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/nfsd/nfsd.8 ============================================================================== --- stable/10/usr.sbin/nfsd/nfsd.8 Sat Aug 2 19:59:19 2014 (r269442) +++ stable/10/usr.sbin/nfsd/nfsd.8 Sat Aug 2 20:06:36 2014 (r269443) @@ -28,7 +28,7 @@ .\" @(#)nfsd.8 8.4 (Berkeley) 3/29/95 .\" $FreeBSD$ .\" -.Dd April 23, 2011 +.Dd July 18, 2014 .Dt NFSD 8 .Os .Sh NAME @@ -53,7 +53,7 @@ At least one .Nm must be running for a machine to operate as a server. .Pp -Unless otherwise specified, four servers for +Unless otherwise specified, eight servers per CPU for .Tn UDP transport are started. .Pp From hselasky at FreeBSD.org Sat Aug 2 20:58:47 2014 From: hselasky at FreeBSD.org (Hans Petter Selasky) Date: Sat, 2 Aug 2014 20:58:47 +0000 (UTC) Subject: svn commit: r269446 - in stable/10/sys: kern sys Message-ID: <201408022058.s72KwlUf075175@svn.freebsd.org> Author: hselasky Date: Sat Aug 2 20:58:46 2014 New Revision: 269446 URL: http://svnweb.freebsd.org/changeset/base/269446 Log: Partial MFC of r267961, r267973, r267985, r267992, r267993 and r268005: Backport some macro definitions to make backporting code from FreeBSD current easier. Modified: stable/10/sys/kern/kern_mib.c stable/10/sys/sys/sysctl.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_mib.c ============================================================================== --- stable/10/sys/kern/kern_mib.c Sat Aug 2 20:37:02 2014 (r269445) +++ stable/10/sys/kern/kern_mib.c Sat Aug 2 20:58:46 2014 (r269446) @@ -55,35 +55,35 @@ __FBSDID("$FreeBSD$"); #include #include -SYSCTL_NODE(, 0, sysctl, CTLFLAG_RW, 0, +SYSCTL_ROOT_NODE(0, sysctl, CTLFLAG_RW, 0, "Sysctl internal magic"); -SYSCTL_NODE(, CTL_KERN, kern, CTLFLAG_RW|CTLFLAG_CAPRD, 0, +SYSCTL_ROOT_NODE(CTL_KERN, kern, CTLFLAG_RW|CTLFLAG_CAPRD, 0, "High kernel, proc, limits &c"); -SYSCTL_NODE(, CTL_VM, vm, CTLFLAG_RW, 0, +SYSCTL_ROOT_NODE(CTL_VM, vm, CTLFLAG_RW, 0, "Virtual memory"); -SYSCTL_NODE(, CTL_VFS, vfs, CTLFLAG_RW, 0, +SYSCTL_ROOT_NODE(CTL_VFS, vfs, CTLFLAG_RW, 0, "File system"); -SYSCTL_NODE(, CTL_NET, net, CTLFLAG_RW, 0, +SYSCTL_ROOT_NODE(CTL_NET, net, CTLFLAG_RW, 0, "Network, (see socket.h)"); -SYSCTL_NODE(, CTL_DEBUG, debug, CTLFLAG_RW, 0, +SYSCTL_ROOT_NODE(CTL_DEBUG, debug, CTLFLAG_RW, 0, "Debugging"); SYSCTL_NODE(_debug, OID_AUTO, sizeof, CTLFLAG_RW, 0, "Sizeof various things"); -SYSCTL_NODE(, CTL_HW, hw, CTLFLAG_RW, 0, +SYSCTL_ROOT_NODE(CTL_HW, hw, CTLFLAG_RW, 0, "hardware"); -SYSCTL_NODE(, CTL_MACHDEP, machdep, CTLFLAG_RW, 0, +SYSCTL_ROOT_NODE(CTL_MACHDEP, machdep, CTLFLAG_RW, 0, "machine dependent"); -SYSCTL_NODE(, CTL_USER, user, CTLFLAG_RW, 0, +SYSCTL_ROOT_NODE(CTL_USER, user, CTLFLAG_RW, 0, "user-level"); -SYSCTL_NODE(, CTL_P1003_1B, p1003_1b, CTLFLAG_RW, 0, +SYSCTL_ROOT_NODE(CTL_P1003_1B, p1003_1b, CTLFLAG_RW, 0, "p1003_1b, (see p1003_1b.h)"); -SYSCTL_NODE(, OID_AUTO, compat, CTLFLAG_RW, 0, +SYSCTL_ROOT_NODE(OID_AUTO, compat, CTLFLAG_RW, 0, "Compatibility code"); -SYSCTL_NODE(, OID_AUTO, security, CTLFLAG_RW, 0, +SYSCTL_ROOT_NODE(OID_AUTO, security, CTLFLAG_RW, 0, "Security"); #ifdef REGRESSION -SYSCTL_NODE(, OID_AUTO, regression, CTLFLAG_RW, 0, +SYSCTL_ROOT_NODE(OID_AUTO, regression, CTLFLAG_RW, 0, "Regression test MIB"); #endif Modified: stable/10/sys/sys/sysctl.h ============================================================================== --- stable/10/sys/sys/sysctl.h Sat Aug 2 20:37:02 2014 (r269445) +++ stable/10/sys/sys/sysctl.h Sat Aug 2 20:58:46 2014 (r269446) @@ -92,6 +92,7 @@ struct ctlname { #define CTLFLAG_CAPRD 0x00008000 /* Can be read in capability mode */ #define CTLFLAG_CAPWR 0x00004000 /* Can be written in capability mode */ #define CTLFLAG_STATS 0x00002000 /* Statistics, not a tuneable */ +#define CTLFLAG_NOFETCH 0x00001000 /* Don't fetch tunable from getenv() */ #define CTLFLAG_CAPRW (CTLFLAG_CAPRD|CTLFLAG_CAPWR) /* @@ -206,6 +207,7 @@ void sysctl_unregister_oid(struct sysctl /* Hide these in macros. */ #define SYSCTL_CHILDREN(oid_ptr) \ (struct sysctl_oid_list *)(oid_ptr)->oid_arg1 +#define SYSCTL_PARENT(oid_ptr) NULL /* not supported */ #define SYSCTL_CHILDREN_SET(oid_ptr, val) (oid_ptr)->oid_arg1 = (val) #define SYSCTL_STATIC_CHILDREN(oid_name) (&sysctl_##oid_name##_children) @@ -296,12 +298,19 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a #define SYSCTL_ADD_OID(ctx, parent, nbr, name, kind, a1, a2, handler, fmt, descr) \ sysctl_add_oid(ctx, parent, nbr, name, kind, a1, a2, handler, fmt, __DESCR(descr)) +/* This constructs a root node from which other nodes can hang. */ +#define SYSCTL_ROOT_NODE(nbr, name, access, handler, descr) \ + SYSCTL_NODE(, nbr, name, access, handler, descr) + /* This constructs a node from which other oids can hang. */ #define SYSCTL_NODE(parent, nbr, name, access, handler, descr) \ struct sysctl_oid_list SYSCTL_NODE_CHILDREN(parent, name); \ SYSCTL_OID(parent, nbr, name, CTLTYPE_NODE|(access), \ (void*)&SYSCTL_NODE_CHILDREN(parent, name), 0, handler, "N", descr) +#define SYSCTL_ADD_ROOT_NODE(ctx, nbr, name, access, handler, descr) \ + SYSCTL_ADD_NODE(ctx, SYSCTL_STATIC_CHILDREN(), nbr, name, access, handler, descr) + #define SYSCTL_ADD_NODE(ctx, parent, nbr, name, access, handler, descr) \ sysctl_add_oid(ctx, parent, nbr, name, CTLTYPE_NODE|(access), \ NULL, 0, handler, "N", __DESCR(descr)) From hselasky at FreeBSD.org Sat Aug 2 21:01:59 2014 From: hselasky at FreeBSD.org (Hans Petter Selasky) Date: Sat, 2 Aug 2014 21:01:58 +0000 (UTC) Subject: svn commit: r269447 - stable/10/sys/dev/usb/controller Message-ID: <201408022101.s72L1wUI079006@svn.freebsd.org> Author: hselasky Date: Sat Aug 2 21:01:58 2014 New Revision: 269447 URL: http://svnweb.freebsd.org/changeset/base/269447 Log: MFC r269139: Split the XHCI TRB allocations into smaller parts, so that we don't end up allocating contiguous busdma buffers above PAGE_SIZE bytes. Modified: stable/10/sys/dev/usb/controller/xhci.c stable/10/sys/dev/usb/controller/xhci.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/10/sys/dev/usb/controller/xhci.c Sat Aug 2 20:58:46 2014 (r269446) +++ stable/10/sys/dev/usb/controller/xhci.c Sat Aug 2 21:01:58 2014 (r269447) @@ -2682,24 +2682,23 @@ xhci_alloc_device_ext(struct usb_device goto error; } - pc = &sc->sc_hw.devs[index].endpoint_pc; - pg = &sc->sc_hw.devs[index].endpoint_pg; + /* initialise all endpoint LINK TRBs */ - /* need to initialize the page cache */ - pc->tag_parent = sc->sc_bus.dma_parent_tag; + for (i = 0; i != XHCI_MAX_ENDPOINTS; i++) { - if (usb_pc_alloc_mem(pc, pg, - sizeof(struct xhci_dev_endpoint_trbs), XHCI_PAGE_SIZE)) { - goto error; - } + pc = &sc->sc_hw.devs[index].endpoint_pc[i]; + pg = &sc->sc_hw.devs[index].endpoint_pg[i]; - /* initialise all endpoint LINK TRBs */ + /* need to initialize the page cache */ + pc->tag_parent = sc->sc_bus.dma_parent_tag; - for (i = 0; i != XHCI_MAX_ENDPOINTS; i++) { + if (usb_pc_alloc_mem(pc, pg, + sizeof(struct xhci_dev_endpoint_trbs), XHCI_TRB_ALIGN)) { + goto error; + } /* lookup endpoint TRB ring */ - usbd_get_page(pc, (uintptr_t)& - ((struct xhci_dev_endpoint_trbs *)0)->trb[i][0], &buf_ep); + usbd_get_page(pc, 0, &buf_ep); /* get TRB pointer */ trb = buf_ep.buffer; @@ -2713,9 +2712,9 @@ xhci_alloc_device_ext(struct usb_device trb->dwTrb2 = htole32(XHCI_TRB_2_IRQ_SET(0)); trb->dwTrb3 = htole32(XHCI_TRB_3_CYCLE_BIT | XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_LINK)); - } - usb_pc_cpu_flush(pc); + usb_pc_cpu_flush(pc); + } xhci_set_slot_pointer(sc, index, buf_dev.physaddr); @@ -2732,13 +2731,15 @@ xhci_free_device_ext(struct usb_device * { struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); uint8_t index; + uint8_t i; index = udev->controller_slot_id; xhci_set_slot_pointer(sc, index, 0); usb_pc_free_mem(&sc->sc_hw.devs[index].device_pc); usb_pc_free_mem(&sc->sc_hw.devs[index].input_pc); - usb_pc_free_mem(&sc->sc_hw.devs[index].endpoint_pc); + for (i = 0; i != XHCI_MAX_ENDPOINTS; i++) + usb_pc_free_mem(&sc->sc_hw.devs[index].endpoint_pc[i]); } static struct xhci_endpoint_ext * @@ -2759,10 +2760,9 @@ xhci_get_endpoint_ext(struct usb_device index = udev->controller_slot_id; - pc = &sc->sc_hw.devs[index].endpoint_pc; + pc = &sc->sc_hw.devs[index].endpoint_pc[epno]; - usbd_get_page(pc, (uintptr_t)&((struct xhci_dev_endpoint_trbs *)0)-> - trb[epno][0], &buf_ep); + usbd_get_page(pc, 0, &buf_ep); pepext = &sc->sc_hw.devs[index].endp[epno]; pepext->page_cache = pc; Modified: stable/10/sys/dev/usb/controller/xhci.h ============================================================================== --- stable/10/sys/dev/usb/controller/xhci.h Sat Aug 2 20:58:46 2014 (r269446) +++ stable/10/sys/dev/usb/controller/xhci.h Sat Aug 2 21:01:58 2014 (r269447) @@ -316,8 +316,8 @@ struct xhci_trb { } __aligned(4); struct xhci_dev_endpoint_trbs { - struct xhci_trb trb[XHCI_MAX_ENDPOINTS] - [(XHCI_MAX_STREAMS * XHCI_MAX_TRANSFERS) + XHCI_MAX_STREAMS]; + struct xhci_trb trb[(XHCI_MAX_STREAMS * + XHCI_MAX_TRANSFERS) + XHCI_MAX_STREAMS]; }; #define XHCI_TD_PAGE_NBUF 17 /* units, room enough for 64Kbytes */ @@ -385,11 +385,11 @@ enum { struct xhci_hw_dev { struct usb_page_cache device_pc; struct usb_page_cache input_pc; - struct usb_page_cache endpoint_pc; + struct usb_page_cache endpoint_pc[XHCI_MAX_ENDPOINTS]; struct usb_page device_pg; struct usb_page input_pg; - struct usb_page endpoint_pg; + struct usb_page endpoint_pg[XHCI_MAX_ENDPOINTS]; struct xhci_endpoint_ext endp[XHCI_MAX_ENDPOINTS]; From marcel at FreeBSD.org Sat Aug 2 22:25:25 2014 From: marcel at FreeBSD.org (Marcel Moolenaar) Date: Sat, 2 Aug 2014 22:25:24 +0000 (UTC) Subject: svn commit: r269449 - stable/10/lib/libkvm Message-ID: <201408022225.s72MPOsB016650@svn.freebsd.org> Author: marcel Date: Sat Aug 2 22:25:24 2014 New Revision: 269449 URL: http://svnweb.freebsd.org/changeset/base/269449 Log: MFC 259910, 260023, 260028, 260600 & 260701: o Fix "kptdir is itself virtual" error, caused by having the kptdir in PBVM. o Allow building a cross libkvm for ia64. o Add support for virtual cores (aka minidumps). o We don't have to worry about page sizes when working on virtual cores. o Handle truncation of the size returned by _kvm_kvatop(). Modified: stable/10/lib/libkvm/kvm_ia64.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libkvm/kvm_ia64.c ============================================================================== --- stable/10/lib/libkvm/kvm_ia64.c Sat Aug 2 21:36:40 2014 (r269448) +++ stable/10/lib/libkvm/kvm_ia64.c Sat Aug 2 22:25:24 2014 (r269449) @@ -32,12 +32,21 @@ #include #include +#ifndef CROSS_LIBKVM #include #include +#include #include +#else +#include "../../sys/ia64/include/atomic.h" +#include "../../sys/ia64/include/bootinfo.h" +#include "../../sys/ia64/include/elf.h" +#include "../../sys/ia64/include/pte.h" +#endif #include #include +#include #include #include @@ -55,6 +64,8 @@ #define PBVM_BASE 0x9ffc000000000000UL #define PBVM_PGSZ (64 * 1024) +typedef size_t (a2p_f)(kvm_t *, uint64_t, off_t *); + struct vmstate { void *mmapbase; size_t mmapsize; @@ -62,6 +73,7 @@ struct vmstate { u_long kptdir; u_long *pbvm_pgtbl; u_int pbvm_pgtblsz; + a2p_f *kvatop; }; /* @@ -70,7 +82,7 @@ struct vmstate { * set of headers. */ static int -_kvm_maphdrs(kvm_t *kd, size_t sz) +ia64_maphdrs(kvm_t *kd, size_t sz) { struct vmstate *vm = kd->vmst; @@ -91,38 +103,103 @@ _kvm_maphdrs(kvm_t *kd, size_t sz) } /* - * Translate a physical memory address to a file-offset in the crash-dump. + * Physical core support. */ + static size_t -_kvm_pa2off(kvm_t *kd, uint64_t pa, off_t *ofs, size_t pgsz) +phys_addr2off(kvm_t *kd, uint64_t pa, off_t *ofs, size_t pgsz) { - Elf64_Ehdr *e = kd->vmst->mmapbase; - Elf64_Phdr *p = (Elf64_Phdr*)((char*)e + e->e_phoff); - int n = e->e_phnum; - - if (pa != REGION_ADDR(pa)) { - _kvm_err(kd, kd->program, "internal error"); - return (0); - } - + Elf64_Ehdr *e; + Elf64_Phdr *p; + int n; + + if (pa != REGION_ADDR(pa)) + goto fail; + + e = (Elf64_Ehdr *)(kd->vmst->mmapbase); + n = e->e_phnum; + p = (Elf64_Phdr *)(void *)((uintptr_t)(void *)e + e->e_phoff); while (n && (pa < p->p_paddr || pa >= p->p_paddr + p->p_memsz)) p++, n--; if (n == 0) - return (0); + goto fail; *ofs = (pa - p->p_paddr) + p->p_offset; if (pgsz == 0) return (p->p_memsz - (pa - p->p_paddr)); return (pgsz - ((size_t)pa & (pgsz - 1))); + + fail: + _kvm_err(kd, kd->program, "invalid physical address %#jx", + (uintmax_t)pa); + return (0); +} + +static size_t +phys_kvatop(kvm_t *kd, uint64_t va, off_t *ofs) +{ + struct ia64_lpte pte; + uint64_t pa, pgaddr, pt0addr, pt1addr; + size_t pgno, pgsz, pt0no, pt1no; + + if (va >= REGION_BASE(6)) { + /* Regions 6 and 7: direct mapped. */ + pa = REGION_ADDR(va); + return (phys_addr2off(kd, pa, ofs, 0)); + } else if (va >= REGION_BASE(5)) { + /* Region 5: Kernel Virtual Memory. */ + va = REGION_ADDR(va); + pgsz = kd->vmst->pagesize; + pt0no = KPTE_DIR0_INDEX(va, pgsz); + pt1no = KPTE_DIR1_INDEX(va, pgsz); + pgno = KPTE_PTE_INDEX(va, pgsz); + if (pt0no >= NKPTEDIR(pgsz)) + goto fail; + pt0addr = kd->vmst->kptdir + (pt0no << 3); + if (kvm_read(kd, pt0addr, &pt1addr, 8) != 8) + goto fail; + if (pt1addr == 0) + goto fail; + pt1addr += pt1no << 3; + if (kvm_read(kd, pt1addr, &pgaddr, 8) != 8) + goto fail; + if (pgaddr == 0) + goto fail; + pgaddr += pgno * sizeof(pte); + if (kvm_read(kd, pgaddr, &pte, sizeof(pte)) != sizeof(pte)) + goto fail; + if (!(pte.pte & PTE_PRESENT)) + goto fail; + pa = (pte.pte & PTE_PPN_MASK) + (va & (pgsz - 1)); + return (phys_addr2off(kd, pa, ofs, pgsz)); + } else if (va >= PBVM_BASE) { + /* Region 4: Pre-Boot Virtual Memory (PBVM). */ + va -= PBVM_BASE; + pgsz = PBVM_PGSZ; + pt0no = va / pgsz; + if (pt0no >= (kd->vmst->pbvm_pgtblsz >> 3)) + goto fail; + pt0addr = kd->vmst->pbvm_pgtbl[pt0no]; + if (!(pt0addr & PTE_PRESENT)) + goto fail; + pa = (pt0addr & PTE_PPN_MASK) + va % pgsz; + return (phys_addr2off(kd, pa, ofs, pgsz)); + } + + fail: + _kvm_err(kd, kd->program, "invalid kernel virtual address %#jx", + (uintmax_t)va); + *ofs = -1; + return (0); } static ssize_t -_kvm_read_phys(kvm_t *kd, uint64_t pa, void *buf, size_t bufsz) +phys_read(kvm_t *kd, uint64_t pa, void *buf, size_t bufsz) { off_t ofs; size_t sz; - sz = _kvm_pa2off(kd, pa, &ofs, 0); + sz = phys_addr2off(kd, pa, &ofs, 0); if (sz < bufsz) return ((ssize_t)sz); @@ -131,6 +208,50 @@ _kvm_read_phys(kvm_t *kd, uint64_t pa, v return (read(kd->pmfd, buf, bufsz)); } +/* + * Virtual core support (aka minidump). + */ + +static size_t +virt_addr2off(kvm_t *kd, uint64_t va, off_t *ofs, size_t pgsz) +{ + Elf64_Ehdr *e; + Elf64_Phdr *p; + int n; + + if (va < REGION_BASE(4)) + goto fail; + + e = (Elf64_Ehdr *)(kd->vmst->mmapbase); + n = e->e_phnum; + p = (Elf64_Phdr *)(void *)((uintptr_t)(void *)e + e->e_phoff); + while (n && (va < p->p_vaddr || va >= p->p_vaddr + p->p_memsz)) + p++, n--; + if (n == 0) + goto fail; + + *ofs = (va - p->p_vaddr) + p->p_offset; + if (pgsz == 0) + return (p->p_memsz - (va - p->p_vaddr)); + return (pgsz - ((size_t)va & (pgsz - 1))); + + fail: + _kvm_err(kd, kd->program, "invalid virtual address %#jx", + (uintmax_t)va); + return (0); +} + +static size_t +virt_kvatop(kvm_t *kd, uint64_t va, off_t *ofs) +{ + + return (virt_addr2off(kd, va, ofs, 0)); +} + +/* + * KVM architecture support functions. + */ + void _kvm_freevtop(kvm_t *kd) { @@ -160,27 +281,37 @@ _kvm_initvtop(kvm_t *kd) return (-1); } +#ifndef CROSS_LIBKVM kd->vmst->pagesize = getpagesize(); +#else + kd->vmst->pagesize = 8192; +#endif - if (_kvm_maphdrs(kd, sizeof(Elf64_Ehdr)) == -1) + if (ia64_maphdrs(kd, sizeof(Elf64_Ehdr)) == -1) return (-1); ehdr = kd->vmst->mmapbase; hdrsz = ehdr->e_phoff + ehdr->e_phentsize * ehdr->e_phnum; - if (_kvm_maphdrs(kd, hdrsz) == -1) + if (ia64_maphdrs(kd, hdrsz) == -1) return (-1); + kd->vmst->kvatop = (ehdr->e_flags & EF_IA_64_ABSOLUTE) ? + phys_kvatop : virt_kvatop; + /* * Load the PBVM page table. We need this to resolve PBVM addresses. * The PBVM page table is obtained from the bootinfo structure, of - * which the physical address is given to us in e_entry. If e_entry - * is 0, then this is assumed to be a pre-PBVM kernel. + * which the address is given to us in e_entry. If e_entry is 0, then + * this is assumed to be a pre-PBVM kernel. + * Note that the address of the bootinfo structure is either physical + * or virtual, depending on whether the core is physical or virtual. */ - if (ehdr->e_entry != 0) { - sz = _kvm_read_phys(kd, ehdr->e_entry, &bi, sizeof(bi)); + if (ehdr->e_entry != 0 && (ehdr->e_flags & EF_IA_64_ABSOLUTE) != 0) { + sz = phys_read(kd, ehdr->e_entry, &bi, sizeof(bi)); if (sz != sizeof(bi)) { _kvm_err(kd, kd->program, - "cannot read bootinfo from PA %#lx", ehdr->e_entry); + "cannot read bootinfo at physical address %#jx", + (uintmax_t)ehdr->e_entry); return (-1); } if (bi.bi_magic != BOOTINFO_MAGIC) { @@ -193,12 +324,12 @@ _kvm_initvtop(kvm_t *kd) return (-1); } kd->vmst->pbvm_pgtblsz = bi.bi_pbvm_pgtblsz; - sz = _kvm_read_phys(kd, bi.bi_pbvm_pgtbl, kd->vmst->pbvm_pgtbl, + sz = phys_read(kd, bi.bi_pbvm_pgtbl, kd->vmst->pbvm_pgtbl, bi.bi_pbvm_pgtblsz); if (sz != bi.bi_pbvm_pgtblsz) { _kvm_err(kd, kd->program, - "cannot read page table from PA %#lx", - bi.bi_pbvm_pgtbl); + "cannot read page table at physical address %#jx", + (uintmax_t)bi.bi_pbvm_pgtbl); return (-1); } } else { @@ -225,7 +356,7 @@ _kvm_initvtop(kvm_t *kd) return (-1); } - if (va < REGION_BASE(6)) { + if (va == REGION_BASE(5)) { _kvm_err(kd, kd->program, "kptdir is itself virtual"); return (-1); } @@ -237,56 +368,8 @@ _kvm_initvtop(kvm_t *kd) int _kvm_kvatop(kvm_t *kd, u_long va, off_t *ofs) { - struct ia64_lpte pte; - uint64_t pa, pgaddr, pt0addr, pt1addr; - size_t pgno, pgsz, pt0no, pt1no; - - if (va >= REGION_BASE(6)) { - /* Regions 6 and 7: direct mapped. */ - pa = REGION_ADDR(va); - return (_kvm_pa2off(kd, pa, ofs, 0)); - } else if (va >= REGION_BASE(5)) { - /* Region 5: Kernel Virtual Memory. */ - va = REGION_ADDR(va); - pgsz = kd->vmst->pagesize; - pt0no = KPTE_DIR0_INDEX(va, pgsz); - pt1no = KPTE_DIR1_INDEX(va, pgsz); - pgno = KPTE_PTE_INDEX(va, pgsz); - if (pt0no >= NKPTEDIR(pgsz)) - goto fail; - pt0addr = kd->vmst->kptdir + (pt0no << 3); - if (kvm_read(kd, pt0addr, &pt1addr, 8) != 8) - goto fail; - if (pt1addr == 0) - goto fail; - pt1addr += pt1no << 3; - if (kvm_read(kd, pt1addr, &pgaddr, 8) != 8) - goto fail; - if (pgaddr == 0) - goto fail; - pgaddr += pgno * sizeof(pte); - if (kvm_read(kd, pgaddr, &pte, sizeof(pte)) != sizeof(pte)) - goto fail; - if (!(pte.pte & PTE_PRESENT)) - goto fail; - pa = (pte.pte & PTE_PPN_MASK) + (va & (pgsz - 1)); - return (_kvm_pa2off(kd, pa, ofs, pgsz)); - } else if (va >= PBVM_BASE) { - /* Region 4: Pre-Boot Virtual Memory (PBVM). */ - va -= PBVM_BASE; - pgsz = PBVM_PGSZ; - pt0no = va / pgsz; - if (pt0no >= (kd->vmst->pbvm_pgtblsz >> 3)) - goto fail; - pt0addr = kd->vmst->pbvm_pgtbl[pt0no]; - if (!(pt0addr & PTE_PRESENT)) - goto fail; - pa = (pt0addr & PTE_PPN_MASK) + va % pgsz; - return (_kvm_pa2off(kd, pa, ofs, pgsz)); - } + size_t sz; - fail: - _kvm_err(kd, kd->program, "invalid kernel virtual address"); - *ofs = ~0UL; - return (0); + sz = kd->vmst->kvatop(kd, va, ofs); + return ((sz > INT_MAX) ? INT_MAX : sz); } From rmacklem at FreeBSD.org Sun Aug 3 00:35:11 2014 From: rmacklem at FreeBSD.org (Rick Macklem) Date: Sun, 3 Aug 2014 00:35:11 +0000 (UTC) Subject: svn commit: r269452 - stable/10/sys/fs/nfsserver Message-ID: <201408030035.s730ZBbT076677@svn.freebsd.org> Author: rmacklem Date: Sun Aug 3 00:35:10 2014 New Revision: 269452 URL: http://svnweb.freebsd.org/changeset/base/269452 Log: MFC: r268273 The new NFSv3 server did not generate directory postop attributes for the reply to ReaddirPlus when the server failed within the loop that calls VFS_VGET(). This failure is most likely an error return from VFS_VGET() caused by a bogus d_fileno that was truncated to 32bits. This patch fixes the server so that it will return directory postop attributes for the failure. It does not fix the underlying issue caused by d_fileno being uint32_t when a file system like ZFS generates a fileno that is greater than 32bits. Modified: stable/10/sys/fs/nfsserver/nfs_nfsdport.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/10/sys/fs/nfsserver/nfs_nfsdport.c Sun Aug 3 00:29:03 2014 (r269451) +++ stable/10/sys/fs/nfsserver/nfs_nfsdport.c Sun Aug 3 00:35:10 2014 (r269452) @@ -2264,9 +2264,11 @@ again: if (dirlen > cnt || nd->nd_repstat) { if (!nd->nd_repstat && entrycnt == 0) nd->nd_repstat = NFSERR_TOOSMALL; - if (nd->nd_repstat) + if (nd->nd_repstat) { newnfs_trimtrailing(nd, mb0, bpos0); - else + if (nd->nd_flag & ND_NFSV3) + nfsrv_postopattr(nd, getret, &at); + } else newnfs_trimtrailing(nd, mb1, bpos1); eofflag = 0; } else if (cpos < cend) From marcel at FreeBSD.org Sun Aug 3 01:51:49 2014 From: marcel at FreeBSD.org (Marcel Moolenaar) Date: Sun, 3 Aug 2014 01:51:48 +0000 (UTC) Subject: svn commit: r269453 - stable/10/lib/libc/gen Message-ID: <201408030151.s731pmvO012267@svn.freebsd.org> Author: marcel Date: Sun Aug 3 01:51:48 2014 New Revision: 269453 URL: http://svnweb.freebsd.org/changeset/base/269453 Log: MFC 264161: Handle the fact that the getlogin_basic() function can return a 0 status with a NULL pointer for the login name (result). Obtained from: Juniper Networks, Inc. Modified: stable/10/lib/libc/gen/getlogin.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/getlogin.c ============================================================================== --- stable/10/lib/libc/gen/getlogin.c Sun Aug 3 00:35:10 2014 (r269452) +++ stable/10/lib/libc/gen/getlogin.c Sun Aug 3 01:51:48 2014 (r269453) @@ -87,11 +87,16 @@ getlogin_r(char *logname, int namelen) char *result; int len; int status; - + + if (namelen < 1) + return (ERANGE); + logname[0] = '\0'; + THREAD_LOCK(); result = getlogin_basic(&status); - if (status == 0) { - if ((len = strlen(result) + 1) > namelen) + if (status == 0 && result != NULL) { + len = strlen(result) + 1; + if (len > namelen) status = ERANGE; else strncpy(logname, result, len); From marcel at FreeBSD.org Sun Aug 3 02:24:52 2014 From: marcel at FreeBSD.org (Marcel Moolenaar) Date: Sun, 3 Aug 2014 02:24:52 +0000 (UTC) Subject: svn commit: r269454 - stable/10/lib/libc/net Message-ID: <201408030224.s732OqBA026782@svn.freebsd.org> Author: marcel Date: Sun Aug 3 02:24:52 2014 New Revision: 269454 URL: http://svnweb.freebsd.org/changeset/base/269454 Log: MFC 264162: Accept RFC 2292 option values so that RFC 2292 compliant programs that are unaware of RFC 3542 can construct control messages. Obtained from: Juniper Networks, Inc. Modified: stable/10/lib/libc/net/ip6opt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/net/ip6opt.c ============================================================================== --- stable/10/lib/libc/net/ip6opt.c Sun Aug 3 01:51:48 2014 (r269453) +++ stable/10/lib/libc/net/ip6opt.c Sun Aug 3 02:24:52 2014 (r269454) @@ -45,6 +45,18 @@ __FBSDID("$FreeBSD$"); static int ip6optlen(u_int8_t *opt, u_int8_t *lim); static void inet6_insert_padopt(u_char *p, int len); +#ifndef IPV6_2292HOPOPTS +#define IPV6_2292HOPOPTS 22 +#endif +#ifndef IPV6_2292DSTOPTS +#define IPV6_2292DSTOPTS 23 +#endif + +#define is_ipv6_hopopts(x) \ + ((x) == IPV6_HOPOPTS || (x) == IPV6_2292HOPOPTS) +#define is_ipv6_dstopts(x) \ + ((x) == IPV6_DSTOPTS || (x) == IPV6_2292DSTOPTS) + /* * This function returns the number of bytes required to hold an option * when it is stored as ancillary data, including the cmsghdr structure @@ -72,9 +84,9 @@ inet6_option_init(void *bp, struct cmsgh struct cmsghdr *ch = (struct cmsghdr *)bp; /* argument validation */ - if (type != IPV6_HOPOPTS && type != IPV6_DSTOPTS) + if (!is_ipv6_hopopts(type) && !is_ipv6_dstopts(type)) return(-1); - + ch->cmsg_level = IPPROTO_IPV6; ch->cmsg_type = type; ch->cmsg_len = CMSG_LEN(0); @@ -234,8 +246,8 @@ inet6_option_next(const struct cmsghdr * u_int8_t *lim; if (cmsg->cmsg_level != IPPROTO_IPV6 || - (cmsg->cmsg_type != IPV6_HOPOPTS && - cmsg->cmsg_type != IPV6_DSTOPTS)) + (!is_ipv6_hopopts(cmsg->cmsg_type) && + !is_ipv6_dstopts(cmsg->cmsg_type))) return(-1); /* message length validation */ @@ -290,8 +302,8 @@ inet6_option_find(const struct cmsghdr * u_int8_t *optp, *lim; if (cmsg->cmsg_level != IPPROTO_IPV6 || - (cmsg->cmsg_type != IPV6_HOPOPTS && - cmsg->cmsg_type != IPV6_DSTOPTS)) + (!is_ipv6_hopopts(cmsg->cmsg_type) && + !is_ipv6_dstopts(cmsg->cmsg_type))) return(-1); /* message length validation */ From marcel at FreeBSD.org Sun Aug 3 02:37:34 2014 From: marcel at FreeBSD.org (Marcel Moolenaar) Date: Sun, 3 Aug 2014 02:37:34 +0000 (UTC) Subject: svn commit: r269455 - stable/10/sys/compat/freebsd32 Message-ID: <201408030237.s732bYAr031709@svn.freebsd.org> Author: marcel Date: Sun Aug 3 02:37:33 2014 New Revision: 269455 URL: http://svnweb.freebsd.org/changeset/base/269455 Log: MFC 264164: Convert while copying in control messages. Obtained from: Juniper Networks, Inc. Modified: stable/10/sys/compat/freebsd32/freebsd32_misc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_misc.c Sun Aug 3 02:24:52 2014 (r269454) +++ stable/10/sys/compat/freebsd32/freebsd32_misc.c Sun Aug 3 02:37:33 2014 (r269455) @@ -1133,47 +1133,91 @@ freebsd32_recvmsg(td, uap) return (error); } - +/* + * Copy-in the array of control messages constructed using alignment + * and padding suitable for a 32-bit environment and construct an + * mbuf using alignment and padding suitable for a 64-bit kernel. + * The alignment and padding are defined indirectly by CMSG_DATA(), + * CMSG_SPACE() and CMSG_LEN(). + */ static int -freebsd32_convert_msg_in(struct mbuf **controlp) +freebsd32_copyin_control(struct mbuf **mp, caddr_t buf, u_int buflen) { - struct mbuf *control = *controlp; - struct cmsghdr *cm = mtod(control, struct cmsghdr *); - void *data; - socklen_t clen = control->m_len, datalen; + struct mbuf *m; + void *md; + u_int idx, len, msglen; int error; - error = 0; - *controlp = NULL; + buflen = FREEBSD32_ALIGN(buflen); - while (cm != NULL) { - if (sizeof(struct cmsghdr) > clen || cm->cmsg_len > clen) { - error = EINVAL; - break; - } + if (buflen > MCLBYTES) + return (EINVAL); - data = FREEBSD32_CMSG_DATA(cm); - datalen = (caddr_t)cm + cm->cmsg_len - (caddr_t)data; + /* + * Iterate over the buffer and get the length of each message + * in there. This has 32-bit alignment and padding. Use it to + * determine the length of these messages when using 64-bit + * alignment and padding. + */ + idx = 0; + len = 0; + while (idx < buflen) { + error = copyin(buf + idx, &msglen, sizeof(msglen)); + if (error) + return (error); + if (msglen < sizeof(struct cmsghdr)) + return (EINVAL); + msglen = FREEBSD32_ALIGN(msglen); + if (idx + msglen > buflen) + return (EINVAL); + idx += msglen; + msglen += CMSG_ALIGN(sizeof(struct cmsghdr)) - + FREEBSD32_ALIGN(sizeof(struct cmsghdr)); + len += CMSG_ALIGN(msglen); + } - *controlp = sbcreatecontrol(data, datalen, cm->cmsg_type, - cm->cmsg_level); - controlp = &(*controlp)->m_next; - - if (FREEBSD32_CMSG_SPACE(datalen) < clen) { - clen -= FREEBSD32_CMSG_SPACE(datalen); - cm = (struct cmsghdr *) - ((caddr_t)cm + FREEBSD32_CMSG_SPACE(datalen)); - } else { - clen = 0; - cm = NULL; + if (len > MCLBYTES) + return (EINVAL); + + m = m_get(M_WAITOK, MT_CONTROL); + if (len > MLEN) + MCLGET(m, M_WAITOK); + m->m_len = len; + + md = mtod(m, void *); + while (buflen > 0) { + error = copyin(buf, md, sizeof(struct cmsghdr)); + if (error) + break; + msglen = *(u_int *)md; + msglen = FREEBSD32_ALIGN(msglen); + + /* Modify the message length to account for alignment. */ + *(u_int *)md = msglen + CMSG_ALIGN(sizeof(struct cmsghdr)) - + FREEBSD32_ALIGN(sizeof(struct cmsghdr)); + + md = (char *)md + CMSG_ALIGN(sizeof(struct cmsghdr)); + buf += FREEBSD32_ALIGN(sizeof(struct cmsghdr)); + buflen -= FREEBSD32_ALIGN(sizeof(struct cmsghdr)); + + msglen -= FREEBSD32_ALIGN(sizeof(struct cmsghdr)); + if (msglen > 0) { + error = copyin(buf, md, msglen); + if (error) + break; + md = (char *)md + CMSG_ALIGN(msglen); + buf += msglen; + buflen -= msglen; } } - m_freem(control); + if (error) + m_free(m); + else + *mp = m; return (error); } - int freebsd32_sendmsg(struct thread *td, struct freebsd32_sendmsg_args *uap) @@ -1211,14 +1255,13 @@ freebsd32_sendmsg(struct thread *td, goto out; } - error = sockargs(&control, msg.msg_control, - msg.msg_controllen, MT_CONTROL); - if (error) - goto out; - - error = freebsd32_convert_msg_in(&control); + error = freebsd32_copyin_control(&control, msg.msg_control, + msg.msg_controllen); if (error) goto out; + + msg.msg_control = NULL; + msg.msg_controllen = 0; } error = kern_sendit(td, uap->s, &msg, uap->flags, control, From marcel at FreeBSD.org Sun Aug 3 03:06:01 2014 From: marcel at FreeBSD.org (Marcel Moolenaar) Date: Sun, 3 Aug 2014 03:06:00 +0000 (UTC) Subject: svn commit: r269456 - stable/10/sys/geom/uzip Message-ID: <201408030306.s73360Ng046069@svn.freebsd.org> Author: marcel Date: Sun Aug 3 03:06:00 2014 New Revision: 269456 URL: http://svnweb.freebsd.org/changeset/base/269456 Log: MFC 268986; fix file system corruption by creating as many BIOs as needed to satisfy the original request -- in other words: no short reads. Obtained from: Juniper Networks, Inc. Modified: stable/10/sys/geom/uzip/g_uzip.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/uzip/g_uzip.c ============================================================================== --- stable/10/sys/geom/uzip/g_uzip.c Sun Aug 3 02:37:33 2014 (r269455) +++ stable/10/sys/geom/uzip/g_uzip.c Sun Aug 3 03:06:00 2014 (r269456) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2004 Max Khon + * Copyright (c) 2014 Juniper Networks, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -86,6 +87,8 @@ struct g_uzip_softc { int req_cached; /* cached requests */ }; +static void g_uzip_done(struct bio *bp); + static void g_uzip_softc_free(struct g_uzip_softc *sc, struct g_geom *gp) { @@ -120,213 +123,229 @@ z_free(void *nil, void *ptr) free(ptr, M_GEOM_UZIP); } +static int +g_uzip_cached(struct g_geom *gp, struct bio *bp) +{ + struct g_uzip_softc *sc; + off_t ofs; + size_t blk, blkofs, usz; + + sc = gp->softc; + ofs = bp->bio_offset + bp->bio_completed; + blk = ofs / sc->blksz; + mtx_lock(&sc->last_mtx); + if (blk == sc->last_blk) { + blkofs = ofs % sc->blksz; + usz = sc->blksz - blkofs; + if (bp->bio_resid < usz) + usz = bp->bio_resid; + memcpy(bp->bio_data + bp->bio_completed, sc->last_buf + blkofs, + usz); + sc->req_cached++; + mtx_unlock(&sc->last_mtx); + + DPRINTF(("%s/%s: %p: offset=%jd: got %jd bytes from cache\n", + __func__, gp->name, bp, (intmax_t)ofs, (intmax_t)usz)); + + bp->bio_completed += usz; + bp->bio_resid -= usz; + + if (bp->bio_resid == 0) { + g_io_deliver(bp, 0); + return (1); + } + } else + mtx_unlock(&sc->last_mtx); + + return (0); +} + +static int +g_uzip_request(struct g_geom *gp, struct bio *bp) +{ + struct g_uzip_softc *sc; + struct bio *bp2; + struct g_consumer *cp; + struct g_provider *pp; + off_t ofs; + size_t start_blk, end_blk; + + if (g_uzip_cached(gp, bp) != 0) + return (1); + + sc = gp->softc; + + bp2 = g_clone_bio(bp); + if (bp2 == NULL) { + g_io_deliver(bp, ENOMEM); + return (1); + } + bp2->bio_done = g_uzip_done; + + cp = LIST_FIRST(&gp->consumer); + pp = cp->provider; + + ofs = bp->bio_offset + bp->bio_completed; + start_blk = ofs / sc->blksz; + KASSERT(start_blk < sc->nblocks, ("start_blk out of range")); + end_blk = (ofs + bp->bio_resid + sc->blksz - 1) / sc->blksz; + KASSERT(end_blk <= sc->nblocks, ("end_blk out of range")); + + DPRINTF(("%s/%s: %p: start=%u (%jd), end=%u (%jd)\n", + __func__, gp->name, bp, + (u_int)start_blk, (intmax_t)sc->offsets[start_blk], + (u_int)end_blk, (intmax_t)sc->offsets[end_blk])); + + bp2->bio_offset = sc->offsets[start_blk] - + sc->offsets[start_blk] % pp->sectorsize; + while (1) { + bp2->bio_length = sc->offsets[end_blk] - bp2->bio_offset; + bp2->bio_length = (bp2->bio_length + pp->sectorsize - 1) / + pp->sectorsize * pp->sectorsize; + if (bp2->bio_length <= MAXPHYS) + break; + + end_blk--; + } + + bp2->bio_data = malloc(bp2->bio_length, M_GEOM_UZIP, M_NOWAIT); + if (bp2->bio_data == NULL) { + g_destroy_bio(bp2); + g_io_deliver(bp, ENOMEM); + return (1); + } + + DPRINTF(("%s/%s: %p: reading %jd bytes from offset %jd\n", + __func__, gp->name, bp, + (intmax_t)bp2->bio_length, (intmax_t)bp2->bio_offset)); + + g_io_request(bp2, cp); + return (0); +} + static void g_uzip_done(struct bio *bp) { - int err; - struct bio *bp2; z_stream zs; - struct g_provider *pp, *pp2; + struct bio *bp2; + struct g_provider *pp; struct g_consumer *cp; struct g_geom *gp; struct g_uzip_softc *sc; - off_t iolen, pos, upos; - uint32_t start_blk, i; - size_t bsize; + char *data, *data2; + off_t ofs; + size_t blk, blkofs, len, ulen; bp2 = bp->bio_parent; - pp = bp2->bio_to; - gp = pp->geom; - cp = LIST_FIRST(&gp->consumer); - pp2 = cp->provider; + gp = bp2->bio_to->geom; sc = gp->softc; - DPRINTF(("%s: done\n", gp->name)); + + cp = LIST_FIRST(&gp->consumer); + pp = cp->provider; bp2->bio_error = bp->bio_error; if (bp2->bio_error != 0) goto done; - /* - * Uncompress data. - */ + /* Make sure there's forward progress. */ + if (bp->bio_completed == 0) { + bp2->bio_error = ECANCELED; + goto done; + } + zs.zalloc = z_alloc; zs.zfree = z_free; - err = inflateInit(&zs); - if (err != Z_OK) { - bp2->bio_error = EIO; + if (inflateInit(&zs) != Z_OK) { + bp2->bio_error = EILSEQ; goto done; } - start_blk = bp2->bio_offset / sc->blksz; - bsize = pp2->sectorsize; - iolen = bp->bio_completed; - pos = sc->offsets[start_blk] % bsize; - upos = 0; - DPRINTF(("%s: done: start_blk %d, pos %jd, upos %jd, iolen %jd " - "(%jd, %d, %zd)\n", - gp->name, start_blk, (intmax_t)pos, (intmax_t)upos, - (intmax_t)iolen, (intmax_t)bp2->bio_offset, sc->blksz, bsize)); - for (i = start_blk; upos < bp2->bio_length; i++) { - off_t len, ulen, uoff; - - uoff = i == start_blk ? bp2->bio_offset % sc->blksz : 0; - ulen = MIN(sc->blksz - uoff, bp2->bio_length - upos); - len = sc->offsets[i + 1] - sc->offsets[i]; + ofs = bp2->bio_offset + bp2->bio_completed; + blk = ofs / sc->blksz; + blkofs = ofs % sc->blksz; + data = bp->bio_data + sc->offsets[blk] % pp->sectorsize; + data2 = bp2->bio_data + bp2->bio_completed; + while (bp->bio_completed && bp2->bio_resid) { + ulen = MIN(sc->blksz - blkofs, bp2->bio_resid); + len = sc->offsets[blk + 1] - sc->offsets[blk]; + DPRINTF(("%s/%s: %p/%ju: data2=%p, ulen=%u, data=%p, len=%u\n", + __func__, gp->name, gp, bp->bio_completed, + data2, (u_int)ulen, data, (u_int)len)); if (len == 0) { /* All zero block: no cache update */ - bzero(bp2->bio_data + upos, ulen); - upos += ulen; - bp2->bio_completed += ulen; - continue; - } - if (len > iolen) { - DPRINTF(("%s: done: early termination: len (%jd) > " - "iolen (%jd)\n", - gp->name, (intmax_t)len, (intmax_t)iolen)); - break; - } - zs.next_in = bp->bio_data + pos; - zs.avail_in = len; - zs.next_out = sc->last_buf; - zs.avail_out = sc->blksz; - mtx_lock(&sc->last_mtx); - err = inflate(&zs, Z_FINISH); - if (err != Z_STREAM_END) { - sc->last_blk = -1; + bzero(data2, ulen); + } else if (len <= bp->bio_completed) { + zs.next_in = data; + zs.avail_in = len; + zs.next_out = sc->last_buf; + zs.avail_out = sc->blksz; + mtx_lock(&sc->last_mtx); + if (inflate(&zs, Z_FINISH) != Z_STREAM_END) { + sc->last_blk = -1; + mtx_unlock(&sc->last_mtx); + inflateEnd(&zs); + bp2->bio_error = EILSEQ; + goto done; + } + sc->last_blk = blk; + memcpy(data2, sc->last_buf + blkofs, ulen); mtx_unlock(&sc->last_mtx); - DPRINTF(("%s: done: inflate failed (%jd + %jd -> %jd + %jd + %jd)\n", - gp->name, (intmax_t)pos, (intmax_t)len, - (intmax_t)uoff, (intmax_t)upos, (intmax_t)ulen)); - inflateEnd(&zs); - bp2->bio_error = EIO; - goto done; - } - sc->last_blk = i; - DPRINTF(("%s: done: inflated %jd + %jd -> %jd + %jd + %jd\n", - gp->name, (intmax_t)pos, (intmax_t)len, (intmax_t)uoff, - (intmax_t)upos, (intmax_t)ulen)); - memcpy(bp2->bio_data + upos, sc->last_buf + uoff, ulen); - mtx_unlock(&sc->last_mtx); + if (inflateReset(&zs) != Z_OK) { + inflateEnd(&zs); + bp2->bio_error = EILSEQ; + goto done; + } + data += len; + } else + break; - pos += len; - iolen -= len; - upos += ulen; + data2 += ulen; bp2->bio_completed += ulen; - err = inflateReset(&zs); - if (err != Z_OK) { - inflateEnd(&zs); - bp2->bio_error = EIO; - goto done; - } - } - err = inflateEnd(&zs); - if (err != Z_OK) { - bp2->bio_error = EIO; - goto done; + bp2->bio_resid -= ulen; + bp->bio_completed -= len; + blkofs = 0; + blk++; } + if (inflateEnd(&zs) != Z_OK) + bp2->bio_error = EILSEQ; + done: - /* - * Finish processing the request. - */ - DPRINTF(("%s: done: (%d, %jd, %ld)\n", - gp->name, bp2->bio_error, (intmax_t)bp2->bio_completed, - bp2->bio_resid)); + /* Finish processing the request. */ free(bp->bio_data, M_GEOM_UZIP); g_destroy_bio(bp); - g_io_deliver(bp2, bp2->bio_error); + if (bp2->bio_error != 0 || bp2->bio_resid == 0) + g_io_deliver(bp2, bp2->bio_error); + else + g_uzip_request(gp, bp2); } static void g_uzip_start(struct bio *bp) { - struct bio *bp2; - struct g_provider *pp, *pp2; + struct g_provider *pp; struct g_geom *gp; - struct g_consumer *cp; struct g_uzip_softc *sc; - uint32_t start_blk, end_blk; - size_t bsize; pp = bp->bio_to; gp = pp->geom; - DPRINTF(("%s: start (%d)\n", gp->name, bp->bio_cmd)); - if (bp->bio_cmd != BIO_READ) { - g_io_deliver(bp, EOPNOTSUPP); - return; - } + DPRINTF(("%s/%s: %p: cmd=%d, offset=%jd, length=%jd, buffer=%p\n", + __func__, gp->name, bp, bp->bio_cmd, (intmax_t)bp->bio_offset, + (intmax_t)bp->bio_length, bp->bio_data)); - cp = LIST_FIRST(&gp->consumer); - pp2 = cp->provider; sc = gp->softc; - - start_blk = bp->bio_offset / sc->blksz; - end_blk = (bp->bio_offset + bp->bio_length + sc->blksz - 1) / sc->blksz; - KASSERT(start_blk < sc->nblocks, ("start_blk out of range")); - KASSERT(end_blk <= sc->nblocks, ("end_blk out of range")); - sc->req_total++; - if (start_blk + 1 == end_blk) { - mtx_lock(&sc->last_mtx); - if (start_blk == sc->last_blk) { - off_t uoff; - - uoff = bp->bio_offset % sc->blksz; - KASSERT(bp->bio_length <= sc->blksz - uoff, - ("cached data error")); - memcpy(bp->bio_data, sc->last_buf + uoff, - bp->bio_length); - sc->req_cached++; - mtx_unlock(&sc->last_mtx); - DPRINTF(("%s: start: cached 0 + %jd, %jd + 0 + %jd\n", - gp->name, (intmax_t)bp->bio_length, (intmax_t)uoff, - (intmax_t)bp->bio_length)); - bp->bio_completed = bp->bio_length; - g_io_deliver(bp, 0); - return; - } - mtx_unlock(&sc->last_mtx); - } - - bp2 = g_clone_bio(bp); - if (bp2 == NULL) { - g_io_deliver(bp, ENOMEM); + if (bp->bio_cmd != BIO_READ) { + g_io_deliver(bp, EOPNOTSUPP); return; } - bp2->bio_done = g_uzip_done; - DPRINTF(("%s: start (%d..%d), %s: %d + %jd, %s: %d + %jd\n", - gp->name, start_blk, end_blk, - pp->name, pp->sectorsize, (intmax_t)pp->mediasize, - pp2->name, pp2->sectorsize, (intmax_t)pp2->mediasize)); - bsize = pp2->sectorsize; - bp2->bio_offset = sc->offsets[start_blk] - sc->offsets[start_blk] % bsize; - while (1) { - bp2->bio_length = sc->offsets[end_blk] - bp2->bio_offset; - bp2->bio_length = (bp2->bio_length + bsize - 1) / bsize * bsize; - if (bp2->bio_length < MAXPHYS) - break; - end_blk--; - DPRINTF(("%s: bio_length (%jd) > MAXPHYS: lowering end_blk " - "to %u\n", gp->name, (intmax_t)bp2->bio_length, end_blk)); - } - DPRINTF(("%s: start %jd + %jd -> %ju + %ju -> %jd + %jd\n", - gp->name, - (intmax_t)bp->bio_offset, (intmax_t)bp->bio_length, - (uintmax_t)sc->offsets[start_blk], - (uintmax_t)sc->offsets[end_blk] - sc->offsets[start_blk], - (intmax_t)bp2->bio_offset, (intmax_t)bp2->bio_length)); - bp2->bio_data = malloc(bp2->bio_length, M_GEOM_UZIP, M_NOWAIT); - if (bp2->bio_data == NULL) { - g_destroy_bio(bp2); - g_io_deliver(bp, ENOMEM); - return; - } + bp->bio_resid = bp->bio_length; + bp->bio_completed = 0; - g_io_request(bp2, cp); - DPRINTF(("%s: start ok\n", gp->name)); + g_uzip_request(gp, bp); } static void From pfg at FreeBSD.org Sun Aug 3 18:03:00 2014 From: pfg at FreeBSD.org (Pedro F. Giffuni) Date: Sun, 3 Aug 2014 18:03:00 +0000 (UTC) Subject: svn commit: r269480 - stable/10/lib/libc/net Message-ID: <53de7954.5554.70243434@svn.freebsd.org> Author: pfg Date: Sun Aug 3 18:03:00 2014 New Revision: 269480 URL: http://svnweb.freebsd.org/changeset/base/269480 Log: MFC r268867, r268878: Use more consistent type for optlen in getsourcefilter() Proposed by: bde Modified: stable/10/lib/libc/net/sourcefilter.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/net/sourcefilter.c ============================================================================== --- stable/10/lib/libc/net/sourcefilter.c Sun Aug 3 16:45:07 2014 (r269479) +++ stable/10/lib/libc/net/sourcefilter.c Sun Aug 3 18:03:00 2014 (r269480) @@ -337,7 +337,8 @@ getsourcefilter(int s, uint32_t interfac { struct __msfilterreq msfr; sockunion_t *psu; - int err, level, nsrcs, optlen, optname; + socklen_t optlen; + int err, level, nsrcs, optname; if (interface == 0 || group == NULL || numsrc == NULL || fmode == NULL) { From pfg at FreeBSD.org Sun Aug 3 18:28:11 2014 From: pfg at FreeBSD.org (Pedro F. Giffuni) Date: Sun, 3 Aug 2014 18:28:10 +0000 (UTC) Subject: svn commit: r269482 - stable/10/lib/libc/stdio Message-ID: <53de7f3b.5c65.22d1a139@svn.freebsd.org> Author: pfg Date: Sun Aug 3 18:28:10 2014 New Revision: 269482 URL: http://svnweb.freebsd.org/changeset/base/269482 Log: MFC r268926, r268930, r268983: Use a correct errno in freopen. Use EBADF instead of EINVAL when working around incorrect O_ACCMODE. Adjust errno on failed prepwrite. rewind: always clear error indicator as required by POSIX. Obtained from: Apple Inc. (Libc 997.90.3) Phabric: D442 Modified: stable/10/lib/libc/stdio/freopen.c stable/10/lib/libc/stdio/rewind.c stable/10/lib/libc/stdio/vfprintf.c stable/10/lib/libc/stdio/vfwprintf.c stable/10/lib/libc/stdio/wbuf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/stdio/freopen.c ============================================================================== --- stable/10/lib/libc/stdio/freopen.c Sun Aug 3 18:12:55 2014 (r269481) +++ stable/10/lib/libc/stdio/freopen.c Sun Aug 3 18:28:10 2014 (r269482) @@ -96,7 +96,7 @@ freopen(const char * __restrict file, co (oflags & O_ACCMODE)) { fclose(fp); FUNLOCKFILE(fp); - errno = EINVAL; + errno = EBADF; return (NULL); } if (fp->_flags & __SWR) Modified: stable/10/lib/libc/stdio/rewind.c ============================================================================== --- stable/10/lib/libc/stdio/rewind.c Sun Aug 3 18:12:55 2014 (r269481) +++ stable/10/lib/libc/stdio/rewind.c Sun Aug 3 18:28:10 2014 (r269482) @@ -53,9 +53,8 @@ rewind(FILE *fp) __sinit(); FLOCKFILE(fp); - if (_fseeko(fp, (off_t)0, SEEK_SET, 1) == 0) { - clearerr_unlocked(fp); + if (_fseeko(fp, (off_t)0, SEEK_SET, 1) == 0) errno = serrno; - } + clearerr_unlocked(fp); /* POSIX: clear stdio error regardless */ FUNLOCKFILE(fp); } Modified: stable/10/lib/libc/stdio/vfprintf.c ============================================================================== --- stable/10/lib/libc/stdio/vfprintf.c Sun Aug 3 18:12:55 2014 (r269481) +++ stable/10/lib/libc/stdio/vfprintf.c Sun Aug 3 18:28:10 2014 (r269482) @@ -455,8 +455,10 @@ __vfprintf(FILE *fp, locale_t locale, co return (__xvprintf(fp, fmt0, ap)); /* sorry, fprintf(read_only_file, "") returns EOF, not 0 */ - if (prepwrite(fp) != 0) + if (prepwrite(fp) != 0) { + errno = EBADF; return (EOF); + } convbuf = NULL; fmt = (char *)fmt0; Modified: stable/10/lib/libc/stdio/vfwprintf.c ============================================================================== --- stable/10/lib/libc/stdio/vfwprintf.c Sun Aug 3 18:12:55 2014 (r269481) +++ stable/10/lib/libc/stdio/vfwprintf.c Sun Aug 3 18:28:10 2014 (r269482) @@ -531,8 +531,10 @@ __vfwprintf(FILE *fp, locale_t locale, c /* sorry, fwprintf(read_only_file, L"") returns WEOF, not 0 */ - if (prepwrite(fp) != 0) + if (prepwrite(fp) != 0) { + errno = EBADF; return (EOF); + } convbuf = NULL; fmt = (wchar_t *)fmt0; Modified: stable/10/lib/libc/stdio/wbuf.c ============================================================================== --- stable/10/lib/libc/stdio/wbuf.c Sun Aug 3 18:12:55 2014 (r269481) +++ stable/10/lib/libc/stdio/wbuf.c Sun Aug 3 18:28:10 2014 (r269482) @@ -36,6 +36,7 @@ static char sccsid[] = "@(#)wbuf.c 8.1 ( #include __FBSDID("$FreeBSD$"); +#include #include #include "local.h" @@ -59,8 +60,10 @@ __swbuf(int c, FILE *fp) * calls might wrap _w from negative to positive. */ fp->_w = fp->_lbfsize; - if (prepwrite(fp) != 0) + if (prepwrite(fp) != 0) { + errno = EBADF; return (EOF); + } c = (unsigned char)c; ORIENT(fp, -1); From pfg at FreeBSD.org Sun Aug 3 18:31:52 2014 From: pfg at FreeBSD.org (Pedro F. Giffuni) Date: Sun, 3 Aug 2014 18:31:52 +0000 (UTC) Subject: svn commit: r269483 - stable/10/lib/libc/stdtime Message-ID: <53de8018.5fc5.107f567@svn.freebsd.org> Author: pfg Date: Sun Aug 3 18:31:52 2014 New Revision: 269483 URL: http://svnweb.freebsd.org/changeset/base/269483 Log: MFC r269124: strftime() xlocale cleanups. Replace fprintf_l with fputs when output is unformatted. Use locale_t in _conv() since it was using sprintf (now sprintf_l) Use locale_t on _yconv() since it calls _conv() Obtained from: Apple Inc. (Libc 997.90.3) CR: D482 Reviewed by: theraven Modified: stable/10/lib/libc/stdtime/strftime.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/stdtime/strftime.c ============================================================================== --- stable/10/lib/libc/stdtime/strftime.c Sun Aug 3 18:28:10 2014 (r269482) +++ stable/10/lib/libc/stdtime/strftime.c Sun Aug 3 18:31:52 2014 (r269483) @@ -46,10 +46,10 @@ __FBSDID("$FreeBSD$"); #include "timelocal.h" static char * _add(const char *, char *, const char *); -static char * _conv(int, const char *, char *, const char *); +static char * _conv(int, const char *, char *, const char *, locale_t); static char * _fmt(const char *, const struct tm *, char *, const char *, int *, locale_t); -static char * _yconv(int, int, int, int, char *, const char *); +static char * _yconv(int, int, int, int, char *, const char *, locale_t); extern char * tzname[]; @@ -101,16 +101,16 @@ strftime_l(char * __restrict s, size_t m if (warn != IN_NONE && getenv(YEAR_2000_NAME) != NULL) { (void) fprintf_l(stderr, loc, "\n"); if (format == NULL) - (void) fprintf_l(stderr, loc, "NULL strftime format "); + (void) fputs("NULL strftime format ", stderr); else (void) fprintf_l(stderr, loc, "strftime format \"%s\" ", format); - (void) fprintf_l(stderr, loc, "yields only two digits of years in "); + (void) fputs("yields only two digits of years in ", stderr); if (warn == IN_SOME) - (void) fprintf_l(stderr, loc, "some locales"); + (void) fputs("some locales", stderr); else if (warn == IN_THIS) - (void) fprintf_l(stderr, loc, "the current locale"); - else (void) fprintf_l(stderr, loc, "all locales"); - (void) fprintf_l(stderr, loc, "\n"); + (void) fputs("the current locale", stderr); + else (void) fputs("all locales", stderr); + (void) fputs("\n", stderr); } #endif /* !defined NO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU */ if (p == s + maxsize) @@ -183,7 +183,7 @@ label: * (ado, 1993-05-24) */ pt = _yconv(t->tm_year, TM_YEAR_BASE, 1, 0, - pt, ptlim); + pt, ptlim, loc); continue; case 'c': { @@ -200,8 +200,9 @@ label: pt = _fmt("%m/%d/%y", t, pt, ptlim, warnp, loc); continue; case 'd': - pt = _conv(t->tm_mday, fmt_padding[PAD_FMT_DAYOFMONTH][PadIndex], - pt, ptlim); + pt = _conv(t->tm_mday, + fmt_padding[PAD_FMT_DAYOFMONTH][PadIndex], + pt, ptlim, loc); continue; case 'E': if (Ealternative || Oalternative) @@ -227,24 +228,26 @@ label: goto label; case 'e': pt = _conv(t->tm_mday, - fmt_padding[PAD_FMT_SDAYOFMONTH][PadIndex], pt, ptlim); + fmt_padding[PAD_FMT_SDAYOFMONTH][PadIndex], + pt, ptlim, loc); continue; case 'F': pt = _fmt("%Y-%m-%d", t, pt, ptlim, warnp, loc); continue; case 'H': pt = _conv(t->tm_hour, fmt_padding[PAD_FMT_HMS][PadIndex], - pt, ptlim); + pt, ptlim, loc); continue; case 'I': pt = _conv((t->tm_hour % 12) ? (t->tm_hour % 12) : 12, fmt_padding[PAD_FMT_HMS][PadIndex], - pt, ptlim); + pt, ptlim, loc); continue; case 'j': pt = _conv(t->tm_yday + 1, - fmt_padding[PAD_FMT_DAYOFYEAR][PadIndex], pt, ptlim); + fmt_padding[PAD_FMT_DAYOFYEAR][PadIndex], + pt, ptlim, loc); continue; case 'k': /* @@ -258,7 +261,7 @@ label: * (ado, 1993-05-24) */ pt = _conv(t->tm_hour, fmt_padding[PAD_FMT_SHMS][PadIndex], - pt, ptlim); + pt, ptlim, loc); continue; #ifdef KITCHEN_SINK case 'K': @@ -281,16 +284,16 @@ label: pt = _conv((t->tm_hour % 12) ? (t->tm_hour % 12) : 12, fmt_padding[PAD_FMT_SHMS][PadIndex], - pt, ptlim); + pt, ptlim, loc); continue; case 'M': pt = _conv(t->tm_min, fmt_padding[PAD_FMT_HMS][PadIndex], - pt, ptlim); + pt, ptlim, loc); continue; case 'm': pt = _conv(t->tm_mon + 1, fmt_padding[PAD_FMT_MONTH][PadIndex], - pt, ptlim); + pt, ptlim, loc); continue; case 'n': pt = _add("\n", pt, ptlim); @@ -309,7 +312,7 @@ label: continue; case 'S': pt = _conv(t->tm_sec, fmt_padding[PAD_FMT_HMS][PadIndex], - pt, ptlim); + pt, ptlim, loc); continue; case 's': { @@ -321,9 +324,9 @@ label: tm = *t; mkt = mktime(&tm); if (TYPE_SIGNED(time_t)) - (void) sprintf(buf, "%ld", + (void) sprintf_l(buf, loc, "%ld", (long) mkt); - else (void) sprintf(buf, "%lu", + else (void) sprintf_l(buf, loc, "%lu", (unsigned long) mkt); pt = _add(buf, pt, ptlim); } @@ -337,7 +340,8 @@ label: case 'U': pt = _conv((t->tm_yday + DAYSPERWEEK - t->tm_wday) / DAYSPERWEEK, - fmt_padding[PAD_FMT_WEEKOFYEAR][PadIndex], pt, ptlim); + fmt_padding[PAD_FMT_WEEKOFYEAR][PadIndex], + pt, ptlim, loc); continue; case 'u': /* @@ -348,7 +352,7 @@ label: */ pt = _conv((t->tm_wday == 0) ? DAYSPERWEEK : t->tm_wday, - "%d", pt, ptlim); + "%d", pt, ptlim, loc); continue; case 'V': /* ISO 8601 week number */ case 'G': /* ISO 8601 year (four digits) */ @@ -429,13 +433,13 @@ label: #endif /* defined XPG4_1994_04_09 */ if (*format == 'V') pt = _conv(w, fmt_padding[PAD_FMT_WEEKOFYEAR][PadIndex], - pt, ptlim); + pt, ptlim, loc); else if (*format == 'g') { *warnp = IN_ALL; pt = _yconv(year, base, 0, 1, - pt, ptlim); + pt, ptlim, loc); } else pt = _yconv(year, base, 1, 1, - pt, ptlim); + pt, ptlim, loc); } continue; case 'v': @@ -451,10 +455,11 @@ label: (t->tm_wday ? (t->tm_wday - 1) : (DAYSPERWEEK - 1))) / DAYSPERWEEK, - fmt_padding[PAD_FMT_WEEKOFYEAR][PadIndex], pt, ptlim); + fmt_padding[PAD_FMT_WEEKOFYEAR][PadIndex], + pt, ptlim, loc); continue; case 'w': - pt = _conv(t->tm_wday, "%d", pt, ptlim); + pt = _conv(t->tm_wday, "%d", pt, ptlim, loc); continue; case 'X': pt = _fmt(tptr->X_fmt, t, pt, ptlim, warnp, loc); @@ -473,11 +478,11 @@ label: case 'y': *warnp = IN_ALL; pt = _yconv(t->tm_year, TM_YEAR_BASE, 0, 1, - pt, ptlim); + pt, ptlim, loc); continue; case 'Y': pt = _yconv(t->tm_year, TM_YEAR_BASE, 1, 1, - pt, ptlim); + pt, ptlim, loc); continue; case 'Z': #ifdef TM_ZONE @@ -546,7 +551,8 @@ label: diff = (diff / MINSPERHOUR) * 100 + (diff % MINSPERHOUR); pt = _conv(diff, - fmt_padding[PAD_FMT_YEAR][PadIndex], pt, ptlim); + fmt_padding[PAD_FMT_YEAR][PadIndex], + pt, ptlim, loc); } continue; case '+': @@ -586,15 +592,16 @@ label: } static char * -_conv(n, format, pt, ptlim) +_conv(n, format, pt, ptlim, loc) const int n; const char * const format; char * const pt; const char * const ptlim; +locale_t loc; { char buf[INT_STRLEN_MAXIMUM(int) + 1]; - (void) sprintf(buf, format, n); + (void) sprintf_l(buf, loc, format, n); return _add(buf, pt, ptlim); } @@ -618,13 +625,14 @@ const char * const ptlim; */ static char * -_yconv(a, b, convert_top, convert_yy, pt, ptlim) +_yconv(a, b, convert_top, convert_yy, pt, ptlim, loc) const int a; const int b; const int convert_top; const int convert_yy; char * pt; const char * const ptlim; +locale_t loc; { register int lead; register int trail; @@ -643,9 +651,10 @@ const char * const ptlim; if (convert_top) { if (lead == 0 && trail < 0) pt = _add("-0", pt, ptlim); - else pt = _conv(lead, "%02d", pt, ptlim); + else pt = _conv(lead, "%02d", pt, ptlim, loc); } if (convert_yy) - pt = _conv(((trail < 0) ? -trail : trail), "%02d", pt, ptlim); + pt = _conv(((trail < 0) ? -trail : trail), "%02d", pt, + ptlim, loc); return (pt); } From pfg at FreeBSD.org Sun Aug 3 18:39:13 2014 From: pfg at FreeBSD.org (Pedro F. Giffuni) Date: Sun, 3 Aug 2014 18:39:12 +0000 (UTC) Subject: svn commit: r269484 - in stable/10: lib/libc/regex sys/sys Message-ID: <53de81d0.5ff5.3cce7484@svn.freebsd.org> Author: pfg Date: Sun Aug 3 18:39:11 2014 New Revision: 269484 URL: http://svnweb.freebsd.org/changeset/base/269484 Log: MFC r268066: regex(3): Add support for \< and \> word delimiters Solaris and other OSs have support for \< and \> as word delimiters in utilities like sed(1). These are useful to have for general compatiblity with Solaris but should be avoided for portability with other systems, including the traditional BSDs. Bump __FreeBSD_version as this is likely to affect some userland utilities. Reference: https://www.illumos.org/issues/516 PR: bin/153257 Obtained from: Illumos Modified: stable/10/lib/libc/regex/re_format.7 stable/10/lib/libc/regex/regcomp.c stable/10/sys/sys/param.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/regex/re_format.7 ============================================================================== --- stable/10/lib/libc/regex/re_format.7 Sun Aug 3 18:31:52 2014 (r269483) +++ stable/10/lib/libc/regex/re_format.7 Sun Aug 3 18:39:11 2014 (r269484) @@ -36,7 +36,7 @@ .\" @(#)re_format.7 8.3 (Berkeley) 3/20/94 .\" $FreeBSD$ .\" -.Dd March 20, 1994 +.Dd June 30, 2014 .Dt RE_FORMAT 7 .Os .Sh NAME @@ -314,6 +314,13 @@ compatible with but not specified by .St -p1003.2 , and should be used with caution in software intended to be portable to other systems. +The additional word delimiters +.Ql \e< +and +.Ql \e> +are provided to ease compatibility with traditional +.Xr svr4 4 +systems but are not portable and should be avoided. .Pp In the event that an RE could match more than one substring of a given string, Modified: stable/10/lib/libc/regex/regcomp.c ============================================================================== --- stable/10/lib/libc/regex/regcomp.c Sun Aug 3 18:31:52 2014 (r269483) +++ stable/10/lib/libc/regex/regcomp.c Sun Aug 3 18:39:11 2014 (r269484) @@ -412,7 +412,17 @@ p_ere_exp(struct parse *p) case '\\': (void)REQUIRE(MORE(), REG_EESCAPE); wc = WGETNEXT(); - ordinary(p, wc); + switch (wc) { + case '<': + EMIT(OBOW, 0); + break; + case '>': + EMIT(OEOW, 0); + break; + default: + ordinary(p, wc); + break; + } break; case '{': /* okay as ordinary except if digit follows */ (void)REQUIRE(!MORE() || !isdigit((uch)PEEK()), REG_BADRPT); @@ -569,6 +579,12 @@ p_simp_re(struct parse *p, case '[': p_bracket(p); break; + case BACKSL|'<': + EMIT(OBOW, 0); + break; + case BACKSL|'>': + EMIT(OEOW, 0); + break; case BACKSL|'{': SETERROR(REG_BADRPT); break; Modified: stable/10/sys/sys/param.h ============================================================================== --- stable/10/sys/sys/param.h Sun Aug 3 18:31:52 2014 (r269483) +++ stable/10/sys/sys/param.h Sun Aug 3 18:39:11 2014 (r269484) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1000712 /* Master, propagated to newvers */ +#define __FreeBSD_version 1000713 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From peter at FreeBSD.org Sun Aug 3 22:59:47 2014 From: peter at FreeBSD.org (Peter Wemm) Date: Sun, 3 Aug 2014 22:59:47 +0000 (UTC) Subject: svn commit: r269490 - stable/10/sys/kern Message-ID: <53debee3.5327.470761ac@svn.freebsd.org> Author: peter Date: Sun Aug 3 22:59:47 2014 New Revision: 269490 URL: http://svnweb.freebsd.org/changeset/base/269490 Log: Insta-MFC r269489: partial revert of r262867 which was MFC'ed as r263820. Don't ignore sndbuf/rcvbuf limits for SOCK_DGRAM sockets. This appears to be an edit error or patch fuzz mismatch. Modified: stable/10/sys/kern/uipc_usrreq.c Modified: stable/10/sys/kern/uipc_usrreq.c ============================================================================== --- stable/10/sys/kern/uipc_usrreq.c Sun Aug 3 22:37:21 2014 (r269489) +++ stable/10/sys/kern/uipc_usrreq.c Sun Aug 3 22:59:47 2014 (r269490) @@ -897,7 +897,7 @@ uipc_send(struct socket *so, int flags, from = &sun_noname; so2 = unp2->unp_socket; SOCKBUF_LOCK(&so2->so_rcv); - if (sbappendaddr_nospacecheck_locked(&so2->so_rcv, from, m, + if (sbappendaddr_locked(&so2->so_rcv, from, m, control)) { sorwakeup_locked(so2); m = NULL; From pfg at FreeBSD.org Mon Aug 4 00:51:57 2014 From: pfg at FreeBSD.org (Pedro F. Giffuni) Date: Mon, 4 Aug 2014 00:51:57 +0000 (UTC) Subject: svn commit: r269491 - stable/10/lib/libc/stdlib Message-ID: <53ded92d.5d30.24eb2c6b@svn.freebsd.org> Author: pfg Date: Mon Aug 4 00:51:57 2014 New Revision: 269491 URL: http://svnweb.freebsd.org/changeset/base/269491 Log: MFC r268945: Fix hdestroy() compliance issue. The hcreate(3) implementation and related functions we inherited from NetBSD used to free() the key value, something that is not supported by the standard implementation. This would cause a segmentation fault when attempting to run the examples from the opengroup and linux manpages. There is no need to bump the __FreeBSD_version as we have always claimed XPG4.2 compliance but if some reference is required, the bump for r269484 can be used. Reference: http://bugs.dragonflybsd.org/issues/1398 Modified: stable/10/lib/libc/stdlib/hcreate.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/stdlib/hcreate.c ============================================================================== --- stable/10/lib/libc/stdlib/hcreate.c Sun Aug 3 22:59:47 2014 (r269490) +++ stable/10/lib/libc/stdlib/hcreate.c Mon Aug 4 00:51:57 2014 (r269491) @@ -142,7 +142,6 @@ hdestroy(void) while (!SLIST_EMPTY(&htable[idx])) { ie = SLIST_FIRST(&htable[idx]); SLIST_REMOVE_HEAD(&htable[idx], link); - free(ie->ent.key); free(ie); } } From kib at FreeBSD.org Mon Aug 4 01:10:48 2014 From: kib at FreeBSD.org (Konstantin Belousov) Date: Mon, 4 Aug 2014 01:10:47 +0000 (UTC) Subject: svn commit: r269493 - stable/10/sys/fs/nullfs Message-ID: <53dedd97.50ae.71d07d0b@svn.freebsd.org> Author: kib Date: Mon Aug 4 01:10:47 2014 New Revision: 269493 URL: http://svnweb.freebsd.org/changeset/base/269493 Log: MFC r269187: Assert that nullfs vnode has VV_ROOT set whenever lower vnode has. Assert that dotdot lookup on the root vnode is not performed. Modified: stable/10/sys/fs/nullfs/null_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nullfs/null_vnops.c ============================================================================== --- stable/10/sys/fs/nullfs/null_vnops.c Mon Aug 4 00:58:12 2014 (r269492) +++ stable/10/sys/fs/nullfs/null_vnops.c Mon Aug 4 01:10:47 2014 (r269493) @@ -372,6 +372,10 @@ null_lookup(struct vop_lookup_args *ap) */ ldvp = NULLVPTOLOWERVP(dvp); vp = lvp = NULL; + KASSERT((ldvp->v_vflag & VV_ROOT) == 0 || + ((dvp->v_vflag & VV_ROOT) != 0 && (flags & ISDOTDOT) == 0), + ("ldvp %p fl %#x dvp %p fl %#x flags %#x", ldvp, ldvp->v_vflag, + dvp, dvp->v_vflag, flags)); error = VOP_LOOKUP(ldvp, &lvp, cnp); if (error == EJUSTRETURN && (flags & ISLASTCN) && (dvp->v_mount->mnt_flag & MNT_RDONLY) && From kib at FreeBSD.org Mon Aug 4 01:12:50 2014 From: kib at FreeBSD.org (Konstantin Belousov) Date: Mon, 4 Aug 2014 01:12:49 +0000 (UTC) Subject: svn commit: r269494 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <53dede12.5539.43f078ef@svn.freebsd.org> Author: kib Date: Mon Aug 4 01:12:49 2014 New Revision: 269494 URL: http://svnweb.freebsd.org/changeset/base/269494 Log: MFC r269189: Initialize zfs vnode v_hash when the vnode is allocated. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Mon Aug 4 01:10:47 2014 (r269493) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Mon Aug 4 01:12:49 2014 (r269494) @@ -2076,8 +2076,6 @@ zfs_vget(vfs_t *vfsp, ino_t ino, int fla err = vn_lock(*vpp, flags); if (err != 0) *vpp = NULL; - else - (*vpp)->v_hash = ino; return (err); } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Mon Aug 4 01:10:47 2014 (r269493) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Mon Aug 4 01:12:49 2014 (r269494) @@ -1228,9 +1228,10 @@ again: vnode_t *vp = ZTOV(zp); err = insmntque(vp, zfsvfs->z_vfs); - if (err == 0) + if (err == 0) { + vp->v_hash = obj_num; VOP_UNLOCK(vp, 0); - else { + } else { zp->z_vnode = NULL; zfs_znode_dmu_fini(zp); zfs_znode_free(zp); From kib at FreeBSD.org Mon Aug 4 01:14:28 2014 From: kib at FreeBSD.org (Konstantin Belousov) Date: Mon, 4 Aug 2014 01:14:28 +0000 (UTC) Subject: svn commit: r269495 - in stable/10/sys: dev/md kern Message-ID: <53dede74.5551.1b8015c4@svn.freebsd.org> Author: kib Date: Mon Aug 4 01:14:27 2014 New Revision: 269495 URL: http://svnweb.freebsd.org/changeset/base/269495 Log: MFC r269190: For md(4), posix shm(3) and tmpfs(5), free swap space used by paged in dirty page, which is written by the process. Modified: stable/10/sys/dev/md/md.c stable/10/sys/kern/uipc_shm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/md/md.c ============================================================================== --- stable/10/sys/dev/md/md.c Mon Aug 4 01:12:49 2014 (r269494) +++ stable/10/sys/dev/md/md.c Mon Aug 4 01:14:27 2014 (r269495) @@ -895,8 +895,10 @@ mdstart_swap(struct md_s *sc, struct bio else vm_page_activate(m); vm_page_unlock(m); - if (bp->bio_cmd == BIO_WRITE) + if (bp->bio_cmd == BIO_WRITE) { vm_page_dirty(m); + vm_pager_page_unswapped(m); + } /* Actions on further pages start at offset 0 */ p += PAGE_SIZE - offs; Modified: stable/10/sys/kern/uipc_shm.c ============================================================================== --- stable/10/sys/kern/uipc_shm.c Mon Aug 4 01:12:49 2014 (r269494) +++ stable/10/sys/kern/uipc_shm.c Mon Aug 4 01:14:27 2014 (r269495) @@ -199,6 +199,7 @@ uiomove_object_page(vm_object_t obj, siz if (uio->uio_rw == UIO_WRITE && error == 0) { VM_OBJECT_WLOCK(obj); vm_page_dirty(m); + vm_pager_page_unswapped(m); VM_OBJECT_WUNLOCK(obj); } vm_page_lock(m); From kib at FreeBSD.org Mon Aug 4 01:16:09 2014 From: kib at FreeBSD.org (Konstantin Belousov) Date: Mon, 4 Aug 2014 01:16:08 +0000 (UTC) Subject: svn commit: r269496 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <53deded8.5569.28b919c5@svn.freebsd.org> Author: kib Date: Mon Aug 4 01:16:08 2014 New Revision: 269496 URL: http://svnweb.freebsd.org/changeset/base/269496 Log: MFC r269189: Initialize zfs vnode v_hash when the vnode is allocated. Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Mon Aug 4 01:14:27 2014 (r269495) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Mon Aug 4 01:16:08 2014 (r269496) @@ -2077,8 +2077,6 @@ zfs_vget(vfs_t *vfsp, ino_t ino, int fla err = vn_lock(*vpp, flags); if (err != 0) *vpp = NULL; - else - (*vpp)->v_hash = ino; return (err); } Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Mon Aug 4 01:14:27 2014 (r269495) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Mon Aug 4 01:16:08 2014 (r269496) @@ -1228,9 +1228,10 @@ again: vnode_t *vp = ZTOV(zp); err = insmntque(vp, zfsvfs->z_vfs); - if (err == 0) + if (err == 0) { + vp->v_hash = obj_num; VOP_UNLOCK(vp, 0); - else { + } else { zp->z_vnode = NULL; zfs_znode_dmu_fini(zp); zfs_znode_free(zp); From gjb at FreeBSD.org Mon Aug 4 03:59:49 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 4 Aug 2014 03:59:48 +0000 (UTC) Subject: svn commit: r269498 - in stable/10: share/man/man4 share/man/man5 share/man/man9 usr.bin/sort Message-ID: <53df0535.5fa9.203f807a@svn.freebsd.org> Author: gjb Date: Mon Aug 4 03:59:48 2014 New Revision: 269498 URL: http://svnweb.freebsd.org/changeset/base/269498 Log: MFC r269289, r269290, r269291, r269292, r269293: r269289: sort(1): Remove trailing '.' from See Also section. r269290: acpi_wmi(4): Remove trailing comma from standalone Xref. r269291: hptiop(4): Remove trailing comma from ending Xref. r269292: pf.conf(5): Remove trailing comma from ending Xref. r269293: kernel_mount(9): Remove trailing comma from ending Xref. Sponsored by: The FreeBSD Foundation Modified: stable/10/share/man/man4/acpi_wmi.4 stable/10/share/man/man4/hptiop.4 stable/10/share/man/man5/pf.conf.5 stable/10/share/man/man9/kernel_mount.9 stable/10/usr.bin/sort/sort.1.in Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/acpi_wmi.4 ============================================================================== --- stable/10/share/man/man4/acpi_wmi.4 Mon Aug 4 01:16:20 2014 (r269497) +++ stable/10/share/man/man4/acpi_wmi.4 Mon Aug 4 03:59:48 2014 (r269498) @@ -74,7 +74,7 @@ GUID IN {8F1F6435-9F42-42C8-BADC-0E9424F20C9A} 0 NO NO NO NO BI .Ed .Sh SEE ALSO -.Xr acpi 4 , +.Xr acpi 4 .Sh HISTORY The .Nm Modified: stable/10/share/man/man4/hptiop.4 ============================================================================== --- stable/10/share/man/man4/hptiop.4 Mon Aug 4 01:16:20 2014 (r269497) +++ stable/10/share/man/man4/hptiop.4 Mon Aug 4 03:59:48 2014 (r269498) @@ -126,7 +126,7 @@ The driver has only been tested on the i386 and amd64 platforms. .Sh SEE ALSO .Xr cam 4 , -.Xr hptmv 4 , +.Xr hptmv 4 .Sh HISTORY The .Nm Modified: stable/10/share/man/man5/pf.conf.5 ============================================================================== --- stable/10/share/man/man5/pf.conf.5 Mon Aug 4 01:16:20 2014 (r269497) +++ stable/10/share/man/man5/pf.conf.5 Mon Aug 4 03:59:48 2014 (r269498) @@ -3058,7 +3058,7 @@ Service name database. .Xr services 5 , .Xr ftp-proxy 8 , .Xr pfctl 8 , -.Xr pflogd 8 , +.Xr pflogd 8 .Sh HISTORY The .Nm Modified: stable/10/share/man/man9/kernel_mount.9 ============================================================================== --- stable/10/share/man/man9/kernel_mount.9 Mon Aug 4 01:16:20 2014 (r269497) +++ stable/10/share/man/man9/kernel_mount.9 Mon Aug 4 03:59:48 2014 (r269498) @@ -194,7 +194,7 @@ must come in pairs, e.g., .Ed .Sh SEE ALSO .Xr VFS 9 , -.Xr VFS_MOUNT 9 , +.Xr VFS_MOUNT 9 .Sh HISTORY The .Fn kernel_mount Modified: stable/10/usr.bin/sort/sort.1.in ============================================================================== --- stable/10/usr.bin/sort/sort.1.in Mon Aug 4 01:16:20 2014 (r269497) +++ stable/10/usr.bin/sort/sort.1.in Mon Aug 4 03:59:48 2014 (r269498) @@ -581,7 +581,7 @@ An error occurred. .Sh SEE ALSO .Xr comm 1 , .Xr join 1 , -.Xr uniq 1 . +.Xr uniq 1 .Sh STANDARDS The .Nm From gjb at FreeBSD.org Mon Aug 4 04:00:49 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 4 Aug 2014 04:00:48 +0000 (UTC) Subject: svn commit: r269499 - in stable/9/share/man: man4 man9 Message-ID: <53df0571.53fb.40f9196@svn.freebsd.org> Author: gjb Date: Mon Aug 4 04:00:48 2014 New Revision: 269499 URL: http://svnweb.freebsd.org/changeset/base/269499 Log: MFC r269290, r269291, r269293: r269290: acpi_wmi(4): Remove trailing comma from standalone Xref. r269291: hptiop(4): Remove trailing comma from ending Xref. r269293: kernel_mount(9): Remove trailing comma from ending Xref. Sponsored by: The FreeBSD Foundation Modified: stable/9/share/man/man4/acpi_wmi.4 stable/9/share/man/man4/hptiop.4 stable/9/share/man/man9/kernel_mount.9 Directory Properties: stable/9/share/man/man4/ (props changed) stable/9/share/man/man9/ (props changed) Modified: stable/9/share/man/man4/acpi_wmi.4 ============================================================================== --- stable/9/share/man/man4/acpi_wmi.4 Mon Aug 4 03:59:48 2014 (r269498) +++ stable/9/share/man/man4/acpi_wmi.4 Mon Aug 4 04:00:48 2014 (r269499) @@ -74,7 +74,7 @@ GUID IN {8F1F6435-9F42-42C8-BADC-0E9424F20C9A} 0 NO NO NO NO BI .Ed .Sh SEE ALSO -.Xr acpi 4 , +.Xr acpi 4 .Sh HISTORY The .Nm Modified: stable/9/share/man/man4/hptiop.4 ============================================================================== --- stable/9/share/man/man4/hptiop.4 Mon Aug 4 03:59:48 2014 (r269498) +++ stable/9/share/man/man4/hptiop.4 Mon Aug 4 04:00:48 2014 (r269499) @@ -126,7 +126,7 @@ The driver has only been tested on the i386 and amd64 platforms. .Sh SEE ALSO .Xr cam 4 , -.Xr hptmv 4 , +.Xr hptmv 4 .Sh HISTORY The .Nm Modified: stable/9/share/man/man9/kernel_mount.9 ============================================================================== --- stable/9/share/man/man9/kernel_mount.9 Mon Aug 4 03:59:48 2014 (r269498) +++ stable/9/share/man/man9/kernel_mount.9 Mon Aug 4 04:00:48 2014 (r269499) @@ -194,7 +194,7 @@ must come in pairs, e.g., .Ed .Sh SEE ALSO .Xr VFS 9 , -.Xr VFS_MOUNT 9 , +.Xr VFS_MOUNT 9 .Sh HISTORY The .Fn kernel_mount From dim at FreeBSD.org Mon Aug 4 14:56:51 2014 From: dim at FreeBSD.org (Dimitry Andric) Date: Mon, 4 Aug 2014 14:56:50 +0000 (UTC) Subject: svn commit: r269519 - in stable/10: lib/libarchive rescue/rescue Message-ID: <53df9f32.5560.5e49b49e@svn.freebsd.org> Author: dim Date: Mon Aug 4 14:56:49 2014 New Revision: 269519 URL: http://svnweb.freebsd.org/changeset/base/269519 Log: MFC r269125: In r232153, libarchive 3.0.3 was imported, replacing the archive_hash.h header with archive_crypto_private.h, and its ARCHIVE_HASH_xxx macros were renamed to ARCHIVE_CRYPTO_xxx. Rename these macros in lib/libarchive/config_freebsd.h, to re-enable the hashes for libarchive again. This affects the mtree format writer, and the xar format reader and writer modules. This also requires changes in the library order for statically linking rescue, otherwise ld would complain about redefined symbols. Thanks to jkim for pointing out the solution. Reviewed by: kientzle Modified: stable/10/lib/libarchive/config_freebsd.h stable/10/rescue/rescue/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libarchive/config_freebsd.h ============================================================================== --- stable/10/lib/libarchive/config_freebsd.h Mon Aug 4 12:25:36 2014 (r269518) +++ stable/10/lib/libarchive/config_freebsd.h Mon Aug 4 14:56:49 2014 (r269519) @@ -228,15 +228,15 @@ /* FreeBSD defines for archive_hash.h */ #ifdef WITH_OPENSSL -#define ARCHIVE_HASH_MD5_OPENSSL 1 -#define ARCHIVE_HASH_RMD160_OPENSSL 1 -#define ARCHIVE_HASH_SHA1_OPENSSL -#define ARCHIVE_HASH_SHA256_OPENSSL 1 -#define ARCHIVE_HASH_SHA384_OPENSSL 1 -#define ARCHIVE_HASH_SHA512_OPENSSL 1 +#define ARCHIVE_CRYPTO_MD5_OPENSSL 1 +#define ARCHIVE_CRYPTO_RMD160_OPENSSL 1 +#define ARCHIVE_CRYPTO_SHA1_OPENSSL +#define ARCHIVE_CRYPTO_SHA256_OPENSSL 1 +#define ARCHIVE_CRYPTO_SHA384_OPENSSL 1 +#define ARCHIVE_CRYPTO_SHA512_OPENSSL 1 #else -#define ARCHIVE_HASH_MD5_LIBMD 1 -#define ARCHIVE_HASH_SHA1_LIBMD 1 -#define ARCHIVE_HASH_SHA256_LIBMD 1 -#define ARCHIVE_HASH_SHA512_LIBMD 1 +#define ARCHIVE_CRYPTO_MD5_LIBMD 1 +#define ARCHIVE_CRYPTO_SHA1_LIBMD 1 +#define ARCHIVE_CRYPTO_SHA256_LIBMD 1 +#define ARCHIVE_CRYPTO_SHA512_LIBMD 1 #endif Modified: stable/10/rescue/rescue/Makefile ============================================================================== --- stable/10/rescue/rescue/Makefile Mon Aug 4 12:25:36 2014 (r269518) +++ stable/10/rescue/rescue/Makefile Mon Aug 4 14:56:49 2014 (r269519) @@ -125,7 +125,11 @@ CRUNCH_LIBS+= -lipx .if ${MK_ZFS} != "no" CRUNCH_LIBS+= -lavl -lzfs_core -lzfs -lnvpair -lpthread -luutil -lumem .endif -CRUNCH_LIBS+= -lgeom -lbsdxml -lkiconv -lmd -lsbuf -lufs -lz +CRUNCH_LIBS+= -lgeom -lbsdxml -lkiconv +.if ${MK_OPENSSL} == "no" +CRUNCH_LIBS+= -lmd +.endif +CRUNCH_LIBS+= -lsbuf -lufs -lz .if ${MACHINE_CPUARCH} == "i386" CRUNCH_PROGS_sbin+= bsdlabel sconfig fdisk @@ -194,10 +198,11 @@ CRUNCH_ALIAS_xz= unxz lzma unlzma xzcat CRUNCH_LIBS+= -llzma CRUNCH_PROGS_usr.bin+= tar -CRUNCH_LIBS+= -larchive -lmd +CRUNCH_LIBS+= -larchive .if ${MK_OPENSSL} != "no" CRUNCH_LIBS+= -lcrypto .endif +CRUNCH_LIBS+= -lmd CRUNCH_PROGS_usr.bin+= vi CRUNCH_ALIAS_vi= ex From markj at FreeBSD.org Mon Aug 4 15:36:25 2014 From: markj at FreeBSD.org (Mark Johnston) Date: Mon, 4 Aug 2014 15:36:24 +0000 (UTC) Subject: svn commit: r269521 - in stable/9: cddl/contrib/opensolaris/lib/libdtrace/common cddl/lib/libdtrace sys/cddl/contrib/opensolaris/uts/common/dtrace sys/cddl/contrib/opensolaris/uts/common/sys sys/cd... Message-ID: <53dfa878.54f7.4b5a27a8@svn.freebsd.org> Author: markj Date: Mon Aug 4 15:36:23 2014 New Revision: 269521 URL: http://svnweb.freebsd.org/changeset/base/269521 Log: MFC r256571: Add a function, memstr, which can be used to convert a buffer of null-separated strings to a single string. This can be used to print the full arguments of a process using execsnoop (from the DTrace toolkit) or with the following one-liner: dtrace -n 'syscall::execve:return {trace(curpsinfo->pr_psargs);}' Note that this relies on the process arguments being cached via the struct proc, which means that it will not work for argvs longer than kern.ps_arg_cache_limit. However, the following rather non-portable script can be used to extract any argv at exec time: fbt::kern_execve:entry { printf("%s", memstr(args[1]->begin_argv, ' ', args[1]->begin_envv - args[1]->begin_argv)); } The debug.dtrace.memstr_max sysctl limits the maximum argument size to memstr(). Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c stable/9/cddl/lib/libdtrace/psinfo.d stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h stable/9/sys/cddl/dev/dtrace/dtrace_sysctl.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/ (props changed) stable/9/cddl/lib/libdtrace/ (props changed) stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Mon Aug 4 15:36:22 2014 (r269520) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Mon Aug 4 15:36:23 2014 (r269521) @@ -311,6 +311,10 @@ static const dt_ident_t _dtrace_globals[ &dt_idops_func, "void(@)" }, { "memref", DT_IDENT_FUNC, 0, DIF_SUBR_MEMREF, DT_ATTR_STABCMN, DT_VERS_1_1, &dt_idops_func, "uintptr_t *(void *, size_t)" }, +#if !defined(sun) +{ "memstr", DT_IDENT_FUNC, 0, DIF_SUBR_MEMSTR, DT_ATTR_STABCMN, DT_VERS_1_0, + &dt_idops_func, "string(void *, char, size_t)" }, +#endif { "min", DT_IDENT_AGGFUNC, 0, DTRACEAGG_MIN, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_func, "void(@)" }, { "mod", DT_IDENT_ACTFUNC, 0, DT_ACT_MOD, DT_ATTR_STABCMN, Modified: stable/9/cddl/lib/libdtrace/psinfo.d ============================================================================== --- stable/9/cddl/lib/libdtrace/psinfo.d Mon Aug 4 15:36:22 2014 (r269520) +++ stable/9/cddl/lib/libdtrace/psinfo.d Mon Aug 4 15:36:23 2014 (r269521) @@ -56,7 +56,8 @@ translator psinfo_t < struct proc *T > { pr_gid = T->p_ucred->cr_rgid; pr_egid = T->p_ucred->cr_groups[0]; pr_addr = 0; - pr_psargs = stringof(T->p_args->ar_args); + pr_psargs = (T->p_args->ar_args == 0) ? "" : + memstr(T->p_args->ar_args, ' ', T->p_args->ar_length); pr_arglen = T->p_args->ar_length; }; Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Mon Aug 4 15:36:22 2014 (r269520) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Mon Aug 4 15:36:23 2014 (r269521) @@ -185,6 +185,9 @@ hrtime_t dtrace_deadman_interval = NANOS hrtime_t dtrace_deadman_timeout = (hrtime_t)10 * NANOSEC; hrtime_t dtrace_deadman_user = (hrtime_t)30 * NANOSEC; hrtime_t dtrace_unregister_defunct_reap = (hrtime_t)60 * NANOSEC; +#if !defined(sun) +int dtrace_memstr_max = 4096; +#endif /* * DTrace External Variables @@ -4921,6 +4924,45 @@ inetout: regs[rd] = (uintptr_t)end + 1; break; } +#if !defined(sun) + case DIF_SUBR_MEMSTR: { + char *str = (char *)mstate->dtms_scratch_ptr; + uintptr_t mem = tupregs[0].dttk_value; + char c = tupregs[1].dttk_value; + size_t size = tupregs[2].dttk_value; + uint8_t n; + int i; + + regs[rd] = 0; + + if (size == 0) + break; + + if (!dtrace_canload(mem, size - 1, mstate, vstate)) + break; + + if (!DTRACE_INSCRATCH(mstate, size)) { + DTRACE_CPUFLAG_SET(CPU_DTRACE_NOSCRATCH); + break; + } + + if (dtrace_memstr_max != 0 && size > dtrace_memstr_max) { + *flags |= CPU_DTRACE_ILLOP; + break; + } + + for (i = 0; i < size - 1; i++) { + n = dtrace_load8(mem++); + str[i] = (n == 0) ? c : n; + } + str[size - 1] = 0; + + regs[rd] = (uintptr_t)str; + mstate->dtms_scratch_ptr += size; + break; + } +#endif + case DIF_SUBR_TYPEREF: { uintptr_t size = 4 * sizeof(uintptr_t); uintptr_t *typeref = (uintptr_t *) P2ROUNDUP(mstate->dtms_scratch_ptr, sizeof(uintptr_t)); @@ -9103,6 +9145,9 @@ dtrace_difo_validate_helper(dtrace_difo_ subr == DIF_SUBR_NTOHL || subr == DIF_SUBR_NTOHLL || subr == DIF_SUBR_MEMREF || +#if !defined(sun) + subr == DIF_SUBR_MEMSTR || +#endif subr == DIF_SUBR_TYPEREF) break; Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Mon Aug 4 15:36:22 2014 (r269520) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Mon Aug 4 15:36:23 2014 (r269521) @@ -311,8 +311,9 @@ typedef enum dtrace_probespec { #define DIF_SUBR_SX_SHARED_HELD 48 #define DIF_SUBR_SX_EXCLUSIVE_HELD 49 #define DIF_SUBR_SX_ISEXCLUSIVE 50 +#define DIF_SUBR_MEMSTR 51 -#define DIF_SUBR_MAX 50 /* max subroutine value */ +#define DIF_SUBR_MAX 51 /* max subroutine value */ typedef uint32_t dif_instr_t; Modified: stable/9/sys/cddl/dev/dtrace/dtrace_sysctl.c ============================================================================== --- stable/9/sys/cddl/dev/dtrace/dtrace_sysctl.c Mon Aug 4 15:36:22 2014 (r269520) +++ stable/9/sys/cddl/dev/dtrace/dtrace_sysctl.c Mon Aug 4 15:36:23 2014 (r269521) @@ -89,3 +89,6 @@ SYSCTL_LONG(_kern_dtrace, OID_AUTO, dof_ SYSCTL_LONG(_kern_dtrace, OID_AUTO, helper_actions_max, CTLFLAG_RW, &dtrace_helper_actions_max, 0, "maximum number of allowed helper actions"); + +SYSCTL_INT(_kern_dtrace, OID_AUTO, memstr_max, CTLFLAG_RW, &dtrace_memstr_max, + 0, "largest allowed argument to memstr(), 0 indicates no limit"); From markj at FreeBSD.org Mon Aug 4 15:36:24 2014 From: markj at FreeBSD.org (Mark Johnston) Date: Mon, 4 Aug 2014 15:36:23 +0000 (UTC) Subject: svn commit: r269520 - in stable/10: cddl/contrib/opensolaris/lib/libdtrace/common cddl/lib/libdtrace sys/cddl/contrib/opensolaris/uts/common/dtrace sys/cddl/contrib/opensolaris/uts/common/sys sys/c... Message-ID: <53dfa877.5485.78ad1b99@svn.freebsd.org> Author: markj Date: Mon Aug 4 15:36:22 2014 New Revision: 269520 URL: http://svnweb.freebsd.org/changeset/base/269520 Log: MFC r256571: Add a function, memstr, which can be used to convert a buffer of null-separated strings to a single string. This can be used to print the full arguments of a process using execsnoop (from the DTrace toolkit) or with the following one-liner: dtrace -n 'syscall::execve:return {trace(curpsinfo->pr_psargs);}' Note that this relies on the process arguments being cached via the struct proc, which means that it will not work for argvs longer than kern.ps_arg_cache_limit. However, the following rather non-portable script can be used to extract any argv at exec time: fbt::kern_execve:entry { printf("%s", memstr(args[1]->begin_argv, ' ', args[1]->begin_envv - args[1]->begin_argv)); } The debug.dtrace.memstr_max sysctl limits the maximum argument size to memstr(). Modified: stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c stable/10/cddl/lib/libdtrace/psinfo.d stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h stable/10/sys/cddl/dev/dtrace/dtrace_sysctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Mon Aug 4 14:56:49 2014 (r269519) +++ stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Mon Aug 4 15:36:22 2014 (r269520) @@ -323,6 +323,10 @@ static const dt_ident_t _dtrace_globals[ &dt_idops_func, "void(@)" }, { "memref", DT_IDENT_FUNC, 0, DIF_SUBR_MEMREF, DT_ATTR_STABCMN, DT_VERS_1_1, &dt_idops_func, "uintptr_t *(void *, size_t)" }, +#if !defined(sun) +{ "memstr", DT_IDENT_FUNC, 0, DIF_SUBR_MEMSTR, DT_ATTR_STABCMN, DT_VERS_1_0, + &dt_idops_func, "string(void *, char, size_t)" }, +#endif { "min", DT_IDENT_AGGFUNC, 0, DTRACEAGG_MIN, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_func, "void(@)" }, { "mod", DT_IDENT_ACTFUNC, 0, DT_ACT_MOD, DT_ATTR_STABCMN, Modified: stable/10/cddl/lib/libdtrace/psinfo.d ============================================================================== --- stable/10/cddl/lib/libdtrace/psinfo.d Mon Aug 4 14:56:49 2014 (r269519) +++ stable/10/cddl/lib/libdtrace/psinfo.d Mon Aug 4 15:36:22 2014 (r269520) @@ -57,7 +57,8 @@ translator psinfo_t < struct proc *T > { pr_gid = T->p_ucred->cr_rgid; pr_egid = T->p_ucred->cr_groups[0]; pr_addr = 0; - pr_psargs = stringof(T->p_args->ar_args); + pr_psargs = (T->p_args->ar_args == 0) ? "" : + memstr(T->p_args->ar_args, ' ', T->p_args->ar_length); pr_arglen = T->p_args->ar_length; pr_jailid = T->p_ucred->cr_prison->pr_id; }; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Mon Aug 4 14:56:49 2014 (r269519) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Mon Aug 4 15:36:22 2014 (r269520) @@ -184,6 +184,9 @@ hrtime_t dtrace_deadman_interval = NANOS hrtime_t dtrace_deadman_timeout = (hrtime_t)10 * NANOSEC; hrtime_t dtrace_deadman_user = (hrtime_t)30 * NANOSEC; hrtime_t dtrace_unregister_defunct_reap = (hrtime_t)60 * NANOSEC; +#if !defined(sun) +int dtrace_memstr_max = 4096; +#endif /* * DTrace External Variables @@ -5807,6 +5810,45 @@ inetout: regs[rd] = (uintptr_t)end + 1; break; } +#if !defined(sun) + case DIF_SUBR_MEMSTR: { + char *str = (char *)mstate->dtms_scratch_ptr; + uintptr_t mem = tupregs[0].dttk_value; + char c = tupregs[1].dttk_value; + size_t size = tupregs[2].dttk_value; + uint8_t n; + int i; + + regs[rd] = 0; + + if (size == 0) + break; + + if (!dtrace_canload(mem, size - 1, mstate, vstate)) + break; + + if (!DTRACE_INSCRATCH(mstate, size)) { + DTRACE_CPUFLAG_SET(CPU_DTRACE_NOSCRATCH); + break; + } + + if (dtrace_memstr_max != 0 && size > dtrace_memstr_max) { + *flags |= CPU_DTRACE_ILLOP; + break; + } + + for (i = 0; i < size - 1; i++) { + n = dtrace_load8(mem++); + str[i] = (n == 0) ? c : n; + } + str[size - 1] = 0; + + regs[rd] = (uintptr_t)str; + mstate->dtms_scratch_ptr += size; + break; + } +#endif + case DIF_SUBR_TYPEREF: { uintptr_t size = 4 * sizeof(uintptr_t); uintptr_t *typeref = (uintptr_t *) P2ROUNDUP(mstate->dtms_scratch_ptr, sizeof(uintptr_t)); @@ -10033,6 +10075,9 @@ dtrace_difo_validate_helper(dtrace_difo_ subr == DIF_SUBR_NTOHL || subr == DIF_SUBR_NTOHLL || subr == DIF_SUBR_MEMREF || +#if !defined(sun) + subr == DIF_SUBR_MEMSTR || +#endif subr == DIF_SUBR_TYPEREF) break; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Mon Aug 4 14:56:49 2014 (r269519) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Mon Aug 4 15:36:22 2014 (r269520) @@ -311,6 +311,7 @@ typedef enum dtrace_probespec { #define DIF_SUBR_SX_SHARED_HELD 48 #define DIF_SUBR_SX_EXCLUSIVE_HELD 49 #define DIF_SUBR_SX_ISEXCLUSIVE 50 +#define DIF_SUBR_MEMSTR 51 #define DIF_SUBR_GETF 52 #define DIF_SUBR_JSON 53 #define DIF_SUBR_STRTOLL 54 Modified: stable/10/sys/cddl/dev/dtrace/dtrace_sysctl.c ============================================================================== --- stable/10/sys/cddl/dev/dtrace/dtrace_sysctl.c Mon Aug 4 14:56:49 2014 (r269519) +++ stable/10/sys/cddl/dev/dtrace/dtrace_sysctl.c Mon Aug 4 15:36:22 2014 (r269520) @@ -89,3 +89,6 @@ SYSCTL_LONG(_kern_dtrace, OID_AUTO, dof_ SYSCTL_LONG(_kern_dtrace, OID_AUTO, helper_actions_max, CTLFLAG_RW, &dtrace_helper_actions_max, 0, "maximum number of allowed helper actions"); + +SYSCTL_INT(_kern_dtrace, OID_AUTO, memstr_max, CTLFLAG_RW, &dtrace_memstr_max, + 0, "largest allowed argument to memstr(), 0 indicates no limit"); From markj at FreeBSD.org Mon Aug 4 21:41:00 2014 From: markj at FreeBSD.org (Mark Johnston) Date: Mon, 4 Aug 2014 21:41:00 +0000 (UTC) Subject: svn commit: r269531 - in stable/10/sys/cddl: contrib/opensolaris/uts/intel/dtrace dev/dtrace/amd64 Message-ID: <53dffdec.5d04.69135e0@svn.freebsd.org> Author: markj Date: Mon Aug 4 21:41:00 2014 New Revision: 269531 URL: http://svnweb.freebsd.org/changeset/base/269531 Log: MFC r256822: When fetching function arguments out of a frame on amd64, explicitly select the register based on the argument index rather than relying on the fields in struct reg to be in the right order. This assumption is incorrect on FreeBSD and generally led to bogus argument values for the sixth argument of PID and USDT probes; the first five are passed directly to dtrace_probe() via the fasttrap trap handler and so were correctly handled. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c stable/10/sys/cddl/dev/dtrace/amd64/dtrace_isa.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Mon Aug 4 21:12:38 2014 (r269530) +++ stable/10/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Mon Aug 4 21:41:00 2014 (r269531) @@ -273,7 +273,20 @@ fasttrap_anarg(struct reg *rp, int funct * registers. */ if (argno < 6) - return ((&rp->r_rdi)[argno]); + switch (argno) { + case 0: + return (rp->r_rdi); + case 1: + return (rp->r_rsi); + case 2: + return (rp->r_rdx); + case 3: + return (rp->r_rcx); + case 4: + return (rp->r_r8); + case 5: + return (rp->r_r9); + } stack = (uintptr_t *)rp->r_rsp; DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT); Modified: stable/10/sys/cddl/dev/dtrace/amd64/dtrace_isa.c ============================================================================== --- stable/10/sys/cddl/dev/dtrace/amd64/dtrace_isa.c Mon Aug 4 21:12:38 2014 (r269530) +++ stable/10/sys/cddl/dev/dtrace/amd64/dtrace_isa.c Mon Aug 4 21:41:00 2014 (r269531) @@ -367,7 +367,27 @@ dtrace_getarg(int arg, int aframes) sizeof (uintptr_t)); if (arg <= inreg) { - stack = (uintptr_t *)&rp->r_rdi; + switch (arg) { + case 0: + stack = (uintptr_t *)&rp->r_rdi; + break; + case 1: + stack = (uintptr_t *)&rp->r_rsi; + break; + case 2: + stack = (uintptr_t *)&rp->r_rdx; + break; + case 3: + stack = (uintptr_t *)&rp->r_rcx; + break; + case 4: + stack = (uintptr_t *)&rp->r_r8; + break; + case 5: + stack = (uintptr_t *)&rp->r_r9; + break; + } + arg = 0; } else { stack = (uintptr_t *)(rp->r_rsp); arg -= inreg; From markj at FreeBSD.org Mon Aug 4 21:41:01 2014 From: markj at FreeBSD.org (Mark Johnston) Date: Mon, 4 Aug 2014 21:41:01 +0000 (UTC) Subject: svn commit: r269532 - in stable/9/sys/cddl: contrib/opensolaris/uts/intel/dtrace dev/dtrace/amd64 Message-ID: <53dffded.5d1d.70321ffb@svn.freebsd.org> Author: markj Date: Mon Aug 4 21:41:01 2014 New Revision: 269532 URL: http://svnweb.freebsd.org/changeset/base/269532 Log: MFC r256822: When fetching function arguments out of a frame on amd64, explicitly select the register based on the argument index rather than relying on the fields in struct reg to be in the right order. This assumption is incorrect on FreeBSD and generally led to bogus argument values for the sixth argument of PID and USDT probes; the first five are passed directly to dtrace_probe() via the fasttrap trap handler and so were correctly handled. Modified: stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c stable/9/sys/cddl/dev/dtrace/amd64/dtrace_isa.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Mon Aug 4 21:41:00 2014 (r269531) +++ stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Mon Aug 4 21:41:01 2014 (r269532) @@ -273,7 +273,20 @@ fasttrap_anarg(struct reg *rp, int funct * registers. */ if (argno < 6) - return ((&rp->r_rdi)[argno]); + switch (argno) { + case 0: + return (rp->r_rdi); + case 1: + return (rp->r_rsi); + case 2: + return (rp->r_rdx); + case 3: + return (rp->r_rcx); + case 4: + return (rp->r_r8); + case 5: + return (rp->r_r9); + } stack = (uintptr_t *)rp->r_rsp; DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT); Modified: stable/9/sys/cddl/dev/dtrace/amd64/dtrace_isa.c ============================================================================== --- stable/9/sys/cddl/dev/dtrace/amd64/dtrace_isa.c Mon Aug 4 21:41:00 2014 (r269531) +++ stable/9/sys/cddl/dev/dtrace/amd64/dtrace_isa.c Mon Aug 4 21:41:01 2014 (r269532) @@ -367,7 +367,27 @@ dtrace_getarg(int arg, int aframes) sizeof (uintptr_t)); if (arg <= inreg) { - stack = (uintptr_t *)&rp->r_rdi; + switch (arg) { + case 0: + stack = (uintptr_t *)&rp->r_rdi; + break; + case 1: + stack = (uintptr_t *)&rp->r_rsi; + break; + case 2: + stack = (uintptr_t *)&rp->r_rdx; + break; + case 3: + stack = (uintptr_t *)&rp->r_rcx; + break; + case 4: + stack = (uintptr_t *)&rp->r_r8; + break; + case 5: + stack = (uintptr_t *)&rp->r_r9; + break; + } + arg = 0; } else { stack = (uintptr_t *)(rp->r_rsp); arg -= inreg; From markj at FreeBSD.org Tue Aug 5 00:25:20 2014 From: markj at FreeBSD.org (Mark Johnston) Date: Tue, 5 Aug 2014 00:25:19 +0000 (UTC) Subject: svn commit: r269544 - stable/9/sys/cddl/dev/sdt Message-ID: <53e0246f.5b0d.121998b@svn.freebsd.org> Author: markj Date: Tue Aug 5 00:25:19 2014 New Revision: 269544 URL: http://svnweb.freebsd.org/changeset/base/269544 Log: MFC r267706: Allow creation of SDT probes from a module in which no providers are defined. This ensures that the sdt:zfs:: probes appear despite the fact the sdt provider is defined in the kernel rather than in zfs.ko. Modified: stable/9/sys/cddl/dev/sdt/sdt.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cddl/dev/sdt/sdt.c ============================================================================== --- stable/9/sys/cddl/dev/sdt/sdt.c Tue Aug 5 00:07:21 2014 (r269543) +++ stable/9/sys/cddl/dev/sdt/sdt.c Tue Aug 5 00:25:19 2014 (r269544) @@ -259,27 +259,28 @@ sdt_kld_load(void *arg __unused, struct struct sdt_probe **probe, **p_begin, **p_end; struct sdt_argtype **argtype, **a_begin, **a_end; - if (linker_file_lookup_set(lf, "sdt_providers_set", &begin, &end, NULL)) - return; - for (prov = begin; prov < end; prov++) - sdt_create_provider(*prov); + if (linker_file_lookup_set(lf, "sdt_providers_set", &begin, &end, + NULL) == 0) { + for (prov = begin; prov < end; prov++) + sdt_create_provider(*prov); + } if (linker_file_lookup_set(lf, "sdt_probes_set", &p_begin, &p_end, - NULL)) - return; - for (probe = p_begin; probe < p_end; probe++) { - (*probe)->sdtp_lf = lf; - sdt_create_probe(*probe); - TAILQ_INIT(&(*probe)->argtype_list); + NULL) == 0) { + for (probe = p_begin; probe < p_end; probe++) { + (*probe)->sdtp_lf = lf; + sdt_create_probe(*probe); + TAILQ_INIT(&(*probe)->argtype_list); + } } if (linker_file_lookup_set(lf, "sdt_argtypes_set", &a_begin, &a_end, - NULL)) - return; - for (argtype = a_begin; argtype < a_end; argtype++) { - (*argtype)->probe->n_args++; - TAILQ_INSERT_TAIL(&(*argtype)->probe->argtype_list, *argtype, - argtype_entry); + NULL) == 0) { + for (argtype = a_begin; argtype < a_end; argtype++) { + (*argtype)->probe->n_args++; + TAILQ_INSERT_TAIL(&(*argtype)->probe->argtype_list, + *argtype, argtype_entry); + } } } From markj at FreeBSD.org Tue Aug 5 00:25:47 2014 From: markj at FreeBSD.org (Mark Johnston) Date: Tue, 5 Aug 2014 00:25:46 +0000 (UTC) Subject: svn commit: r269545 - stable/10/sys/cddl/dev/sdt Message-ID: <53e0248a.5b1f.74eb54e2@svn.freebsd.org> Author: markj Date: Tue Aug 5 00:25:46 2014 New Revision: 269545 URL: http://svnweb.freebsd.org/changeset/base/269545 Log: MFC r267706: Allow creation of SDT probes from a module in which no providers are defined. This ensures that the sdt:zfs:: probes appear despite the fact the sdt provider is defined in the kernel rather than in zfs.ko. Modified: stable/10/sys/cddl/dev/sdt/sdt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/dev/sdt/sdt.c ============================================================================== --- stable/10/sys/cddl/dev/sdt/sdt.c Tue Aug 5 00:25:19 2014 (r269544) +++ stable/10/sys/cddl/dev/sdt/sdt.c Tue Aug 5 00:25:46 2014 (r269545) @@ -259,27 +259,28 @@ sdt_kld_load(void *arg __unused, struct struct sdt_probe **probe, **p_begin, **p_end; struct sdt_argtype **argtype, **a_begin, **a_end; - if (linker_file_lookup_set(lf, "sdt_providers_set", &begin, &end, NULL)) - return; - for (prov = begin; prov < end; prov++) - sdt_create_provider(*prov); + if (linker_file_lookup_set(lf, "sdt_providers_set", &begin, &end, + NULL) == 0) { + for (prov = begin; prov < end; prov++) + sdt_create_provider(*prov); + } if (linker_file_lookup_set(lf, "sdt_probes_set", &p_begin, &p_end, - NULL)) - return; - for (probe = p_begin; probe < p_end; probe++) { - (*probe)->sdtp_lf = lf; - sdt_create_probe(*probe); - TAILQ_INIT(&(*probe)->argtype_list); + NULL) == 0) { + for (probe = p_begin; probe < p_end; probe++) { + (*probe)->sdtp_lf = lf; + sdt_create_probe(*probe); + TAILQ_INIT(&(*probe)->argtype_list); + } } if (linker_file_lookup_set(lf, "sdt_argtypes_set", &a_begin, &a_end, - NULL)) - return; - for (argtype = a_begin; argtype < a_end; argtype++) { - (*argtype)->probe->n_args++; - TAILQ_INSERT_TAIL(&(*argtype)->probe->argtype_list, *argtype, - argtype_entry); + NULL) == 0) { + for (argtype = a_begin; argtype < a_end; argtype++) { + (*argtype)->probe->n_args++; + TAILQ_INSERT_TAIL(&(*argtype)->probe->argtype_list, + *argtype, argtype_entry); + } } } From markj at FreeBSD.org Tue Aug 5 01:03:11 2014 From: markj at FreeBSD.org (Mark Johnston) Date: Tue, 5 Aug 2014 01:03:11 +0000 (UTC) Subject: svn commit: r269546 - stable/10/sys/dev/sound/pci/hda Message-ID: <53e02d4f.596f.4f02dc@svn.freebsd.org> Author: markj Date: Tue Aug 5 01:03:10 2014 New Revision: 269546 URL: http://svnweb.freebsd.org/changeset/base/269546 Log: MFC r268584: Add a headphone redirection quirk for the Lenovo G580. Modified: stable/10/sys/dev/sound/pci/hda/hdaa_patches.c stable/10/sys/dev/sound/pci/hda/hdac.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/pci/hda/hdaa_patches.c ============================================================================== --- stable/10/sys/dev/sound/pci/hda/hdaa_patches.c Tue Aug 5 00:25:46 2014 (r269545) +++ stable/10/sys/dev/sound/pci/hda/hdaa_patches.c Tue Aug 5 01:03:10 2014 (r269546) @@ -351,7 +351,8 @@ hdac_pin_patch(struct hdaa_widget *w) (subid == LENOVO_X1_SUBVENDOR || subid == LENOVO_X220_SUBVENDOR || subid == LENOVO_T420_SUBVENDOR || - subid == LENOVO_T520_SUBVENDOR)) { + subid == LENOVO_T520_SUBVENDOR || + subid == LENOVO_G580_SUBVENDOR)) { switch (nid) { case 25: patch = "as=1 seq=15"; Modified: stable/10/sys/dev/sound/pci/hda/hdac.h ============================================================================== --- stable/10/sys/dev/sound/pci/hda/hdac.h Tue Aug 5 00:25:46 2014 (r269545) +++ stable/10/sys/dev/sound/pci/hda/hdac.h Tue Aug 5 01:03:10 2014 (r269546) @@ -241,6 +241,7 @@ #define LENOVO_T430S_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21fb) #define LENOVO_T520_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21cf) #define LENOVO_T530_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21f6) +#define LENOVO_G580_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x3977) #define LENOVO_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0xffff) /* Samsung */ From markj at FreeBSD.org Tue Aug 5 01:03:12 2014 From: markj at FreeBSD.org (Mark Johnston) Date: Tue, 5 Aug 2014 01:03:12 +0000 (UTC) Subject: svn commit: r269547 - stable/9/sys/dev/sound/pci/hda Message-ID: <53e02d50.5987.243d6b4a@svn.freebsd.org> Author: markj Date: Tue Aug 5 01:03:11 2014 New Revision: 269547 URL: http://svnweb.freebsd.org/changeset/base/269547 Log: MFC r268584: Add a headphone redirection quirk for the Lenovo G580. Modified: stable/9/sys/dev/sound/pci/hda/hdaa_patches.c stable/9/sys/dev/sound/pci/hda/hdac.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sound/pci/hda/hdaa_patches.c ============================================================================== --- stable/9/sys/dev/sound/pci/hda/hdaa_patches.c Tue Aug 5 01:03:10 2014 (r269546) +++ stable/9/sys/dev/sound/pci/hda/hdaa_patches.c Tue Aug 5 01:03:11 2014 (r269547) @@ -346,7 +346,8 @@ hdac_pin_patch(struct hdaa_widget *w) (subid == LENOVO_X1_SUBVENDOR || subid == LENOVO_X220_SUBVENDOR || subid == LENOVO_T420_SUBVENDOR || - subid == LENOVO_T520_SUBVENDOR)) { + subid == LENOVO_T520_SUBVENDOR || + subid == LENOVO_G580_SUBVENDOR)) { switch (nid) { case 25: patch = "as=1 seq=15"; Modified: stable/9/sys/dev/sound/pci/hda/hdac.h ============================================================================== --- stable/9/sys/dev/sound/pci/hda/hdac.h Tue Aug 5 01:03:10 2014 (r269546) +++ stable/9/sys/dev/sound/pci/hda/hdac.h Tue Aug 5 01:03:11 2014 (r269547) @@ -232,6 +232,7 @@ #define LENOVO_T430S_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21fb) #define LENOVO_T520_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21cf) #define LENOVO_T530_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21f6) +#define LENOVO_G580_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x3977) #define LENOVO_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0xffff) /* Samsung */ From markj at FreeBSD.org Tue Aug 5 01:53:15 2014 From: markj at FreeBSD.org (Mark Johnston) Date: Tue, 5 Aug 2014 01:53:14 +0000 (UTC) Subject: svn commit: r269556 - in stable/9/sys/cddl: contrib/opensolaris/uts/common/sys dev/dtrace/amd64 dev/dtrace/i386 Message-ID: <53e0390a.5bb0.1dedde7a@svn.freebsd.org> Author: markj Date: Tue Aug 5 01:53:14 2014 New Revision: 269556 URL: http://svnweb.freebsd.org/changeset/base/269556 Log: MFC r267759, r267761 r267759: Fix a couple of bugs on amd64 when fetching probe arguments beyond the first five for probes entered through a UD fault (i.e. FBT probes). Specifically, handle the fact that dtrace_invop_callsite must be 16 byte-aligned and thus may not immediately follow the call to dtrace_invop() in dtrace_invop_start(). Also fetch register arguments and the stack pointer through a struct trapframe instead of a struct reg. r267761: Fix some bugs when fetching probe arguments in i386. Firstly ensure that the 4 byte-aligned dtrace_invop_callsite can be found and that it immediately follows the call to dtrace_invop(). Secondly, fix some pointer arithmetic to account for differences between struct i386_frame and illumos' struct frame. Finally, ensure that dtrace_getarg() isn't inlined. It works by following a fixed number of frame pointers to the probe site, so inlining breaks it. PR: 191260 Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h stable/9/sys/cddl/dev/dtrace/amd64/dtrace_isa.c stable/9/sys/cddl/dev/dtrace/i386/dtrace_asm.S stable/9/sys/cddl/dev/dtrace/i386/dtrace_isa.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h Tue Aug 5 01:49:30 2014 (r269555) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h Tue Aug 5 01:53:14 2014 (r269556) @@ -1268,7 +1268,11 @@ typedef struct dtrace_toxrange { uintptr_t dtt_limit; /* limit of toxic range */ } dtrace_toxrange_t; +#if defined(sun) extern uint64_t dtrace_getarg(int, int); +#else +extern uint64_t __noinline dtrace_getarg(int, int); +#endif extern greg_t dtrace_getfp(void); extern int dtrace_getipl(void); extern uintptr_t dtrace_caller(int); Modified: stable/9/sys/cddl/dev/dtrace/amd64/dtrace_isa.c ============================================================================== --- stable/9/sys/cddl/dev/dtrace/amd64/dtrace_isa.c Tue Aug 5 01:49:30 2014 (r269555) +++ stable/9/sys/cddl/dev/dtrace/amd64/dtrace_isa.c Tue Aug 5 01:53:14 2014 (r269556) @@ -349,7 +349,8 @@ dtrace_getarg(int arg, int aframes) for (i = 1; i <= aframes; i++) { fp = fp->f_frame; - if (fp->f_retaddr == (long)dtrace_invop_callsite) { + if (P2ROUNDUP(fp->f_retaddr, 16) == + (long)dtrace_invop_callsite) { /* * In the case of amd64, we will use the pointer to the * regs structure that was pushed when we took the @@ -363,33 +364,33 @@ dtrace_getarg(int arg, int aframes) * we're seeking is passed in regsiters, we can just * load it directly. */ - struct reg *rp = (struct reg *)((uintptr_t)&fp[1] + - sizeof (uintptr_t)); + struct trapframe *tf = + (struct trapframe *)((uintptr_t)&fp[1]); if (arg <= inreg) { switch (arg) { case 0: - stack = (uintptr_t *)&rp->r_rdi; + stack = (uintptr_t *)&tf->tf_rdi; break; case 1: - stack = (uintptr_t *)&rp->r_rsi; + stack = (uintptr_t *)&tf->tf_rsi; break; case 2: - stack = (uintptr_t *)&rp->r_rdx; + stack = (uintptr_t *)&tf->tf_rdx; break; case 3: - stack = (uintptr_t *)&rp->r_rcx; + stack = (uintptr_t *)&tf->tf_rcx; break; case 4: - stack = (uintptr_t *)&rp->r_r8; + stack = (uintptr_t *)&tf->tf_r8; break; case 5: - stack = (uintptr_t *)&rp->r_r9; + stack = (uintptr_t *)&tf->tf_r9; break; } arg = 0; } else { - stack = (uintptr_t *)(rp->r_rsp); + stack = (uintptr_t *)(tf->tf_rsp); arg -= inreg; } goto load; Modified: stable/9/sys/cddl/dev/dtrace/i386/dtrace_asm.S ============================================================================== --- stable/9/sys/cddl/dev/dtrace/i386/dtrace_asm.S Tue Aug 5 01:49:30 2014 (r269555) +++ stable/9/sys/cddl/dev/dtrace/i386/dtrace_asm.S Tue Aug 5 01:53:14 2014 (r269556) @@ -49,14 +49,8 @@ * dtrace_invop wants us to do. */ call dtrace_invop - - /* - * We pushed 3 times for the arguments to dtrace_invop, - * so we need to increment the stack pointer to get rid of - * those values. - */ - addl $12, %esp ALTENTRY(dtrace_invop_callsite) + addl $12, %esp cmpl $DTRACE_INVOP_PUSHL_EBP, %eax je invop_push cmpl $DTRACE_INVOP_POPL_EBP, %eax Modified: stable/9/sys/cddl/dev/dtrace/i386/dtrace_isa.c ============================================================================== --- stable/9/sys/cddl/dev/dtrace/i386/dtrace_isa.c Tue Aug 5 01:49:30 2014 (r269555) +++ stable/9/sys/cddl/dev/dtrace/i386/dtrace_isa.c Tue Aug 5 01:53:14 2014 (r269556) @@ -413,7 +413,8 @@ dtrace_getarg(int arg, int aframes) for (i = 1; i <= aframes; i++) { fp = fp->f_frame; - if (fp->f_retaddr == (long)dtrace_invop_callsite) { + if (P2ROUNDUP(fp->f_retaddr, 4) == + (long)dtrace_invop_callsite) { /* * If we pass through the invalid op handler, we will * use the pointer that it passed to the stack as the @@ -422,7 +423,7 @@ dtrace_getarg(int arg, int aframes) * beyond the EIP/RIP that was pushed when the trap was * taken -- hence the "+ 1" below. */ - stack = ((uintptr_t **)&fp[1])[1] + 1; + stack = ((uintptr_t **)&fp[1])[0] + 1; goto load; } @@ -438,7 +439,7 @@ dtrace_getarg(int arg, int aframes) */ arg++; - stack = (uintptr_t *)&fp[1]; + stack = (uintptr_t *)fp + 2; load: DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT); From markj at FreeBSD.org Tue Aug 5 01:53:16 2014 From: markj at FreeBSD.org (Mark Johnston) Date: Tue, 5 Aug 2014 01:53:15 +0000 (UTC) Subject: svn commit: r269557 - in stable/10/sys/cddl: contrib/opensolaris/uts/common/sys dev/dtrace/amd64 dev/dtrace/i386 Message-ID: <53e0390c.5bd6.2dd54011@svn.freebsd.org> Author: markj Date: Tue Aug 5 01:53:15 2014 New Revision: 269557 URL: http://svnweb.freebsd.org/changeset/base/269557 Log: MFC r267759, r267761 r267759: Fix a couple of bugs on amd64 when fetching probe arguments beyond the first five for probes entered through a UD fault (i.e. FBT probes). Specifically, handle the fact that dtrace_invop_callsite must be 16 byte-aligned and thus may not immediately follow the call to dtrace_invop() in dtrace_invop_start(). Also fetch register arguments and the stack pointer through a struct trapframe instead of a struct reg. r267761: Fix some bugs when fetching probe arguments in i386. Firstly ensure that the 4 byte-aligned dtrace_invop_callsite can be found and that it immediately follows the call to dtrace_invop(). Secondly, fix some pointer arithmetic to account for differences between struct i386_frame and illumos' struct frame. Finally, ensure that dtrace_getarg() isn't inlined. It works by following a fixed number of frame pointers to the probe site, so inlining breaks it. PR: 191260 Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h stable/10/sys/cddl/dev/dtrace/amd64/dtrace_isa.c stable/10/sys/cddl/dev/dtrace/i386/dtrace_asm.S stable/10/sys/cddl/dev/dtrace/i386/dtrace_isa.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h Tue Aug 5 01:53:14 2014 (r269556) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h Tue Aug 5 01:53:15 2014 (r269557) @@ -1270,7 +1270,11 @@ typedef struct dtrace_toxrange { uintptr_t dtt_limit; /* limit of toxic range */ } dtrace_toxrange_t; +#if defined(sun) extern uint64_t dtrace_getarg(int, int); +#else +extern uint64_t __noinline dtrace_getarg(int, int); +#endif extern greg_t dtrace_getfp(void); extern int dtrace_getipl(void); extern uintptr_t dtrace_caller(int); Modified: stable/10/sys/cddl/dev/dtrace/amd64/dtrace_isa.c ============================================================================== --- stable/10/sys/cddl/dev/dtrace/amd64/dtrace_isa.c Tue Aug 5 01:53:14 2014 (r269556) +++ stable/10/sys/cddl/dev/dtrace/amd64/dtrace_isa.c Tue Aug 5 01:53:15 2014 (r269557) @@ -349,7 +349,8 @@ dtrace_getarg(int arg, int aframes) for (i = 1; i <= aframes; i++) { fp = fp->f_frame; - if (fp->f_retaddr == (long)dtrace_invop_callsite) { + if (P2ROUNDUP(fp->f_retaddr, 16) == + (long)dtrace_invop_callsite) { /* * In the case of amd64, we will use the pointer to the * regs structure that was pushed when we took the @@ -363,33 +364,33 @@ dtrace_getarg(int arg, int aframes) * we're seeking is passed in regsiters, we can just * load it directly. */ - struct reg *rp = (struct reg *)((uintptr_t)&fp[1] + - sizeof (uintptr_t)); + struct trapframe *tf = + (struct trapframe *)((uintptr_t)&fp[1]); if (arg <= inreg) { switch (arg) { case 0: - stack = (uintptr_t *)&rp->r_rdi; + stack = (uintptr_t *)&tf->tf_rdi; break; case 1: - stack = (uintptr_t *)&rp->r_rsi; + stack = (uintptr_t *)&tf->tf_rsi; break; case 2: - stack = (uintptr_t *)&rp->r_rdx; + stack = (uintptr_t *)&tf->tf_rdx; break; case 3: - stack = (uintptr_t *)&rp->r_rcx; + stack = (uintptr_t *)&tf->tf_rcx; break; case 4: - stack = (uintptr_t *)&rp->r_r8; + stack = (uintptr_t *)&tf->tf_r8; break; case 5: - stack = (uintptr_t *)&rp->r_r9; + stack = (uintptr_t *)&tf->tf_r9; break; } arg = 0; } else { - stack = (uintptr_t *)(rp->r_rsp); + stack = (uintptr_t *)(tf->tf_rsp); arg -= inreg; } goto load; Modified: stable/10/sys/cddl/dev/dtrace/i386/dtrace_asm.S ============================================================================== --- stable/10/sys/cddl/dev/dtrace/i386/dtrace_asm.S Tue Aug 5 01:53:14 2014 (r269556) +++ stable/10/sys/cddl/dev/dtrace/i386/dtrace_asm.S Tue Aug 5 01:53:15 2014 (r269557) @@ -49,14 +49,8 @@ * dtrace_invop wants us to do. */ call dtrace_invop - - /* - * We pushed 3 times for the arguments to dtrace_invop, - * so we need to increment the stack pointer to get rid of - * those values. - */ - addl $12, %esp ALTENTRY(dtrace_invop_callsite) + addl $12, %esp cmpl $DTRACE_INVOP_PUSHL_EBP, %eax je invop_push cmpl $DTRACE_INVOP_POPL_EBP, %eax Modified: stable/10/sys/cddl/dev/dtrace/i386/dtrace_isa.c ============================================================================== --- stable/10/sys/cddl/dev/dtrace/i386/dtrace_isa.c Tue Aug 5 01:53:14 2014 (r269556) +++ stable/10/sys/cddl/dev/dtrace/i386/dtrace_isa.c Tue Aug 5 01:53:15 2014 (r269557) @@ -413,7 +413,8 @@ dtrace_getarg(int arg, int aframes) for (i = 1; i <= aframes; i++) { fp = fp->f_frame; - if (fp->f_retaddr == (long)dtrace_invop_callsite) { + if (P2ROUNDUP(fp->f_retaddr, 4) == + (long)dtrace_invop_callsite) { /* * If we pass through the invalid op handler, we will * use the pointer that it passed to the stack as the @@ -422,7 +423,7 @@ dtrace_getarg(int arg, int aframes) * beyond the EIP/RIP that was pushed when the trap was * taken -- hence the "+ 1" below. */ - stack = ((uintptr_t **)&fp[1])[1] + 1; + stack = ((uintptr_t **)&fp[1])[0] + 1; goto load; } @@ -438,7 +439,7 @@ dtrace_getarg(int arg, int aframes) */ arg++; - stack = (uintptr_t *)&fp[1]; + stack = (uintptr_t *)fp + 2; load: DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT); From kib at FreeBSD.org Tue Aug 5 05:00:23 2014 From: kib at FreeBSD.org (Konstantin Belousov) Date: Tue, 5 Aug 2014 05:00:23 +0000 (UTC) Subject: svn commit: r269562 - stable/10/sys/kern Message-ID: <53e064e7.5bd5.5e1952a4@svn.freebsd.org> Author: kib Date: Tue Aug 5 05:00:22 2014 New Revision: 269562 URL: http://svnweb.freebsd.org/changeset/base/269562 Log: MFC r269244: Remove one-time use macros which check for the vnode lifecycle. Modified: stable/10/sys/kern/vfs_subr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/vfs_subr.c ============================================================================== --- stable/10/sys/kern/vfs_subr.c Tue Aug 5 02:22:58 2014 (r269561) +++ stable/10/sys/kern/vfs_subr.c Tue Aug 5 05:00:22 2014 (r269562) @@ -275,14 +275,6 @@ static int vnlru_nowhere; SYSCTL_INT(_debug, OID_AUTO, vnlru_nowhere, CTLFLAG_RW, &vnlru_nowhere, 0, "Number of times the vnlru process ran without success"); -/* - * Macros to control when a vnode is freed and recycled. All require - * the vnode interlock. - */ -#define VCANRECYCLE(vp) (((vp)->v_iflag & VI_FREE) && !(vp)->v_holdcnt) -#define VSHOULDFREE(vp) (!((vp)->v_iflag & VI_FREE) && !(vp)->v_holdcnt) -#define VSHOULDBUSY(vp) (((vp)->v_iflag & VI_FREE) && (vp)->v_holdcnt) - /* Shift count for (uintptr_t)vp to initialize vp->v_hash. */ static int vnsz2log; @@ -849,11 +841,21 @@ vnlru_free(int count) TAILQ_INSERT_TAIL(&vnode_free_list, vp, v_actfreelist); continue; } - VNASSERT(VCANRECYCLE(vp), vp, - ("vp inconsistent on freelist")); + VNASSERT((vp->v_iflag & VI_FREE) != 0 && vp->v_holdcnt == 0, + vp, ("vp inconsistent on freelist")); + + /* + * The clear of VI_FREE prevents activation of the + * vnode. There is no sense in putting the vnode on + * the mount point active list, only to remove it + * later during recycling. Inline the relevant part + * of vholdl(), to avoid triggering assertions or + * activating. + */ freevnodes--; vp->v_iflag &= ~VI_FREE; - vholdl(vp); + vp->v_holdcnt++; + mtx_unlock(&vnode_free_list_mtx); VI_UNLOCK(vp); vtryrecycle(vp); @@ -2042,13 +2044,13 @@ v_incr_usecount(struct vnode *vp) { CTR2(KTR_VFS, "%s: vp %p", __func__, vp); + vholdl(vp); vp->v_usecount++; if (vp->v_type == VCHR && vp->v_rdev != NULL) { dev_lock(); vp->v_rdev->si_usecount++; dev_unlock(); } - vholdl(vp); } /* @@ -2325,11 +2327,18 @@ vholdl(struct vnode *vp) struct mount *mp; CTR2(KTR_VFS, "%s: vp %p", __func__, vp); +#ifdef INVARIANTS + /* getnewvnode() calls v_incr_usecount() without holding interlock. */ + if (vp->v_type != VNON || vp->v_data != NULL) { + ASSERT_VI_LOCKED(vp, "vholdl"); + VNASSERT(vp->v_holdcnt > 0 || (vp->v_iflag & VI_FREE) != 0, + vp, ("vholdl: free vnode is held")); + } +#endif vp->v_holdcnt++; - if (!VSHOULDBUSY(vp)) + if ((vp->v_iflag & VI_FREE) == 0) return; - ASSERT_VI_LOCKED(vp, "vholdl"); - VNASSERT((vp->v_iflag & VI_FREE) != 0, vp, ("vnode not free")); + VNASSERT(vp->v_holdcnt == 1, vp, ("vholdl: wrong hold count")); VNASSERT(vp->v_op != NULL, vp, ("vholdl: vnode already reclaimed.")); /* * Remove a vnode from the free list, mark it as in use, @@ -2390,7 +2399,7 @@ vdropl(struct vnode *vp) ("vdropl: vnode already reclaimed.")); VNASSERT((vp->v_iflag & VI_FREE) == 0, vp, ("vnode already free")); - VNASSERT(VSHOULDFREE(vp), vp, + VNASSERT(vp->v_holdcnt == 0, vp, ("vdropl: freeing when we shouldn't")); active = vp->v_iflag & VI_ACTIVE; vp->v_iflag &= ~VI_ACTIVE; From mav at FreeBSD.org Tue Aug 5 08:28:30 2014 From: mav at FreeBSD.org (Alexander Motin) Date: Tue, 5 Aug 2014 08:28:29 +0000 (UTC) Subject: svn commit: r269570 - stable/10/sys/cam/ctl Message-ID: <53e095ad.5b18.472a9734@svn.freebsd.org> Author: mav Date: Tue Aug 5 08:28:29 2014 New Revision: 269570 URL: http://svnweb.freebsd.org/changeset/base/269570 Log: MFC r269441: Add missing comparisons to make list IDs in EXTENDED COPY per-initiator, as they should be. Wrap it into a function to not duplicate the code. Modified: stable/10/sys/cam/ctl/ctl_tpc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_tpc.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_tpc.c Tue Aug 5 08:24:41 2014 (r269569) +++ stable/10/sys/cam/ctl/ctl_tpc.c Tue Aug 5 08:28:29 2014 (r269570) @@ -327,6 +327,21 @@ ctl_receive_copy_operating_parameters(st return (retval); } +static struct tpc_list * +tpc_find_list(struct ctl_lun *lun, uint32_t list_id, uint32_t init_idx) +{ + struct tpc_list *list; + + mtx_assert(&lun->lun_lock, MA_OWNED); + TAILQ_FOREACH(list, &lun->tpc_lists, links) { + if ((list->flags & EC_LIST_ID_USAGE_MASK) != + EC_LIST_ID_USAGE_NONE && list->list_id == list_id && + list->init_idx == init_idx) + break; + } + return (list); +} + int ctl_receive_copy_status_lid1(struct ctl_scsiio *ctsio) { @@ -348,11 +363,8 @@ ctl_receive_copy_status_lid1(struct ctl_ list_id = cdb->list_identifier; mtx_lock(&lun->lun_lock); - TAILQ_FOREACH(list, &lun->tpc_lists, links) { - if ((list->flags & EC_LIST_ID_USAGE_MASK) != - EC_LIST_ID_USAGE_NONE && list->list_id == list_id) - break; - } + list = tpc_find_list(lun, list_id, + ctl_get_resindex(&ctsio->io_hdr.nexus)); if (list == NULL) { mtx_unlock(&lun->lun_lock); ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, @@ -433,12 +445,9 @@ ctl_receive_copy_failure_details(struct list_id = cdb->list_identifier; mtx_lock(&lun->lun_lock); - TAILQ_FOREACH(list, &lun->tpc_lists, links) { - if (list->completed && (list->flags & EC_LIST_ID_USAGE_MASK) != - EC_LIST_ID_USAGE_NONE && list->list_id == list_id) - break; - } - if (list == NULL) { + list = tpc_find_list(lun, list_id, + ctl_get_resindex(&ctsio->io_hdr.nexus)); + if (list == NULL || !list->completed) { mtx_unlock(&lun->lun_lock); ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, /*command*/ 1, /*field*/ 2, /*bit_valid*/ 0, @@ -507,11 +516,8 @@ ctl_receive_copy_status_lid4(struct ctl_ list_id = scsi_4btoul(cdb->list_identifier); mtx_lock(&lun->lun_lock); - TAILQ_FOREACH(list, &lun->tpc_lists, links) { - if ((list->flags & EC_LIST_ID_USAGE_MASK) != - EC_LIST_ID_USAGE_NONE && list->list_id == list_id) - break; - } + list = tpc_find_list(lun, list_id, + ctl_get_resindex(&ctsio->io_hdr.nexus)); if (list == NULL) { mtx_unlock(&lun->lun_lock); ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, @@ -596,11 +602,8 @@ ctl_copy_operation_abort(struct ctl_scsi list_id = scsi_4btoul(cdb->list_identifier); mtx_lock(&lun->lun_lock); - TAILQ_FOREACH(list, &lun->tpc_lists, links) { - if ((list->flags & EC_LIST_ID_USAGE_MASK) != - EC_LIST_ID_USAGE_NONE && list->list_id == list_id) - break; - } + list = tpc_find_list(lun, list_id, + ctl_get_resindex(&ctsio->io_hdr.nexus)); if (list == NULL) { mtx_unlock(&lun->lun_lock); ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, @@ -1210,12 +1213,7 @@ ctl_extended_copy_lid1(struct ctl_scsiio list->lun = lun; mtx_lock(&lun->lun_lock); if ((list->flags & EC_LIST_ID_USAGE_MASK) != EC_LIST_ID_USAGE_NONE) { - TAILQ_FOREACH(tlist, &lun->tpc_lists, links) { - if ((tlist->flags & EC_LIST_ID_USAGE_MASK) != - EC_LIST_ID_USAGE_NONE && - tlist->list_id == list->list_id) - break; - } + tlist = tpc_find_list(lun, list->list_id, list->init_idx); if (tlist != NULL && !tlist->completed) { mtx_unlock(&lun->lun_lock); free(list, M_CTL); @@ -1338,12 +1336,7 @@ ctl_extended_copy_lid4(struct ctl_scsiio list->lun = lun; mtx_lock(&lun->lun_lock); if ((list->flags & EC_LIST_ID_USAGE_MASK) != EC_LIST_ID_USAGE_NONE) { - TAILQ_FOREACH(tlist, &lun->tpc_lists, links) { - if ((tlist->flags & EC_LIST_ID_USAGE_MASK) != - EC_LIST_ID_USAGE_NONE && - tlist->list_id == list->list_id) - break; - } + tlist = tpc_find_list(lun, list->list_id, list->init_idx); if (tlist != NULL && !tlist->completed) { mtx_unlock(&lun->lun_lock); free(list, M_CTL); From mav at FreeBSD.org Tue Aug 5 08:29:25 2014 From: mav at FreeBSD.org (Alexander Motin) Date: Tue, 5 Aug 2014 08:29:25 +0000 (UTC) Subject: svn commit: r269572 - stable/10/sys/cam/ctl Message-ID: <53e095e5.5b4d.4e7bec02@svn.freebsd.org> Author: mav Date: Tue Aug 5 08:29:24 2014 New Revision: 269572 URL: http://svnweb.freebsd.org/changeset/base/269572 Log: MFC r269442: Fix some bugs in RECEIVE COPY STATUS data. Modified: stable/10/sys/cam/ctl/ctl_tpc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_tpc.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_tpc.c Tue Aug 5 08:29:16 2014 (r269571) +++ stable/10/sys/cam/ctl/ctl_tpc.c Tue Aug 5 08:29:24 2014 (r269572) @@ -481,7 +481,8 @@ ctl_receive_copy_failure_details(struct data = (struct scsi_receive_copy_failure_details_data *)ctsio->kern_data_ptr; if (list_copy.completed && (list_copy.error || list_copy.abort)) { - scsi_ulto4b(sizeof(*data) - 4, data->available_data); + scsi_ulto4b(sizeof(*data) - 4 + list_copy.sense_len, + data->available_data); data->copy_command_status = RCS_CCS_ERROR; } else scsi_ulto4b(0, data->available_data); @@ -553,7 +554,8 @@ ctl_receive_copy_status_lid4(struct ctl_ ctsio->kern_rel_offset = 0; data = (struct scsi_receive_copy_status_lid4_data *)ctsio->kern_data_ptr; - scsi_ulto4b(sizeof(*data) - 4, data->available_data); + scsi_ulto4b(sizeof(*data) - 4 + list_copy.sense_len, + data->available_data); data->response_to_service_action = list_copy.service_action; if (list_copy.completed) { if (list_copy.error) @@ -566,14 +568,10 @@ ctl_receive_copy_status_lid4(struct ctl_ data->copy_command_status = RCS_CCS_INPROG_FG; scsi_ulto2b(list_copy.curops, data->operation_counter); scsi_ulto4b(UINT32_MAX, data->estimated_status_update_delay); - if (list_copy.curbytes <= UINT32_MAX) { - data->transfer_count_units = RCS_TC_BYTES; - scsi_ulto4b(list_copy.curbytes, data->transfer_count); - } else { - data->transfer_count_units = RCS_TC_MBYTES; - scsi_ulto4b(list_copy.curbytes >> 20, data->transfer_count); - } + data->transfer_count_units = RCS_TC_BYTES; + scsi_u64to8b(list_copy.curbytes, data->transfer_count); scsi_ulto2b(list_copy.curseg, data->segments_processed); + data->length_of_the_sense_data_field = list_copy.sense_len; data->sense_data_length = list_copy.sense_len; memcpy(data->sense_data, &list_copy.sense_data, list_copy.sense_len); From mav at FreeBSD.org Tue Aug 5 08:30:39 2014 From: mav at FreeBSD.org (Alexander Motin) Date: Tue, 5 Aug 2014 08:30:38 +0000 (UTC) Subject: svn commit: r269574 - stable/10/sys/cam/ctl Message-ID: <53e0962e.5b7c.280d32bd@svn.freebsd.org> Author: mav Date: Tue Aug 5 08:30:38 2014 New Revision: 269574 URL: http://svnweb.freebsd.org/changeset/base/269574 Log: MFC r269444, r269450: Plug EXTENDED COPY request data memory leak. Modified: stable/10/sys/cam/ctl/ctl_tpc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_tpc.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_tpc.c Tue Aug 5 08:30:07 2014 (r269573) +++ stable/10/sys/cam/ctl/ctl_tpc.c Tue Aug 5 08:30:38 2014 (r269574) @@ -942,6 +942,8 @@ tpc_process(struct tpc_list *list) done: //printf("ZZZ done\n"); + free(list->params, M_CTL); + list->params = NULL; mtx_lock(&lun->lun_lock); if ((list->flags & EC_LIST_ID_USAGE_MASK) == EC_LIST_ID_USAGE_NONE) { TAILQ_REMOVE(&lun->tpc_lists, list, links); From gavin at FreeBSD.org Tue Aug 5 13:12:09 2014 From: gavin at FreeBSD.org (Gavin Atkinson) Date: Tue, 5 Aug 2014 14:12:00 +0100 (BST) Subject: svn commit: r269490 - stable/10/sys/kern In-Reply-To: <53debee3.5327.470761ac@svn.freebsd.org> References: <53debee3.5327.470761ac@svn.freebsd.org> Message-ID: On Sun, 3 Aug 2014, Peter Wemm wrote: > Author: peter > Date: Sun Aug 3 22:59:47 2014 > New Revision: 269490 > URL: http://svnweb.freebsd.org/changeset/base/269490 > > Log: > Insta-MFC r269489: partial revert of r262867 which was MFC'ed as r263820. > Don't ignore sndbuf/rcvbuf limits for SOCK_DGRAM sockets. This appears > to be an edit error or patch fuzz mismatch. It looks like the original commit was also merged to stable/9 as r263823, though with an incorrect commit message. It made it into 9.3-RELEASE, I I would say that this is an EN candidate. Gavin > Modified: > stable/10/sys/kern/uipc_usrreq.c > > Modified: stable/10/sys/kern/uipc_usrreq.c > ============================================================================== > --- stable/10/sys/kern/uipc_usrreq.c Sun Aug 3 22:37:21 2014 (r269489) > +++ stable/10/sys/kern/uipc_usrreq.c Sun Aug 3 22:59:47 2014 (r269490) > @@ -897,7 +897,7 @@ uipc_send(struct socket *so, int flags, > from = &sun_noname; > so2 = unp2->unp_socket; > SOCKBUF_LOCK(&so2->so_rcv); > - if (sbappendaddr_nospacecheck_locked(&so2->so_rcv, from, m, > + if (sbappendaddr_locked(&so2->so_rcv, from, m, > control)) { > sorwakeup_locked(so2); > m = NULL; From marius at FreeBSD.org Tue Aug 5 16:04:23 2014 From: marius at FreeBSD.org (Marius Strobl) Date: Tue, 5 Aug 2014 16:04:23 +0000 (UTC) Subject: svn commit: r269592 - stable/10/sys/x86/x86 Message-ID: <53e10087.50f5.513fc4d7@svn.freebsd.org> Author: marius Date: Tue Aug 5 16:04:22 2014 New Revision: 269592 URL: http://svnweb.freebsd.org/changeset/base/269592 Log: MFC: r260457 The changes in r233781 attempted to make logging during a machine check exception more readable. In practice they prevented all logging during a machine check exception on at least some systems. Specifically, when an uncorrected ECC error is detected in a DIMM on a Nehalem/Westmere class machine, all CPUs receive a machine check exception, but only CPUs on the same package as the memory controller for the erroring DIMM log an error. The CPUs on the other package would complete the scan of their machine check banks and panic before the first set of CPUs could log an error. The end result was a clearer display during the panic (no interleaved messages), but a crashdump without any useful info about the error that occurred. To handle this case, make all CPUs spin in the machine check handler once they have completed their scan of their machine check banks until at least one machine check error is logged. I tried using a DELAY() instead so that the CPUs would not potentially hang forever, but that was not reliable in testing. While here, don't clear MCIP from MSR_MCG_STATUS before invoking panic. Only clear it if the machine check handler does not panic and returns to the interrupted thread. MFC: r263113 Correct type for malloc(). Submitted by: "Conrad Meyer" MFC: r269052, r269239, r269242 Intel desktop Haswell CPUs may report benign corrected parity errors (see HSD131 erratum in [1]) at a considerable rate. So filter these (default), unless logging is enabled. Unfortunately, there really is no better way to reasonably implement suppressing these errors than to just skipping them in mca_log(). Given that they are reported for bank 0, they'd need to be masked in MSR_MC0_CTL. However, P6 family processors require that register to be set to either all 0s or all 1s, disabling way more than the one error in question when using all 0s there. Alternatively, it could be masked for the corresponding CMCI, but that still wouldn't keep the periodic scanner from detecting these spurious errors. Apart from that, register contents of MSR_MC0_CTL{,2} don't seem to be publicly documented, neither in the Intel Architectures Developer's Manual nor in the Haswell datasheets. Note that while HSD131 actually is only about C0-stepping as of revision 014 of the Intel desktop 4th generation processor family specification update, these corrected errors also have been observed with D0-stepping aka "Haswell Refresh". 1: http://www.intel.de/content/dam/www/public/us/en/documents/specification-updates/4th-gen-core-family-desktop-specification-update.pdf Reviewed by: jhb Sponsored by: Bally Wulff Games & Entertainment GmbH Modified: stable/10/sys/x86/x86/mca.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/x86/mca.c ============================================================================== --- stable/10/sys/x86/x86/mca.c Tue Aug 5 15:17:57 2014 (r269591) +++ stable/10/sys/x86/x86/mca.c Tue Aug 5 16:04:22 2014 (r269592) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -84,7 +85,7 @@ struct mca_internal { static MALLOC_DEFINE(M_MCA, "MCA", "Machine Check Architecture"); -static int mca_count; /* Number of records stored. */ +static volatile int mca_count; /* Number of records stored. */ static int mca_banks; /* Number of per-CPU register banks. */ static SYSCTL_NODE(_hw, OID_AUTO, mca, CTLFLAG_RD, NULL, @@ -100,6 +101,11 @@ TUNABLE_INT("hw.mca.amd10h_L1TP", &amd10 SYSCTL_INT(_hw_mca, OID_AUTO, amd10h_L1TP, CTLFLAG_RDTUN, &amd10h_L1TP, 0, "Administrative toggle for logging of level one TLB parity (L1TP) errors"); +static int intel6h_HSD131; +TUNABLE_INT("hw.mca.intel6h_hsd131", &intel6h_HSD131); +SYSCTL_INT(_hw_mca, OID_AUTO, intel6h_HSD131, CTLFLAG_RDTUN, &intel6h_HSD131, 0, + "Administrative toggle for logging of spurious corrected errors"); + int workaround_erratum383; SYSCTL_INT(_hw_mca, OID_AUTO, erratum383, CTLFLAG_RD, &workaround_erratum383, 0, "Is the workaround for Erratum 383 on AMD Family 10h processors enabled?"); @@ -243,12 +249,34 @@ mca_error_mmtype(uint16_t mca_error) return ("???"); } +static int __nonnull(1) +mca_mute(const struct mca_record *rec) +{ + + /* + * Skip spurious corrected parity errors generated by desktop Haswell + * (see HSD131 erratum) unless reporting is enabled. + * Note that these errors also have been observed with D0-stepping, + * while the revision 014 desktop Haswell specification update only + * talks about C0-stepping. + */ + if (rec->mr_cpu_vendor_id == CPU_VENDOR_INTEL && + rec->mr_cpu_id == 0x306c3 && rec->mr_bank == 0 && + rec->mr_status == 0x90000040000f0005 && !intel6h_HSD131) + return (1); + + return (0); +} + /* Dump details about a single machine check. */ static void __nonnull(1) mca_log(const struct mca_record *rec) { uint16_t mca_error; + if (mca_mute(rec)) + return; + printf("MCA: Bank %d, Status 0x%016llx\n", rec->mr_bank, (long long)rec->mr_status); printf("MCA: Global Cap 0x%016llx, Status 0x%016llx\n", @@ -699,8 +727,8 @@ cmci_setup(void) { int i; - cmc_state = malloc((mp_maxid + 1) * sizeof(struct cmc_state **), - M_MCA, M_WAITOK); + cmc_state = malloc((mp_maxid + 1) * sizeof(struct cmc_state *), M_MCA, + M_WAITOK); for (i = 0; i <= mp_maxid; i++) cmc_state[i] = malloc(sizeof(struct cmc_state) * mca_banks, M_MCA, M_WAITOK | M_ZERO); @@ -733,7 +761,8 @@ mca_setup(uint64_t mcg_cap) TASK_INIT(&mca_refill_task, 0, mca_refill, NULL); mca_fill_freelist(); SYSCTL_ADD_INT(NULL, SYSCTL_STATIC_CHILDREN(_hw_mca), OID_AUTO, - "count", CTLFLAG_RD, &mca_count, 0, "Record count"); + "count", CTLFLAG_RD, (int *)(uintptr_t)&mca_count, 0, + "Record count"); SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_mca), OID_AUTO, "interval", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, &mca_ticks, 0, sysctl_positive_int, "I", @@ -939,7 +968,7 @@ void mca_intr(void) { uint64_t mcg_status; - int recoverable; + int old_count, recoverable; if (!(cpu_feature & CPUID_MCA)) { /* @@ -953,15 +982,27 @@ mca_intr(void) } /* Scan the banks and check for any non-recoverable errors. */ + old_count = mca_count; recoverable = mca_scan(MCE); mcg_status = rdmsr(MSR_MCG_STATUS); if (!(mcg_status & MCG_STATUS_RIPV)) recoverable = 0; + if (!recoverable) { + /* + * Wait for at least one error to be logged before + * panic'ing. Some errors will assert a machine check + * on all CPUs, but only certain CPUs will find a valid + * bank to log. + */ + while (mca_count == old_count) + cpu_spinwait(); + + panic("Unrecoverable machine check exception"); + } + /* Clear MCIP. */ wrmsr(MSR_MCG_STATUS, mcg_status & ~MCG_STATUS_MCIP); - if (!recoverable) - panic("Unrecoverable machine check exception"); } #ifdef DEV_APIC From marius at FreeBSD.org Tue Aug 5 16:30:13 2014 From: marius at FreeBSD.org (Marius Strobl) Date: Tue, 5 Aug 2014 16:30:13 +0000 (UTC) Subject: svn commit: r269593 - stable/9/sys/x86/x86 Message-ID: <53e10695.5c73.3129f311@svn.freebsd.org> Author: marius Date: Tue Aug 5 16:30:13 2014 New Revision: 269593 URL: http://svnweb.freebsd.org/changeset/base/269593 Log: MFC: r260457 The changes in r233781 (MFCed to stable/9 in r235515) attempted to make logging during a machine check exception more readable. In practice they prevented all logging during a machine check exception on at least some systems. Specifically, when an uncorrected ECC error is detected in a DIMM on a Nehalem/Westmere class machine, all CPUs receive a machine check exception, but only CPUs on the same package as the memory controller for the erroring DIMM log an error. The CPUs on the other package would complete the scan of their machine check banks and panic before the first set of CPUs could log an error. The end result was a clearer display during the panic (no interleaved messages), but a crashdump without any useful info about the error that occurred. To handle this case, make all CPUs spin in the machine check handler once they have completed their scan of their machine check banks until at least one machine check error is logged. I tried using a DELAY() instead so that the CPUs would not potentially hang forever, but that was not reliable in testing. While here, don't clear MCIP from MSR_MCG_STATUS before invoking panic. Only clear it if the machine check handler does not panic and returns to the interrupted thread. MFC: r263113 Correct type for malloc(). Submitted by: "Conrad Meyer" MFC: r269052, r269239, r269242 Intel desktop Haswell CPUs may report benign corrected parity errors (see HSD131 erratum in [1]) at a considerable rate. So filter these (default), unless logging is enabled. Unfortunately, there really is no better way to reasonably implement suppressing these errors than to just skipping them in mca_log(). Given that they are reported for bank 0, they'd need to be masked in MSR_MC0_CTL. However, P6 family processors require that register to be set to either all 0s or all 1s, disabling way more than the one error in question when using all 0s there. Alternatively, it could be masked for the corresponding CMCI, but that still wouldn't keep the periodic scanner from detecting these spurious errors. Apart from that, register contents of MSR_MC0_CTL{,2} don't seem to be publicly documented, neither in the Intel Architectures Developer's Manual nor in the Haswell datasheets. Note that while HSD131 actually is only about C0-stepping as of revision 014 of the Intel desktop 4th generation processor family specification update, these corrected errors also have been observed with D0-stepping aka "Haswell Refresh". 1: http://www.intel.de/content/dam/www/public/us/en/documents/specification-updates/4th-gen-core-family-desktop-specification-update.pdf Reviewed by: jhb Sponsored by: Bally Wulff Games & Entertainment GmbH Modified: stable/9/sys/x86/x86/mca.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/x86/x86/mca.c ============================================================================== --- stable/9/sys/x86/x86/mca.c Tue Aug 5 16:04:22 2014 (r269592) +++ stable/9/sys/x86/x86/mca.c Tue Aug 5 16:30:13 2014 (r269593) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -84,7 +85,7 @@ struct mca_internal { static MALLOC_DEFINE(M_MCA, "MCA", "Machine Check Architecture"); -static int mca_count; /* Number of records stored. */ +static volatile int mca_count; /* Number of records stored. */ static int mca_banks; /* Number of per-CPU register banks. */ static SYSCTL_NODE(_hw, OID_AUTO, mca, CTLFLAG_RD, NULL, @@ -100,6 +101,11 @@ TUNABLE_INT("hw.mca.amd10h_L1TP", &amd10 SYSCTL_INT(_hw_mca, OID_AUTO, amd10h_L1TP, CTLFLAG_RDTUN, &amd10h_L1TP, 0, "Administrative toggle for logging of level one TLB parity (L1TP) errors"); +static int intel6h_HSD131; +TUNABLE_INT("hw.mca.intel6h_hsd131", &intel6h_HSD131); +SYSCTL_INT(_hw_mca, OID_AUTO, intel6h_HSD131, CTLFLAG_RDTUN, &intel6h_HSD131, 0, + "Administrative toggle for logging of spurious corrected errors"); + int workaround_erratum383; SYSCTL_INT(_hw_mca, OID_AUTO, erratum383, CTLFLAG_RD, &workaround_erratum383, 0, "Is the workaround for Erratum 383 on AMD Family 10h processors enabled?"); @@ -243,12 +249,34 @@ mca_error_mmtype(uint16_t mca_error) return ("???"); } +static int __nonnull(1) +mca_mute(const struct mca_record *rec) +{ + + /* + * Skip spurious corrected parity errors generated by desktop Haswell + * (see HSD131 erratum) unless reporting is enabled. + * Note that these errors also have been observed with D0-stepping, + * while the revision 014 desktop Haswell specification update only + * talks about C0-stepping. + */ + if (rec->mr_cpu_vendor_id == CPU_VENDOR_INTEL && + rec->mr_cpu_id == 0x306c3 && rec->mr_bank == 0 && + rec->mr_status == 0x90000040000f0005 && !intel6h_HSD131) + return (1); + + return (0); +} + /* Dump details about a single machine check. */ static void __nonnull(1) mca_log(const struct mca_record *rec) { uint16_t mca_error; + if (mca_mute(rec)) + return; + printf("MCA: Bank %d, Status 0x%016llx\n", rec->mr_bank, (long long)rec->mr_status); printf("MCA: Global Cap 0x%016llx, Status 0x%016llx\n", @@ -699,8 +727,8 @@ cmci_setup(void) { int i; - cmc_state = malloc((mp_maxid + 1) * sizeof(struct cmc_state **), - M_MCA, M_WAITOK); + cmc_state = malloc((mp_maxid + 1) * sizeof(struct cmc_state *), M_MCA, + M_WAITOK); for (i = 0; i <= mp_maxid; i++) cmc_state[i] = malloc(sizeof(struct cmc_state) * mca_banks, M_MCA, M_WAITOK | M_ZERO); @@ -733,7 +761,8 @@ mca_setup(uint64_t mcg_cap) TASK_INIT(&mca_refill_task, 0, mca_refill, NULL); mca_fill_freelist(); SYSCTL_ADD_INT(NULL, SYSCTL_STATIC_CHILDREN(_hw_mca), OID_AUTO, - "count", CTLFLAG_RD, &mca_count, 0, "Record count"); + "count", CTLFLAG_RD, (int *)(uintptr_t)&mca_count, 0, + "Record count"); SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_mca), OID_AUTO, "interval", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, &mca_ticks, 0, sysctl_positive_int, "I", @@ -939,7 +968,7 @@ void mca_intr(void) { uint64_t mcg_status; - int recoverable; + int old_count, recoverable; if (!(cpu_feature & CPUID_MCA)) { /* @@ -953,15 +982,27 @@ mca_intr(void) } /* Scan the banks and check for any non-recoverable errors. */ + old_count = mca_count; recoverable = mca_scan(MCE); mcg_status = rdmsr(MSR_MCG_STATUS); if (!(mcg_status & MCG_STATUS_RIPV)) recoverable = 0; + if (!recoverable) { + /* + * Wait for at least one error to be logged before + * panic'ing. Some errors will assert a machine check + * on all CPUs, but only certain CPUs will find a valid + * bank to log. + */ + while (mca_count == old_count) + cpu_spinwait(); + + panic("Unrecoverable machine check exception"); + } + /* Clear MCIP. */ wrmsr(MSR_MCG_STATUS, mcg_status & ~MCG_STATUS_MCIP); - if (!recoverable) - panic("Unrecoverable machine check exception"); } #ifdef DEV_APIC From marius at FreeBSD.org Tue Aug 5 16:44:28 2014 From: marius at FreeBSD.org (Marius Strobl) Date: Tue, 5 Aug 2014 16:44:28 +0000 (UTC) Subject: svn commit: r269595 - stable/8/sys/x86/x86 Message-ID: <53e109ec.504d.48cb877a@svn.freebsd.org> Author: marius Date: Tue Aug 5 16:44:27 2014 New Revision: 269595 URL: http://svnweb.freebsd.org/changeset/base/269595 Log: MFC: r260457 The changes in r233781 (MFCed to stable/8 in r235517) attempted to make logging during a machine check exception more readable. In practice they prevented all logging during a machine check exception on at least some systems. Specifically, when an uncorrected ECC error is detected in a DIMM on a Nehalem/Westmere class machine, all CPUs receive a machine check exception, but only CPUs on the same package as the memory controller for the erroring DIMM log an error. The CPUs on the other package would complete the scan of their machine check banks and panic before the first set of CPUs could log an error. The end result was a clearer display during the panic (no interleaved messages), but a crashdump without any useful info about the error that occurred. To handle this case, make all CPUs spin in the machine check handler once they have completed their scan of their machine check banks until at least one machine check error is logged. I tried using a DELAY() instead so that the CPUs would not potentially hang forever, but that was not reliable in testing. While here, don't clear MCIP from MSR_MCG_STATUS before invoking panic. Only clear it if the machine check handler does not panic and returns to the interrupted thread. MFC: r263113 Correct type for malloc(). Submitted by: "Conrad Meyer" MFC: r269052, r269239, r269242 Intel desktop Haswell CPUs may report benign corrected parity errors (see HSD131 erratum in [1]) at a considerable rate. So filter these (default), unless logging is enabled. Unfortunately, there really is no better way to reasonably implement suppressing these errors than to just skipping them in mca_log(). Given that they are reported for bank 0, they'd need to be masked in MSR_MC0_CTL. However, P6 family processors require that register to be set to either all 0s or all 1s, disabling way more than the one error in question when using all 0s there. Alternatively, it could be masked for the corresponding CMCI, but that still wouldn't keep the periodic scanner from detecting these spurious errors. Apart from that, register contents of MSR_MC0_CTL{,2} don't seem to be publicly documented, neither in the Intel Architectures Developer's Manual nor in the Haswell datasheets. Note that while HSD131 actually is only about C0-stepping as of revision 014 of the Intel desktop 4th generation processor family specification update, these corrected errors also have been observed with D0-stepping aka "Haswell Refresh". 1: http://www.intel.de/content/dam/www/public/us/en/documents/specification-updates/4th-gen-core-family-desktop-specification-update.pdf Reviewed by: jhb Sponsored by: Bally Wulff Games & Entertainment GmbH Modified: stable/8/sys/x86/x86/mca.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/x86/ (props changed) Modified: stable/8/sys/x86/x86/mca.c ============================================================================== --- stable/8/sys/x86/x86/mca.c Tue Aug 5 16:31:03 2014 (r269594) +++ stable/8/sys/x86/x86/mca.c Tue Aug 5 16:44:27 2014 (r269595) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -84,7 +85,7 @@ struct mca_internal { static MALLOC_DEFINE(M_MCA, "MCA", "Machine Check Architecture"); -static int mca_count; /* Number of records stored. */ +static volatile int mca_count; /* Number of records stored. */ static int mca_banks; /* Number of per-CPU register banks. */ SYSCTL_NODE(_hw, OID_AUTO, mca, CTLFLAG_RD, NULL, "Machine Check Architecture"); @@ -99,6 +100,11 @@ TUNABLE_INT("hw.mca.amd10h_L1TP", &amd10 SYSCTL_INT(_hw_mca, OID_AUTO, amd10h_L1TP, CTLFLAG_RDTUN, &amd10h_L1TP, 0, "Administrative toggle for logging of level one TLB parity (L1TP) errors"); +static int intel6h_HSD131; +TUNABLE_INT("hw.mca.intel6h_hsd131", &intel6h_HSD131); +SYSCTL_INT(_hw_mca, OID_AUTO, intel6h_HSD131, CTLFLAG_RDTUN, &intel6h_HSD131, 0, + "Administrative toggle for logging of spurious corrected errors"); + int workaround_erratum383; SYSCTL_INT(_hw_mca, OID_AUTO, erratum383, CTLFLAG_RD, &workaround_erratum383, 0, "Is the workaround for Erratum 383 on AMD Family 10h processors enabled?"); @@ -242,12 +248,34 @@ mca_error_mmtype(uint16_t mca_error) return ("???"); } +static int __nonnull(1) +mca_mute(const struct mca_record *rec) +{ + + /* + * Skip spurious corrected parity errors generated by desktop Haswell + * (see HSD131 erratum) unless reporting is enabled. + * Note that these errors also have been observed with D0-stepping, + * while the revision 014 desktop Haswell specification update only + * talks about C0-stepping. + */ + if (rec->mr_cpu_vendor_id == CPU_VENDOR_INTEL && + rec->mr_cpu_id == 0x306c3 && rec->mr_bank == 0 && + rec->mr_status == 0x90000040000f0005 && !intel6h_HSD131) + return (1); + + return (0); +} + /* Dump details about a single machine check. */ static void __nonnull(1) mca_log(const struct mca_record *rec) { uint16_t mca_error; + if (mca_mute(rec)) + return; + printf("MCA: Bank %d, Status 0x%016llx\n", rec->mr_bank, (long long)rec->mr_status); printf("MCA: Global Cap 0x%016llx, Status 0x%016llx\n", @@ -698,8 +726,8 @@ cmci_setup(void) { int i; - cmc_state = malloc((mp_maxid + 1) * sizeof(struct cmc_state **), - M_MCA, M_WAITOK); + cmc_state = malloc((mp_maxid + 1) * sizeof(struct cmc_state *), M_MCA, + M_WAITOK); for (i = 0; i <= mp_maxid; i++) cmc_state[i] = malloc(sizeof(struct cmc_state) * mca_banks, M_MCA, M_WAITOK | M_ZERO); @@ -732,7 +760,8 @@ mca_setup(uint64_t mcg_cap) TASK_INIT(&mca_refill_task, 0, mca_refill, NULL); mca_fill_freelist(); SYSCTL_ADD_INT(NULL, SYSCTL_STATIC_CHILDREN(_hw_mca), OID_AUTO, - "count", CTLFLAG_RD, &mca_count, 0, "Record count"); + "count", CTLFLAG_RD, (int *)(uintptr_t)&mca_count, 0, + "Record count"); SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_mca), OID_AUTO, "interval", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, &mca_ticks, 0, sysctl_positive_int, "I", @@ -938,7 +967,7 @@ void mca_intr(void) { uint64_t mcg_status; - int recoverable; + int old_count, recoverable; if (!(cpu_feature & CPUID_MCA)) { /* @@ -952,15 +981,27 @@ mca_intr(void) } /* Scan the banks and check for any non-recoverable errors. */ + old_count = mca_count; recoverable = mca_scan(MCE); mcg_status = rdmsr(MSR_MCG_STATUS); if (!(mcg_status & MCG_STATUS_RIPV)) recoverable = 0; + if (!recoverable) { + /* + * Wait for at least one error to be logged before + * panic'ing. Some errors will assert a machine check + * on all CPUs, but only certain CPUs will find a valid + * bank to log. + */ + while (mca_count == old_count) + cpu_spinwait(); + + panic("Unrecoverable machine check exception"); + } + /* Clear MCIP. */ wrmsr(MSR_MCG_STATUS, mcg_status & ~MCG_STATUS_MCIP); - if (!recoverable) - panic("Unrecoverable machine check exception"); } #ifdef DEV_APIC From emaste at FreeBSD.org Wed Aug 6 00:35:33 2014 From: emaste at FreeBSD.org (Ed Maste) Date: Wed, 6 Aug 2014 00:35:33 +0000 (UTC) Subject: svn commit: r269619 - stable/10/sys/sys Message-ID: <53e17855.50f3.3d930154@svn.freebsd.org> Author: emaste Date: Wed Aug 6 00:35:32 2014 New Revision: 269619 URL: http://svnweb.freebsd.org/changeset/base/269619 Log: MFC r269282: Correct typo in comment PR: 192231 Modified: stable/10/sys/sys/procdesc.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/procdesc.h ============================================================================== --- stable/10/sys/sys/procdesc.h Wed Aug 6 00:06:25 2014 (r269618) +++ stable/10/sys/sys/procdesc.h Wed Aug 6 00:35:32 2014 (r269619) @@ -47,7 +47,7 @@ * Locking key: * (c) - Constant after initial setup. * (p) - Protected by the process descriptor mutex. - * (r) - Atomic eference count. + * (r) - Atomic reference count. * (s) - Protected by selinfo. * (t) - Protected by the proctree_lock */ From ache at FreeBSD.org Wed Aug 6 10:33:44 2014 From: ache at FreeBSD.org (Andrey A. Chernov) Date: Wed, 6 Aug 2014 10:33:44 +0000 (UTC) Subject: svn commit: r269623 - stable/10/lib/libc/stdio Message-ID: <53e20488.5e05.1c8bf080@svn.freebsd.org> Author: ache Date: Wed Aug 6 10:33:43 2014 New Revision: 269623 URL: http://svnweb.freebsd.org/changeset/base/269623 Log: MFC: r268997 For "a"-mode files and rewind/fseek + fwrite combination return meaningful value now, like Apple does, but avoid their __sflush physical write performance degradation as much as possible. Modified: stable/10/lib/libc/stdio/ftell.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/stdio/ftell.c ============================================================================== --- stable/10/lib/libc/stdio/ftell.c Wed Aug 6 08:54:31 2014 (r269622) +++ stable/10/lib/libc/stdio/ftell.c Wed Aug 6 10:33:43 2014 (r269623) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include #include +#include #include #include #include "un-namespace.h" @@ -87,6 +88,7 @@ _ftello(FILE *fp, fpos_t *offset) { fpos_t pos; size_t n; + int dflags; if (fp->_seek == NULL) { errno = ESPIPE; /* historic practice */ @@ -118,6 +120,22 @@ _ftello(FILE *fp, fpos_t *offset) if (HASUB(fp)) pos -= fp->_r; /* Can be negative at this point. */ } else if ((fp->_flags & __SWR) && fp->_p != NULL) { + dflags = 0; + if (fp->_flags & __SAPP) + dflags = O_APPEND; + else if (fp->_file != -1 && + (dflags = _fcntl(fp->_file, F_GETFL)) < 0) + return (1); + if ((dflags & O_APPEND) && + (pos = _sseek(fp, (fpos_t)0, SEEK_END)) == -1) { + if ((fp->_flags & __SOPT) || __sflush(fp) || + (pos = _sseek(fp, (fpos_t)0, SEEK_CUR)) == -1) + return (1); + else { + *offset = pos; + return (0); + } + } /* * Writing. Any buffered characters cause the * position to be greater than that in the From ache at FreeBSD.org Wed Aug 6 10:38:07 2014 From: ache at FreeBSD.org (Andrey A. Chernov) Date: Wed, 6 Aug 2014 10:38:06 +0000 (UTC) Subject: svn commit: r269624 - stable/10/lib/libc/stdio Message-ID: <53e2058e.5e19.1980309a@svn.freebsd.org> Author: ache Date: Wed Aug 6 10:38:06 2014 New Revision: 269624 URL: http://svnweb.freebsd.org/changeset/base/269624 Log: MFC: r269116 In the "Too many open files" edge cases don't try to preserve old number for non-std* descriptors, but close old file and retry. Obtained from: inspired by Apple's change from pfg@ Modified: stable/10/lib/libc/stdio/freopen.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/stdio/freopen.c ============================================================================== --- stable/10/lib/libc/stdio/freopen.c Wed Aug 6 10:33:43 2014 (r269623) +++ stable/10/lib/libc/stdio/freopen.c Wed Aug 6 10:38:06 2014 (r269624) @@ -150,6 +150,14 @@ freopen(const char * __restrict file, co /* Get a new descriptor to refer to the new file. */ f = _open(file, oflags, DEFFILEMODE); + /* If out of fd's close the old one and try again. */ + if (f < 0 && isopen && wantfd > STDERR_FILENO && + (errno == ENFILE || errno == EMFILE)) { + (void) (*fp->_close)(fp->_cookie); + isopen = 0; + wantfd = -1; + f = _open(file, oflags, DEFFILEMODE); + } sverrno = errno; finish: From wblock at FreeBSD.org Wed Aug 6 17:38:36 2014 From: wblock at FreeBSD.org (Warren Block) Date: Wed, 6 Aug 2014 17:38:36 +0000 (UTC) Subject: svn commit: r269632 - stable/10/sbin/setkey Message-ID: <53e2681c.5ba7.2f2bb8ca@svn.freebsd.org> Author: wblock (doc committer) Date: Wed Aug 6 17:38:35 2014 New Revision: 269632 URL: http://svnweb.freebsd.org/changeset/base/269632 Log: MFC r269091: Fix spelling of Camellia algorithm. While here, replace blank lines between examples with actual .Pp breaks. Modified: stable/10/sbin/setkey/setkey.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/setkey/setkey.8 ============================================================================== --- stable/10/sbin/setkey/setkey.8 Wed Aug 6 17:02:19 2014 (r269631) +++ stable/10/sbin/setkey/setkey.8 Wed Aug 6 17:38:35 2014 (r269632) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 13, 2006 +.Dd July 25, 2014 .Dt SETKEY 8 .Os .\" @@ -514,7 +514,7 @@ the SA from the key exchange daemon. A value of .Li default tells the kernel to use the system wide default protocol -e.g.\& the one from the +e.g.,\& the one from the .Li esp_trans_deflev sysctl variable, when the kernel processes the packet. A value of @@ -627,7 +627,7 @@ des-deriv 64 ipsec-ciph-des-derived-01 3des-deriv 192 no document rijndael-cbc 128/192/256 rfc3602 aes-ctr 160/224/288 draft-ietf-ipsec-ciph-aes-ctr-03 -camllia-cbc 128/192/256 rfc4312 +camellia-cbc 128/192/256 rfc4312 .Ed .Pp Note that the first 128/192/256 bits of a key for @@ -656,47 +656,46 @@ des-cbc encryption algorithm. .Bd -literal -offset indent add 3ffe:501:4819::1 3ffe:501:481d::1 esp 123457 -E des-cbc 0x3ffe05014819ffff ; - +.Pp .Ed .\" Add an authentication SA between two FQDN specified hosts: .Bd -literal -offset indent add -6 myhost.example.com yourhost.example.com ah 123456 -A hmac-sha1 "AH SA configuration!" ; - +.Pp .Ed Use both ESP and AH between two numerically specified hosts: .Bd -literal -offset indent add 10.0.11.41 10.0.11.33 esp 0x10001 -E des-cbc 0x3ffe05014819ffff -A hmac-md5 "authentication!!" ; - +.Pp .Ed Get the SA information associated with first example above: .Bd -literal -offset indent get 3ffe:501:4819::1 3ffe:501:481d::1 ah 123456 ; - +.Pp .Ed Flush all entries from the database: .Bd -literal -offset indent flush ; - +.Pp .Ed Dump the ESP entries from the database: .Bd -literal -offset indent dump esp ; - +.Pp .Ed Add a security policy between two networks that uses ESP in tunnel mode: .Bd -literal -offset indent spdadd 10.0.11.41/32[21] 10.0.11.33/32[any] any -P out ipsec esp/tunnel/192.168.0.1-192.168.1.2/require ; - +.Pp .Ed Use TCP MD5 between two numerically specified hosts: .Bd -literal -offset indent add 10.1.10.34 10.1.10.36 tcp 0x1000 -A tcp-md5 "TCP-MD5 BGP secret" ; - .Ed .\" .Sh SEE ALSO From wblock at FreeBSD.org Wed Aug 6 17:40:12 2014 From: wblock at FreeBSD.org (Warren Block) Date: Wed, 6 Aug 2014 17:40:12 +0000 (UTC) Subject: svn commit: r269633 - stable/9/sbin/setkey Message-ID: <53e2687c.5bbe.6478ee63@svn.freebsd.org> Author: wblock (doc committer) Date: Wed Aug 6 17:40:11 2014 New Revision: 269633 URL: http://svnweb.freebsd.org/changeset/base/269633 Log: MFC r269091: Fix spelling of Camellia algorithm. While here, replace blank lines between examples with actual .Pp breaks. Modified: stable/9/sbin/setkey/setkey.8 Directory Properties: stable/9/sbin/setkey/ (props changed) Modified: stable/9/sbin/setkey/setkey.8 ============================================================================== --- stable/9/sbin/setkey/setkey.8 Wed Aug 6 17:38:35 2014 (r269632) +++ stable/9/sbin/setkey/setkey.8 Wed Aug 6 17:40:11 2014 (r269633) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 13, 2006 +.Dd July 25, 2014 .Dt SETKEY 8 .Os .\" @@ -514,7 +514,7 @@ the SA from the key exchange daemon. A value of .Li default tells the kernel to use the system wide default protocol -e.g.\& the one from the +e.g.,\& the one from the .Li esp_trans_deflev sysctl variable, when the kernel processes the packet. A value of @@ -626,7 +626,7 @@ des-deriv 64 ipsec-ciph-des-derived-01 3des-deriv 192 no document rijndael-cbc 128/192/256 rfc3602 aes-ctr 160/224/288 draft-ietf-ipsec-ciph-aes-ctr-03 -camllia-cbc 128/192/256 rfc4312 +camellia-cbc 128/192/256 rfc4312 .Ed .Pp Note that the first 128/192/256 bits of a key for @@ -655,47 +655,46 @@ des-cbc encryption algorithm. .Bd -literal -offset add 3ffe:501:4819::1 3ffe:501:481d::1 esp 123457 -E des-cbc 0x3ffe05014819ffff ; - +.Pp .Ed .\" Add an authentication SA between two FQDN specified hosts: .Bd -literal -offset add -6 myhost.example.com yourhost.example.com ah 123456 -A hmac-sha1 "AH SA configuration!" ; - +.Pp .Ed Use both ESP and AH between two numerically specified hosts: .Bd -literal -offset add 10.0.11.41 10.0.11.33 esp 0x10001 -E des-cbc 0x3ffe05014819ffff -A hmac-md5 "authentication!!" ; - +.Pp .Ed Get the SA information associated with first example above: .Bd -literal -offset get 3ffe:501:4819::1 3ffe:501:481d::1 ah 123456 ; - +.Pp .Ed Flush all entries from the database: .Bd -literal -offset flush ; - +.Pp .Ed Dump the ESP entries from the database: .Bd -literal -offset dump esp ; - +.Pp .Ed Add a security policy between two networks that uses ESP in tunnel mode: .Bd -literal -offset spdadd 10.0.11.41/32[21] 10.0.11.33/32[any] any -P out ipsec esp/tunnel/192.168.0.1-192.168.1.2/require ; - +.Pp .Ed Use TCP MD5 between two numerically specified hosts: .Bd -literal -offset add 10.1.10.34 10.1.10.36 tcp 0x1000 -A tcp-md5 "TCP-MD5 BGP secret" ; - .Ed .\" .Sh SEE ALSO From jfv at FreeBSD.org Wed Aug 6 22:15:02 2014 From: jfv at FreeBSD.org (Jack F Vogel) Date: Wed, 6 Aug 2014 22:15:01 +0000 (UTC) Subject: svn commit: r269647 - stable/9/sys/dev/e1000 Message-ID: <53e2a8e5.5308.70e442e7@svn.freebsd.org> Author: jfv Date: Wed Aug 6 22:15:01 2014 New Revision: 269647 URL: http://svnweb.freebsd.org/changeset/base/269647 Log: MFC of the r267935 - Shared code update - em driver support for i218 devices - igb brought up to the 2.4.0 level Modified: stable/9/sys/dev/e1000/e1000_80003es2lan.c stable/9/sys/dev/e1000/e1000_80003es2lan.h stable/9/sys/dev/e1000/e1000_82542.c stable/9/sys/dev/e1000/e1000_82571.c stable/9/sys/dev/e1000/e1000_82571.h stable/9/sys/dev/e1000/e1000_82575.c stable/9/sys/dev/e1000/e1000_82575.h stable/9/sys/dev/e1000/e1000_api.c stable/9/sys/dev/e1000/e1000_api.h stable/9/sys/dev/e1000/e1000_defines.h stable/9/sys/dev/e1000/e1000_hw.h stable/9/sys/dev/e1000/e1000_i210.c stable/9/sys/dev/e1000/e1000_i210.h stable/9/sys/dev/e1000/e1000_ich8lan.c stable/9/sys/dev/e1000/e1000_ich8lan.h stable/9/sys/dev/e1000/e1000_mac.c stable/9/sys/dev/e1000/e1000_mac.h stable/9/sys/dev/e1000/e1000_manage.c stable/9/sys/dev/e1000/e1000_mbx.c stable/9/sys/dev/e1000/e1000_mbx.h stable/9/sys/dev/e1000/e1000_nvm.c stable/9/sys/dev/e1000/e1000_osdep.h stable/9/sys/dev/e1000/e1000_phy.c stable/9/sys/dev/e1000/e1000_phy.h stable/9/sys/dev/e1000/e1000_regs.h stable/9/sys/dev/e1000/e1000_vf.c stable/9/sys/dev/e1000/e1000_vf.h stable/9/sys/dev/e1000/if_em.c stable/9/sys/dev/e1000/if_igb.c stable/9/sys/dev/e1000/if_igb.h Modified: stable/9/sys/dev/e1000/e1000_80003es2lan.c ============================================================================== --- stable/9/sys/dev/e1000/e1000_80003es2lan.c Wed Aug 6 21:27:15 2014 (r269646) +++ stable/9/sys/dev/e1000/e1000_80003es2lan.c Wed Aug 6 22:15:01 2014 (r269647) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2011, Intel Corporation + Copyright (c) 2001-2013, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -32,16 +32,12 @@ ******************************************************************************/ /*$FreeBSD$*/ -/* - * 80003ES2LAN Gigabit Ethernet Controller (Copper) +/* 80003ES2LAN Gigabit Ethernet Controller (Copper) * 80003ES2LAN Gigabit Ethernet Controller (Serdes) */ #include "e1000_api.h" -static s32 e1000_init_phy_params_80003es2lan(struct e1000_hw *hw); -static s32 e1000_init_nvm_params_80003es2lan(struct e1000_hw *hw); -static s32 e1000_init_mac_params_80003es2lan(struct e1000_hw *hw); static s32 e1000_acquire_phy_80003es2lan(struct e1000_hw *hw); static void e1000_release_phy_80003es2lan(struct e1000_hw *hw); static s32 e1000_acquire_nvm_80003es2lan(struct e1000_hw *hw); @@ -71,14 +67,12 @@ static s32 e1000_read_kmrn_reg_80003es2 u16 *data); static s32 e1000_write_kmrn_reg_80003es2lan(struct e1000_hw *hw, u32 offset, u16 data); -static s32 e1000_copper_link_setup_gg82563_80003es2lan(struct e1000_hw *hw); static void e1000_initialize_hw_bits_80003es2lan(struct e1000_hw *hw); static void e1000_release_swfw_sync_80003es2lan(struct e1000_hw *hw, u16 mask); static s32 e1000_read_mac_addr_80003es2lan(struct e1000_hw *hw); static void e1000_power_down_phy_copper_80003es2lan(struct e1000_hw *hw); -/* - * A table for the GG82563 cable length where the range is defined +/* A table for the GG82563 cable length where the range is defined * with a lower bound at "index" and the upper bound at * "index + 5". */ @@ -95,13 +89,13 @@ static const u16 e1000_gg82563_cable_len static s32 e1000_init_phy_params_80003es2lan(struct e1000_hw *hw) { struct e1000_phy_info *phy = &hw->phy; - s32 ret_val = E1000_SUCCESS; + s32 ret_val; DEBUGFUNC("e1000_init_phy_params_80003es2lan"); if (hw->phy.media_type != e1000_media_type_copper) { phy->type = e1000_phy_none; - goto out; + return E1000_SUCCESS; } else { phy->ops.power_up = e1000_power_up_phy_copper; phy->ops.power_down = e1000_power_down_phy_copper_80003es2lan; @@ -133,12 +127,9 @@ static s32 e1000_init_phy_params_80003es ret_val = e1000_get_phy_id(hw); /* Verify phy id */ - if (phy->id != GG82563_E_PHY_ID) { - ret_val = -E1000_ERR_PHY; - goto out; - } + if (phy->id != GG82563_E_PHY_ID) + return -E1000_ERR_PHY; -out: return ret_val; } @@ -176,8 +167,7 @@ static s32 e1000_init_nvm_params_80003es size = (u16)((eecd & E1000_EECD_SIZE_EX_MASK) >> E1000_EECD_SIZE_EX_SHIFT); - /* - * Added to a constant, "size" becomes the left-shift value + /* Added to a constant, "size" becomes the left-shift value * for setting word_size. */ size += NVM_WORD_SIZE_BASE_SHIFT; @@ -234,8 +224,8 @@ static s32 e1000_init_mac_params_80003es /* FWSM register */ mac->has_fwsm = TRUE; /* ARC supported; valid only if manageability features are enabled. */ - mac->arc_subsystem_valid = (E1000_READ_REG(hw, E1000_FWSM) & - E1000_FWSM_MODE_MASK) ? TRUE : FALSE; + mac->arc_subsystem_valid = !!(E1000_READ_REG(hw, E1000_FWSM) & + E1000_FWSM_MODE_MASK); /* Adaptive IFS not supported */ mac->adaptive_ifs = FALSE; @@ -377,14 +367,13 @@ static s32 e1000_acquire_nvm_80003es2lan ret_val = e1000_acquire_swfw_sync_80003es2lan(hw, E1000_SWFW_EEP_SM); if (ret_val) - goto out; + return ret_val; ret_val = e1000_acquire_nvm_generic(hw); if (ret_val) e1000_release_swfw_sync_80003es2lan(hw, E1000_SWFW_EEP_SM); -out: return ret_val; } @@ -415,23 +404,20 @@ static s32 e1000_acquire_swfw_sync_80003 u32 swfw_sync; u32 swmask = mask; u32 fwmask = mask << 16; - s32 ret_val = E1000_SUCCESS; - s32 i = 0, timeout = 50; + s32 i = 0; + s32 timeout = 50; DEBUGFUNC("e1000_acquire_swfw_sync_80003es2lan"); while (i < timeout) { - if (e1000_get_hw_semaphore_generic(hw)) { - ret_val = -E1000_ERR_SWFW_SYNC; - goto out; - } + if (e1000_get_hw_semaphore_generic(hw)) + return -E1000_ERR_SWFW_SYNC; swfw_sync = E1000_READ_REG(hw, E1000_SW_FW_SYNC); if (!(swfw_sync & (fwmask | swmask))) break; - /* - * Firmware currently using resource (fwmask) + /* Firmware currently using resource (fwmask) * or other software thread using resource (swmask) */ e1000_put_hw_semaphore_generic(hw); @@ -441,8 +427,7 @@ static s32 e1000_acquire_swfw_sync_80003 if (i == timeout) { DEBUGOUT("Driver can't access resource, SW_FW_SYNC timeout.\n"); - ret_val = -E1000_ERR_SWFW_SYNC; - goto out; + return -E1000_ERR_SWFW_SYNC; } swfw_sync |= swmask; @@ -450,8 +435,7 @@ static s32 e1000_acquire_swfw_sync_80003 e1000_put_hw_semaphore_generic(hw); -out: - return ret_val; + return E1000_SUCCESS; } /** @@ -497,14 +481,13 @@ static s32 e1000_read_phy_reg_gg82563_80 ret_val = e1000_acquire_phy_80003es2lan(hw); if (ret_val) - goto out; + return ret_val; /* Select Configuration Page */ if ((offset & MAX_PHY_REG_ADDRESS) < GG82563_MIN_ALT_REG) { page_select = GG82563_PHY_PAGE_SELECT; } else { - /* - * Use Alternative Page Select register to access + /* Use Alternative Page Select register to access * registers 30 and 31 */ page_select = GG82563_PHY_PAGE_SELECT_ALT; @@ -514,12 +497,11 @@ static s32 e1000_read_phy_reg_gg82563_80 ret_val = e1000_write_phy_reg_mdic(hw, page_select, temp); if (ret_val) { e1000_release_phy_80003es2lan(hw); - goto out; + return ret_val; } - if (hw->dev_spec._80003es2lan.mdic_wa_enable == TRUE) { - /* - * The "ready" bit in the MDIC register may be incorrectly set + if (hw->dev_spec._80003es2lan.mdic_wa_enable) { + /* The "ready" bit in the MDIC register may be incorrectly set * before the device has completed the "Page Select" MDI * transaction. So we wait 200us after each MDI command... */ @@ -529,9 +511,8 @@ static s32 e1000_read_phy_reg_gg82563_80 ret_val = e1000_read_phy_reg_mdic(hw, page_select, &temp); if (((u16)offset >> GG82563_PAGE_SHIFT) != temp) { - ret_val = -E1000_ERR_PHY; e1000_release_phy_80003es2lan(hw); - goto out; + return -E1000_ERR_PHY; } usec_delay(200); @@ -549,7 +530,6 @@ static s32 e1000_read_phy_reg_gg82563_80 e1000_release_phy_80003es2lan(hw); -out: return ret_val; } @@ -572,14 +552,13 @@ static s32 e1000_write_phy_reg_gg82563_8 ret_val = e1000_acquire_phy_80003es2lan(hw); if (ret_val) - goto out; + return ret_val; /* Select Configuration Page */ if ((offset & MAX_PHY_REG_ADDRESS) < GG82563_MIN_ALT_REG) { page_select = GG82563_PHY_PAGE_SELECT; } else { - /* - * Use Alternative Page Select register to access + /* Use Alternative Page Select register to access * registers 30 and 31 */ page_select = GG82563_PHY_PAGE_SELECT_ALT; @@ -589,12 +568,11 @@ static s32 e1000_write_phy_reg_gg82563_8 ret_val = e1000_write_phy_reg_mdic(hw, page_select, temp); if (ret_val) { e1000_release_phy_80003es2lan(hw); - goto out; + return ret_val; } - if (hw->dev_spec._80003es2lan.mdic_wa_enable == TRUE) { - /* - * The "ready" bit in the MDIC register may be incorrectly set + if (hw->dev_spec._80003es2lan.mdic_wa_enable) { + /* The "ready" bit in the MDIC register may be incorrectly set * before the device has completed the "Page Select" MDI * transaction. So we wait 200us after each MDI command... */ @@ -604,9 +582,8 @@ static s32 e1000_write_phy_reg_gg82563_8 ret_val = e1000_read_phy_reg_mdic(hw, page_select, &temp); if (((u16)offset >> GG82563_PAGE_SHIFT) != temp) { - ret_val = -E1000_ERR_PHY; e1000_release_phy_80003es2lan(hw); - goto out; + return -E1000_ERR_PHY; } usec_delay(200); @@ -624,7 +601,6 @@ static s32 e1000_write_phy_reg_gg82563_8 e1000_release_phy_80003es2lan(hw); -out: return ret_val; } @@ -655,7 +631,6 @@ static s32 e1000_write_nvm_80003es2lan(s static s32 e1000_get_cfg_done_80003es2lan(struct e1000_hw *hw) { s32 timeout = PHY_CFG_TIMEOUT; - s32 ret_val = E1000_SUCCESS; u32 mask = E1000_NVM_CFG_DONE_PORT_0; DEBUGFUNC("e1000_get_cfg_done_80003es2lan"); @@ -671,12 +646,10 @@ static s32 e1000_get_cfg_done_80003es2la } if (!timeout) { DEBUGOUT("MNG configuration cycle has not completed.\n"); - ret_val = -E1000_ERR_RESET; - goto out; + return -E1000_ERR_RESET; } -out: - return ret_val; + return E1000_SUCCESS; } /** @@ -688,33 +661,32 @@ out: **/ static s32 e1000_phy_force_speed_duplex_80003es2lan(struct e1000_hw *hw) { - s32 ret_val = E1000_SUCCESS; + s32 ret_val; u16 phy_data; bool link; DEBUGFUNC("e1000_phy_force_speed_duplex_80003es2lan"); if (!(hw->phy.ops.read_reg)) - goto out; + return E1000_SUCCESS; - /* - * Clear Auto-Crossover to force MDI manually. M88E1000 requires MDI + /* Clear Auto-Crossover to force MDI manually. M88E1000 requires MDI * forced whenever speed and duplex are forced. */ ret_val = hw->phy.ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data); if (ret_val) - goto out; + return ret_val; phy_data &= ~GG82563_PSCR_CROSSOVER_MODE_AUTO; ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_SPEC_CTRL, phy_data); if (ret_val) - goto out; + return ret_val; DEBUGOUT1("GG82563 PSCR: %X\n", phy_data); ret_val = hw->phy.ops.read_reg(hw, PHY_CONTROL, &phy_data); if (ret_val) - goto out; + return ret_val; e1000_phy_force_speed_duplex_setup(hw, &phy_data); @@ -723,7 +695,7 @@ static s32 e1000_phy_force_speed_duplex_ ret_val = hw->phy.ops.write_reg(hw, PHY_CONTROL, phy_data); if (ret_val) - goto out; + return ret_val; usec_delay(1); @@ -733,32 +705,30 @@ static s32 e1000_phy_force_speed_duplex_ ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT, 100000, &link); if (ret_val) - goto out; + return ret_val; if (!link) { - /* - * We didn't get link. + /* We didn't get link. * Reset the DSP and cross our fingers. */ ret_val = e1000_phy_reset_dsp_generic(hw); if (ret_val) - goto out; + return ret_val; } /* Try once more */ ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT, 100000, &link); if (ret_val) - goto out; + return ret_val; } ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_MAC_SPEC_CTRL, &phy_data); if (ret_val) - goto out; + return ret_val; - /* - * Resetting the phy means we need to verify the TX_CLK corresponds + /* Resetting the phy means we need to verify the TX_CLK corresponds * to the link speed. 10Mbps -> 2.5MHz, else 25MHz. */ phy_data &= ~GG82563_MSCR_TX_CLK_MASK; @@ -767,15 +737,13 @@ static s32 e1000_phy_force_speed_duplex_ else phy_data |= GG82563_MSCR_TX_CLK_100MBPS_25; - /* - * In addition, we must re-enable CRS on Tx for both half and full + /* In addition, we must re-enable CRS on Tx for both half and full * duplex. */ phy_data |= GG82563_MSCR_ASSERT_CRS_ON_TX; ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_MAC_SPEC_CTRL, phy_data); -out: return ret_val; } @@ -789,32 +757,29 @@ out: static s32 e1000_get_cable_length_80003es2lan(struct e1000_hw *hw) { struct e1000_phy_info *phy = &hw->phy; - s32 ret_val = E1000_SUCCESS; + s32 ret_val; u16 phy_data, index; DEBUGFUNC("e1000_get_cable_length_80003es2lan"); if (!(hw->phy.ops.read_reg)) - goto out; + return E1000_SUCCESS; ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_DSP_DISTANCE, &phy_data); if (ret_val) - goto out; + return ret_val; index = phy_data & GG82563_DSPD_CABLE_LENGTH; - if (index >= GG82563_CABLE_LENGTH_TABLE_SIZE - 5) { - ret_val = -E1000_ERR_PHY; - goto out; - } + if (index >= GG82563_CABLE_LENGTH_TABLE_SIZE - 5) + return -E1000_ERR_PHY; phy->min_cable_length = e1000_gg82563_cable_length_table[index]; phy->max_cable_length = e1000_gg82563_cable_length_table[index + 5]; phy->cable_length = (phy->min_cable_length + phy->max_cable_length) / 2; -out: - return ret_val; + return E1000_SUCCESS; } /** @@ -855,11 +820,11 @@ static s32 e1000_reset_hw_80003es2lan(st { u32 ctrl; s32 ret_val; + u16 kum_reg_data; DEBUGFUNC("e1000_reset_hw_80003es2lan"); - /* - * Prevent the PCI-E bus from sticking if there is no TLP connection + /* Prevent the PCI-E bus from sticking if there is no TLP connection * on the last TLP read/write transaction when MAC is reset. */ ret_val = e1000_disable_pcie_master_generic(hw); @@ -878,23 +843,30 @@ static s32 e1000_reset_hw_80003es2lan(st ctrl = E1000_READ_REG(hw, E1000_CTRL); ret_val = e1000_acquire_phy_80003es2lan(hw); + if (ret_val) + return ret_val; + DEBUGOUT("Issuing a global reset to MAC\n"); E1000_WRITE_REG(hw, E1000_CTRL, ctrl | E1000_CTRL_RST); e1000_release_phy_80003es2lan(hw); + /* Disable IBIST slave mode (far-end loopback) */ + e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, + &kum_reg_data); + kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE; + e1000_write_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, + kum_reg_data); + ret_val = e1000_get_auto_rd_done_generic(hw); if (ret_val) /* We don't want to continue accessing MAC registers. */ - goto out; + return ret_val; /* Clear any pending interrupt events. */ E1000_WRITE_REG(hw, E1000_IMC, 0xffffffff); E1000_READ_REG(hw, E1000_ICR); - ret_val = e1000_check_alt_mac_addr_generic(hw); - -out: - return ret_val; + return e1000_check_alt_mac_addr_generic(hw); } /** @@ -917,9 +889,9 @@ static s32 e1000_init_hw_80003es2lan(str /* Initialize identification LED */ ret_val = mac->ops.id_led_init(hw); + /* An error is not fatal and we should not stop init due to this */ if (ret_val) DEBUGOUT("Error initializing identification LED\n"); - /* This is not fatal and we should not stop init due to this */ /* Disabling VLAN filtering */ DEBUGOUT("Initializing the IEEE VLAN\n"); @@ -935,6 +907,8 @@ static s32 e1000_init_hw_80003es2lan(str /* Setup link and flow control */ ret_val = mac->ops.setup_link(hw); + if (ret_val) + return ret_val; /* Disable IBIST slave mode (far-end loopback) */ e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, @@ -945,14 +919,14 @@ static s32 e1000_init_hw_80003es2lan(str /* Set the transmit descriptor write-back policy */ reg_data = E1000_READ_REG(hw, E1000_TXDCTL(0)); - reg_data = (reg_data & ~E1000_TXDCTL_WTHRESH) | - E1000_TXDCTL_FULL_TX_DESC_WB | E1000_TXDCTL_COUNT_DESC; + reg_data = ((reg_data & ~E1000_TXDCTL_WTHRESH) | + E1000_TXDCTL_FULL_TX_DESC_WB | E1000_TXDCTL_COUNT_DESC); E1000_WRITE_REG(hw, E1000_TXDCTL(0), reg_data); /* ...for both queues. */ reg_data = E1000_READ_REG(hw, E1000_TXDCTL(1)); - reg_data = (reg_data & ~E1000_TXDCTL_WTHRESH) | - E1000_TXDCTL_FULL_TX_DESC_WB | E1000_TXDCTL_COUNT_DESC; + reg_data = ((reg_data & ~E1000_TXDCTL_WTHRESH) | + E1000_TXDCTL_FULL_TX_DESC_WB | E1000_TXDCTL_COUNT_DESC); E1000_WRITE_REG(hw, E1000_TXDCTL(1), reg_data); /* Enable retransmit on late collisions */ @@ -979,18 +953,16 @@ static s32 e1000_init_hw_80003es2lan(str /* default to TRUE to enable the MDIC W/A */ hw->dev_spec._80003es2lan.mdic_wa_enable = TRUE; - ret_val = e1000_read_kmrn_reg_80003es2lan(hw, - E1000_KMRNCTRLSTA_OFFSET >> - E1000_KMRNCTRLSTA_OFFSET_SHIFT, - &i); + ret_val = + e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_OFFSET >> + E1000_KMRNCTRLSTA_OFFSET_SHIFT, &i); if (!ret_val) { if ((i & E1000_KMRNCTRLSTA_OPMODE_MASK) == E1000_KMRNCTRLSTA_OPMODE_INBAND_MDIO) hw->dev_spec._80003es2lan.mdic_wa_enable = FALSE; } - /* - * Clear all of the statistics registers (clear on read). It is + /* Clear all of the statistics registers (clear on read). It is * important that we do this after we have tried to establish link * because the symbol error count will increment wildly if there * is no link. @@ -1037,6 +1009,13 @@ static void e1000_initialize_hw_bits_800 reg |= (1 << 28); E1000_WRITE_REG(hw, E1000_TARC(1), reg); + /* Disable IPv6 extension header parsing because some malformed + * IPv6 headers can hang the Rx. + */ + reg = E1000_READ_REG(hw, E1000_RFCTL); + reg |= (E1000_RFCTL_IPV6_EX_DIS | E1000_RFCTL_NEW_IPV6_EXT_DIS); + E1000_WRITE_REG(hw, E1000_RFCTL, reg); + return; } @@ -1050,14 +1029,14 @@ static s32 e1000_copper_link_setup_gg825 { struct e1000_phy_info *phy = &hw->phy; s32 ret_val; - u32 ctrl_ext; + u32 reg; u16 data; DEBUGFUNC("e1000_copper_link_setup_gg82563_80003es2lan"); ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_MAC_SPEC_CTRL, &data); if (ret_val) - goto out; + return ret_val; data |= GG82563_MSCR_ASSERT_CRS_ON_TX; /* Use 25MHz for both link down and 1000Base-T for Tx clock. */ @@ -1065,10 +1044,9 @@ static s32 e1000_copper_link_setup_gg825 ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_MAC_SPEC_CTRL, data); if (ret_val) - goto out; + return ret_val; - /* - * Options: + /* Options: * MDI/MDI-X = 0 (default) * 0 - Auto for all speeds * 1 - MDI mode @@ -1077,7 +1055,7 @@ static s32 e1000_copper_link_setup_gg825 */ ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_SPEC_CTRL, &data); if (ret_val) - goto out; + return ret_val; data &= ~GG82563_PSCR_CROSSOVER_MODE_MASK; @@ -1094,8 +1072,7 @@ static s32 e1000_copper_link_setup_gg825 break; } - /* - * Options: + /* Options: * disable_polarity_correction = 0 (default) * Automatic Correction for Reversed Cable Polarity * 0 - Disabled @@ -1107,90 +1084,86 @@ static s32 e1000_copper_link_setup_gg825 ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_SPEC_CTRL, data); if (ret_val) - goto out; + return ret_val; /* SW Reset the PHY so all changes take effect */ ret_val = hw->phy.ops.commit(hw); if (ret_val) { DEBUGOUT("Error Resetting the PHY\n"); - goto out; + return ret_val; } /* Bypass Rx and Tx FIFO's */ - ret_val = e1000_write_kmrn_reg_80003es2lan(hw, - E1000_KMRNCTRLSTA_OFFSET_FIFO_CTRL, - E1000_KMRNCTRLSTA_FIFO_CTRL_RX_BYPASS | - E1000_KMRNCTRLSTA_FIFO_CTRL_TX_BYPASS); + reg = E1000_KMRNCTRLSTA_OFFSET_FIFO_CTRL; + data = (E1000_KMRNCTRLSTA_FIFO_CTRL_RX_BYPASS | + E1000_KMRNCTRLSTA_FIFO_CTRL_TX_BYPASS); + ret_val = e1000_write_kmrn_reg_80003es2lan(hw, reg, data); if (ret_val) - goto out; + return ret_val; - ret_val = e1000_read_kmrn_reg_80003es2lan(hw, - E1000_KMRNCTRLSTA_OFFSET_MAC2PHY_OPMODE, &data); + reg = E1000_KMRNCTRLSTA_OFFSET_MAC2PHY_OPMODE; + ret_val = e1000_read_kmrn_reg_80003es2lan(hw, reg, &data); if (ret_val) - goto out; + return ret_val; data |= E1000_KMRNCTRLSTA_OPMODE_E_IDLE; - ret_val = e1000_write_kmrn_reg_80003es2lan(hw, - E1000_KMRNCTRLSTA_OFFSET_MAC2PHY_OPMODE, data); + ret_val = e1000_write_kmrn_reg_80003es2lan(hw, reg, data); if (ret_val) - goto out; + return ret_val; ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_SPEC_CTRL_2, &data); if (ret_val) - goto out; + return ret_val; data &= ~GG82563_PSCR2_REVERSE_AUTO_NEG; ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_SPEC_CTRL_2, data); if (ret_val) - goto out; + return ret_val; - ctrl_ext = E1000_READ_REG(hw, E1000_CTRL_EXT); - ctrl_ext &= ~(E1000_CTRL_EXT_LINK_MODE_MASK); - E1000_WRITE_REG(hw, E1000_CTRL_EXT, ctrl_ext); + reg = E1000_READ_REG(hw, E1000_CTRL_EXT); + reg &= ~E1000_CTRL_EXT_LINK_MODE_MASK; + E1000_WRITE_REG(hw, E1000_CTRL_EXT, reg); ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_PWR_MGMT_CTRL, &data); if (ret_val) - goto out; + return ret_val; - /* - * Do not init these registers when the HW is in IAMT mode, since the + /* Do not init these registers when the HW is in IAMT mode, since the * firmware will have already initialized them. We only initialize * them if the HW is not in IAMT mode. */ - if (!(hw->mac.ops.check_mng_mode(hw))) { + if (!hw->mac.ops.check_mng_mode(hw)) { /* Enable Electrical Idle on the PHY */ data |= GG82563_PMCR_ENABLE_ELECTRICAL_IDLE; ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_PWR_MGMT_CTRL, data); if (ret_val) - goto out; + return ret_val; ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, &data); if (ret_val) - goto out; + return ret_val; data &= ~GG82563_KMCR_PASS_FALSE_CARRIER; ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, data); if (ret_val) - goto out; + return ret_val; } - /* - * Workaround: Disable padding in Kumeran interface in the MAC + /* Workaround: Disable padding in Kumeran interface in the MAC * and in the PHY to avoid CRC errors. */ ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_INBAND_CTRL, &data); if (ret_val) - goto out; + return ret_val; data |= GG82563_ICR_DIS_PADDING; ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_INBAND_CTRL, data); if (ret_val) - goto out; + return ret_val; -out: - return ret_val; + return E1000_SUCCESS; } /** @@ -1213,42 +1186,42 @@ static s32 e1000_setup_copper_link_80003 ctrl &= ~(E1000_CTRL_FRCSPD | E1000_CTRL_FRCDPX); E1000_WRITE_REG(hw, E1000_CTRL, ctrl); - /* - * Set the mac to wait the maximum time between each + /* Set the mac to wait the maximum time between each * iteration and increase the max iterations when * polling the phy; this fixes erroneous timeouts at 10Mbps. */ ret_val = e1000_write_kmrn_reg_80003es2lan(hw, GG82563_REG(0x34, 4), 0xFFFF); if (ret_val) - goto out; + return ret_val; ret_val = e1000_read_kmrn_reg_80003es2lan(hw, GG82563_REG(0x34, 9), ®_data); if (ret_val) - goto out; + return ret_val; reg_data |= 0x3F; ret_val = e1000_write_kmrn_reg_80003es2lan(hw, GG82563_REG(0x34, 9), reg_data); if (ret_val) - goto out; - ret_val = e1000_read_kmrn_reg_80003es2lan(hw, - E1000_KMRNCTRLSTA_OFFSET_INB_CTRL, ®_data); + return ret_val; + ret_val = + e1000_read_kmrn_reg_80003es2lan(hw, + E1000_KMRNCTRLSTA_OFFSET_INB_CTRL, + ®_data); if (ret_val) - goto out; + return ret_val; reg_data |= E1000_KMRNCTRLSTA_INB_CTRL_DIS_PADDING; - ret_val = e1000_write_kmrn_reg_80003es2lan(hw, - E1000_KMRNCTRLSTA_OFFSET_INB_CTRL, reg_data); + ret_val = + e1000_write_kmrn_reg_80003es2lan(hw, + E1000_KMRNCTRLSTA_OFFSET_INB_CTRL, + reg_data); if (ret_val) - goto out; + return ret_val; ret_val = e1000_copper_link_setup_gg82563_80003es2lan(hw); if (ret_val) - goto out; - - ret_val = e1000_setup_copper_link_generic(hw); + return ret_val; -out: - return ret_val; + return e1000_setup_copper_link_generic(hw); } /** @@ -1271,7 +1244,7 @@ static s32 e1000_cfg_on_link_up_80003es2 ret_val = e1000_get_speed_and_duplex_copper_generic(hw, &speed, &duplex); if (ret_val) - goto out; + return ret_val; if (speed == SPEED_1000) ret_val = e1000_cfg_kmrn_1000_80003es2lan(hw); @@ -1279,7 +1252,6 @@ static s32 e1000_cfg_on_link_up_80003es2 ret_val = e1000_cfg_kmrn_10_100_80003es2lan(hw, duplex); } -out: return ret_val; } @@ -1293,7 +1265,7 @@ out: **/ static s32 e1000_cfg_kmrn_10_100_80003es2lan(struct e1000_hw *hw, u16 duplex) { - s32 ret_val = E1000_SUCCESS; + s32 ret_val; u32 tipg; u32 i = 0; u16 reg_data, reg_data2; @@ -1301,11 +1273,12 @@ static s32 e1000_cfg_kmrn_10_100_80003es DEBUGFUNC("e1000_configure_kmrn_for_10_100"); reg_data = E1000_KMRNCTRLSTA_HD_CTRL_10_100_DEFAULT; - ret_val = e1000_write_kmrn_reg_80003es2lan(hw, - E1000_KMRNCTRLSTA_OFFSET_HD_CTRL, - reg_data); + ret_val = + e1000_write_kmrn_reg_80003es2lan(hw, + E1000_KMRNCTRLSTA_OFFSET_HD_CTRL, + reg_data); if (ret_val) - goto out; + return ret_val; /* Configure Transmit Inter-Packet Gap */ tipg = E1000_READ_REG(hw, E1000_TIPG); @@ -1317,12 +1290,12 @@ static s32 e1000_cfg_kmrn_10_100_80003es ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, ®_data); if (ret_val) - goto out; + return ret_val; ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, ®_data2); if (ret_val) - goto out; + return ret_val; i++; } while ((reg_data != reg_data2) && (i < GG82563_MAX_KMRN_RETRY)); @@ -1331,11 +1304,7 @@ static s32 e1000_cfg_kmrn_10_100_80003es else reg_data &= ~GG82563_KMCR_PASS_FALSE_CARRIER; - ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, - reg_data); - -out: - return ret_val; + return hw->phy.ops.write_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, reg_data); } /** @@ -1347,7 +1316,7 @@ out: **/ static s32 e1000_cfg_kmrn_1000_80003es2lan(struct e1000_hw *hw) { - s32 ret_val = E1000_SUCCESS; + s32 ret_val; u16 reg_data, reg_data2; u32 tipg; u32 i = 0; @@ -1355,10 +1324,12 @@ static s32 e1000_cfg_kmrn_1000_80003es2l DEBUGFUNC("e1000_configure_kmrn_for_1000"); reg_data = E1000_KMRNCTRLSTA_HD_CTRL_1000_DEFAULT; - ret_val = e1000_write_kmrn_reg_80003es2lan(hw, - E1000_KMRNCTRLSTA_OFFSET_HD_CTRL, reg_data); + ret_val = + e1000_write_kmrn_reg_80003es2lan(hw, + E1000_KMRNCTRLSTA_OFFSET_HD_CTRL, + reg_data); if (ret_val) - goto out; + return ret_val; /* Configure Transmit Inter-Packet Gap */ tipg = E1000_READ_REG(hw, E1000_TIPG); @@ -1370,21 +1341,18 @@ static s32 e1000_cfg_kmrn_1000_80003es2l ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, ®_data); if (ret_val) - goto out; + return ret_val; ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, ®_data2); if (ret_val) - goto out; + return ret_val; i++; } while ((reg_data != reg_data2) && (i < GG82563_MAX_KMRN_RETRY)); reg_data &= ~GG82563_KMCR_PASS_FALSE_CARRIER; - ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, - reg_data); -out: - return ret_val; + return hw->phy.ops.write_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, reg_data); } /** @@ -1401,13 +1369,13 @@ static s32 e1000_read_kmrn_reg_80003es2l u16 *data) { u32 kmrnctrlsta; - s32 ret_val = E1000_SUCCESS; + s32 ret_val; DEBUGFUNC("e1000_read_kmrn_reg_80003es2lan"); ret_val = e1000_acquire_mac_csr_80003es2lan(hw); if (ret_val) - goto out; + return ret_val; kmrnctrlsta = ((offset << E1000_KMRNCTRLSTA_OFFSET_SHIFT) & E1000_KMRNCTRLSTA_OFFSET) | E1000_KMRNCTRLSTA_REN; @@ -1421,7 +1389,6 @@ static s32 e1000_read_kmrn_reg_80003es2l e1000_release_mac_csr_80003es2lan(hw); -out: return ret_val; } @@ -1439,13 +1406,13 @@ static s32 e1000_write_kmrn_reg_80003es2 u16 data) { u32 kmrnctrlsta; - s32 ret_val = E1000_SUCCESS; + s32 ret_val; DEBUGFUNC("e1000_write_kmrn_reg_80003es2lan"); ret_val = e1000_acquire_mac_csr_80003es2lan(hw); if (ret_val) - goto out; + return ret_val; kmrnctrlsta = ((offset << E1000_KMRNCTRLSTA_OFFSET_SHIFT) & E1000_KMRNCTRLSTA_OFFSET) | data; @@ -1456,7 +1423,6 @@ static s32 e1000_write_kmrn_reg_80003es2 e1000_release_mac_csr_80003es2lan(hw); -out: return ret_val; } @@ -1466,23 +1432,19 @@ out: **/ static s32 e1000_read_mac_addr_80003es2lan(struct e1000_hw *hw) { - s32 ret_val = E1000_SUCCESS; + s32 ret_val; DEBUGFUNC("e1000_read_mac_addr_80003es2lan"); - /* - * If there's an alternate MAC address place it in RAR0 + /* If there's an alternate MAC address place it in RAR0 * so that it will override the Si installed default perm * address. */ ret_val = e1000_check_alt_mac_addr_generic(hw); if (ret_val) - goto out; - - ret_val = e1000_read_mac_addr_generic(hw); + return ret_val; -out: - return ret_val; + return e1000_read_mac_addr_generic(hw); } /** Modified: stable/9/sys/dev/e1000/e1000_80003es2lan.h ============================================================================== --- stable/9/sys/dev/e1000/e1000_80003es2lan.h Wed Aug 6 21:27:15 2014 (r269646) +++ stable/9/sys/dev/e1000/e1000_80003es2lan.h Wed Aug 6 22:15:01 2014 (r269647) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2011, Intel Corporation + Copyright (c) 2001-2013, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -51,34 +51,32 @@ #define E1000_KMRNCTRLSTA_OPMODE_MASK 0x000C #define E1000_KMRNCTRLSTA_OPMODE_INBAND_MDIO 0x0004 -#define E1000_TCTL_EXT_GCEX_MASK 0x000FFC00 /* Gigabit Carry Extend Padding */ +#define E1000_TCTL_EXT_GCEX_MASK 0x000FFC00 /* Gig Carry Extend Padding */ #define DEFAULT_TCTL_EXT_GCEX_80003ES2LAN 0x00010000 #define DEFAULT_TIPG_IPGT_1000_80003ES2LAN 0x8 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From mckusick at FreeBSD.org Wed Aug 6 23:33:17 2014 From: mckusick at FreeBSD.org (Kirk McKusick) Date: Wed, 6 Aug 2014 23:33:17 +0000 (UTC) Subject: svn commit: r269651 - stable/10/sbin/restore Message-ID: <53e2bb3d.5098.d52e05@svn.freebsd.org> Author: mckusick Date: Wed Aug 6 23:33:16 2014 New Revision: 269651 URL: http://svnweb.freebsd.org/changeset/base/269651 Log: MFC of r269303: When restoring a UFS dump onto a ZFS filesystem, an assertion in restore was failing because ZFS was reporting a blocksize that was not a multiple of 1024. Replace restore's failed assertion with code that writes restored files in a blocksize that works for restore (a multiple of 1024) despite being non-optimal for ZFS. Submitted by: Dmitry Morozovsky Tested by: Dmitry Morozovsky Modified: stable/10/sbin/restore/tape.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/restore/tape.c ============================================================================== --- stable/10/sbin/restore/tape.c Wed Aug 6 23:06:09 2014 (r269650) +++ stable/10/sbin/restore/tape.c Wed Aug 6 23:33:16 2014 (r269651) @@ -260,9 +260,11 @@ setup(void) fssize = TP_BSIZE; if (stbuf.st_blksize >= TP_BSIZE && stbuf.st_blksize <= MAXBSIZE) fssize = stbuf.st_blksize; - if (((fssize - 1) & fssize) != 0) { - fprintf(stderr, "bad block size %ld\n", fssize); - done(1); + if (((TP_BSIZE - 1) & stbuf.st_blksize) != 0) { + fprintf(stderr, "Warning: filesystem with non-multiple-of-%d " + "blocksize (%d);\n", TP_BSIZE, stbuf.st_blksize); + fssize = roundup(fssize, TP_BSIZE); + fprintf(stderr, "\twriting using blocksize %ld\n", fssize); } if (spcl.c_volume != 1) { fprintf(stderr, "Tape is not volume 1 of the dump\n"); From mckusick at FreeBSD.org Thu Aug 7 00:32:23 2014 From: mckusick at FreeBSD.org (Kirk McKusick) Date: Thu, 7 Aug 2014 00:32:23 +0000 (UTC) Subject: svn commit: r269652 - stable/9/sbin/restore Message-ID: <53e2c917.5727.6e347a@svn.freebsd.org> Author: mckusick Date: Thu Aug 7 00:32:23 2014 New Revision: 269652 URL: http://svnweb.freebsd.org/changeset/base/269652 Log: MFC of r269303: When restoring a UFS dump onto a ZFS filesystem, an assertion in restore was failing because ZFS was reporting a blocksize that was not a multiple of 1024. Replace restore's failed assertion with code that writes restored files in a blocksize that works for restore (a multiple of 1024) despite being non-optimal for ZFS. Submitted by: Dmitry Morozovsky Tested by: Dmitry Morozovsky Modified: stable/9/sbin/restore/tape.c Directory Properties: stable/9/sbin/restore/ (props changed) Modified: stable/9/sbin/restore/tape.c ============================================================================== --- stable/9/sbin/restore/tape.c Wed Aug 6 23:33:16 2014 (r269651) +++ stable/9/sbin/restore/tape.c Thu Aug 7 00:32:23 2014 (r269652) @@ -260,9 +260,11 @@ setup(void) fssize = TP_BSIZE; if (stbuf.st_blksize >= TP_BSIZE && stbuf.st_blksize <= MAXBSIZE) fssize = stbuf.st_blksize; - if (((fssize - 1) & fssize) != 0) { - fprintf(stderr, "bad block size %ld\n", fssize); - done(1); + if (((TP_BSIZE - 1) & stbuf.st_blksize) != 0) { + fprintf(stderr, "Warning: filesystem with non-multiple-of-%d " + "blocksize (%d);\n", TP_BSIZE, stbuf.st_blksize); + fssize = roundup(fssize, TP_BSIZE); + fprintf(stderr, "\twriting using blocksize %ld\n", fssize); } if (spcl.c_volume != 1) { fprintf(stderr, "Tape is not volume 1 of the dump\n"); From gjb at FreeBSD.org Thu Aug 7 02:26:45 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Thu, 7 Aug 2014 02:26:45 +0000 (UTC) Subject: svn commit: r269654 - stable/10/contrib/subversion/subversion/svn Message-ID: <53e2e3e5.5e16.347aacf1@svn.freebsd.org> Author: gjb Date: Thu Aug 7 02:26:45 2014 New Revision: 269654 URL: http://svnweb.freebsd.org/changeset/base/269654 Log: MFC r269318: Replace 'GNATS' with 'Bugzilla' in the base subversion commit template. Approved by: peter (implicit, original approver) Sponsored by: The FreeBSD Foundation Modified: stable/10/contrib/subversion/subversion/svn/util.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/subversion/subversion/svn/util.c ============================================================================== --- stable/10/contrib/subversion/subversion/svn/util.c Thu Aug 7 01:51:01 2014 (r269653) +++ stable/10/contrib/subversion/subversion/svn/util.c Thu Aug 7 02:26:45 2014 (r269654) @@ -419,7 +419,7 @@ svn_cl__get_log_message(const char **log svn_stringbuf_appendcstr(default_msg, EDITOR_EOF_PREFIX); svn_stringbuf_appendcstr(default_msg, APR_EOL_STR); svn_stringbuf_appendcstr(default_msg, "> Description of fields to fill in above: 76 columns --|" APR_EOL_STR); - svn_stringbuf_appendcstr(default_msg, "> PR: If a GNATS PR is affected by the change." APR_EOL_STR); + svn_stringbuf_appendcstr(default_msg, "> PR: If a Bugzilla PR is affected by the change." APR_EOL_STR); svn_stringbuf_appendcstr(default_msg, "> Submitted by: If someone else sent in the change." APR_EOL_STR); svn_stringbuf_appendcstr(default_msg, "> Reviewed by: If someone else reviewed your modification." APR_EOL_STR); svn_stringbuf_appendcstr(default_msg, "> Approved by: If you needed approval for this commit." APR_EOL_STR); From kib at FreeBSD.org Thu Aug 7 03:50:31 2014 From: kib at FreeBSD.org (Konstantin Belousov) Date: Thu, 7 Aug 2014 03:50:30 +0000 (UTC) Subject: svn commit: r269655 - in stable/10/sys/fs: nfs nfsserver Message-ID: <53e2f786.5aba.3c6c17b7@svn.freebsd.org> Author: kib Date: Thu Aug 7 03:50:30 2014 New Revision: 269655 URL: http://svnweb.freebsd.org/changeset/base/269655 Log: MFC r269347: Do not generate 1000 unique lock names for nfsrc hash chain locks. Shorten the names of some nfs mutexes. Modified: stable/10/sys/fs/nfs/nfsrvcache.h stable/10/sys/fs/nfsserver/nfs_nfsdport.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfs/nfsrvcache.h ============================================================================== --- stable/10/sys/fs/nfs/nfsrvcache.h Thu Aug 7 02:26:45 2014 (r269654) +++ stable/10/sys/fs/nfs/nfsrvcache.h Thu Aug 7 03:50:30 2014 (r269655) @@ -116,7 +116,6 @@ LIST_HEAD(nfsrvhashhead, nfsrvcache); /* The fine-grained locked cache hash table for TCP. */ struct nfsrchash_bucket { struct mtx mtx; - char lock_name[16]; struct nfsrvhashhead tbl; }; Modified: stable/10/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/10/sys/fs/nfsserver/nfs_nfsdport.c Thu Aug 7 02:26:45 2014 (r269654) +++ stable/10/sys/fs/nfsserver/nfs_nfsdport.c Thu Aug 7 03:50:30 2014 (r269655) @@ -3321,23 +3321,16 @@ nfsd_modevent(module_t mod, int type, vo goto out; newnfs_portinit(); for (i = 0; i < NFSRVCACHE_HASHSIZE; i++) { - snprintf(nfsrchash_table[i].lock_name, - sizeof(nfsrchash_table[i].lock_name), "nfsrc_tcp%d", - i); - mtx_init(&nfsrchash_table[i].mtx, - nfsrchash_table[i].lock_name, NULL, MTX_DEF); - snprintf(nfsrcahash_table[i].lock_name, - sizeof(nfsrcahash_table[i].lock_name), "nfsrc_tcpa%d", - i); - mtx_init(&nfsrcahash_table[i].mtx, - nfsrcahash_table[i].lock_name, NULL, MTX_DEF); + mtx_init(&nfsrchash_table[i].mtx, "nfsrtc", NULL, + MTX_DEF); + mtx_init(&nfsrcahash_table[i].mtx, "nfsrtca", NULL, + MTX_DEF); } - mtx_init(&nfsrc_udpmtx, "nfs_udpcache_mutex", NULL, MTX_DEF); - mtx_init(&nfs_v4root_mutex, "nfs_v4root_mutex", NULL, MTX_DEF); - mtx_init(&nfsv4root_mnt.mnt_mtx, "struct mount mtx", NULL, - MTX_DEF); + mtx_init(&nfsrc_udpmtx, "nfsuc", NULL, MTX_DEF); + mtx_init(&nfs_v4root_mutex, "nfs4rt", NULL, MTX_DEF); + mtx_init(&nfsv4root_mnt.mnt_mtx, "nfs4mnt", NULL, MTX_DEF); for (i = 0; i < NFSSESSIONHASHSIZE; i++) - mtx_init(&nfssessionhash[i].mtx, "nfs_session_mutex", + mtx_init(&nfssessionhash[i].mtx, "nfssm", NULL, MTX_DEF); lockinit(&nfsv4root_mnt.mnt_explock, PVFS, "explock", 0, 0); nfsrvd_initcache(); From pluknet at FreeBSD.org Thu Aug 7 12:19:43 2014 From: pluknet at FreeBSD.org (Sergey Kandaurov) Date: Thu, 7 Aug 2014 12:19:43 +0000 (UTC) Subject: svn commit: r269663 - stable/9/sys/amd64/conf Message-ID: <53e36edf.5338.47e0424e@svn.freebsd.org> Author: pluknet Date: Thu Aug 7 12:19:42 2014 New Revision: 269663 URL: http://svnweb.freebsd.org/changeset/base/269663 Log: Fix amd64 LINT. hyperv is not in stable/9, thus partially revert MFC r257277. Modified: stable/9/sys/amd64/conf/NOTES Modified: stable/9/sys/amd64/conf/NOTES ============================================================================== --- stable/9/sys/amd64/conf/NOTES Thu Aug 7 11:44:30 2014 (r269662) +++ stable/9/sys/amd64/conf/NOTES Thu Aug 7 12:19:42 2014 (r269663) @@ -472,8 +472,6 @@ device virtio_blk # VirtIO Block device device virtio_scsi # VirtIO SCSI device device virtio_balloon # VirtIO Memory Balloon device -device hyperv # HyperV drivers - # Xen HVM Guest Optimizations options XENHVM # Xen HVM kernel infrastructure device xenpci # Xen HVM Hypervisor services driver From ian at FreeBSD.org Thu Aug 7 17:49:43 2014 From: ian at FreeBSD.org (Ian Lepore) Date: Thu, 7 Aug 2014 17:49:42 +0000 (UTC) Subject: svn commit: r269679 - stable/10/sys/arm/arm Message-ID: <53e3bc36.2ad6.63b3a50d@svn.freebsd.org> Author: ian Date: Thu Aug 7 17:49:42 2014 New Revision: 269679 URL: http://svnweb.freebsd.org/changeset/base/269679 Log: MFC r256691, r256748: casuword fixes Use unsigned compare against KERNBASE addr. Use atomic ops on armv6. Modified: stable/10/sys/arm/arm/fusu.S Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/fusu.S ============================================================================== --- stable/10/sys/arm/arm/fusu.S Thu Aug 7 17:40:46 2014 (r269678) +++ stable/10/sys/arm/arm/fusu.S Thu Aug 7 17:49:42 2014 (r269679) @@ -66,11 +66,27 @@ ENTRY(casuword) stmfd sp!, {r4, r5} adr r4, .Lcasuwordfault str r4, [r3, #PCB_ONFAULT] +#ifdef _ARM_ARCH_6 +1: + cmp r0, #KERNBASE + mvnhs r0, #0 + bhs 2f + + ldrex r5, [r0] + cmp r5, r1 + movne r0, r5 + bne 2f + strex r5, r2, [r0] + cmp r5, #0 + bne 1b +#else ldrt r5, [r0] cmp r5, r1 movne r0, r5 streqt r2, [r0] +#endif moveq r0, r1 +2: ldmfd sp!, {r4, r5} mov r1, #0x00000000 str r1, [r3, #PCB_ONFAULT] From markj at FreeBSD.org Thu Aug 7 18:36:48 2014 From: markj at FreeBSD.org (Mark Johnston) Date: Thu, 7 Aug 2014 18:36:48 +0000 (UTC) Subject: svn commit: r269680 - stable/10/libexec/rtld-elf Message-ID: <53e3c740.2e43.35ce0a46@svn.freebsd.org> Author: markj Date: Thu Aug 7 18:36:47 2014 New Revision: 269680 URL: http://svnweb.freebsd.org/changeset/base/269680 Log: MFC r265456, r265578: Add a postinit debugger hook to rtld. This will be used by dtrace(1) to halt the victim process before its entry point is called, at which point probes and DOF data are registered with the kernel. The r_debug_state hook cannot be used for this purpose, as it is called before the program's init routines are invoked and in particular before DOF data is registered (via drti.o). Modified: stable/10/libexec/rtld-elf/Symbol.map stable/10/libexec/rtld-elf/rtld.c Directory Properties: stable/10/ (props changed) Modified: stable/10/libexec/rtld-elf/Symbol.map ============================================================================== --- stable/10/libexec/rtld-elf/Symbol.map Thu Aug 7 17:49:42 2014 (r269679) +++ stable/10/libexec/rtld-elf/Symbol.map Thu Aug 7 18:36:47 2014 (r269680) @@ -30,4 +30,5 @@ FBSDprivate_1.0 { _rtld_atfork_post; _rtld_addr_phdr; _rtld_get_stack_prot; + _r_debug_postinit; }; Modified: stable/10/libexec/rtld-elf/rtld.c ============================================================================== --- stable/10/libexec/rtld-elf/rtld.c Thu Aug 7 17:49:42 2014 (r269679) +++ stable/10/libexec/rtld-elf/rtld.c Thu Aug 7 18:36:47 2014 (r269680) @@ -161,6 +161,7 @@ static bool matched_symbol(SymLook *, co const unsigned long); void r_debug_state(struct r_debug *, struct link_map *) __noinline; +void _r_debug_postinit(struct link_map *) __noinline; /* * Data declarations. @@ -635,6 +636,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ if (obj_main->crt_no_init) preinit_main(); objlist_call_init(&initlist, &lockstate); + _r_debug_postinit(&obj_main->linkmap); objlist_clear(&initlist); dbg("loading filtees"); for (obj = obj_list->next; obj != NULL; obj = obj->next) { @@ -3497,7 +3499,20 @@ r_debug_state(struct r_debug* rd, struct * even when marked __noinline. However, gdb depends on those * calls being made. */ - __asm __volatile("" : : : "memory"); + __compiler_membar(); +} + +/* + * A function called after init routines have completed. This can be used to + * break before a program's entry routine is called, and can be used when + * main is not available in the symbol table. + */ +void +_r_debug_postinit(struct link_map *m) +{ + + /* See r_debug_state(). */ + __compiler_membar(); } /* From markj at FreeBSD.org Thu Aug 7 18:37:16 2014 From: markj at FreeBSD.org (Mark Johnston) Date: Thu, 7 Aug 2014 18:37:16 +0000 (UTC) Subject: svn commit: r269681 - stable/9/libexec/rtld-elf Message-ID: <53e3c75c.2e5b.7de5a63a@svn.freebsd.org> Author: markj Date: Thu Aug 7 18:37:15 2014 New Revision: 269681 URL: http://svnweb.freebsd.org/changeset/base/269681 Log: MFC r265456, r265578: Add a postinit debugger hook to rtld. This will be used by dtrace(1) to halt the victim process before its entry point is called, at which point probes and DOF data are registered with the kernel. The r_debug_state hook cannot be used for this purpose, as it is called before the program's init routines are invoked and in particular before DOF data is registered (via drti.o). Modified: stable/9/libexec/rtld-elf/Symbol.map stable/9/libexec/rtld-elf/rtld.c Directory Properties: stable/9/libexec/rtld-elf/ (props changed) Modified: stable/9/libexec/rtld-elf/Symbol.map ============================================================================== --- stable/9/libexec/rtld-elf/Symbol.map Thu Aug 7 18:36:47 2014 (r269680) +++ stable/9/libexec/rtld-elf/Symbol.map Thu Aug 7 18:37:15 2014 (r269681) @@ -30,4 +30,5 @@ FBSDprivate_1.0 { _rtld_atfork_post; _rtld_addr_phdr; _rtld_get_stack_prot; + _r_debug_postinit; }; Modified: stable/9/libexec/rtld-elf/rtld.c ============================================================================== --- stable/9/libexec/rtld-elf/rtld.c Thu Aug 7 18:36:47 2014 (r269680) +++ stable/9/libexec/rtld-elf/rtld.c Thu Aug 7 18:37:15 2014 (r269681) @@ -161,6 +161,7 @@ static bool matched_symbol(SymLook *, co const unsigned long); void r_debug_state(struct r_debug *, struct link_map *) __noinline; +void _r_debug_postinit(struct link_map *) __noinline; /* * Data declarations. @@ -635,6 +636,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ if (obj_main->crt_no_init) preinit_main(); objlist_call_init(&initlist, &lockstate); + _r_debug_postinit(&obj_main->linkmap); objlist_clear(&initlist); dbg("loading filtees"); for (obj = obj_list->next; obj != NULL; obj = obj->next) { @@ -3501,7 +3503,20 @@ r_debug_state(struct r_debug* rd, struct * even when marked __noinline. However, gdb depends on those * calls being made. */ - __asm __volatile("" : : : "memory"); + __compiler_membar(); +} + +/* + * A function called after init routines have completed. This can be used to + * break before a program's entry routine is called, and can be used when + * main is not available in the symbol table. + */ +void +_r_debug_postinit(struct link_map *m) +{ + + /* See r_debug_state(). */ + __compiler_membar(); } /* From peter at FreeBSD.org Thu Aug 7 20:01:01 2014 From: peter at FreeBSD.org (Peter Wemm) Date: Thu, 7 Aug 2014 20:01:00 +0000 (UTC) Subject: svn commit: r269683 - stable/8/lib/libc/stdlib Message-ID: <53e3dafc.2eac.4b24d731@svn.freebsd.org> Author: peter Date: Thu Aug 7 20:01:00 2014 New Revision: 269683 URL: http://svnweb.freebsd.org/changeset/base/269683 Log: Like on stable/9 and later, don't redefine MALLOC_PRODUCTION Modified: stable/8/lib/libc/stdlib/malloc.c Modified: stable/8/lib/libc/stdlib/malloc.c ============================================================================== --- stable/8/lib/libc/stdlib/malloc.c Thu Aug 7 18:56:10 2014 (r269682) +++ stable/8/lib/libc/stdlib/malloc.c Thu Aug 7 20:01:00 2014 (r269683) @@ -114,7 +114,9 @@ * defaults the A and J runtime options to off. These settings are appropriate * for production systems. */ +#ifndef MALLOC_PRODUCTION #define MALLOC_PRODUCTION +#define #ifndef MALLOC_PRODUCTION /* From peter at FreeBSD.org Thu Aug 7 20:05:50 2014 From: peter at FreeBSD.org (Peter Wemm) Date: Thu, 7 Aug 2014 20:05:50 +0000 (UTC) Subject: svn commit: r269684 - stable/8/lib/libc/stdlib Message-ID: <53e3dc1e.2ec0.2b0c4672@svn.freebsd.org> Author: peter Date: Thu Aug 7 20:05:50 2014 New Revision: 269684 URL: http://svnweb.freebsd.org/changeset/base/269684 Log: Fix cut/paste brain-o. Spell #endif correctly. Modified: stable/8/lib/libc/stdlib/malloc.c Modified: stable/8/lib/libc/stdlib/malloc.c ============================================================================== --- stable/8/lib/libc/stdlib/malloc.c Thu Aug 7 20:01:00 2014 (r269683) +++ stable/8/lib/libc/stdlib/malloc.c Thu Aug 7 20:05:50 2014 (r269684) @@ -116,7 +116,7 @@ */ #ifndef MALLOC_PRODUCTION #define MALLOC_PRODUCTION -#define +#endif #ifndef MALLOC_PRODUCTION /* From jkim at FreeBSD.org Thu Aug 7 21:04:51 2014 From: jkim at FreeBSD.org (Jung-uk Kim) Date: Thu, 7 Aug 2014 21:04:43 +0000 (UTC) Subject: svn commit: r269686 - in stable/10: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto/bn crypto/openssl/crypto/cms ... Message-ID: <53e3e9eb.211f.392a5430@svn.freebsd.org> Author: jkim Date: Thu Aug 7 21:04:42 2014 New Revision: 269686 URL: http://svnweb.freebsd.org/changeset/base/269686 Log: MFC: r269682 Merge OpenSSL 1.0.1i. Added: stable/10/crypto/openssl/doc/ssl/SSL_CTX_set_tlsext_ticket_key_cb.pod - copied unchanged from r269682, head/crypto/openssl/doc/ssl/SSL_CTX_set_tlsext_ticket_key_cb.pod stable/10/crypto/openssl/ssl/ssl_utst.c - copied unchanged from r269682, head/crypto/openssl/ssl/ssl_utst.c stable/10/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 - copied unchanged from r269682, head/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 Deleted: stable/10/crypto/openssl/crypto/pkcs7/bio_ber.c stable/10/crypto/openssl/crypto/pkcs7/dec.c stable/10/crypto/openssl/crypto/pkcs7/des.pem stable/10/crypto/openssl/crypto/pkcs7/doc stable/10/crypto/openssl/crypto/pkcs7/enc.c stable/10/crypto/openssl/crypto/pkcs7/es1.pem stable/10/crypto/openssl/crypto/pkcs7/example.c stable/10/crypto/openssl/crypto/pkcs7/example.h stable/10/crypto/openssl/crypto/pkcs7/info.pem stable/10/crypto/openssl/crypto/pkcs7/infokey.pem stable/10/crypto/openssl/crypto/pkcs7/p7/ stable/10/crypto/openssl/crypto/pkcs7/server.pem stable/10/crypto/openssl/crypto/pkcs7/sign.c stable/10/crypto/openssl/crypto/pkcs7/t/ stable/10/crypto/openssl/crypto/pkcs7/verify.c Modified: stable/10/crypto/openssl/CHANGES stable/10/crypto/openssl/Configure stable/10/crypto/openssl/FAQ stable/10/crypto/openssl/Makefile stable/10/crypto/openssl/NEWS stable/10/crypto/openssl/README stable/10/crypto/openssl/apps/apps.c stable/10/crypto/openssl/apps/ca.c stable/10/crypto/openssl/apps/ciphers.c stable/10/crypto/openssl/apps/crl2p7.c stable/10/crypto/openssl/apps/enc.c stable/10/crypto/openssl/apps/ocsp.c stable/10/crypto/openssl/apps/progs.h stable/10/crypto/openssl/apps/progs.pl stable/10/crypto/openssl/apps/s_client.c stable/10/crypto/openssl/apps/s_server.c stable/10/crypto/openssl/crypto/asn1/a_object.c stable/10/crypto/openssl/crypto/asn1/a_utctm.c stable/10/crypto/openssl/crypto/asn1/ameth_lib.c stable/10/crypto/openssl/crypto/asn1/asn1_lib.c stable/10/crypto/openssl/crypto/asn1/asn_mime.c stable/10/crypto/openssl/crypto/asn1/asn_pack.c stable/10/crypto/openssl/crypto/asn1/bio_asn1.c stable/10/crypto/openssl/crypto/asn1/charmap.pl stable/10/crypto/openssl/crypto/asn1/evp_asn1.c stable/10/crypto/openssl/crypto/asn1/t_x509.c stable/10/crypto/openssl/crypto/asn1/tasn_enc.c stable/10/crypto/openssl/crypto/asn1/x_crl.c stable/10/crypto/openssl/crypto/bio/bio_lib.c stable/10/crypto/openssl/crypto/bn/bn_exp.c stable/10/crypto/openssl/crypto/bn/bn_lib.c stable/10/crypto/openssl/crypto/bn/bn_sqr.c stable/10/crypto/openssl/crypto/cms/cms_pwri.c stable/10/crypto/openssl/crypto/conf/conf_def.c stable/10/crypto/openssl/crypto/ec/ec_lib.c stable/10/crypto/openssl/crypto/ec/ecp_smpl.c stable/10/crypto/openssl/crypto/ec/ectest.c stable/10/crypto/openssl/crypto/evp/e_aes.c stable/10/crypto/openssl/crypto/evp/evp_pbe.c stable/10/crypto/openssl/crypto/idea/ideatest.c stable/10/crypto/openssl/crypto/objects/obj_dat.c stable/10/crypto/openssl/crypto/objects/obj_dat.h stable/10/crypto/openssl/crypto/objects/obj_dat.pl stable/10/crypto/openssl/crypto/ocsp/ocsp_ht.c stable/10/crypto/openssl/crypto/ocsp/ocsp_lib.c stable/10/crypto/openssl/crypto/opensslconf.h stable/10/crypto/openssl/crypto/opensslv.h stable/10/crypto/openssl/crypto/pem/pvkfmt.c stable/10/crypto/openssl/crypto/pkcs7/Makefile stable/10/crypto/openssl/crypto/rand/md_rand.c stable/10/crypto/openssl/crypto/rand/rand_lcl.h stable/10/crypto/openssl/crypto/rand/rand_lib.c stable/10/crypto/openssl/crypto/rand/randfile.c stable/10/crypto/openssl/crypto/rsa/rsa_eay.c stable/10/crypto/openssl/crypto/srp/srp_lib.c stable/10/crypto/openssl/crypto/ui/ui_lib.c stable/10/crypto/openssl/doc/apps/asn1parse.pod stable/10/crypto/openssl/doc/apps/ca.pod stable/10/crypto/openssl/doc/apps/ciphers.pod stable/10/crypto/openssl/doc/apps/cms.pod stable/10/crypto/openssl/doc/apps/crl.pod stable/10/crypto/openssl/doc/apps/dhparam.pod stable/10/crypto/openssl/doc/apps/dsa.pod stable/10/crypto/openssl/doc/apps/ecparam.pod stable/10/crypto/openssl/doc/apps/gendsa.pod stable/10/crypto/openssl/doc/apps/genrsa.pod stable/10/crypto/openssl/doc/apps/rsa.pod stable/10/crypto/openssl/doc/apps/s_client.pod stable/10/crypto/openssl/doc/apps/s_server.pod stable/10/crypto/openssl/doc/apps/verify.pod stable/10/crypto/openssl/doc/apps/x509.pod stable/10/crypto/openssl/doc/apps/x509v3_config.pod stable/10/crypto/openssl/doc/crypto/ASN1_generate_nconf.pod stable/10/crypto/openssl/doc/crypto/BIO_f_base64.pod stable/10/crypto/openssl/doc/crypto/BIO_push.pod stable/10/crypto/openssl/doc/crypto/ERR_get_error.pod stable/10/crypto/openssl/doc/crypto/EVP_DigestInit.pod stable/10/crypto/openssl/doc/crypto/EVP_EncryptInit.pod stable/10/crypto/openssl/doc/crypto/EVP_SignInit.pod stable/10/crypto/openssl/doc/crypto/RSA_set_method.pod stable/10/crypto/openssl/doc/crypto/RSA_sign.pod stable/10/crypto/openssl/doc/crypto/des.pod stable/10/crypto/openssl/doc/crypto/err.pod stable/10/crypto/openssl/doc/crypto/pem.pod stable/10/crypto/openssl/doc/crypto/ui.pod stable/10/crypto/openssl/doc/fingerprints.txt stable/10/crypto/openssl/doc/ssl/SSL_CIPHER_get_name.pod stable/10/crypto/openssl/doc/ssl/SSL_CTX_add_extra_chain_cert.pod stable/10/crypto/openssl/doc/ssl/SSL_CTX_add_session.pod stable/10/crypto/openssl/doc/ssl/SSL_CTX_new.pod stable/10/crypto/openssl/doc/ssl/SSL_CTX_set_cipher_list.pod stable/10/crypto/openssl/doc/ssl/SSL_CTX_set_client_CA_list.pod stable/10/crypto/openssl/doc/ssl/SSL_CTX_set_client_cert_cb.pod stable/10/crypto/openssl/doc/ssl/SSL_CTX_set_options.pod stable/10/crypto/openssl/doc/ssl/SSL_CTX_set_tmp_dh_callback.pod stable/10/crypto/openssl/doc/ssl/SSL_CTX_set_verify.pod stable/10/crypto/openssl/doc/ssl/SSL_get_version.pod stable/10/crypto/openssl/doc/ssl/d2i_SSL_SESSION.pod stable/10/crypto/openssl/ssl/Makefile stable/10/crypto/openssl/ssl/d1_both.c stable/10/crypto/openssl/ssl/d1_clnt.c stable/10/crypto/openssl/ssl/d1_srvr.c stable/10/crypto/openssl/ssl/heartbeat_test.c stable/10/crypto/openssl/ssl/s23_lib.c stable/10/crypto/openssl/ssl/s23_srvr.c stable/10/crypto/openssl/ssl/s2_lib.c stable/10/crypto/openssl/ssl/s3_clnt.c stable/10/crypto/openssl/ssl/s3_enc.c stable/10/crypto/openssl/ssl/s3_lib.c stable/10/crypto/openssl/ssl/s3_pkt.c stable/10/crypto/openssl/ssl/s3_srvr.c stable/10/crypto/openssl/ssl/ssl.h stable/10/crypto/openssl/ssl/ssl_ciph.c stable/10/crypto/openssl/ssl/ssl_err.c stable/10/crypto/openssl/ssl/ssl_lib.c stable/10/crypto/openssl/ssl/ssl_locl.h stable/10/crypto/openssl/ssl/ssl_stat.c stable/10/crypto/openssl/ssl/t1_enc.c stable/10/crypto/openssl/ssl/t1_lib.c stable/10/crypto/openssl/ssl/tls_srp.c stable/10/crypto/openssl/util/mk1mf.pl stable/10/crypto/openssl/util/mkdef.pl stable/10/crypto/openssl/util/mkerr.pl stable/10/crypto/openssl/util/ssleay.num stable/10/secure/lib/libcrypto/Makefile.inc stable/10/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 stable/10/secure/lib/libcrypto/man/ASN1_STRING_length.3 stable/10/secure/lib/libcrypto/man/ASN1_STRING_new.3 stable/10/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 stable/10/secure/lib/libcrypto/man/ASN1_generate_nconf.3 stable/10/secure/lib/libcrypto/man/BIO_ctrl.3 stable/10/secure/lib/libcrypto/man/BIO_f_base64.3 stable/10/secure/lib/libcrypto/man/BIO_f_buffer.3 stable/10/secure/lib/libcrypto/man/BIO_f_cipher.3 stable/10/secure/lib/libcrypto/man/BIO_f_md.3 stable/10/secure/lib/libcrypto/man/BIO_f_null.3 stable/10/secure/lib/libcrypto/man/BIO_f_ssl.3 stable/10/secure/lib/libcrypto/man/BIO_find_type.3 stable/10/secure/lib/libcrypto/man/BIO_new.3 stable/10/secure/lib/libcrypto/man/BIO_new_CMS.3 stable/10/secure/lib/libcrypto/man/BIO_push.3 stable/10/secure/lib/libcrypto/man/BIO_read.3 stable/10/secure/lib/libcrypto/man/BIO_s_accept.3 stable/10/secure/lib/libcrypto/man/BIO_s_bio.3 stable/10/secure/lib/libcrypto/man/BIO_s_connect.3 stable/10/secure/lib/libcrypto/man/BIO_s_fd.3 stable/10/secure/lib/libcrypto/man/BIO_s_file.3 stable/10/secure/lib/libcrypto/man/BIO_s_mem.3 stable/10/secure/lib/libcrypto/man/BIO_s_null.3 stable/10/secure/lib/libcrypto/man/BIO_s_socket.3 stable/10/secure/lib/libcrypto/man/BIO_set_callback.3 stable/10/secure/lib/libcrypto/man/BIO_should_retry.3 stable/10/secure/lib/libcrypto/man/BN_BLINDING_new.3 stable/10/secure/lib/libcrypto/man/BN_CTX_new.3 stable/10/secure/lib/libcrypto/man/BN_CTX_start.3 stable/10/secure/lib/libcrypto/man/BN_add.3 stable/10/secure/lib/libcrypto/man/BN_add_word.3 stable/10/secure/lib/libcrypto/man/BN_bn2bin.3 stable/10/secure/lib/libcrypto/man/BN_cmp.3 stable/10/secure/lib/libcrypto/man/BN_copy.3 stable/10/secure/lib/libcrypto/man/BN_generate_prime.3 stable/10/secure/lib/libcrypto/man/BN_mod_inverse.3 stable/10/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 stable/10/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 stable/10/secure/lib/libcrypto/man/BN_new.3 stable/10/secure/lib/libcrypto/man/BN_num_bytes.3 stable/10/secure/lib/libcrypto/man/BN_rand.3 stable/10/secure/lib/libcrypto/man/BN_set_bit.3 stable/10/secure/lib/libcrypto/man/BN_swap.3 stable/10/secure/lib/libcrypto/man/BN_zero.3 stable/10/secure/lib/libcrypto/man/CMS_add0_cert.3 stable/10/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 stable/10/secure/lib/libcrypto/man/CMS_compress.3 stable/10/secure/lib/libcrypto/man/CMS_decrypt.3 stable/10/secure/lib/libcrypto/man/CMS_encrypt.3 stable/10/secure/lib/libcrypto/man/CMS_final.3 stable/10/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 stable/10/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 stable/10/secure/lib/libcrypto/man/CMS_get0_type.3 stable/10/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 stable/10/secure/lib/libcrypto/man/CMS_sign.3 stable/10/secure/lib/libcrypto/man/CMS_sign_add1_signer.3 stable/10/secure/lib/libcrypto/man/CMS_sign_receipt.3 stable/10/secure/lib/libcrypto/man/CMS_uncompress.3 stable/10/secure/lib/libcrypto/man/CMS_verify.3 stable/10/secure/lib/libcrypto/man/CMS_verify_receipt.3 stable/10/secure/lib/libcrypto/man/CONF_modules_free.3 stable/10/secure/lib/libcrypto/man/CONF_modules_load_file.3 stable/10/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 stable/10/secure/lib/libcrypto/man/DH_generate_key.3 stable/10/secure/lib/libcrypto/man/DH_generate_parameters.3 stable/10/secure/lib/libcrypto/man/DH_get_ex_new_index.3 stable/10/secure/lib/libcrypto/man/DH_new.3 stable/10/secure/lib/libcrypto/man/DH_set_method.3 stable/10/secure/lib/libcrypto/man/DH_size.3 stable/10/secure/lib/libcrypto/man/DSA_SIG_new.3 stable/10/secure/lib/libcrypto/man/DSA_do_sign.3 stable/10/secure/lib/libcrypto/man/DSA_dup_DH.3 stable/10/secure/lib/libcrypto/man/DSA_generate_key.3 stable/10/secure/lib/libcrypto/man/DSA_generate_parameters.3 stable/10/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 stable/10/secure/lib/libcrypto/man/DSA_new.3 stable/10/secure/lib/libcrypto/man/DSA_set_method.3 stable/10/secure/lib/libcrypto/man/DSA_sign.3 stable/10/secure/lib/libcrypto/man/DSA_size.3 stable/10/secure/lib/libcrypto/man/ERR_GET_LIB.3 stable/10/secure/lib/libcrypto/man/ERR_clear_error.3 stable/10/secure/lib/libcrypto/man/ERR_error_string.3 stable/10/secure/lib/libcrypto/man/ERR_get_error.3 stable/10/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 stable/10/secure/lib/libcrypto/man/ERR_load_strings.3 stable/10/secure/lib/libcrypto/man/ERR_print_errors.3 stable/10/secure/lib/libcrypto/man/ERR_put_error.3 stable/10/secure/lib/libcrypto/man/ERR_remove_state.3 stable/10/secure/lib/libcrypto/man/ERR_set_mark.3 stable/10/secure/lib/libcrypto/man/EVP_BytesToKey.3 stable/10/secure/lib/libcrypto/man/EVP_DigestInit.3 stable/10/secure/lib/libcrypto/man/EVP_DigestSignInit.3 stable/10/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 stable/10/secure/lib/libcrypto/man/EVP_EncryptInit.3 stable/10/secure/lib/libcrypto/man/EVP_OpenInit.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_derive.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_new.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_sign.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_verify.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 stable/10/secure/lib/libcrypto/man/EVP_SealInit.3 stable/10/secure/lib/libcrypto/man/EVP_SignInit.3 stable/10/secure/lib/libcrypto/man/EVP_VerifyInit.3 stable/10/secure/lib/libcrypto/man/OBJ_nid2obj.3 stable/10/secure/lib/libcrypto/man/OPENSSL_Applink.3 stable/10/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 stable/10/secure/lib/libcrypto/man/OPENSSL_config.3 stable/10/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 stable/10/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 stable/10/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 stable/10/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 stable/10/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 stable/10/secure/lib/libcrypto/man/PKCS12_create.3 stable/10/secure/lib/libcrypto/man/PKCS12_parse.3 stable/10/secure/lib/libcrypto/man/PKCS7_decrypt.3 stable/10/secure/lib/libcrypto/man/PKCS7_encrypt.3 stable/10/secure/lib/libcrypto/man/PKCS7_sign.3 stable/10/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 stable/10/secure/lib/libcrypto/man/PKCS7_verify.3 stable/10/secure/lib/libcrypto/man/RAND_add.3 stable/10/secure/lib/libcrypto/man/RAND_bytes.3 stable/10/secure/lib/libcrypto/man/RAND_cleanup.3 stable/10/secure/lib/libcrypto/man/RAND_egd.3 stable/10/secure/lib/libcrypto/man/RAND_load_file.3 stable/10/secure/lib/libcrypto/man/RAND_set_rand_method.3 stable/10/secure/lib/libcrypto/man/RSA_blinding_on.3 stable/10/secure/lib/libcrypto/man/RSA_check_key.3 stable/10/secure/lib/libcrypto/man/RSA_generate_key.3 stable/10/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 stable/10/secure/lib/libcrypto/man/RSA_new.3 stable/10/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 stable/10/secure/lib/libcrypto/man/RSA_print.3 stable/10/secure/lib/libcrypto/man/RSA_private_encrypt.3 stable/10/secure/lib/libcrypto/man/RSA_public_encrypt.3 stable/10/secure/lib/libcrypto/man/RSA_set_method.3 stable/10/secure/lib/libcrypto/man/RSA_sign.3 stable/10/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 stable/10/secure/lib/libcrypto/man/RSA_size.3 stable/10/secure/lib/libcrypto/man/SMIME_read_CMS.3 stable/10/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 stable/10/secure/lib/libcrypto/man/SMIME_write_CMS.3 stable/10/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 stable/10/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 stable/10/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 stable/10/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 stable/10/secure/lib/libcrypto/man/X509_NAME_print_ex.3 stable/10/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 stable/10/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 stable/10/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 stable/10/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 stable/10/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 stable/10/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 stable/10/secure/lib/libcrypto/man/X509_new.3 stable/10/secure/lib/libcrypto/man/X509_verify_cert.3 stable/10/secure/lib/libcrypto/man/bio.3 stable/10/secure/lib/libcrypto/man/blowfish.3 stable/10/secure/lib/libcrypto/man/bn.3 stable/10/secure/lib/libcrypto/man/bn_internal.3 stable/10/secure/lib/libcrypto/man/buffer.3 stable/10/secure/lib/libcrypto/man/crypto.3 stable/10/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 stable/10/secure/lib/libcrypto/man/d2i_DHparams.3 stable/10/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 stable/10/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 stable/10/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 stable/10/secure/lib/libcrypto/man/d2i_X509.3 stable/10/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 stable/10/secure/lib/libcrypto/man/d2i_X509_CRL.3 stable/10/secure/lib/libcrypto/man/d2i_X509_NAME.3 stable/10/secure/lib/libcrypto/man/d2i_X509_REQ.3 stable/10/secure/lib/libcrypto/man/d2i_X509_SIG.3 stable/10/secure/lib/libcrypto/man/des.3 stable/10/secure/lib/libcrypto/man/dh.3 stable/10/secure/lib/libcrypto/man/dsa.3 stable/10/secure/lib/libcrypto/man/ecdsa.3 stable/10/secure/lib/libcrypto/man/engine.3 stable/10/secure/lib/libcrypto/man/err.3 stable/10/secure/lib/libcrypto/man/evp.3 stable/10/secure/lib/libcrypto/man/hmac.3 stable/10/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 stable/10/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 stable/10/secure/lib/libcrypto/man/lh_stats.3 stable/10/secure/lib/libcrypto/man/lhash.3 stable/10/secure/lib/libcrypto/man/md5.3 stable/10/secure/lib/libcrypto/man/mdc2.3 stable/10/secure/lib/libcrypto/man/pem.3 stable/10/secure/lib/libcrypto/man/rand.3 stable/10/secure/lib/libcrypto/man/rc4.3 stable/10/secure/lib/libcrypto/man/ripemd.3 stable/10/secure/lib/libcrypto/man/rsa.3 stable/10/secure/lib/libcrypto/man/sha.3 stable/10/secure/lib/libcrypto/man/threads.3 stable/10/secure/lib/libcrypto/man/ui.3 stable/10/secure/lib/libcrypto/man/ui_compat.3 stable/10/secure/lib/libcrypto/man/x509.3 stable/10/secure/lib/libssl/Makefile.man stable/10/secure/lib/libssl/man/SSL_CIPHER_get_name.3 stable/10/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 stable/10/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 stable/10/secure/lib/libssl/man/SSL_CTX_add_session.3 stable/10/secure/lib/libssl/man/SSL_CTX_ctrl.3 stable/10/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 stable/10/secure/lib/libssl/man/SSL_CTX_free.3 stable/10/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 stable/10/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 stable/10/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 stable/10/secure/lib/libssl/man/SSL_CTX_new.3 stable/10/secure/lib/libssl/man/SSL_CTX_sess_number.3 stable/10/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 stable/10/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 stable/10/secure/lib/libssl/man/SSL_CTX_sessions.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_mode.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_options.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_timeout.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_verify.3 stable/10/secure/lib/libssl/man/SSL_CTX_use_certificate.3 stable/10/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 stable/10/secure/lib/libssl/man/SSL_SESSION_free.3 stable/10/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 stable/10/secure/lib/libssl/man/SSL_SESSION_get_time.3 stable/10/secure/lib/libssl/man/SSL_accept.3 stable/10/secure/lib/libssl/man/SSL_alert_type_string.3 stable/10/secure/lib/libssl/man/SSL_clear.3 stable/10/secure/lib/libssl/man/SSL_connect.3 stable/10/secure/lib/libssl/man/SSL_do_handshake.3 stable/10/secure/lib/libssl/man/SSL_free.3 stable/10/secure/lib/libssl/man/SSL_get_SSL_CTX.3 stable/10/secure/lib/libssl/man/SSL_get_ciphers.3 stable/10/secure/lib/libssl/man/SSL_get_client_CA_list.3 stable/10/secure/lib/libssl/man/SSL_get_current_cipher.3 stable/10/secure/lib/libssl/man/SSL_get_default_timeout.3 stable/10/secure/lib/libssl/man/SSL_get_error.3 stable/10/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 stable/10/secure/lib/libssl/man/SSL_get_ex_new_index.3 stable/10/secure/lib/libssl/man/SSL_get_fd.3 stable/10/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 stable/10/secure/lib/libssl/man/SSL_get_peer_certificate.3 stable/10/secure/lib/libssl/man/SSL_get_psk_identity.3 stable/10/secure/lib/libssl/man/SSL_get_rbio.3 stable/10/secure/lib/libssl/man/SSL_get_session.3 stable/10/secure/lib/libssl/man/SSL_get_verify_result.3 stable/10/secure/lib/libssl/man/SSL_get_version.3 stable/10/secure/lib/libssl/man/SSL_library_init.3 stable/10/secure/lib/libssl/man/SSL_load_client_CA_file.3 stable/10/secure/lib/libssl/man/SSL_new.3 stable/10/secure/lib/libssl/man/SSL_pending.3 stable/10/secure/lib/libssl/man/SSL_read.3 stable/10/secure/lib/libssl/man/SSL_rstate_string.3 stable/10/secure/lib/libssl/man/SSL_session_reused.3 stable/10/secure/lib/libssl/man/SSL_set_bio.3 stable/10/secure/lib/libssl/man/SSL_set_connect_state.3 stable/10/secure/lib/libssl/man/SSL_set_fd.3 stable/10/secure/lib/libssl/man/SSL_set_session.3 stable/10/secure/lib/libssl/man/SSL_set_shutdown.3 stable/10/secure/lib/libssl/man/SSL_set_verify_result.3 stable/10/secure/lib/libssl/man/SSL_shutdown.3 stable/10/secure/lib/libssl/man/SSL_state_string.3 stable/10/secure/lib/libssl/man/SSL_want.3 stable/10/secure/lib/libssl/man/SSL_write.3 stable/10/secure/lib/libssl/man/d2i_SSL_SESSION.3 stable/10/secure/lib/libssl/man/ssl.3 stable/10/secure/usr.bin/openssl/man/CA.pl.1 stable/10/secure/usr.bin/openssl/man/asn1parse.1 stable/10/secure/usr.bin/openssl/man/ca.1 stable/10/secure/usr.bin/openssl/man/ciphers.1 stable/10/secure/usr.bin/openssl/man/cms.1 stable/10/secure/usr.bin/openssl/man/crl.1 stable/10/secure/usr.bin/openssl/man/crl2pkcs7.1 stable/10/secure/usr.bin/openssl/man/dgst.1 stable/10/secure/usr.bin/openssl/man/dhparam.1 stable/10/secure/usr.bin/openssl/man/dsa.1 stable/10/secure/usr.bin/openssl/man/dsaparam.1 stable/10/secure/usr.bin/openssl/man/ec.1 stable/10/secure/usr.bin/openssl/man/ecparam.1 stable/10/secure/usr.bin/openssl/man/enc.1 stable/10/secure/usr.bin/openssl/man/errstr.1 stable/10/secure/usr.bin/openssl/man/gendsa.1 stable/10/secure/usr.bin/openssl/man/genpkey.1 stable/10/secure/usr.bin/openssl/man/genrsa.1 stable/10/secure/usr.bin/openssl/man/nseq.1 stable/10/secure/usr.bin/openssl/man/ocsp.1 stable/10/secure/usr.bin/openssl/man/openssl.1 stable/10/secure/usr.bin/openssl/man/passwd.1 stable/10/secure/usr.bin/openssl/man/pkcs12.1 stable/10/secure/usr.bin/openssl/man/pkcs7.1 stable/10/secure/usr.bin/openssl/man/pkcs8.1 stable/10/secure/usr.bin/openssl/man/pkey.1 stable/10/secure/usr.bin/openssl/man/pkeyparam.1 stable/10/secure/usr.bin/openssl/man/pkeyutl.1 stable/10/secure/usr.bin/openssl/man/rand.1 stable/10/secure/usr.bin/openssl/man/req.1 stable/10/secure/usr.bin/openssl/man/rsa.1 stable/10/secure/usr.bin/openssl/man/rsautl.1 stable/10/secure/usr.bin/openssl/man/s_client.1 stable/10/secure/usr.bin/openssl/man/s_server.1 stable/10/secure/usr.bin/openssl/man/s_time.1 stable/10/secure/usr.bin/openssl/man/sess_id.1 stable/10/secure/usr.bin/openssl/man/smime.1 stable/10/secure/usr.bin/openssl/man/speed.1 stable/10/secure/usr.bin/openssl/man/spkac.1 stable/10/secure/usr.bin/openssl/man/ts.1 stable/10/secure/usr.bin/openssl/man/tsget.1 stable/10/secure/usr.bin/openssl/man/verify.1 stable/10/secure/usr.bin/openssl/man/version.1 stable/10/secure/usr.bin/openssl/man/x509.1 stable/10/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/crypto/openssl/CHANGES ============================================================================== --- stable/10/crypto/openssl/CHANGES Thu Aug 7 21:00:16 2014 (r269685) +++ stable/10/crypto/openssl/CHANGES Thu Aug 7 21:04:42 2014 (r269686) @@ -2,6 +2,92 @@ OpenSSL CHANGES _______________ + Changes between 1.0.1h and 1.0.1i [6 Aug 2014] + + *) Fix SRP buffer overrun vulnerability. Invalid parameters passed to the + SRP code can be overrun an internal buffer. Add sanity check that + g, A, B < N to SRP code. + + Thanks to Sean Devlin and Watson Ladd of Cryptography Services, NCC + Group for discovering this issue. + (CVE-2014-3512) + [Steve Henson] + + *) A flaw in the OpenSSL SSL/TLS server code causes the server to negotiate + TLS 1.0 instead of higher protocol versions when the ClientHello message + is badly fragmented. This allows a man-in-the-middle attacker to force a + downgrade to TLS 1.0 even if both the server and the client support a + higher protocol version, by modifying the client's TLS records. + + Thanks to David Benjamin and Adam Langley (Google) for discovering and + researching this issue. + (CVE-2014-3511) + [David Benjamin] + + *) OpenSSL DTLS clients enabling anonymous (EC)DH ciphersuites are subject + to a denial of service attack. A malicious server can crash the client + with a null pointer dereference (read) by specifying an anonymous (EC)DH + ciphersuite and sending carefully crafted handshake messages. + + Thanks to Felix Gr?bert (Google) for discovering and researching this + issue. + (CVE-2014-3510) + [Emilia K?sper] + + *) By sending carefully crafted DTLS packets an attacker could cause openssl + to leak memory. This can be exploited through a Denial of Service attack. + Thanks to Adam Langley for discovering and researching this issue. + (CVE-2014-3507) + [Adam Langley] + + *) An attacker can force openssl to consume large amounts of memory whilst + processing DTLS handshake messages. This can be exploited through a + Denial of Service attack. + Thanks to Adam Langley for discovering and researching this issue. + (CVE-2014-3506) + [Adam Langley] + + *) An attacker can force an error condition which causes openssl to crash + whilst processing DTLS packets due to memory being freed twice. This + can be exploited through a Denial of Service attack. + Thanks to Adam Langley and Wan-Teh Chang for discovering and researching + this issue. + (CVE-2014-3505) + [Adam Langley] + + *) If a multithreaded client connects to a malicious server using a resumed + session and the server sends an ec point format extension it could write + up to 255 bytes to freed memory. + + Thanks to Gabor Tyukasz (LogMeIn Inc) for discovering and researching this + issue. + (CVE-2014-3509) + [Gabor Tyukasz] + + *) A malicious server can crash an OpenSSL client with a null pointer + dereference (read) by specifying an SRP ciphersuite even though it was not + properly negotiated with the client. This can be exploited through a + Denial of Service attack. + + Thanks to Joonas Kuorilehto and Riku Hietam?ki (Codenomicon) for + discovering and researching this issue. + (CVE-2014-5139) + [Steve Henson] + + *) A flaw in OBJ_obj2txt may cause pretty printing functions such as + X509_name_oneline, X509_name_print_ex et al. to leak some information + from the stack. Applications may be affected if they echo pretty printing + output to the attacker. + + Thanks to Ivan Fratric (Google) for discovering this issue. + (CVE-2014-3508) + [Emilia K?sper, and Steve Henson] + + *) Fix ec_GFp_simple_points_make_affine (thus, EC_POINTs_mul etc.) + for corner cases. (Certain input points at infinity could lead to + bogus results, with non-infinity inputs mapped to infinity too.) + [Bodo Moeller] + Changes between 1.0.1g and 1.0.1h [5 Jun 2014] *) Fix for SSL/TLS MITM flaw. An attacker using a carefully crafted Modified: stable/10/crypto/openssl/Configure ============================================================================== --- stable/10/crypto/openssl/Configure Thu Aug 7 21:00:16 2014 (r269685) +++ stable/10/crypto/openssl/Configure Thu Aug 7 21:04:42 2014 (r269686) @@ -720,6 +720,7 @@ my %disabled = ( # "what" => "co "sctp" => "default", "shared" => "default", "store" => "experimental", + "unit-test" => "default", "zlib" => "default", "zlib-dynamic" => "default" ); @@ -727,7 +728,7 @@ my @experimental = (); # This is what $depflags will look like with the above defaults # (we need this to see if we should advise the user to run "make depend"): -my $default_depflags = " -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SCTP -DOPENSSL_NO_STORE"; +my $default_depflags = " -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SCTP -DOPENSSL_NO_STORE -DOPENSSL_NO_UNIT_TEST"; # Explicit "no-..." options will be collected in %disabled along with the defaults. # To remove something from %disabled, use "enable-foo" (unless it's experimental). Modified: stable/10/crypto/openssl/FAQ ============================================================================== --- stable/10/crypto/openssl/FAQ Thu Aug 7 21:00:16 2014 (r269685) +++ stable/10/crypto/openssl/FAQ Thu Aug 7 21:04:42 2014 (r269686) @@ -113,11 +113,6 @@ that came with the version of OpenSSL yo documentation is included in each OpenSSL distribution under the docs directory. -For information on parts of libcrypto that are not yet documented, you -might want to read Ariel Glenn's documentation on SSLeay 0.9, OpenSSL's -predecessor, at . Much -of this still applies to OpenSSL. - There is some documentation about certificate extensions and PKCS#12 in doc/openssl.txt Modified: stable/10/crypto/openssl/Makefile ============================================================================== --- stable/10/crypto/openssl/Makefile Thu Aug 7 21:00:16 2014 (r269685) +++ stable/10/crypto/openssl/Makefile Thu Aug 7 21:04:42 2014 (r269686) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.1h +VERSION=1.0.1i MAJOR=1 MINOR=0.1 SHLIB_VERSION_NUMBER=1.0.0 @@ -13,7 +13,7 @@ SHLIB_MAJOR=1 SHLIB_MINOR=0.0 SHLIB_EXT= PLATFORM=dist -OPTIONS= no-ec_nistp_64_gcc_128 no-gmp no-jpake no-krb5 no-md2 no-rc5 no-rfc3779 no-sctp no-shared no-store no-zlib no-zlib-dynamic static-engine +OPTIONS= no-ec_nistp_64_gcc_128 no-gmp no-jpake no-krb5 no-md2 no-rc5 no-rfc3779 no-sctp no-shared no-store no-unit-test no-zlib no-zlib-dynamic static-engine CONFIGURE_ARGS=dist SHLIB_TARGET= @@ -61,7 +61,7 @@ OPENSSLDIR=/usr/local/ssl CC= cc CFLAG= -O -DEPFLAG= -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SCTP -DOPENSSL_NO_STORE +DEPFLAG= -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SCTP -DOPENSSL_NO_STORE -DOPENSSL_NO_UNIT_TEST PEX_LIBS= EX_LIBS= EXE_EXT= Modified: stable/10/crypto/openssl/NEWS ============================================================================== --- stable/10/crypto/openssl/NEWS Thu Aug 7 21:00:16 2014 (r269685) +++ stable/10/crypto/openssl/NEWS Thu Aug 7 21:04:42 2014 (r269686) @@ -5,10 +5,23 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.0.1h and OpenSSL 1.0.1i [6 Aug 2014] + + o Fix for CVE-2014-3512 + o Fix for CVE-2014-3511 + o Fix for CVE-2014-3510 + o Fix for CVE-2014-3507 + o Fix for CVE-2014-3506 + o Fix for CVE-2014-3505 + o Fix for CVE-2014-3509 + o Fix for CVE-2014-5139 + o Fix for CVE-2014-3508 + Major changes between OpenSSL 1.0.1g and OpenSSL 1.0.1h [5 Jun 2014] o Fix for CVE-2014-0224 o Fix for CVE-2014-0221 + o Fix for CVE-2014-0198 o Fix for CVE-2014-0195 o Fix for CVE-2014-3470 o Fix for CVE-2010-5298 Modified: stable/10/crypto/openssl/README ============================================================================== --- stable/10/crypto/openssl/README Thu Aug 7 21:00:16 2014 (r269685) +++ stable/10/crypto/openssl/README Thu Aug 7 21:04:42 2014 (r269686) @@ -1,5 +1,5 @@ - OpenSSL 1.0.1h 5 Jun 2014 + OpenSSL 1.0.1i 6 Aug 2014 Copyright (c) 1998-2011 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: stable/10/crypto/openssl/apps/apps.c ============================================================================== --- stable/10/crypto/openssl/apps/apps.c Thu Aug 7 21:00:16 2014 (r269685) +++ stable/10/crypto/openssl/apps/apps.c Thu Aug 7 21:04:42 2014 (r269686) @@ -390,6 +390,8 @@ int chopup_args(ARGS *arg, char *buf, in { arg->count=20; arg->data=(char **)OPENSSL_malloc(sizeof(char *)*arg->count); + if (arg->data == NULL) + return 0; } for (i=0; icount; i++) arg->data[i]=NULL; @@ -1542,6 +1544,8 @@ char *make_config_name() len=strlen(t)+strlen(OPENSSL_CONF)+2; p=OPENSSL_malloc(len); + if (p == NULL) + return NULL; BUF_strlcpy(p,t,len); #ifndef OPENSSL_SYS_VMS BUF_strlcat(p,"/",len); Modified: stable/10/crypto/openssl/apps/ca.c ============================================================================== --- stable/10/crypto/openssl/apps/ca.c Thu Aug 7 21:00:16 2014 (r269685) +++ stable/10/crypto/openssl/apps/ca.c Thu Aug 7 21:04:42 2014 (r269686) @@ -1620,12 +1620,14 @@ static int certify(X509 **xret, char *in { ok=0; BIO_printf(bio_err,"Signature verification problems....\n"); + ERR_print_errors(bio_err); goto err; } if (i == 0) { ok=0; BIO_printf(bio_err,"Signature did not match the certificate request\n"); + ERR_print_errors(bio_err); goto err; } else @@ -2777,6 +2779,9 @@ char *make_revocation_str(int rev_type, revtm = X509_gmtime_adj(NULL, 0); + if (!revtm) + return NULL; + i = revtm->length + 1; if (reason) i += strlen(reason) + 1; Modified: stable/10/crypto/openssl/apps/ciphers.c ============================================================================== --- stable/10/crypto/openssl/apps/ciphers.c Thu Aug 7 21:00:16 2014 (r269685) +++ stable/10/crypto/openssl/apps/ciphers.c Thu Aug 7 21:04:42 2014 (r269686) @@ -96,13 +96,7 @@ int MAIN(int argc, char **argv) char buf[512]; BIO *STDout=NULL; -#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3) meth=SSLv23_server_method(); -#elif !defined(OPENSSL_NO_SSL3) - meth=SSLv3_server_method(); -#elif !defined(OPENSSL_NO_SSL2) - meth=SSLv2_server_method(); -#endif apps_startup(); Modified: stable/10/crypto/openssl/apps/crl2p7.c ============================================================================== --- stable/10/crypto/openssl/apps/crl2p7.c Thu Aug 7 21:00:16 2014 (r269685) +++ stable/10/crypto/openssl/apps/crl2p7.c Thu Aug 7 21:04:42 2014 (r269686) @@ -141,7 +141,13 @@ int MAIN(int argc, char **argv) { if (--argc < 1) goto bad; if(!certflst) certflst = sk_OPENSSL_STRING_new_null(); - sk_OPENSSL_STRING_push(certflst,*(++argv)); + if (!certflst) + goto end; + if (!sk_OPENSSL_STRING_push(certflst,*(++argv))) + { + sk_OPENSSL_STRING_free(certflst); + goto end; + } } else { Modified: stable/10/crypto/openssl/apps/enc.c ============================================================================== --- stable/10/crypto/openssl/apps/enc.c Thu Aug 7 21:00:16 2014 (r269685) +++ stable/10/crypto/openssl/apps/enc.c Thu Aug 7 21:04:42 2014 (r269686) @@ -67,7 +67,9 @@ #include #include #include +#ifndef OPENSSL_NO_COMP #include +#endif #include int set_hex(char *in,unsigned char *out,int size); @@ -337,6 +339,12 @@ bad: goto end; } + if (cipher && (EVP_CIPHER_mode(cipher) == EVP_CIPH_XTS_MODE)) + { + BIO_printf(bio_err, "Ciphers in XTS mode are not supported by the enc utility\n"); + goto end; + } + if (md && (dgst=EVP_get_digestbyname(md)) == NULL) { BIO_printf(bio_err,"%s is an unsupported message digest type\n",md); Modified: stable/10/crypto/openssl/apps/ocsp.c ============================================================================== --- stable/10/crypto/openssl/apps/ocsp.c Thu Aug 7 21:00:16 2014 (r269685) +++ stable/10/crypto/openssl/apps/ocsp.c Thu Aug 7 21:04:42 2014 (r269686) @@ -1419,7 +1419,7 @@ OCSP_RESPONSE *process_responder(BIO *er } resp = query_responder(err, cbio, path, headers, req, req_timeout); if (!resp) - BIO_printf(bio_err, "Error querying OCSP responsder\n"); + BIO_printf(bio_err, "Error querying OCSP responder\n"); end: if (cbio) BIO_free_all(cbio); Modified: stable/10/crypto/openssl/apps/progs.h ============================================================================== --- stable/10/crypto/openssl/apps/progs.h Thu Aug 7 21:00:16 2014 (r269685) +++ stable/10/crypto/openssl/apps/progs.h Thu Aug 7 21:04:42 2014 (r269686) @@ -107,16 +107,16 @@ FUNCTION functions[] = { {FUNC_TYPE_GENERAL,"gendsa",gendsa_main}, #endif {FUNC_TYPE_GENERAL,"genpkey",genpkey_main}, -#if !defined(OPENSSL_NO_SOCK) && !(defined(OPENSSL_NO_SSL2) && defined(OPENSSL_NO_SSL3)) +#if !defined(OPENSSL_NO_SOCK) {FUNC_TYPE_GENERAL,"s_server",s_server_main}, #endif -#if !defined(OPENSSL_NO_SOCK) && !(defined(OPENSSL_NO_SSL2) && defined(OPENSSL_NO_SSL3)) +#if !defined(OPENSSL_NO_SOCK) {FUNC_TYPE_GENERAL,"s_client",s_client_main}, #endif #ifndef OPENSSL_NO_SPEED {FUNC_TYPE_GENERAL,"speed",speed_main}, #endif -#if !defined(OPENSSL_NO_SOCK) && !(defined(OPENSSL_NO_SSL2) && defined(OPENSSL_NO_SSL3)) +#if !defined(OPENSSL_NO_SOCK) {FUNC_TYPE_GENERAL,"s_time",s_time_main}, #endif {FUNC_TYPE_GENERAL,"version",version_main}, @@ -126,7 +126,7 @@ FUNCTION functions[] = { #endif {FUNC_TYPE_GENERAL,"crl2pkcs7",crl2pkcs7_main}, {FUNC_TYPE_GENERAL,"sess_id",sess_id_main}, -#if !defined(OPENSSL_NO_SOCK) && !(defined(OPENSSL_NO_SSL2) && defined(OPENSSL_NO_SSL3)) +#if !defined(OPENSSL_NO_SOCK) {FUNC_TYPE_GENERAL,"ciphers",ciphers_main}, #endif {FUNC_TYPE_GENERAL,"nseq",nseq_main}, Modified: stable/10/crypto/openssl/apps/progs.pl ============================================================================== --- stable/10/crypto/openssl/apps/progs.pl Thu Aug 7 21:00:16 2014 (r269685) +++ stable/10/crypto/openssl/apps/progs.pl Thu Aug 7 21:04:42 2014 (r269686) @@ -32,7 +32,7 @@ foreach (@ARGV) push(@files,$_); $str="\t{FUNC_TYPE_GENERAL,\"$_\",${_}_main},\n"; if (($_ =~ /^s_/) || ($_ =~ /^ciphers$/)) - { print "#if !defined(OPENSSL_NO_SOCK) && !(defined(OPENSSL_NO_SSL2) && defined(OPENSSL_NO_SSL3))\n${str}#endif\n"; } + { print "#if !defined(OPENSSL_NO_SOCK)\n${str}#endif\n"; } elsif ( ($_ =~ /^speed$/)) { print "#ifndef OPENSSL_NO_SPEED\n${str}#endif\n"; } elsif ( ($_ =~ /^engine$/)) Modified: stable/10/crypto/openssl/apps/s_client.c ============================================================================== --- stable/10/crypto/openssl/apps/s_client.c Thu Aug 7 21:00:16 2014 (r269685) +++ stable/10/crypto/openssl/apps/s_client.c Thu Aug 7 21:04:42 2014 (r269686) @@ -290,6 +290,7 @@ static void sc_usage(void) BIO_printf(bio_err," -connect host:port - who to connect to (default is %s:%s)\n",SSL_HOST_NAME,PORT_STR); BIO_printf(bio_err," -verify arg - turn on peer certificate verification\n"); + BIO_printf(bio_err," -verify_return_error - return verification errors\n"); BIO_printf(bio_err," -cert arg - certificate file to use, PEM format assumed\n"); BIO_printf(bio_err," -certform arg - certificate format (PEM or DER) PEM default\n"); BIO_printf(bio_err," -key arg - Private key file to use, in cert file if\n"); @@ -300,6 +301,7 @@ static void sc_usage(void) BIO_printf(bio_err," -CAfile arg - PEM format file of CA's\n"); BIO_printf(bio_err," -reconnect - Drop and re-make the connection with the same Session-ID\n"); BIO_printf(bio_err," -pause - sleep(1) after each read(2) and write(2) system call\n"); + BIO_printf(bio_err," -prexit - print session information even on connection failure\n"); BIO_printf(bio_err," -showcerts - show all certificates in the chain\n"); BIO_printf(bio_err," -debug - extra output\n"); #ifdef WATT32 Modified: stable/10/crypto/openssl/apps/s_server.c ============================================================================== --- stable/10/crypto/openssl/apps/s_server.c Thu Aug 7 21:00:16 2014 (r269685) +++ stable/10/crypto/openssl/apps/s_server.c Thu Aug 7 21:04:42 2014 (r269686) @@ -463,6 +463,7 @@ static void sv_usage(void) BIO_printf(bio_err," -context arg - set session ID context\n"); BIO_printf(bio_err," -verify arg - turn on peer certificate verification\n"); BIO_printf(bio_err," -Verify arg - turn on peer certificate verification, must have a cert.\n"); + BIO_printf(bio_err," -verify_return_error - return verification errors\n"); BIO_printf(bio_err," -cert arg - certificate file to use\n"); BIO_printf(bio_err," (default is %s)\n",TEST_CERT); BIO_printf(bio_err," -crl_check - check the peer certificate has not been revoked by its CA.\n" \ @@ -534,6 +535,7 @@ static void sv_usage(void) BIO_printf(bio_err," -no_ecdhe - Disable ephemeral ECDH\n"); #endif BIO_printf(bio_err," -bugs - Turn on SSL bug compatibility\n"); + BIO_printf(bio_err," -hack - workaround for early Netscape code\n"); BIO_printf(bio_err," -www - Respond to a 'GET /' with a status page\n"); BIO_printf(bio_err," -WWW - Respond to a 'GET / HTTP/1.0' with file ./\n"); BIO_printf(bio_err," -HTTP - Respond to a 'GET / HTTP/1.0' with file ./\n"); @@ -562,6 +564,10 @@ static void sv_usage(void) #endif BIO_printf(bio_err," -keymatexport label - Export keying material using label\n"); BIO_printf(bio_err," -keymatexportlen len - Export len bytes of keying material (default 20)\n"); + BIO_printf(bio_err," -status - respond to certificate status requests\n"); + BIO_printf(bio_err," -status_verbose - enable status request verbose printout\n"); + BIO_printf(bio_err," -status_timeout n - status request responder timeout\n"); + BIO_printf(bio_err," -status_url URL - status request fallback URL\n"); } static int local_argc=0; @@ -739,7 +745,7 @@ static int MS_CALLBACK ssl_servername_cb if (servername) { - if (strcmp(servername,p->servername)) + if (strcasecmp(servername,p->servername)) return p->extension_error; if (ctx2) { @@ -1356,6 +1362,14 @@ bad: sv_usage(); goto end; } +#ifndef OPENSSL_NO_DTLS1 + if (www && socket_type == SOCK_DGRAM) + { + BIO_printf(bio_err, + "Can't use -HTTP, -www or -WWW with DTLS\n"); + goto end; + } +#endif #if !defined(OPENSSL_NO_JPAKE) && !defined(OPENSSL_NO_PSK) if (jpake_secret) Modified: stable/10/crypto/openssl/crypto/asn1/a_object.c ============================================================================== --- stable/10/crypto/openssl/crypto/asn1/a_object.c Thu Aug 7 21:00:16 2014 (r269685) +++ stable/10/crypto/openssl/crypto/asn1/a_object.c Thu Aug 7 21:04:42 2014 (r269686) @@ -283,17 +283,29 @@ err: ASN1err(ASN1_F_D2I_ASN1_OBJECT,i); return(NULL); } + ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp, long len) { ASN1_OBJECT *ret=NULL; const unsigned char *p; unsigned char *data; - int i; - /* Sanity check OID encoding: can't have leading 0x80 in - * subidentifiers, see: X.690 8.19.2 + int i, length; + + /* Sanity check OID encoding. + * Need at least one content octet. + * MSB must be clear in the last octet. + * can't have leading 0x80 in subidentifiers, see: X.690 8.19.2 */ - for (i = 0, p = *pp; i < len; i++, p++) + if (len <= 0 || len > INT_MAX || pp == NULL || (p = *pp) == NULL || + p[len - 1] & 0x80) + { + ASN1err(ASN1_F_C2I_ASN1_OBJECT,ASN1_R_INVALID_OBJECT_ENCODING); + return NULL; + } + /* Now 0 < len <= INT_MAX, so the cast is safe. */ + length = (int)len; + for (i = 0; i < length; i++, p++) { if (*p == 0x80 && (!i || !(p[-1] & 0x80))) { @@ -316,23 +328,23 @@ ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT data = (unsigned char *)ret->data; ret->data = NULL; /* once detached we can change it */ - if ((data == NULL) || (ret->length < len)) + if ((data == NULL) || (ret->length < length)) { ret->length=0; if (data != NULL) OPENSSL_free(data); - data=(unsigned char *)OPENSSL_malloc(len ? (int)len : 1); + data=(unsigned char *)OPENSSL_malloc(length); if (data == NULL) { i=ERR_R_MALLOC_FAILURE; goto err; } ret->flags|=ASN1_OBJECT_FLAG_DYNAMIC_DATA; } - memcpy(data,p,(int)len); + memcpy(data,p,length); /* reattach data to object, after which it remains const */ ret->data =data; - ret->length=(int)len; + ret->length=length; ret->sn=NULL; ret->ln=NULL; /* ret->flags=ASN1_OBJECT_FLAG_DYNAMIC; we know it is dynamic */ - p+=len; + p+=length; if (a != NULL) (*a)=ret; *pp=p; Modified: stable/10/crypto/openssl/crypto/asn1/a_utctm.c ============================================================================== --- stable/10/crypto/openssl/crypto/asn1/a_utctm.c Thu Aug 7 21:00:16 2014 (r269685) +++ stable/10/crypto/openssl/crypto/asn1/a_utctm.c Thu Aug 7 21:04:42 2014 (r269686) @@ -196,24 +196,29 @@ ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCT struct tm *ts; struct tm data; size_t len = 20; + int free_s = 0; if (s == NULL) + { + free_s = 1; s=M_ASN1_UTCTIME_new(); + } if (s == NULL) - return(NULL); + goto err; + ts=OPENSSL_gmtime(&t, &data); if (ts == NULL) - return(NULL); + goto err; if (offset_day || offset_sec) { if (!OPENSSL_gmtime_adj(ts, offset_day, offset_sec)) - return NULL; + goto err; } if((ts->tm_year < 50) || (ts->tm_year >= 150)) - return NULL; + goto err; p=(char *)s->data; if ((p == NULL) || ((size_t)s->length < len)) @@ -222,7 +227,7 @@ ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCT if (p == NULL) { ASN1err(ASN1_F_ASN1_UTCTIME_ADJ,ERR_R_MALLOC_FAILURE); - return(NULL); + goto err; } if (s->data != NULL) OPENSSL_free(s->data); @@ -237,6 +242,10 @@ ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCT ebcdic2ascii(s->data, s->data, s->length); #endif return(s); + err: + if (free_s && s) + M_ASN1_UTCTIME_free(s); + return NULL; } @@ -261,6 +270,11 @@ int ASN1_UTCTIME_cmp_time_t(const ASN1_U t -= offset*60; /* FIXME: may overflow in extreme cases */ tm = OPENSSL_gmtime(&t, &data); + /* NB: -1, 0, 1 already valid return values so use -2 to + * indicate error. + */ + if (tm == NULL) + return -2; #define return_cmp(a,b) if ((a)<(b)) return -1; else if ((a)>(b)) return 1 year = g2(s->data); Modified: stable/10/crypto/openssl/crypto/asn1/ameth_lib.c ============================================================================== --- stable/10/crypto/openssl/crypto/asn1/ameth_lib.c Thu Aug 7 21:00:16 2014 (r269685) +++ stable/10/crypto/openssl/crypto/asn1/ameth_lib.c Thu Aug 7 21:04:42 2014 (r269686) @@ -258,7 +258,12 @@ int EVP_PKEY_asn1_add_alias(int to, int if (!ameth) return 0; ameth->pkey_base_id = to; - return EVP_PKEY_asn1_add0(ameth); + if (!EVP_PKEY_asn1_add0(ameth)) + { + EVP_PKEY_asn1_free(ameth); + return 0; + } + return 1; } int EVP_PKEY_asn1_get0_info(int *ppkey_id, int *ppkey_base_id, int *ppkey_flags, Modified: stable/10/crypto/openssl/crypto/asn1/asn1_lib.c ============================================================================== --- stable/10/crypto/openssl/crypto/asn1/asn1_lib.c Thu Aug 7 21:00:16 2014 (r269685) +++ stable/10/crypto/openssl/crypto/asn1/asn1_lib.c Thu Aug 7 21:04:42 2014 (r269686) @@ -131,6 +131,9 @@ int ASN1_get_object(const unsigned char *pclass=xclass; if (!asn1_get_length(&p,&inf,plength,(int)max)) goto err; + if (inf && !(ret & V_ASN1_CONSTRUCTED)) + goto err; + #if 0 fprintf(stderr,"p=%d + *plength=%ld > omax=%ld + *pp=%d (%d > %d)\n", (int)p,*plength,omax,(int)*pp,(int)(p+ *plength), Modified: stable/10/crypto/openssl/crypto/asn1/asn_mime.c ============================================================================== --- stable/10/crypto/openssl/crypto/asn1/asn_mime.c Thu Aug 7 21:00:16 2014 (r269685) +++ stable/10/crypto/openssl/crypto/asn1/asn_mime.c Thu Aug 7 21:04:42 2014 (r269686) @@ -667,6 +667,8 @@ static STACK_OF(MIME_HEADER) *mime_parse int len, state, save_state = 0; headers = sk_MIME_HEADER_new(mime_hdr_cmp); + if (!headers) + return NULL; while ((len = BIO_gets(bio, linebuf, MAX_SMLEN)) > 0) { /* If whitespace at line start then continuation line */ if(mhdr && isspace((unsigned char)linebuf[0])) state = MIME_NAME; Modified: stable/10/crypto/openssl/crypto/asn1/asn_pack.c ============================================================================== --- stable/10/crypto/openssl/crypto/asn1/asn_pack.c Thu Aug 7 21:00:16 2014 (r269685) +++ stable/10/crypto/openssl/crypto/asn1/asn_pack.c Thu Aug 7 21:04:42 2014 (r269686) @@ -134,15 +134,23 @@ ASN1_STRING *ASN1_pack_string(void *obj, if (!(octmp->length = i2d(obj, NULL))) { ASN1err(ASN1_F_ASN1_PACK_STRING,ASN1_R_ENCODE_ERROR); - return NULL; + goto err; } if (!(p = OPENSSL_malloc (octmp->length))) { ASN1err(ASN1_F_ASN1_PACK_STRING,ERR_R_MALLOC_FAILURE); - return NULL; + goto err; } octmp->data = p; i2d (obj, &p); return octmp; + err: + if (!oct || !*oct) + { + ASN1_STRING_free(octmp); + if (oct) + *oct = NULL; + } + return NULL; } #endif Modified: stable/10/crypto/openssl/crypto/asn1/bio_asn1.c ============================================================================== --- stable/10/crypto/openssl/crypto/asn1/bio_asn1.c Thu Aug 7 21:00:16 2014 (r269685) +++ stable/10/crypto/openssl/crypto/asn1/bio_asn1.c Thu Aug 7 21:04:42 2014 (r269686) @@ -154,7 +154,10 @@ static int asn1_bio_new(BIO *b) if (!ctx) return 0; if (!asn1_bio_init(ctx, DEFAULT_ASN1_BUF_SIZE)) + { + OPENSSL_free(ctx); return 0; + } b->init = 1; b->ptr = (char *)ctx; b->flags = 0; Modified: stable/10/crypto/openssl/crypto/asn1/charmap.pl ============================================================================== --- stable/10/crypto/openssl/crypto/asn1/charmap.pl Thu Aug 7 21:00:16 2014 (r269685) +++ stable/10/crypto/openssl/crypto/asn1/charmap.pl Thu Aug 7 21:04:42 2014 (r269686) @@ -1,5 +1,8 @@ #!/usr/local/bin/perl -w +# Written by Dr Stephen N Henson (steve at openssl.org). +# Licensed under the terms of the OpenSSL license. + use strict; my ($i, @arr); Modified: stable/10/crypto/openssl/crypto/asn1/evp_asn1.c ============================================================================== --- stable/10/crypto/openssl/crypto/asn1/evp_asn1.c Thu Aug 7 21:00:16 2014 (r269685) +++ stable/10/crypto/openssl/crypto/asn1/evp_asn1.c Thu Aug 7 21:04:42 2014 (r269686) @@ -66,7 +66,11 @@ int ASN1_TYPE_set_octetstring(ASN1_TYPE ASN1_STRING *os; if ((os=M_ASN1_OCTET_STRING_new()) == NULL) return(0); - if (!M_ASN1_OCTET_STRING_set(os,data,len)) return(0); + if (!M_ASN1_OCTET_STRING_set(os,data,len)) + { + M_ASN1_OCTET_STRING_free(os); + return 0; + } ASN1_TYPE_set(a,V_ASN1_OCTET_STRING,os); return(1); } Modified: stable/10/crypto/openssl/crypto/asn1/t_x509.c ============================================================================== --- stable/10/crypto/openssl/crypto/asn1/t_x509.c Thu Aug 7 21:00:16 2014 (r269685) +++ stable/10/crypto/openssl/crypto/asn1/t_x509.c Thu Aug 7 21:04:42 2014 (r269686) @@ -475,6 +475,8 @@ int X509_NAME_print(BIO *bp, X509_NAME * l=80-2-obase; b=X509_NAME_oneline(name,NULL,0); + if (!b) + return 0; if (!*b) { OPENSSL_free(b); Modified: stable/10/crypto/openssl/crypto/asn1/tasn_enc.c ============================================================================== --- stable/10/crypto/openssl/crypto/asn1/tasn_enc.c Thu Aug 7 21:00:16 2014 (r269685) +++ stable/10/crypto/openssl/crypto/asn1/tasn_enc.c Thu Aug 7 21:04:42 2014 (r269686) @@ -453,9 +453,14 @@ static int asn1_set_seq_out(STACK_OF(ASN { derlst = OPENSSL_malloc(sk_ASN1_VALUE_num(sk) * sizeof(*derlst)); + if (!derlst) + return 0; tmpdat = OPENSSL_malloc(skcontlen); - if (!derlst || !tmpdat) + if (!tmpdat) + { + OPENSSL_free(derlst); return 0; + } } } /* If not sorting just output each item */ Modified: stable/10/crypto/openssl/crypto/asn1/x_crl.c ============================================================================== --- stable/10/crypto/openssl/crypto/asn1/x_crl.c Thu Aug 7 21:00:16 2014 (r269685) +++ stable/10/crypto/openssl/crypto/asn1/x_crl.c Thu Aug 7 21:04:42 2014 (r269686) @@ -270,6 +270,7 @@ static int crl_cb(int operation, ASN1_VA { /* We handle IDP and deltas */ if ((nid == NID_issuing_distribution_point) + || (nid == NID_authority_key_identifier) || (nid == NID_delta_crl)) break;; crl->flags |= EXFLAG_CRITICAL; Modified: stable/10/crypto/openssl/crypto/bio/bio_lib.c ============================================================================== --- stable/10/crypto/openssl/crypto/bio/bio_lib.c Thu Aug 7 21:00:16 2014 (r269685) +++ stable/10/crypto/openssl/crypto/bio/bio_lib.c Thu Aug 7 21:04:42 2014 (r269686) @@ -132,8 +132,8 @@ int BIO_free(BIO *a) CRYPTO_free_ex_data(CRYPTO_EX_INDEX_BIO, a, &a->ex_data); - if ((a->method == NULL) || (a->method->destroy == NULL)) return(1); - a->method->destroy(a); + if ((a->method != NULL) && (a->method->destroy != NULL)) + a->method->destroy(a); OPENSSL_free(a); return(1); } Modified: stable/10/crypto/openssl/crypto/bn/bn_exp.c ============================================================================== --- stable/10/crypto/openssl/crypto/bn/bn_exp.c Thu Aug 7 21:00:16 2014 (r269685) +++ stable/10/crypto/openssl/crypto/bn/bn_exp.c Thu Aug 7 21:04:42 2014 (r269686) @@ -680,7 +680,7 @@ int BN_mod_exp_mont_consttime(BIGNUM *rr /* Dedicated window==4 case improves 512-bit RSA sign by ~15%, but as * 512-bit RSA is hardly relevant, we omit it to spare size... */ - if (window==5) + if (window==5 && top>1) { void bn_mul_mont_gather5(BN_ULONG *rp,const BN_ULONG *ap, const void *table,const BN_ULONG *np, Modified: stable/10/crypto/openssl/crypto/bn/bn_lib.c ============================================================================== --- stable/10/crypto/openssl/crypto/bn/bn_lib.c Thu Aug 7 21:00:16 2014 (r269685) +++ stable/10/crypto/openssl/crypto/bn/bn_lib.c Thu Aug 7 21:04:42 2014 (r269686) @@ -320,6 +320,15 @@ static BN_ULONG *bn_expand_internal(cons BNerr(BN_F_BN_EXPAND_INTERNAL,ERR_R_MALLOC_FAILURE); return(NULL); } +#ifdef PURIFY + /* Valgrind complains in BN_consttime_swap because we process the whole + * array even if it's not initialised yet. This doesn't matter in that + * function - what's important is constant time operation (we're not + * actually going to use the data) + */ + memset(a, 0, sizeof(BN_ULONG)*words); +#endif + #if 1 B=b->d; /* Check if the previous number needs to be copied */ Modified: stable/10/crypto/openssl/crypto/bn/bn_sqr.c ============================================================================== --- stable/10/crypto/openssl/crypto/bn/bn_sqr.c Thu Aug 7 21:00:16 2014 (r269685) +++ stable/10/crypto/openssl/crypto/bn/bn_sqr.c Thu Aug 7 21:04:42 2014 (r269686) @@ -77,6 +77,7 @@ int BN_sqr(BIGNUM *r, const BIGNUM *a, B if (al <= 0) { r->top=0; + r->neg = 0; return 1; } Modified: stable/10/crypto/openssl/crypto/cms/cms_pwri.c ============================================================================== --- stable/10/crypto/openssl/crypto/cms/cms_pwri.c Thu Aug 7 21:00:16 2014 (r269685) +++ stable/10/crypto/openssl/crypto/cms/cms_pwri.c Thu Aug 7 21:04:42 2014 (r269686) @@ -93,9 +93,10 @@ CMS_RecipientInfo *CMS_add0_recipient_pa X509_ALGOR *encalg = NULL; unsigned char iv[EVP_MAX_IV_LENGTH]; int ivlen; + env = cms_get0_enveloped(cms); if (!env) - goto err; + return NULL; if (wrap_nid <= 0) wrap_nid = NID_id_alg_PWRI_KEK; Modified: stable/10/crypto/openssl/crypto/conf/conf_def.c ============================================================================== --- stable/10/crypto/openssl/crypto/conf/conf_def.c Thu Aug 7 21:00:16 2014 (r269685) +++ stable/10/crypto/openssl/crypto/conf/conf_def.c Thu Aug 7 21:04:42 2014 (r269686) @@ -321,7 +321,7 @@ again: p=eat_ws(conf, end); if (*p != ']') { - if (*p != '\0') + if (*p != '\0' && ss != p) { ss=p; goto again; Modified: stable/10/crypto/openssl/crypto/ec/ec_lib.c ============================================================================== --- stable/10/crypto/openssl/crypto/ec/ec_lib.c Thu Aug 7 21:00:16 2014 (r269685) +++ stable/10/crypto/openssl/crypto/ec/ec_lib.c Thu Aug 7 21:04:42 2014 (r269686) @@ -942,7 +942,7 @@ int EC_POINT_dbl(const EC_GROUP *group, int EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx) { - if (group->meth->dbl == 0) + if (group->meth->invert == 0) { ECerr(EC_F_EC_POINT_INVERT, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); return 0; Modified: stable/10/crypto/openssl/crypto/ec/ecp_smpl.c ============================================================================== --- stable/10/crypto/openssl/crypto/ec/ecp_smpl.c Thu Aug 7 21:00:16 2014 (r269685) +++ stable/10/crypto/openssl/crypto/ec/ecp_smpl.c Thu Aug 7 21:04:42 2014 (r269686) @@ -1181,9 +1181,8 @@ int ec_GFp_simple_make_affine(const EC_G int ec_GFp_simple_points_make_affine(const EC_GROUP *group, size_t num, EC_POINT *points[], BN_CTX *ctx) { BN_CTX *new_ctx = NULL; - BIGNUM *tmp0, *tmp1; - size_t pow2 = 0; - BIGNUM **heap = NULL; + BIGNUM *tmp, *tmp_Z; + BIGNUM **prod_Z = NULL; size_t i; int ret = 0; @@ -1198,124 +1197,104 @@ int ec_GFp_simple_points_make_affine(con } BN_CTX_start(ctx); - tmp0 = BN_CTX_get(ctx); - tmp1 = BN_CTX_get(ctx); - if (tmp0 == NULL || tmp1 == NULL) goto err; - - /* Before converting the individual points, compute inverses of all Z values. - * Modular inversion is rather slow, but luckily we can do with a single - * explicit inversion, plus about 3 multiplications per input value. - */ - - pow2 = 1; - while (num > pow2) - pow2 <<= 1; - /* Now pow2 is the smallest power of 2 satifsying pow2 >= num. - * We need twice that. */ - pow2 <<= 1; - - heap = OPENSSL_malloc(pow2 * sizeof heap[0]); - if (heap == NULL) goto err; - - /* The array is used as a binary tree, exactly as in heapsort: - * - * heap[1] - * heap[2] heap[3] - * heap[4] heap[5] heap[6] heap[7] - * heap[8]heap[9] heap[10]heap[11] heap[12]heap[13] heap[14] heap[15] - * - * We put the Z's in the last line; - * then we set each other node to the product of its two child-nodes (where - * empty or 0 entries are treated as ones); - * then we invert heap[1]; - * then we invert each other node by replacing it by the product of its - * parent (after inversion) and its sibling (before inversion). - */ - heap[0] = NULL; - for (i = pow2/2 - 1; i > 0; i--) - heap[i] = NULL; + tmp = BN_CTX_get(ctx); + tmp_Z = BN_CTX_get(ctx); + if (tmp == NULL || tmp_Z == NULL) goto err; + + prod_Z = OPENSSL_malloc(num * sizeof prod_Z[0]); + if (prod_Z == NULL) goto err; for (i = 0; i < num; i++) - heap[pow2/2 + i] = &points[i]->Z; - for (i = pow2/2 + num; i < pow2; i++) - heap[i] = NULL; - - /* set each node to the product of its children */ - for (i = pow2/2 - 1; i > 0; i--) - { - heap[i] = BN_new(); - if (heap[i] == NULL) goto err; - - if (heap[2*i] != NULL) + { + prod_Z[i] = BN_new(); + if (prod_Z[i] == NULL) goto err; + } + + /* Set each prod_Z[i] to the product of points[0]->Z .. points[i]->Z, + * skipping any zero-valued inputs (pretend that they're 1). */ + + if (!BN_is_zero(&points[0]->Z)) + { + if (!BN_copy(prod_Z[0], &points[0]->Z)) goto err; + } + else + { + if (group->meth->field_set_to_one != 0) { - if ((heap[2*i + 1] == NULL) || BN_is_zero(heap[2*i + 1])) - { - if (!BN_copy(heap[i], heap[2*i])) goto err; - } - else - { - if (BN_is_zero(heap[2*i])) - { - if (!BN_copy(heap[i], heap[2*i + 1])) goto err; - } - else - { - if (!group->meth->field_mul(group, heap[i], - heap[2*i], heap[2*i + 1], ctx)) goto err; - } - } + if (!group->meth->field_set_to_one(group, prod_Z[0], ctx)) goto err; + } + else + { + if (!BN_one(prod_Z[0])) goto err; } } - /* invert heap[1] */ - if (!BN_is_zero(heap[1])) + for (i = 1; i < num; i++) { - if (!BN_mod_inverse(heap[1], heap[1], &group->field, ctx)) + if (!BN_is_zero(&points[i]->Z)) { - ECerr(EC_F_EC_GFP_SIMPLE_POINTS_MAKE_AFFINE, ERR_R_BN_LIB); - goto err; + if (!group->meth->field_mul(group, prod_Z[i], prod_Z[i - 1], &points[i]->Z, ctx)) goto err; } + else + { + if (!BN_copy(prod_Z[i], prod_Z[i - 1])) goto err; + } + } + + /* Now use a single explicit inversion to replace every + * non-zero points[i]->Z by its inverse. */ + + if (!BN_mod_inverse(tmp, prod_Z[num - 1], &group->field, ctx)) + { + ECerr(EC_F_EC_GFP_SIMPLE_POINTS_MAKE_AFFINE, ERR_R_BN_LIB); + goto err; } if (group->meth->field_encode != 0) { - /* in the Montgomery case, we just turned R*H (representing H) + /* In the Montgomery case, we just turned R*H (representing H) * into 1/(R*H), but we need R*(1/H) (representing 1/H); - * i.e. we have need to multiply by the Montgomery factor twice */ - if (!group->meth->field_encode(group, heap[1], heap[1], ctx)) goto err; - if (!group->meth->field_encode(group, heap[1], heap[1], ctx)) goto err; + * i.e. we need to multiply by the Montgomery factor twice. */ + if (!group->meth->field_encode(group, tmp, tmp, ctx)) goto err; + if (!group->meth->field_encode(group, tmp, tmp, ctx)) goto err; } - /* set other heap[i]'s to their inverses */ - for (i = 2; i < pow2/2 + num; i += 2) + for (i = num - 1; i > 0; --i) { - /* i is even */ - if ((heap[i + 1] != NULL) && !BN_is_zero(heap[i + 1])) - { - if (!group->meth->field_mul(group, tmp0, heap[i/2], heap[i + 1], ctx)) goto err; - if (!group->meth->field_mul(group, tmp1, heap[i/2], heap[i], ctx)) goto err; - if (!BN_copy(heap[i], tmp0)) goto err; - if (!BN_copy(heap[i + 1], tmp1)) goto err; - } - else + /* Loop invariant: tmp is the product of the inverses of + * points[0]->Z .. points[i]->Z (zero-valued inputs skipped). */ + if (!BN_is_zero(&points[i]->Z)) { - if (!BN_copy(heap[i], heap[i/2])) goto err; + /* Set tmp_Z to the inverse of points[i]->Z (as product + * of Z inverses 0 .. i, Z values 0 .. i - 1). */ + if (!group->meth->field_mul(group, tmp_Z, prod_Z[i - 1], tmp, ctx)) goto err; + /* Update tmp to satisfy the loop invariant for i - 1. */ + if (!group->meth->field_mul(group, tmp, tmp, &points[i]->Z, ctx)) goto err; + /* Replace points[i]->Z by its inverse. */ + if (!BN_copy(&points[i]->Z, tmp_Z)) goto err; } } - /* we have replaced all non-zero Z's by their inverses, now fix up all the points */ + if (!BN_is_zero(&points[0]->Z)) + { + /* Replace points[0]->Z by its inverse. */ + if (!BN_copy(&points[0]->Z, tmp)) goto err; + } + + /* Finally, fix up the X and Y coordinates for all points. */ + for (i = 0; i < num; i++) { EC_POINT *p = points[i]; - + if (!BN_is_zero(&p->Z)) { /* turn (X, Y, 1/Z) into (X/Z^2, Y/Z^3, 1) */ - if (!group->meth->field_sqr(group, tmp1, &p->Z, ctx)) goto err; - if (!group->meth->field_mul(group, &p->X, &p->X, tmp1, ctx)) goto err; + if (!group->meth->field_sqr(group, tmp, &p->Z, ctx)) goto err; + if (!group->meth->field_mul(group, &p->X, &p->X, tmp, ctx)) goto err; + + if (!group->meth->field_mul(group, tmp, tmp, &p->Z, ctx)) goto err; + if (!group->meth->field_mul(group, &p->Y, &p->Y, tmp, ctx)) goto err; - if (!group->meth->field_mul(group, tmp1, tmp1, &p->Z, ctx)) goto err; - if (!group->meth->field_mul(group, &p->Y, &p->Y, tmp1, ctx)) goto err; - if (group->meth->field_set_to_one != 0) { if (!group->meth->field_set_to_one(group, &p->Z, ctx)) goto err; @@ -1329,20 +1308,19 @@ int ec_GFp_simple_points_make_affine(con } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From jkim at FreeBSD.org Thu Aug 7 21:06:42 2014 From: jkim at FreeBSD.org (Jung-uk Kim) Date: Thu, 7 Aug 2014 21:06:35 +0000 (UTC) Subject: svn commit: r269687 - in stable: 8/crypto/openssl 8/crypto/openssl/apps 8/crypto/openssl/crypto 8/crypto/openssl/crypto/asn1 8/crypto/openssl/crypto/bio 8/crypto/openssl/crypto/bn 8/crypto/openssl/... Message-ID: <53e3ea5b.20d5.4df5807d@svn.freebsd.org> Author: jkim Date: Thu Aug 7 21:06:34 2014 New Revision: 269687 URL: http://svnweb.freebsd.org/changeset/base/269687 Log: Merge OpenSSL 0.9.8zb. Added: stable/8/crypto/openssl/doc/ssl/SSL_CTX_set_tlsext_ticket_key_cb.pod - copied unchanged from r269672, vendor-crypto/openssl/dist-0.9.8/doc/ssl/SSL_CTX_set_tlsext_ticket_key_cb.pod stable/8/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 (contents, props changed) Deleted: stable/8/crypto/openssl/crypto/pkcs7/bio_ber.c stable/8/crypto/openssl/crypto/pkcs7/dec.c stable/8/crypto/openssl/crypto/pkcs7/des.pem stable/8/crypto/openssl/crypto/pkcs7/doc stable/8/crypto/openssl/crypto/pkcs7/enc.c stable/8/crypto/openssl/crypto/pkcs7/es1.pem stable/8/crypto/openssl/crypto/pkcs7/example.c stable/8/crypto/openssl/crypto/pkcs7/example.h stable/8/crypto/openssl/crypto/pkcs7/info.pem stable/8/crypto/openssl/crypto/pkcs7/infokey.pem stable/8/crypto/openssl/crypto/pkcs7/p7/ stable/8/crypto/openssl/crypto/pkcs7/server.pem stable/8/crypto/openssl/crypto/pkcs7/sign.c stable/8/crypto/openssl/crypto/pkcs7/t/ stable/8/crypto/openssl/crypto/pkcs7/verify.c stable/8/crypto/openssl/demos/eay/ stable/8/crypto/openssl/demos/maurice/ Modified: stable/8/crypto/openssl/CHANGES stable/8/crypto/openssl/FAQ stable/8/crypto/openssl/Makefile stable/8/crypto/openssl/NEWS stable/8/crypto/openssl/README stable/8/crypto/openssl/apps/apps.c stable/8/crypto/openssl/apps/ca.c stable/8/crypto/openssl/apps/crl2p7.c stable/8/crypto/openssl/apps/ocsp.c stable/8/crypto/openssl/apps/s_server.c stable/8/crypto/openssl/apps/speed.c stable/8/crypto/openssl/crypto/asn1/a_object.c stable/8/crypto/openssl/crypto/asn1/asn1_lib.c stable/8/crypto/openssl/crypto/asn1/asn_mime.c stable/8/crypto/openssl/crypto/asn1/asn_pack.c stable/8/crypto/openssl/crypto/asn1/evp_asn1.c stable/8/crypto/openssl/crypto/asn1/t_x509.c stable/8/crypto/openssl/crypto/asn1/tasn_enc.c stable/8/crypto/openssl/crypto/bio/bio_lib.c stable/8/crypto/openssl/crypto/bn/bn_gf2m.c stable/8/crypto/openssl/crypto/bn/bn_lib.c stable/8/crypto/openssl/crypto/bn/bn_sqr.c stable/8/crypto/openssl/crypto/conf/conf_api.c stable/8/crypto/openssl/crypto/conf/conf_def.c stable/8/crypto/openssl/crypto/ec/ec_lib.c stable/8/crypto/openssl/crypto/ec/ecp_smpl.c stable/8/crypto/openssl/crypto/idea/ideatest.c stable/8/crypto/openssl/crypto/objects/obj_dat.c stable/8/crypto/openssl/crypto/ocsp/ocsp_ht.c stable/8/crypto/openssl/crypto/ocsp/ocsp_lib.c stable/8/crypto/openssl/crypto/opensslv.h stable/8/crypto/openssl/crypto/pkcs7/Makefile stable/8/crypto/openssl/crypto/rsa/rsa_eay.c stable/8/crypto/openssl/crypto/ui/ui_lib.c stable/8/crypto/openssl/doc/apps/asn1parse.pod stable/8/crypto/openssl/doc/apps/ca.pod stable/8/crypto/openssl/doc/apps/crl.pod stable/8/crypto/openssl/doc/apps/dhparam.pod stable/8/crypto/openssl/doc/apps/dsa.pod stable/8/crypto/openssl/doc/apps/ecparam.pod stable/8/crypto/openssl/doc/apps/gendsa.pod stable/8/crypto/openssl/doc/apps/genrsa.pod stable/8/crypto/openssl/doc/apps/rsa.pod stable/8/crypto/openssl/doc/apps/s_client.pod stable/8/crypto/openssl/doc/apps/s_server.pod stable/8/crypto/openssl/doc/apps/verify.pod stable/8/crypto/openssl/doc/apps/x509.pod stable/8/crypto/openssl/doc/apps/x509v3_config.pod stable/8/crypto/openssl/doc/crypto/ASN1_generate_nconf.pod stable/8/crypto/openssl/doc/crypto/BIO_f_base64.pod stable/8/crypto/openssl/doc/crypto/BIO_push.pod stable/8/crypto/openssl/doc/crypto/ERR_get_error.pod stable/8/crypto/openssl/doc/crypto/RSA_set_method.pod stable/8/crypto/openssl/doc/crypto/RSA_sign.pod stable/8/crypto/openssl/doc/crypto/des.pod stable/8/crypto/openssl/doc/crypto/err.pod stable/8/crypto/openssl/doc/crypto/pem.pod stable/8/crypto/openssl/doc/crypto/ui.pod stable/8/crypto/openssl/doc/fingerprints.txt stable/8/crypto/openssl/doc/ssl/SSL_CIPHER_get_name.pod stable/8/crypto/openssl/doc/ssl/SSL_CTX_add_extra_chain_cert.pod stable/8/crypto/openssl/doc/ssl/SSL_CTX_add_session.pod stable/8/crypto/openssl/doc/ssl/SSL_CTX_set_client_CA_list.pod stable/8/crypto/openssl/doc/ssl/SSL_CTX_set_client_cert_cb.pod stable/8/crypto/openssl/doc/ssl/SSL_CTX_set_options.pod stable/8/crypto/openssl/doc/ssl/SSL_CTX_set_tmp_dh_callback.pod stable/8/crypto/openssl/doc/ssl/SSL_CTX_set_verify.pod stable/8/crypto/openssl/doc/ssl/SSL_get_version.pod stable/8/crypto/openssl/doc/ssl/SSL_shutdown.pod stable/8/crypto/openssl/doc/ssl/d2i_SSL_SESSION.pod stable/8/crypto/openssl/openssl.spec stable/8/crypto/openssl/ssl/d1_both.c stable/8/crypto/openssl/ssl/d1_clnt.c stable/8/crypto/openssl/ssl/d1_srvr.c stable/8/crypto/openssl/ssl/s23_lib.c stable/8/crypto/openssl/ssl/s23_srvr.c stable/8/crypto/openssl/ssl/s3_clnt.c stable/8/crypto/openssl/ssl/s3_pkt.c stable/8/crypto/openssl/ssl/s3_srvr.c stable/8/crypto/openssl/ssl/ssl_ciph.c stable/8/crypto/openssl/ssl/ssl_stat.c stable/8/crypto/openssl/ssl/t1_lib.c stable/8/crypto/openssl/util/mkerr.pl stable/8/secure/lib/libcrypto/Makefile stable/8/secure/lib/libcrypto/Makefile.inc stable/8/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 stable/8/secure/lib/libcrypto/man/ASN1_STRING_length.3 stable/8/secure/lib/libcrypto/man/ASN1_STRING_new.3 stable/8/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 stable/8/secure/lib/libcrypto/man/ASN1_generate_nconf.3 stable/8/secure/lib/libcrypto/man/BIO_ctrl.3 stable/8/secure/lib/libcrypto/man/BIO_f_base64.3 stable/8/secure/lib/libcrypto/man/BIO_f_buffer.3 stable/8/secure/lib/libcrypto/man/BIO_f_cipher.3 stable/8/secure/lib/libcrypto/man/BIO_f_md.3 stable/8/secure/lib/libcrypto/man/BIO_f_null.3 stable/8/secure/lib/libcrypto/man/BIO_f_ssl.3 stable/8/secure/lib/libcrypto/man/BIO_find_type.3 stable/8/secure/lib/libcrypto/man/BIO_new.3 stable/8/secure/lib/libcrypto/man/BIO_push.3 stable/8/secure/lib/libcrypto/man/BIO_read.3 stable/8/secure/lib/libcrypto/man/BIO_s_accept.3 stable/8/secure/lib/libcrypto/man/BIO_s_bio.3 stable/8/secure/lib/libcrypto/man/BIO_s_connect.3 stable/8/secure/lib/libcrypto/man/BIO_s_fd.3 stable/8/secure/lib/libcrypto/man/BIO_s_file.3 stable/8/secure/lib/libcrypto/man/BIO_s_mem.3 stable/8/secure/lib/libcrypto/man/BIO_s_null.3 stable/8/secure/lib/libcrypto/man/BIO_s_socket.3 stable/8/secure/lib/libcrypto/man/BIO_set_callback.3 stable/8/secure/lib/libcrypto/man/BIO_should_retry.3 stable/8/secure/lib/libcrypto/man/BN_BLINDING_new.3 stable/8/secure/lib/libcrypto/man/BN_CTX_new.3 stable/8/secure/lib/libcrypto/man/BN_CTX_start.3 stable/8/secure/lib/libcrypto/man/BN_add.3 stable/8/secure/lib/libcrypto/man/BN_add_word.3 stable/8/secure/lib/libcrypto/man/BN_bn2bin.3 stable/8/secure/lib/libcrypto/man/BN_cmp.3 stable/8/secure/lib/libcrypto/man/BN_copy.3 stable/8/secure/lib/libcrypto/man/BN_generate_prime.3 stable/8/secure/lib/libcrypto/man/BN_mod_inverse.3 stable/8/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 stable/8/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 stable/8/secure/lib/libcrypto/man/BN_new.3 stable/8/secure/lib/libcrypto/man/BN_num_bytes.3 stable/8/secure/lib/libcrypto/man/BN_rand.3 stable/8/secure/lib/libcrypto/man/BN_set_bit.3 stable/8/secure/lib/libcrypto/man/BN_swap.3 stable/8/secure/lib/libcrypto/man/BN_zero.3 stable/8/secure/lib/libcrypto/man/CONF_modules_free.3 stable/8/secure/lib/libcrypto/man/CONF_modules_load_file.3 stable/8/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 stable/8/secure/lib/libcrypto/man/DH_generate_key.3 stable/8/secure/lib/libcrypto/man/DH_generate_parameters.3 stable/8/secure/lib/libcrypto/man/DH_get_ex_new_index.3 stable/8/secure/lib/libcrypto/man/DH_new.3 stable/8/secure/lib/libcrypto/man/DH_set_method.3 stable/8/secure/lib/libcrypto/man/DH_size.3 stable/8/secure/lib/libcrypto/man/DSA_SIG_new.3 stable/8/secure/lib/libcrypto/man/DSA_do_sign.3 stable/8/secure/lib/libcrypto/man/DSA_dup_DH.3 stable/8/secure/lib/libcrypto/man/DSA_generate_key.3 stable/8/secure/lib/libcrypto/man/DSA_generate_parameters.3 stable/8/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 stable/8/secure/lib/libcrypto/man/DSA_new.3 stable/8/secure/lib/libcrypto/man/DSA_set_method.3 stable/8/secure/lib/libcrypto/man/DSA_sign.3 stable/8/secure/lib/libcrypto/man/DSA_size.3 stable/8/secure/lib/libcrypto/man/ERR_GET_LIB.3 stable/8/secure/lib/libcrypto/man/ERR_clear_error.3 stable/8/secure/lib/libcrypto/man/ERR_error_string.3 stable/8/secure/lib/libcrypto/man/ERR_get_error.3 stable/8/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 stable/8/secure/lib/libcrypto/man/ERR_load_strings.3 stable/8/secure/lib/libcrypto/man/ERR_print_errors.3 stable/8/secure/lib/libcrypto/man/ERR_put_error.3 stable/8/secure/lib/libcrypto/man/ERR_remove_state.3 stable/8/secure/lib/libcrypto/man/ERR_set_mark.3 stable/8/secure/lib/libcrypto/man/EVP_BytesToKey.3 stable/8/secure/lib/libcrypto/man/EVP_DigestInit.3 stable/8/secure/lib/libcrypto/man/EVP_EncryptInit.3 stable/8/secure/lib/libcrypto/man/EVP_OpenInit.3 stable/8/secure/lib/libcrypto/man/EVP_PKEY_new.3 stable/8/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 stable/8/secure/lib/libcrypto/man/EVP_SealInit.3 stable/8/secure/lib/libcrypto/man/EVP_SignInit.3 stable/8/secure/lib/libcrypto/man/EVP_VerifyInit.3 stable/8/secure/lib/libcrypto/man/OBJ_nid2obj.3 stable/8/secure/lib/libcrypto/man/OPENSSL_Applink.3 stable/8/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 stable/8/secure/lib/libcrypto/man/OPENSSL_config.3 stable/8/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 stable/8/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 stable/8/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 stable/8/secure/lib/libcrypto/man/PKCS12_create.3 stable/8/secure/lib/libcrypto/man/PKCS12_parse.3 stable/8/secure/lib/libcrypto/man/PKCS7_decrypt.3 stable/8/secure/lib/libcrypto/man/PKCS7_encrypt.3 stable/8/secure/lib/libcrypto/man/PKCS7_sign.3 stable/8/secure/lib/libcrypto/man/PKCS7_verify.3 stable/8/secure/lib/libcrypto/man/RAND_add.3 stable/8/secure/lib/libcrypto/man/RAND_bytes.3 stable/8/secure/lib/libcrypto/man/RAND_cleanup.3 stable/8/secure/lib/libcrypto/man/RAND_egd.3 stable/8/secure/lib/libcrypto/man/RAND_load_file.3 stable/8/secure/lib/libcrypto/man/RAND_set_rand_method.3 stable/8/secure/lib/libcrypto/man/RSA_blinding_on.3 stable/8/secure/lib/libcrypto/man/RSA_check_key.3 stable/8/secure/lib/libcrypto/man/RSA_generate_key.3 stable/8/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 stable/8/secure/lib/libcrypto/man/RSA_new.3 stable/8/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 stable/8/secure/lib/libcrypto/man/RSA_print.3 stable/8/secure/lib/libcrypto/man/RSA_private_encrypt.3 stable/8/secure/lib/libcrypto/man/RSA_public_encrypt.3 stable/8/secure/lib/libcrypto/man/RSA_set_method.3 stable/8/secure/lib/libcrypto/man/RSA_sign.3 stable/8/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 stable/8/secure/lib/libcrypto/man/RSA_size.3 stable/8/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 stable/8/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 stable/8/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 stable/8/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 stable/8/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 stable/8/secure/lib/libcrypto/man/X509_NAME_print_ex.3 stable/8/secure/lib/libcrypto/man/X509_new.3 stable/8/secure/lib/libcrypto/man/bio.3 stable/8/secure/lib/libcrypto/man/blowfish.3 stable/8/secure/lib/libcrypto/man/bn.3 stable/8/secure/lib/libcrypto/man/bn_internal.3 stable/8/secure/lib/libcrypto/man/buffer.3 stable/8/secure/lib/libcrypto/man/crypto.3 stable/8/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 stable/8/secure/lib/libcrypto/man/d2i_DHparams.3 stable/8/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 stable/8/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 stable/8/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 stable/8/secure/lib/libcrypto/man/d2i_X509.3 stable/8/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 stable/8/secure/lib/libcrypto/man/d2i_X509_CRL.3 stable/8/secure/lib/libcrypto/man/d2i_X509_NAME.3 stable/8/secure/lib/libcrypto/man/d2i_X509_REQ.3 stable/8/secure/lib/libcrypto/man/d2i_X509_SIG.3 stable/8/secure/lib/libcrypto/man/des.3 stable/8/secure/lib/libcrypto/man/dh.3 stable/8/secure/lib/libcrypto/man/dsa.3 stable/8/secure/lib/libcrypto/man/ecdsa.3 stable/8/secure/lib/libcrypto/man/engine.3 stable/8/secure/lib/libcrypto/man/err.3 stable/8/secure/lib/libcrypto/man/evp.3 stable/8/secure/lib/libcrypto/man/hmac.3 stable/8/secure/lib/libcrypto/man/lh_stats.3 stable/8/secure/lib/libcrypto/man/lhash.3 stable/8/secure/lib/libcrypto/man/md5.3 stable/8/secure/lib/libcrypto/man/mdc2.3 stable/8/secure/lib/libcrypto/man/pem.3 stable/8/secure/lib/libcrypto/man/rand.3 stable/8/secure/lib/libcrypto/man/rc4.3 stable/8/secure/lib/libcrypto/man/ripemd.3 stable/8/secure/lib/libcrypto/man/rsa.3 stable/8/secure/lib/libcrypto/man/sha.3 stable/8/secure/lib/libcrypto/man/threads.3 stable/8/secure/lib/libcrypto/man/ui.3 stable/8/secure/lib/libcrypto/man/ui_compat.3 stable/8/secure/lib/libcrypto/man/x509.3 stable/8/secure/lib/libssl/Makefile.man stable/8/secure/lib/libssl/man/SSL_CIPHER_get_name.3 stable/8/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 stable/8/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 stable/8/secure/lib/libssl/man/SSL_CTX_add_session.3 stable/8/secure/lib/libssl/man/SSL_CTX_ctrl.3 stable/8/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 stable/8/secure/lib/libssl/man/SSL_CTX_free.3 stable/8/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 stable/8/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 stable/8/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 stable/8/secure/lib/libssl/man/SSL_CTX_new.3 stable/8/secure/lib/libssl/man/SSL_CTX_sess_number.3 stable/8/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 stable/8/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 stable/8/secure/lib/libssl/man/SSL_CTX_sessions.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_mode.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_options.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_timeout.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_verify.3 stable/8/secure/lib/libssl/man/SSL_CTX_use_certificate.3 stable/8/secure/lib/libssl/man/SSL_SESSION_free.3 stable/8/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 stable/8/secure/lib/libssl/man/SSL_SESSION_get_time.3 stable/8/secure/lib/libssl/man/SSL_accept.3 stable/8/secure/lib/libssl/man/SSL_alert_type_string.3 stable/8/secure/lib/libssl/man/SSL_clear.3 stable/8/secure/lib/libssl/man/SSL_connect.3 stable/8/secure/lib/libssl/man/SSL_do_handshake.3 stable/8/secure/lib/libssl/man/SSL_free.3 stable/8/secure/lib/libssl/man/SSL_get_SSL_CTX.3 stable/8/secure/lib/libssl/man/SSL_get_ciphers.3 stable/8/secure/lib/libssl/man/SSL_get_client_CA_list.3 stable/8/secure/lib/libssl/man/SSL_get_current_cipher.3 stable/8/secure/lib/libssl/man/SSL_get_default_timeout.3 stable/8/secure/lib/libssl/man/SSL_get_error.3 stable/8/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 stable/8/secure/lib/libssl/man/SSL_get_ex_new_index.3 stable/8/secure/lib/libssl/man/SSL_get_fd.3 stable/8/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 stable/8/secure/lib/libssl/man/SSL_get_peer_certificate.3 stable/8/secure/lib/libssl/man/SSL_get_rbio.3 stable/8/secure/lib/libssl/man/SSL_get_session.3 stable/8/secure/lib/libssl/man/SSL_get_verify_result.3 stable/8/secure/lib/libssl/man/SSL_get_version.3 stable/8/secure/lib/libssl/man/SSL_library_init.3 stable/8/secure/lib/libssl/man/SSL_load_client_CA_file.3 stable/8/secure/lib/libssl/man/SSL_new.3 stable/8/secure/lib/libssl/man/SSL_pending.3 stable/8/secure/lib/libssl/man/SSL_read.3 stable/8/secure/lib/libssl/man/SSL_rstate_string.3 stable/8/secure/lib/libssl/man/SSL_session_reused.3 stable/8/secure/lib/libssl/man/SSL_set_bio.3 stable/8/secure/lib/libssl/man/SSL_set_connect_state.3 stable/8/secure/lib/libssl/man/SSL_set_fd.3 stable/8/secure/lib/libssl/man/SSL_set_session.3 stable/8/secure/lib/libssl/man/SSL_set_shutdown.3 stable/8/secure/lib/libssl/man/SSL_set_verify_result.3 stable/8/secure/lib/libssl/man/SSL_shutdown.3 stable/8/secure/lib/libssl/man/SSL_state_string.3 stable/8/secure/lib/libssl/man/SSL_want.3 stable/8/secure/lib/libssl/man/SSL_write.3 stable/8/secure/lib/libssl/man/d2i_SSL_SESSION.3 stable/8/secure/lib/libssl/man/ssl.3 stable/8/secure/usr.bin/openssl/man/CA.pl.1 stable/8/secure/usr.bin/openssl/man/asn1parse.1 stable/8/secure/usr.bin/openssl/man/ca.1 stable/8/secure/usr.bin/openssl/man/ciphers.1 stable/8/secure/usr.bin/openssl/man/crl.1 stable/8/secure/usr.bin/openssl/man/crl2pkcs7.1 stable/8/secure/usr.bin/openssl/man/dgst.1 stable/8/secure/usr.bin/openssl/man/dhparam.1 stable/8/secure/usr.bin/openssl/man/dsa.1 stable/8/secure/usr.bin/openssl/man/dsaparam.1 stable/8/secure/usr.bin/openssl/man/ec.1 stable/8/secure/usr.bin/openssl/man/ecparam.1 stable/8/secure/usr.bin/openssl/man/enc.1 stable/8/secure/usr.bin/openssl/man/errstr.1 stable/8/secure/usr.bin/openssl/man/gendsa.1 stable/8/secure/usr.bin/openssl/man/genrsa.1 stable/8/secure/usr.bin/openssl/man/nseq.1 stable/8/secure/usr.bin/openssl/man/ocsp.1 stable/8/secure/usr.bin/openssl/man/openssl.1 stable/8/secure/usr.bin/openssl/man/passwd.1 stable/8/secure/usr.bin/openssl/man/pkcs12.1 stable/8/secure/usr.bin/openssl/man/pkcs7.1 stable/8/secure/usr.bin/openssl/man/pkcs8.1 stable/8/secure/usr.bin/openssl/man/rand.1 stable/8/secure/usr.bin/openssl/man/req.1 stable/8/secure/usr.bin/openssl/man/rsa.1 stable/8/secure/usr.bin/openssl/man/rsautl.1 stable/8/secure/usr.bin/openssl/man/s_client.1 stable/8/secure/usr.bin/openssl/man/s_server.1 stable/8/secure/usr.bin/openssl/man/s_time.1 stable/8/secure/usr.bin/openssl/man/sess_id.1 stable/8/secure/usr.bin/openssl/man/smime.1 stable/8/secure/usr.bin/openssl/man/speed.1 stable/8/secure/usr.bin/openssl/man/spkac.1 stable/8/secure/usr.bin/openssl/man/verify.1 stable/8/secure/usr.bin/openssl/man/version.1 stable/8/secure/usr.bin/openssl/man/x509.1 stable/8/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: stable/8/crypto/openssl/ (props changed) Changes in other areas also in this revision: Added: stable/9/crypto/openssl/doc/ssl/SSL_CTX_set_tlsext_ticket_key_cb.pod - copied unchanged from r269672, vendor-crypto/openssl/dist-0.9.8/doc/ssl/SSL_CTX_set_tlsext_ticket_key_cb.pod stable/9/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 (contents, props changed) Deleted: stable/9/crypto/openssl/crypto/pkcs7/bio_ber.c stable/9/crypto/openssl/crypto/pkcs7/dec.c stable/9/crypto/openssl/crypto/pkcs7/des.pem stable/9/crypto/openssl/crypto/pkcs7/doc stable/9/crypto/openssl/crypto/pkcs7/enc.c stable/9/crypto/openssl/crypto/pkcs7/es1.pem stable/9/crypto/openssl/crypto/pkcs7/example.c stable/9/crypto/openssl/crypto/pkcs7/example.h stable/9/crypto/openssl/crypto/pkcs7/info.pem stable/9/crypto/openssl/crypto/pkcs7/infokey.pem stable/9/crypto/openssl/crypto/pkcs7/p7/ stable/9/crypto/openssl/crypto/pkcs7/server.pem stable/9/crypto/openssl/crypto/pkcs7/sign.c stable/9/crypto/openssl/crypto/pkcs7/t/ stable/9/crypto/openssl/crypto/pkcs7/verify.c stable/9/crypto/openssl/demos/eay/ stable/9/crypto/openssl/demos/maurice/ Modified: stable/9/crypto/openssl/CHANGES stable/9/crypto/openssl/FAQ stable/9/crypto/openssl/Makefile stable/9/crypto/openssl/NEWS stable/9/crypto/openssl/README stable/9/crypto/openssl/apps/apps.c stable/9/crypto/openssl/apps/ca.c stable/9/crypto/openssl/apps/crl2p7.c stable/9/crypto/openssl/apps/ocsp.c stable/9/crypto/openssl/apps/s_server.c stable/9/crypto/openssl/apps/speed.c stable/9/crypto/openssl/crypto/asn1/a_object.c stable/9/crypto/openssl/crypto/asn1/asn1_lib.c stable/9/crypto/openssl/crypto/asn1/asn_mime.c stable/9/crypto/openssl/crypto/asn1/asn_pack.c stable/9/crypto/openssl/crypto/asn1/evp_asn1.c stable/9/crypto/openssl/crypto/asn1/t_x509.c stable/9/crypto/openssl/crypto/asn1/tasn_enc.c stable/9/crypto/openssl/crypto/bio/bio_lib.c stable/9/crypto/openssl/crypto/bn/bn_gf2m.c stable/9/crypto/openssl/crypto/bn/bn_lib.c stable/9/crypto/openssl/crypto/bn/bn_sqr.c stable/9/crypto/openssl/crypto/conf/conf_api.c stable/9/crypto/openssl/crypto/conf/conf_def.c stable/9/crypto/openssl/crypto/ec/ec_lib.c stable/9/crypto/openssl/crypto/ec/ecp_smpl.c stable/9/crypto/openssl/crypto/idea/ideatest.c stable/9/crypto/openssl/crypto/objects/obj_dat.c stable/9/crypto/openssl/crypto/ocsp/ocsp_ht.c stable/9/crypto/openssl/crypto/ocsp/ocsp_lib.c stable/9/crypto/openssl/crypto/opensslv.h stable/9/crypto/openssl/crypto/pkcs7/Makefile stable/9/crypto/openssl/crypto/rsa/rsa_eay.c stable/9/crypto/openssl/crypto/ui/ui_lib.c stable/9/crypto/openssl/doc/apps/asn1parse.pod stable/9/crypto/openssl/doc/apps/ca.pod stable/9/crypto/openssl/doc/apps/crl.pod stable/9/crypto/openssl/doc/apps/dhparam.pod stable/9/crypto/openssl/doc/apps/dsa.pod stable/9/crypto/openssl/doc/apps/ecparam.pod stable/9/crypto/openssl/doc/apps/gendsa.pod stable/9/crypto/openssl/doc/apps/genrsa.pod stable/9/crypto/openssl/doc/apps/rsa.pod stable/9/crypto/openssl/doc/apps/s_client.pod stable/9/crypto/openssl/doc/apps/s_server.pod stable/9/crypto/openssl/doc/apps/verify.pod stable/9/crypto/openssl/doc/apps/x509.pod stable/9/crypto/openssl/doc/apps/x509v3_config.pod stable/9/crypto/openssl/doc/crypto/ASN1_generate_nconf.pod stable/9/crypto/openssl/doc/crypto/BIO_f_base64.pod stable/9/crypto/openssl/doc/crypto/BIO_push.pod stable/9/crypto/openssl/doc/crypto/ERR_get_error.pod stable/9/crypto/openssl/doc/crypto/RSA_set_method.pod stable/9/crypto/openssl/doc/crypto/RSA_sign.pod stable/9/crypto/openssl/doc/crypto/des.pod stable/9/crypto/openssl/doc/crypto/err.pod stable/9/crypto/openssl/doc/crypto/pem.pod stable/9/crypto/openssl/doc/crypto/ui.pod stable/9/crypto/openssl/doc/fingerprints.txt stable/9/crypto/openssl/doc/ssl/SSL_CIPHER_get_name.pod stable/9/crypto/openssl/doc/ssl/SSL_CTX_add_extra_chain_cert.pod stable/9/crypto/openssl/doc/ssl/SSL_CTX_add_session.pod stable/9/crypto/openssl/doc/ssl/SSL_CTX_set_client_CA_list.pod stable/9/crypto/openssl/doc/ssl/SSL_CTX_set_client_cert_cb.pod stable/9/crypto/openssl/doc/ssl/SSL_CTX_set_options.pod stable/9/crypto/openssl/doc/ssl/SSL_CTX_set_tmp_dh_callback.pod stable/9/crypto/openssl/doc/ssl/SSL_CTX_set_verify.pod stable/9/crypto/openssl/doc/ssl/SSL_get_version.pod stable/9/crypto/openssl/doc/ssl/SSL_shutdown.pod stable/9/crypto/openssl/doc/ssl/d2i_SSL_SESSION.pod stable/9/crypto/openssl/openssl.spec stable/9/crypto/openssl/ssl/d1_both.c stable/9/crypto/openssl/ssl/d1_clnt.c stable/9/crypto/openssl/ssl/d1_srvr.c stable/9/crypto/openssl/ssl/s23_lib.c stable/9/crypto/openssl/ssl/s23_srvr.c stable/9/crypto/openssl/ssl/s3_clnt.c stable/9/crypto/openssl/ssl/s3_pkt.c stable/9/crypto/openssl/ssl/s3_srvr.c stable/9/crypto/openssl/ssl/ssl_ciph.c stable/9/crypto/openssl/ssl/ssl_stat.c stable/9/crypto/openssl/ssl/t1_lib.c stable/9/crypto/openssl/util/mkerr.pl stable/9/secure/lib/libcrypto/Makefile stable/9/secure/lib/libcrypto/Makefile.inc stable/9/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 stable/9/secure/lib/libcrypto/man/ASN1_STRING_length.3 stable/9/secure/lib/libcrypto/man/ASN1_STRING_new.3 stable/9/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 stable/9/secure/lib/libcrypto/man/ASN1_generate_nconf.3 stable/9/secure/lib/libcrypto/man/BIO_ctrl.3 stable/9/secure/lib/libcrypto/man/BIO_f_base64.3 stable/9/secure/lib/libcrypto/man/BIO_f_buffer.3 stable/9/secure/lib/libcrypto/man/BIO_f_cipher.3 stable/9/secure/lib/libcrypto/man/BIO_f_md.3 stable/9/secure/lib/libcrypto/man/BIO_f_null.3 stable/9/secure/lib/libcrypto/man/BIO_f_ssl.3 stable/9/secure/lib/libcrypto/man/BIO_find_type.3 stable/9/secure/lib/libcrypto/man/BIO_new.3 stable/9/secure/lib/libcrypto/man/BIO_push.3 stable/9/secure/lib/libcrypto/man/BIO_read.3 stable/9/secure/lib/libcrypto/man/BIO_s_accept.3 stable/9/secure/lib/libcrypto/man/BIO_s_bio.3 stable/9/secure/lib/libcrypto/man/BIO_s_connect.3 stable/9/secure/lib/libcrypto/man/BIO_s_fd.3 stable/9/secure/lib/libcrypto/man/BIO_s_file.3 stable/9/secure/lib/libcrypto/man/BIO_s_mem.3 stable/9/secure/lib/libcrypto/man/BIO_s_null.3 stable/9/secure/lib/libcrypto/man/BIO_s_socket.3 stable/9/secure/lib/libcrypto/man/BIO_set_callback.3 stable/9/secure/lib/libcrypto/man/BIO_should_retry.3 stable/9/secure/lib/libcrypto/man/BN_BLINDING_new.3 stable/9/secure/lib/libcrypto/man/BN_CTX_new.3 stable/9/secure/lib/libcrypto/man/BN_CTX_start.3 stable/9/secure/lib/libcrypto/man/BN_add.3 stable/9/secure/lib/libcrypto/man/BN_add_word.3 stable/9/secure/lib/libcrypto/man/BN_bn2bin.3 stable/9/secure/lib/libcrypto/man/BN_cmp.3 stable/9/secure/lib/libcrypto/man/BN_copy.3 stable/9/secure/lib/libcrypto/man/BN_generate_prime.3 stable/9/secure/lib/libcrypto/man/BN_mod_inverse.3 stable/9/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 stable/9/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 stable/9/secure/lib/libcrypto/man/BN_new.3 stable/9/secure/lib/libcrypto/man/BN_num_bytes.3 stable/9/secure/lib/libcrypto/man/BN_rand.3 stable/9/secure/lib/libcrypto/man/BN_set_bit.3 stable/9/secure/lib/libcrypto/man/BN_swap.3 stable/9/secure/lib/libcrypto/man/BN_zero.3 stable/9/secure/lib/libcrypto/man/CONF_modules_free.3 stable/9/secure/lib/libcrypto/man/CONF_modules_load_file.3 stable/9/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 stable/9/secure/lib/libcrypto/man/DH_generate_key.3 stable/9/secure/lib/libcrypto/man/DH_generate_parameters.3 stable/9/secure/lib/libcrypto/man/DH_get_ex_new_index.3 stable/9/secure/lib/libcrypto/man/DH_new.3 stable/9/secure/lib/libcrypto/man/DH_set_method.3 stable/9/secure/lib/libcrypto/man/DH_size.3 stable/9/secure/lib/libcrypto/man/DSA_SIG_new.3 stable/9/secure/lib/libcrypto/man/DSA_do_sign.3 stable/9/secure/lib/libcrypto/man/DSA_dup_DH.3 stable/9/secure/lib/libcrypto/man/DSA_generate_key.3 stable/9/secure/lib/libcrypto/man/DSA_generate_parameters.3 stable/9/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 stable/9/secure/lib/libcrypto/man/DSA_new.3 stable/9/secure/lib/libcrypto/man/DSA_set_method.3 stable/9/secure/lib/libcrypto/man/DSA_sign.3 stable/9/secure/lib/libcrypto/man/DSA_size.3 stable/9/secure/lib/libcrypto/man/ERR_GET_LIB.3 stable/9/secure/lib/libcrypto/man/ERR_clear_error.3 stable/9/secure/lib/libcrypto/man/ERR_error_string.3 stable/9/secure/lib/libcrypto/man/ERR_get_error.3 stable/9/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 stable/9/secure/lib/libcrypto/man/ERR_load_strings.3 stable/9/secure/lib/libcrypto/man/ERR_print_errors.3 stable/9/secure/lib/libcrypto/man/ERR_put_error.3 stable/9/secure/lib/libcrypto/man/ERR_remove_state.3 stable/9/secure/lib/libcrypto/man/ERR_set_mark.3 stable/9/secure/lib/libcrypto/man/EVP_BytesToKey.3 stable/9/secure/lib/libcrypto/man/EVP_DigestInit.3 stable/9/secure/lib/libcrypto/man/EVP_EncryptInit.3 stable/9/secure/lib/libcrypto/man/EVP_OpenInit.3 stable/9/secure/lib/libcrypto/man/EVP_PKEY_new.3 stable/9/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 stable/9/secure/lib/libcrypto/man/EVP_SealInit.3 stable/9/secure/lib/libcrypto/man/EVP_SignInit.3 stable/9/secure/lib/libcrypto/man/EVP_VerifyInit.3 stable/9/secure/lib/libcrypto/man/OBJ_nid2obj.3 stable/9/secure/lib/libcrypto/man/OPENSSL_Applink.3 stable/9/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 stable/9/secure/lib/libcrypto/man/OPENSSL_config.3 stable/9/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 stable/9/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 stable/9/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 stable/9/secure/lib/libcrypto/man/PKCS12_create.3 stable/9/secure/lib/libcrypto/man/PKCS12_parse.3 stable/9/secure/lib/libcrypto/man/PKCS7_decrypt.3 stable/9/secure/lib/libcrypto/man/PKCS7_encrypt.3 stable/9/secure/lib/libcrypto/man/PKCS7_sign.3 stable/9/secure/lib/libcrypto/man/PKCS7_verify.3 stable/9/secure/lib/libcrypto/man/RAND_add.3 stable/9/secure/lib/libcrypto/man/RAND_bytes.3 stable/9/secure/lib/libcrypto/man/RAND_cleanup.3 stable/9/secure/lib/libcrypto/man/RAND_egd.3 stable/9/secure/lib/libcrypto/man/RAND_load_file.3 stable/9/secure/lib/libcrypto/man/RAND_set_rand_method.3 stable/9/secure/lib/libcrypto/man/RSA_blinding_on.3 stable/9/secure/lib/libcrypto/man/RSA_check_key.3 stable/9/secure/lib/libcrypto/man/RSA_generate_key.3 stable/9/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 stable/9/secure/lib/libcrypto/man/RSA_new.3 stable/9/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 stable/9/secure/lib/libcrypto/man/RSA_print.3 stable/9/secure/lib/libcrypto/man/RSA_private_encrypt.3 stable/9/secure/lib/libcrypto/man/RSA_public_encrypt.3 stable/9/secure/lib/libcrypto/man/RSA_set_method.3 stable/9/secure/lib/libcrypto/man/RSA_sign.3 stable/9/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 stable/9/secure/lib/libcrypto/man/RSA_size.3 stable/9/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 stable/9/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 stable/9/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 stable/9/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 stable/9/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 stable/9/secure/lib/libcrypto/man/X509_NAME_print_ex.3 stable/9/secure/lib/libcrypto/man/X509_new.3 stable/9/secure/lib/libcrypto/man/bio.3 stable/9/secure/lib/libcrypto/man/blowfish.3 stable/9/secure/lib/libcrypto/man/bn.3 stable/9/secure/lib/libcrypto/man/bn_internal.3 stable/9/secure/lib/libcrypto/man/buffer.3 stable/9/secure/lib/libcrypto/man/crypto.3 stable/9/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 stable/9/secure/lib/libcrypto/man/d2i_DHparams.3 stable/9/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 stable/9/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 stable/9/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 stable/9/secure/lib/libcrypto/man/d2i_X509.3 stable/9/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 stable/9/secure/lib/libcrypto/man/d2i_X509_CRL.3 stable/9/secure/lib/libcrypto/man/d2i_X509_NAME.3 stable/9/secure/lib/libcrypto/man/d2i_X509_REQ.3 stable/9/secure/lib/libcrypto/man/d2i_X509_SIG.3 stable/9/secure/lib/libcrypto/man/des.3 stable/9/secure/lib/libcrypto/man/dh.3 stable/9/secure/lib/libcrypto/man/dsa.3 stable/9/secure/lib/libcrypto/man/ecdsa.3 stable/9/secure/lib/libcrypto/man/engine.3 stable/9/secure/lib/libcrypto/man/err.3 stable/9/secure/lib/libcrypto/man/evp.3 stable/9/secure/lib/libcrypto/man/hmac.3 stable/9/secure/lib/libcrypto/man/lh_stats.3 stable/9/secure/lib/libcrypto/man/lhash.3 stable/9/secure/lib/libcrypto/man/md5.3 stable/9/secure/lib/libcrypto/man/mdc2.3 stable/9/secure/lib/libcrypto/man/pem.3 stable/9/secure/lib/libcrypto/man/rand.3 stable/9/secure/lib/libcrypto/man/rc4.3 stable/9/secure/lib/libcrypto/man/ripemd.3 stable/9/secure/lib/libcrypto/man/rsa.3 stable/9/secure/lib/libcrypto/man/sha.3 stable/9/secure/lib/libcrypto/man/threads.3 stable/9/secure/lib/libcrypto/man/ui.3 stable/9/secure/lib/libcrypto/man/ui_compat.3 stable/9/secure/lib/libcrypto/man/x509.3 stable/9/secure/lib/libssl/Makefile.man stable/9/secure/lib/libssl/man/SSL_CIPHER_get_name.3 stable/9/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 stable/9/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 stable/9/secure/lib/libssl/man/SSL_CTX_add_session.3 stable/9/secure/lib/libssl/man/SSL_CTX_ctrl.3 stable/9/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 stable/9/secure/lib/libssl/man/SSL_CTX_free.3 stable/9/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 stable/9/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 stable/9/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 stable/9/secure/lib/libssl/man/SSL_CTX_new.3 stable/9/secure/lib/libssl/man/SSL_CTX_sess_number.3 stable/9/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 stable/9/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 stable/9/secure/lib/libssl/man/SSL_CTX_sessions.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_mode.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_options.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_timeout.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_verify.3 stable/9/secure/lib/libssl/man/SSL_CTX_use_certificate.3 stable/9/secure/lib/libssl/man/SSL_SESSION_free.3 stable/9/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 stable/9/secure/lib/libssl/man/SSL_SESSION_get_time.3 stable/9/secure/lib/libssl/man/SSL_accept.3 stable/9/secure/lib/libssl/man/SSL_alert_type_string.3 stable/9/secure/lib/libssl/man/SSL_clear.3 stable/9/secure/lib/libssl/man/SSL_connect.3 stable/9/secure/lib/libssl/man/SSL_do_handshake.3 stable/9/secure/lib/libssl/man/SSL_free.3 stable/9/secure/lib/libssl/man/SSL_get_SSL_CTX.3 stable/9/secure/lib/libssl/man/SSL_get_ciphers.3 stable/9/secure/lib/libssl/man/SSL_get_client_CA_list.3 stable/9/secure/lib/libssl/man/SSL_get_current_cipher.3 stable/9/secure/lib/libssl/man/SSL_get_default_timeout.3 stable/9/secure/lib/libssl/man/SSL_get_error.3 stable/9/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 stable/9/secure/lib/libssl/man/SSL_get_ex_new_index.3 stable/9/secure/lib/libssl/man/SSL_get_fd.3 stable/9/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 stable/9/secure/lib/libssl/man/SSL_get_peer_certificate.3 stable/9/secure/lib/libssl/man/SSL_get_rbio.3 stable/9/secure/lib/libssl/man/SSL_get_session.3 stable/9/secure/lib/libssl/man/SSL_get_verify_result.3 stable/9/secure/lib/libssl/man/SSL_get_version.3 stable/9/secure/lib/libssl/man/SSL_library_init.3 stable/9/secure/lib/libssl/man/SSL_load_client_CA_file.3 stable/9/secure/lib/libssl/man/SSL_new.3 stable/9/secure/lib/libssl/man/SSL_pending.3 stable/9/secure/lib/libssl/man/SSL_read.3 stable/9/secure/lib/libssl/man/SSL_rstate_string.3 stable/9/secure/lib/libssl/man/SSL_session_reused.3 stable/9/secure/lib/libssl/man/SSL_set_bio.3 stable/9/secure/lib/libssl/man/SSL_set_connect_state.3 stable/9/secure/lib/libssl/man/SSL_set_fd.3 stable/9/secure/lib/libssl/man/SSL_set_session.3 stable/9/secure/lib/libssl/man/SSL_set_shutdown.3 stable/9/secure/lib/libssl/man/SSL_set_verify_result.3 stable/9/secure/lib/libssl/man/SSL_shutdown.3 stable/9/secure/lib/libssl/man/SSL_state_string.3 stable/9/secure/lib/libssl/man/SSL_want.3 stable/9/secure/lib/libssl/man/SSL_write.3 stable/9/secure/lib/libssl/man/d2i_SSL_SESSION.3 stable/9/secure/lib/libssl/man/ssl.3 stable/9/secure/usr.bin/openssl/man/CA.pl.1 stable/9/secure/usr.bin/openssl/man/asn1parse.1 stable/9/secure/usr.bin/openssl/man/ca.1 stable/9/secure/usr.bin/openssl/man/ciphers.1 stable/9/secure/usr.bin/openssl/man/crl.1 stable/9/secure/usr.bin/openssl/man/crl2pkcs7.1 stable/9/secure/usr.bin/openssl/man/dgst.1 stable/9/secure/usr.bin/openssl/man/dhparam.1 stable/9/secure/usr.bin/openssl/man/dsa.1 stable/9/secure/usr.bin/openssl/man/dsaparam.1 stable/9/secure/usr.bin/openssl/man/ec.1 stable/9/secure/usr.bin/openssl/man/ecparam.1 stable/9/secure/usr.bin/openssl/man/enc.1 stable/9/secure/usr.bin/openssl/man/errstr.1 stable/9/secure/usr.bin/openssl/man/gendsa.1 stable/9/secure/usr.bin/openssl/man/genrsa.1 stable/9/secure/usr.bin/openssl/man/nseq.1 stable/9/secure/usr.bin/openssl/man/ocsp.1 stable/9/secure/usr.bin/openssl/man/openssl.1 stable/9/secure/usr.bin/openssl/man/passwd.1 stable/9/secure/usr.bin/openssl/man/pkcs12.1 stable/9/secure/usr.bin/openssl/man/pkcs7.1 stable/9/secure/usr.bin/openssl/man/pkcs8.1 stable/9/secure/usr.bin/openssl/man/rand.1 stable/9/secure/usr.bin/openssl/man/req.1 stable/9/secure/usr.bin/openssl/man/rsa.1 stable/9/secure/usr.bin/openssl/man/rsautl.1 stable/9/secure/usr.bin/openssl/man/s_client.1 stable/9/secure/usr.bin/openssl/man/s_server.1 stable/9/secure/usr.bin/openssl/man/s_time.1 stable/9/secure/usr.bin/openssl/man/sess_id.1 stable/9/secure/usr.bin/openssl/man/smime.1 stable/9/secure/usr.bin/openssl/man/speed.1 stable/9/secure/usr.bin/openssl/man/spkac.1 stable/9/secure/usr.bin/openssl/man/verify.1 stable/9/secure/usr.bin/openssl/man/version.1 stable/9/secure/usr.bin/openssl/man/x509.1 stable/9/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: stable/9/crypto/openssl/ (props changed) Modified: stable/8/crypto/openssl/CHANGES ============================================================================== --- stable/8/crypto/openssl/CHANGES Thu Aug 7 21:04:42 2014 (r269686) +++ stable/8/crypto/openssl/CHANGES Thu Aug 7 21:06:34 2014 (r269687) @@ -2,6 +2,53 @@ OpenSSL CHANGES _______________ + Changes between 0.9.8za and 0.9.8zb [6 Aug 2014] + + *) OpenSSL DTLS clients enabling anonymous (EC)DH ciphersuites are subject + to a denial of service attack. A malicious server can crash the client + with a null pointer dereference (read) by specifying an anonymous (EC)DH + ciphersuite and sending carefully crafted handshake messages. + + Thanks to Felix Gr?bert (Google) for discovering and researching this + issue. + (CVE-2014-3510) + [Emilia K?sper] + + *) By sending carefully crafted DTLS packets an attacker could cause openssl + to leak memory. This can be exploited through a Denial of Service attack. + Thanks to Adam Langley for discovering and researching this issue. + (CVE-2014-3507) + [Adam Langley] + + *) An attacker can force openssl to consume large amounts of memory whilst + processing DTLS handshake messages. This can be exploited through a + Denial of Service attack. + Thanks to Adam Langley for discovering and researching this issue. + (CVE-2014-3506) + [Adam Langley] + + *) An attacker can force an error condition which causes openssl to crash + whilst processing DTLS packets due to memory being freed twice. This + can be exploited through a Denial of Service attack. + Thanks to Adam Langley and Wan-Teh Chang for discovering and researching + this issue. + (CVE-2014-3505) + [Adam Langley] + + *) A flaw in OBJ_obj2txt may cause pretty printing functions such as + X509_name_oneline, X509_name_print_ex et al. to leak some information + from the stack. Applications may be affected if they echo pretty printing + output to the attacker. + + Thanks to Ivan Fratric (Google) for discovering this issue. + (CVE-2014-3508) + [Emilia K?sper, and Steve Henson] + + *) Fix ec_GFp_simple_points_make_affine (thus, EC_POINTs_mul etc.) + for corner cases. (Certain input points at infinity could lead to + bogus results, with non-infinity inputs mapped to infinity too.) + [Bodo Moeller] + Changes between 0.9.8y and 0.9.8za [5 Jun 2014] *) Fix for SSL/TLS MITM flaw. An attacker using a carefully crafted Modified: stable/8/crypto/openssl/FAQ ============================================================================== --- stable/8/crypto/openssl/FAQ Thu Aug 7 21:04:42 2014 (r269686) +++ stable/8/crypto/openssl/FAQ Thu Aug 7 21:06:34 2014 (r269687) @@ -113,11 +113,6 @@ that came with the version of OpenSSL yo documentation is included in each OpenSSL distribution under the docs directory. -For information on parts of libcrypto that are not yet documented, you -might want to read Ariel Glenn's documentation on SSLeay 0.9, OpenSSL's -predecessor, at . Much -of this still applies to OpenSSL. - There is some documentation about certificate extensions and PKCS#12 in doc/openssl.txt Modified: stable/8/crypto/openssl/Makefile ============================================================================== --- stable/8/crypto/openssl/Makefile Thu Aug 7 21:04:42 2014 (r269686) +++ stable/8/crypto/openssl/Makefile Thu Aug 7 21:06:34 2014 (r269687) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=0.9.8za +VERSION=0.9.8zb MAJOR=0 MINOR=9.8 SHLIB_VERSION_NUMBER=0.9.8 Modified: stable/8/crypto/openssl/NEWS ============================================================================== --- stable/8/crypto/openssl/NEWS Thu Aug 7 21:04:42 2014 (r269686) +++ stable/8/crypto/openssl/NEWS Thu Aug 7 21:06:34 2014 (r269687) @@ -5,6 +5,22 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 0.9.8za and OpenSSL 0.9.8zb [6 Aug 2014]: + + o Fix for CVE-2014-3510 + o Fix for CVE-2014-3507 + o Fix for CVE-2014-3506 + o Fix for CVE-2014-3505 + o Fix for CVE-2014-3508 + + Known issues in OpenSSL 0.9.8za: + + o Compilation failure of s3_pkt.c on some platforms due to missing + include. Fixed in 0.9.8zb-dev. + o FIPS capable link failure with missing symbol BN_consttime_swap. + Fixed in 0.9.8zb-dev. Workaround is to compile with no-ec: the EC + algorithms are not FIPS approved in OpenSSL 0.9.8 anyway. + Major changes between OpenSSL 0.9.8y and OpenSSL 0.9.8za [5 Jun 2014]: o Fix for CVE-2014-0224 Modified: stable/8/crypto/openssl/README ============================================================================== --- stable/8/crypto/openssl/README Thu Aug 7 21:04:42 2014 (r269686) +++ stable/8/crypto/openssl/README Thu Aug 7 21:06:34 2014 (r269687) @@ -1,5 +1,5 @@ - OpenSSL 0.9.8za 5 Jun 2014 + OpenSSL 0.9.8zb 6 Aug 2014 Copyright (c) 1998-2011 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: stable/8/crypto/openssl/apps/apps.c ============================================================================== --- stable/8/crypto/openssl/apps/apps.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/8/crypto/openssl/apps/apps.c Thu Aug 7 21:06:34 2014 (r269687) @@ -362,6 +362,8 @@ int chopup_args(ARGS *arg, char *buf, in { arg->count=20; arg->data=(char **)OPENSSL_malloc(sizeof(char *)*arg->count); + if (arg->data == NULL) + return 0; } for (i=0; icount; i++) arg->data[i]=NULL; @@ -1429,6 +1431,8 @@ char *make_config_name() len=strlen(t)+strlen(OPENSSL_CONF)+2; p=OPENSSL_malloc(len); + if (p == NULL) + return NULL; BUF_strlcpy(p,t,len); #ifndef OPENSSL_SYS_VMS BUF_strlcat(p,"/",len); Modified: stable/8/crypto/openssl/apps/ca.c ============================================================================== --- stable/8/crypto/openssl/apps/ca.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/8/crypto/openssl/apps/ca.c Thu Aug 7 21:06:34 2014 (r269687) @@ -1582,12 +1582,14 @@ static int certify(X509 **xret, char *in { ok=0; BIO_printf(bio_err,"Signature verification problems....\n"); + ERR_print_errors(bio_err); goto err; } if (i == 0) { ok=0; BIO_printf(bio_err,"Signature did not match the certificate request\n"); + ERR_print_errors(bio_err); goto err; } else @@ -2751,6 +2753,9 @@ char *make_revocation_str(int rev_type, revtm = X509_gmtime_adj(NULL, 0); + if (!revtm) + return NULL; + i = revtm->length + 1; if (reason) i += strlen(reason) + 1; Modified: stable/8/crypto/openssl/apps/crl2p7.c ============================================================================== --- stable/8/crypto/openssl/apps/crl2p7.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/8/crypto/openssl/apps/crl2p7.c Thu Aug 7 21:06:34 2014 (r269687) @@ -142,7 +142,13 @@ int MAIN(int argc, char **argv) { if (--argc < 1) goto bad; if(!certflst) certflst = sk_new_null(); - sk_push(certflst,*(++argv)); + if (!certflst) + goto end; + if (!sk_push(certflst,*(++argv))) + { + sk_free(certflst); + goto end; + } } else { Modified: stable/8/crypto/openssl/apps/ocsp.c ============================================================================== --- stable/8/crypto/openssl/apps/ocsp.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/8/crypto/openssl/apps/ocsp.c Thu Aug 7 21:06:34 2014 (r269687) @@ -1344,7 +1344,7 @@ OCSP_RESPONSE *process_responder(BIO *er } resp = query_responder(err, cbio, path, req, req_timeout); if (!resp) - BIO_printf(bio_err, "Error querying OCSP responsder\n"); + BIO_printf(bio_err, "Error querying OCSP responder\n"); end: if (ctx) SSL_CTX_free(ctx); Modified: stable/8/crypto/openssl/apps/s_server.c ============================================================================== --- stable/8/crypto/openssl/apps/s_server.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/8/crypto/openssl/apps/s_server.c Thu Aug 7 21:06:34 2014 (r269687) @@ -583,7 +583,7 @@ static int MS_CALLBACK ssl_servername_cb if (servername) { - if (strcmp(servername,p->servername)) + if (strcasecmp(servername,p->servername)) return p->extension_error; if (ctx2) { @@ -1095,6 +1095,14 @@ bad: sv_usage(); goto end; } +#ifndef OPENSSL_NO_DTLS1 + if (www && socket_type == SOCK_DGRAM) + { + BIO_printf(bio_err, + "Can't use -HTTP, -www or -WWW with DTLS\n"); + goto end; + } +#endif SSL_load_error_strings(); OpenSSL_add_ssl_algorithms(); @@ -1922,8 +1930,10 @@ again: #ifdef CHARSET_EBCDIC ascii2ebcdic(buf,buf,i); #endif - write(fileno(stdout),buf, - (unsigned int)i); + if (write(fileno(stdout),buf, + (unsigned int)i) != i) + goto err; + if (SSL_pending(con)) goto again; break; case SSL_ERROR_WANT_WRITE: Modified: stable/8/crypto/openssl/apps/speed.c ============================================================================== --- stable/8/crypto/openssl/apps/speed.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/8/crypto/openssl/apps/speed.c Thu Aug 7 21:06:34 2014 (r269687) @@ -2767,7 +2767,11 @@ static int do_multi(int multi) fds=malloc(multi*sizeof *fds); for(n=0 ; n < multi ; ++n) { - pipe(fd); + if (pipe(fd) == -1) + { + fprintf(stderr, "pipe failure\n"); + exit(1); + } fflush(stdout); fflush(stderr); if(fork()) @@ -2779,7 +2783,11 @@ static int do_multi(int multi) { close(fd[0]); close(1); - dup(fd[1]); + if (dup(fd[1]) == -1) + { + fprintf(stderr, "dup failed\n"); + exit(1); + } close(fd[1]); mr=1; usertime=0; Modified: stable/8/crypto/openssl/crypto/asn1/a_object.c ============================================================================== --- stable/8/crypto/openssl/crypto/asn1/a_object.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/8/crypto/openssl/crypto/asn1/a_object.c Thu Aug 7 21:06:34 2014 (r269687) @@ -285,16 +285,28 @@ err: ASN1_OBJECT_free(ret); return(NULL); } + ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp, long len) { ASN1_OBJECT *ret=NULL; const unsigned char *p; - int i; - /* Sanity check OID encoding: can't have leading 0x80 in - * subidentifiers, see: X.690 8.19.2 + int i, length; + + /* Sanity check OID encoding. + * Need at least one content octet. + * MSB must be clear in the last octet. + * can't have leading 0x80 in subidentifiers, see: X.690 8.19.2 */ - for (i = 0, p = *pp; i < len; i++, p++) + if (len <= 0 || len > INT_MAX || pp == NULL || (p = *pp) == NULL || + p[len - 1] & 0x80) + { + ASN1err(ASN1_F_C2I_ASN1_OBJECT,ASN1_R_INVALID_OBJECT_ENCODING); + return NULL; + } + /* Now 0 < len <= INT_MAX, so the cast is safe. */ + length = (int)len; + for (i = 0; i < length; i++, p++) { if (*p == 0x80 && (!i || !(p[-1] & 0x80))) { @@ -313,20 +325,20 @@ ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT else ret=(*a); p= *pp; - if ((ret->data == NULL) || (ret->length < len)) + if ((ret->data == NULL) || (ret->length < length)) { if (ret->data != NULL) OPENSSL_free(ret->data); - ret->data=(unsigned char *)OPENSSL_malloc(len ? (int)len : 1); + ret->data=(unsigned char *)OPENSSL_malloc(length); ret->flags|=ASN1_OBJECT_FLAG_DYNAMIC_DATA; if (ret->data == NULL) { i=ERR_R_MALLOC_FAILURE; goto err; } } - memcpy(ret->data,p,(int)len); - ret->length=(int)len; + memcpy(ret->data,p,length); + ret->length=length; ret->sn=NULL; ret->ln=NULL; /* ret->flags=ASN1_OBJECT_FLAG_DYNAMIC; we know it is dynamic */ - p+=len; + p+=length; if (a != NULL) (*a)=ret; *pp=p; Modified: stable/8/crypto/openssl/crypto/asn1/asn1_lib.c ============================================================================== --- stable/8/crypto/openssl/crypto/asn1/asn1_lib.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/8/crypto/openssl/crypto/asn1/asn1_lib.c Thu Aug 7 21:06:34 2014 (r269687) @@ -131,6 +131,9 @@ int ASN1_get_object(const unsigned char *pclass=xclass; if (!asn1_get_length(&p,&inf,plength,(int)max)) goto err; + if (inf && !(ret & V_ASN1_CONSTRUCTED)) + goto err; + #if 0 fprintf(stderr,"p=%d + *plength=%ld > omax=%ld + *pp=%d (%d > %d)\n", (int)p,*plength,omax,(int)*pp,(int)(p+ *plength), Modified: stable/8/crypto/openssl/crypto/asn1/asn_mime.c ============================================================================== --- stable/8/crypto/openssl/crypto/asn1/asn_mime.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/8/crypto/openssl/crypto/asn1/asn_mime.c Thu Aug 7 21:06:34 2014 (r269687) @@ -595,6 +595,8 @@ static STACK_OF(MIME_HEADER) *mime_parse int len, state, save_state = 0; headers = sk_MIME_HEADER_new(mime_hdr_cmp); + if (!headers) + return NULL; while ((len = BIO_gets(bio, linebuf, MAX_SMLEN)) > 0) { /* If whitespace at line start then continuation line */ if(mhdr && isspace((unsigned char)linebuf[0])) state = MIME_NAME; Modified: stable/8/crypto/openssl/crypto/asn1/asn_pack.c ============================================================================== --- stable/8/crypto/openssl/crypto/asn1/asn_pack.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/8/crypto/openssl/crypto/asn1/asn_pack.c Thu Aug 7 21:06:34 2014 (r269687) @@ -134,15 +134,23 @@ ASN1_STRING *ASN1_pack_string(void *obj, if (!(octmp->length = i2d(obj, NULL))) { ASN1err(ASN1_F_ASN1_PACK_STRING,ASN1_R_ENCODE_ERROR); - return NULL; + goto err; } if (!(p = OPENSSL_malloc (octmp->length))) { ASN1err(ASN1_F_ASN1_PACK_STRING,ERR_R_MALLOC_FAILURE); - return NULL; + goto err; } octmp->data = p; i2d (obj, &p); return octmp; + err: + if (!oct || !*oct) + { + ASN1_STRING_free(octmp); + if (oct) + *oct = NULL; + } + return NULL; } #endif Modified: stable/8/crypto/openssl/crypto/asn1/evp_asn1.c ============================================================================== --- stable/8/crypto/openssl/crypto/asn1/evp_asn1.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/8/crypto/openssl/crypto/asn1/evp_asn1.c Thu Aug 7 21:06:34 2014 (r269687) @@ -66,7 +66,11 @@ int ASN1_TYPE_set_octetstring(ASN1_TYPE ASN1_STRING *os; if ((os=M_ASN1_OCTET_STRING_new()) == NULL) return(0); - if (!M_ASN1_OCTET_STRING_set(os,data,len)) return(0); + if (!M_ASN1_OCTET_STRING_set(os,data,len)) + { + M_ASN1_OCTET_STRING_free(os); + return 0; + } ASN1_TYPE_set(a,V_ASN1_OCTET_STRING,os); return(1); } Modified: stable/8/crypto/openssl/crypto/asn1/t_x509.c ============================================================================== --- stable/8/crypto/openssl/crypto/asn1/t_x509.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/8/crypto/openssl/crypto/asn1/t_x509.c Thu Aug 7 21:06:34 2014 (r269687) @@ -465,6 +465,8 @@ int X509_NAME_print(BIO *bp, X509_NAME * l=80-2-obase; b=X509_NAME_oneline(name,NULL,0); + if (!b) + return 0; if (!*b) { OPENSSL_free(b); Modified: stable/8/crypto/openssl/crypto/asn1/tasn_enc.c ============================================================================== --- stable/8/crypto/openssl/crypto/asn1/tasn_enc.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/8/crypto/openssl/crypto/asn1/tasn_enc.c Thu Aug 7 21:06:34 2014 (r269687) @@ -453,9 +453,14 @@ static int asn1_set_seq_out(STACK_OF(ASN { derlst = OPENSSL_malloc(sk_ASN1_VALUE_num(sk) * sizeof(*derlst)); + if (!derlst) + return 0; tmpdat = OPENSSL_malloc(skcontlen); - if (!derlst || !tmpdat) + if (!tmpdat) + { + OPENSSL_free(derlst); return 0; + } } } /* If not sorting just output each item */ Modified: stable/8/crypto/openssl/crypto/bio/bio_lib.c ============================================================================== --- stable/8/crypto/openssl/crypto/bio/bio_lib.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/8/crypto/openssl/crypto/bio/bio_lib.c Thu Aug 7 21:06:34 2014 (r269687) @@ -132,8 +132,8 @@ int BIO_free(BIO *a) CRYPTO_free_ex_data(CRYPTO_EX_INDEX_BIO, a, &a->ex_data); - if ((a->method == NULL) || (a->method->destroy == NULL)) return(1); - a->method->destroy(a); + if ((a->method != NULL) && (a->method->destroy != NULL)) + a->method->destroy(a); OPENSSL_free(a); return(1); } Modified: stable/8/crypto/openssl/crypto/bn/bn_gf2m.c ============================================================================== --- stable/8/crypto/openssl/crypto/bn/bn_gf2m.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/8/crypto/openssl/crypto/bn/bn_gf2m.c Thu Aug 7 21:06:34 2014 (r269687) @@ -1095,3 +1095,54 @@ int BN_GF2m_arr2poly(const unsigned int return 1; } +/* + * Constant-time conditional swap of a and b. + * a and b are swapped if condition is not 0. The code assumes that at most one bit of condition is set. + * nwords is the number of words to swap. The code assumes that at least nwords are allocated in both a and b, + * and that no more than nwords are used by either a or b. + * a and b cannot be the same number + */ +void BN_consttime_swap(BN_ULONG condition, BIGNUM *a, BIGNUM *b, int nwords) + { + BN_ULONG t; + int i; + + bn_wcheck_size(a, nwords); + bn_wcheck_size(b, nwords); + + assert(a != b); + assert((condition & (condition - 1)) == 0); + assert(sizeof(BN_ULONG) >= sizeof(int)); + + condition = ((condition - 1) >> (BN_BITS2 - 1)) - 1; + + t = (a->top^b->top) & condition; + a->top ^= t; + b->top ^= t; + +#define BN_CONSTTIME_SWAP(ind) \ + do { \ + t = (a->d[ind] ^ b->d[ind]) & condition; \ + a->d[ind] ^= t; \ + b->d[ind] ^= t; \ + } while (0) + + + switch (nwords) { + default: + for (i = 10; i < nwords; i++) + BN_CONSTTIME_SWAP(i); + /* Fallthrough */ + case 10: BN_CONSTTIME_SWAP(9); /* Fallthrough */ + case 9: BN_CONSTTIME_SWAP(8); /* Fallthrough */ + case 8: BN_CONSTTIME_SWAP(7); /* Fallthrough */ + case 7: BN_CONSTTIME_SWAP(6); /* Fallthrough */ + case 6: BN_CONSTTIME_SWAP(5); /* Fallthrough */ + case 5: BN_CONSTTIME_SWAP(4); /* Fallthrough */ + case 4: BN_CONSTTIME_SWAP(3); /* Fallthrough */ + case 3: BN_CONSTTIME_SWAP(2); /* Fallthrough */ + case 2: BN_CONSTTIME_SWAP(1); /* Fallthrough */ + case 1: BN_CONSTTIME_SWAP(0); + } +#undef BN_CONSTTIME_SWAP +} Modified: stable/8/crypto/openssl/crypto/bn/bn_lib.c ============================================================================== --- stable/8/crypto/openssl/crypto/bn/bn_lib.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/8/crypto/openssl/crypto/bn/bn_lib.c Thu Aug 7 21:06:34 2014 (r269687) @@ -320,6 +320,15 @@ static BN_ULONG *bn_expand_internal(cons BNerr(BN_F_BN_EXPAND_INTERNAL,ERR_R_MALLOC_FAILURE); return(NULL); } +#ifdef PURIFY + /* Valgrind complains in BN_consttime_swap because we process the whole + * array even if it's not initialised yet. This doesn't matter in that + * function - what's important is constant time operation (we're not + * actually going to use the data) + */ + memset(a, 0, sizeof(BN_ULONG)*words); +#endif + #if 1 B=b->d; /* Check if the previous number needs to be copied */ @@ -824,55 +833,3 @@ int bn_cmp_part_words(const BN_ULONG *a, } return bn_cmp_words(a,b,cl); } - -/* - * Constant-time conditional swap of a and b. - * a and b are swapped if condition is not 0. The code assumes that at most one bit of condition is set. - * nwords is the number of words to swap. The code assumes that at least nwords are allocated in both a and b, - * and that no more than nwords are used by either a or b. - * a and b cannot be the same number - */ -void BN_consttime_swap(BN_ULONG condition, BIGNUM *a, BIGNUM *b, int nwords) - { - BN_ULONG t; - int i; - - bn_wcheck_size(a, nwords); - bn_wcheck_size(b, nwords); - - assert(a != b); - assert((condition & (condition - 1)) == 0); - assert(sizeof(BN_ULONG) >= sizeof(int)); - - condition = ((condition - 1) >> (BN_BITS2 - 1)) - 1; - - t = (a->top^b->top) & condition; - a->top ^= t; - b->top ^= t; - -#define BN_CONSTTIME_SWAP(ind) \ - do { \ - t = (a->d[ind] ^ b->d[ind]) & condition; \ - a->d[ind] ^= t; \ - b->d[ind] ^= t; \ - } while (0) - - - switch (nwords) { - default: - for (i = 10; i < nwords; i++) - BN_CONSTTIME_SWAP(i); - /* Fallthrough */ - case 10: BN_CONSTTIME_SWAP(9); /* Fallthrough */ - case 9: BN_CONSTTIME_SWAP(8); /* Fallthrough */ - case 8: BN_CONSTTIME_SWAP(7); /* Fallthrough */ - case 7: BN_CONSTTIME_SWAP(6); /* Fallthrough */ - case 6: BN_CONSTTIME_SWAP(5); /* Fallthrough */ - case 5: BN_CONSTTIME_SWAP(4); /* Fallthrough */ - case 4: BN_CONSTTIME_SWAP(3); /* Fallthrough */ - case 3: BN_CONSTTIME_SWAP(2); /* Fallthrough */ - case 2: BN_CONSTTIME_SWAP(1); /* Fallthrough */ - case 1: BN_CONSTTIME_SWAP(0); - } -#undef BN_CONSTTIME_SWAP -} Modified: stable/8/crypto/openssl/crypto/bn/bn_sqr.c ============================================================================== --- stable/8/crypto/openssl/crypto/bn/bn_sqr.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/8/crypto/openssl/crypto/bn/bn_sqr.c Thu Aug 7 21:06:34 2014 (r269687) @@ -77,6 +77,7 @@ int BN_sqr(BIGNUM *r, const BIGNUM *a, B if (al <= 0) { r->top=0; + r->neg = 0; return 1; } Modified: stable/8/crypto/openssl/crypto/conf/conf_api.c ============================================================================== --- stable/8/crypto/openssl/crypto/conf/conf_api.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/8/crypto/openssl/crypto/conf/conf_api.c Thu Aug 7 21:06:34 2014 (r269687) @@ -294,7 +294,7 @@ CONF_VALUE *_CONF_new_section(CONF *conf v->value=(char *)sk; vv=(CONF_VALUE *)lh_insert(conf->data,v); - assert(vv == NULL); + OPENSSL_assert(vv == NULL); ok=1; err: if (!ok) Modified: stable/8/crypto/openssl/crypto/conf/conf_def.c ============================================================================== --- stable/8/crypto/openssl/crypto/conf/conf_def.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/8/crypto/openssl/crypto/conf/conf_def.c Thu Aug 7 21:06:34 2014 (r269687) @@ -324,7 +324,7 @@ again: p=eat_ws(conf, end); if (*p != ']') { - if (*p != '\0') + if (*p != '\0' && ss != p) { ss=p; goto again; Modified: stable/8/crypto/openssl/crypto/ec/ec_lib.c ============================================================================== --- stable/8/crypto/openssl/crypto/ec/ec_lib.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/8/crypto/openssl/crypto/ec/ec_lib.c Thu Aug 7 21:06:34 2014 (r269687) @@ -1010,7 +1010,7 @@ int EC_POINT_dbl(const EC_GROUP *group, int EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx) { - if (group->meth->dbl == 0) + if (group->meth->invert == 0) { ECerr(EC_F_EC_POINT_INVERT, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); return 0; Modified: stable/8/crypto/openssl/crypto/ec/ecp_smpl.c ============================================================================== --- stable/8/crypto/openssl/crypto/ec/ecp_smpl.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/8/crypto/openssl/crypto/ec/ecp_smpl.c Thu Aug 7 21:06:34 2014 (r269687) @@ -1540,9 +1540,8 @@ int ec_GFp_simple_make_affine(const EC_G int ec_GFp_simple_points_make_affine(const EC_GROUP *group, size_t num, EC_POINT *points[], BN_CTX *ctx) { BN_CTX *new_ctx = NULL; - BIGNUM *tmp0, *tmp1; - size_t pow2 = 0; - BIGNUM **heap = NULL; + BIGNUM *tmp, *tmp_Z; + BIGNUM **prod_Z = NULL; size_t i; int ret = 0; @@ -1557,124 +1556,104 @@ int ec_GFp_simple_points_make_affine(con } BN_CTX_start(ctx); - tmp0 = BN_CTX_get(ctx); - tmp1 = BN_CTX_get(ctx); - if (tmp0 == NULL || tmp1 == NULL) goto err; - - /* Before converting the individual points, compute inverses of all Z values. - * Modular inversion is rather slow, but luckily we can do with a single - * explicit inversion, plus about 3 multiplications per input value. - */ - - pow2 = 1; - while (num > pow2) - pow2 <<= 1; - /* Now pow2 is the smallest power of 2 satifsying pow2 >= num. - * We need twice that. */ - pow2 <<= 1; - - heap = OPENSSL_malloc(pow2 * sizeof heap[0]); - if (heap == NULL) goto err; - - /* The array is used as a binary tree, exactly as in heapsort: - * - * heap[1] - * heap[2] heap[3] - * heap[4] heap[5] heap[6] heap[7] - * heap[8]heap[9] heap[10]heap[11] heap[12]heap[13] heap[14] heap[15] - * - * We put the Z's in the last line; - * then we set each other node to the product of its two child-nodes (where - * empty or 0 entries are treated as ones); - * then we invert heap[1]; - * then we invert each other node by replacing it by the product of its - * parent (after inversion) and its sibling (before inversion). - */ - heap[0] = NULL; - for (i = pow2/2 - 1; i > 0; i--) - heap[i] = NULL; + tmp = BN_CTX_get(ctx); + tmp_Z = BN_CTX_get(ctx); + if (tmp == NULL || tmp_Z == NULL) goto err; + + prod_Z = OPENSSL_malloc(num * sizeof prod_Z[0]); + if (prod_Z == NULL) goto err; for (i = 0; i < num; i++) - heap[pow2/2 + i] = &points[i]->Z; - for (i = pow2/2 + num; i < pow2; i++) - heap[i] = NULL; - - /* set each node to the product of its children */ - for (i = pow2/2 - 1; i > 0; i--) - { - heap[i] = BN_new(); - if (heap[i] == NULL) goto err; - - if (heap[2*i] != NULL) + { + prod_Z[i] = BN_new(); + if (prod_Z[i] == NULL) goto err; + } + + /* Set each prod_Z[i] to the product of points[0]->Z .. points[i]->Z, + * skipping any zero-valued inputs (pretend that they're 1). */ + + if (!BN_is_zero(&points[0]->Z)) + { + if (!BN_copy(prod_Z[0], &points[0]->Z)) goto err; + } + else + { + if (group->meth->field_set_to_one != 0) { - if ((heap[2*i + 1] == NULL) || BN_is_zero(heap[2*i + 1])) - { - if (!BN_copy(heap[i], heap[2*i])) goto err; - } - else - { - if (BN_is_zero(heap[2*i])) - { - if (!BN_copy(heap[i], heap[2*i + 1])) goto err; - } - else - { - if (!group->meth->field_mul(group, heap[i], - heap[2*i], heap[2*i + 1], ctx)) goto err; - } - } + if (!group->meth->field_set_to_one(group, prod_Z[0], ctx)) goto err; + } + else + { + if (!BN_one(prod_Z[0])) goto err; } } - /* invert heap[1] */ - if (!BN_is_zero(heap[1])) + for (i = 1; i < num; i++) { - if (!BN_mod_inverse(heap[1], heap[1], &group->field, ctx)) + if (!BN_is_zero(&points[i]->Z)) { - ECerr(EC_F_EC_GFP_SIMPLE_POINTS_MAKE_AFFINE, ERR_R_BN_LIB); - goto err; + if (!group->meth->field_mul(group, prod_Z[i], prod_Z[i - 1], &points[i]->Z, ctx)) goto err; } + else + { + if (!BN_copy(prod_Z[i], prod_Z[i - 1])) goto err; + } + } + + /* Now use a single explicit inversion to replace every + * non-zero points[i]->Z by its inverse. */ + + if (!BN_mod_inverse(tmp, prod_Z[num - 1], &group->field, ctx)) + { + ECerr(EC_F_EC_GFP_SIMPLE_POINTS_MAKE_AFFINE, ERR_R_BN_LIB); + goto err; } if (group->meth->field_encode != 0) { - /* in the Montgomery case, we just turned R*H (representing H) + /* In the Montgomery case, we just turned R*H (representing H) * into 1/(R*H), but we need R*(1/H) (representing 1/H); - * i.e. we have need to multiply by the Montgomery factor twice */ - if (!group->meth->field_encode(group, heap[1], heap[1], ctx)) goto err; - if (!group->meth->field_encode(group, heap[1], heap[1], ctx)) goto err; + * i.e. we need to multiply by the Montgomery factor twice. */ + if (!group->meth->field_encode(group, tmp, tmp, ctx)) goto err; + if (!group->meth->field_encode(group, tmp, tmp, ctx)) goto err; } - /* set other heap[i]'s to their inverses */ - for (i = 2; i < pow2/2 + num; i += 2) + for (i = num - 1; i > 0; --i) { - /* i is even */ - if ((heap[i + 1] != NULL) && !BN_is_zero(heap[i + 1])) - { - if (!group->meth->field_mul(group, tmp0, heap[i/2], heap[i + 1], ctx)) goto err; - if (!group->meth->field_mul(group, tmp1, heap[i/2], heap[i], ctx)) goto err; - if (!BN_copy(heap[i], tmp0)) goto err; - if (!BN_copy(heap[i + 1], tmp1)) goto err; - } - else + /* Loop invariant: tmp is the product of the inverses of + * points[0]->Z .. points[i]->Z (zero-valued inputs skipped). */ + if (!BN_is_zero(&points[i]->Z)) { - if (!BN_copy(heap[i], heap[i/2])) goto err; + /* Set tmp_Z to the inverse of points[i]->Z (as product + * of Z inverses 0 .. i, Z values 0 .. i - 1). */ + if (!group->meth->field_mul(group, tmp_Z, prod_Z[i - 1], tmp, ctx)) goto err; + /* Update tmp to satisfy the loop invariant for i - 1. */ + if (!group->meth->field_mul(group, tmp, tmp, &points[i]->Z, ctx)) goto err; + /* Replace points[i]->Z by its inverse. */ + if (!BN_copy(&points[i]->Z, tmp_Z)) goto err; } } - /* we have replaced all non-zero Z's by their inverses, now fix up all the points */ + if (!BN_is_zero(&points[0]->Z)) + { + /* Replace points[0]->Z by its inverse. */ + if (!BN_copy(&points[0]->Z, tmp)) goto err; + } + + /* Finally, fix up the X and Y coordinates for all points. */ + for (i = 0; i < num; i++) { EC_POINT *p = points[i]; - + if (!BN_is_zero(&p->Z)) { /* turn (X, Y, 1/Z) into (X/Z^2, Y/Z^3, 1) */ - if (!group->meth->field_sqr(group, tmp1, &p->Z, ctx)) goto err; - if (!group->meth->field_mul(group, &p->X, &p->X, tmp1, ctx)) goto err; + if (!group->meth->field_sqr(group, tmp, &p->Z, ctx)) goto err; + if (!group->meth->field_mul(group, &p->X, &p->X, tmp, ctx)) goto err; + + if (!group->meth->field_mul(group, tmp, tmp, &p->Z, ctx)) goto err; + if (!group->meth->field_mul(group, &p->Y, &p->Y, tmp, ctx)) goto err; - if (!group->meth->field_mul(group, tmp1, tmp1, &p->Z, ctx)) goto err; - if (!group->meth->field_mul(group, &p->Y, &p->Y, tmp1, ctx)) goto err; - if (group->meth->field_set_to_one != 0) { if (!group->meth->field_set_to_one(group, &p->Z, ctx)) goto err; @@ -1688,20 +1667,19 @@ int ec_GFp_simple_points_make_affine(con } ret = 1; - + err: BN_CTX_end(ctx); if (new_ctx != NULL) BN_CTX_free(new_ctx); - if (heap != NULL) + if (prod_Z != NULL) { - /* heap[pow2/2] .. heap[pow2-1] have not been allocated locally! */ - for (i = pow2/2 - 1; i > 0; i--) + for (i = 0; i < num; i++) { - if (heap[i] != NULL) - BN_clear_free(heap[i]); + if (prod_Z[i] != NULL) + BN_clear_free(prod_Z[i]); } - OPENSSL_free(heap); + OPENSSL_free(prod_Z); } return ret; } Modified: stable/8/crypto/openssl/crypto/idea/ideatest.c ============================================================================== --- stable/8/crypto/openssl/crypto/idea/ideatest.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/8/crypto/openssl/crypto/idea/ideatest.c Thu Aug 7 21:06:34 2014 (r269687) @@ -199,10 +199,10 @@ static int cfb64_test(unsigned char *cfb } memcpy(cfb_tmp,cfb_iv,8); n=0; - idea_cfb64_encrypt(cfb_buf1,cfb_buf2,(long)17,&eks, + idea_cfb64_encrypt(cfb_buf1,cfb_buf2,(long)13,&eks, cfb_tmp,&n,IDEA_DECRYPT); - idea_cfb64_encrypt(&(cfb_buf1[17]),&(cfb_buf2[17]), - (long)CFB_TEST_SIZE-17,&dks, + idea_cfb64_encrypt(&(cfb_buf1[13]),&(cfb_buf2[13]), + (long)CFB_TEST_SIZE-13,&eks, cfb_tmp,&n,IDEA_DECRYPT); if (memcmp(plain,cfb_buf2,CFB_TEST_SIZE) != 0) { Modified: stable/8/crypto/openssl/crypto/objects/obj_dat.c ============================================================================== --- stable/8/crypto/openssl/crypto/objects/obj_dat.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/8/crypto/openssl/crypto/objects/obj_dat.c Thu Aug 7 21:06:34 2014 (r269687) @@ -444,11 +444,12 @@ int OBJ_obj2txt(char *buf, int buf_len, unsigned char *p; char tbuf[DECIMAL_SIZE(i)+DECIMAL_SIZE(l)+2]; - if ((a == NULL) || (a->data == NULL)) { - buf[0]='\0'; - return(0); - } + /* Ensure that, at every state, |buf| is NUL-terminated. */ + if (buf && buf_len > 0) + buf[0] = '\0'; + if ((a == NULL) || (a->data == NULL)) + return(0); if (!no_name && (nid=OBJ_obj2nid(a)) != NID_undef) { @@ -527,9 +528,10 @@ int OBJ_obj2txt(char *buf, int buf_len, i=(int)(l/40); l-=(long)(i*40); } - if (buf && (buf_len > 0)) + if (buf && (buf_len > 1)) { *buf++ = i + '0'; + *buf = '\0'; buf_len--; } n++; @@ -544,9 +546,10 @@ int OBJ_obj2txt(char *buf, int buf_len, i = strlen(bndec); if (buf) { - if (buf_len > 0) + if (buf_len > 1) { *buf++ = '.'; + *buf = '\0'; buf_len--; } BUF_strlcpy(buf,bndec,buf_len); @@ -786,4 +789,3 @@ err: OPENSSL_free(buf); return(ok); } - Modified: stable/8/crypto/openssl/crypto/ocsp/ocsp_ht.c ============================================================================== --- stable/8/crypto/openssl/crypto/ocsp/ocsp_ht.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/8/crypto/openssl/crypto/ocsp/ocsp_ht.c Thu Aug 7 21:06:34 2014 (r269687) @@ -464,6 +464,9 @@ OCSP_RESPONSE *OCSP_sendreq_bio(BIO *b, ctx = OCSP_sendreq_new(b, path, req, -1); + if (!ctx) + return NULL; + do { rv = OCSP_sendreq_nbio(&resp, ctx); Modified: stable/8/crypto/openssl/crypto/ocsp/ocsp_lib.c ============================================================================== --- stable/8/crypto/openssl/crypto/ocsp/ocsp_lib.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/8/crypto/openssl/crypto/ocsp/ocsp_lib.c Thu Aug 7 21:06:34 2014 (r269687) @@ -220,8 +220,19 @@ int OCSP_parse_url(char *url, char **pho if (!*ppath) goto mem_err; + p = host; + if(host[0] == '[') + { + /* ipv6 literal */ + host++; + p = strchr(host, ']'); + if(!p) goto parse_err; + *p = '\0'; + p++; + } + /* Look for optional ':' for port number */ - if ((p = strchr(host, ':'))) + if ((p = strchr(p, ':'))) { *p = 0; port = p + 1; Modified: stable/8/crypto/openssl/crypto/opensslv.h ============================================================================== --- stable/8/crypto/openssl/crypto/opensslv.h Thu Aug 7 21:04:42 2014 (r269686) +++ stable/8/crypto/openssl/crypto/opensslv.h Thu Aug 7 21:06:34 2014 (r269687) @@ -25,11 +25,11 @@ * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for * major minor fix final patch/beta) */ -#define OPENSSL_VERSION_NUMBER 0x009081afL +#define OPENSSL_VERSION_NUMBER 0x009081bfL #ifdef OPENSSL_FIPS -#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8za-fips 5 Jun 2014" +#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8zb-fips 6 Aug 2014" #else -#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8za-freebsd 5 Jun 2014" +#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8zb-freebsd 6 Aug 2014" #endif #define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT Modified: stable/8/crypto/openssl/crypto/pkcs7/Makefile ============================================================================== --- stable/8/crypto/openssl/crypto/pkcs7/Makefile Thu Aug 7 21:04:42 2014 (r269686) +++ stable/8/crypto/openssl/crypto/pkcs7/Makefile Thu Aug 7 21:06:34 2014 (r269687) @@ -39,20 +39,6 @@ test: all: lib -testapps: enc dec sign verify - -enc: enc.o lib - $(CC) $(CFLAGS) -o enc enc.o $(PEX_LIBS) $(LIB) $(EX_LIBS) - -dec: dec.o lib - $(CC) $(CFLAGS) -o dec dec.o $(PEX_LIBS) $(LIB) $(EX_LIBS) - -sign: sign.o lib - $(CC) $(CFLAGS) -o sign sign.o $(PEX_LIBS) $(LIB) $(EX_LIBS) - -verify: verify.o example.o lib - $(CC) $(CFLAGS) -o verify verify.o $(PEX_LIBS) example.o $(LIB) $(EX_LIBS) - lib: $(LIBOBJ) $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. Modified: stable/8/crypto/openssl/crypto/rsa/rsa_eay.c ============================================================================== --- stable/8/crypto/openssl/crypto/rsa/rsa_eay.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/8/crypto/openssl/crypto/rsa/rsa_eay.c Thu Aug 7 21:06:34 2014 (r269687) @@ -457,7 +457,7 @@ static int RSA_eay_private_encrypt(int f if (padding == RSA_X931_PADDING) { BN_sub(f, rsa->n, ret); - if (BN_cmp(ret, f)) + if (BN_cmp(ret, f) > 0) res = f; else res = ret; Modified: stable/8/crypto/openssl/crypto/ui/ui_lib.c ============================================================================== --- stable/8/crypto/openssl/crypto/ui/ui_lib.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/8/crypto/openssl/crypto/ui/ui_lib.c Thu Aug 7 21:06:34 2014 (r269687) @@ -897,9 +897,9 @@ int UI_set_result(UI *ui, UI_STRING *uis break; } } + } default: break; } - } return 0; } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From jkim at FreeBSD.org Thu Aug 7 21:06:49 2014 From: jkim at FreeBSD.org (Jung-uk Kim) Date: Thu, 7 Aug 2014 21:06:42 +0000 (UTC) Subject: svn commit: r269687 - in stable: 8/crypto/openssl 8/crypto/openssl/apps 8/crypto/openssl/crypto 8/crypto/openssl/crypto/asn1 8/crypto/openssl/crypto/bio 8/crypto/openssl/crypto/bn 8/crypto/openssl/... Message-ID: <53e3ea62.2127.2e1d63e6@svn.freebsd.org> Author: jkim Date: Thu Aug 7 21:06:34 2014 New Revision: 269687 URL: http://svnweb.freebsd.org/changeset/base/269687 Log: Merge OpenSSL 0.9.8zb. Added: stable/9/crypto/openssl/doc/ssl/SSL_CTX_set_tlsext_ticket_key_cb.pod - copied unchanged from r269672, vendor-crypto/openssl/dist-0.9.8/doc/ssl/SSL_CTX_set_tlsext_ticket_key_cb.pod stable/9/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 (contents, props changed) Deleted: stable/9/crypto/openssl/crypto/pkcs7/bio_ber.c stable/9/crypto/openssl/crypto/pkcs7/dec.c stable/9/crypto/openssl/crypto/pkcs7/des.pem stable/9/crypto/openssl/crypto/pkcs7/doc stable/9/crypto/openssl/crypto/pkcs7/enc.c stable/9/crypto/openssl/crypto/pkcs7/es1.pem stable/9/crypto/openssl/crypto/pkcs7/example.c stable/9/crypto/openssl/crypto/pkcs7/example.h stable/9/crypto/openssl/crypto/pkcs7/info.pem stable/9/crypto/openssl/crypto/pkcs7/infokey.pem stable/9/crypto/openssl/crypto/pkcs7/p7/ stable/9/crypto/openssl/crypto/pkcs7/server.pem stable/9/crypto/openssl/crypto/pkcs7/sign.c stable/9/crypto/openssl/crypto/pkcs7/t/ stable/9/crypto/openssl/crypto/pkcs7/verify.c stable/9/crypto/openssl/demos/eay/ stable/9/crypto/openssl/demos/maurice/ Modified: stable/9/crypto/openssl/CHANGES stable/9/crypto/openssl/FAQ stable/9/crypto/openssl/Makefile stable/9/crypto/openssl/NEWS stable/9/crypto/openssl/README stable/9/crypto/openssl/apps/apps.c stable/9/crypto/openssl/apps/ca.c stable/9/crypto/openssl/apps/crl2p7.c stable/9/crypto/openssl/apps/ocsp.c stable/9/crypto/openssl/apps/s_server.c stable/9/crypto/openssl/apps/speed.c stable/9/crypto/openssl/crypto/asn1/a_object.c stable/9/crypto/openssl/crypto/asn1/asn1_lib.c stable/9/crypto/openssl/crypto/asn1/asn_mime.c stable/9/crypto/openssl/crypto/asn1/asn_pack.c stable/9/crypto/openssl/crypto/asn1/evp_asn1.c stable/9/crypto/openssl/crypto/asn1/t_x509.c stable/9/crypto/openssl/crypto/asn1/tasn_enc.c stable/9/crypto/openssl/crypto/bio/bio_lib.c stable/9/crypto/openssl/crypto/bn/bn_gf2m.c stable/9/crypto/openssl/crypto/bn/bn_lib.c stable/9/crypto/openssl/crypto/bn/bn_sqr.c stable/9/crypto/openssl/crypto/conf/conf_api.c stable/9/crypto/openssl/crypto/conf/conf_def.c stable/9/crypto/openssl/crypto/ec/ec_lib.c stable/9/crypto/openssl/crypto/ec/ecp_smpl.c stable/9/crypto/openssl/crypto/idea/ideatest.c stable/9/crypto/openssl/crypto/objects/obj_dat.c stable/9/crypto/openssl/crypto/ocsp/ocsp_ht.c stable/9/crypto/openssl/crypto/ocsp/ocsp_lib.c stable/9/crypto/openssl/crypto/opensslv.h stable/9/crypto/openssl/crypto/pkcs7/Makefile stable/9/crypto/openssl/crypto/rsa/rsa_eay.c stable/9/crypto/openssl/crypto/ui/ui_lib.c stable/9/crypto/openssl/doc/apps/asn1parse.pod stable/9/crypto/openssl/doc/apps/ca.pod stable/9/crypto/openssl/doc/apps/crl.pod stable/9/crypto/openssl/doc/apps/dhparam.pod stable/9/crypto/openssl/doc/apps/dsa.pod stable/9/crypto/openssl/doc/apps/ecparam.pod stable/9/crypto/openssl/doc/apps/gendsa.pod stable/9/crypto/openssl/doc/apps/genrsa.pod stable/9/crypto/openssl/doc/apps/rsa.pod stable/9/crypto/openssl/doc/apps/s_client.pod stable/9/crypto/openssl/doc/apps/s_server.pod stable/9/crypto/openssl/doc/apps/verify.pod stable/9/crypto/openssl/doc/apps/x509.pod stable/9/crypto/openssl/doc/apps/x509v3_config.pod stable/9/crypto/openssl/doc/crypto/ASN1_generate_nconf.pod stable/9/crypto/openssl/doc/crypto/BIO_f_base64.pod stable/9/crypto/openssl/doc/crypto/BIO_push.pod stable/9/crypto/openssl/doc/crypto/ERR_get_error.pod stable/9/crypto/openssl/doc/crypto/RSA_set_method.pod stable/9/crypto/openssl/doc/crypto/RSA_sign.pod stable/9/crypto/openssl/doc/crypto/des.pod stable/9/crypto/openssl/doc/crypto/err.pod stable/9/crypto/openssl/doc/crypto/pem.pod stable/9/crypto/openssl/doc/crypto/ui.pod stable/9/crypto/openssl/doc/fingerprints.txt stable/9/crypto/openssl/doc/ssl/SSL_CIPHER_get_name.pod stable/9/crypto/openssl/doc/ssl/SSL_CTX_add_extra_chain_cert.pod stable/9/crypto/openssl/doc/ssl/SSL_CTX_add_session.pod stable/9/crypto/openssl/doc/ssl/SSL_CTX_set_client_CA_list.pod stable/9/crypto/openssl/doc/ssl/SSL_CTX_set_client_cert_cb.pod stable/9/crypto/openssl/doc/ssl/SSL_CTX_set_options.pod stable/9/crypto/openssl/doc/ssl/SSL_CTX_set_tmp_dh_callback.pod stable/9/crypto/openssl/doc/ssl/SSL_CTX_set_verify.pod stable/9/crypto/openssl/doc/ssl/SSL_get_version.pod stable/9/crypto/openssl/doc/ssl/SSL_shutdown.pod stable/9/crypto/openssl/doc/ssl/d2i_SSL_SESSION.pod stable/9/crypto/openssl/openssl.spec stable/9/crypto/openssl/ssl/d1_both.c stable/9/crypto/openssl/ssl/d1_clnt.c stable/9/crypto/openssl/ssl/d1_srvr.c stable/9/crypto/openssl/ssl/s23_lib.c stable/9/crypto/openssl/ssl/s23_srvr.c stable/9/crypto/openssl/ssl/s3_clnt.c stable/9/crypto/openssl/ssl/s3_pkt.c stable/9/crypto/openssl/ssl/s3_srvr.c stable/9/crypto/openssl/ssl/ssl_ciph.c stable/9/crypto/openssl/ssl/ssl_stat.c stable/9/crypto/openssl/ssl/t1_lib.c stable/9/crypto/openssl/util/mkerr.pl stable/9/secure/lib/libcrypto/Makefile stable/9/secure/lib/libcrypto/Makefile.inc stable/9/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 stable/9/secure/lib/libcrypto/man/ASN1_STRING_length.3 stable/9/secure/lib/libcrypto/man/ASN1_STRING_new.3 stable/9/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 stable/9/secure/lib/libcrypto/man/ASN1_generate_nconf.3 stable/9/secure/lib/libcrypto/man/BIO_ctrl.3 stable/9/secure/lib/libcrypto/man/BIO_f_base64.3 stable/9/secure/lib/libcrypto/man/BIO_f_buffer.3 stable/9/secure/lib/libcrypto/man/BIO_f_cipher.3 stable/9/secure/lib/libcrypto/man/BIO_f_md.3 stable/9/secure/lib/libcrypto/man/BIO_f_null.3 stable/9/secure/lib/libcrypto/man/BIO_f_ssl.3 stable/9/secure/lib/libcrypto/man/BIO_find_type.3 stable/9/secure/lib/libcrypto/man/BIO_new.3 stable/9/secure/lib/libcrypto/man/BIO_push.3 stable/9/secure/lib/libcrypto/man/BIO_read.3 stable/9/secure/lib/libcrypto/man/BIO_s_accept.3 stable/9/secure/lib/libcrypto/man/BIO_s_bio.3 stable/9/secure/lib/libcrypto/man/BIO_s_connect.3 stable/9/secure/lib/libcrypto/man/BIO_s_fd.3 stable/9/secure/lib/libcrypto/man/BIO_s_file.3 stable/9/secure/lib/libcrypto/man/BIO_s_mem.3 stable/9/secure/lib/libcrypto/man/BIO_s_null.3 stable/9/secure/lib/libcrypto/man/BIO_s_socket.3 stable/9/secure/lib/libcrypto/man/BIO_set_callback.3 stable/9/secure/lib/libcrypto/man/BIO_should_retry.3 stable/9/secure/lib/libcrypto/man/BN_BLINDING_new.3 stable/9/secure/lib/libcrypto/man/BN_CTX_new.3 stable/9/secure/lib/libcrypto/man/BN_CTX_start.3 stable/9/secure/lib/libcrypto/man/BN_add.3 stable/9/secure/lib/libcrypto/man/BN_add_word.3 stable/9/secure/lib/libcrypto/man/BN_bn2bin.3 stable/9/secure/lib/libcrypto/man/BN_cmp.3 stable/9/secure/lib/libcrypto/man/BN_copy.3 stable/9/secure/lib/libcrypto/man/BN_generate_prime.3 stable/9/secure/lib/libcrypto/man/BN_mod_inverse.3 stable/9/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 stable/9/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 stable/9/secure/lib/libcrypto/man/BN_new.3 stable/9/secure/lib/libcrypto/man/BN_num_bytes.3 stable/9/secure/lib/libcrypto/man/BN_rand.3 stable/9/secure/lib/libcrypto/man/BN_set_bit.3 stable/9/secure/lib/libcrypto/man/BN_swap.3 stable/9/secure/lib/libcrypto/man/BN_zero.3 stable/9/secure/lib/libcrypto/man/CONF_modules_free.3 stable/9/secure/lib/libcrypto/man/CONF_modules_load_file.3 stable/9/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 stable/9/secure/lib/libcrypto/man/DH_generate_key.3 stable/9/secure/lib/libcrypto/man/DH_generate_parameters.3 stable/9/secure/lib/libcrypto/man/DH_get_ex_new_index.3 stable/9/secure/lib/libcrypto/man/DH_new.3 stable/9/secure/lib/libcrypto/man/DH_set_method.3 stable/9/secure/lib/libcrypto/man/DH_size.3 stable/9/secure/lib/libcrypto/man/DSA_SIG_new.3 stable/9/secure/lib/libcrypto/man/DSA_do_sign.3 stable/9/secure/lib/libcrypto/man/DSA_dup_DH.3 stable/9/secure/lib/libcrypto/man/DSA_generate_key.3 stable/9/secure/lib/libcrypto/man/DSA_generate_parameters.3 stable/9/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 stable/9/secure/lib/libcrypto/man/DSA_new.3 stable/9/secure/lib/libcrypto/man/DSA_set_method.3 stable/9/secure/lib/libcrypto/man/DSA_sign.3 stable/9/secure/lib/libcrypto/man/DSA_size.3 stable/9/secure/lib/libcrypto/man/ERR_GET_LIB.3 stable/9/secure/lib/libcrypto/man/ERR_clear_error.3 stable/9/secure/lib/libcrypto/man/ERR_error_string.3 stable/9/secure/lib/libcrypto/man/ERR_get_error.3 stable/9/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 stable/9/secure/lib/libcrypto/man/ERR_load_strings.3 stable/9/secure/lib/libcrypto/man/ERR_print_errors.3 stable/9/secure/lib/libcrypto/man/ERR_put_error.3 stable/9/secure/lib/libcrypto/man/ERR_remove_state.3 stable/9/secure/lib/libcrypto/man/ERR_set_mark.3 stable/9/secure/lib/libcrypto/man/EVP_BytesToKey.3 stable/9/secure/lib/libcrypto/man/EVP_DigestInit.3 stable/9/secure/lib/libcrypto/man/EVP_EncryptInit.3 stable/9/secure/lib/libcrypto/man/EVP_OpenInit.3 stable/9/secure/lib/libcrypto/man/EVP_PKEY_new.3 stable/9/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 stable/9/secure/lib/libcrypto/man/EVP_SealInit.3 stable/9/secure/lib/libcrypto/man/EVP_SignInit.3 stable/9/secure/lib/libcrypto/man/EVP_VerifyInit.3 stable/9/secure/lib/libcrypto/man/OBJ_nid2obj.3 stable/9/secure/lib/libcrypto/man/OPENSSL_Applink.3 stable/9/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 stable/9/secure/lib/libcrypto/man/OPENSSL_config.3 stable/9/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 stable/9/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 stable/9/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 stable/9/secure/lib/libcrypto/man/PKCS12_create.3 stable/9/secure/lib/libcrypto/man/PKCS12_parse.3 stable/9/secure/lib/libcrypto/man/PKCS7_decrypt.3 stable/9/secure/lib/libcrypto/man/PKCS7_encrypt.3 stable/9/secure/lib/libcrypto/man/PKCS7_sign.3 stable/9/secure/lib/libcrypto/man/PKCS7_verify.3 stable/9/secure/lib/libcrypto/man/RAND_add.3 stable/9/secure/lib/libcrypto/man/RAND_bytes.3 stable/9/secure/lib/libcrypto/man/RAND_cleanup.3 stable/9/secure/lib/libcrypto/man/RAND_egd.3 stable/9/secure/lib/libcrypto/man/RAND_load_file.3 stable/9/secure/lib/libcrypto/man/RAND_set_rand_method.3 stable/9/secure/lib/libcrypto/man/RSA_blinding_on.3 stable/9/secure/lib/libcrypto/man/RSA_check_key.3 stable/9/secure/lib/libcrypto/man/RSA_generate_key.3 stable/9/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 stable/9/secure/lib/libcrypto/man/RSA_new.3 stable/9/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 stable/9/secure/lib/libcrypto/man/RSA_print.3 stable/9/secure/lib/libcrypto/man/RSA_private_encrypt.3 stable/9/secure/lib/libcrypto/man/RSA_public_encrypt.3 stable/9/secure/lib/libcrypto/man/RSA_set_method.3 stable/9/secure/lib/libcrypto/man/RSA_sign.3 stable/9/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 stable/9/secure/lib/libcrypto/man/RSA_size.3 stable/9/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 stable/9/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 stable/9/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 stable/9/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 stable/9/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 stable/9/secure/lib/libcrypto/man/X509_NAME_print_ex.3 stable/9/secure/lib/libcrypto/man/X509_new.3 stable/9/secure/lib/libcrypto/man/bio.3 stable/9/secure/lib/libcrypto/man/blowfish.3 stable/9/secure/lib/libcrypto/man/bn.3 stable/9/secure/lib/libcrypto/man/bn_internal.3 stable/9/secure/lib/libcrypto/man/buffer.3 stable/9/secure/lib/libcrypto/man/crypto.3 stable/9/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 stable/9/secure/lib/libcrypto/man/d2i_DHparams.3 stable/9/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 stable/9/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 stable/9/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 stable/9/secure/lib/libcrypto/man/d2i_X509.3 stable/9/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 stable/9/secure/lib/libcrypto/man/d2i_X509_CRL.3 stable/9/secure/lib/libcrypto/man/d2i_X509_NAME.3 stable/9/secure/lib/libcrypto/man/d2i_X509_REQ.3 stable/9/secure/lib/libcrypto/man/d2i_X509_SIG.3 stable/9/secure/lib/libcrypto/man/des.3 stable/9/secure/lib/libcrypto/man/dh.3 stable/9/secure/lib/libcrypto/man/dsa.3 stable/9/secure/lib/libcrypto/man/ecdsa.3 stable/9/secure/lib/libcrypto/man/engine.3 stable/9/secure/lib/libcrypto/man/err.3 stable/9/secure/lib/libcrypto/man/evp.3 stable/9/secure/lib/libcrypto/man/hmac.3 stable/9/secure/lib/libcrypto/man/lh_stats.3 stable/9/secure/lib/libcrypto/man/lhash.3 stable/9/secure/lib/libcrypto/man/md5.3 stable/9/secure/lib/libcrypto/man/mdc2.3 stable/9/secure/lib/libcrypto/man/pem.3 stable/9/secure/lib/libcrypto/man/rand.3 stable/9/secure/lib/libcrypto/man/rc4.3 stable/9/secure/lib/libcrypto/man/ripemd.3 stable/9/secure/lib/libcrypto/man/rsa.3 stable/9/secure/lib/libcrypto/man/sha.3 stable/9/secure/lib/libcrypto/man/threads.3 stable/9/secure/lib/libcrypto/man/ui.3 stable/9/secure/lib/libcrypto/man/ui_compat.3 stable/9/secure/lib/libcrypto/man/x509.3 stable/9/secure/lib/libssl/Makefile.man stable/9/secure/lib/libssl/man/SSL_CIPHER_get_name.3 stable/9/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 stable/9/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 stable/9/secure/lib/libssl/man/SSL_CTX_add_session.3 stable/9/secure/lib/libssl/man/SSL_CTX_ctrl.3 stable/9/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 stable/9/secure/lib/libssl/man/SSL_CTX_free.3 stable/9/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 stable/9/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 stable/9/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 stable/9/secure/lib/libssl/man/SSL_CTX_new.3 stable/9/secure/lib/libssl/man/SSL_CTX_sess_number.3 stable/9/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 stable/9/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 stable/9/secure/lib/libssl/man/SSL_CTX_sessions.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_mode.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_options.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_timeout.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_verify.3 stable/9/secure/lib/libssl/man/SSL_CTX_use_certificate.3 stable/9/secure/lib/libssl/man/SSL_SESSION_free.3 stable/9/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 stable/9/secure/lib/libssl/man/SSL_SESSION_get_time.3 stable/9/secure/lib/libssl/man/SSL_accept.3 stable/9/secure/lib/libssl/man/SSL_alert_type_string.3 stable/9/secure/lib/libssl/man/SSL_clear.3 stable/9/secure/lib/libssl/man/SSL_connect.3 stable/9/secure/lib/libssl/man/SSL_do_handshake.3 stable/9/secure/lib/libssl/man/SSL_free.3 stable/9/secure/lib/libssl/man/SSL_get_SSL_CTX.3 stable/9/secure/lib/libssl/man/SSL_get_ciphers.3 stable/9/secure/lib/libssl/man/SSL_get_client_CA_list.3 stable/9/secure/lib/libssl/man/SSL_get_current_cipher.3 stable/9/secure/lib/libssl/man/SSL_get_default_timeout.3 stable/9/secure/lib/libssl/man/SSL_get_error.3 stable/9/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 stable/9/secure/lib/libssl/man/SSL_get_ex_new_index.3 stable/9/secure/lib/libssl/man/SSL_get_fd.3 stable/9/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 stable/9/secure/lib/libssl/man/SSL_get_peer_certificate.3 stable/9/secure/lib/libssl/man/SSL_get_rbio.3 stable/9/secure/lib/libssl/man/SSL_get_session.3 stable/9/secure/lib/libssl/man/SSL_get_verify_result.3 stable/9/secure/lib/libssl/man/SSL_get_version.3 stable/9/secure/lib/libssl/man/SSL_library_init.3 stable/9/secure/lib/libssl/man/SSL_load_client_CA_file.3 stable/9/secure/lib/libssl/man/SSL_new.3 stable/9/secure/lib/libssl/man/SSL_pending.3 stable/9/secure/lib/libssl/man/SSL_read.3 stable/9/secure/lib/libssl/man/SSL_rstate_string.3 stable/9/secure/lib/libssl/man/SSL_session_reused.3 stable/9/secure/lib/libssl/man/SSL_set_bio.3 stable/9/secure/lib/libssl/man/SSL_set_connect_state.3 stable/9/secure/lib/libssl/man/SSL_set_fd.3 stable/9/secure/lib/libssl/man/SSL_set_session.3 stable/9/secure/lib/libssl/man/SSL_set_shutdown.3 stable/9/secure/lib/libssl/man/SSL_set_verify_result.3 stable/9/secure/lib/libssl/man/SSL_shutdown.3 stable/9/secure/lib/libssl/man/SSL_state_string.3 stable/9/secure/lib/libssl/man/SSL_want.3 stable/9/secure/lib/libssl/man/SSL_write.3 stable/9/secure/lib/libssl/man/d2i_SSL_SESSION.3 stable/9/secure/lib/libssl/man/ssl.3 stable/9/secure/usr.bin/openssl/man/CA.pl.1 stable/9/secure/usr.bin/openssl/man/asn1parse.1 stable/9/secure/usr.bin/openssl/man/ca.1 stable/9/secure/usr.bin/openssl/man/ciphers.1 stable/9/secure/usr.bin/openssl/man/crl.1 stable/9/secure/usr.bin/openssl/man/crl2pkcs7.1 stable/9/secure/usr.bin/openssl/man/dgst.1 stable/9/secure/usr.bin/openssl/man/dhparam.1 stable/9/secure/usr.bin/openssl/man/dsa.1 stable/9/secure/usr.bin/openssl/man/dsaparam.1 stable/9/secure/usr.bin/openssl/man/ec.1 stable/9/secure/usr.bin/openssl/man/ecparam.1 stable/9/secure/usr.bin/openssl/man/enc.1 stable/9/secure/usr.bin/openssl/man/errstr.1 stable/9/secure/usr.bin/openssl/man/gendsa.1 stable/9/secure/usr.bin/openssl/man/genrsa.1 stable/9/secure/usr.bin/openssl/man/nseq.1 stable/9/secure/usr.bin/openssl/man/ocsp.1 stable/9/secure/usr.bin/openssl/man/openssl.1 stable/9/secure/usr.bin/openssl/man/passwd.1 stable/9/secure/usr.bin/openssl/man/pkcs12.1 stable/9/secure/usr.bin/openssl/man/pkcs7.1 stable/9/secure/usr.bin/openssl/man/pkcs8.1 stable/9/secure/usr.bin/openssl/man/rand.1 stable/9/secure/usr.bin/openssl/man/req.1 stable/9/secure/usr.bin/openssl/man/rsa.1 stable/9/secure/usr.bin/openssl/man/rsautl.1 stable/9/secure/usr.bin/openssl/man/s_client.1 stable/9/secure/usr.bin/openssl/man/s_server.1 stable/9/secure/usr.bin/openssl/man/s_time.1 stable/9/secure/usr.bin/openssl/man/sess_id.1 stable/9/secure/usr.bin/openssl/man/smime.1 stable/9/secure/usr.bin/openssl/man/speed.1 stable/9/secure/usr.bin/openssl/man/spkac.1 stable/9/secure/usr.bin/openssl/man/verify.1 stable/9/secure/usr.bin/openssl/man/version.1 stable/9/secure/usr.bin/openssl/man/x509.1 stable/9/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: stable/9/crypto/openssl/ (props changed) Changes in other areas also in this revision: Added: stable/8/crypto/openssl/doc/ssl/SSL_CTX_set_tlsext_ticket_key_cb.pod - copied unchanged from r269672, vendor-crypto/openssl/dist-0.9.8/doc/ssl/SSL_CTX_set_tlsext_ticket_key_cb.pod stable/8/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 (contents, props changed) Deleted: stable/8/crypto/openssl/crypto/pkcs7/bio_ber.c stable/8/crypto/openssl/crypto/pkcs7/dec.c stable/8/crypto/openssl/crypto/pkcs7/des.pem stable/8/crypto/openssl/crypto/pkcs7/doc stable/8/crypto/openssl/crypto/pkcs7/enc.c stable/8/crypto/openssl/crypto/pkcs7/es1.pem stable/8/crypto/openssl/crypto/pkcs7/example.c stable/8/crypto/openssl/crypto/pkcs7/example.h stable/8/crypto/openssl/crypto/pkcs7/info.pem stable/8/crypto/openssl/crypto/pkcs7/infokey.pem stable/8/crypto/openssl/crypto/pkcs7/p7/ stable/8/crypto/openssl/crypto/pkcs7/server.pem stable/8/crypto/openssl/crypto/pkcs7/sign.c stable/8/crypto/openssl/crypto/pkcs7/t/ stable/8/crypto/openssl/crypto/pkcs7/verify.c stable/8/crypto/openssl/demos/eay/ stable/8/crypto/openssl/demos/maurice/ Modified: stable/8/crypto/openssl/CHANGES stable/8/crypto/openssl/FAQ stable/8/crypto/openssl/Makefile stable/8/crypto/openssl/NEWS stable/8/crypto/openssl/README stable/8/crypto/openssl/apps/apps.c stable/8/crypto/openssl/apps/ca.c stable/8/crypto/openssl/apps/crl2p7.c stable/8/crypto/openssl/apps/ocsp.c stable/8/crypto/openssl/apps/s_server.c stable/8/crypto/openssl/apps/speed.c stable/8/crypto/openssl/crypto/asn1/a_object.c stable/8/crypto/openssl/crypto/asn1/asn1_lib.c stable/8/crypto/openssl/crypto/asn1/asn_mime.c stable/8/crypto/openssl/crypto/asn1/asn_pack.c stable/8/crypto/openssl/crypto/asn1/evp_asn1.c stable/8/crypto/openssl/crypto/asn1/t_x509.c stable/8/crypto/openssl/crypto/asn1/tasn_enc.c stable/8/crypto/openssl/crypto/bio/bio_lib.c stable/8/crypto/openssl/crypto/bn/bn_gf2m.c stable/8/crypto/openssl/crypto/bn/bn_lib.c stable/8/crypto/openssl/crypto/bn/bn_sqr.c stable/8/crypto/openssl/crypto/conf/conf_api.c stable/8/crypto/openssl/crypto/conf/conf_def.c stable/8/crypto/openssl/crypto/ec/ec_lib.c stable/8/crypto/openssl/crypto/ec/ecp_smpl.c stable/8/crypto/openssl/crypto/idea/ideatest.c stable/8/crypto/openssl/crypto/objects/obj_dat.c stable/8/crypto/openssl/crypto/ocsp/ocsp_ht.c stable/8/crypto/openssl/crypto/ocsp/ocsp_lib.c stable/8/crypto/openssl/crypto/opensslv.h stable/8/crypto/openssl/crypto/pkcs7/Makefile stable/8/crypto/openssl/crypto/rsa/rsa_eay.c stable/8/crypto/openssl/crypto/ui/ui_lib.c stable/8/crypto/openssl/doc/apps/asn1parse.pod stable/8/crypto/openssl/doc/apps/ca.pod stable/8/crypto/openssl/doc/apps/crl.pod stable/8/crypto/openssl/doc/apps/dhparam.pod stable/8/crypto/openssl/doc/apps/dsa.pod stable/8/crypto/openssl/doc/apps/ecparam.pod stable/8/crypto/openssl/doc/apps/gendsa.pod stable/8/crypto/openssl/doc/apps/genrsa.pod stable/8/crypto/openssl/doc/apps/rsa.pod stable/8/crypto/openssl/doc/apps/s_client.pod stable/8/crypto/openssl/doc/apps/s_server.pod stable/8/crypto/openssl/doc/apps/verify.pod stable/8/crypto/openssl/doc/apps/x509.pod stable/8/crypto/openssl/doc/apps/x509v3_config.pod stable/8/crypto/openssl/doc/crypto/ASN1_generate_nconf.pod stable/8/crypto/openssl/doc/crypto/BIO_f_base64.pod stable/8/crypto/openssl/doc/crypto/BIO_push.pod stable/8/crypto/openssl/doc/crypto/ERR_get_error.pod stable/8/crypto/openssl/doc/crypto/RSA_set_method.pod stable/8/crypto/openssl/doc/crypto/RSA_sign.pod stable/8/crypto/openssl/doc/crypto/des.pod stable/8/crypto/openssl/doc/crypto/err.pod stable/8/crypto/openssl/doc/crypto/pem.pod stable/8/crypto/openssl/doc/crypto/ui.pod stable/8/crypto/openssl/doc/fingerprints.txt stable/8/crypto/openssl/doc/ssl/SSL_CIPHER_get_name.pod stable/8/crypto/openssl/doc/ssl/SSL_CTX_add_extra_chain_cert.pod stable/8/crypto/openssl/doc/ssl/SSL_CTX_add_session.pod stable/8/crypto/openssl/doc/ssl/SSL_CTX_set_client_CA_list.pod stable/8/crypto/openssl/doc/ssl/SSL_CTX_set_client_cert_cb.pod stable/8/crypto/openssl/doc/ssl/SSL_CTX_set_options.pod stable/8/crypto/openssl/doc/ssl/SSL_CTX_set_tmp_dh_callback.pod stable/8/crypto/openssl/doc/ssl/SSL_CTX_set_verify.pod stable/8/crypto/openssl/doc/ssl/SSL_get_version.pod stable/8/crypto/openssl/doc/ssl/SSL_shutdown.pod stable/8/crypto/openssl/doc/ssl/d2i_SSL_SESSION.pod stable/8/crypto/openssl/openssl.spec stable/8/crypto/openssl/ssl/d1_both.c stable/8/crypto/openssl/ssl/d1_clnt.c stable/8/crypto/openssl/ssl/d1_srvr.c stable/8/crypto/openssl/ssl/s23_lib.c stable/8/crypto/openssl/ssl/s23_srvr.c stable/8/crypto/openssl/ssl/s3_clnt.c stable/8/crypto/openssl/ssl/s3_pkt.c stable/8/crypto/openssl/ssl/s3_srvr.c stable/8/crypto/openssl/ssl/ssl_ciph.c stable/8/crypto/openssl/ssl/ssl_stat.c stable/8/crypto/openssl/ssl/t1_lib.c stable/8/crypto/openssl/util/mkerr.pl stable/8/secure/lib/libcrypto/Makefile stable/8/secure/lib/libcrypto/Makefile.inc stable/8/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 stable/8/secure/lib/libcrypto/man/ASN1_STRING_length.3 stable/8/secure/lib/libcrypto/man/ASN1_STRING_new.3 stable/8/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 stable/8/secure/lib/libcrypto/man/ASN1_generate_nconf.3 stable/8/secure/lib/libcrypto/man/BIO_ctrl.3 stable/8/secure/lib/libcrypto/man/BIO_f_base64.3 stable/8/secure/lib/libcrypto/man/BIO_f_buffer.3 stable/8/secure/lib/libcrypto/man/BIO_f_cipher.3 stable/8/secure/lib/libcrypto/man/BIO_f_md.3 stable/8/secure/lib/libcrypto/man/BIO_f_null.3 stable/8/secure/lib/libcrypto/man/BIO_f_ssl.3 stable/8/secure/lib/libcrypto/man/BIO_find_type.3 stable/8/secure/lib/libcrypto/man/BIO_new.3 stable/8/secure/lib/libcrypto/man/BIO_push.3 stable/8/secure/lib/libcrypto/man/BIO_read.3 stable/8/secure/lib/libcrypto/man/BIO_s_accept.3 stable/8/secure/lib/libcrypto/man/BIO_s_bio.3 stable/8/secure/lib/libcrypto/man/BIO_s_connect.3 stable/8/secure/lib/libcrypto/man/BIO_s_fd.3 stable/8/secure/lib/libcrypto/man/BIO_s_file.3 stable/8/secure/lib/libcrypto/man/BIO_s_mem.3 stable/8/secure/lib/libcrypto/man/BIO_s_null.3 stable/8/secure/lib/libcrypto/man/BIO_s_socket.3 stable/8/secure/lib/libcrypto/man/BIO_set_callback.3 stable/8/secure/lib/libcrypto/man/BIO_should_retry.3 stable/8/secure/lib/libcrypto/man/BN_BLINDING_new.3 stable/8/secure/lib/libcrypto/man/BN_CTX_new.3 stable/8/secure/lib/libcrypto/man/BN_CTX_start.3 stable/8/secure/lib/libcrypto/man/BN_add.3 stable/8/secure/lib/libcrypto/man/BN_add_word.3 stable/8/secure/lib/libcrypto/man/BN_bn2bin.3 stable/8/secure/lib/libcrypto/man/BN_cmp.3 stable/8/secure/lib/libcrypto/man/BN_copy.3 stable/8/secure/lib/libcrypto/man/BN_generate_prime.3 stable/8/secure/lib/libcrypto/man/BN_mod_inverse.3 stable/8/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 stable/8/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 stable/8/secure/lib/libcrypto/man/BN_new.3 stable/8/secure/lib/libcrypto/man/BN_num_bytes.3 stable/8/secure/lib/libcrypto/man/BN_rand.3 stable/8/secure/lib/libcrypto/man/BN_set_bit.3 stable/8/secure/lib/libcrypto/man/BN_swap.3 stable/8/secure/lib/libcrypto/man/BN_zero.3 stable/8/secure/lib/libcrypto/man/CONF_modules_free.3 stable/8/secure/lib/libcrypto/man/CONF_modules_load_file.3 stable/8/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 stable/8/secure/lib/libcrypto/man/DH_generate_key.3 stable/8/secure/lib/libcrypto/man/DH_generate_parameters.3 stable/8/secure/lib/libcrypto/man/DH_get_ex_new_index.3 stable/8/secure/lib/libcrypto/man/DH_new.3 stable/8/secure/lib/libcrypto/man/DH_set_method.3 stable/8/secure/lib/libcrypto/man/DH_size.3 stable/8/secure/lib/libcrypto/man/DSA_SIG_new.3 stable/8/secure/lib/libcrypto/man/DSA_do_sign.3 stable/8/secure/lib/libcrypto/man/DSA_dup_DH.3 stable/8/secure/lib/libcrypto/man/DSA_generate_key.3 stable/8/secure/lib/libcrypto/man/DSA_generate_parameters.3 stable/8/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 stable/8/secure/lib/libcrypto/man/DSA_new.3 stable/8/secure/lib/libcrypto/man/DSA_set_method.3 stable/8/secure/lib/libcrypto/man/DSA_sign.3 stable/8/secure/lib/libcrypto/man/DSA_size.3 stable/8/secure/lib/libcrypto/man/ERR_GET_LIB.3 stable/8/secure/lib/libcrypto/man/ERR_clear_error.3 stable/8/secure/lib/libcrypto/man/ERR_error_string.3 stable/8/secure/lib/libcrypto/man/ERR_get_error.3 stable/8/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 stable/8/secure/lib/libcrypto/man/ERR_load_strings.3 stable/8/secure/lib/libcrypto/man/ERR_print_errors.3 stable/8/secure/lib/libcrypto/man/ERR_put_error.3 stable/8/secure/lib/libcrypto/man/ERR_remove_state.3 stable/8/secure/lib/libcrypto/man/ERR_set_mark.3 stable/8/secure/lib/libcrypto/man/EVP_BytesToKey.3 stable/8/secure/lib/libcrypto/man/EVP_DigestInit.3 stable/8/secure/lib/libcrypto/man/EVP_EncryptInit.3 stable/8/secure/lib/libcrypto/man/EVP_OpenInit.3 stable/8/secure/lib/libcrypto/man/EVP_PKEY_new.3 stable/8/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 stable/8/secure/lib/libcrypto/man/EVP_SealInit.3 stable/8/secure/lib/libcrypto/man/EVP_SignInit.3 stable/8/secure/lib/libcrypto/man/EVP_VerifyInit.3 stable/8/secure/lib/libcrypto/man/OBJ_nid2obj.3 stable/8/secure/lib/libcrypto/man/OPENSSL_Applink.3 stable/8/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 stable/8/secure/lib/libcrypto/man/OPENSSL_config.3 stable/8/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 stable/8/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 stable/8/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 stable/8/secure/lib/libcrypto/man/PKCS12_create.3 stable/8/secure/lib/libcrypto/man/PKCS12_parse.3 stable/8/secure/lib/libcrypto/man/PKCS7_decrypt.3 stable/8/secure/lib/libcrypto/man/PKCS7_encrypt.3 stable/8/secure/lib/libcrypto/man/PKCS7_sign.3 stable/8/secure/lib/libcrypto/man/PKCS7_verify.3 stable/8/secure/lib/libcrypto/man/RAND_add.3 stable/8/secure/lib/libcrypto/man/RAND_bytes.3 stable/8/secure/lib/libcrypto/man/RAND_cleanup.3 stable/8/secure/lib/libcrypto/man/RAND_egd.3 stable/8/secure/lib/libcrypto/man/RAND_load_file.3 stable/8/secure/lib/libcrypto/man/RAND_set_rand_method.3 stable/8/secure/lib/libcrypto/man/RSA_blinding_on.3 stable/8/secure/lib/libcrypto/man/RSA_check_key.3 stable/8/secure/lib/libcrypto/man/RSA_generate_key.3 stable/8/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 stable/8/secure/lib/libcrypto/man/RSA_new.3 stable/8/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 stable/8/secure/lib/libcrypto/man/RSA_print.3 stable/8/secure/lib/libcrypto/man/RSA_private_encrypt.3 stable/8/secure/lib/libcrypto/man/RSA_public_encrypt.3 stable/8/secure/lib/libcrypto/man/RSA_set_method.3 stable/8/secure/lib/libcrypto/man/RSA_sign.3 stable/8/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 stable/8/secure/lib/libcrypto/man/RSA_size.3 stable/8/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 stable/8/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 stable/8/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 stable/8/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 stable/8/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 stable/8/secure/lib/libcrypto/man/X509_NAME_print_ex.3 stable/8/secure/lib/libcrypto/man/X509_new.3 stable/8/secure/lib/libcrypto/man/bio.3 stable/8/secure/lib/libcrypto/man/blowfish.3 stable/8/secure/lib/libcrypto/man/bn.3 stable/8/secure/lib/libcrypto/man/bn_internal.3 stable/8/secure/lib/libcrypto/man/buffer.3 stable/8/secure/lib/libcrypto/man/crypto.3 stable/8/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 stable/8/secure/lib/libcrypto/man/d2i_DHparams.3 stable/8/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 stable/8/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 stable/8/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 stable/8/secure/lib/libcrypto/man/d2i_X509.3 stable/8/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 stable/8/secure/lib/libcrypto/man/d2i_X509_CRL.3 stable/8/secure/lib/libcrypto/man/d2i_X509_NAME.3 stable/8/secure/lib/libcrypto/man/d2i_X509_REQ.3 stable/8/secure/lib/libcrypto/man/d2i_X509_SIG.3 stable/8/secure/lib/libcrypto/man/des.3 stable/8/secure/lib/libcrypto/man/dh.3 stable/8/secure/lib/libcrypto/man/dsa.3 stable/8/secure/lib/libcrypto/man/ecdsa.3 stable/8/secure/lib/libcrypto/man/engine.3 stable/8/secure/lib/libcrypto/man/err.3 stable/8/secure/lib/libcrypto/man/evp.3 stable/8/secure/lib/libcrypto/man/hmac.3 stable/8/secure/lib/libcrypto/man/lh_stats.3 stable/8/secure/lib/libcrypto/man/lhash.3 stable/8/secure/lib/libcrypto/man/md5.3 stable/8/secure/lib/libcrypto/man/mdc2.3 stable/8/secure/lib/libcrypto/man/pem.3 stable/8/secure/lib/libcrypto/man/rand.3 stable/8/secure/lib/libcrypto/man/rc4.3 stable/8/secure/lib/libcrypto/man/ripemd.3 stable/8/secure/lib/libcrypto/man/rsa.3 stable/8/secure/lib/libcrypto/man/sha.3 stable/8/secure/lib/libcrypto/man/threads.3 stable/8/secure/lib/libcrypto/man/ui.3 stable/8/secure/lib/libcrypto/man/ui_compat.3 stable/8/secure/lib/libcrypto/man/x509.3 stable/8/secure/lib/libssl/Makefile.man stable/8/secure/lib/libssl/man/SSL_CIPHER_get_name.3 stable/8/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 stable/8/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 stable/8/secure/lib/libssl/man/SSL_CTX_add_session.3 stable/8/secure/lib/libssl/man/SSL_CTX_ctrl.3 stable/8/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 stable/8/secure/lib/libssl/man/SSL_CTX_free.3 stable/8/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 stable/8/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 stable/8/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 stable/8/secure/lib/libssl/man/SSL_CTX_new.3 stable/8/secure/lib/libssl/man/SSL_CTX_sess_number.3 stable/8/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 stable/8/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 stable/8/secure/lib/libssl/man/SSL_CTX_sessions.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_mode.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_options.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_timeout.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_verify.3 stable/8/secure/lib/libssl/man/SSL_CTX_use_certificate.3 stable/8/secure/lib/libssl/man/SSL_SESSION_free.3 stable/8/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 stable/8/secure/lib/libssl/man/SSL_SESSION_get_time.3 stable/8/secure/lib/libssl/man/SSL_accept.3 stable/8/secure/lib/libssl/man/SSL_alert_type_string.3 stable/8/secure/lib/libssl/man/SSL_clear.3 stable/8/secure/lib/libssl/man/SSL_connect.3 stable/8/secure/lib/libssl/man/SSL_do_handshake.3 stable/8/secure/lib/libssl/man/SSL_free.3 stable/8/secure/lib/libssl/man/SSL_get_SSL_CTX.3 stable/8/secure/lib/libssl/man/SSL_get_ciphers.3 stable/8/secure/lib/libssl/man/SSL_get_client_CA_list.3 stable/8/secure/lib/libssl/man/SSL_get_current_cipher.3 stable/8/secure/lib/libssl/man/SSL_get_default_timeout.3 stable/8/secure/lib/libssl/man/SSL_get_error.3 stable/8/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 stable/8/secure/lib/libssl/man/SSL_get_ex_new_index.3 stable/8/secure/lib/libssl/man/SSL_get_fd.3 stable/8/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 stable/8/secure/lib/libssl/man/SSL_get_peer_certificate.3 stable/8/secure/lib/libssl/man/SSL_get_rbio.3 stable/8/secure/lib/libssl/man/SSL_get_session.3 stable/8/secure/lib/libssl/man/SSL_get_verify_result.3 stable/8/secure/lib/libssl/man/SSL_get_version.3 stable/8/secure/lib/libssl/man/SSL_library_init.3 stable/8/secure/lib/libssl/man/SSL_load_client_CA_file.3 stable/8/secure/lib/libssl/man/SSL_new.3 stable/8/secure/lib/libssl/man/SSL_pending.3 stable/8/secure/lib/libssl/man/SSL_read.3 stable/8/secure/lib/libssl/man/SSL_rstate_string.3 stable/8/secure/lib/libssl/man/SSL_session_reused.3 stable/8/secure/lib/libssl/man/SSL_set_bio.3 stable/8/secure/lib/libssl/man/SSL_set_connect_state.3 stable/8/secure/lib/libssl/man/SSL_set_fd.3 stable/8/secure/lib/libssl/man/SSL_set_session.3 stable/8/secure/lib/libssl/man/SSL_set_shutdown.3 stable/8/secure/lib/libssl/man/SSL_set_verify_result.3 stable/8/secure/lib/libssl/man/SSL_shutdown.3 stable/8/secure/lib/libssl/man/SSL_state_string.3 stable/8/secure/lib/libssl/man/SSL_want.3 stable/8/secure/lib/libssl/man/SSL_write.3 stable/8/secure/lib/libssl/man/d2i_SSL_SESSION.3 stable/8/secure/lib/libssl/man/ssl.3 stable/8/secure/usr.bin/openssl/man/CA.pl.1 stable/8/secure/usr.bin/openssl/man/asn1parse.1 stable/8/secure/usr.bin/openssl/man/ca.1 stable/8/secure/usr.bin/openssl/man/ciphers.1 stable/8/secure/usr.bin/openssl/man/crl.1 stable/8/secure/usr.bin/openssl/man/crl2pkcs7.1 stable/8/secure/usr.bin/openssl/man/dgst.1 stable/8/secure/usr.bin/openssl/man/dhparam.1 stable/8/secure/usr.bin/openssl/man/dsa.1 stable/8/secure/usr.bin/openssl/man/dsaparam.1 stable/8/secure/usr.bin/openssl/man/ec.1 stable/8/secure/usr.bin/openssl/man/ecparam.1 stable/8/secure/usr.bin/openssl/man/enc.1 stable/8/secure/usr.bin/openssl/man/errstr.1 stable/8/secure/usr.bin/openssl/man/gendsa.1 stable/8/secure/usr.bin/openssl/man/genrsa.1 stable/8/secure/usr.bin/openssl/man/nseq.1 stable/8/secure/usr.bin/openssl/man/ocsp.1 stable/8/secure/usr.bin/openssl/man/openssl.1 stable/8/secure/usr.bin/openssl/man/passwd.1 stable/8/secure/usr.bin/openssl/man/pkcs12.1 stable/8/secure/usr.bin/openssl/man/pkcs7.1 stable/8/secure/usr.bin/openssl/man/pkcs8.1 stable/8/secure/usr.bin/openssl/man/rand.1 stable/8/secure/usr.bin/openssl/man/req.1 stable/8/secure/usr.bin/openssl/man/rsa.1 stable/8/secure/usr.bin/openssl/man/rsautl.1 stable/8/secure/usr.bin/openssl/man/s_client.1 stable/8/secure/usr.bin/openssl/man/s_server.1 stable/8/secure/usr.bin/openssl/man/s_time.1 stable/8/secure/usr.bin/openssl/man/sess_id.1 stable/8/secure/usr.bin/openssl/man/smime.1 stable/8/secure/usr.bin/openssl/man/speed.1 stable/8/secure/usr.bin/openssl/man/spkac.1 stable/8/secure/usr.bin/openssl/man/verify.1 stable/8/secure/usr.bin/openssl/man/version.1 stable/8/secure/usr.bin/openssl/man/x509.1 stable/8/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: stable/8/crypto/openssl/ (props changed) Modified: stable/9/crypto/openssl/CHANGES ============================================================================== --- stable/9/crypto/openssl/CHANGES Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/CHANGES Thu Aug 7 21:06:34 2014 (r269687) @@ -2,6 +2,53 @@ OpenSSL CHANGES _______________ + Changes between 0.9.8za and 0.9.8zb [6 Aug 2014] + + *) OpenSSL DTLS clients enabling anonymous (EC)DH ciphersuites are subject + to a denial of service attack. A malicious server can crash the client + with a null pointer dereference (read) by specifying an anonymous (EC)DH + ciphersuite and sending carefully crafted handshake messages. + + Thanks to Felix Gr?bert (Google) for discovering and researching this + issue. + (CVE-2014-3510) + [Emilia K?sper] + + *) By sending carefully crafted DTLS packets an attacker could cause openssl + to leak memory. This can be exploited through a Denial of Service attack. + Thanks to Adam Langley for discovering and researching this issue. + (CVE-2014-3507) + [Adam Langley] + + *) An attacker can force openssl to consume large amounts of memory whilst + processing DTLS handshake messages. This can be exploited through a + Denial of Service attack. + Thanks to Adam Langley for discovering and researching this issue. + (CVE-2014-3506) + [Adam Langley] + + *) An attacker can force an error condition which causes openssl to crash + whilst processing DTLS packets due to memory being freed twice. This + can be exploited through a Denial of Service attack. + Thanks to Adam Langley and Wan-Teh Chang for discovering and researching + this issue. + (CVE-2014-3505) + [Adam Langley] + + *) A flaw in OBJ_obj2txt may cause pretty printing functions such as + X509_name_oneline, X509_name_print_ex et al. to leak some information + from the stack. Applications may be affected if they echo pretty printing + output to the attacker. + + Thanks to Ivan Fratric (Google) for discovering this issue. + (CVE-2014-3508) + [Emilia K?sper, and Steve Henson] + + *) Fix ec_GFp_simple_points_make_affine (thus, EC_POINTs_mul etc.) + for corner cases. (Certain input points at infinity could lead to + bogus results, with non-infinity inputs mapped to infinity too.) + [Bodo Moeller] + Changes between 0.9.8y and 0.9.8za [5 Jun 2014] *) Fix for SSL/TLS MITM flaw. An attacker using a carefully crafted Modified: stable/9/crypto/openssl/FAQ ============================================================================== --- stable/9/crypto/openssl/FAQ Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/FAQ Thu Aug 7 21:06:34 2014 (r269687) @@ -113,11 +113,6 @@ that came with the version of OpenSSL yo documentation is included in each OpenSSL distribution under the docs directory. -For information on parts of libcrypto that are not yet documented, you -might want to read Ariel Glenn's documentation on SSLeay 0.9, OpenSSL's -predecessor, at . Much -of this still applies to OpenSSL. - There is some documentation about certificate extensions and PKCS#12 in doc/openssl.txt Modified: stable/9/crypto/openssl/Makefile ============================================================================== --- stable/9/crypto/openssl/Makefile Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/Makefile Thu Aug 7 21:06:34 2014 (r269687) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=0.9.8za +VERSION=0.9.8zb MAJOR=0 MINOR=9.8 SHLIB_VERSION_NUMBER=0.9.8 Modified: stable/9/crypto/openssl/NEWS ============================================================================== --- stable/9/crypto/openssl/NEWS Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/NEWS Thu Aug 7 21:06:34 2014 (r269687) @@ -5,6 +5,22 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 0.9.8za and OpenSSL 0.9.8zb [6 Aug 2014]: + + o Fix for CVE-2014-3510 + o Fix for CVE-2014-3507 + o Fix for CVE-2014-3506 + o Fix for CVE-2014-3505 + o Fix for CVE-2014-3508 + + Known issues in OpenSSL 0.9.8za: + + o Compilation failure of s3_pkt.c on some platforms due to missing + include. Fixed in 0.9.8zb-dev. + o FIPS capable link failure with missing symbol BN_consttime_swap. + Fixed in 0.9.8zb-dev. Workaround is to compile with no-ec: the EC + algorithms are not FIPS approved in OpenSSL 0.9.8 anyway. + Major changes between OpenSSL 0.9.8y and OpenSSL 0.9.8za [5 Jun 2014]: o Fix for CVE-2014-0224 Modified: stable/9/crypto/openssl/README ============================================================================== --- stable/9/crypto/openssl/README Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/README Thu Aug 7 21:06:34 2014 (r269687) @@ -1,5 +1,5 @@ - OpenSSL 0.9.8za 5 Jun 2014 + OpenSSL 0.9.8zb 6 Aug 2014 Copyright (c) 1998-2011 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: stable/9/crypto/openssl/apps/apps.c ============================================================================== --- stable/9/crypto/openssl/apps/apps.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/apps/apps.c Thu Aug 7 21:06:34 2014 (r269687) @@ -362,6 +362,8 @@ int chopup_args(ARGS *arg, char *buf, in { arg->count=20; arg->data=(char **)OPENSSL_malloc(sizeof(char *)*arg->count); + if (arg->data == NULL) + return 0; } for (i=0; icount; i++) arg->data[i]=NULL; @@ -1429,6 +1431,8 @@ char *make_config_name() len=strlen(t)+strlen(OPENSSL_CONF)+2; p=OPENSSL_malloc(len); + if (p == NULL) + return NULL; BUF_strlcpy(p,t,len); #ifndef OPENSSL_SYS_VMS BUF_strlcat(p,"/",len); Modified: stable/9/crypto/openssl/apps/ca.c ============================================================================== --- stable/9/crypto/openssl/apps/ca.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/apps/ca.c Thu Aug 7 21:06:34 2014 (r269687) @@ -1582,12 +1582,14 @@ static int certify(X509 **xret, char *in { ok=0; BIO_printf(bio_err,"Signature verification problems....\n"); + ERR_print_errors(bio_err); goto err; } if (i == 0) { ok=0; BIO_printf(bio_err,"Signature did not match the certificate request\n"); + ERR_print_errors(bio_err); goto err; } else @@ -2751,6 +2753,9 @@ char *make_revocation_str(int rev_type, revtm = X509_gmtime_adj(NULL, 0); + if (!revtm) + return NULL; + i = revtm->length + 1; if (reason) i += strlen(reason) + 1; Modified: stable/9/crypto/openssl/apps/crl2p7.c ============================================================================== --- stable/9/crypto/openssl/apps/crl2p7.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/apps/crl2p7.c Thu Aug 7 21:06:34 2014 (r269687) @@ -142,7 +142,13 @@ int MAIN(int argc, char **argv) { if (--argc < 1) goto bad; if(!certflst) certflst = sk_new_null(); - sk_push(certflst,*(++argv)); + if (!certflst) + goto end; + if (!sk_push(certflst,*(++argv))) + { + sk_free(certflst); + goto end; + } } else { Modified: stable/9/crypto/openssl/apps/ocsp.c ============================================================================== --- stable/9/crypto/openssl/apps/ocsp.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/apps/ocsp.c Thu Aug 7 21:06:34 2014 (r269687) @@ -1344,7 +1344,7 @@ OCSP_RESPONSE *process_responder(BIO *er } resp = query_responder(err, cbio, path, req, req_timeout); if (!resp) - BIO_printf(bio_err, "Error querying OCSP responsder\n"); + BIO_printf(bio_err, "Error querying OCSP responder\n"); end: if (ctx) SSL_CTX_free(ctx); Modified: stable/9/crypto/openssl/apps/s_server.c ============================================================================== --- stable/9/crypto/openssl/apps/s_server.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/apps/s_server.c Thu Aug 7 21:06:34 2014 (r269687) @@ -583,7 +583,7 @@ static int MS_CALLBACK ssl_servername_cb if (servername) { - if (strcmp(servername,p->servername)) + if (strcasecmp(servername,p->servername)) return p->extension_error; if (ctx2) { @@ -1095,6 +1095,14 @@ bad: sv_usage(); goto end; } +#ifndef OPENSSL_NO_DTLS1 + if (www && socket_type == SOCK_DGRAM) + { + BIO_printf(bio_err, + "Can't use -HTTP, -www or -WWW with DTLS\n"); + goto end; + } +#endif SSL_load_error_strings(); OpenSSL_add_ssl_algorithms(); @@ -1922,8 +1930,10 @@ again: #ifdef CHARSET_EBCDIC ascii2ebcdic(buf,buf,i); #endif - write(fileno(stdout),buf, - (unsigned int)i); + if (write(fileno(stdout),buf, + (unsigned int)i) != i) + goto err; + if (SSL_pending(con)) goto again; break; case SSL_ERROR_WANT_WRITE: Modified: stable/9/crypto/openssl/apps/speed.c ============================================================================== --- stable/9/crypto/openssl/apps/speed.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/apps/speed.c Thu Aug 7 21:06:34 2014 (r269687) @@ -2767,7 +2767,11 @@ static int do_multi(int multi) fds=malloc(multi*sizeof *fds); for(n=0 ; n < multi ; ++n) { - pipe(fd); + if (pipe(fd) == -1) + { + fprintf(stderr, "pipe failure\n"); + exit(1); + } fflush(stdout); fflush(stderr); if(fork()) @@ -2779,7 +2783,11 @@ static int do_multi(int multi) { close(fd[0]); close(1); - dup(fd[1]); + if (dup(fd[1]) == -1) + { + fprintf(stderr, "dup failed\n"); + exit(1); + } close(fd[1]); mr=1; usertime=0; Modified: stable/9/crypto/openssl/crypto/asn1/a_object.c ============================================================================== --- stable/9/crypto/openssl/crypto/asn1/a_object.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/asn1/a_object.c Thu Aug 7 21:06:34 2014 (r269687) @@ -285,16 +285,28 @@ err: ASN1_OBJECT_free(ret); return(NULL); } + ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp, long len) { ASN1_OBJECT *ret=NULL; const unsigned char *p; - int i; - /* Sanity check OID encoding: can't have leading 0x80 in - * subidentifiers, see: X.690 8.19.2 + int i, length; + + /* Sanity check OID encoding. + * Need at least one content octet. + * MSB must be clear in the last octet. + * can't have leading 0x80 in subidentifiers, see: X.690 8.19.2 */ - for (i = 0, p = *pp; i < len; i++, p++) + if (len <= 0 || len > INT_MAX || pp == NULL || (p = *pp) == NULL || + p[len - 1] & 0x80) + { + ASN1err(ASN1_F_C2I_ASN1_OBJECT,ASN1_R_INVALID_OBJECT_ENCODING); + return NULL; + } + /* Now 0 < len <= INT_MAX, so the cast is safe. */ + length = (int)len; + for (i = 0; i < length; i++, p++) { if (*p == 0x80 && (!i || !(p[-1] & 0x80))) { @@ -313,20 +325,20 @@ ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT else ret=(*a); p= *pp; - if ((ret->data == NULL) || (ret->length < len)) + if ((ret->data == NULL) || (ret->length < length)) { if (ret->data != NULL) OPENSSL_free(ret->data); - ret->data=(unsigned char *)OPENSSL_malloc(len ? (int)len : 1); + ret->data=(unsigned char *)OPENSSL_malloc(length); ret->flags|=ASN1_OBJECT_FLAG_DYNAMIC_DATA; if (ret->data == NULL) { i=ERR_R_MALLOC_FAILURE; goto err; } } - memcpy(ret->data,p,(int)len); - ret->length=(int)len; + memcpy(ret->data,p,length); + ret->length=length; ret->sn=NULL; ret->ln=NULL; /* ret->flags=ASN1_OBJECT_FLAG_DYNAMIC; we know it is dynamic */ - p+=len; + p+=length; if (a != NULL) (*a)=ret; *pp=p; Modified: stable/9/crypto/openssl/crypto/asn1/asn1_lib.c ============================================================================== --- stable/9/crypto/openssl/crypto/asn1/asn1_lib.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/asn1/asn1_lib.c Thu Aug 7 21:06:34 2014 (r269687) @@ -131,6 +131,9 @@ int ASN1_get_object(const unsigned char *pclass=xclass; if (!asn1_get_length(&p,&inf,plength,(int)max)) goto err; + if (inf && !(ret & V_ASN1_CONSTRUCTED)) + goto err; + #if 0 fprintf(stderr,"p=%d + *plength=%ld > omax=%ld + *pp=%d (%d > %d)\n", (int)p,*plength,omax,(int)*pp,(int)(p+ *plength), Modified: stable/9/crypto/openssl/crypto/asn1/asn_mime.c ============================================================================== --- stable/9/crypto/openssl/crypto/asn1/asn_mime.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/asn1/asn_mime.c Thu Aug 7 21:06:34 2014 (r269687) @@ -595,6 +595,8 @@ static STACK_OF(MIME_HEADER) *mime_parse int len, state, save_state = 0; headers = sk_MIME_HEADER_new(mime_hdr_cmp); + if (!headers) + return NULL; while ((len = BIO_gets(bio, linebuf, MAX_SMLEN)) > 0) { /* If whitespace at line start then continuation line */ if(mhdr && isspace((unsigned char)linebuf[0])) state = MIME_NAME; Modified: stable/9/crypto/openssl/crypto/asn1/asn_pack.c ============================================================================== --- stable/9/crypto/openssl/crypto/asn1/asn_pack.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/asn1/asn_pack.c Thu Aug 7 21:06:34 2014 (r269687) @@ -134,15 +134,23 @@ ASN1_STRING *ASN1_pack_string(void *obj, if (!(octmp->length = i2d(obj, NULL))) { ASN1err(ASN1_F_ASN1_PACK_STRING,ASN1_R_ENCODE_ERROR); - return NULL; + goto err; } if (!(p = OPENSSL_malloc (octmp->length))) { ASN1err(ASN1_F_ASN1_PACK_STRING,ERR_R_MALLOC_FAILURE); - return NULL; + goto err; } octmp->data = p; i2d (obj, &p); return octmp; + err: + if (!oct || !*oct) + { + ASN1_STRING_free(octmp); + if (oct) + *oct = NULL; + } + return NULL; } #endif Modified: stable/9/crypto/openssl/crypto/asn1/evp_asn1.c ============================================================================== --- stable/9/crypto/openssl/crypto/asn1/evp_asn1.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/asn1/evp_asn1.c Thu Aug 7 21:06:34 2014 (r269687) @@ -66,7 +66,11 @@ int ASN1_TYPE_set_octetstring(ASN1_TYPE ASN1_STRING *os; if ((os=M_ASN1_OCTET_STRING_new()) == NULL) return(0); - if (!M_ASN1_OCTET_STRING_set(os,data,len)) return(0); + if (!M_ASN1_OCTET_STRING_set(os,data,len)) + { + M_ASN1_OCTET_STRING_free(os); + return 0; + } ASN1_TYPE_set(a,V_ASN1_OCTET_STRING,os); return(1); } Modified: stable/9/crypto/openssl/crypto/asn1/t_x509.c ============================================================================== --- stable/9/crypto/openssl/crypto/asn1/t_x509.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/asn1/t_x509.c Thu Aug 7 21:06:34 2014 (r269687) @@ -465,6 +465,8 @@ int X509_NAME_print(BIO *bp, X509_NAME * l=80-2-obase; b=X509_NAME_oneline(name,NULL,0); + if (!b) + return 0; if (!*b) { OPENSSL_free(b); Modified: stable/9/crypto/openssl/crypto/asn1/tasn_enc.c ============================================================================== --- stable/9/crypto/openssl/crypto/asn1/tasn_enc.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/asn1/tasn_enc.c Thu Aug 7 21:06:34 2014 (r269687) @@ -453,9 +453,14 @@ static int asn1_set_seq_out(STACK_OF(ASN { derlst = OPENSSL_malloc(sk_ASN1_VALUE_num(sk) * sizeof(*derlst)); + if (!derlst) + return 0; tmpdat = OPENSSL_malloc(skcontlen); - if (!derlst || !tmpdat) + if (!tmpdat) + { + OPENSSL_free(derlst); return 0; + } } } /* If not sorting just output each item */ Modified: stable/9/crypto/openssl/crypto/bio/bio_lib.c ============================================================================== --- stable/9/crypto/openssl/crypto/bio/bio_lib.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/bio/bio_lib.c Thu Aug 7 21:06:34 2014 (r269687) @@ -132,8 +132,8 @@ int BIO_free(BIO *a) CRYPTO_free_ex_data(CRYPTO_EX_INDEX_BIO, a, &a->ex_data); - if ((a->method == NULL) || (a->method->destroy == NULL)) return(1); - a->method->destroy(a); + if ((a->method != NULL) && (a->method->destroy != NULL)) + a->method->destroy(a); OPENSSL_free(a); return(1); } Modified: stable/9/crypto/openssl/crypto/bn/bn_gf2m.c ============================================================================== --- stable/9/crypto/openssl/crypto/bn/bn_gf2m.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/bn/bn_gf2m.c Thu Aug 7 21:06:34 2014 (r269687) @@ -1095,3 +1095,54 @@ int BN_GF2m_arr2poly(const unsigned int return 1; } +/* + * Constant-time conditional swap of a and b. + * a and b are swapped if condition is not 0. The code assumes that at most one bit of condition is set. + * nwords is the number of words to swap. The code assumes that at least nwords are allocated in both a and b, + * and that no more than nwords are used by either a or b. + * a and b cannot be the same number + */ +void BN_consttime_swap(BN_ULONG condition, BIGNUM *a, BIGNUM *b, int nwords) + { + BN_ULONG t; + int i; + + bn_wcheck_size(a, nwords); + bn_wcheck_size(b, nwords); + + assert(a != b); + assert((condition & (condition - 1)) == 0); + assert(sizeof(BN_ULONG) >= sizeof(int)); + + condition = ((condition - 1) >> (BN_BITS2 - 1)) - 1; + + t = (a->top^b->top) & condition; + a->top ^= t; + b->top ^= t; + +#define BN_CONSTTIME_SWAP(ind) \ + do { \ + t = (a->d[ind] ^ b->d[ind]) & condition; \ + a->d[ind] ^= t; \ + b->d[ind] ^= t; \ + } while (0) + + + switch (nwords) { + default: + for (i = 10; i < nwords; i++) + BN_CONSTTIME_SWAP(i); + /* Fallthrough */ + case 10: BN_CONSTTIME_SWAP(9); /* Fallthrough */ + case 9: BN_CONSTTIME_SWAP(8); /* Fallthrough */ + case 8: BN_CONSTTIME_SWAP(7); /* Fallthrough */ + case 7: BN_CONSTTIME_SWAP(6); /* Fallthrough */ + case 6: BN_CONSTTIME_SWAP(5); /* Fallthrough */ + case 5: BN_CONSTTIME_SWAP(4); /* Fallthrough */ + case 4: BN_CONSTTIME_SWAP(3); /* Fallthrough */ + case 3: BN_CONSTTIME_SWAP(2); /* Fallthrough */ + case 2: BN_CONSTTIME_SWAP(1); /* Fallthrough */ + case 1: BN_CONSTTIME_SWAP(0); + } +#undef BN_CONSTTIME_SWAP +} Modified: stable/9/crypto/openssl/crypto/bn/bn_lib.c ============================================================================== --- stable/9/crypto/openssl/crypto/bn/bn_lib.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/bn/bn_lib.c Thu Aug 7 21:06:34 2014 (r269687) @@ -320,6 +320,15 @@ static BN_ULONG *bn_expand_internal(cons BNerr(BN_F_BN_EXPAND_INTERNAL,ERR_R_MALLOC_FAILURE); return(NULL); } +#ifdef PURIFY + /* Valgrind complains in BN_consttime_swap because we process the whole + * array even if it's not initialised yet. This doesn't matter in that + * function - what's important is constant time operation (we're not + * actually going to use the data) + */ + memset(a, 0, sizeof(BN_ULONG)*words); +#endif + #if 1 B=b->d; /* Check if the previous number needs to be copied */ @@ -824,55 +833,3 @@ int bn_cmp_part_words(const BN_ULONG *a, } return bn_cmp_words(a,b,cl); } - -/* - * Constant-time conditional swap of a and b. - * a and b are swapped if condition is not 0. The code assumes that at most one bit of condition is set. - * nwords is the number of words to swap. The code assumes that at least nwords are allocated in both a and b, - * and that no more than nwords are used by either a or b. - * a and b cannot be the same number - */ -void BN_consttime_swap(BN_ULONG condition, BIGNUM *a, BIGNUM *b, int nwords) - { - BN_ULONG t; - int i; - - bn_wcheck_size(a, nwords); - bn_wcheck_size(b, nwords); - - assert(a != b); - assert((condition & (condition - 1)) == 0); - assert(sizeof(BN_ULONG) >= sizeof(int)); - - condition = ((condition - 1) >> (BN_BITS2 - 1)) - 1; - - t = (a->top^b->top) & condition; - a->top ^= t; - b->top ^= t; - -#define BN_CONSTTIME_SWAP(ind) \ - do { \ - t = (a->d[ind] ^ b->d[ind]) & condition; \ - a->d[ind] ^= t; \ - b->d[ind] ^= t; \ - } while (0) - - - switch (nwords) { - default: - for (i = 10; i < nwords; i++) - BN_CONSTTIME_SWAP(i); - /* Fallthrough */ - case 10: BN_CONSTTIME_SWAP(9); /* Fallthrough */ - case 9: BN_CONSTTIME_SWAP(8); /* Fallthrough */ - case 8: BN_CONSTTIME_SWAP(7); /* Fallthrough */ - case 7: BN_CONSTTIME_SWAP(6); /* Fallthrough */ - case 6: BN_CONSTTIME_SWAP(5); /* Fallthrough */ - case 5: BN_CONSTTIME_SWAP(4); /* Fallthrough */ - case 4: BN_CONSTTIME_SWAP(3); /* Fallthrough */ - case 3: BN_CONSTTIME_SWAP(2); /* Fallthrough */ - case 2: BN_CONSTTIME_SWAP(1); /* Fallthrough */ - case 1: BN_CONSTTIME_SWAP(0); - } -#undef BN_CONSTTIME_SWAP -} Modified: stable/9/crypto/openssl/crypto/bn/bn_sqr.c ============================================================================== --- stable/9/crypto/openssl/crypto/bn/bn_sqr.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/bn/bn_sqr.c Thu Aug 7 21:06:34 2014 (r269687) @@ -77,6 +77,7 @@ int BN_sqr(BIGNUM *r, const BIGNUM *a, B if (al <= 0) { r->top=0; + r->neg = 0; return 1; } Modified: stable/9/crypto/openssl/crypto/conf/conf_api.c ============================================================================== --- stable/9/crypto/openssl/crypto/conf/conf_api.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/conf/conf_api.c Thu Aug 7 21:06:34 2014 (r269687) @@ -294,7 +294,7 @@ CONF_VALUE *_CONF_new_section(CONF *conf v->value=(char *)sk; vv=(CONF_VALUE *)lh_insert(conf->data,v); - assert(vv == NULL); + OPENSSL_assert(vv == NULL); ok=1; err: if (!ok) Modified: stable/9/crypto/openssl/crypto/conf/conf_def.c ============================================================================== --- stable/9/crypto/openssl/crypto/conf/conf_def.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/conf/conf_def.c Thu Aug 7 21:06:34 2014 (r269687) @@ -324,7 +324,7 @@ again: p=eat_ws(conf, end); if (*p != ']') { - if (*p != '\0') + if (*p != '\0' && ss != p) { ss=p; goto again; Modified: stable/9/crypto/openssl/crypto/ec/ec_lib.c ============================================================================== --- stable/9/crypto/openssl/crypto/ec/ec_lib.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/ec/ec_lib.c Thu Aug 7 21:06:34 2014 (r269687) @@ -1010,7 +1010,7 @@ int EC_POINT_dbl(const EC_GROUP *group, int EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx) { - if (group->meth->dbl == 0) + if (group->meth->invert == 0) { ECerr(EC_F_EC_POINT_INVERT, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); return 0; Modified: stable/9/crypto/openssl/crypto/ec/ecp_smpl.c ============================================================================== --- stable/9/crypto/openssl/crypto/ec/ecp_smpl.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/ec/ecp_smpl.c Thu Aug 7 21:06:34 2014 (r269687) @@ -1540,9 +1540,8 @@ int ec_GFp_simple_make_affine(const EC_G int ec_GFp_simple_points_make_affine(const EC_GROUP *group, size_t num, EC_POINT *points[], BN_CTX *ctx) { BN_CTX *new_ctx = NULL; - BIGNUM *tmp0, *tmp1; - size_t pow2 = 0; - BIGNUM **heap = NULL; + BIGNUM *tmp, *tmp_Z; + BIGNUM **prod_Z = NULL; size_t i; int ret = 0; @@ -1557,124 +1556,104 @@ int ec_GFp_simple_points_make_affine(con } BN_CTX_start(ctx); - tmp0 = BN_CTX_get(ctx); - tmp1 = BN_CTX_get(ctx); - if (tmp0 == NULL || tmp1 == NULL) goto err; - - /* Before converting the individual points, compute inverses of all Z values. - * Modular inversion is rather slow, but luckily we can do with a single - * explicit inversion, plus about 3 multiplications per input value. - */ - - pow2 = 1; - while (num > pow2) - pow2 <<= 1; - /* Now pow2 is the smallest power of 2 satifsying pow2 >= num. - * We need twice that. */ - pow2 <<= 1; - - heap = OPENSSL_malloc(pow2 * sizeof heap[0]); - if (heap == NULL) goto err; - - /* The array is used as a binary tree, exactly as in heapsort: - * - * heap[1] - * heap[2] heap[3] - * heap[4] heap[5] heap[6] heap[7] - * heap[8]heap[9] heap[10]heap[11] heap[12]heap[13] heap[14] heap[15] - * - * We put the Z's in the last line; - * then we set each other node to the product of its two child-nodes (where - * empty or 0 entries are treated as ones); - * then we invert heap[1]; - * then we invert each other node by replacing it by the product of its - * parent (after inversion) and its sibling (before inversion). - */ - heap[0] = NULL; - for (i = pow2/2 - 1; i > 0; i--) - heap[i] = NULL; + tmp = BN_CTX_get(ctx); + tmp_Z = BN_CTX_get(ctx); + if (tmp == NULL || tmp_Z == NULL) goto err; + + prod_Z = OPENSSL_malloc(num * sizeof prod_Z[0]); + if (prod_Z == NULL) goto err; for (i = 0; i < num; i++) - heap[pow2/2 + i] = &points[i]->Z; - for (i = pow2/2 + num; i < pow2; i++) - heap[i] = NULL; - - /* set each node to the product of its children */ - for (i = pow2/2 - 1; i > 0; i--) - { - heap[i] = BN_new(); - if (heap[i] == NULL) goto err; - - if (heap[2*i] != NULL) + { + prod_Z[i] = BN_new(); + if (prod_Z[i] == NULL) goto err; + } + + /* Set each prod_Z[i] to the product of points[0]->Z .. points[i]->Z, + * skipping any zero-valued inputs (pretend that they're 1). */ + + if (!BN_is_zero(&points[0]->Z)) + { + if (!BN_copy(prod_Z[0], &points[0]->Z)) goto err; + } + else + { + if (group->meth->field_set_to_one != 0) { - if ((heap[2*i + 1] == NULL) || BN_is_zero(heap[2*i + 1])) - { - if (!BN_copy(heap[i], heap[2*i])) goto err; - } - else - { - if (BN_is_zero(heap[2*i])) - { - if (!BN_copy(heap[i], heap[2*i + 1])) goto err; - } - else - { - if (!group->meth->field_mul(group, heap[i], - heap[2*i], heap[2*i + 1], ctx)) goto err; - } - } + if (!group->meth->field_set_to_one(group, prod_Z[0], ctx)) goto err; + } + else + { + if (!BN_one(prod_Z[0])) goto err; } } - /* invert heap[1] */ - if (!BN_is_zero(heap[1])) + for (i = 1; i < num; i++) { - if (!BN_mod_inverse(heap[1], heap[1], &group->field, ctx)) + if (!BN_is_zero(&points[i]->Z)) { - ECerr(EC_F_EC_GFP_SIMPLE_POINTS_MAKE_AFFINE, ERR_R_BN_LIB); - goto err; + if (!group->meth->field_mul(group, prod_Z[i], prod_Z[i - 1], &points[i]->Z, ctx)) goto err; } + else + { + if (!BN_copy(prod_Z[i], prod_Z[i - 1])) goto err; + } + } + + /* Now use a single explicit inversion to replace every + * non-zero points[i]->Z by its inverse. */ + + if (!BN_mod_inverse(tmp, prod_Z[num - 1], &group->field, ctx)) + { + ECerr(EC_F_EC_GFP_SIMPLE_POINTS_MAKE_AFFINE, ERR_R_BN_LIB); + goto err; } if (group->meth->field_encode != 0) { - /* in the Montgomery case, we just turned R*H (representing H) + /* In the Montgomery case, we just turned R*H (representing H) * into 1/(R*H), but we need R*(1/H) (representing 1/H); - * i.e. we have need to multiply by the Montgomery factor twice */ - if (!group->meth->field_encode(group, heap[1], heap[1], ctx)) goto err; - if (!group->meth->field_encode(group, heap[1], heap[1], ctx)) goto err; + * i.e. we need to multiply by the Montgomery factor twice. */ + if (!group->meth->field_encode(group, tmp, tmp, ctx)) goto err; + if (!group->meth->field_encode(group, tmp, tmp, ctx)) goto err; } - /* set other heap[i]'s to their inverses */ - for (i = 2; i < pow2/2 + num; i += 2) + for (i = num - 1; i > 0; --i) { - /* i is even */ - if ((heap[i + 1] != NULL) && !BN_is_zero(heap[i + 1])) - { - if (!group->meth->field_mul(group, tmp0, heap[i/2], heap[i + 1], ctx)) goto err; - if (!group->meth->field_mul(group, tmp1, heap[i/2], heap[i], ctx)) goto err; - if (!BN_copy(heap[i], tmp0)) goto err; - if (!BN_copy(heap[i + 1], tmp1)) goto err; - } - else + /* Loop invariant: tmp is the product of the inverses of + * points[0]->Z .. points[i]->Z (zero-valued inputs skipped). */ + if (!BN_is_zero(&points[i]->Z)) { - if (!BN_copy(heap[i], heap[i/2])) goto err; + /* Set tmp_Z to the inverse of points[i]->Z (as product + * of Z inverses 0 .. i, Z values 0 .. i - 1). */ + if (!group->meth->field_mul(group, tmp_Z, prod_Z[i - 1], tmp, ctx)) goto err; + /* Update tmp to satisfy the loop invariant for i - 1. */ + if (!group->meth->field_mul(group, tmp, tmp, &points[i]->Z, ctx)) goto err; + /* Replace points[i]->Z by its inverse. */ + if (!BN_copy(&points[i]->Z, tmp_Z)) goto err; } } - /* we have replaced all non-zero Z's by their inverses, now fix up all the points */ + if (!BN_is_zero(&points[0]->Z)) + { + /* Replace points[0]->Z by its inverse. */ + if (!BN_copy(&points[0]->Z, tmp)) goto err; + } + + /* Finally, fix up the X and Y coordinates for all points. */ + for (i = 0; i < num; i++) { EC_POINT *p = points[i]; - + if (!BN_is_zero(&p->Z)) { /* turn (X, Y, 1/Z) into (X/Z^2, Y/Z^3, 1) */ - if (!group->meth->field_sqr(group, tmp1, &p->Z, ctx)) goto err; - if (!group->meth->field_mul(group, &p->X, &p->X, tmp1, ctx)) goto err; + if (!group->meth->field_sqr(group, tmp, &p->Z, ctx)) goto err; + if (!group->meth->field_mul(group, &p->X, &p->X, tmp, ctx)) goto err; + + if (!group->meth->field_mul(group, tmp, tmp, &p->Z, ctx)) goto err; + if (!group->meth->field_mul(group, &p->Y, &p->Y, tmp, ctx)) goto err; - if (!group->meth->field_mul(group, tmp1, tmp1, &p->Z, ctx)) goto err; - if (!group->meth->field_mul(group, &p->Y, &p->Y, tmp1, ctx)) goto err; - if (group->meth->field_set_to_one != 0) { if (!group->meth->field_set_to_one(group, &p->Z, ctx)) goto err; @@ -1688,20 +1667,19 @@ int ec_GFp_simple_points_make_affine(con } ret = 1; - + err: BN_CTX_end(ctx); if (new_ctx != NULL) BN_CTX_free(new_ctx); - if (heap != NULL) + if (prod_Z != NULL) { - /* heap[pow2/2] .. heap[pow2-1] have not been allocated locally! */ - for (i = pow2/2 - 1; i > 0; i--) + for (i = 0; i < num; i++) { - if (heap[i] != NULL) - BN_clear_free(heap[i]); + if (prod_Z[i] != NULL) + BN_clear_free(prod_Z[i]); } - OPENSSL_free(heap); + OPENSSL_free(prod_Z); } return ret; } Modified: stable/9/crypto/openssl/crypto/idea/ideatest.c ============================================================================== --- stable/9/crypto/openssl/crypto/idea/ideatest.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/idea/ideatest.c Thu Aug 7 21:06:34 2014 (r269687) @@ -199,10 +199,10 @@ static int cfb64_test(unsigned char *cfb } memcpy(cfb_tmp,cfb_iv,8); n=0; - idea_cfb64_encrypt(cfb_buf1,cfb_buf2,(long)17,&eks, + idea_cfb64_encrypt(cfb_buf1,cfb_buf2,(long)13,&eks, cfb_tmp,&n,IDEA_DECRYPT); - idea_cfb64_encrypt(&(cfb_buf1[17]),&(cfb_buf2[17]), - (long)CFB_TEST_SIZE-17,&dks, + idea_cfb64_encrypt(&(cfb_buf1[13]),&(cfb_buf2[13]), + (long)CFB_TEST_SIZE-13,&eks, cfb_tmp,&n,IDEA_DECRYPT); if (memcmp(plain,cfb_buf2,CFB_TEST_SIZE) != 0) { Modified: stable/9/crypto/openssl/crypto/objects/obj_dat.c ============================================================================== --- stable/9/crypto/openssl/crypto/objects/obj_dat.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/objects/obj_dat.c Thu Aug 7 21:06:34 2014 (r269687) @@ -444,11 +444,12 @@ int OBJ_obj2txt(char *buf, int buf_len, unsigned char *p; char tbuf[DECIMAL_SIZE(i)+DECIMAL_SIZE(l)+2]; - if ((a == NULL) || (a->data == NULL)) { - buf[0]='\0'; - return(0); - } + /* Ensure that, at every state, |buf| is NUL-terminated. */ + if (buf && buf_len > 0) + buf[0] = '\0'; + if ((a == NULL) || (a->data == NULL)) + return(0); if (!no_name && (nid=OBJ_obj2nid(a)) != NID_undef) { @@ -527,9 +528,10 @@ int OBJ_obj2txt(char *buf, int buf_len, i=(int)(l/40); l-=(long)(i*40); } - if (buf && (buf_len > 0)) + if (buf && (buf_len > 1)) { *buf++ = i + '0'; + *buf = '\0'; buf_len--; } n++; @@ -544,9 +546,10 @@ int OBJ_obj2txt(char *buf, int buf_len, i = strlen(bndec); if (buf) { - if (buf_len > 0) + if (buf_len > 1) { *buf++ = '.'; + *buf = '\0'; buf_len--; } BUF_strlcpy(buf,bndec,buf_len); @@ -786,4 +789,3 @@ err: OPENSSL_free(buf); return(ok); } - Modified: stable/9/crypto/openssl/crypto/ocsp/ocsp_ht.c ============================================================================== --- stable/9/crypto/openssl/crypto/ocsp/ocsp_ht.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/ocsp/ocsp_ht.c Thu Aug 7 21:06:34 2014 (r269687) @@ -464,6 +464,9 @@ OCSP_RESPONSE *OCSP_sendreq_bio(BIO *b, ctx = OCSP_sendreq_new(b, path, req, -1); + if (!ctx) + return NULL; + do { rv = OCSP_sendreq_nbio(&resp, ctx); Modified: stable/9/crypto/openssl/crypto/ocsp/ocsp_lib.c ============================================================================== --- stable/9/crypto/openssl/crypto/ocsp/ocsp_lib.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/ocsp/ocsp_lib.c Thu Aug 7 21:06:34 2014 (r269687) @@ -220,8 +220,19 @@ int OCSP_parse_url(char *url, char **pho if (!*ppath) goto mem_err; + p = host; + if(host[0] == '[') + { + /* ipv6 literal */ + host++; + p = strchr(host, ']'); + if(!p) goto parse_err; + *p = '\0'; + p++; + } + /* Look for optional ':' for port number */ - if ((p = strchr(host, ':'))) + if ((p = strchr(p, ':'))) { *p = 0; port = p + 1; Modified: stable/9/crypto/openssl/crypto/opensslv.h ============================================================================== --- stable/9/crypto/openssl/crypto/opensslv.h Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/opensslv.h Thu Aug 7 21:06:34 2014 (r269687) @@ -25,11 +25,11 @@ * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for * major minor fix final patch/beta) */ -#define OPENSSL_VERSION_NUMBER 0x009081afL +#define OPENSSL_VERSION_NUMBER 0x009081bfL #ifdef OPENSSL_FIPS -#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8za-fips 5 Jun 2014" +#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8zb-fips 6 Aug 2014" #else -#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8za-freebsd 5 Jun 2014" +#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8zb-freebsd 6 Aug 2014" #endif #define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT Modified: stable/9/crypto/openssl/crypto/pkcs7/Makefile ============================================================================== --- stable/9/crypto/openssl/crypto/pkcs7/Makefile Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/pkcs7/Makefile Thu Aug 7 21:06:34 2014 (r269687) @@ -39,20 +39,6 @@ test: all: lib -testapps: enc dec sign verify - -enc: enc.o lib - $(CC) $(CFLAGS) -o enc enc.o $(PEX_LIBS) $(LIB) $(EX_LIBS) - -dec: dec.o lib - $(CC) $(CFLAGS) -o dec dec.o $(PEX_LIBS) $(LIB) $(EX_LIBS) - -sign: sign.o lib - $(CC) $(CFLAGS) -o sign sign.o $(PEX_LIBS) $(LIB) $(EX_LIBS) - -verify: verify.o example.o lib - $(CC) $(CFLAGS) -o verify verify.o $(PEX_LIBS) example.o $(LIB) $(EX_LIBS) - lib: $(LIBOBJ) $(ARX) $(LIB) $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. Modified: stable/9/crypto/openssl/crypto/rsa/rsa_eay.c ============================================================================== --- stable/9/crypto/openssl/crypto/rsa/rsa_eay.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/rsa/rsa_eay.c Thu Aug 7 21:06:34 2014 (r269687) @@ -457,7 +457,7 @@ static int RSA_eay_private_encrypt(int f if (padding == RSA_X931_PADDING) { BN_sub(f, rsa->n, ret); - if (BN_cmp(ret, f)) + if (BN_cmp(ret, f) > 0) res = f; else res = ret; Modified: stable/9/crypto/openssl/crypto/ui/ui_lib.c ============================================================================== --- stable/9/crypto/openssl/crypto/ui/ui_lib.c Thu Aug 7 21:04:42 2014 (r269686) +++ stable/9/crypto/openssl/crypto/ui/ui_lib.c Thu Aug 7 21:06:34 2014 (r269687) @@ -897,9 +897,9 @@ int UI_set_result(UI *ui, UI_STRING *uis break; } } + } default: break; } - } return 0; } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From cy at FreeBSD.org Fri Aug 8 00:58:25 2014 From: cy at FreeBSD.org (Cy Schubert) Date: Fri, 8 Aug 2014 00:58:24 +0000 (UTC) Subject: svn commit: r269696 - in stable/10: sbin/ipf sys/contrib/ipfilter/netinet Message-ID: <53e420b0.2253.651f7641@svn.freebsd.org> Author: cy Date: Fri Aug 8 00:58:24 2014 New Revision: 269696 URL: http://svnweb.freebsd.org/changeset/base/269696 Log: MFC r269585 - Honour WITH and WITHOUT_INET6_SUPPORT. Approved by: glebius (mentor - implicit) Modified: stable/10/sbin/ipf/Makefile.inc stable/10/sys/contrib/ipfilter/netinet/ip_compat.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ipf/Makefile.inc ============================================================================== --- stable/10/sbin/ipf/Makefile.inc Thu Aug 7 22:14:37 2014 (r269695) +++ stable/10/sbin/ipf/Makefile.inc Fri Aug 8 00:58:24 2014 (r269696) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + WARNS?= 2 NO_WFORMAT= NO_WARRAY_BOUNDS= @@ -10,6 +12,12 @@ CFLAGS+= -I${.CURDIR}/../../../sys CFLAGS+= -I${.CURDIR}/../../../sys/contrib/ipfilter CFLAGS+= -DSTATETOP -D__UIO_EXPOSE +.if ${MK_INET6_SUPPORT} != "no" +CFLAGS+= -DUSE_INET6 +.else +CFLAGS+= -DNOINET6 +.endif + LIBIPF= ${.OBJDIR}/../libipf/libipf.a DPADD+= ${LIBIPF} ${LIBKVM} LDADD+= ${LIBIPF} -lkvm Modified: stable/10/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- stable/10/sys/contrib/ipfilter/netinet/ip_compat.h Thu Aug 7 22:14:37 2014 (r269695) +++ stable/10/sys/contrib/ipfilter/netinet/ip_compat.h Fri Aug 8 00:58:24 2014 (r269696) @@ -118,6 +118,10 @@ struct ether_addr { # if defined(INET6) && !defined(USE_INET6) # define USE_INET6 # endif +# else +# if !defined(USE_INET6) && !defined(NOINET6) +# define USE_INET6 +# endif # endif # if defined(_KERNEL) From joerg at FreeBSD.org Fri Aug 8 14:42:04 2014 From: joerg at FreeBSD.org (Joerg Wunsch) Date: Fri, 8 Aug 2014 14:42:04 +0000 (UTC) Subject: svn commit: r269717 - stable/10/sys/cam/scsi Message-ID: <53e4e1bc.2fba.18c72b23@svn.freebsd.org> Author: joerg Date: Fri Aug 8 14:42:03 2014 New Revision: 269717 URL: http://svnweb.freebsd.org/changeset/base/269717 Log: Merge r269353: Fix breakage introduced by r256843: removing the SA_CCB_WAITING bit left some of the decisions based on its counterpart, SA_CCB_BUFFER_IO being random. As a result, propagation of the residual information for the SPACE command was broken, so the number of filemarks encountered during a SPACE operation was miscalculated. Consequently, systems relying on properly tracked filemark counters (like Bacula) fell apart. The change also removes a switch/case in sadone() which r256843 degraded to a single remaining case label. PR: 192285 Modified: stable/10/sys/cam/scsi/scsi_sa.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_sa.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_sa.c Fri Aug 8 14:23:20 2014 (r269716) +++ stable/10/sys/cam/scsi/scsi_sa.c Fri Aug 8 14:42:03 2014 (r269717) @@ -113,16 +113,8 @@ typedef enum { #define ccb_pflags ppriv_field0 #define ccb_bp ppriv_ptr1 -#define SA_CCB_BUFFER_IO 0x0 -#define SA_CCB_TYPEMASK 0x1 -#define SA_POSITION_UPDATED 0x2 - -#define Set_CCB_Type(x, type) \ - x->ccb_h.ccb_pflags &= ~SA_CCB_TYPEMASK; \ - x->ccb_h.ccb_pflags |= type - -#define CCB_Type(x) (x->ccb_h.ccb_pflags & SA_CCB_TYPEMASK) - +/* bits in ccb_pflags */ +#define SA_POSITION_UPDATED 0x1 typedef enum { @@ -1834,7 +1826,6 @@ again: bp->bio_data, bp->bio_bcount, SSD_FULL_SIZE, IO_TIMEOUT); start_ccb->ccb_h.ccb_pflags &= ~SA_POSITION_UPDATED; - Set_CCB_Type(start_ccb, SA_CCB_BUFFER_IO); start_ccb->ccb_h.ccb_bp = bp; bp = bioq_first(&softc->bio_queue); xpt_action(start_ccb); @@ -1859,92 +1850,86 @@ sadone(struct cam_periph *periph, union { struct sa_softc *softc; struct ccb_scsiio *csio; + struct bio *bp; + int error; softc = (struct sa_softc *)periph->softc; csio = &done_ccb->csio; - switch (CCB_Type(csio)) { - case SA_CCB_BUFFER_IO: - { - struct bio *bp; - int error; - softc->dsreg = MTIO_DSREG_REST; - bp = (struct bio *)done_ccb->ccb_h.ccb_bp; - error = 0; - if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { - if ((error = saerror(done_ccb, 0, 0)) == ERESTART) { - /* - * A retry was scheduled, so just return. - */ - return; - } + softc->dsreg = MTIO_DSREG_REST; + bp = (struct bio *)done_ccb->ccb_h.ccb_bp; + error = 0; + if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { + if ((error = saerror(done_ccb, 0, 0)) == ERESTART) { + /* + * A retry was scheduled, so just return. + */ + return; } + } - if (error == EIO) { + if (error == EIO) { - /* - * Catastrophic error. Mark the tape as frozen - * (we no longer know tape position). - * - * Return all queued I/O with EIO, and unfreeze - * our queue so that future transactions that - * attempt to fix this problem can get to the - * device. - * - */ + /* + * Catastrophic error. Mark the tape as frozen + * (we no longer know tape position). + * + * Return all queued I/O with EIO, and unfreeze + * our queue so that future transactions that + * attempt to fix this problem can get to the + * device. + * + */ - softc->flags |= SA_FLAG_TAPE_FROZEN; - bioq_flush(&softc->bio_queue, NULL, EIO); - } - if (error != 0) { - bp->bio_resid = bp->bio_bcount; - bp->bio_error = error; + softc->flags |= SA_FLAG_TAPE_FROZEN; + bioq_flush(&softc->bio_queue, NULL, EIO); + } + if (error != 0) { + bp->bio_resid = bp->bio_bcount; + bp->bio_error = error; + bp->bio_flags |= BIO_ERROR; + /* + * In the error case, position is updated in saerror. + */ + } else { + bp->bio_resid = csio->resid; + bp->bio_error = 0; + if (csio->resid != 0) { bp->bio_flags |= BIO_ERROR; - /* - * In the error case, position is updated in saerror. - */ - } else { - bp->bio_resid = csio->resid; - bp->bio_error = 0; - if (csio->resid != 0) { - bp->bio_flags |= BIO_ERROR; - } - if (bp->bio_cmd == BIO_WRITE) { - softc->flags |= SA_FLAG_TAPE_WRITTEN; - softc->filemarks = 0; - } - if (!(csio->ccb_h.ccb_pflags & SA_POSITION_UPDATED) && - (softc->blkno != (daddr_t) -1)) { - if ((softc->flags & SA_FLAG_FIXED) != 0) { - u_int32_t l; - if (softc->blk_shift != 0) { - l = bp->bio_bcount >> - softc->blk_shift; - } else { - l = bp->bio_bcount / - softc->media_blksize; - } - softc->blkno += (daddr_t) l; + } + if (bp->bio_cmd == BIO_WRITE) { + softc->flags |= SA_FLAG_TAPE_WRITTEN; + softc->filemarks = 0; + } + if (!(csio->ccb_h.ccb_pflags & SA_POSITION_UPDATED) && + (softc->blkno != (daddr_t) -1)) { + if ((softc->flags & SA_FLAG_FIXED) != 0) { + u_int32_t l; + if (softc->blk_shift != 0) { + l = bp->bio_bcount >> + softc->blk_shift; } else { - softc->blkno++; + l = bp->bio_bcount / + softc->media_blksize; } + softc->blkno += (daddr_t) l; + } else { + softc->blkno++; } } - /* - * If we had an error (immediate or pending), - * release the device queue now. - */ - if (error || (softc->flags & SA_FLAG_ERR_PENDING)) - cam_release_devq(done_ccb->ccb_h.path, 0, 0, 0, 0); - if (error || bp->bio_resid) { - CAM_DEBUG(periph->path, CAM_DEBUG_INFO, - ("error %d resid %ld count %ld\n", error, - bp->bio_resid, bp->bio_bcount)); - } - biofinish(bp, softc->device_stats, 0); - break; } + /* + * If we had an error (immediate or pending), + * release the device queue now. + */ + if (error || (softc->flags & SA_FLAG_ERR_PENDING)) + cam_release_devq(done_ccb->ccb_h.path, 0, 0, 0, 0); + if (error || bp->bio_resid) { + CAM_DEBUG(periph->path, CAM_DEBUG_INFO, + ("error %d resid %ld count %ld\n", error, + bp->bio_resid, bp->bio_bcount)); } + biofinish(bp, softc->device_stats, 0); xpt_release_ccb(done_ccb); } @@ -2497,7 +2482,8 @@ saerror(union ccb *ccb, u_int32_t cflgs, info /= softc->media_blksize; } } - if (CCB_Type(csio) == SA_CCB_BUFFER_IO) { + if (csio->cdb_io.cdb_bytes[0] == SA_READ || + csio->cdb_io.cdb_bytes[0] == SA_WRITE) { bcopy((caddr_t) sense, (caddr_t) &softc->last_io_sense, sizeof (struct scsi_sense_data)); bcopy(csio->cdb_io.cdb_bytes, softc->last_io_cdb, From joerg at FreeBSD.org Fri Aug 8 14:48:27 2014 From: joerg at FreeBSD.org (Joerg Wunsch) Date: Fri, 8 Aug 2014 14:48:27 +0000 (UTC) Subject: svn commit: r269718 - stable/10/sys/dev/usb/serial Message-ID: <53e4e33b.2fd8.1842af28@svn.freebsd.org> Author: joerg Date: Fri Aug 8 14:48:26 2014 New Revision: 269718 URL: http://svnweb.freebsd.org/changeset/base/269718 Log: Merge r269470: Avoid a divide-by-zero panic when setting the baudrate to 0. Modified: stable/10/sys/dev/usb/serial/umcs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/serial/umcs.c ============================================================================== --- stable/10/sys/dev/usb/serial/umcs.c Fri Aug 8 14:42:03 2014 (r269717) +++ stable/10/sys/dev/usb/serial/umcs.c Fri Aug 8 14:48:26 2014 (r269718) @@ -1083,7 +1083,10 @@ umcs7840_calc_baudrate(uint32_t rate, ui for (i = 0; i < umcs7840_baudrate_divisors_len - 1 && !(rate > umcs7840_baudrate_divisors[i] && rate <= umcs7840_baudrate_divisors[i + 1]); ++i); - *divisor = umcs7840_baudrate_divisors[i + 1] / rate; + if (rate == 0) + *divisor = 1; /* XXX */ + else + *divisor = umcs7840_baudrate_divisors[i + 1] / rate; /* 0x00 .. 0x70 */ *clk = i << MCS7840_DEV_SPx_CLOCK_SHIFT; return (0); From markj at FreeBSD.org Fri Aug 8 14:53:00 2014 From: markj at FreeBSD.org (Mark Johnston) Date: Fri, 8 Aug 2014 14:52:59 +0000 (UTC) Subject: svn commit: r269719 - stable/9/lib/librtld_db Message-ID: <53e4e44b.23fd.793bc297@svn.freebsd.org> Author: markj Date: Fri Aug 8 14:52:59 2014 New Revision: 269719 URL: http://svnweb.freebsd.org/changeset/base/269719 Log: MFC r265629, r265630 MFC r265629: Handle the different event types properly in rd_event_addr(). In particular, with r265456 _r_debug_postinit can be used for RD_POSTINIT events. rtld(1) uses r_debug_state for dl state transitions, so we use its address for RD_DLACTIVITY events. MFC r265630: Fix the rd_event_addr prototype and slightly clarify the use of the "event" parameter. Modified: stable/9/lib/librtld_db/librtld_db.3 stable/9/lib/librtld_db/rtld_db.c stable/9/lib/librtld_db/rtld_db.h Directory Properties: stable/9/lib/librtld_db/ (props changed) Modified: stable/9/lib/librtld_db/librtld_db.3 ============================================================================== --- stable/9/lib/librtld_db/librtld_db.3 Fri Aug 8 14:48:26 2014 (r269718) +++ stable/9/lib/librtld_db/librtld_db.3 Fri Aug 8 14:52:59 2014 (r269719) @@ -48,7 +48,7 @@ .Fc .Ft rd_err_e .Fo rd_event_addr -.Fa "rd_agent_t *rdap, rd_notify_t *notify" +.Fa "rd_agent_t *rdap, rd_event_e event, rd_notify_t *notify" .Fc .Ft rd_err_e .Fo rd_event_enable @@ -142,10 +142,10 @@ enables reporting of events. This function always returns RD_OK. .Pp .Fn rd_event_addr -returns the event address in the +returns the event address corresponding to the .Ft event parameter. -At the moment we only report RD_NOTIFY_BPT events. +At the moment we only report events of type RD_NOTIFY_BPT. .Pp .Fn rd_event_getmsg returns the message associated with the latest event. Modified: stable/9/lib/librtld_db/rtld_db.c ============================================================================== --- stable/9/lib/librtld_db/rtld_db.c Fri Aug 8 14:48:26 2014 (r269718) +++ stable/9/lib/librtld_db/rtld_db.c Fri Aug 8 14:52:59 2014 (r269719) @@ -81,20 +81,40 @@ rd_errstr(rd_err_e rderr) } rd_err_e -rd_event_addr(rd_agent_t *rdap, rd_event_e event __unused, rd_notify_t *notify) +rd_event_addr(rd_agent_t *rdap, rd_event_e event, rd_notify_t *notify) { - DPRINTF("%s rdap %p notify %p\n", __func__, rdap, notify); + rd_err_e ret; - notify->type = RD_NOTIFY_BPT; - notify->u.bptaddr = rdap->rda_addr; + DPRINTF("%s rdap %p event %d notify %p\n", __func__, rdap, event, + notify); - return (RD_OK); + ret = RD_OK; + switch (event) { + case RD_NONE: + break; + case RD_PREINIT: + notify->type = RD_NOTIFY_BPT; + notify->u.bptaddr = rdap->rda_preinit_addr; + break; + case RD_POSTINIT: + notify->type = RD_NOTIFY_BPT; + notify->u.bptaddr = rdap->rda_postinit_addr; + break; + case RD_DLACTIVITY: + notify->type = RD_NOTIFY_BPT; + notify->u.bptaddr = rdap->rda_dlactivity_addr; + break; + default: + ret = RD_ERR; + break; + } + return (ret); } rd_err_e rd_event_enable(rd_agent_t *rdap __unused, int onoff) { - DPRINTF("%s onoff %d\n", __func__, onoff); + DPRINTF("%s onoff %d\n", __func__, onoff); return (RD_OK); } @@ -220,7 +240,15 @@ rd_reset(rd_agent_t *rdap) &sym) < 0) return (RD_ERR); DPRINTF("found r_debug_state at 0x%lx\n", (unsigned long)sym.st_value); - rdap->rda_addr = sym.st_value; + rdap->rda_preinit_addr = sym.st_value; + rdap->rda_dlactivity_addr = sym.st_value; + + if (proc_name2sym(rdap->rda_php, "ld-elf.so.1", "_r_debug_postinit", + &sym) < 0) + return (RD_ERR); + DPRINTF("found _r_debug_postinit at 0x%lx\n", + (unsigned long)sym.st_value); + rdap->rda_postinit_addr = sym.st_value; return (RD_OK); } Modified: stable/9/lib/librtld_db/rtld_db.h ============================================================================== --- stable/9/lib/librtld_db/rtld_db.h Fri Aug 8 14:48:26 2014 (r269718) +++ stable/9/lib/librtld_db/rtld_db.h Fri Aug 8 14:52:59 2014 (r269719) @@ -51,7 +51,9 @@ typedef enum { typedef struct rd_agent { struct proc_handle *rda_php; - uintptr_t rda_addr; /* address of r_debug_state */ + uintptr_t rda_dlactivity_addr; + uintptr_t rda_preinit_addr; + uintptr_t rda_postinit_addr; } rd_agent_t; typedef struct rd_loadobj { From markj at FreeBSD.org Fri Aug 8 14:53:02 2014 From: markj at FreeBSD.org (Mark Johnston) Date: Fri, 8 Aug 2014 14:53:01 +0000 (UTC) Subject: svn commit: r269720 - stable/10/lib/librtld_db Message-ID: <53e4e44d.241b.11631af2@svn.freebsd.org> Author: markj Date: Fri Aug 8 14:53:01 2014 New Revision: 269720 URL: http://svnweb.freebsd.org/changeset/base/269720 Log: MFC r265629, r265630 MFC r265629: Handle the different event types properly in rd_event_addr(). In particular, with r265456 _r_debug_postinit can be used for RD_POSTINIT events. rtld(1) uses r_debug_state for dl state transitions, so we use its address for RD_DLACTIVITY events. MFC r265630: Fix the rd_event_addr prototype and slightly clarify the use of the "event" parameter. Modified: stable/10/lib/librtld_db/librtld_db.3 stable/10/lib/librtld_db/rtld_db.c stable/10/lib/librtld_db/rtld_db.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/librtld_db/librtld_db.3 ============================================================================== --- stable/10/lib/librtld_db/librtld_db.3 Fri Aug 8 14:52:59 2014 (r269719) +++ stable/10/lib/librtld_db/librtld_db.3 Fri Aug 8 14:53:01 2014 (r269720) @@ -48,7 +48,7 @@ .Fc .Ft rd_err_e .Fo rd_event_addr -.Fa "rd_agent_t *rdap, rd_notify_t *notify" +.Fa "rd_agent_t *rdap, rd_event_e event, rd_notify_t *notify" .Fc .Ft rd_err_e .Fo rd_event_enable @@ -142,10 +142,10 @@ enables reporting of events. This function always returns RD_OK. .Pp .Fn rd_event_addr -returns the event address in the +returns the event address corresponding to the .Ft event parameter. -At the moment we only report RD_NOTIFY_BPT events. +At the moment we only report events of type RD_NOTIFY_BPT. .Pp .Fn rd_event_getmsg returns the message associated with the latest event. Modified: stable/10/lib/librtld_db/rtld_db.c ============================================================================== --- stable/10/lib/librtld_db/rtld_db.c Fri Aug 8 14:52:59 2014 (r269719) +++ stable/10/lib/librtld_db/rtld_db.c Fri Aug 8 14:53:01 2014 (r269720) @@ -81,20 +81,40 @@ rd_errstr(rd_err_e rderr) } rd_err_e -rd_event_addr(rd_agent_t *rdap, rd_event_e event __unused, rd_notify_t *notify) +rd_event_addr(rd_agent_t *rdap, rd_event_e event, rd_notify_t *notify) { - DPRINTF("%s rdap %p notify %p\n", __func__, rdap, notify); + rd_err_e ret; - notify->type = RD_NOTIFY_BPT; - notify->u.bptaddr = rdap->rda_addr; + DPRINTF("%s rdap %p event %d notify %p\n", __func__, rdap, event, + notify); - return (RD_OK); + ret = RD_OK; + switch (event) { + case RD_NONE: + break; + case RD_PREINIT: + notify->type = RD_NOTIFY_BPT; + notify->u.bptaddr = rdap->rda_preinit_addr; + break; + case RD_POSTINIT: + notify->type = RD_NOTIFY_BPT; + notify->u.bptaddr = rdap->rda_postinit_addr; + break; + case RD_DLACTIVITY: + notify->type = RD_NOTIFY_BPT; + notify->u.bptaddr = rdap->rda_dlactivity_addr; + break; + default: + ret = RD_ERR; + break; + } + return (ret); } rd_err_e rd_event_enable(rd_agent_t *rdap __unused, int onoff) { - DPRINTF("%s onoff %d\n", __func__, onoff); + DPRINTF("%s onoff %d\n", __func__, onoff); return (RD_OK); } @@ -220,7 +240,15 @@ rd_reset(rd_agent_t *rdap) &sym) < 0) return (RD_ERR); DPRINTF("found r_debug_state at 0x%lx\n", (unsigned long)sym.st_value); - rdap->rda_addr = sym.st_value; + rdap->rda_preinit_addr = sym.st_value; + rdap->rda_dlactivity_addr = sym.st_value; + + if (proc_name2sym(rdap->rda_php, "ld-elf.so.1", "_r_debug_postinit", + &sym) < 0) + return (RD_ERR); + DPRINTF("found _r_debug_postinit at 0x%lx\n", + (unsigned long)sym.st_value); + rdap->rda_postinit_addr = sym.st_value; return (RD_OK); } Modified: stable/10/lib/librtld_db/rtld_db.h ============================================================================== --- stable/10/lib/librtld_db/rtld_db.h Fri Aug 8 14:52:59 2014 (r269719) +++ stable/10/lib/librtld_db/rtld_db.h Fri Aug 8 14:53:01 2014 (r269720) @@ -51,7 +51,9 @@ typedef enum { typedef struct rd_agent { struct proc_handle *rda_php; - uintptr_t rda_addr; /* address of r_debug_state */ + uintptr_t rda_dlactivity_addr; + uintptr_t rda_preinit_addr; + uintptr_t rda_postinit_addr; } rd_agent_t; typedef struct rd_loadobj { From joerg at FreeBSD.org Fri Aug 8 14:56:04 2014 From: joerg at FreeBSD.org (Joerg Wunsch) Date: Fri, 8 Aug 2014 14:56:04 +0000 (UTC) Subject: svn commit: r269721 - stable/9/sys/dev/usb/serial Message-ID: <53e4e504.243c.4a12602c@svn.freebsd.org> Author: joerg Date: Fri Aug 8 14:56:04 2014 New Revision: 269721 URL: http://svnweb.freebsd.org/changeset/base/269721 Log: MFC r269470: Avoid divide-by-zero panic when setting baudrate to 0. Modified: stable/9/sys/dev/usb/serial/umcs.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/serial/umcs.c ============================================================================== --- stable/9/sys/dev/usb/serial/umcs.c Fri Aug 8 14:53:01 2014 (r269720) +++ stable/9/sys/dev/usb/serial/umcs.c Fri Aug 8 14:56:04 2014 (r269721) @@ -1083,7 +1083,10 @@ umcs7840_calc_baudrate(uint32_t rate, ui for (i = 0; i < umcs7840_baudrate_divisors_len - 1 && !(rate > umcs7840_baudrate_divisors[i] && rate <= umcs7840_baudrate_divisors[i + 1]); ++i); - *divisor = umcs7840_baudrate_divisors[i + 1] / rate; + if (rate == 0) + *divisor = 1; /* XXX */ + else + *divisor = umcs7840_baudrate_divisors[i + 1] / rate; /* 0x00 .. 0x70 */ *clk = i << MCS7840_DEV_SPx_CLOCK_SHIFT; return (0); From joerg at FreeBSD.org Fri Aug 8 15:04:02 2014 From: joerg at FreeBSD.org (Joerg Wunsch) Date: Fri, 8 Aug 2014 15:04:02 +0000 (UTC) Subject: svn commit: r269722 - stable/8/sys/dev/usb/serial Message-ID: <53e4e6e2.2a2f.5ff767c5@svn.freebsd.org> Author: joerg Date: Fri Aug 8 15:04:02 2014 New Revision: 269722 URL: http://svnweb.freebsd.org/changeset/base/269722 Log: MFC r269470: avoid divide-by-zero panic when setting baudrate to 0. Modified: stable/8/sys/dev/usb/serial/umcs.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/serial/umcs.c ============================================================================== --- stable/8/sys/dev/usb/serial/umcs.c Fri Aug 8 14:56:04 2014 (r269721) +++ stable/8/sys/dev/usb/serial/umcs.c Fri Aug 8 15:04:02 2014 (r269722) @@ -1059,7 +1059,10 @@ umcs7840_calc_baudrate(uint32_t rate, ui for (i = 0; i < umcs7840_baudrate_divisors_len - 1 && !(rate > umcs7840_baudrate_divisors[i] && rate <= umcs7840_baudrate_divisors[i + 1]); ++i); - *divisor = umcs7840_baudrate_divisors[i + 1] / rate; + if (rate == 0) + *divisor = 1; /* XXX */ + else + *divisor = umcs7840_baudrate_divisors[i + 1] / rate; /* 0x00 .. 0x70 */ *clk = i << MCS7840_DEV_SPx_CLOCK_SHIFT; return (0); From markj at FreeBSD.org Fri Aug 8 15:21:42 2014 From: markj at FreeBSD.org (Mark Johnston) Date: Fri, 8 Aug 2014 15:21:42 +0000 (UTC) Subject: svn commit: r269723 - stable/9/cddl/contrib/opensolaris/lib/libdtrace/common Message-ID: <53e4eb06.2113.45f27a88@svn.freebsd.org> Author: markj Date: Fri Aug 8 15:21:42 2014 New Revision: 269723 URL: http://svnweb.freebsd.org/changeset/base/269723 Log: MFC r265631: Re-apply r248644. This fixes an annoying problem which caused dtrace -c to fail to attach to stripped binaries. With the _r_debug_postinit symbol, dtrace(1) can now set a breakpoint in the victim process after it has registered its DOF table(s) with the kernel. r_debug_state cannot be used for this purpose since it is called before DOF is made available, in which case dtrace(1) cannot create USDT probes before the program begins execution. Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Fri Aug 8 15:04:02 2014 (r269722) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Fri Aug 8 15:21:42 2014 (r269723) @@ -1136,7 +1136,7 @@ alloc: #if defined(sun) dtp->dt_prcmode = DT_PROC_STOP_PREINIT; #else - dtp->dt_prcmode = DT_PROC_STOP_MAIN; + dtp->dt_prcmode = DT_PROC_STOP_POSTINIT; #endif dtp->dt_linkmode = DT_LINK_KERNEL; dtp->dt_linktype = DT_LTYP_ELF; From markj at FreeBSD.org Fri Aug 8 15:21:44 2014 From: markj at FreeBSD.org (Mark Johnston) Date: Fri, 8 Aug 2014 15:21:43 +0000 (UTC) Subject: svn commit: r269724 - stable/10/cddl/contrib/opensolaris/lib/libdtrace/common Message-ID: <53e4eb07.2126.5016aefc@svn.freebsd.org> Author: markj Date: Fri Aug 8 15:21:43 2014 New Revision: 269724 URL: http://svnweb.freebsd.org/changeset/base/269724 Log: MFC r265631: Re-apply r248644. This fixes an annoying problem which caused dtrace -c to fail to attach to stripped binaries. With the _r_debug_postinit symbol, dtrace(1) can now set a breakpoint in the victim process after it has registered its DOF table(s) with the kernel. r_debug_state cannot be used for this purpose since it is called before DOF is made available, in which case dtrace(1) cannot create USDT probes before the program begins execution. Modified: stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Fri Aug 8 15:21:42 2014 (r269723) +++ stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Fri Aug 8 15:21:43 2014 (r269724) @@ -1160,7 +1160,7 @@ alloc: #if defined(sun) dtp->dt_prcmode = DT_PROC_STOP_PREINIT; #else - dtp->dt_prcmode = DT_PROC_STOP_MAIN; + dtp->dt_prcmode = DT_PROC_STOP_POSTINIT; #endif dtp->dt_linkmode = DT_LINK_KERNEL; dtp->dt_linktype = DT_LTYP_ELF; From delphij at FreeBSD.org Fri Aug 8 18:54:53 2014 From: delphij at FreeBSD.org (Xin LI) Date: Fri, 8 Aug 2014 18:54:52 +0000 (UTC) Subject: svn commit: r269732 - in stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys Message-ID: <53e51cfd.2a6f.7efc449@svn.freebsd.org> Author: delphij Date: Fri Aug 8 18:54:52 2014 New Revision: 269732 URL: http://svnweb.freebsd.org/changeset/base/269732 Log: MFC r269086: As of r268075, the responsibility of rounding up buffer to optimal size have been transferred from zio_compress_data to its caller. Therefore, passing the 'minblocksize' down will be a no-op. Eliminate the parameter to reduce diff against upstream. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_compress.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Aug 8 18:36:53 2014 (r269731) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Aug 8 18:54:52 2014 (r269732) @@ -5207,7 +5207,7 @@ l2arc_compress_buf(l2arc_buf_hdr_t *l2hd len = l2hdr->b_asize; cdata = zio_data_buf_alloc(len); csize = zio_compress_data(ZIO_COMPRESS_LZ4, l2hdr->b_tmp_cdata, - cdata, l2hdr->b_asize, (size_t)(1ULL << l2hdr->b_dev->l2ad_vdev->vdev_ashift)); + cdata, l2hdr->b_asize); rounded = P2ROUNDUP(csize, (size_t)SPA_MINBLOCKSIZE); if (rounded > csize) { Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h Fri Aug 8 18:36:53 2014 (r269731) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h Fri Aug 8 18:54:52 2014 (r269732) @@ -81,7 +81,7 @@ extern int lz4_decompress(void *src, voi * Compress and decompress data if necessary. */ extern size_t zio_compress_data(enum zio_compress c, void *src, void *dst, - size_t s_len, size_t minblocksize); + size_t s_len); extern int zio_decompress_data(enum zio_compress c, void *src, void *dst, size_t s_len, size_t d_len); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Fri Aug 8 18:36:53 2014 (r269731) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Fri Aug 8 18:54:52 2014 (r269732) @@ -1158,10 +1158,8 @@ zio_write_bp_init(zio_t **ziop) } if (compress != ZIO_COMPRESS_OFF) { - metaslab_class_t *mc = spa_normal_class(spa); void *cbuf = zio_buf_alloc(lsize); - psize = zio_compress_data(compress, zio->io_data, cbuf, lsize, - (size_t)metaslab_class_get_minblocksize(mc)); + psize = zio_compress_data(compress, zio->io_data, cbuf, lsize); if (psize == 0 || psize == lsize) { compress = ZIO_COMPRESS_OFF; zio_buf_free(cbuf, lsize); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_compress.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_compress.c Fri Aug 8 18:36:53 2014 (r269731) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_compress.c Fri Aug 8 18:54:52 2014 (r269732) @@ -97,8 +97,7 @@ zio_compress_select(enum zio_compress ch } size_t -zio_compress_data(enum zio_compress c, void *src, void *dst, size_t s_len, - size_t minblocksize) +zio_compress_data(enum zio_compress c, void *src, void *dst, size_t s_len) { uint64_t *word, *word_end; size_t c_len, d_len; From delphij at FreeBSD.org Fri Aug 8 18:57:44 2014 From: delphij at FreeBSD.org (Xin LI) Date: Fri, 8 Aug 2014 18:57:43 +0000 (UTC) Subject: svn commit: r269733 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <53e51da7.2a89.2f78c7f9@svn.freebsd.org> Author: delphij Date: Fri Aug 8 18:57:43 2014 New Revision: 269733 URL: http://svnweb.freebsd.org/changeset/base/269733 Log: MFC r269093: Transform the I/O when vdev_physical_ashift is greater than SPA_MINBLOCKSHIFT. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Fri Aug 8 18:54:52 2014 (r269732) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Fri Aug 8 18:57:43 2014 (r269733) @@ -2619,7 +2619,8 @@ zio_vdev_io_start(zio_t **ziop) align = 1ULL << vd->vdev_top->vdev_ashift; - if (!(zio->io_flags & ZIO_FLAG_PHYSICAL) && + if ((!(zio->io_flags & ZIO_FLAG_PHYSICAL) || + (vd->vdev_top->vdev_physical_ashift > SPA_MINBLOCKSHIFT)) && P2PHASE(zio->io_size, align) != 0) { /* Transform logical writes to be a full physical block size. */ uint64_t asize = P2ROUNDUP(zio->io_size, align); From delphij at FreeBSD.org Fri Aug 8 19:06:24 2014 From: delphij at FreeBSD.org (Xin LI) Date: Fri, 8 Aug 2014 19:06:24 +0000 (UTC) Subject: svn commit: r269734 - stable/10/cddl/contrib/opensolaris/cmd/zpool Message-ID: <53e51fb0.2e6f.24178e47@svn.freebsd.org> Author: delphij Date: Fri Aug 8 19:06:24 2014 New Revision: 269734 URL: http://svnweb.freebsd.org/changeset/base/269734 Log: MFC the cddl/contrib/opensolaris/cmd/zpool portion of r267803 (joel): mdoc: remove superfluous paragraph macros. Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool.8 ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Fri Aug 8 18:57:43 2014 (r269733) +++ stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Fri Aug 8 19:06:24 2014 (r269734) @@ -1041,7 +1041,6 @@ the following fields: See the .Qq Sx Properties section for more information on the available pool properties. -.Pp .It Fl H Scripted mode. Do not display headers, and separate fields by a single tab instead of arbitrary space. From delphij at FreeBSD.org Fri Aug 8 19:11:24 2014 From: delphij at FreeBSD.org (Xin LI) Date: Fri, 8 Aug 2014 19:11:23 +0000 (UTC) Subject: svn commit: r269735 - stable/10/cddl/contrib/opensolaris/cmd/zpool Message-ID: <53e520db.2227.7ac5da4@svn.freebsd.org> Author: delphij Date: Fri Aug 8 19:11:23 2014 New Revision: 269735 URL: http://svnweb.freebsd.org/changeset/base/269735 Log: MFC r268621 (smh) + r268625: Don't report non-native block-size pools under zpool status -x zpool status -x is used to identify pools that are exhibiting errors or are otherwise unavailable, therefore non-native block-size pools shouldn't be reported. Also update man page to clarify other additional conditions which won't cause a pool to be displayed under zpool status -x. Sponsored by: Multiplay Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool.8 stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool.8 ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Fri Aug 8 19:06:24 2014 (r269734) +++ stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Fri Aug 8 19:11:23 2014 (r269735) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 28, 2014 +.Dd July 14, 2014 .Dt ZPOOL 8 .Os .Sh NAME @@ -1664,7 +1664,8 @@ can change. .It Fl x Only display status for pools that are exhibiting errors or are otherwise unavailable. -Warnings about pools not using the latest on-disk format will not be included. +Warnings about pools not using the latest on-disk format, having non-native +block size or disabled features will not be included. .It Fl v Displays verbose data error information, printing out a complete list of all data errors since the last complete pool scrub. Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Fri Aug 8 19:06:24 2014 (r269734) +++ stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Fri Aug 8 19:11:23 2014 (r269735) @@ -4101,6 +4101,7 @@ status_callback(zpool_handle_t *zhp, voi if (cbp->cb_explain && (reason == ZPOOL_STATUS_OK || reason == ZPOOL_STATUS_VERSION_OLDER || + reason == ZPOOL_STATUS_NON_NATIVE_ASHIFT || reason == ZPOOL_STATUS_FEAT_DISABLED)) { if (!cbp->cb_allpools) { (void) printf(gettext("pool '%s' is healthy\n"), From delphij at FreeBSD.org Fri Aug 8 19:14:50 2014 From: delphij at FreeBSD.org (Xin LI) Date: Fri, 8 Aug 2014 19:14:50 +0000 (UTC) Subject: svn commit: r269736 - stable/10/cddl/contrib/opensolaris/cmd/zpool Message-ID: <53e521aa.2253.d965b16@svn.freebsd.org> Author: delphij Date: Fri Aug 8 19:14:49 2014 New Revision: 269736 URL: http://svnweb.freebsd.org/changeset/base/269736 Log: MFC r269100: Diff reduction against Illumos. Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool.8 stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool.8 ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Fri Aug 8 19:11:23 2014 (r269735) +++ stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Fri Aug 8 19:14:49 2014 (r269736) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 14, 2014 +.Dd July 25, 2014 .Dt ZPOOL 8 .Os .Sh NAME @@ -556,7 +556,12 @@ will decrease while .Sy free increases. .It Sy expandsize -This property has currently no value on FreeBSD. +Amount of uninitialized space within the pool or device that can be used to +increase the total capacity of the pool. +Uninitialized space consists of +any space on an EFI labeled vdev which has not been brought online +.Pq i.e. zpool online -e . +This space occurs when a LUN is dynamically expanded. .It Sy guid A unique identifier for the pool. .It Sy health @@ -1391,7 +1396,10 @@ instead of arbitrary space. .It Fl p Display numbers in parsable (exact) values. .It Fl v -Show more detailed information. +Verbose statistics. Reports usage statistics for individual +.Em vdevs +within +the pool, in addition to the pool-wide statistics. .It Fl o Ar property Ns Op , Ns Ar ... Comma-separated list of properties to display. See the .Qq Sx Properties @@ -1400,6 +1408,7 @@ section for a list of valid properties. .Sy size , .Sy used , .Sy available , +.Sy expandsize , .Sy capacity , .Sy health , .Sy altroot . @@ -1785,9 +1794,9 @@ is immediately available to any datasets The following command lists all available pools on the system. .Bd -literal -offset 2n .Li # Ic zpool list -NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT -pool 2.70T 473G 2.24T 17% 1.00x ONLINE - -test 1.98G 89.5K 1.98G 0% 1.00x ONLINE - +NAME SIZE ALLOC FREE EXPANDSZ CAP DEDUP HEALTH ALTROOT +pool 2.70T 473G 2.24T - 17% 1.00x ONLINE - +test 1.98G 89.5K 1.98G - 0% 1.00x ONLINE - .Ed .It Sy Example 7 No Listing All Properties for a Pool .Pp Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Fri Aug 8 19:11:23 2014 (r269735) +++ stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Fri Aug 8 19:14:49 2014 (r269736) @@ -3031,7 +3031,7 @@ zpool_do_list(int argc, char **argv) int ret; list_cbdata_t cb = { 0 }; static char default_props[] = - "name,size,allocated,free,capacity,dedupratio," + "name,size,allocated,free,expandsize,capacity,dedupratio," "health,altroot"; char *props = default_props; unsigned long interval = 0, count = 0; From delphij at FreeBSD.org Fri Aug 8 19:36:40 2014 From: delphij at FreeBSD.org (Xin LI) Date: Fri, 8 Aug 2014 19:36:40 +0000 (UTC) Subject: svn commit: r269737 - stable/10/tools/test/netfibs Message-ID: <53e526c8.2b9c.8d9b899@svn.freebsd.org> Author: delphij Date: Fri Aug 8 19:36:40 2014 New Revision: 269737 URL: http://svnweb.freebsd.org/changeset/base/269737 Log: MFC r269097: Use the right length. Modified: stable/10/tools/test/netfibs/reflect.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/test/netfibs/reflect.c ============================================================================== --- stable/10/tools/test/netfibs/reflect.c Fri Aug 8 19:14:49 2014 (r269736) +++ stable/10/tools/test/netfibs/reflect.c Fri Aug 8 19:36:40 2014 (r269737) @@ -94,7 +94,7 @@ reflect_conn(int s, char *buf, size_t bu fprintf(stderr, "<< %s: %s\n", testcase, buf); if (reflectfib != (u_int)-1) - l = snprintf(buf, sizeof(buf), "FIB %u\n", reflectfib); + l = snprintf(buf, buflen, "FIB %u\n", reflectfib); /* If debug is on, log. */ if (debug > 0) { From delphij at FreeBSD.org Fri Aug 8 19:39:41 2014 From: delphij at FreeBSD.org (Xin LI) Date: Fri, 8 Aug 2014 19:39:40 +0000 (UTC) Subject: svn commit: r269738 - in stable/10/tools/regression/net80211: ccmp wep Message-ID: <53e5277d.2bb2.76f42596@svn.freebsd.org> Author: delphij Date: Fri Aug 8 19:39:40 2014 New Revision: 269738 URL: http://svnweb.freebsd.org/changeset/base/269738 Log: MFC r269098: Use the right lengths. Submitted by: Sascha Wildner Modified: stable/10/tools/regression/net80211/ccmp/test_ccmp.c stable/10/tools/regression/net80211/wep/test_wep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/regression/net80211/ccmp/test_ccmp.c ============================================================================== --- stable/10/tools/regression/net80211/ccmp/test_ccmp.c Fri Aug 8 19:36:40 2014 (r269737) +++ stable/10/tools/regression/net80211/ccmp/test_ccmp.c Fri Aug 8 19:39:40 2014 (r269738) @@ -680,7 +680,7 @@ runtest(struct ieee80211com *ic, struct printf("FAIL: decap botch; data does not compare\n"); printtest(t); cmpfail(mtod(m, const void *), m->m_pkthdr.len, - t->plaintext, sizeof(t->plaintext)); + t->plaintext, t_plaintext_len); goto bad; } m_freem(m); Modified: stable/10/tools/regression/net80211/wep/test_wep.c ============================================================================== --- stable/10/tools/regression/net80211/wep/test_wep.c Fri Aug 8 19:36:40 2014 (r269737) +++ stable/10/tools/regression/net80211/wep/test_wep.c Fri Aug 8 19:39:40 2014 (r269738) @@ -242,7 +242,7 @@ runtest(struct ieee80211com *ic, struct } else if (memcmp(mtod(m, const void *), t->plaintext, t->plaintext_len)) { printf("FAIL: decap botch; data does not compare\n"); cmpfail(mtod(m, const void *), m->m_pkthdr.len, - t->plaintext, sizeof(t->plaintext)); + t->plaintext, t->plaintext_len); goto bad; } From rpaulo at FreeBSD.org Fri Aug 8 22:08:52 2014 From: rpaulo at FreeBSD.org (Rui Paulo) Date: Fri, 8 Aug 2014 22:08:51 +0000 (UTC) Subject: svn commit: r269742 - in stable/10: sys/kern usr.bin/kdump Message-ID: <53e54a74.2c40.72548fb3@svn.freebsd.org> Author: rpaulo Date: Fri Aug 8 22:08:51 2014 New Revision: 269742 URL: http://svnweb.freebsd.org/changeset/base/269742 Log: MFC r269408, r269409: shm_open()/shm_unlink() ktrace support. Modified: stable/10/sys/kern/uipc_shm.c stable/10/usr.bin/kdump/kdump.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/uipc_shm.c ============================================================================== --- stable/10/sys/kern/uipc_shm.c Fri Aug 8 21:47:47 2014 (r269741) +++ stable/10/sys/kern/uipc_shm.c Fri Aug 8 22:08:51 2014 (r269742) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include "opt_capsicum.h" +#include "opt_ktrace.h" #include #include @@ -53,6 +54,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include +#include #include #include #include @@ -727,7 +731,10 @@ sys_shm_open(struct thread *td, struct s } else { path = malloc(MAXPATHLEN, M_SHMFD, M_WAITOK); error = copyinstr(uap->path, path, MAXPATHLEN, NULL); - +#ifdef KTRACE + if (error == 0 && KTRPOINT(curthread, KTR_NAMEI)) + ktrnamei(path); +#endif /* Require paths to start with a '/' character. */ if (error == 0 && path[0] != '/') error = EINVAL; @@ -825,7 +832,10 @@ sys_shm_unlink(struct thread *td, struct free(path, M_TEMP); return (error); } - +#ifdef KTRACE + if (KTRPOINT(curthread, KTR_NAMEI)) + ktrnamei(path); +#endif fnv = fnv_32_str(path, FNV1_32_INIT); sx_xlock(&shm_dict_lock); error = shm_remove(path, fnv, td->td_ucred); Modified: stable/10/usr.bin/kdump/kdump.c ============================================================================== --- stable/10/usr.bin/kdump/kdump.c Fri Aug 8 21:47:47 2014 (r269741) +++ stable/10/usr.bin/kdump/kdump.c Fri Aug 8 22:08:51 2014 (r269742) @@ -1011,6 +1011,14 @@ ktrsyscall(struct ktr_syscall *ktr, u_in ip++; narg--; break; + case SYS_shm_open: + print_number(ip, narg, c); + putchar(','); + flagsname(ip[0]); + printf(",0%o", ip[1]); + ip += 3; + narg -= 3; + break; case SYS_minherit: print_number(ip, narg, c); print_number(ip, narg, c); From markj at FreeBSD.org Sat Aug 9 14:05:03 2014 From: markj at FreeBSD.org (Mark Johnston) Date: Sat, 9 Aug 2014 14:05:02 +0000 (UTC) Subject: svn commit: r269752 - in stable/10/sys: amd64/amd64 i386/i386 kern mips/mips powerpc/aim sys Message-ID: <53e62a8e.2c16.1009619f@svn.freebsd.org> Author: markj Date: Sat Aug 9 14:05:01 2014 New Revision: 269752 URL: http://svnweb.freebsd.org/changeset/base/269752 Log: MFC r266826, r266827 Move some duplicated hook definitions from machine-dependent files to kern_dtrace.c. Modified: stable/10/sys/amd64/amd64/trap.c stable/10/sys/i386/i386/trap.c stable/10/sys/kern/kern_dtrace.c stable/10/sys/mips/mips/trap.c stable/10/sys/powerpc/aim/trap.c stable/10/sys/sys/dtrace_bsd.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/trap.c ============================================================================== --- stable/10/sys/amd64/amd64/trap.c Sat Aug 9 13:41:11 2014 (r269751) +++ stable/10/sys/amd64/amd64/trap.c Sat Aug 9 14:05:01 2014 (r269752) @@ -96,28 +96,6 @@ PMC_SOFT_DEFINE( , , page_fault, write); #ifdef KDTRACE_HOOKS #include - -/* - * This is a hook which is initialised by the dtrace module - * to handle traps which might occur during DTrace probe - * execution. - */ -dtrace_trap_func_t dtrace_trap_func; - -dtrace_doubletrap_func_t dtrace_doubletrap_func; - -/* - * This is a hook which is initialised by the systrace module - * when it is loaded. This keeps the DTrace syscall provider - * implementation opaque. - */ -systrace_probe_func_t systrace_probe_func; - -/* - * These hooks are necessary for the pid and usdt providers. - */ -dtrace_pid_probe_ptr_t dtrace_pid_probe_ptr; -dtrace_return_probe_ptr_t dtrace_return_probe_ptr; #endif extern void trap(struct trapframe *frame); Modified: stable/10/sys/i386/i386/trap.c ============================================================================== --- stable/10/sys/i386/i386/trap.c Sat Aug 9 13:41:11 2014 (r269751) +++ stable/10/sys/i386/i386/trap.c Sat Aug 9 14:05:01 2014 (r269752) @@ -105,28 +105,6 @@ PMC_SOFT_DEFINE( , , page_fault, write); #ifdef KDTRACE_HOOKS #include - -/* - * This is a hook which is initialised by the dtrace module - * to handle traps which might occur during DTrace probe - * execution. - */ -dtrace_trap_func_t dtrace_trap_func; - -dtrace_doubletrap_func_t dtrace_doubletrap_func; - -/* - * This is a hook which is initialised by the systrace module - * when it is loaded. This keeps the DTrace syscall provider - * implementation opaque. - */ -systrace_probe_func_t systrace_probe_func; - -/* - * These hooks are necessary for the pid and usdt providers. - */ -dtrace_pid_probe_ptr_t dtrace_pid_probe_ptr; -dtrace_return_probe_ptr_t dtrace_return_probe_ptr; #endif extern void trap(struct trapframe *frame); Modified: stable/10/sys/kern/kern_dtrace.c ============================================================================== --- stable/10/sys/kern/kern_dtrace.c Sat Aug 9 13:41:11 2014 (r269751) +++ stable/10/sys/kern/kern_dtrace.c Sat Aug 9 14:05:01 2014 (r269752) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #define KDTRACE_PROC_SIZE 64 #define KDTRACE_THREAD_SIZE 256 @@ -47,6 +48,14 @@ FEATURE(kdtrace_hooks, static MALLOC_DEFINE(M_KDTRACE, "kdtrace", "DTrace hooks"); +/* Hooks used in the machine-dependent trap handlers. */ +dtrace_trap_func_t dtrace_trap_func; +dtrace_doubletrap_func_t dtrace_doubletrap_func; +dtrace_pid_probe_ptr_t dtrace_pid_probe_ptr; +dtrace_return_probe_ptr_t dtrace_return_probe_ptr; + +systrace_probe_func_t systrace_probe_func; + /* Return the DTrace process data size compiled in the kernel hooks. */ size_t kdtrace_proc_size() Modified: stable/10/sys/mips/mips/trap.c ============================================================================== --- stable/10/sys/mips/mips/trap.c Sat Aug 9 13:41:11 2014 (r269751) +++ stable/10/sys/mips/mips/trap.c Sat Aug 9 14:05:01 2014 (r269752) @@ -94,28 +94,6 @@ __FBSDID("$FreeBSD$"); #ifdef KDTRACE_HOOKS #include - -/* - * This is a hook which is initialised by the dtrace module - * to handle traps which might occur during DTrace probe - * execution. - */ -dtrace_trap_func_t dtrace_trap_func; - -dtrace_doubletrap_func_t dtrace_doubletrap_func; - -/* - * This is a hook which is initialised by the systrace module - * when it is loaded. This keeps the DTrace syscall provider - * implementation opaque. - */ -systrace_probe_func_t systrace_probe_func; - -/* - * These hooks are necessary for the pid and usdt providers. - */ -dtrace_pid_probe_ptr_t dtrace_pid_probe_ptr; -dtrace_return_probe_ptr_t dtrace_return_probe_ptr; #endif #ifdef TRAP_DEBUG Modified: stable/10/sys/powerpc/aim/trap.c ============================================================================== --- stable/10/sys/powerpc/aim/trap.c Sat Aug 9 13:41:11 2014 (r269751) +++ stable/10/sys/powerpc/aim/trap.c Sat Aug 9 14:05:01 2014 (r269752) @@ -97,27 +97,6 @@ struct powerpc_exception { #ifdef KDTRACE_HOOKS #include -/* - * This is a hook which is initialised by the dtrace module - * to handle traps which might occur during DTrace probe - * execution. - */ -dtrace_trap_func_t dtrace_trap_func; - -dtrace_doubletrap_func_t dtrace_doubletrap_func; - -/* - * This is a hook which is initialised by the systrace module - * when it is loaded. This keeps the DTrace syscall provider - * implementation opaque. - */ -systrace_probe_func_t systrace_probe_func; - -/* - * These hooks are necessary for the pid and usdt providers. - */ -dtrace_pid_probe_ptr_t dtrace_pid_probe_ptr; -dtrace_return_probe_ptr_t dtrace_return_probe_ptr; int (*dtrace_invop_jump_addr)(struct trapframe *); #endif Modified: stable/10/sys/sys/dtrace_bsd.h ============================================================================== --- stable/10/sys/sys/dtrace_bsd.h Sat Aug 9 13:41:11 2014 (r269751) +++ stable/10/sys/sys/dtrace_bsd.h Sat Aug 9 14:05:01 2014 (r269752) @@ -61,11 +61,13 @@ int dtrace_trap(struct trapframe *, u_in extern dtrace_trap_func_t dtrace_trap_func; -/* Used by the machine dependent trap() code. */ +/* + * A hook which removes active FBT probes before executing the double fault + * handler. We want to ensure that DTrace doesn't trigger another trap, which + * would result in a reset. + */ typedef int (*dtrace_invop_func_t)(uintptr_t, uintptr_t *, uintptr_t); typedef void (*dtrace_doubletrap_func_t)(void); - -/* Global variables in trap.c */ extern dtrace_invop_func_t dtrace_invop_func; extern dtrace_doubletrap_func_t dtrace_doubletrap_func; From markj at FreeBSD.org Sat Aug 9 15:00:04 2014 From: markj at FreeBSD.org (Mark Johnston) Date: Sat, 9 Aug 2014 15:00:03 +0000 (UTC) Subject: svn commit: r269754 - stable/10/lib/libproc Message-ID: <53e63773.203c.26b2a194@svn.freebsd.org> Author: markj Date: Sat Aug 9 15:00:03 2014 New Revision: 269754 URL: http://svnweb.freebsd.org/changeset/base/269754 Log: MFC r265308: If the traced process stops because it received a signal, libproc needs to ensure that the signal is forwarded when proc_continue() is called. Modified: stable/10/lib/libproc/libproc.h stable/10/lib/libproc/proc_bkpt.c stable/10/lib/libproc/proc_util.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libproc/libproc.h ============================================================================== --- stable/10/lib/libproc/libproc.h Sat Aug 9 14:33:44 2014 (r269753) +++ stable/10/lib/libproc/libproc.h Sat Aug 9 15:00:03 2014 (r269754) @@ -102,6 +102,7 @@ typedef struct lwpstatus { #define PR_FAULTED 2 #define PR_SYSENTRY 3 #define PR_SYSEXIT 4 +#define PR_SIGNALLED 5 int pr_what; #define FLTBPT -1 } lwpstatus_t; Modified: stable/10/lib/libproc/proc_bkpt.c ============================================================================== --- stable/10/lib/libproc/proc_bkpt.c Sat Aug 9 14:33:44 2014 (r269753) +++ stable/10/lib/libproc/proc_bkpt.c Sat Aug 9 15:00:03 2014 (r269754) @@ -55,13 +55,6 @@ __FBSDID("$FreeBSD$"); #error "Add support for your architecture" #endif -static void -proc_cont(struct proc_handle *phdl) -{ - - ptrace(PT_CONTINUE, proc_getpid(phdl), (caddr_t)1, 0); -} - static int proc_stop(struct proc_handle *phdl) { @@ -87,7 +80,7 @@ proc_bkptset(struct proc_handle *phdl, u { struct ptrace_io_desc piod; unsigned long paddr, caddr; - int ret = 0; + int ret = 0, stopped; *saved = 0; if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD || @@ -98,9 +91,12 @@ proc_bkptset(struct proc_handle *phdl, u DPRINTFX("adding breakpoint at 0x%lx", address); - if (phdl->status != PS_STOP) + stopped = 0; + if (phdl->status != PS_STOP) { if (proc_stop(phdl) != 0) return (-1); + stopped = 1; + } /* * Read the original instruction. @@ -135,9 +131,9 @@ proc_bkptset(struct proc_handle *phdl, u } done: - if (phdl->status != PS_STOP) + if (stopped) /* Restart the process if we had to stop it. */ - proc_cont(phdl); + proc_continue(phdl); return (ret); } @@ -148,7 +144,7 @@ proc_bkptdel(struct proc_handle *phdl, u { struct ptrace_io_desc piod; unsigned long paddr, caddr; - int ret = 0; + int ret = 0, stopped; if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD || phdl->status == PS_IDLE) { @@ -158,9 +154,12 @@ proc_bkptdel(struct proc_handle *phdl, u DPRINTFX("removing breakpoint at 0x%lx", address); - if (phdl->status != PS_STOP) + stopped = 0; + if (phdl->status != PS_STOP) { if (proc_stop(phdl) != 0) return (-1); + stopped = 1; + } /* * Overwrite the breakpoint instruction that we setup previously. @@ -177,9 +176,9 @@ proc_bkptdel(struct proc_handle *phdl, u ret = -1; } - if (phdl->status != PS_STOP) + if (stopped) /* Restart the process if we had to stop it. */ - proc_cont(phdl); + proc_continue(phdl); return (ret); } Modified: stable/10/lib/libproc/proc_util.c ============================================================================== --- stable/10/lib/libproc/proc_util.c Sat Aug 9 14:33:44 2014 (r269753) +++ stable/10/lib/libproc/proc_util.c Sat Aug 9 15:00:03 2014 (r269754) @@ -35,10 +35,9 @@ #include #include #include -#include -#include #include #include +#include #include "_libproc.h" int @@ -59,11 +58,14 @@ proc_clearflags(struct proc_handle *phdl int proc_continue(struct proc_handle *phdl) { + int pending = 0; if (phdl == NULL) return (-1); - if (ptrace(PT_CONTINUE, phdl->pid, (caddr_t)(uintptr_t) 1, 0) != 0) + if (phdl->status == PS_STOP && WSTOPSIG(phdl->wstat) != SIGTRAP) + pending = WSTOPSIG(phdl->wstat); + if (ptrace(PT_CONTINUE, phdl->pid, (caddr_t)(uintptr_t)1, pending) != 0) return (-1); phdl->status = PS_RUN; @@ -208,12 +210,16 @@ proc_getlwpstatus(struct proc_handle *ph return (NULL); siginfo = &lwpinfo.pl_siginfo; if (lwpinfo.pl_event == PL_EVENT_SIGNAL && - (lwpinfo.pl_flags & PL_FLAG_SI) && - siginfo->si_signo == SIGTRAP && - (siginfo->si_code == TRAP_BRKPT || - siginfo->si_code == TRAP_TRACE)) { - psp->pr_why = PR_FAULTED; - psp->pr_what = FLTBPT; + (lwpinfo.pl_flags & PL_FLAG_SI) != 0) { + if (siginfo->si_signo == SIGTRAP && + (siginfo->si_code == TRAP_BRKPT || + siginfo->si_code == TRAP_TRACE)) { + psp->pr_why = PR_FAULTED; + psp->pr_what = FLTBPT; + } else { + psp->pr_why = PR_SIGNALLED; + psp->pr_what = siginfo->si_signo; + } } else if (lwpinfo.pl_flags & PL_FLAG_SCE) { psp->pr_why = PR_SYSENTRY; } else if (lwpinfo.pl_flags & PL_FLAG_SCX) { From markj at FreeBSD.org Sat Aug 9 15:00:06 2014 From: markj at FreeBSD.org (Mark Johnston) Date: Sat, 9 Aug 2014 15:00:05 +0000 (UTC) Subject: svn commit: r269755 - stable/9/lib/libproc Message-ID: <53e63776.205c.3b274869@svn.freebsd.org> Author: markj Date: Sat Aug 9 15:00:05 2014 New Revision: 269755 URL: http://svnweb.freebsd.org/changeset/base/269755 Log: MFC r265308: If the traced process stops because it received a signal, libproc needs to ensure that the signal is forwarded when proc_continue() is called. Modified: stable/9/lib/libproc/libproc.h stable/9/lib/libproc/proc_bkpt.c stable/9/lib/libproc/proc_util.c Directory Properties: stable/9/lib/libproc/ (props changed) Modified: stable/9/lib/libproc/libproc.h ============================================================================== --- stable/9/lib/libproc/libproc.h Sat Aug 9 15:00:03 2014 (r269754) +++ stable/9/lib/libproc/libproc.h Sat Aug 9 15:00:05 2014 (r269755) @@ -102,6 +102,7 @@ typedef struct lwpstatus { #define PR_FAULTED 2 #define PR_SYSENTRY 3 #define PR_SYSEXIT 4 +#define PR_SIGNALLED 5 int pr_what; #define FLTBPT -1 } lwpstatus_t; Modified: stable/9/lib/libproc/proc_bkpt.c ============================================================================== --- stable/9/lib/libproc/proc_bkpt.c Sat Aug 9 15:00:03 2014 (r269754) +++ stable/9/lib/libproc/proc_bkpt.c Sat Aug 9 15:00:05 2014 (r269755) @@ -49,13 +49,6 @@ __FBSDID("$FreeBSD$"); #error "Add support for your architecture" #endif -static void -proc_cont(struct proc_handle *phdl) -{ - - ptrace(PT_CONTINUE, proc_getpid(phdl), (caddr_t)1, 0); -} - static int proc_stop(struct proc_handle *phdl) { @@ -81,7 +74,7 @@ proc_bkptset(struct proc_handle *phdl, u { struct ptrace_io_desc piod; unsigned long paddr, caddr; - int ret = 0; + int ret = 0, stopped; *saved = 0; if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD || @@ -92,9 +85,12 @@ proc_bkptset(struct proc_handle *phdl, u DPRINTFX("adding breakpoint at 0x%lx", address); - if (phdl->status != PS_STOP) + stopped = 0; + if (phdl->status != PS_STOP) { if (proc_stop(phdl) != 0) return (-1); + stopped = 1; + } /* * Read the original instruction. @@ -129,9 +125,9 @@ proc_bkptset(struct proc_handle *phdl, u } done: - if (phdl->status != PS_STOP) + if (stopped) /* Restart the process if we had to stop it. */ - proc_cont(phdl); + proc_continue(phdl); return (ret); } @@ -142,7 +138,7 @@ proc_bkptdel(struct proc_handle *phdl, u { struct ptrace_io_desc piod; unsigned long paddr, caddr; - int ret = 0; + int ret = 0, stopped; if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD || phdl->status == PS_IDLE) { @@ -152,9 +148,12 @@ proc_bkptdel(struct proc_handle *phdl, u DPRINTFX("removing breakpoint at 0x%lx", address); - if (phdl->status != PS_STOP) + stopped = 0; + if (phdl->status != PS_STOP) { if (proc_stop(phdl) != 0) return (-1); + stopped = 1; + } /* * Overwrite the breakpoint instruction that we setup previously. @@ -171,9 +170,9 @@ proc_bkptdel(struct proc_handle *phdl, u ret = -1; } - if (phdl->status != PS_STOP) + if (stopped) /* Restart the process if we had to stop it. */ - proc_cont(phdl); + proc_continue(phdl); return (ret); } Modified: stable/9/lib/libproc/proc_util.c ============================================================================== --- stable/9/lib/libproc/proc_util.c Sat Aug 9 15:00:03 2014 (r269754) +++ stable/9/lib/libproc/proc_util.c Sat Aug 9 15:00:05 2014 (r269755) @@ -35,10 +35,9 @@ #include #include #include -#include -#include #include #include +#include #include "_libproc.h" int @@ -59,11 +58,14 @@ proc_clearflags(struct proc_handle *phdl int proc_continue(struct proc_handle *phdl) { + int pending = 0; if (phdl == NULL) return (-1); - if (ptrace(PT_CONTINUE, phdl->pid, (caddr_t)(uintptr_t) 1, 0) != 0) + if (phdl->status == PS_STOP && WSTOPSIG(phdl->wstat) != SIGTRAP) + pending = WSTOPSIG(phdl->wstat); + if (ptrace(PT_CONTINUE, phdl->pid, (caddr_t)(uintptr_t)1, pending) != 0) return (-1); phdl->status = PS_RUN; @@ -208,12 +210,16 @@ proc_getlwpstatus(struct proc_handle *ph return (NULL); siginfo = &lwpinfo.pl_siginfo; if (lwpinfo.pl_event == PL_EVENT_SIGNAL && - (lwpinfo.pl_flags & PL_FLAG_SI) && - siginfo->si_signo == SIGTRAP && - (siginfo->si_code == TRAP_BRKPT || - siginfo->si_code == TRAP_TRACE)) { - psp->pr_why = PR_FAULTED; - psp->pr_what = FLTBPT; + (lwpinfo.pl_flags & PL_FLAG_SI) != 0) { + if (siginfo->si_signo == SIGTRAP && + (siginfo->si_code == TRAP_BRKPT || + siginfo->si_code == TRAP_TRACE)) { + psp->pr_why = PR_FAULTED; + psp->pr_what = FLTBPT; + } else { + psp->pr_why = PR_SIGNALLED; + psp->pr_what = siginfo->si_signo; + } } else if (lwpinfo.pl_flags & PL_FLAG_SCE) { psp->pr_why = PR_SYSENTRY; } else if (lwpinfo.pl_flags & PL_FLAG_SCX) { From markj at FreeBSD.org Sat Aug 9 15:03:48 2014 From: markj at FreeBSD.org (Mark Johnston) Date: Sat, 9 Aug 2014 15:03:48 +0000 (UTC) Subject: svn commit: r269756 - in stable/10/sys/cddl/contrib/opensolaris/uts: intel/dtrace powerpc/dtrace Message-ID: <53e63854.245d.5cef5d2a@svn.freebsd.org> Author: markj Date: Sat Aug 9 15:03:47 2014 New Revision: 269756 URL: http://svnweb.freebsd.org/changeset/base/269756 Log: MFC r259211: Correct the check for errors from proc_rwmem(). Modified: stable/10/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c stable/10/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Sat Aug 9 15:00:05 2014 (r269755) +++ stable/10/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Sat Aug 9 15:03:47 2014 (r269756) @@ -75,7 +75,7 @@ proc_ops(int op, proc_t *p, void *kaddr, uio.uio_td = curthread; uio.uio_rw = op; PHOLD(p); - if (proc_rwmem(p, &uio) < 0) { + if (proc_rwmem(p, &uio) != 0) { PRELE(p); return (-1); } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c Sat Aug 9 15:00:05 2014 (r269755) +++ stable/10/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c Sat Aug 9 15:03:47 2014 (r269756) @@ -60,7 +60,7 @@ proc_ops(int op, proc_t *p, void *kaddr, uio.uio_td = curthread; uio.uio_rw = op; PHOLD(p); - if (proc_rwmem(p, &uio) < 0) { + if (proc_rwmem(p, &uio) != 0) { PRELE(p); return (-1); } From markj at FreeBSD.org Sat Aug 9 15:03:57 2014 From: markj at FreeBSD.org (Mark Johnston) Date: Sat, 9 Aug 2014 15:03:57 +0000 (UTC) Subject: svn commit: r269757 - stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace Message-ID: <53e6385d.249a.7aa58f91@svn.freebsd.org> Author: markj Date: Sat Aug 9 15:03:56 2014 New Revision: 269757 URL: http://svnweb.freebsd.org/changeset/base/269757 Log: MFC r259211: Correct the check for errors from proc_rwmem(). Modified: stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Directory Properties: stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Sat Aug 9 15:03:47 2014 (r269756) +++ stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Sat Aug 9 15:03:56 2014 (r269757) @@ -75,7 +75,7 @@ proc_ops(int op, proc_t *p, void *kaddr, uio.uio_td = curthread; uio.uio_rw = op; PHOLD(p); - if (proc_rwmem(p, &uio) < 0) { + if (proc_rwmem(p, &uio) != 0) { PRELE(p); return (-1); } From delphij at FreeBSD.org Sun Aug 10 05:58:43 2014 From: delphij at FreeBSD.org (Xin LI) Date: Sun, 10 Aug 2014 05:58:42 +0000 (UTC) Subject: svn commit: r269773 - in stable/10: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/common/zfs sys/cddl/c... Message-ID: <53e70a12.2f21.44896eca@svn.freebsd.org> Author: delphij Date: Sun Aug 10 05:58:41 2014 New Revision: 269773 URL: http://svnweb.freebsd.org/changeset/base/269773 Log: MFC r269118: MFV r269010: Import Illumos changes to address the following Illumos issues: 4976 zfs should only avoid writing to a failing non-redundant top-level vdev 4978 ztest fails in get_metaslab_refcount() 4979 extend free space histogram to device and pool 4980 metaslabs should have a fragmentation metric 4981 remove fragmented ops vector from block allocator 4982 space_map object should proactively upgrade when feature is enabled 4984 device selection should use fragmentation metric Modified: stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.8 stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool.8 stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c stable/10/sys/cddl/contrib/opensolaris/common/zfs/zpool_prop.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/space_map.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_debug.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.8 ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.8 Sun Aug 10 03:09:35 2014 (r269772) +++ stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.8 Sun Aug 10 05:58:41 2014 (r269773) @@ -19,7 +19,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 1, 2014 +.Dd July 26, 2014 .Dt ZDB 8 .Os .Sh NAME @@ -27,11 +27,11 @@ .Nd Display zpool debugging and consistency information .Sh SYNOPSIS .Nm -.Op Fl CumdibcsDvhLXFPA +.Op Fl CumdibcsDvhLMXFPA .Op Fl e Op Fl p Ar path... .Op Fl t Ar txg .Op Fl U Ar cache -.Op Fl M Ar inflight I/Os +.Op Fl I Ar inflight I/Os .Op Fl x Ar dumpdir .Ar poolname .Op Ar object ... @@ -42,7 +42,7 @@ .Ar dataset .Op Ar object ... .Nm -.Fl m Op Fl LXFPA +.Fl m Op Fl MLXFPA .Op Fl t Ar txg .Op Fl e Op Fl p Ar path... .Op Fl U Ar cache @@ -155,6 +155,13 @@ By default, verifies that all non-free blocks are referenced, which can be very expensive. .It Fl m Display the offset, spacemap, and free space of each metaslab. +When specified twice, also display information about the on-disk free +space histogram associated with each metaslab. When specified three time, +display the maximum contiguous free space, the in-core free space histogram, +and the percentage of free space in each space map. When specified +four times display every spacemap record. +.It Fl M +Display the offset, spacemap, and free space of each metaslab. When specified twice, also display information about the maximum contiguous free space and the percentage of free space in each space map. When specified three times display every spacemap record. @@ -229,7 +236,7 @@ all metadata on the pool. .It Fl F Attempt to make an unreadable pool readable by trying progressively older transactions. -.It Fl M Ar inflight I/Os +.It Fl I Ar inflight I/Os Limit the number of outstanding checksum I/Os to the specified value. The default value is 200. This option affects the performance of the .Fl c Modified: stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c Sun Aug 10 03:09:35 2014 (r269772) +++ stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c Sun Aug 10 05:58:41 2014 (r269773) @@ -111,11 +111,11 @@ static void usage(void) { (void) fprintf(stderr, - "Usage: %s [-CumdibcsDvhLXFPA] [-t txg] [-e [-p path...]] " - "[-U config] [-M inflight I/Os] [-x dumpdir] poolname [object...]\n" + "Usage: %s [-CumMdibcsDvhLXFPA] [-t txg] [-e [-p path...]] " + "[-U config] [-I inflight I/Os] [-x dumpdir] poolname [object...]\n" " %s [-divPA] [-e -p path...] [-U config] dataset " "[object...]\n" - " %s -m [-LXFPA] [-t txg] [-e [-p path...]] [-U config] " + " %s -mM [-LXFPA] [-t txg] [-e [-p path...]] [-U config] " "poolname [vdev [metaslab...]]\n" " %s -R [-A] [-e [-p path...]] poolname " "vdev:offset:size[:flags]\n" @@ -138,6 +138,7 @@ usage(void) (void) fprintf(stderr, " -h pool history\n"); (void) fprintf(stderr, " -b block statistics\n"); (void) fprintf(stderr, " -m metaslabs\n"); + (void) fprintf(stderr, " -M metaslab groups\n"); (void) fprintf(stderr, " -c checksum all metadata (twice for " "all data) blocks\n"); (void) fprintf(stderr, " -s report stats on zdb's I/O\n"); @@ -168,7 +169,7 @@ usage(void) (void) fprintf(stderr, " -P print numbers in parseable form\n"); (void) fprintf(stderr, " -t -- highest txg to use when " "searching for uberblocks\n"); - (void) fprintf(stderr, " -M -- " + (void) fprintf(stderr, " -I -- " "specify the maximum number of " "checksumming I/Os [default is 200]\n"); (void) fprintf(stderr, "Specify an option more than once (e.g. -bb) " @@ -548,7 +549,7 @@ get_metaslab_refcount(vdev_t *vd) { int refcount = 0; - if (vd->vdev_top == vd) { + if (vd->vdev_top == vd && !vd->vdev_removing) { for (int m = 0; m < vd->vdev_ms_count; m++) { space_map_t *sm = vd->vdev_ms[m]->ms_sm; @@ -686,9 +687,10 @@ dump_metaslab(metaslab_t *msp) * The space map histogram represents free space in chunks * of sm_shift (i.e. bucket 0 refers to 2^sm_shift). */ - (void) printf("\tOn-disk histogram:\n"); + (void) printf("\tOn-disk histogram:\t\tfragmentation %llu\n", + (u_longlong_t)msp->ms_fragmentation); dump_histogram(sm->sm_phys->smp_histogram, - SPACE_MAP_HISTOGRAM_SIZE(sm), sm->sm_shift); + SPACE_MAP_HISTOGRAM_SIZE, sm->sm_shift); } if (dump_opt['d'] > 5 || dump_opt['m'] > 3) { @@ -713,6 +715,47 @@ print_vdev_metaslab_header(vdev_t *vd) } static void +dump_metaslab_groups(spa_t *spa) +{ + vdev_t *rvd = spa->spa_root_vdev; + metaslab_class_t *mc = spa_normal_class(spa); + uint64_t fragmentation; + + metaslab_class_histogram_verify(mc); + + for (int c = 0; c < rvd->vdev_children; c++) { + vdev_t *tvd = rvd->vdev_child[c]; + metaslab_group_t *mg = tvd->vdev_mg; + + if (mg->mg_class != mc) + continue; + + metaslab_group_histogram_verify(mg); + mg->mg_fragmentation = metaslab_group_fragmentation(mg); + + (void) printf("\tvdev %10llu\t\tmetaslabs%5llu\t\t" + "fragmentation", + (u_longlong_t)tvd->vdev_id, + (u_longlong_t)tvd->vdev_ms_count); + if (mg->mg_fragmentation == ZFS_FRAG_INVALID) { + (void) printf("%3s\n", "-"); + } else { + (void) printf("%3llu%%\n", + (u_longlong_t)mg->mg_fragmentation); + } + dump_histogram(mg->mg_histogram, RANGE_TREE_HISTOGRAM_SIZE, 0); + } + + (void) printf("\tpool %s\tfragmentation", spa_name(spa)); + fragmentation = metaslab_class_fragmentation(mc); + if (fragmentation == ZFS_FRAG_INVALID) + (void) printf("\t%3s\n", "-"); + else + (void) printf("\t%3llu%%\n", (u_longlong_t)fragmentation); + dump_histogram(mc->mc_histogram, RANGE_TREE_HISTOGRAM_SIZE, 0); +} + +static void dump_metaslabs(spa_t *spa) { vdev_t *vd, *rvd = spa->spa_root_vdev; @@ -2369,8 +2412,7 @@ zdb_leak(void *arg, uint64_t start, uint } static metaslab_ops_t zdb_metaslab_ops = { - NULL, /* alloc */ - NULL /* fragmented */ + NULL /* alloc */ }; static void @@ -2865,6 +2907,8 @@ dump_zpool(spa_t *spa) if (dump_opt['d'] > 2 || dump_opt['m']) dump_metaslabs(spa); + if (dump_opt['M']) + dump_metaslab_groups(spa); if (dump_opt['d'] || dump_opt['i']) { dump_dir(dp->dp_meta_objset); @@ -3360,7 +3404,7 @@ main(int argc, char **argv) dprintf_setup(&argc, argv); while ((c = getopt(argc, argv, - "bcdhilmM:suCDRSAFLXx:evp:t:U:P")) != -1) { + "bcdhilmMI:suCDRSAFLXx:evp:t:U:P")) != -1) { switch (c) { case 'b': case 'c': @@ -3373,6 +3417,7 @@ main(int argc, char **argv) case 'u': case 'C': case 'D': + case 'M': case 'R': case 'S': dump_opt[c]++; @@ -3386,10 +3431,7 @@ main(int argc, char **argv) case 'P': dump_opt[c]++; break; - case 'v': - verbose++; - break; - case 'M': + case 'I': max_inflight = strtoull(optarg, NULL, 0); if (max_inflight == 0) { (void) fprintf(stderr, "maximum number " @@ -3413,9 +3455,6 @@ main(int argc, char **argv) } searchdirs[nsearch++] = optarg; break; - case 'x': - vn_dumpdir = optarg; - break; case 't': max_txg = strtoull(optarg, NULL, 0); if (max_txg < TXG_INITIAL) { @@ -3427,6 +3466,12 @@ main(int argc, char **argv) case 'U': spa_config_path = optarg; break; + case 'v': + verbose++; + break; + case 'x': + vn_dumpdir = optarg; + break; default: usage(); break; Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool.8 ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Sun Aug 10 03:09:35 2014 (r269772) +++ stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Sun Aug 10 05:58:41 2014 (r269773) @@ -21,12 +21,12 @@ .\" Copyright (c) 2010, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright 2011, Nexenta Systems, Inc. All Rights Reserved. .\" Copyright (c) 2011, Justin T. Gibbs -.\" Copyright (c) 2012 by Delphix. All Rights Reserved. +.\" Copyright (c) 2013 by Delphix. All Rights Reserved. .\" Copyright (c) 2012, Glen Barber .\" .\" $FreeBSD$ .\" -.Dd July 25, 2014 +.Dd July 26, 2014 .Dt ZPOOL 8 .Os .Sh NAME @@ -543,6 +543,15 @@ For example, a value of 1.76 indicates that 1.76 units of data were stored but only 1 unit of disk space was actually consumed. See .Xr zfs 8 for a description of the deduplication feature. +.It Sy expandsize +Amount of uninitialized space within the pool or device that can be used to +increase the total capacity of the pool. +Uninitialized space consists of +any space on an EFI labeled vdev which has not been brought online +.Pq i.e. zpool online -e . +This space occurs when a LUN is dynamically expanded. +.It Sy fragmentation +The amount of fragmentation in the pool. .It Sy free Number of blocks within the pool that are not allocated. .It Sy freeing @@ -555,13 +564,6 @@ Over time will decrease while .Sy free increases. -.It Sy expandsize -Amount of uninitialized space within the pool or device that can be used to -increase the total capacity of the pool. -Uninitialized space consists of -any space on an EFI labeled vdev which has not been brought online -.Pq i.e. zpool online -e . -This space occurs when a LUN is dynamically expanded. .It Sy guid A unique identifier for the pool. .It Sy health @@ -1408,6 +1410,7 @@ section for a list of valid properties. .Sy size , .Sy used , .Sy available , +.Sy fragmentation , .Sy expandsize , .Sy capacity , .Sy health , @@ -1794,9 +1797,9 @@ is immediately available to any datasets The following command lists all available pools on the system. .Bd -literal -offset 2n .Li # Ic zpool list -NAME SIZE ALLOC FREE EXPANDSZ CAP DEDUP HEALTH ALTROOT -pool 2.70T 473G 2.24T - 17% 1.00x ONLINE - -test 1.98G 89.5K 1.98G - 0% 1.00x ONLINE - +NAME SIZE ALLOC FREE FRAG EXPANDSZ CAP DEDUP HEALTH ALTROOT +pool 2.70T 473G 2.24T 33% - 17% 1.00x ONLINE - +test 1.98G 89.5K 1.98G 48% - 0% 1.00x ONLINE - .Ed .It Sy Example 7 No Listing All Properties for a Pool .Pp @@ -1924,7 +1927,35 @@ subcommand as follows: .Bd -literal -offset 2n .Li # Ic zpool iostat -v pool 5 .Ed -.It Sy Example 15 No Removing a Mirrored Log Device +.It Xo +.Sy Example 15 +Displaying expanded space on a device +.Xc +.Pp +The following command dipslays the detailed information for the +.Em data +pool. +This pool is comprised of a single +.Em raidz +vdev where one of its +devices increased its capacity by 10GB. +In this example, the pool will not +be able to utilized this extra capacity until all the devices under the +.Em raidz +vdev have been expanded. +.Bd -literal -offset 2n +.Li # Ic zpool list -v data +NAME SIZE ALLOC FREE FRAG EXPANDSZ CAP DEDUP HEALTH ALTROOT +data 23.9G 14.6G 9.30G 48% - 61% 1.00x ONLINE - + raidz1 23.9G 14.6G 9.30G 48% - + ada0 - - - - - + ada1 - - - - 10G + ada2 - - - - - +.Ed +.It Xo +.Sy Example 16 +Removing a Mirrored Log Device +.Xc .Pp The following command removes the mirrored log device .Em mirror-2 . @@ -1956,7 +1987,12 @@ is: .Bd -literal -offset 2n .Li # Ic zpool remove tank mirror-2 .Ed -.It Sy Example 16 No Recovering a Faulted Tn ZFS No Pool +.It Xo +.Sy Example 17 +Recovering a Faulted +.Tn ZFS +Pool +.Xc .Pp If a pool is faulted but recoverable, a message indicating this state is provided by Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Sun Aug 10 03:09:35 2014 (r269772) +++ stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Sun Aug 10 05:58:41 2014 (r269773) @@ -2900,10 +2900,15 @@ print_one_column(zpool_prop_t prop, uint boolean_t fixed; size_t width = zprop_width(prop, &fixed, ZFS_TYPE_POOL); - zfs_nicenum(value, propval, sizeof (propval)); if (prop == ZPOOL_PROP_EXPANDSZ && value == 0) (void) strlcpy(propval, "-", sizeof (propval)); + else if (prop == ZPOOL_PROP_FRAGMENTATION && value == ZFS_FRAG_INVALID) + (void) strlcpy(propval, "-", sizeof (propval)); + else if (prop == ZPOOL_PROP_FRAGMENTATION) + (void) snprintf(propval, sizeof (propval), "%llu%%", value); + else + zfs_nicenum(value, propval, sizeof (propval)); if (scripted) (void) printf("\t%s", propval); @@ -2936,9 +2941,9 @@ print_list_stats(zpool_handle_t *zhp, co /* only toplevel vdevs have capacity stats */ if (vs->vs_space == 0) { if (scripted) - (void) printf("\t-\t-\t-"); + (void) printf("\t-\t-\t-\t-"); else - (void) printf(" - - -"); + (void) printf(" - - - -"); } else { print_one_column(ZPOOL_PROP_SIZE, vs->vs_space, scripted); @@ -2946,6 +2951,8 @@ print_list_stats(zpool_handle_t *zhp, co scripted); print_one_column(ZPOOL_PROP_FREE, vs->vs_space - vs->vs_alloc, scripted); + print_one_column(ZPOOL_PROP_FRAGMENTATION, + vs->vs_fragmentation, scripted); } print_one_column(ZPOOL_PROP_EXPANDSZ, vs->vs_esize, scripted); @@ -3031,8 +3038,8 @@ zpool_do_list(int argc, char **argv) int ret; list_cbdata_t cb = { 0 }; static char default_props[] = - "name,size,allocated,free,expandsize,capacity,dedupratio," - "health,altroot"; + "name,size,allocated,free,fragmentation,expandsize,capacity," + "dedupratio,health,altroot"; char *props = default_props; unsigned long interval = 0, count = 0; zpool_list_t *list; Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Sun Aug 10 03:09:35 2014 (r269772) +++ stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Sun Aug 10 05:58:41 2014 (r269773) @@ -322,6 +322,14 @@ zpool_get_prop(zpool_handle_t *zhp, zpoo (u_longlong_t)intval); } break; + case ZPOOL_PROP_FRAGMENTATION: + if (intval == UINT64_MAX) { + (void) strlcpy(buf, "-", len); + } else { + (void) snprintf(buf, len, "%llu%%", + (u_longlong_t)intval); + } + break; case ZPOOL_PROP_DEDUPRATIO: (void) snprintf(buf, len, "%llu.%02llux", Modified: stable/10/sys/cddl/contrib/opensolaris/common/zfs/zpool_prop.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/common/zfs/zpool_prop.c Sun Aug 10 03:09:35 2014 (r269772) +++ stable/10/sys/cddl/contrib/opensolaris/common/zfs/zpool_prop.c Sun Aug 10 05:58:41 2014 (r269773) @@ -21,7 +21,7 @@ /* * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. */ #include @@ -87,6 +87,8 @@ zpool_prop_init(void) PROP_READONLY, ZFS_TYPE_POOL, "", "ALLOC"); zprop_register_number(ZPOOL_PROP_EXPANDSZ, "expandsize", 0, PROP_READONLY, ZFS_TYPE_POOL, "", "EXPANDSZ"); + zprop_register_number(ZPOOL_PROP_FRAGMENTATION, "fragmentation", 0, + PROP_READONLY, ZFS_TYPE_POOL, "", "FRAG"); zprop_register_number(ZPOOL_PROP_CAPACITY, "capacity", 0, PROP_READONLY, ZFS_TYPE_POOL, "", "CAP"); zprop_register_number(ZPOOL_PROP_GUID, "guid", 0, PROP_READONLY, Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Sun Aug 10 03:09:35 2014 (r269772) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Sun Aug 10 05:58:41 2014 (r269773) @@ -32,6 +32,7 @@ #include #include #include +#include SYSCTL_DECL(_vfs_zfs); SYSCTL_NODE(_vfs_zfs, OID_AUTO, metaslab, CTLFLAG_RW, 0, "ZFS metaslab"); @@ -91,7 +92,7 @@ int zfs_metaslab_condense_block_threshol /* * The zfs_mg_noalloc_threshold defines which metaslab groups should * be eligible for allocation. The value is defined as a percentage of - * a free space. Metaslab groups that have more free space than + * free space. Metaslab groups that have more free space than * zfs_mg_noalloc_threshold are always eligible for allocations. Once * a metaslab group's free space is less than or equal to the * zfs_mg_noalloc_threshold the allocator will avoid allocating to that @@ -109,6 +110,23 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, mg_noallo " to make it eligible for allocation"); /* + * Metaslab groups are considered eligible for allocations if their + * fragmenation metric (measured as a percentage) is less than or equal to + * zfs_mg_fragmentation_threshold. If a metaslab group exceeds this threshold + * then it will be skipped unless all metaslab groups within the metaslab + * class have also crossed this threshold. + */ +int zfs_mg_fragmentation_threshold = 85; + +/* + * Allow metaslabs to keep their active state as long as their fragmentation + * percentage is less than or equal to zfs_metaslab_fragmentation_threshold. An + * active metaslab that exceeds this threshold will no longer keep its active + * status allowing better metaslabs to be selected. + */ +int zfs_metaslab_fragmentation_threshold = 70; + +/* * When set will load all metaslabs when pool is first opened. */ int metaslab_debug_load = 0; @@ -183,14 +201,6 @@ SYSCTL_INT(_vfs_zfs_metaslab, OID_AUTO, "Number of TXGs that an unused metaslab can be kept in memory"); /* - * Should we be willing to write data to degraded vdevs? - */ -boolean_t zfs_write_to_degraded = B_FALSE; -SYSCTL_INT(_vfs_zfs, OID_AUTO, write_to_degraded, CTLFLAG_RWTUN, - &zfs_write_to_degraded, 0, "Allow writing data to degraded vdevs"); -TUNABLE_INT("vfs.zfs.write_to_degraded", &zfs_write_to_degraded); - -/* * Max number of metaslabs per group to preload. */ int metaslab_preload_limit = SPA_DVAS_PER_BP; @@ -209,15 +219,36 @@ SYSCTL_INT(_vfs_zfs_metaslab, OID_AUTO, "Max number of metaslabs per group to preload"); /* - * Enable/disable additional weight factor for each metaslab. + * Enable/disable fragmentation weighting on metaslabs. + */ +boolean_t metaslab_fragmentation_factor_enabled = B_TRUE; +TUNABLE_INT("vfs.zfs.metaslab_fragmentation_factor_enabled", + &metaslab_fragmentation_factor_enabled); +SYSCTL_INT(_vfs_zfs_metaslab, OID_AUTO, fragmentation_factor_enabled, CTLFLAG_RWTUN, + &metaslab_fragmentation_factor_enabled, 0, + "Enable fragmentation weighting on metaslabs"); + +/* + * Enable/disable lba weighting (i.e. outer tracks are given preference). + */ +boolean_t metaslab_lba_weighting_enabled = B_TRUE; +TUNABLE_INT("vfs.zfs.metaslab.lba_weighting_enabled", + &metaslab_lba_weighting_enabled); +SYSCTL_INT(_vfs_zfs_metaslab, OID_AUTO, lba_weighting_enabled, CTLFLAG_RWTUN, + &metaslab_lba_weighting_enabled, 0, + "Enable LBA weighting (i.e. outer tracks are given preference)"); + +/* + * Enable/disable metaslab group biasing. */ -boolean_t metaslab_weight_factor_enable = B_FALSE; -TUNABLE_INT("vfs.zfs.metaslab.weight_factor_enable", - &metaslab_weight_factor_enable); -SYSCTL_INT(_vfs_zfs_metaslab, OID_AUTO, weight_factor_enable, CTLFLAG_RWTUN, - &metaslab_weight_factor_enable, 0, - "Enable additional weight factor for each metaslab"); +boolean_t metaslab_bias_enabled = B_TRUE; +TUNABLE_INT("vfs.zfs.metaslab.bias_enabled", + &metaslab_bias_enabled); +SYSCTL_INT(_vfs_zfs_metaslab, OID_AUTO, bias_enabled, CTLFLAG_RWTUN, + &metaslab_bias_enabled, 0, + "Enable metaslab group biasing"); +static uint64_t metaslab_fragmentation(metaslab_t *); /* * ========================================================================== @@ -337,6 +368,121 @@ metaslab_class_get_minblocksize(metaslab return (mc->mc_minblocksize); } +void +metaslab_class_histogram_verify(metaslab_class_t *mc) +{ + vdev_t *rvd = mc->mc_spa->spa_root_vdev; + uint64_t *mc_hist; + int i; + + if ((zfs_flags & ZFS_DEBUG_HISTOGRAM_VERIFY) == 0) + return; + + mc_hist = kmem_zalloc(sizeof (uint64_t) * RANGE_TREE_HISTOGRAM_SIZE, + KM_SLEEP); + + for (int c = 0; c < rvd->vdev_children; c++) { + vdev_t *tvd = rvd->vdev_child[c]; + metaslab_group_t *mg = tvd->vdev_mg; + + /* + * Skip any holes, uninitialized top-levels, or + * vdevs that are not in this metalab class. + */ + if (tvd->vdev_ishole || tvd->vdev_ms_shift == 0 || + mg->mg_class != mc) { + continue; + } + + for (i = 0; i < RANGE_TREE_HISTOGRAM_SIZE; i++) + mc_hist[i] += mg->mg_histogram[i]; + } + + for (i = 0; i < RANGE_TREE_HISTOGRAM_SIZE; i++) + VERIFY3U(mc_hist[i], ==, mc->mc_histogram[i]); + + kmem_free(mc_hist, sizeof (uint64_t) * RANGE_TREE_HISTOGRAM_SIZE); +} + +/* + * Calculate the metaslab class's fragmentation metric. The metric + * is weighted based on the space contribution of each metaslab group. + * The return value will be a number between 0 and 100 (inclusive), or + * ZFS_FRAG_INVALID if the metric has not been set. See comment above the + * zfs_frag_table for more information about the metric. + */ +uint64_t +metaslab_class_fragmentation(metaslab_class_t *mc) +{ + vdev_t *rvd = mc->mc_spa->spa_root_vdev; + uint64_t fragmentation = 0; + + spa_config_enter(mc->mc_spa, SCL_VDEV, FTAG, RW_READER); + + for (int c = 0; c < rvd->vdev_children; c++) { + vdev_t *tvd = rvd->vdev_child[c]; + metaslab_group_t *mg = tvd->vdev_mg; + + /* + * Skip any holes, uninitialized top-levels, or + * vdevs that are not in this metalab class. + */ + if (tvd->vdev_ishole || tvd->vdev_ms_shift == 0 || + mg->mg_class != mc) { + continue; + } + + /* + * If a metaslab group does not contain a fragmentation + * metric then just bail out. + */ + if (mg->mg_fragmentation == ZFS_FRAG_INVALID) { + spa_config_exit(mc->mc_spa, SCL_VDEV, FTAG); + return (ZFS_FRAG_INVALID); + } + + /* + * Determine how much this metaslab_group is contributing + * to the overall pool fragmentation metric. + */ + fragmentation += mg->mg_fragmentation * + metaslab_group_get_space(mg); + } + fragmentation /= metaslab_class_get_space(mc); + + ASSERT3U(fragmentation, <=, 100); + spa_config_exit(mc->mc_spa, SCL_VDEV, FTAG); + return (fragmentation); +} + +/* + * Calculate the amount of expandable space that is available in + * this metaslab class. If a device is expanded then its expandable + * space will be the amount of allocatable space that is currently not + * part of this metaslab class. + */ +uint64_t +metaslab_class_expandable_space(metaslab_class_t *mc) +{ + vdev_t *rvd = mc->mc_spa->spa_root_vdev; + uint64_t space = 0; + + spa_config_enter(mc->mc_spa, SCL_VDEV, FTAG, RW_READER); + for (int c = 0; c < rvd->vdev_children; c++) { + vdev_t *tvd = rvd->vdev_child[c]; + metaslab_group_t *mg = tvd->vdev_mg; + + if (tvd->vdev_ishole || tvd->vdev_ms_shift == 0 || + mg->mg_class != mc) { + continue; + } + + space += tvd->vdev_max_asize - tvd->vdev_asize; + } + spa_config_exit(mc->mc_spa, SCL_VDEV, FTAG); + return (space); +} + /* * ========================================================================== * Metaslab groups @@ -389,7 +535,15 @@ metaslab_group_alloc_update(metaslab_gro mg->mg_free_capacity = ((vs->vs_space - vs->vs_alloc) * 100) / (vs->vs_space + 1); - mg->mg_allocatable = (mg->mg_free_capacity > zfs_mg_noalloc_threshold); + /* + * A metaslab group is considered allocatable if it has plenty + * of free space or is not heavily fragmented. We only take + * fragmentation into account if the metaslab group has a valid + * fragmentation metric (i.e. a value between 0 and 100). + */ + mg->mg_allocatable = (mg->mg_free_capacity > zfs_mg_noalloc_threshold && + (mg->mg_fragmentation == ZFS_FRAG_INVALID || + mg->mg_fragmentation <= zfs_mg_fragmentation_threshold)); /* * The mc_alloc_groups maintains a count of the number of @@ -410,6 +564,7 @@ metaslab_group_alloc_update(metaslab_gro mc->mc_alloc_groups--; else if (!was_allocatable && mg->mg_allocatable) mc->mc_alloc_groups++; + mutex_exit(&mg->mg_lock); } @@ -500,6 +655,7 @@ metaslab_group_passivate(metaslab_group_ } taskq_wait(mg->mg_taskq); + metaslab_group_alloc_update(mg); mgprev = mg->mg_prev; mgnext = mg->mg_next; @@ -517,20 +673,113 @@ metaslab_group_passivate(metaslab_group_ metaslab_class_minblocksize_update(mc); } +uint64_t +metaslab_group_get_space(metaslab_group_t *mg) +{ + return ((1ULL << mg->mg_vd->vdev_ms_shift) * mg->mg_vd->vdev_ms_count); +} + +void +metaslab_group_histogram_verify(metaslab_group_t *mg) +{ + uint64_t *mg_hist; + vdev_t *vd = mg->mg_vd; + uint64_t ashift = vd->vdev_ashift; + int i; + + if ((zfs_flags & ZFS_DEBUG_HISTOGRAM_VERIFY) == 0) + return; + + mg_hist = kmem_zalloc(sizeof (uint64_t) * RANGE_TREE_HISTOGRAM_SIZE, + KM_SLEEP); + + ASSERT3U(RANGE_TREE_HISTOGRAM_SIZE, >=, + SPACE_MAP_HISTOGRAM_SIZE + ashift); + + for (int m = 0; m < vd->vdev_ms_count; m++) { + metaslab_t *msp = vd->vdev_ms[m]; + + if (msp->ms_sm == NULL) + continue; + + for (i = 0; i < SPACE_MAP_HISTOGRAM_SIZE; i++) + mg_hist[i + ashift] += + msp->ms_sm->sm_phys->smp_histogram[i]; + } + + for (i = 0; i < RANGE_TREE_HISTOGRAM_SIZE; i ++) + VERIFY3U(mg_hist[i], ==, mg->mg_histogram[i]); + + kmem_free(mg_hist, sizeof (uint64_t) * RANGE_TREE_HISTOGRAM_SIZE); +} + static void -metaslab_group_add(metaslab_group_t *mg, metaslab_t *msp) +metaslab_group_histogram_add(metaslab_group_t *mg, metaslab_t *msp) { + metaslab_class_t *mc = mg->mg_class; + uint64_t ashift = mg->mg_vd->vdev_ashift; + + ASSERT(MUTEX_HELD(&msp->ms_lock)); + if (msp->ms_sm == NULL) + return; + mutex_enter(&mg->mg_lock); + for (int i = 0; i < SPACE_MAP_HISTOGRAM_SIZE; i++) { + mg->mg_histogram[i + ashift] += + msp->ms_sm->sm_phys->smp_histogram[i]; + mc->mc_histogram[i + ashift] += + msp->ms_sm->sm_phys->smp_histogram[i]; + } + mutex_exit(&mg->mg_lock); +} + +void +metaslab_group_histogram_remove(metaslab_group_t *mg, metaslab_t *msp) +{ + metaslab_class_t *mc = mg->mg_class; + uint64_t ashift = mg->mg_vd->vdev_ashift; + + ASSERT(MUTEX_HELD(&msp->ms_lock)); + if (msp->ms_sm == NULL) + return; + + mutex_enter(&mg->mg_lock); + for (int i = 0; i < SPACE_MAP_HISTOGRAM_SIZE; i++) { + ASSERT3U(mg->mg_histogram[i + ashift], >=, + msp->ms_sm->sm_phys->smp_histogram[i]); + ASSERT3U(mc->mc_histogram[i + ashift], >=, + msp->ms_sm->sm_phys->smp_histogram[i]); + + mg->mg_histogram[i + ashift] -= + msp->ms_sm->sm_phys->smp_histogram[i]; + mc->mc_histogram[i + ashift] -= + msp->ms_sm->sm_phys->smp_histogram[i]; + } + mutex_exit(&mg->mg_lock); +} + +static void +metaslab_group_add(metaslab_group_t *mg, metaslab_t *msp) +{ ASSERT(msp->ms_group == NULL); + mutex_enter(&mg->mg_lock); msp->ms_group = mg; msp->ms_weight = 0; avl_add(&mg->mg_metaslab_tree, msp); mutex_exit(&mg->mg_lock); + + mutex_enter(&msp->ms_lock); + metaslab_group_histogram_add(mg, msp); + mutex_exit(&msp->ms_lock); } static void metaslab_group_remove(metaslab_group_t *mg, metaslab_t *msp) { + mutex_enter(&msp->ms_lock); + metaslab_group_histogram_remove(mg, msp); + mutex_exit(&msp->ms_lock); + mutex_enter(&mg->mg_lock); ASSERT(msp->ms_group == mg); avl_remove(&mg->mg_metaslab_tree, msp); @@ -543,9 +792,9 @@ metaslab_group_sort(metaslab_group_t *mg { /* * Although in principle the weight can be any value, in - * practice we do not use values in the range [1, 510]. + * practice we do not use values in the range [1, 511]. */ - ASSERT(weight >= SPA_MINBLOCKSIZE-1 || weight == 0); + ASSERT(weight >= SPA_MINBLOCKSIZE || weight == 0); ASSERT(MUTEX_HELD(&msp->ms_lock)); mutex_enter(&mg->mg_lock); @@ -557,9 +806,42 @@ metaslab_group_sort(metaslab_group_t *mg } /* + * Calculate the fragmentation for a given metaslab group. We can use + * a simple average here since all metaslabs within the group must have + * the same size. The return value will be a value between 0 and 100 + * (inclusive), or ZFS_FRAG_INVALID if less than half of the metaslab in this + * group have a fragmentation metric. + */ +uint64_t +metaslab_group_fragmentation(metaslab_group_t *mg) +{ + vdev_t *vd = mg->mg_vd; + uint64_t fragmentation = 0; + uint64_t valid_ms = 0; + + for (int m = 0; m < vd->vdev_ms_count; m++) { + metaslab_t *msp = vd->vdev_ms[m]; + + if (msp->ms_fragmentation == ZFS_FRAG_INVALID) + continue; + + valid_ms++; + fragmentation += msp->ms_fragmentation; + } + + if (valid_ms <= vd->vdev_ms_count / 2) + return (ZFS_FRAG_INVALID); + + fragmentation /= valid_ms; + ASSERT3U(fragmentation, <=, 100); + return (fragmentation); +} + +/* * Determine if a given metaslab group should skip allocations. A metaslab - * group should avoid allocations if its used capacity has crossed the - * zfs_mg_noalloc_threshold and there is at least one metaslab group + * group should avoid allocations if its free capacity is less than the + * zfs_mg_noalloc_threshold or its fragmentation metric is greater than + * zfs_mg_fragmentation_threshold and there is at least one metaslab group * that can still handle allocations. */ static boolean_t @@ -570,12 +852,19 @@ metaslab_group_allocatable(metaslab_grou metaslab_class_t *mc = mg->mg_class; /* - * A metaslab group is considered allocatable if its free capacity - * is greater than the set value of zfs_mg_noalloc_threshold, it's - * associated with a slog, or there are no other metaslab groups - * with free capacity greater than zfs_mg_noalloc_threshold. - */ - return (mg->mg_free_capacity > zfs_mg_noalloc_threshold || + * We use two key metrics to determine if a metaslab group is + * considered allocatable -- free space and fragmentation. If + * the free space is greater than the free space threshold and + * the fragmentation is less than the fragmentation threshold then + * consider the group allocatable. There are two case when we will + * not consider these key metrics. The first is if the group is + * associated with a slog device and the second is if all groups + * in this metaslab class have already been consider ineligible + * for allocations. + */ + return ((mg->mg_free_capacity > zfs_mg_noalloc_threshold && + (mg->mg_fragmentation == ZFS_FRAG_INVALID || + mg->mg_fragmentation <= zfs_mg_fragmentation_threshold)) || mc != spa_normal_class(spa) || mc->mc_alloc_groups == 0); } @@ -799,16 +1088,8 @@ metaslab_ff_alloc(metaslab_t *msp, uint6 return (metaslab_block_picker(t, cursor, size, align)); } -/* ARGSUSED */ -static boolean_t -metaslab_ff_fragmented(metaslab_t *msp) -{ - return (B_TRUE); -} - static metaslab_ops_t metaslab_ff_ops = { - metaslab_ff_alloc, - metaslab_ff_fragmented + metaslab_ff_alloc }; /* @@ -855,23 +1136,8 @@ metaslab_df_alloc(metaslab_t *msp, uint6 return (metaslab_block_picker(t, cursor, size, 1ULL)); } -static boolean_t -metaslab_df_fragmented(metaslab_t *msp) -{ - range_tree_t *rt = msp->ms_tree; - uint64_t max_size = metaslab_block_maxsize(msp); - int free_pct = range_tree_space(rt) * 100 / msp->ms_size; - - if (max_size >= metaslab_df_alloc_threshold && - free_pct >= metaslab_df_free_pct) - return (B_FALSE); - - return (B_TRUE); -} - static metaslab_ops_t metaslab_df_ops = { - metaslab_df_alloc, - metaslab_df_fragmented + metaslab_df_alloc }; /* @@ -914,15 +1180,8 @@ metaslab_cf_alloc(metaslab_t *msp, uint6 return (offset); } -static boolean_t -metaslab_cf_fragmented(metaslab_t *msp) -{ - return (metaslab_block_maxsize(msp) < metaslab_min_alloc_size); -} - static metaslab_ops_t metaslab_cf_ops = { - metaslab_cf_alloc, - metaslab_cf_fragmented + metaslab_cf_alloc }; /* @@ -979,16 +1238,8 @@ metaslab_ndf_alloc(metaslab_t *msp, uint return (-1ULL); } -static boolean_t -metaslab_ndf_fragmented(metaslab_t *msp) -{ - return (metaslab_block_maxsize(msp) <= - (metaslab_min_alloc_size << metaslab_ndf_clump_shift)); -} - static metaslab_ops_t metaslab_ndf_ops = { - metaslab_ndf_alloc, - metaslab_ndf_fragmented + metaslab_ndf_alloc }; metaslab_ops_t *zfs_metaslab_ops = &metaslab_df_ops; @@ -1090,6 +1341,7 @@ metaslab_init(metaslab_group_t *mg, uint msp->ms_tree = range_tree_create(&metaslab_rt_ops, msp, &msp->ms_lock); metaslab_group_add(mg, msp); + msp->ms_fragmentation = metaslab_fragmentation(msp); msp->ms_ops = mg->mg_class->mc_ops; /* @@ -1155,69 +1407,113 @@ metaslab_fini(metaslab_t *msp) kmem_free(msp, sizeof (metaslab_t)); } +#define FRAGMENTATION_TABLE_SIZE 17 + /* - * Apply a weighting factor based on the histogram information for this - * metaslab. The current weighting factor is somewhat arbitrary and requires - * additional investigation. The implementation provides a measure of - * "weighted" free space and gives a higher weighting for larger contiguous - * regions. The weighting factor is determined by counting the number of - * sm_shift sectors that exist in each region represented by the histogram. - * That value is then multiplied by the power of 2 exponent and the sm_shift - * value. + * This table defines a segment size based fragmentation metric that will + * allow each metaslab to derive its own fragmentation value. This is done + * by calculating the space in each bucket of the spacemap histogram and + * multiplying that by the fragmetation metric in this table. Doing + * this for all buckets and dividing it by the total amount of free *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From delphij at FreeBSD.org Sun Aug 10 06:10:22 2014 From: delphij at FreeBSD.org (Xin LI) Date: Sun, 10 Aug 2014 06:10:22 +0000 (UTC) Subject: svn commit: r269774 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <53e70cce.2908.3ddc718d@svn.freebsd.org> Author: delphij Date: Sun Aug 10 06:10:21 2014 New Revision: 269774 URL: http://svnweb.freebsd.org/changeset/base/269774 Log: MFC r269138: Add two sysctls for newly added tunables. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Sun Aug 10 05:58:41 2014 (r269773) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Sun Aug 10 06:10:21 2014 (r269774) @@ -117,6 +117,12 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, mg_noallo * class have also crossed this threshold. */ int zfs_mg_fragmentation_threshold = 85; +TUNABLE_INT("vfs.zfs.mg_fragmentation_threshold", &zfs_mg_fragmentation_threshold); +SYSCTL_INT(_vfs_zfs, OID_AUTO, mg_fragmentation_threshold, CTLFLAG_RWTUN, + &zfs_mg_fragmentation_threshold, 0, + "Percentage of metaslab group size that should be considered " + "eligible for allocations unless all metaslab groups within the metaslab class " + "have also crossed this threshold"); /* * Allow metaslabs to keep their active state as long as their fragmentation @@ -125,6 +131,11 @@ int zfs_mg_fragmentation_threshold = 85; * status allowing better metaslabs to be selected. */ int zfs_metaslab_fragmentation_threshold = 70; +TUNABLE_INT("vfs.zfs.metaslab.fragmentation_threshold", + &zfs_metaslab_fragmentation_threshold); +SYSCTL_INT(_vfs_zfs_metaslab, OID_AUTO, fragmentation_threshold, CTLFLAG_RWTUN, + &zfs_metaslab_fragmentation_threshold, 0, + "Maximum percentage of metaslab fragmentation level to keep their active state"); /* * When set will load all metaslabs when pool is first opened. From gavin at FreeBSD.org Sun Aug 10 21:17:20 2014 From: gavin at FreeBSD.org (Gavin Atkinson) Date: Sun, 10 Aug 2014 21:17:20 +0000 (UTC) Subject: svn commit: r269789 - stable/9/sys/kern Message-ID: <53e7e160.27d1.6ba150cc@svn.freebsd.org> Author: gavin Date: Sun Aug 10 21:17:19 2014 New Revision: 269789 URL: http://svnweb.freebsd.org/changeset/base/269789 Log: Merge r269489 from head (by peter): r262867 was described as fixing socket buffer checks for SOCK_SEQPACKET, but also changed one of the SOCK_DGRAM code paths to use the new sbappendaddr_nospacecheck_locked() function. This lead to SOCK_DGRAM bypassing socket buffer limits. Modified: stable/9/sys/kern/uipc_usrreq.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/uipc_usrreq.c ============================================================================== --- stable/9/sys/kern/uipc_usrreq.c Sun Aug 10 20:05:13 2014 (r269788) +++ stable/9/sys/kern/uipc_usrreq.c Sun Aug 10 21:17:19 2014 (r269789) @@ -876,7 +876,7 @@ uipc_send(struct socket *so, int flags, from = &sun_noname; so2 = unp2->unp_socket; SOCKBUF_LOCK(&so2->so_rcv); - if (sbappendaddr_nospacecheck_locked(&so2->so_rcv, from, m, + if (sbappendaddr_locked(&so2->so_rcv, from, m, control)) { sorwakeup_locked(so2); m = NULL; From sbruno at FreeBSD.org Sun Aug 10 21:45:58 2014 From: sbruno at FreeBSD.org (Sean Bruno) Date: Sun, 10 Aug 2014 21:45:58 +0000 (UTC) Subject: svn commit: r269790 - stable/10/sys/dev/drm2/radeon Message-ID: <53e7e816.225d.2dfec8dd@svn.freebsd.org> Author: sbruno Date: Sun Aug 10 21:45:58 2014 New Revision: 269790 URL: http://svnweb.freebsd.org/changeset/base/269790 Log: MFC r268954 Merge change from upstream linux kernel submitted by OpenBSD: drm/radeon: fix-up some float to fixed conversion thinkos Remove #ifdef DUMBBELL_WIP in favor of upstream fix. Modified: stable/10/sys/dev/drm2/radeon/rs690.c stable/10/sys/dev/drm2/radeon/rv515.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/drm2/radeon/rs690.c ============================================================================== --- stable/10/sys/dev/drm2/radeon/rs690.c Sun Aug 10 21:17:19 2014 (r269789) +++ stable/10/sys/dev/drm2/radeon/rs690.c Sun Aug 10 21:45:58 2014 (r269790) @@ -308,12 +308,11 @@ static void rs690_crtc_bandwidth_compute if (rdev->pm.max_bandwidth.full > rdev->pm.sideport_bandwidth.full && rdev->pm.sideport_bandwidth.full) rdev->pm.max_bandwidth = rdev->pm.sideport_bandwidth; -#ifdef DUMBBELL_WIP - read_delay_latency.full = dfixed_const(370 * 800 * 1000); -#endif /* DUMBBELL_WIP */ - read_delay_latency.full = UINT_MAX; - read_delay_latency.full = dfixed_div(read_delay_latency, - rdev->pm.igp_sideport_mclk); + read_delay_latency.full = dfixed_const(370 * 800); + a.full = dfixed_const(1000); + b.full = dfixed_div(rdev->pm.igp_sideport_mclk, a); + read_delay_latency.full = dfixed_div(read_delay_latency, b); + read_delay_latency.full = dfixed_mul(read_delay_latency, a); } else { if (rdev->pm.max_bandwidth.full > rdev->pm.k8_bandwidth.full && rdev->pm.k8_bandwidth.full) @@ -488,14 +487,10 @@ void rs690_bandwidth_update(struct radeo } if (wm0.priority_mark.full > priority_mark02.full) priority_mark02.full = wm0.priority_mark.full; - if (dfixed_trunc(priority_mark02) < 0) - priority_mark02.full = 0; if (wm0.priority_mark_max.full > priority_mark02.full) priority_mark02.full = wm0.priority_mark_max.full; if (wm1.priority_mark.full > priority_mark12.full) priority_mark12.full = wm1.priority_mark.full; - if (dfixed_trunc(priority_mark12) < 0) - priority_mark12.full = 0; if (wm1.priority_mark_max.full > priority_mark12.full) priority_mark12.full = wm1.priority_mark_max.full; d1mode_priority_a_cnt = dfixed_trunc(priority_mark02); @@ -526,8 +521,6 @@ void rs690_bandwidth_update(struct radeo } if (wm0.priority_mark.full > priority_mark02.full) priority_mark02.full = wm0.priority_mark.full; - if (dfixed_trunc(priority_mark02) < 0) - priority_mark02.full = 0; if (wm0.priority_mark_max.full > priority_mark02.full) priority_mark02.full = wm0.priority_mark_max.full; d1mode_priority_a_cnt = dfixed_trunc(priority_mark02); @@ -555,8 +548,6 @@ void rs690_bandwidth_update(struct radeo } if (wm1.priority_mark.full > priority_mark12.full) priority_mark12.full = wm1.priority_mark.full; - if (dfixed_trunc(priority_mark12) < 0) - priority_mark12.full = 0; if (wm1.priority_mark_max.full > priority_mark12.full) priority_mark12.full = wm1.priority_mark_max.full; d2mode_priority_a_cnt = dfixed_trunc(priority_mark12); Modified: stable/10/sys/dev/drm2/radeon/rv515.c ============================================================================== --- stable/10/sys/dev/drm2/radeon/rv515.c Sun Aug 10 21:17:19 2014 (r269789) +++ stable/10/sys/dev/drm2/radeon/rv515.c Sun Aug 10 21:45:58 2014 (r269790) @@ -1087,14 +1087,10 @@ void rv515_bandwidth_avivo_update(struct } if (wm0.priority_mark.full > priority_mark02.full) priority_mark02.full = wm0.priority_mark.full; - if (dfixed_trunc(priority_mark02) < 0) - priority_mark02.full = 0; if (wm0.priority_mark_max.full > priority_mark02.full) priority_mark02.full = wm0.priority_mark_max.full; if (wm1.priority_mark.full > priority_mark12.full) priority_mark12.full = wm1.priority_mark.full; - if (dfixed_trunc(priority_mark12) < 0) - priority_mark12.full = 0; if (wm1.priority_mark_max.full > priority_mark12.full) priority_mark12.full = wm1.priority_mark_max.full; d1mode_priority_a_cnt = dfixed_trunc(priority_mark02); @@ -1125,8 +1121,6 @@ void rv515_bandwidth_avivo_update(struct } if (wm0.priority_mark.full > priority_mark02.full) priority_mark02.full = wm0.priority_mark.full; - if (dfixed_trunc(priority_mark02) < 0) - priority_mark02.full = 0; if (wm0.priority_mark_max.full > priority_mark02.full) priority_mark02.full = wm0.priority_mark_max.full; d1mode_priority_a_cnt = dfixed_trunc(priority_mark02); @@ -1154,8 +1148,6 @@ void rv515_bandwidth_avivo_update(struct } if (wm1.priority_mark.full > priority_mark12.full) priority_mark12.full = wm1.priority_mark.full; - if (dfixed_trunc(priority_mark12) < 0) - priority_mark12.full = 0; if (wm1.priority_mark_max.full > priority_mark12.full) priority_mark12.full = wm1.priority_mark_max.full; d2mode_priority_a_cnt = dfixed_trunc(priority_mark12); From ian at FreeBSD.org Sun Aug 10 22:26:31 2014 From: ian at FreeBSD.org (Ian Lepore) Date: Sun, 10 Aug 2014 22:26:29 +0000 (UTC) Subject: svn commit: r269792 - in stable/10: contrib/libstdc++/libsupc++ lib/libc lib/libc/arm lib/libc/arm/aeabi sys/arm/include sys/sys Message-ID: <53e7f196.2402.5912252@svn.freebsd.org> Author: ian Date: Sun Aug 10 22:26:29 2014 New Revision: 269792 URL: http://svnweb.freebsd.org/changeset/base/269792 Log: MFC r268993, r268893, r268994, plus partial r264070, r264082 Fix C++ exception handling for ARM EABI. Just the part of r264070 that creates the FBSD_1.4 namespace in libc is hand-applied, and then r264082 which creates the Versions.def entry is MFC'd. Added: stable/10/lib/libc/arm/aeabi/aeabi_unwind_exidx.c - copied unchanged from r268893, head/lib/libc/arm/aeabi/aeabi_unwind_exidx.c Modified: stable/10/contrib/libstdc++/libsupc++/unwind-cxx.h stable/10/lib/libc/Versions.def stable/10/lib/libc/arm/Symbol.map stable/10/lib/libc/arm/aeabi/Makefile.inc stable/10/sys/arm/include/elf.h stable/10/sys/sys/link_elf.h Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/libstdc++/libsupc++/unwind-cxx.h ============================================================================== --- stable/10/contrib/libstdc++/libsupc++/unwind-cxx.h Sun Aug 10 22:24:14 2014 (r269791) +++ stable/10/contrib/libstdc++/libsupc++/unwind-cxx.h Sun Aug 10 22:26:29 2014 (r269792) @@ -142,9 +142,9 @@ typedef enum { ctm_succeeded = 1, ctm_succeeded_with_ptr_to_base = 2 } __cxa_type_match_result; -extern "C" bool __cxa_type_match(_Unwind_Exception*, const std::type_info*, +extern "C" __cxa_type_match_result __cxa_type_match(_Unwind_Exception*, const std::type_info*, bool, void**); -extern "C" void __cxa_begin_cleanup (_Unwind_Exception*); +extern "C" bool __cxa_begin_cleanup (_Unwind_Exception*); extern "C" void __cxa_end_cleanup (void); #endif Modified: stable/10/lib/libc/Versions.def ============================================================================== --- stable/10/lib/libc/Versions.def Sun Aug 10 22:24:14 2014 (r269791) +++ stable/10/lib/libc/Versions.def Sun Aug 10 22:26:29 2014 (r269792) @@ -23,6 +23,11 @@ FBSD_1.2 { FBSD_1.3 { } FBSD_1.2; +# This version was first added to 11.0-current. +FBSD_1.4 { +} FBSD_1.3; + + # This is our private namespace. Any global interfaces that are # strictly for use only by other FreeBSD applications and libraries # are listed here. We use a separate namespace so we can write @@ -30,4 +35,4 @@ FBSD_1.3 { # # Please do NOT increment the version of this namespace. FBSDprivate_1.0 { -} FBSD_1.3; +} FBSD_1.4; Modified: stable/10/lib/libc/arm/Symbol.map ============================================================================== --- stable/10/lib/libc/arm/Symbol.map Sun Aug 10 22:24:14 2014 (r269791) +++ stable/10/lib/libc/arm/Symbol.map Sun Aug 10 22:26:29 2014 (r269792) @@ -37,6 +37,11 @@ FBSD_1.3 { __flt_rounds; }; +FBSD_1.4 { + __gnu_Unwind_Find_exidx; + dl_unwind_find_exidx; +}; + FBSDprivate_1.0 { /* PSEUDO syscalls */ __sys_getlogin; Modified: stable/10/lib/libc/arm/aeabi/Makefile.inc ============================================================================== --- stable/10/lib/libc/arm/aeabi/Makefile.inc Sun Aug 10 22:24:14 2014 (r269791) +++ stable/10/lib/libc/arm/aeabi/Makefile.inc Sun Aug 10 22:26:29 2014 (r269792) @@ -5,7 +5,8 @@ SRCS+= aeabi_atexit.c \ aeabi_double.c \ aeabi_float.c \ - aeabi_unwind_cpp.c + aeabi_unwind_cpp.c \ + aeabi_unwind_exidx.c .if ${MACHINE_ARCH:Marmv6*} SRCS+= aeabi_vfp_double.S \ aeabi_vfp_float.S Copied: stable/10/lib/libc/arm/aeabi/aeabi_unwind_exidx.c (from r268893, head/lib/libc/arm/aeabi/aeabi_unwind_exidx.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/arm/aeabi/aeabi_unwind_exidx.c Sun Aug 10 22:26:29 2014 (r269792, copy of r268893, head/lib/libc/arm/aeabi/aeabi_unwind_exidx.c) @@ -0,0 +1,104 @@ +/*- + * Copyright (c) 2014 Ian Lepore + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +/* + * ARM EABI unwind helper. + * + * This finds the exidx section address and size associated with a given code + * address. There are separate implementations for static and dynamic code. + * + * GCC expects this function to exist as __gnu_Unwind_Find_exidx(), clang and + * BSD tools expect it to be dl_unwind_find_exidx(). Both have the same API, so + * we set up an alias for GCC. + */ +__strong_reference(dl_unwind_find_exidx, __gnu_Unwind_Find_exidx); + +/* + * Each entry in the exidx section is a pair of 32-bit words. We don't + * interpret the contents of the entries here; this typedef is just a local + * convenience for using sizeof() and doing pointer math. + */ +typedef struct exidx_entry { + uint32_t data[2]; +} exidx_entry; + +#ifdef __PIC__ + +/* + * Unwind helper for dynamically linked code. + * + * This finds the shared object that contains the given address, and returns the + * address of the exidx section in that shared object along with the number of + * entries in that section, or NULL if it wasn't found. + */ +void * +dl_unwind_find_exidx(const void *pc, int *pcount) +{ + const Elf_Phdr *hdr; + struct dl_phdr_info info; + int i; + + if (_rtld_addr_phdr(pc, &info)) { + hdr = info.dlpi_phdr; + for (i = 0; i < info.dlpi_phnum; i++, hdr++) { + if (hdr->p_type == PT_ARM_EXIDX) { + *pcount = hdr->p_memsz / sizeof(exidx_entry); + return ((void *)(info.dlpi_addr + hdr->p_vaddr)); + } + } + } + return (NULL); +} + +#else /* !__PIC__ */ + +/* + * Unwind helper for statically linked code. + * + * In a statically linked program, the linker populates a pair of symbols with + * the addresses of the start and end of the exidx table, so returning the + * address and count of elements is pretty straighforward. + */ +void * +dl_unwind_find_exidx(const void *pc, int *pcount) +{ + extern struct exidx_entry __exidx_start; + extern struct exidx_entry __exidx_end; + + *pcount = (int)(&__exidx_end - &__exidx_start); + return (&__exidx_start); +} + +#endif /* __PIC__ */ + Modified: stable/10/sys/arm/include/elf.h ============================================================================== --- stable/10/sys/arm/include/elf.h Sun Aug 10 22:24:14 2014 (r269791) +++ stable/10/sys/arm/include/elf.h Sun Aug 10 22:26:29 2014 (r269792) @@ -55,6 +55,9 @@ __ElfType(Auxinfo); #define ELF_MACHINE_OK(x) ((x) == EM_ARM) +/* Unwind info section type */ +#define PT_ARM_EXIDX (PT_LOPROC + 1) + /* * Relocation types. */ Modified: stable/10/sys/sys/link_elf.h ============================================================================== --- stable/10/sys/sys/link_elf.h Sun Aug 10 22:24:14 2014 (r269791) +++ stable/10/sys/sys/link_elf.h Sun Aug 10 22:26:29 2014 (r269792) @@ -95,6 +95,10 @@ extern int dl_iterate_phdr(__dl_iterate_ int _rtld_addr_phdr(const void *, struct dl_phdr_info *); int _rtld_get_stack_prot(void); +#ifdef __ARM_EABI__ +void * dl_unwind_find_exidx(const void *, int *); +#endif + __END_DECLS #endif /* _SYS_LINK_ELF_H_ */ From ian at FreeBSD.org Mon Aug 11 01:10:16 2014 From: ian at FreeBSD.org (Ian Lepore) Date: Mon, 11 Aug 2014 01:10:16 +0000 (UTC) Subject: svn commit: r269794 - stable/10/sys/arm/arm Message-ID: <53e817f8.2b97.d400ca7@svn.freebsd.org> Author: ian Date: Mon Aug 11 01:10:15 2014 New Revision: 269794 URL: http://svnweb.freebsd.org/changeset/base/269794 Log: MFC r269206, r269207, r269208, r269209, r269210, r269211, r269212, r269213, r269214, r269215, r269216, r269217, r269221: busdma-v6 improvements, primarily: - Allocate the temporary segments array per-map rather than per-tag. - Avoid needlessly bouncing IO for mbufs and buffers allocated by bus_dmamem_alloc() (in both situations we known they're allocated on cacheline boundaries and don't need bouncing). - Various minor reformatting and cleanups. Modified: stable/10/sys/arm/arm/busdma_machdep-v6.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- stable/10/sys/arm/arm/busdma_machdep-v6.c Mon Aug 11 00:03:50 2014 (r269793) +++ stable/10/sys/arm/arm/busdma_machdep-v6.c Mon Aug 11 01:10:15 2014 (r269794) @@ -64,7 +64,10 @@ __FBSDID("$FreeBSD$"); #include #define MAX_BPAGES 64 -#define BUS_DMA_COULD_BOUNCE BUS_DMA_BUS3 +#define MAX_DMA_SEGMENTS 4096 +#define BUS_DMA_EXCL_BOUNCE BUS_DMA_BUS2 +#define BUS_DMA_ALIGN_BOUNCE BUS_DMA_BUS3 +#define BUS_DMA_COULD_BOUNCE (BUS_DMA_EXCL_BOUNCE | BUS_DMA_ALIGN_BOUNCE) #define BUS_DMA_MIN_ALLOC_COMP BUS_DMA_BUS4 struct bounce_zone; @@ -94,15 +97,6 @@ struct bus_dma_tag { */ struct arm32_dma_range *ranges; int _nranges; - /* - * Most tags need one or two segments, and can use the local tagsegs - * array. For tags with a larger limit, we'll allocate a bigger array - * on first use. - */ - bus_dma_segment_t *segments; - bus_dma_segment_t tagsegs[2]; - - }; struct bounce_page { @@ -143,9 +137,40 @@ struct bounce_zone { static struct mtx bounce_lock; static int total_bpages; static int busdma_zonecount; +static uint32_t tags_total; +static uint32_t maps_total; +static uint32_t maps_dmamem; +static uint32_t maps_coherent; +static uint64_t maploads_total; +static uint64_t maploads_bounced; +static uint64_t maploads_coherent; +static uint64_t maploads_dmamem; +static uint64_t maploads_mbuf; +static uint64_t maploads_physmem; + static STAILQ_HEAD(, bounce_zone) bounce_zone_list; SYSCTL_NODE(_hw, OID_AUTO, busdma, CTLFLAG_RD, 0, "Busdma parameters"); +SYSCTL_UINT(_hw_busdma, OID_AUTO, tags_total, CTLFLAG_RD, &tags_total, 0, + "Number of active tags"); +SYSCTL_UINT(_hw_busdma, OID_AUTO, maps_total, CTLFLAG_RD, &maps_total, 0, + "Number of active maps"); +SYSCTL_UINT(_hw_busdma, OID_AUTO, maps_dmamem, CTLFLAG_RD, &maps_dmamem, 0, + "Number of active maps for bus_dmamem_alloc buffers"); +SYSCTL_UINT(_hw_busdma, OID_AUTO, maps_coherent, CTLFLAG_RD, &maps_coherent, 0, + "Number of active maps with BUS_DMA_COHERENT flag set"); +SYSCTL_UQUAD(_hw_busdma, OID_AUTO, maploads_total, CTLFLAG_RD, &maploads_total, 0, + "Number of load operations performed"); +SYSCTL_UQUAD(_hw_busdma, OID_AUTO, maploads_bounced, CTLFLAG_RD, &maploads_bounced, 0, + "Number of load operations that used bounce buffers"); +SYSCTL_UQUAD(_hw_busdma, OID_AUTO, maploads_coherent, CTLFLAG_RD, &maploads_dmamem, 0, + "Number of load operations on BUS_DMA_COHERENT memory"); +SYSCTL_UQUAD(_hw_busdma, OID_AUTO, maploads_dmamem, CTLFLAG_RD, &maploads_dmamem, 0, + "Number of load operations on bus_dmamem_alloc buffers"); +SYSCTL_UQUAD(_hw_busdma, OID_AUTO, maploads_mbuf, CTLFLAG_RD, &maploads_mbuf, 0, + "Number of load operations for mbufs"); +SYSCTL_UQUAD(_hw_busdma, OID_AUTO, maploads_physmem, CTLFLAG_RD, &maploads_physmem, 0, + "Number of load operations on physical buffers"); SYSCTL_INT(_hw_busdma, OID_AUTO, total_bpages, CTLFLAG_RD, &total_bpages, 0, "Total bounce pages"); @@ -160,7 +185,10 @@ struct bus_dmamap { void *callback_arg; int flags; #define DMAMAP_COHERENT (1 << 0) +#define DMAMAP_DMAMEM_ALLOC (1 << 1) +#define DMAMAP_MBUF (1 << 2) STAILQ_ENTRY(bus_dmamap) links; + bus_dma_segment_t *segments; int sync_count; struct sync_list slist[]; }; @@ -177,7 +205,6 @@ static bus_addr_t add_bounce_page(bus_dm vm_offset_t vaddr, bus_addr_t addr, bus_size_t size); static void free_bounce_page(bus_dma_tag_t dmat, struct bounce_page *bpage); -int run_filter(bus_dma_tag_t dmat, bus_addr_t paddr, bus_size_t size, int coherent); static void _bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf, bus_size_t buflen, int flags); static void _bus_dmamap_count_phys(bus_dma_tag_t dmat, bus_dmamap_t map, @@ -229,62 +256,135 @@ busdma_init(void *dummy) */ SYSINIT(busdma, SI_SUB_KMEM, SI_ORDER_THIRD, busdma_init, NULL); -static __inline int -_bus_dma_can_bounce(vm_offset_t lowaddr, vm_offset_t highaddr) +static int +exclusion_bounce_check(vm_offset_t lowaddr, vm_offset_t highaddr) { int i; for (i = 0; phys_avail[i] && phys_avail[i + 1]; i += 2) { - if ((lowaddr >= phys_avail[i] && lowaddr <= phys_avail[i + 1]) - || (lowaddr < phys_avail[i] && - highaddr > phys_avail[i])) + if ((lowaddr >= phys_avail[i] && lowaddr < phys_avail[i + 1]) || + (lowaddr < phys_avail[i] && highaddr >= phys_avail[i])) return (1); } return (0); } -static __inline struct arm32_dma_range * -_bus_dma_inrange(struct arm32_dma_range *ranges, int nranges, - bus_addr_t curaddr) +/* + * Return true if the tag has an exclusion zone that could lead to bouncing. + */ +static __inline int +exclusion_bounce(bus_dma_tag_t dmat) { - struct arm32_dma_range *dr; - int i; - for (i = 0, dr = ranges; i < nranges; i++, dr++) { - if (curaddr >= dr->dr_sysbase && - round_page(curaddr) <= (dr->dr_sysbase + dr->dr_len)) - return (dr); - } + return (dmat->flags & BUS_DMA_EXCL_BOUNCE); +} - return (NULL); +/* + * Return true if the given address does not fall on the alignment boundary. + */ +static __inline int +alignment_bounce(bus_dma_tag_t dmat, bus_addr_t addr) +{ + + return (addr & (dmat->alignment - 1)); +} + +/* + * Return true if the DMA should bounce because the start or end does not fall + * on a cacheline boundary (which would require a partial cacheline flush). + * COHERENT memory doesn't trigger cacheline flushes. Memory allocated by + * bus_dmamem_alloc() is always aligned to cacheline boundaries, and there's a + * strict rule that such memory cannot be accessed by the CPU while DMA is in + * progress (or by multiple DMA engines at once), so that it's always safe to do + * full cacheline flushes even if that affects memory outside the range of a + * given DMA operation that doesn't involve the full allocated buffer. If we're + * mapping an mbuf, that follows the same rules as a buffer we allocated. + */ +static __inline int +cacheline_bounce(bus_dmamap_t map, bus_addr_t addr, bus_size_t size) +{ + + if (map->flags & (DMAMAP_DMAMEM_ALLOC | DMAMAP_COHERENT | DMAMAP_MBUF)) + return (0); + return ((addr | size) & arm_dcache_align_mask); } /* - * Return true if a match is made. + * Return true if we might need to bounce the DMA described by addr and size. * - * To find a match walk the chain of bus_dma_tag_t's looking for 'paddr'. + * This is used to quick-check whether we need to do the more expensive work of + * checking the DMA page-by-page looking for alignment and exclusion bounces. * - * If paddr is within the bounds of the dma tag then call the filter callback - * to check for a match, if there is no filter callback then assume a match. + * Note that the addr argument might be either virtual or physical. It doesn't + * matter because we only look at the low-order bits, which are the same in both + * address spaces. */ -int -run_filter(bus_dma_tag_t dmat, bus_addr_t paddr, bus_size_t size, int coherent) +static __inline int +might_bounce(bus_dma_tag_t dmat, bus_dmamap_t map, bus_addr_t addr, + bus_size_t size) { - int retval; + return ((dmat->flags & BUS_DMA_EXCL_BOUNCE) || + alignment_bounce(dmat, addr) || + cacheline_bounce(map, addr, size)); +} - retval = 0; +/* + * Return true if we must bounce the DMA described by paddr and size. + * + * Bouncing can be triggered by DMA that doesn't begin and end on cacheline + * boundaries, or doesn't begin on an alignment boundary, or falls within the + * exclusion zone of any tag in the ancestry chain. + * + * For exclusions, walk the chain of tags comparing paddr to the exclusion zone + * within each tag. If the tag has a filter function, use it to decide whether + * the DMA needs to bounce, otherwise any DMA within the zone bounces. + */ +static int +must_bounce(bus_dma_tag_t dmat, bus_dmamap_t map, bus_addr_t paddr, + bus_size_t size) +{ - do { - if (((paddr > dmat->lowaddr && paddr <= dmat->highaddr) - || ((paddr & (dmat->alignment - 1)) != 0) || - (!coherent && (size & arm_dcache_align_mask)) || - (!coherent && (paddr & arm_dcache_align_mask))) - && (dmat->filter == NULL - || (*dmat->filter)(dmat->filterarg, paddr) != 0)) - retval = 1; + if (cacheline_bounce(map, paddr, size)) + return (1); + /* + * The tag already contains ancestors' alignment restrictions so this + * check doesn't need to be inside the loop. + */ + if (alignment_bounce(dmat, paddr)) + return (1); + + /* + * Even though each tag has an exclusion zone that is a superset of its + * own and all its ancestors' exclusions, the exclusion zone of each tag + * up the chain must be checked within the loop, because the busdma + * rules say the filter function is called only when the address lies + * within the low-highaddr range of the tag that filterfunc belongs to. + */ + while (dmat != NULL && exclusion_bounce(dmat)) { + if ((paddr >= dmat->lowaddr && paddr <= dmat->highaddr) && + (dmat->filter == NULL || + dmat->filter(dmat->filterarg, paddr) != 0)) + return (1); dmat = dmat->parent; - } while (retval == 0 && dmat != NULL); - return (retval); + } + + return (0); +} + +static __inline struct arm32_dma_range * +_bus_dma_inrange(struct arm32_dma_range *ranges, int nranges, + bus_addr_t curaddr) +{ + struct arm32_dma_range *dr; + int i; + + for (i = 0, dr = ranges; i < nranges; i++, dr++) { + if (curaddr >= dr->dr_sysbase && + round_page(curaddr) <= (dr->dr_sysbase + dr->dr_len)) + return (dr); + } + + return (NULL); } /* @@ -384,34 +484,21 @@ bus_dma_tag_create(bus_dma_tag_t parent, newtag->lockfunc = dflt_lock; newtag->lockfuncarg = NULL; } - /* - * If all the segments we need fit into the local tagsegs array, set the - * pointer now. Otherwise NULL the pointer and an array of segments - * will be allocated later, on first use. We don't pre-allocate now - * because some tags exist just to pass contraints to children in the - * device hierarchy, and they tend to use BUS_SPACE_UNRESTRICTED and we - * sure don't want to try to allocate an array for that. - */ - if (newtag->nsegments <= nitems(newtag->tagsegs)) - newtag->segments = newtag->tagsegs; - else - newtag->segments = NULL; /* Take into account any restrictions imposed by our parent tag */ if (parent != NULL) { newtag->lowaddr = MIN(parent->lowaddr, newtag->lowaddr); newtag->highaddr = MAX(parent->highaddr, newtag->highaddr); + newtag->alignment = MAX(parent->alignment, newtag->alignment); + newtag->flags |= parent->flags & BUS_DMA_COULD_BOUNCE; if (newtag->boundary == 0) newtag->boundary = parent->boundary; else if (parent->boundary != 0) newtag->boundary = MIN(parent->boundary, newtag->boundary); - if ((newtag->filter != NULL) || - ((parent->flags & BUS_DMA_COULD_BOUNCE) != 0)) - newtag->flags |= BUS_DMA_COULD_BOUNCE; if (newtag->filter == NULL) { /* - * Short circuit looking at our parent directly + * Short circuit to looking at our parent directly * since we have encapsulated all of its information */ newtag->filter = parent->filter; @@ -422,9 +509,10 @@ bus_dma_tag_create(bus_dma_tag_t parent, atomic_add_int(&parent->ref_count, 1); } - if (_bus_dma_can_bounce(newtag->lowaddr, newtag->highaddr) - || newtag->alignment > 1) - newtag->flags |= BUS_DMA_COULD_BOUNCE; + if (exclusion_bounce_check(newtag->lowaddr, newtag->highaddr)) + newtag->flags |= BUS_DMA_EXCL_BOUNCE; + if (alignment_bounce(newtag, 1)) + newtag->flags |= BUS_DMA_ALIGN_BOUNCE; /* * Any request can auto-bounce due to cacheline alignment, in addition @@ -463,6 +551,7 @@ bus_dma_tag_create(bus_dma_tag_t parent, if (error != 0) { free(newtag, M_DEVBUF); } else { + atomic_add_32(&tags_total, 1); *dmat = newtag; } CTR4(KTR_BUSDMA, "%s returned tag %p tag flags 0x%x error %d", @@ -492,9 +581,7 @@ bus_dma_tag_destroy(bus_dma_tag_t dmat) parent = dmat->parent; atomic_subtract_int(&dmat->ref_count, 1); if (dmat->ref_count == 0) { - if (dmat->segments != NULL && - dmat->segments != dmat->tagsegs) - free(dmat->segments, M_DEVBUF); + atomic_subtract_32(&tags_total, 1); free(dmat, M_DEVBUF); /* * Last reference count, so @@ -534,8 +621,8 @@ static int allocate_bz_and_pages(bus_dma maxpages = MAX_BPAGES; else maxpages = 2 * bz->map_count; - if ((dmat->flags & BUS_DMA_MIN_ALLOC_COMP) == 0 - || (bz->map_count > 0 && bz->total_bpages < maxpages)) { + if ((dmat->flags & BUS_DMA_MIN_ALLOC_COMP) == 0 || + (bz->map_count > 0 && bz->total_bpages < maxpages)) { int pages; pages = atop(roundup2(dmat->maxsize, PAGE_SIZE)) + 1; @@ -551,6 +638,31 @@ static int allocate_bz_and_pages(bus_dma return (0); } +static bus_dmamap_t +allocate_map(bus_dma_tag_t dmat, int mflags) +{ + int mapsize, segsize; + bus_dmamap_t map; + + /* + * Allocate the map. The map structure ends with an embedded + * variable-sized array of sync_list structures. Following that + * we allocate enough extra space to hold the array of bus_dma_segments. + */ + KASSERT(dmat->nsegments <= MAX_DMA_SEGMENTS, + ("cannot allocate %u dma segments (max is %u)", + dmat->nsegments, MAX_DMA_SEGMENTS)); + segsize = sizeof(struct bus_dma_segment) * dmat->nsegments; + mapsize = sizeof(*map) + sizeof(struct sync_list) * dmat->nsegments; + map = malloc(mapsize + segsize, M_DEVBUF, mflags | M_ZERO); + if (map == NULL) { + CTR3(KTR_BUSDMA, "%s: tag %p error %d", __func__, dmat, ENOMEM); + return (NULL); + } + map->segments = (bus_dma_segment_t *)((uintptr_t)map + mapsize); + return (map); +} + /* * Allocate a handle for mapping from kva/uva/physical * address space into bus device space. @@ -558,41 +670,32 @@ static int allocate_bz_and_pages(bus_dma int bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp) { - int mapsize; + bus_dmamap_t map; int error = 0; - mapsize = sizeof(**mapp) + (sizeof(struct sync_list) * dmat->nsegments); - *mapp = (bus_dmamap_t)malloc(mapsize, M_DEVBUF, M_NOWAIT | M_ZERO); - if (*mapp == NULL) { + *mapp = map = allocate_map(dmat, M_NOWAIT); + if (map == NULL) { CTR3(KTR_BUSDMA, "%s: tag %p error %d", __func__, dmat, ENOMEM); return (ENOMEM); } - (*mapp)->sync_count = 0; - if (dmat->segments == NULL) { - dmat->segments = (bus_dma_segment_t *)malloc( - sizeof(bus_dma_segment_t) * dmat->nsegments, M_DEVBUF, - M_NOWAIT); - if (dmat->segments == NULL) { - CTR3(KTR_BUSDMA, "%s: tag %p error %d", - __func__, dmat, ENOMEM); - free(*mapp, M_DEVBUF); - *mapp = NULL; - return (ENOMEM); - } - } /* - * Bouncing might be required if the driver asks for an active - * exclusion region, a data alignment that is stricter than 1, and/or - * an active address boundary. + * Bouncing might be required if the driver asks for an exclusion + * region, a data alignment that is stricter than 1, or DMA that begins + * or ends with a partial cacheline. Whether bouncing will actually + * happen can't be known until mapping time, but we need to pre-allocate + * resources now because we might not be allowed to at mapping time. */ - error = allocate_bz_and_pages(dmat, *mapp); + error = allocate_bz_and_pages(dmat, map); if (error != 0) { - free(*mapp, M_DEVBUF); + free(map, M_DEVBUF); *mapp = NULL; return (error); } - return (error); + if (map->flags & DMAMAP_COHERENT) + atomic_add_32(&maps_coherent, 1); + atomic_add_32(&maps_total, 1); + return (0); } /* @@ -609,6 +712,9 @@ bus_dmamap_destroy(bus_dma_tag_t dmat, b } if (dmat->bounce_zone) dmat->bounce_zone->map_count--; + if (map->flags & DMAMAP_COHERENT) + atomic_subtract_32(&maps_coherent, 1); + atomic_subtract_32(&maps_total, 1); free(map, M_DEVBUF); dmat->map_count--; CTR2(KTR_BUSDMA, "%s: tag %p error 0", __func__, dmat); @@ -627,58 +733,33 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi { busdma_bufalloc_t ba; struct busdma_bufzone *bufzone; + bus_dmamap_t map; vm_memattr_t memattr; int mflags; - int mapsize; - int error; if (flags & BUS_DMA_NOWAIT) mflags = M_NOWAIT; else mflags = M_WAITOK; + if (flags & BUS_DMA_ZERO) + mflags |= M_ZERO; - /* ARM non-snooping caches need a map for the VA cache sync structure */ - - mapsize = sizeof(**mapp) + (sizeof(struct sync_list) * dmat->nsegments); - *mapp = (bus_dmamap_t)malloc(mapsize, M_DEVBUF, M_NOWAIT | M_ZERO); - if (*mapp == NULL) { + *mapp = map = allocate_map(dmat, mflags); + if (map == NULL) { CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", __func__, dmat, dmat->flags, ENOMEM); return (ENOMEM); } + map->flags = DMAMAP_DMAMEM_ALLOC; - (*mapp)->sync_count = 0; - /* We may need bounce pages, even for allocated memory */ - error = allocate_bz_and_pages(dmat, *mapp); - if (error != 0) { - free(*mapp, M_DEVBUF); - *mapp = NULL; - return (error); - } - - if (dmat->segments == NULL) { - dmat->segments = (bus_dma_segment_t *)malloc( - sizeof(bus_dma_segment_t) * dmat->nsegments, M_DEVBUF, - mflags); - if (dmat->segments == NULL) { - CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", - __func__, dmat, dmat->flags, ENOMEM); - free(*mapp, M_DEVBUF); - *mapp = NULL; - return (ENOMEM); - } - } - - if (flags & BUS_DMA_ZERO) - mflags |= M_ZERO; + /* Choose a busdma buffer allocator based on memory type flags. */ if (flags & BUS_DMA_COHERENT) { memattr = VM_MEMATTR_UNCACHEABLE; ba = coherent_allocator; - (*mapp)->flags |= DMAMAP_COHERENT; + map->flags |= DMAMAP_COHERENT; } else { memattr = VM_MEMATTR_DEFAULT; ba = standard_allocator; - (*mapp)->flags = 0; } /* @@ -702,7 +783,7 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi * constraints is something that only the contig allocator can fulfill. */ if (bufzone != NULL && dmat->alignment <= bufzone->size && - !_bus_dma_can_bounce(dmat->lowaddr, dmat->highaddr)) { + !exclusion_bounce(dmat)) { *vaddr = uma_zalloc(bufzone->umazone, mflags); } else if (dmat->nsegments >= btoc(dmat->maxsize) && dmat->alignment <= PAGE_SIZE && dmat->boundary == 0) { @@ -718,12 +799,16 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi if (*vaddr == NULL) { CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", __func__, dmat, dmat->flags, ENOMEM); - free(*mapp, M_DEVBUF); + free(map, M_DEVBUF); *mapp = NULL; return (ENOMEM); } else if ((uintptr_t)*vaddr & (dmat->alignment - 1)) { printf("bus_dmamem_alloc failed to align memory properly.\n"); } + if (map->flags & DMAMAP_COHERENT) + atomic_add_32(&maps_coherent, 1); + atomic_add_32(&maps_dmamem, 1); + atomic_add_32(&maps_total, 1); dmat->map_count++; CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", @@ -751,12 +836,16 @@ bus_dmamem_free(bus_dma_tag_t dmat, void bufzone = busdma_bufalloc_findzone(ba, dmat->maxsize); if (bufzone != NULL && dmat->alignment <= bufzone->size && - !_bus_dma_can_bounce(dmat->lowaddr, dmat->highaddr)) + !exclusion_bounce(dmat)) uma_zfree(bufzone->umazone, vaddr); else kmem_free(kernel_arena, (vm_offset_t)vaddr, dmat->maxsize); dmat->map_count--; + if (map->flags & DMAMAP_COHERENT) + atomic_subtract_32(&maps_coherent, 1); + atomic_subtract_32(&maps_total, 1); + atomic_subtract_32(&maps_dmamem, 1); free(map, M_DEVBUF); CTR3(KTR_BUSDMA, "%s: tag %p flags 0x%x", __func__, dmat, dmat->flags); } @@ -780,8 +869,7 @@ _bus_dmamap_count_phys(bus_dma_tag_t dma curaddr = buf; while (buflen != 0) { sgsize = MIN(buflen, dmat->maxsegsz); - if (run_filter(dmat, curaddr, sgsize, - map->flags & DMAMAP_COHERENT) != 0) { + if (must_bounce(dmat, map, curaddr, sgsize) != 0) { sgsize = MIN(sgsize, PAGE_SIZE); map->pagesneeded++; } @@ -817,10 +905,9 @@ _bus_dmamap_count_pages(bus_dma_tag_t dm paddr = pmap_kextract(vaddr); else paddr = pmap_extract(map->pmap, vaddr); - if (run_filter(dmat, paddr, - min(vendaddr - vaddr, - (PAGE_SIZE - ((vm_offset_t)vaddr & PAGE_MASK))), - map->flags & DMAMAP_COHERENT) != 0) { + if (must_bounce(dmat, map, paddr, + min(vendaddr - vaddr, (PAGE_SIZE - ((vm_offset_t)vaddr & + PAGE_MASK)))) != 0) { map->pagesneeded++; } vaddr += (PAGE_SIZE - ((vm_offset_t)vaddr & PAGE_MASK)); @@ -934,12 +1021,15 @@ _bus_dmamap_load_phys(bus_dma_tag_t dmat int error; if (segs == NULL) - segs = dmat->segments; + segs = map->segments; + + maploads_total++; + maploads_physmem++; - if (((map->flags & DMAMAP_COHERENT) == 0) || - (dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) { + if (might_bounce(dmat, map, buflen, buflen)) { _bus_dmamap_count_phys(dmat, map, buf, buflen, flags); if (map->pagesneeded != 0) { + maploads_bounced++; error = _bus_dmamap_reserve_pages(dmat, map, flags); if (error) return (error); @@ -949,10 +1039,8 @@ _bus_dmamap_load_phys(bus_dma_tag_t dmat while (buflen > 0) { curaddr = buf; sgsize = MIN(buflen, dmat->maxsegsz); - if ((((map->flags & DMAMAP_COHERENT) == 0) || - ((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0)) && - map->pagesneeded != 0 && run_filter(dmat, curaddr, - sgsize, map->flags & DMAMAP_COHERENT)) { + if (map->pagesneeded != 0 && must_bounce(dmat, map, curaddr, + sgsize)) { sgsize = MIN(sgsize, PAGE_SIZE); curaddr = add_bounce_page(dmat, map, 0, curaddr, sgsize); @@ -1004,15 +1092,26 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm struct sync_list *sl; int error; + maploads_total++; + if (map->flags & DMAMAP_COHERENT) + maploads_coherent++; + if (map->flags & DMAMAP_DMAMEM_ALLOC) + maploads_dmamem++; + if (segs == NULL) - segs = dmat->segments; + segs = map->segments; + + if (flags & BUS_DMA_LOAD_MBUF) { + maploads_mbuf++; + map->flags |= DMAMAP_MBUF; + } map->pmap = pmap; - if (!(map->flags & DMAMAP_COHERENT) || - (dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) { + if (might_bounce(dmat, map, (bus_addr_t)buf, buflen)) { _bus_dmamap_count_pages(dmat, map, buf, buflen, flags); if (map->pagesneeded != 0) { + maploads_bounced++; error = _bus_dmamap_reserve_pages(dmat, map, flags); if (error) return (error); @@ -1040,10 +1139,8 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm if (buflen < sgsize) sgsize = buflen; - if ((((map->flags & DMAMAP_COHERENT) == 0) || - ((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0)) && - map->pagesneeded != 0 && run_filter(dmat, curaddr, - sgsize, map->flags & DMAMAP_COHERENT)) { + if (map->pagesneeded != 0 && must_bounce(dmat, map, curaddr, + sgsize)) { curaddr = add_bounce_page(dmat, map, vaddr, curaddr, sgsize); } else { @@ -1100,7 +1197,7 @@ _bus_dmamap_complete(bus_dma_tag_t dmat, { if (segs == NULL) - segs = dmat->segments; + segs = map->segments; return (segs); } @@ -1126,6 +1223,7 @@ _bus_dmamap_unload(bus_dma_tag_t dmat, b map->pagesneeded = 0; } map->sync_count = 0; + map->flags &= ~DMAMAP_MBUF; } #ifdef notyetbounceuser @@ -1204,12 +1302,12 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus while (bpage != NULL) { if (bpage->datavaddr != 0) bcopy((void *)bpage->datavaddr, - (void *)bpage->vaddr, - bpage->datacount); + (void *)bpage->vaddr, + bpage->datacount); else physcopyout(bpage->dataaddr, - (void *)bpage->vaddr, - bpage->datacount); + (void *)bpage->vaddr, + bpage->datacount); cpu_dcache_wb_range((vm_offset_t)bpage->vaddr, bpage->datacount); l2cache_wb_range((vm_offset_t)bpage->vaddr, @@ -1251,12 +1349,12 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus l2cache_inv_range(startv, startp, len); if (bpage->datavaddr != 0) bcopy((void *)bpage->vaddr, - (void *)bpage->datavaddr, - bpage->datacount); + (void *)bpage->datavaddr, + bpage->datacount); else physcopyin((void *)bpage->vaddr, - bpage->dataaddr, - bpage->datacount); + bpage->dataaddr, + bpage->datacount); bpage = STAILQ_NEXT(bpage, links); } dmat->bounce_zone->total_bounced++; @@ -1345,8 +1443,8 @@ alloc_bounce_zone(bus_dma_tag_t dmat) /* Check to see if we already have a suitable zone */ STAILQ_FOREACH(bz, &bounce_zone_list, links) { - if ((dmat->alignment <= bz->alignment) - && (dmat->lowaddr >= bz->lowaddr)) { + if ((dmat->alignment <= bz->alignment) && + (dmat->lowaddr >= bz->lowaddr)) { dmat->bounce_zone = bz; return (0); } @@ -1397,7 +1495,7 @@ alloc_bounce_zone(bus_dma_tag_t dmat) SYSCTL_ADD_INT(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, "total_bounced", CTLFLAG_RD, &bz->total_bounced, 0, - "Total bounce requests"); + "Total bounce requests (pages bounced)"); SYSCTL_ADD_INT(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, "total_deferred", CTLFLAG_RD, &bz->total_deferred, 0, @@ -1424,15 +1522,12 @@ alloc_bounce_pages(bus_dma_tag_t dmat, u struct bounce_page *bpage; bpage = (struct bounce_page *)malloc(sizeof(*bpage), M_DEVBUF, - M_NOWAIT | M_ZERO); + M_NOWAIT | M_ZERO); if (bpage == NULL) break; bpage->vaddr = (vm_offset_t)contigmalloc(PAGE_SIZE, M_DEVBUF, - M_NOWAIT, 0ul, - bz->lowaddr, - PAGE_SIZE, - 0); + M_NOWAIT, 0ul, bz->lowaddr, PAGE_SIZE, 0); if (bpage->vaddr == 0) { free(bpage, M_DEVBUF); break; @@ -1538,7 +1633,7 @@ free_bounce_page(bus_dma_tag_t dmat, str if (reserve_bounce_pages(map->dmat, map, 1) == 0) { STAILQ_REMOVE_HEAD(&bounce_map_waitinglist, links); STAILQ_INSERT_TAIL(&bounce_map_callbacklist, - map, links); + map, links); busdma_swi_pending = 1; bz->total_deferred++; swi_sched(vm_ih, 0); @@ -1558,10 +1653,10 @@ busdma_swi(void) STAILQ_REMOVE_HEAD(&bounce_map_callbacklist, links); mtx_unlock(&bounce_lock); dmat = map->dmat; - (dmat->lockfunc)(dmat->lockfuncarg, BUS_DMA_LOCK); + dmat->lockfunc(dmat->lockfuncarg, BUS_DMA_LOCK); bus_dmamap_load_mem(map->dmat, map, &map->mem, map->callback, - map->callback_arg, BUS_DMA_WAITOK); - (dmat->lockfunc)(dmat->lockfuncarg, BUS_DMA_UNLOCK); + map->callback_arg, BUS_DMA_WAITOK); + dmat->lockfunc(dmat->lockfuncarg, BUS_DMA_UNLOCK); mtx_lock(&bounce_lock); } mtx_unlock(&bounce_lock); From ian at FreeBSD.org Mon Aug 11 01:22:11 2014 From: ian at FreeBSD.org (Ian Lepore) Date: Mon, 11 Aug 2014 01:22:10 +0000 (UTC) Subject: svn commit: r269795 - stable/10/sys/dev/mmc Message-ID: <53e81ac2.2efa.2b4eb541@svn.freebsd.org> Author: ian Date: Mon Aug 11 01:22:10 2014 New Revision: 269795 URL: http://svnweb.freebsd.org/changeset/base/269795 Log: MFC r269341: Populate disk->d_ident with the sd or mmc card's serial number. Modified: stable/10/sys/dev/mmc/mmc.c stable/10/sys/dev/mmc/mmcsd.c stable/10/sys/dev/mmc/mmcvar.h Modified: stable/10/sys/dev/mmc/mmc.c ============================================================================== --- stable/10/sys/dev/mmc/mmc.c Mon Aug 11 01:10:15 2014 (r269794) +++ stable/10/sys/dev/mmc/mmc.c Mon Aug 11 01:22:10 2014 (r269795) @@ -102,6 +102,7 @@ struct mmc_ivars { uint32_t hs_tran_speed; /* Max speed in high speed mode */ uint32_t erase_sector; /* Card native erase sector size */ char card_id_string[64];/* Formatted CID info (serial, MFG, etc) */ + char card_sn_string[16];/* Formatted serial # for disk->d_ident */ }; #define CMD_RETRIES 3 @@ -887,6 +888,9 @@ mmc_format_card_id_string(struct mmc_iva * mmcsd0: 968MB at mmc0 * 22.5MHz/4bit/128-block * + * Also format just the card serial number, which the mmcsd driver will + * use as the disk->d_ident string. + * * The card_id_string in mmc_ivars is currently allocated as 64 bytes, * and our max formatted length is currently 55 bytes if every field * contains the largest value. @@ -900,8 +904,10 @@ mmc_format_card_id_string(struct mmc_iva snprintf(oidstr, sizeof(oidstr), "%c%c", c1, c2); else snprintf(oidstr, sizeof(oidstr), "0x%04x", ivar->cid.oid); + snprintf(ivar->card_sn_string, sizeof(ivar->card_sn_string), + "%08X", ivar->cid.psn); snprintf(ivar->card_id_string, sizeof(ivar->card_id_string), - "%s%s %s %d.%d SN %u MFG %02d/%04d by %d %s", + "%s%s %s %d.%d SN %08X MFG %02d/%04d by %d %s", ivar->mode == mode_sd ? "SD" : "MMC", ivar->high_cap ? "HC" : "", ivar->cid.pnm, ivar->cid.prv >> 4, ivar->cid.prv & 0x0f, ivar->cid.psn, ivar->cid.mdt_month, ivar->cid.mdt_year, @@ -1698,6 +1704,9 @@ mmc_read_ivar(device_t bus, device_t chi case MMC_IVAR_CARD_ID_STRING: *(char **)result = ivar->card_id_string; break; + case MMC_IVAR_CARD_SN_STRING: + *(char **)result = ivar->card_sn_string; + break; } return (0); } Modified: stable/10/sys/dev/mmc/mmcsd.c ============================================================================== --- stable/10/sys/dev/mmc/mmcsd.c Mon Aug 11 01:10:15 2014 (r269794) +++ stable/10/sys/dev/mmc/mmcsd.c Mon Aug 11 01:22:10 2014 (r269795) @@ -163,6 +163,9 @@ mmcsd_attach(device_t dev) d->d_unit = device_get_unit(dev); d->d_flags = DISKFLAG_CANDELETE; d->d_delmaxsize = mmc_get_erase_sector(dev) * d->d_sectorsize * 1; /* conservative */ + strlcpy(d->d_ident, mmc_get_card_sn_string(dev), sizeof(d->d_ident)); + strlcpy(d->d_descr, mmc_get_card_id_string(dev), sizeof(d->d_descr)); + /* * Display in most natural units. There's no cards < 1MB. The SD * standard goes to 2GiB due to its reliance on FAT, but the data @@ -188,7 +191,7 @@ mmcsd_attach(device_t dev) speed = mmcbr_get_clock(device_get_parent(dev)); maxblocks = mmc_get_max_data(dev); device_printf(dev, "%ju%cB <%s>%s at %s %d.%01dMHz/%dbit/%d-block\n", - mb, unit, mmc_get_card_id_string(dev), + mb, unit, d->d_descr, mmc_get_read_only(dev) ? " (read-only)" : "", device_get_nameunit(device_get_parent(dev)), speed / 1000000, (speed / 100000) % 10, Modified: stable/10/sys/dev/mmc/mmcvar.h ============================================================================== --- stable/10/sys/dev/mmc/mmcvar.h Mon Aug 11 01:10:15 2014 (r269794) +++ stable/10/sys/dev/mmc/mmcvar.h Mon Aug 11 01:22:10 2014 (r269795) @@ -69,11 +69,12 @@ enum mmc_device_ivars { MMC_IVAR_BUS_WIDTH, MMC_IVAR_ERASE_SECTOR, MMC_IVAR_MAX_DATA, - MMC_IVAR_CARD_ID_STRING + MMC_IVAR_CARD_ID_STRING, + MMC_IVAR_CARD_SN_STRING, }; /* - * Simplified accessors for pci devices + * Simplified accessors for mmc devices */ #define MMC_ACCESSOR(var, ivar, type) \ __BUS_ACCESSOR(mmc, var, MMC, ivar, type) @@ -90,5 +91,6 @@ MMC_ACCESSOR(bus_width, BUS_WIDTH, int) MMC_ACCESSOR(erase_sector, ERASE_SECTOR, int) MMC_ACCESSOR(max_data, MAX_DATA, int) MMC_ACCESSOR(card_id_string, CARD_ID_STRING, const char *) +MMC_ACCESSOR(card_sn_string, CARD_SN_STRING, const char *) #endif /* DEV_MMC_MMCVAR_H */ From ian at FreeBSD.org Mon Aug 11 01:29:32 2014 From: ian at FreeBSD.org (Ian Lepore) Date: Mon, 11 Aug 2014 01:29:29 +0000 (UTC) Subject: svn commit: r269796 - in stable/10/sys: arm/arm arm/include libkern/arm Message-ID: <53e81c79.2f47.107c3798@svn.freebsd.org> Author: ian Date: Mon Aug 11 01:29:28 2014 New Revision: 269796 URL: http://svnweb.freebsd.org/changeset/base/269796 Log: MFC r269390: Fix unwind info in hand-written asm (avoid nested functions). Modified: stable/10/sys/arm/arm/cpufunc_asm_arm10.S stable/10/sys/arm/arm/cpufunc_asm_arm9.S stable/10/sys/arm/arm/cpufunc_asm_armv5.S stable/10/sys/arm/arm/cpufunc_asm_armv6.S stable/10/sys/arm/arm/cpufunc_asm_armv7.S stable/10/sys/arm/arm/cpufunc_asm_xscale.S stable/10/sys/arm/arm/cpufunc_asm_xscale_c3.S stable/10/sys/arm/arm/exception.S stable/10/sys/arm/arm/fusu.S stable/10/sys/arm/arm/locore.S stable/10/sys/arm/arm/setstack.s stable/10/sys/arm/arm/support.S stable/10/sys/arm/include/asm.h stable/10/sys/libkern/arm/divsi3.S Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/cpufunc_asm_arm10.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_arm10.S Mon Aug 11 01:22:10 2014 (r269795) +++ stable/10/sys/arm/arm/cpufunc_asm_arm10.S Mon Aug 11 01:29:28 2014 (r269796) @@ -209,7 +209,7 @@ ENTRY_NP(arm10_idcache_wbinv_all) mcr p15, 0, r0, c7, c5, 0 /* Flush I cache */ /* Fall through to purge Dcache. */ -ENTRY(arm10_dcache_wbinv_all) +EENTRY(arm10_dcache_wbinv_all) .Larm10_dcache_wbinv_all: ldr ip, .Larm10_cache_data ldmia ip, {s_max, i_max, s_inc, i_inc} @@ -223,8 +223,8 @@ ENTRY(arm10_dcache_wbinv_all) bhs .Lnext_set_inv /* Next set */ mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ bx lr +EEND(arm10_dcache_wbinv_all) END(arm10_idcache_wbinv_all) -END(arm10_dcache_wbinv_all) .Larm10_cache_data: .word _C_LABEL(arm10_dcache_sets_max) Modified: stable/10/sys/arm/arm/cpufunc_asm_arm9.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_arm9.S Mon Aug 11 01:22:10 2014 (r269795) +++ stable/10/sys/arm/arm/cpufunc_asm_arm9.S Mon Aug 11 01:29:28 2014 (r269796) @@ -197,7 +197,7 @@ ENTRY_NP(arm9_idcache_wbinv_all) mcr p15, 0, r0, c7, c5, 0 /* Flush I cache */ /* Fall through */ -ENTRY(arm9_dcache_wbinv_all) +EENTRY(arm9_dcache_wbinv_all) .Larm9_dcache_wbinv_all: ldr ip, .Larm9_cache_data ldmia ip, {s_max, i_max, s_inc, i_inc} @@ -210,8 +210,8 @@ ENTRY(arm9_dcache_wbinv_all) subs s_max, s_max, s_inc bhs .Lnext_set_inv /* Next set */ mov pc, lr +EEND(arm9_dcache_wbinv_all) END(arm9_idcache_wbinv_all) -END(arm9_dcache_wbinv_all) .Larm9_cache_data: .word _C_LABEL(arm9_dcache_sets_max) Modified: stable/10/sys/arm/arm/cpufunc_asm_armv5.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_armv5.S Mon Aug 11 01:22:10 2014 (r269795) +++ stable/10/sys/arm/arm/cpufunc_asm_armv5.S Mon Aug 11 01:29:28 2014 (r269796) @@ -194,6 +194,7 @@ ENTRY(armv5_idcache_wbinv_range) END(armv5_idcache_wbinv_range) ENTRY_NP(armv5_idcache_wbinv_all) +armv5_idcache_wbinv_all: .Larmv5_idcache_wbinv_all: /* * We assume that the code here can never be out of sync with the @@ -203,7 +204,7 @@ ENTRY_NP(armv5_idcache_wbinv_all) mcr p15, 0, r0, c7, c5, 0 /* Flush I cache */ /* Fall through to purge Dcache. */ -ENTRY(armv5_dcache_wbinv_all) +EENTRY(armv5_dcache_wbinv_all) .Larmv5_dcache_wbinv_all: ldr ip, .Larmv5_cache_data ldmia ip, {s_max, i_max, s_inc, i_inc} @@ -219,8 +220,8 @@ ENTRY(armv5_dcache_wbinv_all) bpl 1b /* Next set */ mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ RET +EEND(armv5_dcache_wbinv_all) END(armv5_idcache_wbinv_all) -END(armv5_dcache_wbinv_all) .Larmv5_cache_data: .word _C_LABEL(armv5_dcache_sets_max) Modified: stable/10/sys/arm/arm/cpufunc_asm_armv6.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_armv6.S Mon Aug 11 01:22:10 2014 (r269795) +++ stable/10/sys/arm/arm/cpufunc_asm_armv6.S Mon Aug 11 01:29:28 2014 (r269796) @@ -137,12 +137,12 @@ ENTRY_NP(armv6_idcache_wbinv_all) /* Fall through to purge Dcache. */ /* LINTSTUB: void armv6_dcache_wbinv_all(void); */ -ENTRY(armv6_dcache_wbinv_all) +EENTRY(armv6_dcache_wbinv_all) mcr p15, 0, r0, c7, c14, 0 /* clean & invalidate D cache */ mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ RET +EEND(armv6_dcache_wbinv_all) END(armv6_idcache_wbinv_all) -END(armv6_dcache_wbinv_all) ENTRY(armv6_idcache_inv_all) mov r0, #0 Modified: stable/10/sys/arm/arm/cpufunc_asm_armv7.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_armv7.S Mon Aug 11 01:22:10 2014 (r269795) +++ stable/10/sys/arm/arm/cpufunc_asm_armv7.S Mon Aug 11 01:29:28 2014 (r269796) @@ -358,7 +358,7 @@ ENTRY(armv7_idcache_inv_all) mcr p15, 0, r0, c7, c5, 0 @ invalidate instruction+branch cache isb @ instruction sync barrier bx lr @ return -END(armv7_l1cache_inv_all) +END(armv7_idcache_inv_all) ENTRY_NP(armv7_sleep) dsb Modified: stable/10/sys/arm/arm/cpufunc_asm_xscale.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_xscale.S Mon Aug 11 01:22:10 2014 (r269795) +++ stable/10/sys/arm/arm/cpufunc_asm_xscale.S Mon Aug 11 01:29:28 2014 (r269796) @@ -306,11 +306,12 @@ _C_LABEL(xscale_minidata_clean_size): XSCALE_CACHE_CLEAN_UNBLOCK ENTRY_NP(xscale_cache_syncI) -ENTRY_NP(xscale_cache_purgeID) + +EENTRY_NP(xscale_cache_purgeID) mcr p15, 0, r0, c7, c5, 0 /* flush I cache (D cleaned below) */ -ENTRY_NP(xscale_cache_cleanID) -ENTRY_NP(xscale_cache_purgeD) -ENTRY(xscale_cache_cleanD) +EENTRY_NP(xscale_cache_cleanID) +EENTRY_NP(xscale_cache_purgeD) +EENTRY(xscale_cache_cleanD) XSCALE_CACHE_CLEAN_PROLOGUE 1: subs r0, r0, #32 @@ -326,11 +327,11 @@ ENTRY(xscale_cache_cleanD) XSCALE_CACHE_CLEAN_EPILOGUE RET +EEND(xscale_cache_cleanD) +EEND(xscale_cache_purgeD) +EEND(xscale_cache_cleanID) +EEND(xscale_cache_purgeID) END(xscale_cache_syncI) -END(xscale_cache_purgeID) -END(xscale_cache_cleanID) -END(xscale_cache_purgeD) -END(xscale_cache_cleanD) /* * Clean the mini-data cache. @@ -374,7 +375,7 @@ END(xscale_cache_purgeD_E) */ /* xscale_cache_syncI is identical to xscale_cache_purgeID */ -ENTRY(xscale_cache_cleanID_rng) +EENTRY(xscale_cache_cleanID_rng) ENTRY(xscale_cache_cleanD_rng) cmp r1, #0x4000 bcs _C_LABEL(xscale_cache_cleanID) @@ -393,7 +394,7 @@ ENTRY(xscale_cache_cleanD_rng) mcr p15, 0, r0, c7, c10, 4 /* drain write buffer */ CPWAIT_AND_RETURN(r0) -END(xscale_cache_cleanID_rng) +/*END(xscale_cache_cleanID_rng)*/ END(xscale_cache_cleanD_rng) ENTRY(xscale_cache_purgeID_rng) Modified: stable/10/sys/arm/arm/cpufunc_asm_xscale_c3.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_xscale_c3.S Mon Aug 11 01:22:10 2014 (r269795) +++ stable/10/sys/arm/arm/cpufunc_asm_xscale_c3.S Mon Aug 11 01:29:28 2014 (r269796) @@ -143,11 +143,12 @@ __FBSDID("$FreeBSD$"); ENTRY_NP(xscalec3_cache_syncI) -ENTRY_NP(xscalec3_cache_purgeID) +xscalec3_cache_purgeID: +EENTRY_NP(xscalec3_cache_purgeID) mcr p15, 0, r0, c7, c5, 0 /* flush I cache (D cleaned below) */ -ENTRY_NP(xscalec3_cache_cleanID) -ENTRY_NP(xscalec3_cache_purgeD) -ENTRY(xscalec3_cache_cleanD) +EENTRY_NP(xscalec3_cache_cleanID) +EENTRY_NP(xscalec3_cache_purgeD) +EENTRY(xscalec3_cache_cleanD) XSCALE_CACHE_CLEAN_BLOCK mov r0, #0 @@ -168,11 +169,11 @@ ENTRY(xscalec3_cache_cleanD) mcr p15, 0, r0, c7, c10, 4 /* drain write buffer */ RET +EEND(xscalec3_cache_purgeID) +EEND(xscalec3_cache_cleanID) +EEND(xscalec3_cache_purgeD) +EEND(xscalec3_cache_cleanD) END(xscalec3_cache_syncI) -END(xscalec3_cache_purgeID) -END(xscalec3_cache_cleanID) -END(xscalec3_cache_purgeD) -END(xscalec3_cache_cleanD) ENTRY(xscalec3_cache_purgeID_rng) @@ -238,7 +239,7 @@ ENTRY(xscalec3_cache_purgeD_rng) END(xscalec3_cache_purgeD_rng) ENTRY(xscalec3_cache_cleanID_rng) -ENTRY(xscalec3_cache_cleanD_rng) +EENTRY(xscalec3_cache_cleanD_rng) cmp r1, #0x4000 bcs _C_LABEL(xscalec3_cache_cleanID) @@ -257,8 +258,8 @@ ENTRY(xscalec3_cache_cleanD_rng) mcr p15, 0, r0, c7, c10, 4 /* drain write buffer */ CPWAIT_AND_RETURN(r0) +EEND(xscalec3_cache_cleanD_rng) END(xscalec3_cache_cleanID_rng) -END(xscalec3_cache_cleanD_rng) ENTRY(xscalec3_l2cache_purge) /* Clean-up the L2 cache */ Modified: stable/10/sys/arm/arm/exception.S ============================================================================== --- stable/10/sys/arm/arm/exception.S Mon Aug 11 01:22:10 2014 (r269795) +++ stable/10/sys/arm/arm/exception.S Mon Aug 11 01:29:28 2014 (r269796) @@ -280,12 +280,12 @@ ASENTRY_NP(swi_entry) * that a newly created thread appears to return from a SWI just like * the parent thread that created it. */ -ASENTRY_NP(swi_exit) +ASEENTRY_NP(swi_exit) DO_AST /* Handle pending signals. */ PULLFRAME /* Deallocate trapframe. */ movs pc, lr /* Return to userland. */ STOP_UNWINDING /* Don't unwind into user mode. */ -END(swi_exit) +EEND(swi_exit) END(swi_entry) /* Modified: stable/10/sys/arm/arm/fusu.S ============================================================================== --- stable/10/sys/arm/arm/fusu.S Mon Aug 11 01:22:10 2014 (r269795) +++ stable/10/sys/arm/arm/fusu.S Mon Aug 11 01:29:28 2014 (r269796) @@ -54,8 +54,8 @@ __FBSDID("$FreeBSD$"); * Fetch an int from the user's address space. */ -ENTRY_NP(casuword32) ENTRY(casuword) +EENTRY_NP(casuword32) GET_PCB(r3) ldr r3, [r3] @@ -91,7 +91,7 @@ ENTRY(casuword) mov r1, #0x00000000 str r1, [r3, #PCB_ONFAULT] RET -END(casuword32) +EEND(casuword32) END(casuword) /* @@ -110,8 +110,8 @@ END(casuword) * Fetch an int from the user's address space. */ -ENTRY_NP(fuword32) ENTRY(fuword) +EENTRY_NP(fuword32) GET_PCB(r2) ldr r2, [r2] @@ -277,8 +277,8 @@ fusupcbfaulttext: * Store an int in the user's address space. */ -ENTRY_NP(suword32) ENTRY(suword) +EENTRY_NP(suword32) GET_PCB(r2) ldr r2, [r2] @@ -390,4 +390,3 @@ ENTRY(subyte) str r0, [r2, #PCB_ONFAULT] RET END(subyte) - Modified: stable/10/sys/arm/arm/locore.S ============================================================================== --- stable/10/sys/arm/arm/locore.S Mon Aug 11 01:22:10 2014 (r269795) +++ stable/10/sys/arm/arm/locore.S Mon Aug 11 01:29:28 2014 (r269796) @@ -75,7 +75,8 @@ __FBSDID("$FreeBSD$"); * For both types of boot we gather up the args, put them in a struct arm_boot_params * structure and pass that to initarm. */ -ENTRY_NP(btext) + .globl btext +btext: ASENTRY_NP(_start) STOP_UNWINDING /* Can't unwind into the bootloader! */ @@ -261,7 +262,6 @@ virt_done: adr r0, .Lmainreturned b _C_LABEL(panic) /* NOTREACHED */ -END(btext) END(_start) /* @@ -524,7 +524,7 @@ ENTRY_NP(sigcode) /* Branch back to retry SYS_sigreturn */ b . - 16 - +END(sigcode) .word SYS_sigreturn .word SYS_exit @@ -536,5 +536,5 @@ ENTRY_NP(sigcode) .global szsigcode szsigcode: .long esigcode-sigcode -END(sigcode) + /* End of locore.S */ Modified: stable/10/sys/arm/arm/setstack.s ============================================================================== --- stable/10/sys/arm/arm/setstack.s Mon Aug 11 01:22:10 2014 (r269795) +++ stable/10/sys/arm/arm/setstack.s Mon Aug 11 01:29:28 2014 (r269796) @@ -71,7 +71,7 @@ ENTRY(set_stackptr) msr cpsr_fsxc, r3 /* Restore the old mode */ mov pc, lr /* Exit */ - +END(set_stackptr) /* To get the stack pointer for a particular mode we must switch * to that mode copy the banked r13 and then switch back. * This routine provides an easy way of doing this for any mode @@ -90,5 +90,5 @@ ENTRY(get_stackptr) msr cpsr_fsxc, r3 /* Restore the old mode */ mov pc, lr /* Exit */ - +END(get_stackptr) /* End of setstack.S */ Modified: stable/10/sys/arm/arm/support.S ============================================================================== --- stable/10/sys/arm/arm/support.S Mon Aug 11 01:22:10 2014 (r269795) +++ stable/10/sys/arm/arm/support.S Mon Aug 11 01:29:28 2014 (r269796) @@ -130,7 +130,7 @@ ENTRY(bzero) .Lnormal0: mov r3, #0x00 b do_memset - +EEND(bzero) /* LINTSTUB: Func: void *memset(void *, int, size_t) */ ENTRY(memset) and r3, r1, #0xff /* We deal with bytes */ @@ -276,7 +276,6 @@ do_memset: strgeb r3, [ip], #0x01 /* Set another byte */ strgtb r3, [ip] /* and a third */ RET /* Exit */ -END(bzero) END(memset) ENTRY(bcmp) @@ -394,7 +393,7 @@ ENTRY(bcopy) eor r0, r1, r0 eor r1, r0, r1 eor r0, r1, r0 -ENTRY(memmove) +EENTRY(memmove) /* Do the buffers overlap? */ cmp r0, r1 RETeq /* Bail now if src/dst are the same */ @@ -931,8 +930,8 @@ ENTRY(memmove) .Lmemmove_bsrcul1l4: add r1, r1, #1 b .Lmemmove_bl4 +EEND(memmove) END(bcopy) -END(memmove) #if !defined(_ARM_ARCH_5E) ENTRY(memcpy) @@ -2945,13 +2944,17 @@ END(memcpy) ENTRY(user) nop +END(user) ENTRY(btrap) nop +END(btrap) ENTRY(etrap) nop +END(etrap) ENTRY(bintr) nop +END(bintr) ENTRY(eintr) nop - +END(eintr) #endif Modified: stable/10/sys/arm/include/asm.h ============================================================================== --- stable/10/sys/arm/include/asm.h Mon Aug 11 01:22:10 2014 (r269795) +++ stable/10/sys/arm/include/asm.h Mon Aug 11 01:29:28 2014 (r269796) @@ -74,9 +74,20 @@ #define GLOBAL(X) .globl x #define _ENTRY(x) \ .text; _ALIGN_TEXT; .globl x; .type x,_ASM_TYPE_FUNCTION; x: _FNSTART - #define _END(x) .size x, . - x; _FNEND +/* + * EENTRY()/EEND() mark "extra" entry/exit points from a function. + * The unwind info cannot handle the concept of a nested function, or a function + * with multiple .fnstart directives, but some of our assembler code is written + * with multiple labels to allow entry at several points. The EENTRY() macro + * defines such an extra entry point without a new .fnstart, so that it's + * basically just a label that you can jump to. The EEND() macro does nothing + * at all, except document the exit point associated with the same-named entry. + */ +#define _EENTRY(x) .globl x; .type x,_ASM_TYPE_FUNCTION; x: +#define _EEND(x) /* nothing */ + #ifdef GPROF # define _PROF_PROLOGUE \ mov ip, lr; bl __mcount @@ -85,11 +96,17 @@ #endif #define ENTRY(y) _ENTRY(_C_LABEL(y)); _PROF_PROLOGUE +#define EENTRY(y) _EENTRY(_C_LABEL(y)); _PROF_PROLOGUE #define ENTRY_NP(y) _ENTRY(_C_LABEL(y)) +#define EENTRY_NP(y) _EENTRY(_C_LABEL(y)) #define END(y) _END(_C_LABEL(y)) +#define EEND(y) #define ASENTRY(y) _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE +#define ASEENTRY(y) _EENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE #define ASENTRY_NP(y) _ENTRY(_ASM_LABEL(y)) +#define ASEENTRY_NP(y) _EENTRY(_ASM_LABEL(y)) #define ASEND(y) _END(_ASM_LABEL(y)) +#define ASEEND(y) #define ASMSTR .asciz Modified: stable/10/sys/libkern/arm/divsi3.S ============================================================================== --- stable/10/sys/libkern/arm/divsi3.S Mon Aug 11 01:22:10 2014 (r269795) +++ stable/10/sys/libkern/arm/divsi3.S Mon Aug 11 01:29:28 2014 (r269796) @@ -51,11 +51,11 @@ ENTRY_NP(__modsi3) RET END(__modsi3) +ENTRY_NP(__udivsi3) #ifdef __ARM_EABI__ -ENTRY_NP(__aeabi_uidiv) -ENTRY_NP(__aeabi_uidivmod) +EENTRY_NP(__aeabi_uidiv) +EENTRY_NP(__aeabi_uidivmod) #endif -ENTRY_NP(__udivsi3) .L_udivide: /* r0 = r0 / r1; r1 = r0 % r1 */ eor r0, r1, r0 eor r1, r0, r1 @@ -77,16 +77,16 @@ ENTRY_NP(__udivsi3) mov r1, #0 RET #ifdef __ARM_EABI__ -END(__aeabi_uidiv) -END(__aeabi_uidivmod) +EEND(__aeabi_uidiv) +EEND(__aeabi_uidivmod) #endif END(__udivsi3) +ENTRY_NP(__divsi3) #ifdef __ARM_EABI__ -ENTRY_NP(__aeabi_idiv) -ENTRY_NP(__aeabi_idivmod) +EENTRY_NP(__aeabi_idiv) +EENTRY_NP(__aeabi_idivmod) #endif -ENTRY_NP(__divsi3) .L_divide: /* r0 = r0 / r1; r1 = r0 % r1 */ eor r0, r1, r0 eor r1, r0, r1 @@ -401,8 +401,8 @@ ENTRY_NP(__divsi3) mov r0, r3 RET #ifdef __ARM_EABI__ -END(__aeabi_idiv) -END(__aeabi_idivmod) +EEND(__aeabi_idiv) +EEND(__aeabi_idivmod) #endif END(__divsi3) From ian at FreeBSD.org Mon Aug 11 01:48:01 2014 From: ian at FreeBSD.org (Ian Lepore) Date: Mon, 11 Aug 2014 01:48:00 +0000 (UTC) Subject: svn commit: r269797 - in stable/10: contrib/binutils/gas/config sys/arm/ti Message-ID: <53e820d1.2928.482367bc@svn.freebsd.org> Author: ian Date: Mon Aug 11 01:48:00 2014 New Revision: 269797 URL: http://svnweb.freebsd.org/changeset/base/269797 Log: MFC r269393, r269394, r269395: Fix parsing of arch extensions in binutils/gas. Use ".arch_extension sec" when compiling ARM TI code that uses the security extensions. Modified: stable/10/contrib/binutils/gas/config/tc-arm.c stable/10/sys/arm/ti/ti_smc.S Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/binutils/gas/config/tc-arm.c ============================================================================== --- stable/10/contrib/binutils/gas/config/tc-arm.c Mon Aug 11 01:29:28 2014 (r269796) +++ stable/10/contrib/binutils/gas/config/tc-arm.c Mon Aug 11 01:48:00 2014 (r269797) @@ -3837,6 +3837,7 @@ s_arm_eabi_attribute (int ignored ATTRIB #endif /* OBJ_ELF */ static void s_arm_arch (int); +static void s_arm_arch_extension (int); static void s_arm_object_arch (int); static void s_arm_cpu (int); static void s_arm_fpu (int); @@ -3891,6 +3892,7 @@ const pseudo_typeS md_pseudo_table[] = { "syntax", s_syntax, 0 }, { "cpu", s_arm_cpu, 0 }, { "arch", s_arm_arch, 0 }, + { "arch_extension", s_arm_arch_extension, 0 }, { "object_arch", s_arm_object_arch, 0 }, { "fpu", s_arm_fpu, 0 }, #ifdef OBJ_ELF @@ -20154,6 +20156,7 @@ static const struct arm_option_cpu_value {"xscale", ARM_FEATURE (0, ARM_CEXT_XSCALE)}, {"iwmmxt", ARM_FEATURE (0, ARM_CEXT_IWMMXT)}, {"iwmmxt2", ARM_FEATURE (0, ARM_CEXT_IWMMXT2)}, + {"sec", ARM_FEATURE (ARM_EXT_V6Z, 0)}, {NULL, ARM_ARCH_NONE} }; @@ -20337,7 +20340,7 @@ arm_parse_arch (char * str) } for (opt = arm_archs; opt->name != NULL; opt++) - if (streq (opt->name, str)) + if (strncmp (opt->name, str, optlen) == 0) { march_cpu_opt = &opt->value; march_fpu_opt = &opt->default_fpu; @@ -20738,6 +20741,34 @@ s_arm_arch (int ignored ATTRIBUTE_UNUSED ignore_rest_of_line (); } +/* Parse a .arch_extension directive. */ + +static void +s_arm_arch_extension (int ignored ATTRIBUTE_UNUSED) +{ + const struct arm_option_cpu_value_table *opt; + char saved_char; + char *name; + + name = input_line_pointer; + while (*input_line_pointer && !ISSPACE(*input_line_pointer)) + input_line_pointer++; + saved_char = *input_line_pointer; + *input_line_pointer = 0; + + for (opt = arm_extensions; opt->name != NULL; opt++) + if (streq (opt->name, name)) + { + ARM_MERGE_FEATURE_SETS (cpu_variant, cpu_variant, opt->value); + *input_line_pointer = saved_char; + demand_empty_rest_of_line (); + return; + } + + as_bad (_("unknown architecture `%s'\n"), name); + *input_line_pointer = saved_char; + ignore_rest_of_line (); +} /* Parse a .object_arch directive. */ Modified: stable/10/sys/arm/ti/ti_smc.S ============================================================================== --- stable/10/sys/arm/ti/ti_smc.S Mon Aug 11 01:29:28 2014 (r269796) +++ stable/10/sys/arm/ti/ti_smc.S Mon Aug 11 01:48:00 2014 (r269797) @@ -26,7 +26,8 @@ #include __FBSDID("$FreeBSD$"); -.arch armv7a + .arch armv7a + .arch_extension sec /* Issue a smc #0 call */ /* r0 and r1 contains the eventual arguments, r2 contains the function ID */ From ian at FreeBSD.org Mon Aug 11 02:20:25 2014 From: ian at FreeBSD.org (Ian Lepore) Date: Mon, 11 Aug 2014 02:20:24 +0000 (UTC) Subject: svn commit: r269798 - in stable/10/sys: arm/include cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys Message-ID: <53e82868.23cf.4075296f@svn.freebsd.org> Author: ian Date: Mon Aug 11 02:20:24 2014 New Revision: 269798 URL: http://svnweb.freebsd.org/changeset/base/269798 Log: MFC r269403, r269405, r269410, r269414: Add 64-bit atomic ops for armv6, and also for armv4 only in kernel code. Use the new ops in the cddl code (and avoid defining functions with the same names locally). Modified: stable/10/sys/arm/include/atomic.h stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_atomic.c stable/10/sys/cddl/compat/opensolaris/sys/atomic.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/include/atomic.h ============================================================================== --- stable/10/sys/arm/include/atomic.h Mon Aug 11 01:48:00 2014 (r269797) +++ stable/10/sys/arm/include/atomic.h Mon Aug 11 02:20:24 2014 (r269798) @@ -88,6 +88,8 @@ defined (__ARM_ARCH_6T2__) || \ defined (__ARM_ARCH_6Z__) || \ defined (__ARM_ARCH_6ZK__) +#define ARM_HAVE_ATOMIC64 + static __inline void __do_dmb(void) { @@ -146,6 +148,28 @@ atomic_set_32(volatile uint32_t *address } static __inline void +atomic_set_64(volatile uint64_t *p, uint64_t val) +{ + uint64_t tmp; + uint32_t exflag; + + __asm __volatile( + "1: \n" + " ldrexd %[tmp], [%[ptr]]\n" + " orr %Q[tmp], %Q[val]\n" + " orr %R[tmp], %R[val]\n" + " strexd %[exf], %[tmp], [%[ptr]]\n" + " teq %[exf], #0\n" + " it ne \n" + " bne 1b\n" + : [exf] "=&r" (exflag), + [tmp] "=&r" (tmp) + : [ptr] "r" (p), + [val] "r" (val) + : "cc", "memory"); +} + +static __inline void atomic_set_long(volatile u_long *address, u_long setmask) { u_long tmp = 0, tmp2 = 0; @@ -177,6 +201,28 @@ atomic_clear_32(volatile uint32_t *addre } static __inline void +atomic_clear_64(volatile uint64_t *p, uint64_t val) +{ + uint64_t tmp; + uint32_t exflag; + + __asm __volatile( + "1: \n" + " ldrexd %[tmp], [%[ptr]]\n" + " bic %Q[tmp], %Q[val]\n" + " bic %R[tmp], %R[val]\n" + " strexd %[exf], %[tmp], [%[ptr]]\n" + " teq %[exf], #0\n" + " it ne \n" + " bne 1b\n" + : [exf] "=&r" (exflag), + [tmp] "=&r" (tmp) + : [ptr] "r" (p), + [val] "r" (val) + : "cc", "memory"); +} + +static __inline void atomic_clear_long(volatile u_long *address, u_long setmask) { u_long tmp = 0, tmp2 = 0; @@ -213,6 +259,35 @@ atomic_cmpset_32(volatile u_int32_t *p, return (ret); } +static __inline int +atomic_cmpset_64(volatile uint64_t *p, uint64_t cmpval, uint64_t newval) +{ + uint64_t tmp; + uint32_t ret; + + __asm __volatile( + "1: \n" + " ldrexd %[tmp], [%[ptr]]\n" + " teq %Q[tmp], %Q[cmp]\n" + " itee eq \n" + " teqeq %R[tmp], %R[cmp]\n" + " movne %[ret], #0\n" + " bne 2f\n" + " strexd %[ret], %[new], [%[ptr]]\n" + " teq %[ret], #0\n" + " it ne \n" + " bne 1b\n" + " mov %[ret], #1\n" + "2: \n" + : [ret] "=&r" (ret), + [tmp] "=&r" (tmp) + : [ptr] "r" (p), + [cmp] "r" (cmpval), + [new] "r" (newval) + : "cc", "memory"); + return (ret); +} + static __inline u_long atomic_cmpset_long(volatile u_long *p, volatile u_long cmpval, volatile u_long newval) { @@ -244,6 +319,15 @@ atomic_cmpset_acq_32(volatile u_int32_t return (ret); } +static __inline uint64_t +atomic_cmpset_acq_64(volatile uint64_t *p, volatile uint64_t cmpval, volatile uint64_t newval) +{ + uint64_t ret = atomic_cmpset_64(p, cmpval, newval); + + __do_dmb(); + return (ret); +} + static __inline u_long atomic_cmpset_acq_long(volatile u_long *p, volatile u_long cmpval, volatile u_long newval) { @@ -261,6 +345,14 @@ atomic_cmpset_rel_32(volatile u_int32_t return (atomic_cmpset_32(p, cmpval, newval)); } +static __inline uint64_t +atomic_cmpset_rel_64(volatile uint64_t *p, volatile uint64_t cmpval, volatile uint64_t newval) +{ + + __do_dmb(); + return (atomic_cmpset_64(p, cmpval, newval)); +} + static __inline u_long atomic_cmpset_rel_long(volatile u_long *p, volatile u_long cmpval, volatile u_long newval) { @@ -286,6 +378,28 @@ atomic_add_32(volatile u_int32_t *p, u_i } static __inline void +atomic_add_64(volatile uint64_t *p, uint64_t val) +{ + uint64_t tmp; + uint32_t exflag; + + __asm __volatile( + "1: \n" + " ldrexd %[tmp], [%[ptr]]\n" + " adds %Q[tmp], %Q[val]\n" + " adc %R[tmp], %R[val]\n" + " strexd %[exf], %[tmp], [%[ptr]]\n" + " teq %[exf], #0\n" + " it ne \n" + " bne 1b\n" + : [exf] "=&r" (exflag), + [tmp] "=&r" (tmp) + : [ptr] "r" (p), + [val] "r" (val) + : "cc", "memory"); +} + +static __inline void atomic_add_long(volatile u_long *p, u_long val) { u_long tmp = 0, tmp2 = 0; @@ -316,6 +430,28 @@ atomic_subtract_32(volatile u_int32_t *p } static __inline void +atomic_subtract_64(volatile uint64_t *p, uint64_t val) +{ + uint64_t tmp; + uint32_t exflag; + + __asm __volatile( + "1: \n" + " ldrexd %[tmp], [%[ptr]]\n" + " subs %Q[tmp], %Q[val]\n" + " sbc %R[tmp], %R[val]\n" + " strexd %[exf], %[tmp], [%[ptr]]\n" + " teq %[exf], #0\n" + " it ne \n" + " bne 1b\n" + : [exf] "=&r" (exflag), + [tmp] "=&r" (tmp) + : [ptr] "r" (p), + [val] "r" (val) + : "cc", "memory"); +} + +static __inline void atomic_subtract_long(volatile u_long *p, u_long val) { u_long tmp = 0, tmp2 = 0; @@ -334,6 +470,10 @@ ATOMIC_ACQ_REL(clear, 32) ATOMIC_ACQ_REL(add, 32) ATOMIC_ACQ_REL(subtract, 32) ATOMIC_ACQ_REL(set, 32) +ATOMIC_ACQ_REL(clear, 64) +ATOMIC_ACQ_REL(add, 64) +ATOMIC_ACQ_REL(subtract, 64) +ATOMIC_ACQ_REL(set, 64) ATOMIC_ACQ_REL_LONG(clear) ATOMIC_ACQ_REL_LONG(add) ATOMIC_ACQ_REL_LONG(subtract) @@ -392,6 +532,116 @@ atomic_store_rel_32(volatile uint32_t *p *p = v; } +static __inline uint64_t +atomic_fetchadd_64(volatile uint64_t *p, uint64_t val) +{ + uint64_t ret, tmp; + uint32_t exflag; + + __asm __volatile( + "1: \n" + " ldrexd %[ret], [%[ptr]]\n" + " adds %Q[tmp], %Q[ret], %Q[val]\n" + " adc %R[tmp], %R[ret], %R[val]\n" + " strexd %[exf], %[tmp], [%[ptr]]\n" + " teq %[exf], #0\n" + " it ne \n" + " bne 1b\n" + : [ret] "=&r" (ret), + [exf] "=&r" (exflag), + [tmp] "=&r" (tmp) + : [ptr] "r" (p), + [val] "r" (val) + : "cc", "memory"); + return (ret); +} + +static __inline uint64_t +atomic_readandclear_64(volatile uint64_t *p) +{ + uint64_t ret, tmp; + uint32_t exflag; + + __asm __volatile( + "1: \n" + " ldrexd %[ret], [%[ptr]]\n" + " mov %Q[tmp], #0\n" + " mov %R[tmp], #0\n" + " strexd %[exf], %[tmp], [%[ptr]]\n" + " teq %[exf], #0\n" + " it ne \n" + " bne 1b\n" + : [ret] "=&r" (ret), + [exf] "=&r" (exflag), + [tmp] "=&r" (tmp) + : [ptr] "r" (p) + : "cc", "memory"); + return (ret); +} + +static __inline uint64_t +atomic_load_64(volatile uint64_t *p) +{ + uint64_t ret; + + /* + * The only way to atomically load 64 bits is with LDREXD which puts the + * exclusive monitor into the open state, so reset it with CLREX because + * we don't actually need to store anything. + */ + __asm __volatile( + "1: \n" + " ldrexd %[ret], [%[ptr]]\n" + " clrex \n" + : [ret] "=&r" (ret) + : [ptr] "r" (p) + : "cc", "memory"); + return (ret); +} + +static __inline uint64_t +atomic_load_acq_64(volatile uint64_t *p) +{ + uint64_t ret; + + ret = atomic_load_64(p); + __do_dmb(); + return (ret); +} + +static __inline void +atomic_store_64(volatile uint64_t *p, uint64_t val) +{ + uint64_t tmp; + uint32_t exflag; + + /* + * The only way to atomically store 64 bits is with STREXD, which will + * succeed only if paired up with a preceeding LDREXD using the same + * address, so we read and discard the existing value before storing. + */ + __asm __volatile( + "1: \n" + " ldrexd %[tmp], [%[ptr]]\n" + " strexd %[exf], %[val], [%[ptr]]\n" + " teq %[exf], #0\n" + " it ne \n" + " bne 1b\n" + : [tmp] "=&r" (tmp), + [exf] "=&r" (exflag) + : [ptr] "r" (p), + [val] "r" (val) + : "cc", "memory"); +} + +static __inline void +atomic_store_rel_64(volatile uint64_t *p, uint64_t val) +{ + + __do_dmb(); + atomic_store_64(p, val); +} + static __inline u_long atomic_fetchadd_long(volatile u_long *p, u_long val) { @@ -474,6 +724,8 @@ __swp(uint32_t val, volatile uint32_t *p #ifdef _KERNEL +#define ARM_HAVE_ATOMIC64 + static __inline void atomic_set_32(volatile uint32_t *address, uint32_t setmask) { @@ -481,11 +733,23 @@ atomic_set_32(volatile uint32_t *address } static __inline void +atomic_set_64(volatile uint64_t *address, uint64_t setmask) +{ + __with_interrupts_disabled(*address |= setmask); +} + +static __inline void atomic_clear_32(volatile uint32_t *address, uint32_t clearmask) { __with_interrupts_disabled(*address &= ~clearmask); } +static __inline void +atomic_clear_64(volatile uint64_t *address, uint64_t clearmask) +{ + __with_interrupts_disabled(*address &= ~clearmask); +} + static __inline u_int32_t atomic_cmpset_32(volatile u_int32_t *p, volatile u_int32_t cmpval, volatile u_int32_t newval) { @@ -503,6 +767,23 @@ atomic_cmpset_32(volatile u_int32_t *p, return (ret); } +static __inline u_int64_t +atomic_cmpset_64(volatile u_int64_t *p, volatile u_int64_t cmpval, volatile u_int64_t newval) +{ + int ret; + + __with_interrupts_disabled( + { + if (*p == cmpval) { + *p = newval; + ret = 1; + } else { + ret = 0; + } + }); + return (ret); +} + static __inline void atomic_add_32(volatile u_int32_t *p, u_int32_t val) { @@ -510,11 +791,23 @@ atomic_add_32(volatile u_int32_t *p, u_i } static __inline void +atomic_add_64(volatile u_int64_t *p, u_int64_t val) +{ + __with_interrupts_disabled(*p += val); +} + +static __inline void atomic_subtract_32(volatile u_int32_t *p, u_int32_t val) { __with_interrupts_disabled(*p -= val); } +static __inline void +atomic_subtract_64(volatile u_int64_t *p, u_int64_t val) +{ + __with_interrupts_disabled(*p -= val); +} + static __inline uint32_t atomic_fetchadd_32(volatile uint32_t *p, uint32_t v) { @@ -528,6 +821,34 @@ atomic_fetchadd_32(volatile uint32_t *p, return (value); } +static __inline uint64_t +atomic_fetchadd_64(volatile uint64_t *p, uint64_t v) +{ + uint64_t value; + + __with_interrupts_disabled( + { + value = *p; + *p += v; + }); + return (value); +} + +static __inline uint64_t +atomic_load_64(volatile uint64_t *p) +{ + uint64_t value; + + __with_interrupts_disabled(value = *p); + return (value); +} + +static __inline void +atomic_store_64(volatile uint64_t *p, uint64_t value) +{ + __with_interrupts_disabled(*p = value); +} + #else /* !_KERNEL */ static __inline u_int32_t Modified: stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_atomic.c ============================================================================== --- stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_atomic.c Mon Aug 11 01:48:00 2014 (r269797) +++ stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_atomic.c Mon Aug 11 02:20:24 2014 (r269798) @@ -52,7 +52,7 @@ atomic_init(void) } #endif -#if !defined(__LP64__) && !defined(__mips_n32) +#if !defined(__LP64__) && !defined(__mips_n32) && !defined(ARM_HAVE_ATOMIC64) void atomic_add_64(volatile uint64_t *target, int64_t delta) { Modified: stable/10/sys/cddl/compat/opensolaris/sys/atomic.h ============================================================================== --- stable/10/sys/cddl/compat/opensolaris/sys/atomic.h Mon Aug 11 01:48:00 2014 (r269797) +++ stable/10/sys/cddl/compat/opensolaris/sys/atomic.h Mon Aug 11 02:20:24 2014 (r269798) @@ -36,7 +36,7 @@ atomic_cmpset_ptr((volatile uintptr_t *)(_a), (uintptr_t)(_b), (uintptr_t) (_c)) #define cas32 atomic_cmpset_32 -#if !defined(__LP64__) && !defined(__mips_n32) +#if !defined(__LP64__) && !defined(__mips_n32) && !defined(ARM_HAVE_ATOMIC64) extern void atomic_add_64(volatile uint64_t *target, int64_t delta); extern void atomic_dec_64(volatile uint64_t *target); #endif @@ -85,7 +85,7 @@ atomic_dec_32_nv(volatile uint32_t *targ return (atomic_fetchadd_32(target, -1) - 1); } -#if defined(__LP64__) || defined(__mips_n32) +#if defined(__LP64__) || defined(__mips_n32) || defined(ARM_HAVE_ATOMIC64) static __inline void atomic_dec_64(volatile uint64_t *target) { From delphij at FreeBSD.org Mon Aug 11 06:54:08 2014 From: delphij at FreeBSD.org (Xin LI) Date: Mon, 11 Aug 2014 06:54:07 +0000 (UTC) Subject: svn commit: r269800 - stable/10/sbin/ping6 Message-ID: <53e8688f.2851.32479e23@svn.freebsd.org> Author: delphij Date: Mon Aug 11 06:54:07 2014 New Revision: 269800 URL: http://svnweb.freebsd.org/changeset/base/269800 Log: MFC r269180: When interval is set to very small value with limited amount of packets, ping6(8) would quit before the remote side gets a chance to respond. Solve this by resetting the itimer when we have reached the maximum packet number have reached, but let the other handling to continue. PR: bin/151023 Submitted by: tjmao at tjmao.net Modified: stable/10/sbin/ping6/ping6.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ping6/ping6.c ============================================================================== --- stable/10/sbin/ping6/ping6.c Mon Aug 11 03:04:16 2014 (r269799) +++ stable/10/sbin/ping6/ping6.c Mon Aug 11 06:54:07 2014 (r269800) @@ -1090,8 +1090,14 @@ main(int argc, char *argv[]) /* signal handling */ if (seenalrm) { /* last packet sent, timeout reached? */ - if (npackets && ntransmitted >= npackets) - break; + if (npackets && ntransmitted >= npackets) { + struct timeval zerotime = {0, 0}; + itimer.it_value = zerotime; + itimer.it_interval = zerotime; + (void)setitimer(ITIMER_REAL, &itimer, NULL); + seenalrm = 0; /* clear flag */ + continue; + } retransmit(); seenalrm = 0; continue; From delphij at FreeBSD.org Mon Aug 11 07:00:57 2014 From: delphij at FreeBSD.org (Xin LI) Date: Mon, 11 Aug 2014 07:00:57 +0000 (UTC) Subject: svn commit: r269802 - stable/9/sbin/ping6 Message-ID: <53e86a29.287f.3b04e141@svn.freebsd.org> Author: delphij Date: Mon Aug 11 07:00:57 2014 New Revision: 269802 URL: http://svnweb.freebsd.org/changeset/base/269802 Log: MFC r269180: When interval is set to very small value with limited amount of packets, ping6(8) would quit before the remote side gets a chance to respond. Solve this by resetting the itimer when we have reached the maximum packet number have reached, but let the other handling to continue. PR: bin/151023 Submitted by: tjmao at tjmao.net Modified: stable/9/sbin/ping6/ping6.c Directory Properties: stable/9/sbin/ping6/ (props changed) Modified: stable/9/sbin/ping6/ping6.c ============================================================================== --- stable/9/sbin/ping6/ping6.c Mon Aug 11 06:55:41 2014 (r269801) +++ stable/9/sbin/ping6/ping6.c Mon Aug 11 07:00:57 2014 (r269802) @@ -1088,8 +1088,14 @@ main(int argc, char *argv[]) /* signal handling */ if (seenalrm) { /* last packet sent, timeout reached? */ - if (npackets && ntransmitted >= npackets) - break; + if (npackets && ntransmitted >= npackets) { + struct timeval zerotime = {0, 0}; + itimer.it_value = zerotime; + itimer.it_interval = zerotime; + (void)setitimer(ITIMER_REAL, &itimer, NULL); + seenalrm = 0; /* clear flag */ + continue; + } retransmit(); seenalrm = 0; continue; From delphij at FreeBSD.org Mon Aug 11 07:01:30 2014 From: delphij at FreeBSD.org (Xin LI) Date: Mon, 11 Aug 2014 07:01:29 +0000 (UTC) Subject: svn commit: r269803 - stable/8/sbin/ping6 Message-ID: <53e86a49.2bd8.4ed1ec96@svn.freebsd.org> Author: delphij Date: Mon Aug 11 07:01:29 2014 New Revision: 269803 URL: http://svnweb.freebsd.org/changeset/base/269803 Log: MFC r269180: When interval is set to very small value with limited amount of packets, ping6(8) would quit before the remote side gets a chance to respond. Solve this by resetting the itimer when we have reached the maximum packet number have reached, but let the other handling to continue. PR: bin/151023 Submitted by: tjmao at tjmao.net Modified: stable/8/sbin/ping6/ping6.c Directory Properties: stable/8/sbin/ping6/ (props changed) Modified: stable/8/sbin/ping6/ping6.c ============================================================================== --- stable/8/sbin/ping6/ping6.c Mon Aug 11 07:00:57 2014 (r269802) +++ stable/8/sbin/ping6/ping6.c Mon Aug 11 07:01:29 2014 (r269803) @@ -1093,8 +1093,14 @@ main(argc, argv) /* signal handling */ if (seenalrm) { /* last packet sent, timeout reached? */ - if (npackets && ntransmitted >= npackets) - break; + if (npackets && ntransmitted >= npackets) { + struct timeval zerotime = {0, 0}; + itimer.it_value = zerotime; + itimer.it_interval = zerotime; + (void)setitimer(ITIMER_REAL, &itimer, NULL); + seenalrm = 0; /* clear flag */ + continue; + } retransmit(); seenalrm = 0; continue; From smh at FreeBSD.org Mon Aug 11 08:58:36 2014 From: smh at FreeBSD.org (Steven Hartland) Date: Mon, 11 Aug 2014 08:58:36 +0000 (UTC) Subject: svn commit: r269805 - stable/10/usr.sbin/jail Message-ID: <53e885bc.29e9.5339cb6e@svn.freebsd.org> Author: smh Date: Mon Aug 11 08:58:35 2014 New Revision: 269805 URL: http://svnweb.freebsd.org/changeset/base/269805 Log: MFC r269522 Added support for extra ifconfig args to jail ip4.addr & ip6.addr params This allows for CARP interfaces to be used in jails e.g. ip4.addr = "em0|10.10.1.20/32 vhid 1 pass MyPass advskew 100" r269340 will not be MFC'ed as mentioned due to the slim window and the amount of additional commits required to support it. Sponsored by: Multiplay Modified: stable/10/usr.sbin/jail/command.c stable/10/usr.sbin/jail/config.c stable/10/usr.sbin/jail/jail.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/jail/command.c ============================================================================== --- stable/10/usr.sbin/jail/command.c Mon Aug 11 07:04:08 2014 (r269804) +++ stable/10/usr.sbin/jail/command.c Mon Aug 11 08:58:35 2014 (r269805) @@ -268,7 +268,7 @@ run_command(struct cfjail *j) pid_t pid; int argc, bg, clean, consfd, down, fib, i, injail, sjuser, timeout; #if defined(INET) || defined(INET6) - char *addr; + char *addr, *extrap, *p, *val; #endif static char *cleanenv; @@ -317,16 +317,30 @@ run_command(struct cfjail *j) switch (comparam) { #ifdef INET case IP__IP4_IFADDR: - argv = alloca(8 * sizeof(char *)); + argc = 0; + val = alloca(strlen(comstring->s) + 1); + strcpy(val, comstring->s); + cs = val; + extrap = NULL; + while ((p = strchr(cs, ' ')) != NULL && strlen(p) > 1) { + if (extrap == NULL) { + *p = '\0'; + extrap = p + 1; + } + cs = p + 1; + argc++; + } + + argv = alloca((8 + argc) * sizeof(char *)); *(const char **)&argv[0] = _PATH_IFCONFIG; - if ((cs = strchr(comstring->s, '|'))) { - argv[1] = alloca(cs - comstring->s + 1); - strlcpy(argv[1], comstring->s, cs - comstring->s + 1); + if ((cs = strchr(val, '|'))) { + argv[1] = alloca(cs - val + 1); + strlcpy(argv[1], val, cs - val + 1); addr = cs + 1; } else { *(const char **)&argv[1] = string_param(j->intparams[IP_INTERFACE]); - addr = comstring->s; + addr = val; } *(const char **)&argv[2] = "inet"; if (!(cs = strchr(addr, '/'))) { @@ -344,6 +358,15 @@ run_command(struct cfjail *j) argv[3] = addr; argc = 4; } + + if (!down) { + for (cs = strtok(extrap, " "); cs; cs = strtok(NULL, " ")) { + size_t len = strlen(cs) + 1; + argv[argc] = alloca(len); + strlcpy(argv[argc++], cs, len); + } + } + *(const char **)&argv[argc] = down ? "-alias" : "alias"; argv[argc + 1] = NULL; break; @@ -351,16 +374,30 @@ run_command(struct cfjail *j) #ifdef INET6 case IP__IP6_IFADDR: - argv = alloca(8 * sizeof(char *)); + argc = 0; + val = alloca(strlen(comstring->s) + 1); + strcpy(val, comstring->s); + cs = val; + extrap = NULL; + while ((p = strchr(cs, ' ')) != NULL && strlen(p) > 1) { + if (extrap == NULL) { + *p = '\0'; + extrap = p + 1; + } + cs = p + 1; + argc++; + } + + argv = alloca((8 + argc) * sizeof(char *)); *(const char **)&argv[0] = _PATH_IFCONFIG; - if ((cs = strchr(comstring->s, '|'))) { - argv[1] = alloca(cs - comstring->s + 1); - strlcpy(argv[1], comstring->s, cs - comstring->s + 1); + if ((cs = strchr(val, '|'))) { + argv[1] = alloca(cs - val + 1); + strlcpy(argv[1], val, cs - val + 1); addr = cs + 1; } else { *(const char **)&argv[1] = string_param(j->intparams[IP_INTERFACE]); - addr = comstring->s; + addr = val; } *(const char **)&argv[2] = "inet6"; argv[3] = addr; @@ -370,6 +407,15 @@ run_command(struct cfjail *j) argc = 6; } else argc = 4; + + if (!down) { + for (cs = strtok(extrap, " "); cs; cs = strtok(NULL, " ")) { + size_t len = strlen(cs) + 1; + argv[argc] = alloca(len); + strlcpy(argv[argc++], cs, len); + } + } + *(const char **)&argv[argc] = down ? "-alias" : "alias"; argv[argc + 1] = NULL; break; Modified: stable/10/usr.sbin/jail/config.c ============================================================================== --- stable/10/usr.sbin/jail/config.c Mon Aug 11 07:04:08 2014 (r269804) +++ stable/10/usr.sbin/jail/config.c Mon Aug 11 08:58:35 2014 (r269805) @@ -576,7 +576,9 @@ check_intparams(struct cfjail *j) /* * IP addresses may include an interface to set that address on, - * and a netmask/suffix for that address. + * a netmask/suffix for that address and options for ifconfig. + * These are copied to an internal command parameter and then stripped + * so they won't be passed on to jailparam_set. */ defif = string_param(j->intparams[IP_INTERFACE]) != NULL; #ifdef INET @@ -601,6 +603,10 @@ check_intparams(struct cfjail *j) *cs = '\0'; s->len = cs - s->s; } + if ((cs = strchr(s->s, ' ')) != NULL) { + *cs = '\0'; + s->len = cs - s->s; + } } } #endif @@ -625,6 +631,10 @@ check_intparams(struct cfjail *j) *cs = '\0'; s->len = cs - s->s; } + if ((cs = strchr(s->s, ' ')) != NULL) { + *cs = '\0'; + s->len = cs - s->s; + } } } #endif Modified: stable/10/usr.sbin/jail/jail.8 ============================================================================== --- stable/10/usr.sbin/jail/jail.8 Mon Aug 11 07:04:08 2014 (r269804) +++ stable/10/usr.sbin/jail/jail.8 Mon Aug 11 08:58:35 2014 (r269805) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 12, 2013 +.Dd August 4, 2014 .Dt JAIL 8 .Os .Sh NAME @@ -684,17 +684,23 @@ prison is created, and will be removed f prison is removed. .It Va ip4.addr In addition to the IP addresses that are passed to the kernel, and -interface and/or a netmask may also be specified, in the form -.Dq Ar interface Ns | Ns Ar ip-address Ns / Ns Ar netmask . +interface, netmask and additional paramters (as supported by +.Xr ifconfig 8 Ns ) +may also be specified, in the form +.Dq Ar interface Ns | Ns Ar ip-address Ns / Ns Ar netmask param ... . If an interface is given before the IP address, an alias for the address will be added to that interface, as it is with the .Va interface parameter. If a netmask in either dotted-quad or CIDR form is given after IP address, it will be used when adding the IP alias. +If additional parameters are specified then they will also be used when +adding the IP alias. .It Va ip6.addr In addition to the IP addresses that are passed to the kernel, -and interface and/or a prefix may also be specified, in the form -.Dq Ar interface Ns | Ns Ar ip-address Ns / Ns Ar prefix . +an interface, prefix and additional parameters (as supported by +.Xr ifconfig 8 Ns ) +may also be specified, in the form +.Dq Ar interface Ns | Ns Ar ip-address Ns / Ns Ar prefix param ... . .It Va vnet.interface A network interface to give to a vnet-enabled jail after is it created. The interface will automatically be returned when the jail is removed. @@ -1172,6 +1178,7 @@ environment of the first jail. .Xr pkill 1 , .Xr ps 1 , .Xr quota 1 , +.Xr ifconfig 8 , .Xr jail_set 2 , .Xr devfs 5 , .Xr fdescfs 5 , From imp at FreeBSD.org Mon Aug 11 18:42:21 2014 From: imp at FreeBSD.org (Warner Losh) Date: Mon, 11 Aug 2014 18:42:20 +0000 (UTC) Subject: svn commit: r269825 - stable/10/usr.sbin/config Message-ID: <53e90e8d.2878.29cbb502@svn.freebsd.org> Author: imp Date: Mon Aug 11 18:42:20 2014 New Revision: 269825 URL: http://svnweb.freebsd.org/changeset/base/269825 Log: MFC: Merge in the changes in -current: Support ! operator in "files" files. Improve error detection and reporting Cleanup code to make it easier to maintain. Remove mandatory keyword: it has been used for 17 years. Bump version number (we should have bumped for -I too, but didn't) r261501 | imp | 2014-02-04 17:26:11 -0700 (Tue, 04 Feb 2014) | 5 lines Fix ! by not clearing not at the bottom of the loop. Add a blank line Submitted by: bde (blank line) r261493 | imp | 2014-02-04 11:28:58 -0700 (Tue, 04 Feb 2014) | 5 lines Implement the '!' operator for files* files. It means 'include this only if the specified option is NOT specified.' Bump version because old config won't be able to cope with files* files that have this construct in them. r261446 | imp | 2014-02-03 12:14:36 -0700 (Mon, 03 Feb 2014) | 5 lines Convert the loop by gotos into a for loop to improve readability. I did this only with the inner loop for the token parsing, and not the outer loop which was understandable enough when the extra layers of looping went away... r261445 | imp | 2014-02-03 12:10:33 -0700 (Mon, 03 Feb 2014) | 4 lines Fix a bug introduced in r261437 that failed to honor "optional profiling-routine" to work, since profiling-routine is not really an option or a device, but a special case elsewhere in the code. r261444 | imp | 2014-02-03 11:56:41 -0700 (Mon, 03 Feb 2014) | 2 lines Slight cleanup to the error messaging to compress code vertically... r261442 | imp | 2014-02-03 11:31:51 -0700 (Mon, 03 Feb 2014) | 2 lines Better error messages when EOF is hit in the middle of a phrase. r261438 | imp | 2014-02-03 09:54:53 -0700 (Mon, 03 Feb 2014) | 5 lines Move the check for standard keyword + optional inclusion specifier to its proper location. Otherwise you could have 'file.c standard pci' without an error. This construct isn't in our tree, and has no well defined meaning. r261437 | imp | 2014-02-03 09:47:10 -0700 (Mon, 03 Feb 2014) | 4 lines Don't believe we have a requirement until after we've checked all the known key words. This will make error messages slightly better in weird corner cases, but should otherwise be a nop. r261436 | imp | 2014-02-03 09:46:01 -0700 (Mon, 03 Feb 2014) | 3 lines In the 17 years since r30796, the mandatory keyword has never been used in any files as far as I can tell, and is currently unused. Retire it. r261435 | imp | 2014-02-03 08:10:44 -0700 (Mon, 03 Feb 2014) | 6 lines Slightly deobfuscate read_file() and likely pessimize the runtime performance by epsilon. (Translation: elminate bogus macros that hid 'returns' making it hard to read and moved a block of code inline rather than at the end of the fuction where it was effectively a 'gosub' kind of goto). Modified: stable/10/usr.sbin/config/configvers.h stable/10/usr.sbin/config/mkmakefile.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/config/configvers.h ============================================================================== --- stable/10/usr.sbin/config/configvers.h Mon Aug 11 18:26:57 2014 (r269824) +++ stable/10/usr.sbin/config/configvers.h Mon Aug 11 18:42:20 2014 (r269825) @@ -49,5 +49,5 @@ * * $FreeBSD$ */ -#define CONFIGVERS 600012 +#define CONFIGVERS 600013 #define MAJOR_VERS(x) ((x) / 100000) Modified: stable/10/usr.sbin/config/mkmakefile.c ============================================================================== --- stable/10/usr.sbin/config/mkmakefile.c Mon Aug 11 18:26:57 2014 (r269824) +++ stable/10/usr.sbin/config/mkmakefile.c Mon Aug 11 18:42:20 2014 (r269825) @@ -43,6 +43,7 @@ static const char rcsid[] = #include #include +#include #include #include #include @@ -50,21 +51,6 @@ static const char rcsid[] = #include "config.h" #include "configvers.h" -#define next_word(fp, wd) \ - { char *word = get_word(fp); \ - if (word == (char *)EOF) \ - return; \ - else \ - wd = word; \ - } -#define next_quoted_word(fp, wd) \ - { char *word = get_quoted_word(fp); \ - if (word == (char *)EOF) \ - return; \ - else \ - wd = word; \ - } - static char *tail(char *); static void do_clean(FILE *); static void do_rules(FILE *); @@ -74,6 +60,16 @@ static void do_before_depend(FILE *); static int opteq(const char *, const char *); static void read_files(void); +static void errout(const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + vfprintf(stderr, fmt, ap); + va_end(ap); + exit(1); +} + /* * Lookup a file, by name. */ @@ -313,8 +309,8 @@ read_file(char *fname) struct opt *op; char *wd, *this, *compilewith, *depends, *clean, *warning; const char *objprefix; - int compile, match, nreqs, std, filetype, - imp_rule, no_obj, before_depend, mandatory, nowerror; + int compile, match, nreqs, std, filetype, not, + imp_rule, no_obj, before_depend, nowerror; fp = fopen(fname, "r"); if (fp == 0) @@ -322,7 +318,7 @@ read_file(char *fname) next: /* * include "filename" - * filename [ standard | mandatory | optional ] + * filename [ standard | optional ] * [ dev* [ | dev* ... ] | profiling-routine ] [ no-obj ] * [ compile-with "compile rule" [no-implicit-rule] ] * [ dependency "dependency-list"] [ before-depend ] @@ -343,12 +339,9 @@ next: goto next; } if (eq(wd, "include")) { - next_quoted_word(fp, wd); - if (wd == 0) { - fprintf(stderr, "%s: missing include filename.\n", - fname); - exit(1); - } + wd = get_quoted_word(fp); + if (wd == (char *)EOF || wd == 0) + errout("%s: missing include filename.\n", fname); (void) snprintf(ifname, sizeof(ifname), "../../%s", wd); read_file(ifname); while (((wd = get_word(fp)) != (char *)EOF) && wd) @@ -356,11 +349,11 @@ next: goto next; } this = ns(wd); - next_word(fp, wd); - if (wd == 0) { - fprintf(stderr, "%s: No type for %s.\n", fname, this); - exit(1); - } + wd = get_word(fp); + if (wd == (char *)EOF) + return; + if (wd == 0) + errout("%s: No type for %s.\n", fname, this); tp = fl_lookup(this); compile = 0; match = 1; @@ -369,186 +362,154 @@ next: depends = 0; clean = 0; warning = 0; - std = mandatory = 0; + std = 0; imp_rule = 0; no_obj = 0; before_depend = 0; nowerror = 0; + not = 0; filetype = NORMAL; objprefix = ""; - if (eq(wd, "standard")) { + if (eq(wd, "standard")) std = 1; - /* - * If an entry is marked "mandatory", config will abort if it's - * not called by a configuration line in the config file. Apart - * from this, the device is handled like one marked "optional". - */ - } else if (eq(wd, "mandatory")) { - mandatory = 1; - } else if (!eq(wd, "optional")) { - fprintf(stderr, - "%s: \"%s\" %s must be optional, mandatory or standard\n", + else if (!eq(wd, "optional")) + errout("%s: \"%s\" %s must be optional or standard\n", fname, wd, this); - exit(1); - } -nextparam: - next_word(fp, wd); - if (wd == 0) { - compile += match; - if (compile && tp == NULL) - goto doneparam; - goto next; - } - if (eq(wd, "|")) { - if (nreqs == 0) { - fprintf(stderr, "%s: syntax error describing %s\n", - fname, this); - exit(1); + for (wd = get_word(fp); wd; wd = get_word(fp)) { + if (wd == (char *)EOF) + return; + if (eq(wd, "!")) { + not = 1; + continue; + } + if (eq(wd, "|")) { + if (nreqs == 0) + errout("%s: syntax error describing %s\n", + fname, this); + if (not) + compile += !match; + else + compile += match; + match = 1; + nreqs = 0; + not = 0; + continue; + } + if (eq(wd, "no-obj")) { + no_obj++; + continue; + } + if (eq(wd, "no-implicit-rule")) { + if (compilewith == 0) + errout("%s: alternate rule required when " + "\"no-implicit-rule\" is specified for" + " %s.\n", + fname, this); + imp_rule++; + continue; + } + if (eq(wd, "before-depend")) { + before_depend++; + continue; + } + if (eq(wd, "dependency")) { + wd = get_quoted_word(fp); + if (wd == (char *)EOF || wd == 0) + errout("%s: %s missing dependency string.\n", + fname, this); + depends = ns(wd); + continue; + } + if (eq(wd, "clean")) { + wd = get_quoted_word(fp); + if (wd == (char *)EOF || wd == 0) + errout("%s: %s missing clean file list.\n", + fname, this); + clean = ns(wd); + continue; + } + if (eq(wd, "compile-with")) { + wd = get_quoted_word(fp); + if (wd == (char *)EOF || wd == 0) + errout("%s: %s missing compile command string.\n", + fname, this); + compilewith = ns(wd); + continue; + } + if (eq(wd, "warning")) { + wd = get_quoted_word(fp); + if (wd == (char *)EOF || wd == 0) + errout("%s: %s missing warning text string.\n", + fname, this); + warning = ns(wd); + continue; + } + if (eq(wd, "obj-prefix")) { + wd = get_quoted_word(fp); + if (wd == (char *)EOF || wd == 0) + errout("%s: %s missing object prefix string.\n", + fname, this); + objprefix = ns(wd); + continue; + } + if (eq(wd, "nowerror")) { + nowerror = 1; + continue; } + if (eq(wd, "local")) { + filetype = LOCAL; + continue; + } + if (eq(wd, "no-depend")) { + filetype = NODEPEND; + continue; + } + nreqs++; + if (eq(wd, "profiling-routine")) { + filetype = PROFILING; + continue; + } + if (std) + errout("standard entry %s has optional inclusion specifier %s!\n", + this, wd); + STAILQ_FOREACH(dp, &dtab, d_next) + if (eq(dp->d_name, wd)) { + dp->d_done |= DEVDONE; + goto nextparam; + } + SLIST_FOREACH(op, &opt, op_next) + if (op->op_value == 0 && opteq(op->op_name, wd)) + goto nextparam; + match = 0; +nextparam:; + } + if (not) + compile += !match; + else compile += match; - match = 1; - nreqs = 0; - goto nextparam; - } - if (eq(wd, "no-obj")) { - no_obj++; - goto nextparam; + if (compile && tp == NULL) { + if (std == 0 && nreqs == 0) + errout("%s: what is %s optional on?\n", + fname, this); + if (filetype == PROFILING && profiling == 0) + goto next; + tp = new_fent(); + tp->f_fn = this; + tp->f_type = filetype; + if (imp_rule) + tp->f_flags |= NO_IMPLCT_RULE; + if (no_obj) + tp->f_flags |= NO_OBJ; + if (before_depend) + tp->f_flags |= BEFORE_DEPEND; + if (nowerror) + tp->f_flags |= NOWERROR; + tp->f_compilewith = compilewith; + tp->f_depends = depends; + tp->f_clean = clean; + tp->f_warn = warning; + tp->f_objprefix = objprefix; } - if (eq(wd, "no-implicit-rule")) { - if (compilewith == 0) { - fprintf(stderr, "%s: alternate rule required when " - "\"no-implicit-rule\" is specified.\n", - fname); - } - imp_rule++; - goto nextparam; - } - if (eq(wd, "before-depend")) { - before_depend++; - goto nextparam; - } - if (eq(wd, "dependency")) { - next_quoted_word(fp, wd); - if (wd == 0) { - fprintf(stderr, - "%s: %s missing dependency string.\n", - fname, this); - exit(1); - } - depends = ns(wd); - goto nextparam; - } - if (eq(wd, "clean")) { - next_quoted_word(fp, wd); - if (wd == 0) { - fprintf(stderr, "%s: %s missing clean file list.\n", - fname, this); - exit(1); - } - clean = ns(wd); - goto nextparam; - } - if (eq(wd, "compile-with")) { - next_quoted_word(fp, wd); - if (wd == 0) { - fprintf(stderr, - "%s: %s missing compile command string.\n", - fname, this); - exit(1); - } - compilewith = ns(wd); - goto nextparam; - } - if (eq(wd, "warning")) { - next_quoted_word(fp, wd); - if (wd == 0) { - fprintf(stderr, - "%s: %s missing warning text string.\n", - fname, this); - exit(1); - } - warning = ns(wd); - goto nextparam; - } - if (eq(wd, "obj-prefix")) { - next_quoted_word(fp, wd); - if (wd == 0) { - printf("%s: %s missing object prefix string.\n", - fname, this); - exit(1); - } - objprefix = ns(wd); - goto nextparam; - } - nreqs++; - if (eq(wd, "local")) { - filetype = LOCAL; - goto nextparam; - } - if (eq(wd, "no-depend")) { - filetype = NODEPEND; - goto nextparam; - } - if (eq(wd, "profiling-routine")) { - filetype = PROFILING; - goto nextparam; - } - if (eq(wd, "nowerror")) { - nowerror = 1; - goto nextparam; - } - STAILQ_FOREACH(dp, &dtab, d_next) - if (eq(dp->d_name, wd)) { - dp->d_done |= DEVDONE; - goto nextparam; - } - if (mandatory) { - fprintf(stderr, "%s: mandatory device \"%s\" not found\n", - fname, wd); - exit(1); - } - if (std) { - fprintf(stderr, - "standard entry %s has a device keyword - %s!\n", - this, wd); - exit(1); - } - SLIST_FOREACH(op, &opt, op_next) - if (op->op_value == 0 && opteq(op->op_name, wd)) - goto nextparam; - match = 0; - goto nextparam; - -doneparam: - if (std == 0 && nreqs == 0) { - fprintf(stderr, "%s: what is %s optional on?\n", - fname, this); - exit(1); - } - - if (wd) { - fprintf(stderr, "%s: syntax error describing %s\n", - fname, this); - exit(1); - } - if (filetype == PROFILING && profiling == 0) - goto next; - tp = new_fent(); - tp->f_fn = this; - tp->f_type = filetype; - if (imp_rule) - tp->f_flags |= NO_IMPLCT_RULE; - if (no_obj) - tp->f_flags |= NO_OBJ; - if (before_depend) - tp->f_flags |= BEFORE_DEPEND; - if (nowerror) - tp->f_flags |= NOWERROR; - tp->f_compilewith = compilewith; - tp->f_depends = depends; - tp->f_clean = clean; - tp->f_warn = warning; - tp->f_objprefix = objprefix; goto next; } From dim at FreeBSD.org Mon Aug 11 20:37:04 2014 From: dim at FreeBSD.org (Dimitry Andric) Date: Mon, 11 Aug 2014 20:37:04 +0000 (UTC) Subject: svn commit: r269836 - in stable: 10/contrib/libc++/include 9/contrib/libc++/include Message-ID: <53e92970.2ae0.4534a0a4@svn.freebsd.org> Author: dim Date: Mon Aug 11 20:37:03 2014 New Revision: 269836 URL: http://svnweb.freebsd.org/changeset/base/269836 Log: MFC r269740: Pull in r214736 from upstream libc++ trunk (by Marshall Clow): Fix PR#20520 - predicate called too many times in list::remove_if. Add tests for list, forward_list, and the std::remove_if algorithm This fixes an issue where std::list<>::remove_if() and remove() could erroneously visit elements twice. Reported by: Dominic Fandrey PR: 192303 Modified: stable/10/contrib/libc++/include/list Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/contrib/libc++/include/list Directory Properties: stable/9/contrib/libc++/ (props changed) Modified: stable/10/contrib/libc++/include/list ============================================================================== --- stable/10/contrib/libc++/include/list Mon Aug 11 20:36:09 2014 (r269835) +++ stable/10/contrib/libc++/include/list Mon Aug 11 20:37:03 2014 (r269836) @@ -2046,6 +2046,8 @@ list<_Tp, _Alloc>::remove(const value_ty for (; __j != __e && *__j == __x; ++__j) ; __i = erase(__i, __j); + if (__i != __e) + __i = _VSTD::next(__i); } else ++__i; @@ -2065,6 +2067,8 @@ list<_Tp, _Alloc>::remove_if(_Pred __pre for (; __j != __e && __pred(*__j); ++__j) ; __i = erase(__i, __j); + if (__i != __e) + __i = _VSTD::next(__i); } else ++__i; From dim at FreeBSD.org Mon Aug 11 20:37:04 2014 From: dim at FreeBSD.org (Dimitry Andric) Date: Mon, 11 Aug 2014 20:37:04 +0000 (UTC) Subject: svn commit: r269836 - in stable: 10/contrib/libc++/include 9/contrib/libc++/include Message-ID: <53e92970.2ad9.121cacc3@svn.freebsd.org> Author: dim Date: Mon Aug 11 20:37:03 2014 New Revision: 269836 URL: http://svnweb.freebsd.org/changeset/base/269836 Log: MFC r269740: Pull in r214736 from upstream libc++ trunk (by Marshall Clow): Fix PR#20520 - predicate called too many times in list::remove_if. Add tests for list, forward_list, and the std::remove_if algorithm This fixes an issue where std::list<>::remove_if() and remove() could erroneously visit elements twice. Reported by: Dominic Fandrey PR: 192303 Modified: stable/9/contrib/libc++/include/list Directory Properties: stable/9/contrib/libc++/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/libc++/include/list Directory Properties: stable/10/ (props changed) Modified: stable/9/contrib/libc++/include/list ============================================================================== --- stable/9/contrib/libc++/include/list Mon Aug 11 20:36:09 2014 (r269835) +++ stable/9/contrib/libc++/include/list Mon Aug 11 20:37:03 2014 (r269836) @@ -2046,6 +2046,8 @@ list<_Tp, _Alloc>::remove(const value_ty for (; __j != __e && *__j == __x; ++__j) ; __i = erase(__i, __j); + if (__i != __e) + __i = _VSTD::next(__i); } else ++__i; @@ -2065,6 +2067,8 @@ list<_Tp, _Alloc>::remove_if(_Pred __pre for (; __j != __e && __pred(*__j); ++__j) ; __i = erase(__i, __j); + if (__i != __e) + __i = _VSTD::next(__i); } else ++__i; From jlh at FreeBSD.org Mon Aug 11 20:38:53 2014 From: jlh at FreeBSD.org (Jeremie Le Hen) Date: Mon, 11 Aug 2014 20:38:52 +0000 (UTC) Subject: svn commit: r269837 - stable/10/usr.bin/sed Message-ID: <53e929dc.2af8.5dd58b3e@svn.freebsd.org> Author: jlh Date: Mon Aug 11 20:38:52 2014 New Revision: 269837 URL: http://svnweb.freebsd.org/changeset/base/269837 Log: MFC r269302: Fix relative numerical addressing (addr,+N). As a bonus the patch untangles a bit the logic and makes the code easier to grasp. PR: 192108 Modified: stable/10/usr.bin/sed/process.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/sed/process.c ============================================================================== --- stable/10/usr.bin/sed/process.c Mon Aug 11 20:37:03 2014 (r269836) +++ stable/10/usr.bin/sed/process.c Mon Aug 11 20:38:52 2014 (r269837) @@ -288,24 +288,32 @@ applies(struct s_command *cp) r = 1; else if (cp->a2) if (cp->startline > 0) { - if (MATCH(cp->a2)) { - cp->startline = 0; - lastaddr = 1; - r = 1; - } else if (linenum - cp->startline <= cp->a2->u.l) - r = 1; - else if ((cp->a2->type == AT_LINE && - linenum > cp->a2->u.l) || - (cp->a2->type == AT_RELLINE && - linenum - cp->startline > cp->a2->u.l)) { - /* - * We missed the 2nd address due to a branch, - * so just close the range and return false. - */ - cp->startline = 0; - r = 0; - } else - r = 1; + switch (cp->a2->type) { + case AT_RELLINE: + if (linenum - cp->startline <= cp->a2->u.l) + r = 1; + else { + cp->startline = 0; + r = 0; + } + break; + default: + if (MATCH(cp->a2)) { + cp->startline = 0; + lastaddr = 1; + r = 1; + } else if (cp->a2->type == AT_LINE && + linenum > cp->a2->u.l) { + /* + * We missed the 2nd address due to a + * branch, so just close the range and + * return false. + */ + cp->startline = 0; + r = 0; + } else + r = 1; + } } else if (MATCH(cp->a1)) { /* * If the second address is a number less than or From jlh at FreeBSD.org Mon Aug 11 21:38:42 2014 From: jlh at FreeBSD.org (Jeremie Le Hen) Date: Mon, 11 Aug 2014 21:38:42 +0000 (UTC) Subject: svn commit: r269841 - stable/9/usr.bin/sed Message-ID: <53e937e2.2395.50059fa2@svn.freebsd.org> Author: jlh Date: Mon Aug 11 21:38:41 2014 New Revision: 269841 URL: http://svnweb.freebsd.org/changeset/base/269841 Log: MFC r269302: Fix relative numerical addressing (addr,+N). As a bonus the patch untangles a bit the logic and makes the code easier to grasp. PR: 192108 Modified: stable/9/usr.bin/sed/process.c Directory Properties: stable/9/usr.bin/sed/ (props changed) Modified: stable/9/usr.bin/sed/process.c ============================================================================== --- stable/9/usr.bin/sed/process.c Mon Aug 11 21:14:08 2014 (r269840) +++ stable/9/usr.bin/sed/process.c Mon Aug 11 21:38:41 2014 (r269841) @@ -288,24 +288,32 @@ applies(struct s_command *cp) r = 1; else if (cp->a2) if (cp->startline > 0) { - if (MATCH(cp->a2)) { - cp->startline = 0; - lastaddr = 1; - r = 1; - } else if (linenum - cp->startline <= cp->a2->u.l) - r = 1; - else if ((cp->a2->type == AT_LINE && - linenum > cp->a2->u.l) || - (cp->a2->type == AT_RELLINE && - linenum - cp->startline > cp->a2->u.l)) { - /* - * We missed the 2nd address due to a branch, - * so just close the range and return false. - */ - cp->startline = 0; - r = 0; - } else - r = 1; + switch (cp->a2->type) { + case AT_RELLINE: + if (linenum - cp->startline <= cp->a2->u.l) + r = 1; + else { + cp->startline = 0; + r = 0; + } + break; + default: + if (MATCH(cp->a2)) { + cp->startline = 0; + lastaddr = 1; + r = 1; + } else if (cp->a2->type == AT_LINE && + linenum > cp->a2->u.l) { + /* + * We missed the 2nd address due to a + * branch, so just close the range and + * return false. + */ + cp->startline = 0; + r = 0; + } else + r = 1; + } } else if (MATCH(cp->a1)) { /* * If the second address is a number less than or From delphij at FreeBSD.org Tue Aug 12 00:53:05 2014 From: delphij at FreeBSD.org (Xin LI) Date: Tue, 12 Aug 2014 00:53:03 +0000 (UTC) Subject: svn commit: r269845 - in stable/10: cddl/contrib/opensolaris/common/avl sys/cddl/contrib/opensolaris/common/avl sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/commo... Message-ID: <53e9656f.2aa0.67bb7fd4@svn.freebsd.org> Author: delphij Date: Tue Aug 12 00:53:03 2014 New Revision: 269845 URL: http://svnweb.freebsd.org/changeset/base/269845 Log: MFC r269229,269404,269466: MFV r269223: Change dn->dn_dbufs from linked list to AVL tree. Illumos issues: 4873 zvol unmap calls can take a very long time for larger datasets Modified: stable/10/cddl/contrib/opensolaris/common/avl/avl.c stable/10/sys/cddl/contrib/opensolaris/common/avl/avl.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/avl.h Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/common/avl/avl.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/common/avl/avl.c Mon Aug 11 22:43:44 2014 (r269844) +++ stable/10/cddl/contrib/opensolaris/common/avl/avl.c Tue Aug 12 00:53:03 2014 (r269845) @@ -24,6 +24,10 @@ */ /* + * Copyright (c) 2014 by Delphix. All rights reserved. + */ + +/* * AVL - generic AVL tree implementation for kernel use * * A complete description of AVL trees can be found in many CS textbooks. @@ -37,7 +41,7 @@ * insertion and deletion relatively efficiently. Searching the tree is * still a fast operation, roughly O(log(N)). * - * The key to insertion and deletion is a set of tree maniuplations called + * The key to insertion and deletion is a set of tree manipulations called * rotations, which bring unbalanced subtrees back into the semi-balanced state. * * This implementation of AVL trees has the following peculiarities: @@ -45,7 +49,7 @@ * - The AVL specific data structures are physically embedded as fields * in the "using" data structures. To maintain generality the code * must constantly translate between "avl_node_t *" and containing - * data structure "void *"s by adding/subracting the avl_offset. + * data structure "void *"s by adding/subtracting the avl_offset. * * - Since the AVL data is always embedded in other structures, there is * no locking or memory allocation in the AVL routines. This must be @@ -85,6 +89,12 @@ * is a modified "avl_node_t *". The bottom bit (normally 0 for a * pointer) is set to indicate if that the new node has a value greater * than the value of the indicated "avl_node_t *". + * + * Note - in addition to userland (e.g. libavl and libutil) and the kernel + * (e.g. genunix), avl.c is compiled into ld.so and kmdb's genunix module, + * which each have their own compilation environments and subsequent + * requirements. Each of these environments must be considered when adding + * dependencies from avl.c. */ #include @@ -94,7 +104,7 @@ #include /* - * Small arrays to translate between balance (or diff) values and child indeces. + * Small arrays to translate between balance (or diff) values and child indices. * * Code that deals with binary tree data structures will randomly use * left and right children when examining a tree. C "if()" statements @@ -114,7 +124,8 @@ static const int avl_balance2child[] = * * - If there is a left child, go to it, then to it's rightmost descendant. * - * - otherwise we return thru parent nodes until we've come from a right child. + * - otherwise we return through parent nodes until we've come from a right + * child. * * Return Value: * NULL - if at the end of the nodes @@ -863,6 +874,24 @@ avl_update(avl_tree_t *t, void *obj) return (B_FALSE); } +void +avl_swap(avl_tree_t *tree1, avl_tree_t *tree2) +{ + avl_node_t *temp_node; + ulong_t temp_numnodes; + + ASSERT3P(tree1->avl_compar, ==, tree2->avl_compar); + ASSERT3U(tree1->avl_offset, ==, tree2->avl_offset); + ASSERT3U(tree1->avl_size, ==, tree2->avl_size); + + temp_node = tree1->avl_root; + temp_numnodes = tree1->avl_numnodes; + tree1->avl_root = tree2->avl_root; + tree1->avl_numnodes = tree2->avl_numnodes; + tree2->avl_root = temp_node; + tree2->avl_numnodes = temp_numnodes; +} + /* * initialize a new AVL tree */ @@ -919,7 +948,7 @@ avl_is_empty(avl_tree_t *tree) /* * Post-order tree walk used to visit all tree nodes and destroy the tree - * in post order. This is used for destroying a tree w/o paying any cost + * in post order. This is used for destroying a tree without paying any cost * for rebalancing it. * * example: Modified: stable/10/sys/cddl/contrib/opensolaris/common/avl/avl.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/common/avl/avl.c Mon Aug 11 22:43:44 2014 (r269844) +++ stable/10/sys/cddl/contrib/opensolaris/common/avl/avl.c Tue Aug 12 00:53:03 2014 (r269845) @@ -24,6 +24,10 @@ */ /* + * Copyright (c) 2014 by Delphix. All rights reserved. + */ + +/* * AVL - generic AVL tree implementation for kernel use * * A complete description of AVL trees can be found in many CS textbooks. @@ -85,6 +89,12 @@ * is a modified "avl_node_t *". The bottom bit (normally 0 for a * pointer) is set to indicate if that the new node has a value greater * than the value of the indicated "avl_node_t *". + * + * Note - in addition to userland (e.g. libavl and libutil) and the kernel + * (e.g. genunix), avl.c is compiled into ld.so and kmdb's genunix module, + * which each have their own compilation environments and subsequent + * requirements. Each of these environments must be considered when adding + * dependencies from avl.c. */ #include @@ -864,6 +874,24 @@ avl_update(avl_tree_t *t, void *obj) return (B_FALSE); } +void +avl_swap(avl_tree_t *tree1, avl_tree_t *tree2) +{ + avl_node_t *temp_node; + ulong_t temp_numnodes; + + ASSERT3P(tree1->avl_compar, ==, tree2->avl_compar); + ASSERT3U(tree1->avl_offset, ==, tree2->avl_offset); + ASSERT3U(tree1->avl_size, ==, tree2->avl_size); + + temp_node = tree1->avl_root; + temp_numnodes = tree1->avl_numnodes; + tree1->avl_root = tree2->avl_root; + tree1->avl_numnodes = tree2->avl_numnodes; + tree2->avl_root = temp_node; + tree2->avl_numnodes = temp_numnodes; +} + /* * initialize a new AVL tree */ Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Mon Aug 11 22:43:44 2014 (r269844) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Tue Aug 12 00:53:03 2014 (r269845) @@ -69,6 +69,13 @@ dbuf_cons(void *vdb, void *unused, int k mutex_init(&db->db_mtx, NULL, MUTEX_DEFAULT, NULL); cv_init(&db->db_changed, NULL, CV_DEFAULT, NULL); refcount_create(&db->db_holds); + +#if defined(illumos) || !defined(_KERNEL) + db->db_creation = gethrtime(); +#else + db->db_creation = cpu_ticks() ^ ((uint64_t)CPU_SEQID << 48); +#endif + return (0); } @@ -330,7 +337,7 @@ dbuf_verify(dmu_buf_impl_t *db) ASSERT3U(db->db_level, <, dn->dn_nlevels); ASSERT(db->db_blkid == DMU_BONUS_BLKID || db->db_blkid == DMU_SPILL_BLKID || - !list_is_empty(&dn->dn_dbufs)); + !avl_is_empty(&dn->dn_dbufs)); } if (db->db_blkid == DMU_BONUS_BLKID) { ASSERT(dn != NULL); @@ -803,18 +810,30 @@ dbuf_unoverride(dbuf_dirty_record_t *dr) * receive; see comment below for details. */ void -dbuf_free_range(dnode_t *dn, uint64_t start, uint64_t end, dmu_tx_t *tx) +dbuf_free_range(dnode_t *dn, uint64_t start_blkid, uint64_t end_blkid, + dmu_tx_t *tx) { - dmu_buf_impl_t *db, *db_next; + dmu_buf_impl_t *db, *db_next, db_search; uint64_t txg = tx->tx_txg; + avl_index_t where; - if (end > dn->dn_maxblkid && (end != DMU_SPILL_BLKID)) - end = dn->dn_maxblkid; - dprintf_dnode(dn, "start=%llu end=%llu\n", start, end); + if (end_blkid > dn->dn_maxblkid && (end_blkid != DMU_SPILL_BLKID)) + end_blkid = dn->dn_maxblkid; + dprintf_dnode(dn, "start=%llu end=%llu\n", start_blkid, end_blkid); + + db_search.db_level = 0; + db_search.db_blkid = start_blkid; + db_search.db_creation = 0; mutex_enter(&dn->dn_dbufs_mtx); - if (start >= dn->dn_unlisted_l0_blkid * dn->dn_datablksz) { + if (start_blkid >= dn->dn_unlisted_l0_blkid) { /* There can't be any dbufs in this range; no need to search. */ +#ifdef DEBUG + db = avl_find(&dn->dn_dbufs, &db_search, &where); + ASSERT3P(db, ==, NULL); + db = avl_nearest(&dn->dn_dbufs, where, AVL_AFTER); + ASSERT(db == NULL || db->db_level > 0); +#endif mutex_exit(&dn->dn_dbufs_mtx); return; } else if (dmu_objset_is_receiving(dn->dn_objset)) { @@ -828,14 +847,18 @@ dbuf_free_range(dnode_t *dn, uint64_t st atomic_inc_64(&zfs_free_range_recv_miss); } - for (db = list_head(&dn->dn_dbufs); db != NULL; db = db_next) { - db_next = list_next(&dn->dn_dbufs, db); + db = avl_find(&dn->dn_dbufs, &db_search, &where); + ASSERT3P(db, ==, NULL); + db = avl_nearest(&dn->dn_dbufs, where, AVL_AFTER); + + for (; db != NULL; db = db_next) { + db_next = AVL_NEXT(&dn->dn_dbufs, db); ASSERT(db->db_blkid != DMU_BONUS_BLKID); - if (db->db_level != 0) - continue; - if (db->db_blkid < start || db->db_blkid > end) - continue; + if (db->db_level != 0 || db->db_blkid > end_blkid) { + break; + } + ASSERT3U(db->db_blkid, >=, start_blkid); /* found a level 0 buffer in the range */ mutex_enter(&db->db_mtx); @@ -1585,7 +1608,7 @@ dbuf_clear(dmu_buf_impl_t *db) dn = DB_DNODE(db); dndb = dn->dn_dbuf; if (db->db_blkid != DMU_BONUS_BLKID && MUTEX_HELD(&dn->dn_dbufs_mtx)) { - list_remove(&dn->dn_dbufs, db); + avl_remove(&dn->dn_dbufs, db); (void) atomic_dec_32_nv(&dn->dn_dbufs_count); membar_producer(); DB_DNODE_EXIT(db); @@ -1748,7 +1771,7 @@ dbuf_create(dnode_t *dn, uint8_t level, mutex_exit(&dn->dn_dbufs_mtx); return (odb); } - list_insert_head(&dn->dn_dbufs, db); + avl_add(&dn->dn_dbufs, db); if (db->db_level == 0 && db->db_blkid >= dn->dn_unlisted_l0_blkid) dn->dn_unlisted_l0_blkid = db->db_blkid + 1; @@ -1807,7 +1830,7 @@ dbuf_destroy(dmu_buf_impl_t *db) DB_DNODE_ENTER(db); dn = DB_DNODE(db); mutex_enter(&dn->dn_dbufs_mtx); - list_remove(&dn->dn_dbufs, db); + avl_remove(&dn->dn_dbufs, db); (void) atomic_dec_32_nv(&dn->dn_dbufs_count); mutex_exit(&dn->dn_dbufs_mtx); DB_DNODE_EXIT(db); @@ -1825,7 +1848,6 @@ dbuf_destroy(dmu_buf_impl_t *db) db->db_parent = NULL; db->db_buf = NULL; - ASSERT(!list_link_active(&db->db_link)); ASSERT(db->db.db_data == NULL); ASSERT(db->db_hash_next == NULL); ASSERT(db->db_blkptr == NULL); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Mon Aug 11 22:43:44 2014 (r269844) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Tue Aug 12 00:53:03 2014 (r269845) @@ -61,6 +61,43 @@ int zfs_default_ibs = DN_MAX_INDBLKSHIFT static kmem_cbrc_t dnode_move(void *, void *, size_t, void *); #endif +static int +dbuf_compare(const void *x1, const void *x2) +{ + const dmu_buf_impl_t *d1 = x1; + const dmu_buf_impl_t *d2 = x2; + + if (d1->db_level < d2->db_level) { + return (-1); + } else if (d1->db_level > d2->db_level) { + return (1); + } + + if (d1->db_blkid < d2->db_blkid) { + return (-1); + } else if (d1->db_blkid > d2->db_blkid) { + return (1); + } + + /* + * If a dbuf is being evicted while dn_dbufs_mutex is not held, we set + * the db_state to DB_EVICTING but do not remove it from dn_dbufs. If + * another thread creates a dbuf of the same blkid before the dbuf is + * removed from dn_dbufs, we can reach a state where there are two + * dbufs of the same blkid and level in db_dbufs. To maintain the avl + * invariant that there cannot be duplicate items, we distinguish + * between these two dbufs based on the time they were created. + */ + if (d1->db_creation < d2->db_creation) { + return (-1); + } else if (d1->db_creation > d2->db_creation) { + return (1); + } else { + ASSERT3P(d1, ==, d2); + return (0); + } +} + /* ARGSUSED */ static int dnode_cons(void *arg, void *unused, int kmflag) @@ -115,7 +152,7 @@ dnode_cons(void *arg, void *unused, int dn->dn_dbufs_count = 0; dn->dn_unlisted_l0_blkid = 0; - list_create(&dn->dn_dbufs, sizeof (dmu_buf_impl_t), + avl_create(&dn->dn_dbufs, dbuf_compare, sizeof (dmu_buf_impl_t), offsetof(dmu_buf_impl_t, db_link)); dn->dn_moved = 0; @@ -169,7 +206,7 @@ dnode_dest(void *arg, void *unused) ASSERT0(dn->dn_dbufs_count); ASSERT0(dn->dn_unlisted_l0_blkid); - list_destroy(&dn->dn_dbufs); + avl_destroy(&dn->dn_dbufs); } void @@ -505,7 +542,7 @@ dnode_allocate(dnode_t *dn, dmu_object_t ASSERT0(dn->dn_assigned_txg); ASSERT(refcount_is_zero(&dn->dn_tx_holds)); ASSERT3U(refcount_count(&dn->dn_holds), <=, 1); - ASSERT3P(list_head(&dn->dn_dbufs), ==, NULL); + ASSERT(avl_is_empty(&dn->dn_dbufs)); for (i = 0; i < TXG_SIZE; i++) { ASSERT0(dn->dn_next_nblkptr[i]); @@ -690,8 +727,8 @@ dnode_move_impl(dnode_t *odn, dnode_t *n ndn->dn_dirtyctx_firstset = odn->dn_dirtyctx_firstset; ASSERT(refcount_count(&odn->dn_tx_holds) == 0); refcount_transfer(&ndn->dn_holds, &odn->dn_holds); - ASSERT(list_is_empty(&ndn->dn_dbufs)); - list_move_tail(&ndn->dn_dbufs, &odn->dn_dbufs); + ASSERT(avl_is_empty(&ndn->dn_dbufs)); + avl_swap(&ndn->dn_dbufs, &odn->dn_dbufs); ndn->dn_dbufs_count = odn->dn_dbufs_count; ndn->dn_unlisted_l0_blkid = odn->dn_unlisted_l0_blkid; ndn->dn_bonus = odn->dn_bonus; @@ -725,7 +762,7 @@ dnode_move_impl(dnode_t *odn, dnode_t *n */ odn->dn_dbuf = NULL; odn->dn_handle = NULL; - list_create(&odn->dn_dbufs, sizeof (dmu_buf_impl_t), + avl_create(&odn->dn_dbufs, dbuf_compare, sizeof (dmu_buf_impl_t), offsetof(dmu_buf_impl_t, db_link)); odn->dn_dbufs_count = 0; odn->dn_unlisted_l0_blkid = 0; @@ -1236,7 +1273,8 @@ dnode_setdirty(dnode_t *dn, dmu_tx_t *tx return; } - ASSERT(!refcount_is_zero(&dn->dn_holds) || list_head(&dn->dn_dbufs)); + ASSERT(!refcount_is_zero(&dn->dn_holds) || + !avl_is_empty(&dn->dn_dbufs)); ASSERT(dn->dn_datablksz != 0); ASSERT0(dn->dn_next_bonuslen[txg&TXG_MASK]); ASSERT0(dn->dn_next_blksz[txg&TXG_MASK]); @@ -1309,7 +1347,7 @@ dnode_free(dnode_t *dn, dmu_tx_t *tx) int dnode_set_blksz(dnode_t *dn, uint64_t size, int ibs, dmu_tx_t *tx) { - dmu_buf_impl_t *db, *db_next; + dmu_buf_impl_t *db; int err; if (size == 0) @@ -1332,9 +1370,8 @@ dnode_set_blksz(dnode_t *dn, uint64_t si goto fail; mutex_enter(&dn->dn_dbufs_mtx); - for (db = list_head(&dn->dn_dbufs); db; db = db_next) { - db_next = list_next(&dn->dn_dbufs, db); - + for (db = avl_first(&dn->dn_dbufs); db != NULL; + db = AVL_NEXT(&dn->dn_dbufs, db)) { if (db->db_blkid != 0 && db->db_blkid != DMU_BONUS_BLKID && db->db_blkid != DMU_SPILL_BLKID) { mutex_exit(&dn->dn_dbufs_mtx); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Mon Aug 11 22:43:44 2014 (r269844) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Tue Aug 12 00:53:03 2014 (r269845) @@ -400,16 +400,13 @@ dnode_evict_dbufs(dnode_t *dn) int pass = 0; do { - dmu_buf_impl_t *db, marker; + dmu_buf_impl_t *db, *db_next; int evicting = FALSE; progress = FALSE; mutex_enter(&dn->dn_dbufs_mtx); - list_insert_tail(&dn->dn_dbufs, &marker); - db = list_head(&dn->dn_dbufs); - for (; db != ▮ db = list_head(&dn->dn_dbufs)) { - list_remove(&dn->dn_dbufs, db); - list_insert_tail(&dn->dn_dbufs, db); + for (db = avl_first(&dn->dn_dbufs); db != NULL; db = db_next) { + db_next = AVL_NEXT(&dn->dn_dbufs, db); #ifdef DEBUG DB_DNODE_ENTER(db); ASSERT3P(DB_DNODE(db), ==, dn); @@ -429,7 +426,6 @@ dnode_evict_dbufs(dnode_t *dn) } } - list_remove(&dn->dn_dbufs, &marker); /* * NB: we need to drop dn_dbufs_mtx between passes so * that any DB_EVICTING dbufs can make progress. @@ -500,7 +496,7 @@ dnode_sync_free(dnode_t *dn, dmu_tx_t *t dnode_undirty_dbufs(&dn->dn_dirty_records[txgoff]); dnode_evict_dbufs(dn); - ASSERT3P(list_head(&dn->dn_dbufs), ==, NULL); + ASSERT(avl_is_empty(&dn->dn_dbufs)); ASSERT3P(dn->dn_bonus, ==, NULL); /* Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h Mon Aug 11 22:43:44 2014 (r269844) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h Tue Aug 12 00:53:03 2014 (r269845) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ @@ -213,11 +213,14 @@ typedef struct dmu_buf_impl { /* pointer to most recent dirty record for this buffer */ dbuf_dirty_record_t *db_last_dirty; + /* Creation time of dbuf (see comment in dbuf_compare). */ + hrtime_t db_creation; + /* * Our link on the owner dnodes's dn_dbufs list. * Protected by its dn_dbufs_mtx. */ - list_node_t db_link; + avl_node_t db_link; /* Data which is unique to data (leaf) blocks: */ Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Mon Aug 11 22:43:44 2014 (r269844) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Tue Aug 12 00:53:03 2014 (r269845) @@ -211,7 +211,7 @@ typedef struct dnode { refcount_t dn_holds; kmutex_t dn_dbufs_mtx; - list_t dn_dbufs; /* descendent dbufs */ + avl_tree_t dn_dbufs; /* descendent dbufs */ /* protected by dn_struct_rwlock */ struct dmu_buf_impl *dn_bonus; /* bonus buffer dbuf */ Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/avl.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/avl.h Mon Aug 11 22:43:44 2014 (r269844) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/avl.h Tue Aug 12 00:53:03 2014 (r269845) @@ -23,6 +23,10 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2014 by Delphix. All rights reserved. + */ + #ifndef _AVL_H #define _AVL_H @@ -260,6 +264,11 @@ extern boolean_t avl_update_lt(avl_tree_ extern boolean_t avl_update_gt(avl_tree_t *, void *); /* + * Swaps the contents of the two trees. + */ +extern void avl_swap(avl_tree_t *tree1, avl_tree_t *tree2); + +/* * Return the number of nodes in the tree */ extern ulong_t avl_numnodes(avl_tree_t *tree); From delphij at FreeBSD.org Tue Aug 12 00:59:19 2014 From: delphij at FreeBSD.org (Xin LI) Date: Tue, 12 Aug 2014 00:59:19 +0000 (UTC) Subject: svn commit: r269846 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <53e966e7.2ac0.3d7c5f0d@svn.freebsd.org> Author: delphij Date: Tue Aug 12 00:59:19 2014 New Revision: 269846 URL: http://svnweb.freebsd.org/changeset/base/269846 Log: MFC r269230: MFV r269224: Increase default ARC buf_hash_table size. When typical block size is small, the hash table could be too small, which would lead to long hash chains and limit performance for cached reads. A new loader tunable, vfs.zfs.arc_average_blocksize, have been added which allows users to override the default assumption of average (typical) block size. Old default was 65536 (64 KiB) and new default is 8192 (8 KiB). Illumos issue: 5034 ARC's buf_hash_table is too small Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Aug 12 00:53:03 2014 (r269845) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Aug 12 00:59:19 2014 (r269846) @@ -203,15 +203,20 @@ int zfs_arc_grow_retry = 0; int zfs_arc_shrink_shift = 0; int zfs_arc_p_min_shift = 0; int zfs_disable_dup_eviction = 0; +uint64_t zfs_arc_average_blocksize = 8 * 1024; /* 8KB */ TUNABLE_QUAD("vfs.zfs.arc_max", &zfs_arc_max); TUNABLE_QUAD("vfs.zfs.arc_min", &zfs_arc_min); TUNABLE_QUAD("vfs.zfs.arc_meta_limit", &zfs_arc_meta_limit); +TUNABLE_QUAD("vfs.zfs.arc_average_blocksize", &zfs_arc_average_blocksize); SYSCTL_DECL(_vfs_zfs); SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_max, CTLFLAG_RDTUN, &zfs_arc_max, 0, "Maximum ARC size"); SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_min, CTLFLAG_RDTUN, &zfs_arc_min, 0, "Minimum ARC size"); +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_average_blocksize, CTLFLAG_RDTUN, + &zfs_arc_average_blocksize, 0, + "ARC average blocksize"); /* * Note that buffers can be in one of 6 states: @@ -1056,10 +1061,11 @@ buf_init(void) /* * The hash table is big enough to fill all of physical memory - * with an average 64K block size. The table will take up - * totalmem*sizeof(void*)/64K (eg. 128KB/GB with 8-byte pointers). + * with an average block size of zfs_arc_average_blocksize (default 8K). + * By default, the table will take up + * totalmem * sizeof(void*) / 8K (1MB per GB with 8-byte pointers). */ - while (hsize * 65536 < (uint64_t)physmem * PAGESIZE) + while (hsize * zfs_arc_average_blocksize < (uint64_t)physmem * PAGESIZE) hsize <<= 1; retry: buf_hash_table.ht_mask = hsize - 1; From peter at FreeBSD.org Tue Aug 12 01:40:14 2014 From: peter at FreeBSD.org (Peter Wemm) Date: Tue, 12 Aug 2014 01:40:12 +0000 (UTC) Subject: svn commit: r269847 - in stable/10: contrib/apr contrib/apr/docs contrib/apr/encoding contrib/apr/file_io/unix contrib/apr/include contrib/apr/include/arch/unix contrib/apr/include/private contrib/... Message-ID: <53e9707c.2d6c.2d976b@svn.freebsd.org> Author: peter Date: Tue Aug 12 01:40:11 2014 New Revision: 269847 URL: http://svnweb.freebsd.org/changeset/base/269847 Log: MFC r266728,266731,266735,266736,268135,268960,269833 Update apr 1.4.8 -> 1.5.1 Update apr-util 1.5.2 -> 1.5.3 Update serf 1.3.4 -> 1.3.7 Update svnlite 1.8.8 -> 1.8.10 Deal with svnlite.1 manpage. Added: stable/10/contrib/apr/CMakeLists.txt - copied unchanged from r266735, head/contrib/apr/CMakeLists.txt stable/10/contrib/apr/README.cmake - copied unchanged from r266735, head/contrib/apr/README.cmake stable/10/contrib/apr/encoding/ - copied from r266735, head/contrib/apr/encoding/ stable/10/contrib/apr/include/apr.hwc - copied unchanged from r266735, head/contrib/apr/include/apr.hwc stable/10/contrib/apr/include/apr_escape.h - copied unchanged from r266735, head/contrib/apr/include/apr_escape.h stable/10/contrib/apr/include/apr_skiplist.h - copied unchanged from r266735, head/contrib/apr/include/apr_skiplist.h stable/10/contrib/apr/include/private/ - copied from r266735, head/contrib/apr/include/private/ stable/10/contrib/apr/poll/unix/z_asio.c - copied unchanged from r266735, head/contrib/apr/poll/unix/z_asio.c stable/10/contrib/apr/tables/apr_skiplist.c - copied unchanged from r266735, head/contrib/apr/tables/apr_skiplist.c stable/10/contrib/apr/tools/ - copied from r266735, head/contrib/apr/tools/ stable/10/contrib/subversion/subversion/include/private/svn_cert.h - copied unchanged from r269833, head/contrib/subversion/subversion/include/private/svn_cert.h Modified: stable/10/contrib/apr/CHANGES stable/10/contrib/apr/LICENSE stable/10/contrib/apr/Makefile.in stable/10/contrib/apr/Makefile.win stable/10/contrib/apr/NOTICE stable/10/contrib/apr/apr.dep stable/10/contrib/apr/apr.dsp stable/10/contrib/apr/apr.mak stable/10/contrib/apr/apr.spec stable/10/contrib/apr/build-outputs.mk stable/10/contrib/apr/build.conf stable/10/contrib/apr/configure stable/10/contrib/apr/configure.in stable/10/contrib/apr/docs/canonical_filenames.html stable/10/contrib/apr/file_io/unix/filedup.c stable/10/contrib/apr/file_io/unix/filestat.c stable/10/contrib/apr/file_io/unix/mktemp.c stable/10/contrib/apr/file_io/unix/open.c stable/10/contrib/apr/file_io/unix/pipe.c stable/10/contrib/apr/file_io/unix/readwrite.c stable/10/contrib/apr/include/apr.h.in stable/10/contrib/apr/include/apr_allocator.h stable/10/contrib/apr/include/apr_errno.h stable/10/contrib/apr/include/apr_file_info.h stable/10/contrib/apr/include/apr_file_io.h stable/10/contrib/apr/include/apr_fnmatch.h stable/10/contrib/apr/include/apr_hash.h stable/10/contrib/apr/include/apr_inherit.h stable/10/contrib/apr/include/apr_lib.h stable/10/contrib/apr/include/apr_mmap.h stable/10/contrib/apr/include/apr_network_io.h stable/10/contrib/apr/include/apr_poll.h stable/10/contrib/apr/include/apr_pools.h stable/10/contrib/apr/include/apr_shm.h stable/10/contrib/apr/include/apr_strings.h stable/10/contrib/apr/include/apr_tables.h stable/10/contrib/apr/include/apr_thread_mutex.h stable/10/contrib/apr/include/apr_thread_proc.h stable/10/contrib/apr/include/apr_time.h stable/10/contrib/apr/include/apr_user.h stable/10/contrib/apr/include/apr_version.h stable/10/contrib/apr/include/arch/unix/apr_arch_poll_private.h stable/10/contrib/apr/include/arch/unix/apr_arch_threadproc.h stable/10/contrib/apr/include/arch/unix/apr_private.h.in stable/10/contrib/apr/libapr.dep stable/10/contrib/apr/libapr.dsp stable/10/contrib/apr/libapr.mak stable/10/contrib/apr/locks/unix/proc_mutex.c stable/10/contrib/apr/network_io/unix/sendrecv.c stable/10/contrib/apr/network_io/unix/sockaddr.c stable/10/contrib/apr/network_io/unix/socket_util.c stable/10/contrib/apr/network_io/unix/sockets.c stable/10/contrib/apr/network_io/unix/sockopt.c stable/10/contrib/apr/passwd/apr_getpass.c stable/10/contrib/apr/poll/unix/pollcb.c stable/10/contrib/apr/poll/unix/pollset.c stable/10/contrib/apr/shmem/unix/shm.c stable/10/contrib/apr/strings/apr_cpystrn.c stable/10/contrib/apr/strings/apr_strings.c stable/10/contrib/apr/support/unix/waitio.c stable/10/contrib/apr/tables/apr_hash.c stable/10/contrib/apr/tables/apr_tables.c stable/10/contrib/serf/CHANGES stable/10/contrib/serf/auth/auth_spnego.c stable/10/contrib/serf/buckets/ssl_buckets.c stable/10/contrib/serf/serf.h stable/10/contrib/serf/ssltunnel.c stable/10/contrib/subversion/CHANGES stable/10/contrib/subversion/NOTICE stable/10/contrib/subversion/build-outputs.mk stable/10/contrib/subversion/build.conf stable/10/contrib/subversion/configure stable/10/contrib/subversion/configure.ac stable/10/contrib/subversion/get-deps.sh stable/10/contrib/subversion/subversion/include/private/svn_cache.h stable/10/contrib/subversion/subversion/include/private/svn_dep_compat.h stable/10/contrib/subversion/subversion/include/svn_version.h stable/10/contrib/subversion/subversion/libsvn_client/commit_util.c stable/10/contrib/subversion/subversion/libsvn_client/delete.c stable/10/contrib/subversion/subversion/libsvn_client/export.c stable/10/contrib/subversion/subversion/libsvn_client/externals.c stable/10/contrib/subversion/subversion/libsvn_client/merge.c stable/10/contrib/subversion/subversion/libsvn_client/prop_commands.c stable/10/contrib/subversion/subversion/libsvn_delta/svndiff.c stable/10/contrib/subversion/subversion/libsvn_fs_fs/fs.c stable/10/contrib/subversion/subversion/libsvn_fs_fs/fs.h stable/10/contrib/subversion/subversion/libsvn_fs_fs/fs_fs.c stable/10/contrib/subversion/subversion/libsvn_fs_fs/rep-cache-db.h stable/10/contrib/subversion/subversion/libsvn_ra_serf/commit.c stable/10/contrib/subversion/subversion/libsvn_ra_serf/getlocks.c stable/10/contrib/subversion/subversion/libsvn_ra_serf/inherited_props.c stable/10/contrib/subversion/subversion/libsvn_ra_serf/locks.c stable/10/contrib/subversion/subversion/libsvn_ra_serf/log.c stable/10/contrib/subversion/subversion/libsvn_ra_serf/options.c stable/10/contrib/subversion/subversion/libsvn_ra_serf/update.c stable/10/contrib/subversion/subversion/libsvn_ra_serf/util.c stable/10/contrib/subversion/subversion/libsvn_ra_svn/protocol stable/10/contrib/subversion/subversion/libsvn_repos/dump.c stable/10/contrib/subversion/subversion/libsvn_repos/fs-wrap.c stable/10/contrib/subversion/subversion/libsvn_subr/cache-memcache.c stable/10/contrib/subversion/subversion/libsvn_subr/config_auth.c stable/10/contrib/subversion/subversion/libsvn_subr/config_file.c stable/10/contrib/subversion/subversion/libsvn_subr/dirent_uri.c stable/10/contrib/subversion/subversion/libsvn_subr/internal_statements.h stable/10/contrib/subversion/subversion/libsvn_subr/io.c stable/10/contrib/subversion/subversion/libsvn_subr/opt.c stable/10/contrib/subversion/subversion/libsvn_subr/prompt.c stable/10/contrib/subversion/subversion/libsvn_subr/sysinfo.c stable/10/contrib/subversion/subversion/libsvn_subr/version.c stable/10/contrib/subversion/subversion/libsvn_wc/status.c stable/10/contrib/subversion/subversion/libsvn_wc/wc-checks.h stable/10/contrib/subversion/subversion/libsvn_wc/wc-metadata.h stable/10/contrib/subversion/subversion/libsvn_wc/wc-metadata.sql stable/10/contrib/subversion/subversion/libsvn_wc/wc-queries.h stable/10/contrib/subversion/subversion/libsvn_wc/wc-queries.sql stable/10/contrib/subversion/subversion/libsvn_wc/wc_db.c stable/10/contrib/subversion/subversion/libsvn_wc/wc_db.h stable/10/contrib/subversion/subversion/libsvn_wc/wc_db_wcroot.c stable/10/contrib/subversion/subversion/svn/conflict-callbacks.c stable/10/contrib/subversion/subversion/svndumpfilter/svndumpfilter.c stable/10/contrib/subversion/subversion/svnrdump/util.c stable/10/contrib/subversion/subversion/svnserve/serve.c stable/10/tools/build/mk/OptionalObsoleteFiles.inc stable/10/usr.bin/svn/lib/libapr/Makefile stable/10/usr.bin/svn/lib/libapr/apr.h stable/10/usr.bin/svn/lib/libapr/apr_private.h stable/10/usr.bin/svn/svn/Makefile stable/10/usr.bin/svn/svn_private_config.h Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/apr/CHANGES ============================================================================== --- stable/10/contrib/apr/CHANGES Tue Aug 12 00:59:19 2014 (r269846) +++ stable/10/contrib/apr/CHANGES Tue Aug 12 01:40:11 2014 (r269847) @@ -1,235 +1,124 @@ -*- coding: utf-8 -*- -Changes for APR 1.4.8 +Changes for APR 1.5.1 - *) Fix compiltation with FreeBSD on ARM. [Olli Hauer ] + *) apr_os_proc_mutex_get() on Unix: Avoid segfault for cross- + process pthread mutexes. [Yann Ylavic ] - *) Fix 1.4.7 regression in apr_mcast_hops() and apr_mcast_loopback() - for AF_INET (IPv4) sockets on most Unix platforms. [Joe Orton] + *) When using shmget-based shared memory, the ID used for ftok is + now an APR hash of the filename instead of the constant '1'. + We do this to help avoid collisions. PR 53996 [Jim Jagielski] - *) Fix the return value of apr_threadattr_detach_get() on some - platforms like OS X and Solaris. [Rainer Jung, ] + *) apr_socket_atreadeof(): Fix breakage on OS X. [Jim Jagielski] -Changes for APR 1.4.7 + *) Fix POSIX shared memory (shm_open) use for named shared memory. + Includes adding '--enable-posix-shm' to force POSIX shm if + available, and OS X compatibility. PR 55928. + [Jozef Hatala , Jim Jagielski] - *) Fix apr_sockaddr_info_get() not returning an error in some cases. - PR 54779. [Jan Kalu?a ] + *) Fix race condition when calling apr_dir_make_recursive from + multiple threads on Windows. + [Bert Huijben] - *) Fix amd64 assembler version of apr_atomic_xchgptr(). PR 51851. [Mattias - Engdeg?rd ] + *) Fix apr_escape.c compilation errors on EBCDIC platforms. + [Eric Covener] - *) Fix PPC atomics to work with gcc 4.0. PR 54840. [Mattias Engdeg?rd - ] + *) FreeBSD 10: Correct a regression in 1.5.0 which affected non- + blocking sockets in some applications, including httpd. [Jeff + Trawick] - *) configure: Fix detection of O_NONBLOCK inheritance on busy - systems. [Rainer Jung] + *) Windows cmake build: Fix incorrect installation of some .pdb + files. Fix incorrect use of some logic intended for Windows 9x, + including legacy filesystem interfaces and dynamic loading of + some Windows APIs. [Jeff Trawick] - *) Remove unused code, fix strict C compliance bug in SHA-256 - implementation. [Jan Kaluza ] - - *) Fix apr_ipsubnet_test() false positives when comparing IPv4 - subnet representation against an IPv6 address. PR 54047. [Joe Orton] - - *) apr_socket_accept_filter: Return success when trying to again set - the filter to the same value as before, avoiding an unhelpful - APR_EINVAL. PR 37863. [Jeff Trawick] - - *) configure: Fix Linux 3.x detection. PR 54001. [Gilles Espinasse - ] - - *) apr_time_exp_*() on Windows: Fix error in the tm_yday field of - apr_time_exp_t for times within leap years. PR 53175. + *) apr_skiplist: Add compatibility with C++ applications. [Jeff Trawick] - *) Improve platform detection by updating config.guess and config.sub. - [Rainer Jung] - - *) Add support for OSX Mountain Lion (10.8) [Jim Jagielski] - - *) Add various gcc function attributes. [Stefan Fritsch] - - *) Fix some problems in apr_sockaddr_info_get() when trying to resolve - the loopback addresses of a protocol family that is not otherwise - configured on the system. PR 52709. [Nirgal Vourg?re - , Stefan Fritsch] - - *) Fix file not being unlocked if truncate call on a file fails. - [Mladen Turk] - - *) apr_mcast_hops: Fix EINVAL for IPv6 sockets caused by using byte - instead integer for setsockopt. [Mladen Turk] - - *) Windows: Fix compile-time checks for 64-bit builds, resolving a - crash in httpd's mod_rewrite. PR 49155. [] - -Changes for APR 1.4.6 - - *) Flush write buffer before truncate call on a file. - [Mladen Turk] - - *) Randomise hashes by providing a seed. - Assigned CVE-2012-0840, oCERT-2011-003, but not known to be exploitable. - [Bojan Smojver, Branko ?ibej, Ruediger Pluem et al.] - - *) apr_random: Prevent segfault if pool used to initialize apr_random is - destroyed before forking. [Stefan Fritsch] - - *) testrand: Improve child randomness test case. [Rainer Jung] - - *) apr_proc_fork, apr_random_after_fork: disambiguate what happens to the - proc structure passed in, and ensure that the pid is set correctly in - a newly created child; note that merely mixing a PID into the random - seed of a new child doesn't markedly increase entropy. [Sander Temme] - - *) apr_file_open: Avoid fcntl() calls if support for O_CLOEXEC works. - PR 48557. [Mike Frysinger ] - - *) apr_dir_make_recursive: Fix race condition that could lead to EEXIST - being returned. PR 51254. [William Lee , - Wim Lewis ] - - *) configure: Fix APR_RESTORE_THE_ENVIRONMENT if the original variable was - a single space. PR 50334. [Nathan Phillip Brink ] - - *) apr_proc_create: Don't close any of the new stdin/stdout/stderr in the - child if it already has the correct FD. PR 51995. - [Dan Ports ] - - *) Fix flag character '#' in combination with format character 'x' in - apr snprintf implementations. [Rainer Jung] - - *) Improve platform detection by updating config.guess and config.sub. - [Rainer Jung] - - *) Add libtool2 files to extraclean make target. [Rainer Jung] + *) Correct a regression in 1.5.0 which affected out-of-tree + builds on Unix. [Rainer Jung] - *) Don't overwrite our config.guess and config.sub - when running buildconf. [Rainer Jung] + *) Improve platform detection for bundled expat by updating + config.guess and config.sub. [Rainer Jung] - *) Silence autoconf 2.68 warnings. [Rainer Jung] +Changes for APR 1.5.0 -Changes for APR 1.4.5 - - *) Security: CVE-2011-1928 - apr_fnmatch(): Fix high CPU loop. [William Rowe] - - *) Fix top_builddir in installed apr_rules.mk. [Bojan Smojver] - -Changes for APR 1.4.4 - - *) Windows: Fix command-line builds. [William Rowe] - -Changes for APR 1.4.3 - - *) Security: CVE-2011-0419 - Reimplement apr_fnmatch() from scratch using a non-recursive - algorithm; now has improved compliance with the fnmatch() spec. - [William Rowe] - - *) Fix environment-related crash using some non-standard builds on - Windows 7/Server 2008. [Steve Hay ] - - *) poll, pollset, pollcb on Windows: Handle calls with no file/socket - descriptors. PR 49882. [Stefan Ruppert , Jeff Trawick] - - *) Fix APR_IPV6_V6ONLY issues on Windows related to run-time behavior - on Windows older than Vista and SDK/MinGW levels without IPV6_V6ONLY. - PR 45321. [Sob ] - - *) Fix address handling when accepting an AF_INET socket from a socket - bound as AF_INET6. PR 49678. [Joe Orton] + *) Fix Linux kernel version check to recognize more versions, + including versions 3.10 and later. PR 55690. [Joe Orton, + Arfrever Frehtes Taifersar Arahesis ] + + *) Add apr_sockaddr_is_wildcard() to check if a socket address + refers to the wildcard address for the protocol family (e.g., + 0.0.0.0/INADDR_ANY for IPv4). [Jeff Trawick] + + *) apr_file_dup2() on Windows: Fix debug RTL assertion when + attempting to _commit(stdout) or _commit(stderr). [Mike Rumph + ] + + *) apr_socket_connect() on Windows: Handle WSAEISCONN. PR 48736. + [, Jeff Trawick] + + *) z/OS: threadsafe apr_pollset_poll support for sockets [Greg Ames] + + *) Windows: Don't obtain a mutex for buffered file I/O unless the + file was opened with the APR_FOPEN_XTHREAD flag. [Ivan Zhakov + ] + + *) Windows: Create named shared memory segments under the "Local" + namespace if the caller is unprivileged, fixing an inability of + unprivileged callers to use apr_shm_create() with named shared + memory segments under recent Windows. As before, shared memory + segments are created under the "Global" namespace for privileged + callers. Add apr_shm_create_ex() and apr_shm_attach_ex(), which + provide the ability to override the normal namespace selection. + [Jeff Trawick] - *) Fix error return values from apr_sockaddr_info_get() on Windows for - IPv6 builds. [Ivan Zhakov ] + *) Update compile settings for MINT OS. PR 47181. [Alan Hourihane + ] - *) Add new experimental configure option --enable-allocator-uses-mmap to - use mmap instead of malloc in apr_allocator_alloc(). This greatly reduces - memory fragmentation with malloc implementations (e.g. glibc) that - don't handle allocationss of a page-size-multiples in an efficient way. - It also makes apr_allocator_max_free_set() actually have some effect - on such platforms. [Stefan Fritsch] + *) Files and pipes on Windows: Don't create an unused pollset when + files and pipes are opened. [Mladen Turk] - *) configure: Support 64 and 32 bit universal builds for Darwin/ - OS X 10.6+. [Jim Jagielski] + *) apr_socket_timeout_set() on Windows: If the socket was in a non- + blocking state before, disable that setting so that timeouts work. + [Jeff Trawick] - *) apr_sockaddr_info_get() on AIX: Fix a problem which could set - the port field in the native socket address to 1 when 0 was - specified. PR 46964. [Jeff Trawick] + *) File info APIs: Fix calculation of atime and mtime on AIX. PR 51146. + [Ruediger Pluem] - *) configure: Make definition of apr_ino_t independent of - _FILE_OFFSET_BITS even on platforms where ino_t is 'unsigned int'. - [Stefan Fritsch] + *) Add the apr_escape interface. [Graham Leggett] - *) apr_ring: Workaround for aliasing problem that causes gcc 4.5 to - miscompile some brigade related code. PR 50190. [Stefan Fritsch] + *) Cygwin build fixes. PRs 51016 and 55586. [Carlo Bramini + ] - *) apr_file_flush_locked(): Handle short writes. [Stefan Fritsch] + *) Add apr_skiplist family. [Jim Jagielski] - *) apr_pollset_create_ex(): Trap errors from pollset providers. - PR 49094. [Sami Tolvanen ] + *) Add experimental cmake-based build system for Windows. Refer to + README.cmake for more information. [Jeff Trawick, Tom Donovan] - *) apr_pollset_create*(): Fix memory lifetime problem with the wakeup - pipe when the pollset was created with APR_POLLSET_NOCOPY. - [Neil Conway ] + *) Add the apr_table_getm() call, which transparently handles the + merging of keys with multiple values. [Graham Leggett] - *) Fix detection of some Linux variants when configure is built with - recent GNU tools. [Eric Covener] + *) Add apr_hash_this_key(), apr_hash_this_key_len(), and + apr_hash_this_val() for easier access to those attributes from + a hash iterator. [Hyrum K. Wright ] - *) Avoid a redundant fcntl() call in apr_file_open() where O_CLOEXEC - is supported. PR 46297. [Joe Orton] + *) MinGW/MSYS: Support shared builds of APR, other general improvements + to support of this toolchain. PR 46175. [Carlo Bramini + ] *) Improve platform detection by updating config.guess and config.sub. [Rainer Jung] -Changes for APR 1.4.2 - - *) Undo a crash-bug introduced in 1.4.1 affecting some applications of - the apr hash and table structures, reported to affect Subversion - by Bert Huijben . [Graham Leggett] - -Changes for APR 1.4.1 - - *) Win32: Properly handle the ERROR_DIRECTORY system error code. - [Brane ?ibej] - -Changes for APR 1.4.0 - - *) Windows: Default build configurations assume NT or higher at run-time. - - *) Add apr_global_mutex_lockfile() for retrieving the file, if any, - associated with the mutex. Add apr_global_mutex_name() for retrieving - the name of the lock mechanism used by the underlying proc mutex. - [Jeff Trawick] - - *) Add apr_socket_atreadeof to determine whether the receive part of the - socket has been closed by the peer. - [Ruediger Pluem, Mladen Turk, Joe Orton] - - *) Make apr_pollset and apr_pollcb implementations using providers. - Added apr_pollset_create_ex and apr_pollcb_create_ex that allows - choosing non-default providers. - [Mladen Turk] - - *) Win32: Use WSAPoll as default pollset method if supported and found - inside winsock dll. [Mladen Turk] - - *) apr_temp_dir_get() now checks the TMPDIR environment variable first, - instead of third. [Jim Jagielski] - - *) Add apr_file_sync() and apr_file_datasync() calls. [Bojan Smojver] - - *) apr_pollset_wakeup() on Windows: Fix core caused by closing the - file_socket_pipe with standard file_close. - [Arsen Chaloyan, Mladen Turk] - - *) Introduce apr_hash_do() for iterating over a hash table. [Mladen Turk] + *) apr_socket_opt_set: Add support for APR_SO_BROADCAST. PR 46389. + [Armin M?ller ] - *) Make sure WIN32 behaves the same as posix for file-backed shared memory - by removing the file on cleanup/remove. [Mladen Turk] + *) Enable platform specific support for the opening of a file or + pipe in non-blocking mode through the APR_FOPEN_NONBLOCK flag. + [Graham Leggett] - *) Introduce apr_pollset_wakeup() for interrupting the blocking - apr_pollset_poll() call. [Mladen Turk] +Changes for APR 1.4.x and later: - *) Add apr_file_link() function. PR 44841. [Mark Heily ] + *) http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/CHANGES?view=markup Changes for APR 1.3.x and later: Copied: stable/10/contrib/apr/CMakeLists.txt (from r266735, head/contrib/apr/CMakeLists.txt) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/apr/CMakeLists.txt Tue Aug 12 01:40:11 2014 (r269847, copy of r266735, head/contrib/apr/CMakeLists.txt) @@ -0,0 +1,434 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Read README.cmake before using this. + +PROJECT(APR C) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +OPTION(APR_INSTALL_PRIVATE_H "Install selected private .h files (for httpd)" OFF) +OPTION(APR_HAVE_IPV6 "IPv6 support" ON) +OPTION(INSTALL_PDB "Install .pdb files (if generated)" ON) +OPTION(APR_BUILD_TESTAPR "Build the test suite" OFF) +OPTION(TEST_STATIC_LIBS "Test programs use APR static libraries instead of shared libraries?" OFF) +SET(MIN_WINDOWS_VER "Vista" + CACHE STRING "Minimum Windows version") + +# create 1-or-0 representation of feature tests for apr.h + +SET(apr_have_ipv6_10 0) + +IF(APR_HAVE_IPV6) + SET(apr_have_ipv6_10 1) +ENDIF() + +IF("${MIN_WINDOWS_VER}" STREQUAL "") + SET(win32_winnt_str "0x0600") +ELSEIF(${MIN_WINDOWS_VER} STREQUAL "Vista") + SET(win32_winnt_str "0x0600") +ELSEIF(${MIN_WINDOWS_VER} STREQUAL "Windows7") + SET(win32_winnt_str "0x0601") +ELSE() + SET(win32_winnt_str ${MIN_WINDOWS_VER}) +ENDIF() + +CONFIGURE_FILE(include/apr.hwc + ${PROJECT_BINARY_DIR}/apr.h) + +ADD_EXECUTABLE(gen_test_char tools/gen_test_char.c) +GET_TARGET_PROPERTY(GEN_TEST_CHAR_EXE gen_test_char LOCATION) +ADD_CUSTOM_COMMAND( + COMMENT "Generating character tables, apr_escape_test_char.h, for current locale" + DEPENDS gen_test_char + COMMAND ${GEN_TEST_CHAR_EXE} > ${PROJECT_BINARY_DIR}/apr_escape_test_char.h + OUTPUT ${PROJECT_BINARY_DIR}/apr_escape_test_char.h +) +ADD_CUSTOM_TARGET( + test_char_header ALL + DEPENDS ${PROJECT_BINARY_DIR}/apr_escape_test_char.h +) + +# Generated .h files are stored in PROJECT_BINARY_DIR, not the +# source tree. +# +# BROKEN: not searching PROJECT_BINARY_DIR first, so you have to +# manually delete apr.h in PROJECT_SOURCE_DIR/include if +# you've generated apr.h before using a different build + +SET(APR_INCLUDE_DIRECTORIES + ${PROJECT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/include + ${CMAKE_CURRENT_SOURCE_DIR}/include/arch/win32 + ${CMAKE_CURRENT_SOURCE_DIR}/include/arch/unix + ${CMAKE_CURRENT_SOURCE_DIR}/include/private +) + +SET(APR_SYSTEM_LIBS + ws2_32 + mswsock + rpcrt4 +) + +INCLUDE_DIRECTORIES(${APR_INCLUDE_DIRECTORIES}) + +SET(APR_PUBLIC_HEADERS_STATIC + include/apr_allocator.h + include/apr_atomic.h + include/apr_dso.h + include/apr_env.h + include/apr_errno.h + include/apr_escape.h + include/apr_file_info.h + include/apr_file_io.h + include/apr_fnmatch.h + include/apr_general.h + include/apr_getopt.h + include/apr_global_mutex.h + include/apr_hash.h + include/apr_inherit.h + include/apr_lib.h + include/apr_mmap.h + include/apr_network_io.h + include/apr_poll.h + include/apr_pools.h + include/apr_portable.h + include/apr_proc_mutex.h + include/apr_random.h + include/apr_ring.h + include/apr_shm.h + include/apr_signal.h + include/apr_skiplist.h + include/apr_strings.h + include/apr_support.h + include/apr_tables.h + include/apr_thread_cond.h + include/apr_thread_mutex.h + include/apr_thread_proc.h + include/apr_thread_rwlock.h + include/apr_time.h + include/apr_user.h + include/apr_version.h + include/apr_want.h +) +SET(APR_PUBLIC_HEADERS_GENERATED + ${PROJECT_BINARY_DIR}/apr.h +) + +SET(APR_SOURCES + atomic/win32/apr_atomic.c + dso/win32/dso.c + encoding/apr_escape.c + file_io/unix/copy.c + file_io/unix/fileacc.c + file_io/unix/filepath_util.c + file_io/unix/fullrw.c + file_io/unix/mktemp.c + file_io/unix/tempdir.c + file_io/win32/buffer.c + file_io/win32/dir.c + file_io/win32/filedup.c + file_io/win32/filepath.c + file_io/win32/filestat.c + file_io/win32/filesys.c + file_io/win32/flock.c + file_io/win32/open.c + file_io/win32/pipe.c + file_io/win32/readwrite.c + file_io/win32/seek.c + locks/win32/proc_mutex.c + locks/win32/thread_cond.c + locks/win32/thread_mutex.c + locks/win32/thread_rwlock.c + memory/unix/apr_pools.c + misc/unix/errorcodes.c + misc/unix/getopt.c + misc/unix/otherchild.c + misc/unix/version.c + misc/win32/charset.c + misc/win32/env.c + misc/win32/internal.c + misc/win32/misc.c + misc/win32/rand.c + misc/win32/start.c + misc/win32/utf8.c + mmap/unix/common.c + mmap/win32/mmap.c + network_io/unix/inet_ntop.c + network_io/unix/inet_pton.c + network_io/unix/multicast.c + network_io/unix/sockaddr.c + network_io/unix/socket_util.c + network_io/win32/sendrecv.c + network_io/win32/sockets.c + network_io/win32/sockopt.c + passwd/apr_getpass.c + poll/unix/poll.c + poll/unix/pollcb.c + poll/unix/pollset.c + poll/unix/select.c + random/unix/apr_random.c + random/unix/sha2.c + random/unix/sha2_glue.c + shmem/win32/shm.c + strings/apr_cpystrn.c + strings/apr_fnmatch.c + strings/apr_snprintf.c + strings/apr_strings.c + strings/apr_strnatcmp.c + strings/apr_strtok.c + tables/apr_hash.c + tables/apr_skiplist.c + tables/apr_tables.c + threadproc/win32/proc.c + threadproc/win32/signals.c + threadproc/win32/thread.c + threadproc/win32/threadpriv.c + time/win32/time.c + time/win32/timestr.c + user/win32/groupinfo.c + user/win32/userinfo.c +) + +SET(APR_TEST_SOURCES + test/abts.c + test/testargs.c + test/testatomic.c + test/testcond.c + test/testdir.c + test/testdso.c + test/testdup.c + test/testenv.c + test/testescape.c + test/testfile.c + test/testfilecopy.c + test/testfileinfo.c + test/testflock.c + test/testfmt.c + test/testfnmatch.c + test/testglobalmutex.c + test/testhash.c + test/testipsub.c + test/testlfs.c + test/testlock.c + test/testmmap.c + test/testnames.c + test/testoc.c + test/testpath.c + test/testpipe.c + test/testpoll.c + test/testpools.c + test/testproc.c + test/testprocmutex.c + test/testrand.c + test/testshm.c + test/testsleep.c + test/testsock.c + test/testsockets.c + test/testsockopt.c + test/teststr.c + test/teststrnatcmp.c + test/testtable.c + test/testtemp.c + test/testthread.c + test/testtime.c + test/testud.c + test/testuser.c + test/testutil.c + test/testvsn.c +) + +SET(install_targets) +SET(install_bin_pdb) +SET(install_lib_pdb) + +# libapr-1 is shared, apr-1 is static +ADD_LIBRARY(libapr-1 SHARED ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED} libapr.rc) +SET(install_targets ${install_targets} libapr-1) +SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/libapr-1.pdb) +TARGET_LINK_LIBRARIES(libapr-1 ${APR_SYSTEM_LIBS}) +SET_TARGET_PROPERTIES(libapr-1 PROPERTIES COMPILE_DEFINITIONS "APR_DECLARE_EXPORT;WINNT") +ADD_DEPENDENCIES(libapr-1 test_char_header) + +ADD_LIBRARY(apr-1 STATIC ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED}) +SET(install_targets ${install_targets} apr-1) +SET(install_lib_pdb ${install_lib_pdb} ${PROJECT_BINARY_DIR}/apr-1.pdb) +TARGET_LINK_LIBRARIES(apr-1 ${APR_SYSTEM_LIBS}) +SET_TARGET_PROPERTIES(apr-1 PROPERTIES COMPILE_DEFINITIONS "APR_DECLARE_STATIC;WINNT") +ADD_DEPENDENCIES(apr-1 test_char_header) + +# libaprapp-1 and aprapp-1 are static +ADD_LIBRARY(libaprapp-1 STATIC misc/win32/apr_app.c misc/win32/internal.c ${APR_PUBLIC_HEADERS_GENERATED}) +SET(install_targets ${install_targets} libaprapp-1) +SET(install_lib_pdb ${install_lib_pdb} ${PROJECT_BINARY_DIR}/libaprapp-1.pdb) +SET_TARGET_PROPERTIES(libaprapp-1 PROPERTIES COMPILE_DEFINITIONS "APR_APP;WINNT") + +ADD_LIBRARY(aprapp-1 STATIC misc/win32/apr_app.c misc/win32/internal.c ${APR_PUBLIC_HEADERS_GENERATED}) +SET(install_targets ${install_targets} aprapp-1) +SET(install_lib_pdb ${install_lib_pdb} ${PROJECT_BINARY_DIR}/aprapp-1.pdb) +SET_TARGET_PROPERTIES(aprapp-1 PROPERTIES COMPILE_DEFINITIONS "APR_DECLARE_STATIC;APR_APP;WINNT") + +IF(APR_BUILD_TESTAPR) + ENABLE_TESTING() + # Create a "check" target that displays test program output to the console. + ADD_CUSTOM_TARGET(check COMMAND ${CMAKE_CTEST_COMMAND} --verbose) + + # copy data files to build directory so that we can run programs from there + EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E make_directory + ${PROJECT_BINARY_DIR}/data) + EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${PROJECT_SOURCE_DIR}/test/data/file_datafile.txt + ${PROJECT_BINARY_DIR}/data/file_datafile.txt) + EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${PROJECT_SOURCE_DIR}/test/data/mmap_datafile.txt + ${PROJECT_BINARY_DIR}/data/mmap_datafile.txt) + + IF(TEST_STATIC_LIBS) + SET(whichapr apr-1) + SET(whichaprapp aprapp-1) + SET(apiflag -DAPR_DECLARE_STATIC) + ELSE() + SET(whichapr libapr-1) + SET(whichaprapp libaprapp-1) + SET(apiflag) + ENDIF() + + ADD_EXECUTABLE(testapp test/testapp.c) + TARGET_LINK_LIBRARIES(testapp ${whichapr} ${whichaprapp} ${APR_SYSTEM_LIBS}) + SET_TARGET_PROPERTIES(testapp PROPERTIES LINK_FLAGS /entry:wmainCRTStartup) + IF(apiflag) + SET_TARGET_PROPERTIES(testapp PROPERTIES COMPILE_FLAGS ${apiflag}) + ENDIF() + ADD_TEST(NAME testapp COMMAND testapp) + + ADD_EXECUTABLE(testall ${APR_TEST_SOURCES}) + TARGET_LINK_LIBRARIES(testall ${whichapr} ${APR_SYSTEM_LIBS}) + IF(apiflag) + SET_TARGET_PROPERTIES(testall PROPERTIES COMPILE_FLAGS ${apiflag}) + ENDIF() + ADD_TEST(NAME testall COMMAND testall) + + ADD_LIBRARY(mod_test MODULE test/mod_test.c) + TARGET_LINK_LIBRARIES(mod_test ${whichapr} ${APR_SYSTEM_LIBS}) + SET_PROPERTY(TARGET mod_test APPEND PROPERTY LINK_FLAGS /export:print_hello) + # nasty work-around for difficulties adding more than one additional flag + # (they get joined in a bad way behind the scenes) + GET_PROPERTY(link_flags TARGET mod_test PROPERTY LINK_FLAGS) + SET(link_flags "${link_flags} /export:count_reps") + SET_TARGET_PROPERTIES(mod_test PROPERTIES LINK_FLAGS ${link_flags}) + IF(apiflag) + SET_TARGET_PROPERTIES(mod_test PROPERTIES COMPILE_FLAGS ${apiflag}) + ENDIF() + + # Build all the single-source executable files with no special build + # requirements. + SET(single_source_programs + test/echod.c + test/sendfile.c + test/sockperf.c + test/testlockperf.c + test/testmutexscope.c + test/globalmutexchild.c + test/occhild.c + test/proc_child.c + test/readchild.c + test/sockchild.c + test/testshmproducer.c + test/testshmconsumer.c + test/tryread.c + test/internal/testucs.c + ) + + FOREACH(sourcefile ${single_source_programs}) + STRING(REGEX REPLACE ".*/([^\\]+)\\.c" "\\1" proggie ${sourcefile}) + ADD_EXECUTABLE(${proggie} ${sourcefile}) + TARGET_LINK_LIBRARIES(${proggie} ${whichapr} ${APR_SYSTEM_LIBS}) + IF(apiflag) + SET_TARGET_PROPERTIES(${proggie} PROPERTIES COMPILE_FLAGS ${apiflag}) + ENDIF() + ENDFOREACH() + + # Add tests for programs that run by themselves with no arguments. + SET(simple_tests + testmutexscope + testucs + ) + + FOREACH(simple ${simple_tests}) + ADD_TEST(NAME ${simple} COMMAND ${simple}) + ENDFOREACH() + + # testlockperf takes forever on Windows with default counter limit + ADD_TEST(NAME testlockperf COMMAND testlockperf -c 50000) + + # sendfile runs multiple times with different parameters. + FOREACH(sendfile_mode blocking nonblocking timeout) + ADD_TEST(NAME sendfile-${sendfile_mode} COMMAND sendfile client ${sendfile_mode} startserver) + ENDFOREACH() + + # No test is added for echod+sockperf. Those will have to be run manually. + +ENDIF (APR_BUILD_TESTAPR) + +# Installation + +INSTALL(TARGETS ${install_targets} + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + ) + +IF(INSTALL_PDB) + INSTALL(FILES ${install_bin_pdb} + DESTINATION bin + CONFIGURATIONS RelWithDebInfo Debug) + + INSTALL(FILES ${install_lib_pdb} + DESTINATION lib + CONFIGURATIONS RelWithDebInfo Debug) +ENDIF() + +INSTALL(FILES ${APR_PUBLIC_HEADERS_STATIC} ${APR_PUBLIC_HEADERS_GENERATED} DESTINATION include) +IF(APR_INSTALL_PRIVATE_H) + # Kludges for unexpected dependencies of httpd 2.x, not installed by default + SET(APR_PRIVATE_H_FOR_HTTPD + include/arch/win32/apr_arch_file_io.h + include/arch/win32/apr_arch_misc.h + include/arch/win32/apr_arch_utf8.h + include/arch/win32/apr_private.h + ) + INSTALL(FILES ${APR_PRIVATE_H_FOR_HTTPD} DESTINATION include/arch/win32) + INSTALL(FILES include/arch/apr_private_common.h DESTINATION include/arch) +ENDIF() + +STRING(TOUPPER "${CMAKE_BUILD_TYPE}" buildtype) +MESSAGE(STATUS "") +MESSAGE(STATUS "") +MESSAGE(STATUS "APR configuration summary:") +MESSAGE(STATUS "") + +MESSAGE(STATUS " Build type ...................... : ${CMAKE_BUILD_TYPE}") +MESSAGE(STATUS " Install .pdb (if available)...... : ${INSTALL_PDB}") +MESSAGE(STATUS " Install prefix .................. : ${CMAKE_INSTALL_PREFIX}") +MESSAGE(STATUS " C compiler ...................... : ${CMAKE_C_COMPILER}") +MESSAGE(STATUS " IPv6 ............................ : ${APR_HAVE_IPV6}") +MESSAGE(STATUS " Minimum Windows version ......... : ${MIN_WINDOWS_VER}") +MESSAGE(STATUS " Build test suite ................ : ${APR_BUILD_TESTAPR}") +IF(TEST_STATIC_LIBS) +MESSAGE(STATUS " (testing static libraries)") +ELSE() +MESSAGE(STATUS " (testing dynamic libraries)") +ENDIF() +MESSAGE(STATUS " Install private .h for httpd .... : ${APR_INSTALL_PRIVATE_H}") Modified: stable/10/contrib/apr/LICENSE ============================================================================== --- stable/10/contrib/apr/LICENSE Tue Aug 12 00:59:19 2014 (r269846) +++ stable/10/contrib/apr/LICENSE Tue Aug 12 01:40:11 2014 (r269847) @@ -206,8 +206,8 @@ APACHE PORTABLE RUNTIME SUBCOMPONENTS: The Apache Portable Runtime includes a number of subcomponents with separate copyright notices and license terms. Your use of the source -code for the these subcomponents is subject to the terms and -conditions of the following licenses. +code for these subcomponents is subject to the terms and conditions +of the following licenses. From strings/apr_fnmatch.c, include/apr_fnmatch.h, misc/unix/getopt.c, file_io/unix/mktemp.c, strings/apr_strings.c: Modified: stable/10/contrib/apr/Makefile.in ============================================================================== --- stable/10/contrib/apr/Makefile.in Tue Aug 12 00:59:19 2014 (r269846) +++ stable/10/contrib/apr/Makefile.in Tue Aug 12 01:40:11 2014 (r269847) @@ -18,7 +18,7 @@ APR_MAJOR_VERSION=@APR_MAJOR_VERSION@ INCDIR=./include OSDIR=$(top_srcdir)/include/arch/@OSDIR@ DEFOSDIR=$(INCDIR)/arch/@DEFAULT_OSDIR@ -INCLUDES=-I$(INCDIR) -I$(OSDIR) -I$(DEFOSDIR) -I$(top_srcdir)/include/arch/@DEFAULT_OSDIR@ -I$(top_srcdir)/include +INCLUDES=-I$(INCDIR) -I$(OSDIR) -I$(DEFOSDIR) -I$(top_srcdir)/include/arch/@DEFAULT_OSDIR@ -I$(top_srcdir)/include -I$(top_srcdir)/include/private -I$(top_blddir)/include/private # # Macros for target determination @@ -36,7 +36,7 @@ INSTALL_DATA = @INSTALL_DATA@ # Rules for building specific targets, starting with 'all' for # building the entire package. # -TARGETS = $(TARGET_LIB) apr.exp apr-config.out build/apr_rules.out +TARGETS = $(TARGET_LIB) include/private/apr_escape_test_char.h apr.exp apr-config.out build/apr_rules.out LT_VERSION = @LT_VERSION@ @@ -45,7 +45,9 @@ LT_VERSION = @LT_VERSION@ @INCLUDE_OUTPUTS@ CLEAN_TARGETS = apr-config.out apr.exp exports.c export_vars.c .make.dirs \ - build/apr_rules.out + build/apr_rules.out tools/gen_test_char at EXEEXT@ \ + tools/gen_test_char.o tools/gen_test_char.lo \ + include/private/apr_escape_test_char.h DISTCLEAN_TARGETS = config.cache config.log config.status \ include/apr.h include/arch/unix/apr_private.h \ libtool $(APR_CONFIG) build/apr_rules.mk apr.pc \ @@ -99,6 +101,8 @@ install: $(TARGETS) $(TARGET_LIB): $(OBJECTS) $(LINK) @lib_target@ $(ALL_LIBS) +encoding/apr_escape.lo: include/private/apr_escape_test_char.h + exports.c: $(HEADERS) $(APR_MKEXPORT) $(HEADERS) > $@ @@ -125,5 +129,20 @@ check: $(TARGET_LIB) etags: etags `find . -name '*.[ch]'` +make_tools_dir: + $(APR_MKDIR) tools + +OBJECTS_gen_test_char = tools/gen_test_char.lo $(LOCAL_LIBS) +tools/gen_test_char.lo: make_tools_dir +tools/gen_test_char at EXEEXT@: $(OBJECTS_gen_test_char) + $(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS) + +include/private/apr_escape_test_char.h: tools/gen_test_char at EXEEXT@ + $(APR_MKDIR) include/private + tools/gen_test_char at EXEEXT@ > $@ + +LINK_PROG = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) $(LT_LDFLAGS) \ + @LT_NO_INSTALL@ $(ALL_LDFLAGS) -o $@ + # DO NOT REMOVE docs: $(INCDIR)/*.h Modified: stable/10/contrib/apr/Makefile.win ============================================================================== --- stable/10/contrib/apr/Makefile.win Tue Aug 12 00:59:19 2014 (r269846) +++ stable/10/contrib/apr/Makefile.win Tue Aug 12 01:40:11 2014 (r269847) @@ -7,7 +7,7 @@ # install - compile everything # clean - mop up everything # -# You can override the build mechansim, choose only one; +# You can override the build mechanism, choose only one; # # USEMAK=1 - compile from exported make files # USEDSW=1 - compile from .dsw / .dsp VC6 projects Modified: stable/10/contrib/apr/NOTICE ============================================================================== --- stable/10/contrib/apr/NOTICE Tue Aug 12 00:59:19 2014 (r269846) +++ stable/10/contrib/apr/NOTICE Tue Aug 12 01:40:11 2014 (r269847) @@ -1,7 +1,7 @@ Apache Portable Runtime -Copyright (c) 2011 The Apache Software Foundation. +Copyright (c) 2000-2014 The Apache Software Foundation. -This product includes software developed by +This product includes software developed at The Apache Software Foundation (http://www.apache.org/). Portions of this software were developed at the National Center Copied: stable/10/contrib/apr/README.cmake (from r266735, head/contrib/apr/README.cmake) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/apr/README.cmake Tue Aug 12 01:40:11 2014 (r269847, copy of r266735, head/contrib/apr/README.cmake) @@ -0,0 +1,112 @@ +Experimental cmake-based build support for APR on Microsoft Windows + +Status +------ + +This build support is currently intended only for Microsoft Windows. +Only Windows NT-based systems can be targeted. (The traditional +Windows build support for APR can target Windows 9x as well.) + +This build support is experimental. Specifically, + +* It does not support all features of APR. +* Some components may not be built correctly and/or in a manner + compatible with the previous Windows build support. +* Build interfaces, such as the mechanisms which are used to enable + optional functionality or specify prerequisites, may change from + release to release as feedback is received from users and bugs and + limitations are resolved. + +Important: Refer to the "Known Bugs and Limitations" section for further + information. + + It is beyond the scope of this document to document or explain + how to utilize the various cmake features, such as different + build backends or provisions for finding support libraries. + + Please refer to the cmake documentation for additional information + that applies to building any project with cmake. + +Prerequisites +------------- + +The following tools must be in PATH: + +* cmake, version 2.8 or later +* If using a command-line compiler: compiler and linker and related tools + (Refer to the cmake documentation for more information.) + +How to build +------------ + +1. cd to a clean directory for building (i.e., don't build in your + source tree) + +2. Some cmake backends may want your compile tools in PATH. (Hint: "Visual + Studio Command Prompt") + +3. cmake -G "some backend, like 'NMake Makefiles'" + -DCMAKE_INSTALL_PREFIX=d:/path/to/aprinst + -DAPR-specific-flags + d:/path/to/aprsource + + Alternately, use cmake-gui and update settings in the GUI. + + APR feature flags: + + APR_INSTALL_PRIVATE_H Install extra .h files which are required when + building httpd and Subversion but which aren't + intended for use by applications. + Default: OFF + APR_HAVE_IPV6 Enable IPv6 support + Default: ON + APR_BUILD_TESTAPR Build APR test suite + Default: OFF + TEST_STATIC_LIBS Build the test suite to test the APR static + library instead of the APR dynamic library. + Default: OFF + In order to build the test suite against both + static and dynamic libraries, separate builds + will be required, one with TEST_STATIC_LIBS + set to ON. + MIN_WINDOWS_VER Minimum Windows version supported by this build + (This controls the setting of _WIN32_WINNT.) + "Vista" or "Windows7" or a numeric value like + "0x0601" + Default: "Vista" + For desktop/server equivalence or other values, + refer to + http://msdn.microsoft.com/en-us/library/windows/ + desktop/aa383745(v=vs.85).aspx + INSTALL_PDB Install .pdb files if generated. + Default: ON + + CMAKE_C_FLAGS_RELEASE, _DEBUG, _RELWITHDEBINFO, _MINSIZEREL + + CMAKE_BUILD_TYPE + + For NMake Makefiles the choices are at least DEBUG, RELEASE, + RELWITHDEBINFO, and MINSIZEREL + Other backends make have other selections. + +4. build using chosen backend (e.g., "nmake install") + +Known Bugs and Limitations +-------------------------- + +* If include/apr.h or other generated files have been created in the source + directory by another build system, they will be used unexpectedly and + cause the build to fail. +* Options should be provided for remaining features: + + APR_POOL_DEBUG +* APR-CHANGES.txt, APR-LICENSE.txt, and APR-NOTICE.txt are not installed, + though perhaps that is a job for a higher-level script. + +Generally: + +* Many APR features have not been tested with this build. +* Developers need to examine the existing Windows build in great detail and see + what is missing from the cmake-based build, whether a feature or some build + nuance. +* Any feedback you can provide on your experiences with this build will be + helpful. Modified: stable/10/contrib/apr/apr.dep ============================================================================== --- stable/10/contrib/apr/apr.dep Tue Aug 12 00:59:19 2014 (r269846) +++ stable/10/contrib/apr/apr.dep Tue Aug 12 01:40:11 2014 (r269847) @@ -1,558 +1,1916 @@ -# Microsoft Developer Studio Generated Dependency File, included by apr.mak - -.\atomic\win32\apr_atomic.c : \ - ".\include\apr_atomic.h"\ - - -.\dso\win32\dso.c : \ - ".\include\apr_getopt.h"\ - ".\include\apr_lib.h"\ - ".\include\apr_poll.h"\ - ".\include\apr_portable.h"\ - ".\include\apr_strings.h"\ - ".\include\arch\win32\apr_arch_dso.h"\ - ".\include\arch\win32\apr_arch_file_io.h"\ - ".\include\arch\win32\apr_arch_utf8.h"\ - - -.\file_io\win32\buffer.c : \ - ".\include\apr_getopt.h"\ - ".\include\apr_lib.h"\ - ".\include\apr_poll.h"\ - ".\include\apr_portable.h"\ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From hselasky at FreeBSD.org Tue Aug 12 12:06:22 2014 From: hselasky at FreeBSD.org (Hans Petter Selasky) Date: Tue, 12 Aug 2014 12:06:22 +0000 (UTC) Subject: svn commit: r269860 - stable/10/sys/ofed/drivers/infiniband/hw/mlx4 Message-ID: <53ea033e.6b2e.2182b9e@svn.freebsd.org> Author: hselasky Date: Tue Aug 12 12:06:21 2014 New Revision: 269860 URL: http://svnweb.freebsd.org/changeset/base/269860 Log: MFC r268314: Fix some compile warnings. Sponsored by: Mellanox Technologies Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/qp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/qp.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/qp.c Tue Aug 12 11:45:57 2014 (r269859) +++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/qp.c Tue Aug 12 12:06:21 2014 (r269860) @@ -264,7 +264,7 @@ static void post_nop_wqe(struct mlx4_ib_ /* Pad the remainder of the WQE with an inline data segment. */ if (size > s) { inl = wqe + s; - inl->byte_count = cpu_to_be32(1 << 31 | (size - s - sizeof *inl)); + inl->byte_count = cpu_to_be32(1U << 31 | (size - s - sizeof *inl)); } ctrl->srcrb_flags = 0; ctrl->fence_size = size / 16; @@ -1146,7 +1146,7 @@ static void mlx4_ib_lock_cqs(struct mlx4 { if (send_cq == recv_cq) { spin_lock_irq(&send_cq->lock); - __acquire(&recv_cq->lock); + (void) __acquire(&recv_cq->lock); } else if (send_cq->mcq.cqn < recv_cq->mcq.cqn) { spin_lock_irq(&send_cq->lock); spin_lock_nested(&recv_cq->lock, SINGLE_DEPTH_NESTING); @@ -1160,7 +1160,7 @@ static void mlx4_ib_unlock_cqs(struct ml __releases(&send_cq->lock) __releases(&recv_cq->lock) { if (send_cq == recv_cq) { - __release(&recv_cq->lock); + (void) __release(&recv_cq->lock); spin_unlock_irq(&send_cq->lock); } else if (send_cq->mcq.cqn < recv_cq->mcq.cqn) { spin_unlock(&recv_cq->lock); @@ -2422,11 +2422,11 @@ static int build_sriov_qp0_header(struct spc = MLX4_INLINE_ALIGN - ((unsigned long) (inl + 1) & (MLX4_INLINE_ALIGN - 1)); if (header_size <= spc) { - inl->byte_count = cpu_to_be32(1 << 31 | header_size); + inl->byte_count = cpu_to_be32(1U << 31 | header_size); memcpy(inl + 1, sqp->header_buf, header_size); i = 1; } else { - inl->byte_count = cpu_to_be32(1 << 31 | spc); + inl->byte_count = cpu_to_be32(1U << 31 | spc); memcpy(inl + 1, sqp->header_buf, spc); inl = (void *) (inl + 1) + spc; @@ -2445,7 +2445,7 @@ static int build_sriov_qp0_header(struct * of 16 mod 64. */ wmb(); - inl->byte_count = cpu_to_be32(1 << 31 | (header_size - spc)); + inl->byte_count = cpu_to_be32(1U << 31 | (header_size - spc)); i = 2; } @@ -2629,11 +2629,11 @@ static int build_mlx_header(struct mlx4_ spc = MLX4_INLINE_ALIGN - ((unsigned long) (inl + 1) & (MLX4_INLINE_ALIGN - 1)); if (header_size <= spc) { - inl->byte_count = cpu_to_be32(1 << 31 | header_size); + inl->byte_count = cpu_to_be32(1U << 31 | header_size); memcpy(inl + 1, sqp->header_buf, header_size); i = 1; } else { - inl->byte_count = cpu_to_be32(1 << 31 | spc); + inl->byte_count = cpu_to_be32(1U << 31 | spc); memcpy(inl + 1, sqp->header_buf, spc); inl = (void *) (inl + 1) + spc; @@ -2652,7 +2652,7 @@ static int build_mlx_header(struct mlx4_ * of 16 mod 64. */ wmb(); - inl->byte_count = cpu_to_be32(1 << 31 | (header_size - spc)); + inl->byte_count = cpu_to_be32(1U << 31 | (header_size - spc)); i = 2; } @@ -2797,17 +2797,17 @@ static void build_tunnel_header(struct i if (sizeof (hdr) <= spc) { memcpy(inl + 1, &hdr, sizeof (hdr)); wmb(); - inl->byte_count = cpu_to_be32(1 << 31 | sizeof (hdr)); + inl->byte_count = cpu_to_be32(1U << 31 | sizeof (hdr)); i = 1; } else { memcpy(inl + 1, &hdr, spc); wmb(); - inl->byte_count = cpu_to_be32(1 << 31 | spc); + inl->byte_count = cpu_to_be32(1U << 31 | spc); inl = (void *) (inl + 1) + spc; memcpy(inl + 1, (void *) &hdr + spc, sizeof (hdr) - spc); wmb(); - inl->byte_count = cpu_to_be32(1 << 31 | (sizeof (hdr) - spc)); + inl->byte_count = cpu_to_be32(1U << 31 | (sizeof (hdr) - spc)); i = 2; } From hselasky at FreeBSD.org Tue Aug 12 12:07:57 2014 From: hselasky at FreeBSD.org (Hans Petter Selasky) Date: Tue, 12 Aug 2014 12:07:57 +0000 (UTC) Subject: svn commit: r269861 - stable/10/sys/ofed/drivers/infiniband/hw/mlx4 Message-ID: <53ea039d.6b59.686e4d34@svn.freebsd.org> Author: hselasky Date: Tue Aug 12 12:07:57 2014 New Revision: 269861 URL: http://svnweb.freebsd.org/changeset/base/269861 Log: MFC r268315: Fix compile warning. Sponsored by: Mellanox Technologies Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mcg.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mcg.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mcg.c Tue Aug 12 12:06:21 2014 (r269860) +++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mcg.c Tue Aug 12 12:07:57 2014 (r269861) @@ -665,7 +665,7 @@ static void mlx4_ib_mcg_work_handler(str if (!list_empty(&group->pending_list)) req = list_first_entry(&group->pending_list, struct mcast_req, group_list); - if ((method == IB_MGMT_METHOD_GET_RESP)) { + if (method == IB_MGMT_METHOD_GET_RESP) { if (req) { send_reply_to_slave(req->func, group, &req->sa_mad, status); --group->func[req->func].num_pend_reqs; From hselasky at FreeBSD.org Tue Aug 12 12:10:30 2014 From: hselasky at FreeBSD.org (Hans Petter Selasky) Date: Tue, 12 Aug 2014 12:10:29 +0000 (UTC) Subject: svn commit: r269862 - in stable/10/sys/ofed: drivers/infiniband/hw/mlx4 drivers/net/mlx4 include/linux Message-ID: <53ea0436.6e9c.2b42d4e5@svn.freebsd.org> Author: hselasky Date: Tue Aug 12 12:10:29 2014 New Revision: 269862 URL: http://svnweb.freebsd.org/changeset/base/269862 Log: MFC r268316: Fix OFED startup order: All SYSINIT()'s and modules should be loaded prior to starting "/sbin/init" which will run all the "/etc/rc.d/xxx" scripts. Else there can be a race configuring the interfaces via "/etc/rc.conf". Sponsored by: Mellanox Technologies Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/main.c stable/10/sys/ofed/drivers/net/mlx4/en_main.c stable/10/sys/ofed/drivers/net/mlx4/main.c stable/10/sys/ofed/include/linux/module.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/main.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/main.c Tue Aug 12 12:07:57 2014 (r269861) +++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/main.c Tue Aug 12 12:10:29 2014 (r269862) @@ -2414,6 +2414,6 @@ static moduledata_t mlx4ib_mod = { .evhand = mlx4ib_evhand, }; -DECLARE_MODULE(mlx4ib, mlx4ib_mod, SI_SUB_SMP, SI_ORDER_ANY); +DECLARE_MODULE(mlx4ib, mlx4ib_mod, SI_SUB_OFED_PREINIT, SI_ORDER_ANY); MODULE_DEPEND(mlx4ib, mlx4, 1, 1, 1); MODULE_DEPEND(mlx4ib, ibcore, 1, 1, 1); Modified: stable/10/sys/ofed/drivers/net/mlx4/en_main.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/en_main.c Tue Aug 12 12:07:57 2014 (r269861) +++ stable/10/sys/ofed/drivers/net/mlx4/en_main.c Tue Aug 12 12:10:29 2014 (r269862) @@ -383,5 +383,5 @@ static moduledata_t mlxen_mod = { .name = "mlxen", .evhand = mlxen_evhand, }; -DECLARE_MODULE(mlxen, mlxen_mod, SI_SUB_SMP, SI_ORDER_ANY); +DECLARE_MODULE(mlxen, mlxen_mod, SI_SUB_OFED_PREINIT, SI_ORDER_ANY); MODULE_DEPEND(mlxen, mlx4, 1, 1, 1); Modified: stable/10/sys/ofed/drivers/net/mlx4/main.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/main.c Tue Aug 12 12:07:57 2014 (r269861) +++ stable/10/sys/ofed/drivers/net/mlx4/main.c Tue Aug 12 12:10:29 2014 (r269862) @@ -2875,4 +2875,4 @@ static moduledata_t mlx4_mod = { .evhand = mlx4_evhand, }; MODULE_VERSION(mlx4, 1); -DECLARE_MODULE(mlx4, mlx4_mod, SI_SUB_SMP, SI_ORDER_ANY); +DECLARE_MODULE(mlx4, mlx4_mod, SI_SUB_OFED_PREINIT, SI_ORDER_ANY); Modified: stable/10/sys/ofed/include/linux/module.h ============================================================================== --- stable/10/sys/ofed/include/linux/module.h Tue Aug 12 12:07:57 2014 (r269861) +++ stable/10/sys/ofed/include/linux/module.h Tue Aug 12 12:10:29 2014 (r269862) @@ -44,6 +44,11 @@ #define EXPORT_SYMBOL(name) #define EXPORT_SYMBOL_GPL(name) +/* OFED pre-module initialization */ +#define SI_SUB_OFED_PREINIT (SI_SUB_KTHREAD_INIT - 2) +/* OFED default module initialization */ +#define SI_SUB_OFED_MODINIT (SI_SUB_KTHREAD_INIT - 1) + #include static inline void @@ -68,17 +73,17 @@ _module_run(void *arg) } #define module_init(fn) \ - SYSINIT(fn, SI_SUB_LAST, SI_ORDER_FIRST, _module_run, (fn)) + SYSINIT(fn, SI_SUB_OFED_MODINIT, SI_ORDER_FIRST, _module_run, (fn)) /* * XXX This is a freebsdism designed to work around not having a module * load order resolver built in. */ #define module_init_order(fn, order) \ - SYSINIT(fn, SI_SUB_LAST, (order), _module_run, (fn)) + SYSINIT(fn, SI_SUB_OFED_MODINIT, (order), _module_run, (fn)) #define module_exit(fn) \ - SYSUNINIT(fn, SI_SUB_LAST, SI_ORDER_FIRST, _module_run, (fn)) + SYSUNINIT(fn, SI_SUB_OFED_MODINIT, SI_ORDER_FIRST, _module_run, (fn)) #define module_get(module) #define module_put(module) From hselasky at FreeBSD.org Tue Aug 12 12:18:45 2014 From: hselasky at FreeBSD.org (Hans Petter Selasky) Date: Tue, 12 Aug 2014 12:18:44 +0000 (UTC) Subject: svn commit: r269863 - in stable/9/sys/ofed: drivers/infiniband/hw/mlx4 drivers/net/mlx4 include/linux Message-ID: <53ea0624.6ee1.2d8f4b2a@svn.freebsd.org> Author: hselasky Date: Tue Aug 12 12:18:43 2014 New Revision: 269863 URL: http://svnweb.freebsd.org/changeset/base/269863 Log: MFC r268316: Fix OFED startup order: All SYSINIT()'s and modules should be loaded prior to starting "/sbin/init" which will run all the "/etc/rc.d/xxx" scripts. Else there can be a race configuring the interfaces via "/etc/rc.conf". Sponsored by: Mellanox Technologies Modified: stable/9/sys/ofed/drivers/infiniband/hw/mlx4/main.c stable/9/sys/ofed/drivers/net/mlx4/en_main.c stable/9/sys/ofed/drivers/net/mlx4/main.c stable/9/sys/ofed/include/linux/module.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ofed/drivers/infiniband/hw/mlx4/main.c ============================================================================== --- stable/9/sys/ofed/drivers/infiniband/hw/mlx4/main.c Tue Aug 12 12:10:29 2014 (r269862) +++ stable/9/sys/ofed/drivers/infiniband/hw/mlx4/main.c Tue Aug 12 12:18:43 2014 (r269863) @@ -1576,5 +1576,5 @@ static moduledata_t mlx4ib_mod = { .name = "mlx4ib", .evhand = mlx4ib_evhand, }; -DECLARE_MODULE(mlx4ib, mlx4ib_mod, SI_SUB_SMP, SI_ORDER_ANY); +DECLARE_MODULE(mlx4ib, mlx4ib_mod, SI_SUB_OFED_PREINIT, SI_ORDER_ANY); MODULE_DEPEND(mlx4ib, mlx4, 1, 1, 1); Modified: stable/9/sys/ofed/drivers/net/mlx4/en_main.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/en_main.c Tue Aug 12 12:10:29 2014 (r269862) +++ stable/9/sys/ofed/drivers/net/mlx4/en_main.c Tue Aug 12 12:18:43 2014 (r269863) @@ -379,5 +379,5 @@ static moduledata_t mlxen_mod = { .name = "mlxen", .evhand = mlxen_evhand, }; -DECLARE_MODULE(mlxen, mlxen_mod, SI_SUB_SMP, SI_ORDER_ANY); +DECLARE_MODULE(mlxen, mlxen_mod, SI_SUB_OFED_PREINIT, SI_ORDER_ANY); MODULE_DEPEND(mlxen, mlx4, 1, 1, 1); Modified: stable/9/sys/ofed/drivers/net/mlx4/main.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/main.c Tue Aug 12 12:10:29 2014 (r269862) +++ stable/9/sys/ofed/drivers/net/mlx4/main.c Tue Aug 12 12:18:43 2014 (r269863) @@ -1699,4 +1699,4 @@ static moduledata_t mlx4_mod = { .evhand = mlx4_evhand, }; MODULE_VERSION(mlx4, 1); -DECLARE_MODULE(mlx4, mlx4_mod, SI_SUB_SMP, SI_ORDER_ANY); +DECLARE_MODULE(mlx4, mlx4_mod, SI_SUB_OFED_PREINIT, SI_ORDER_ANY); Modified: stable/9/sys/ofed/include/linux/module.h ============================================================================== --- stable/9/sys/ofed/include/linux/module.h Tue Aug 12 12:10:29 2014 (r269862) +++ stable/9/sys/ofed/include/linux/module.h Tue Aug 12 12:18:43 2014 (r269863) @@ -44,6 +44,11 @@ #define EXPORT_SYMBOL(name) #define EXPORT_SYMBOL_GPL(name) +/* OFED pre-module initialization */ +#define SI_SUB_OFED_PREINIT (SI_SUB_KTHREAD_INIT - 2) +/* OFED default module initialization */ +#define SI_SUB_OFED_MODINIT (SI_SUB_KTHREAD_INIT - 1) + #include static inline void @@ -68,17 +73,17 @@ _module_run(void *arg) } #define module_init(fn) \ - SYSINIT(fn, SI_SUB_LAST, SI_ORDER_FIRST, _module_run, (fn)) + SYSINIT(fn, SI_SUB_OFED_MODINIT, SI_ORDER_FIRST, _module_run, (fn)) /* * XXX This is a freebsdism designed to work around not having a module * load order resolver built in. */ #define module_init_order(fn, order) \ - SYSINIT(fn, SI_SUB_LAST, (order), _module_run, (fn)) + SYSINIT(fn, SI_SUB_OFED_MODINIT, (order), _module_run, (fn)) #define module_exit(fn) \ - SYSUNINIT(fn, SI_SUB_LAST, SI_ORDER_FIRST, _module_run, (fn)) + SYSUNINIT(fn, SI_SUB_OFED_MODINIT, SI_ORDER_FIRST, _module_run, (fn)) #define module_get(module) #define module_put(module) From hselasky at FreeBSD.org Tue Aug 12 12:22:39 2014 From: hselasky at FreeBSD.org (Hans Petter Selasky) Date: Tue, 12 Aug 2014 12:22:39 +0000 (UTC) Subject: svn commit: r269864 - stable/10/sys/dev/usb/controller Message-ID: <53ea070f.622e.6d125182@svn.freebsd.org> Author: hselasky Date: Tue Aug 12 12:22:39 2014 New Revision: 269864 URL: http://svnweb.freebsd.org/changeset/base/269864 Log: MFC r257594: Add description of two EHCI PCI IDs. Modified: stable/10/sys/dev/usb/controller/ehci_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/ehci_pci.c ============================================================================== --- stable/10/sys/dev/usb/controller/ehci_pci.c Tue Aug 12 12:18:43 2014 (r269863) +++ stable/10/sys/dev/usb/controller/ehci_pci.c Tue Aug 12 12:22:39 2014 (r269864) @@ -154,6 +154,10 @@ ehci_pci_match(device_t self) return ("Intel PCH USB 2.0 controller USB-A"); case 0x3b3c8086: return ("Intel PCH USB 2.0 controller USB-B"); + case 0x8c268086: + return ("Intel Lynx Point USB 2.0 controller USB-A"); + case 0x8c2d8086: + return ("Intel Lynx Point USB 2.0 controller USB-B"); case 0x00e01033: return ("NEC uPD 720100 USB 2.0 controller"); From hselasky at FreeBSD.org Tue Aug 12 12:26:14 2014 From: hselasky at FreeBSD.org (Hans Petter Selasky) Date: Tue, 12 Aug 2014 12:26:13 +0000 (UTC) Subject: svn commit: r269866 - in stable/9/sys/dev: ahci ata ata/chipsets usb/controller Message-ID: <53ea07e5.6267.68439810@svn.freebsd.org> Author: hselasky Date: Tue Aug 12 12:26:12 2014 New Revision: 269866 URL: http://svnweb.freebsd.org/changeset/base/269866 Log: MFC r258162 and r257594: Add some more IDs for Intel ATA, AHCI and USB controllers. Modified: stable/9/sys/dev/ahci/ahci.c stable/9/sys/dev/ata/ata-pci.h stable/9/sys/dev/ata/chipsets/ata-intel.c stable/9/sys/dev/usb/controller/ehci_pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ahci/ahci.c ============================================================================== --- stable/9/sys/dev/ahci/ahci.c Tue Aug 12 12:25:56 2014 (r269865) +++ stable/9/sys/dev/ahci/ahci.c Tue Aug 12 12:26:12 2014 (r269866) @@ -197,21 +197,54 @@ static struct { {0x28268086, 0x00, "Intel Patsburg (RAID)", 0}, {0x1e028086, 0x00, "Intel Panther Point", 0}, {0x1e038086, 0x00, "Intel Panther Point", 0}, - {0x1e048086, 0x00, "Intel Panther Point", 0}, - {0x1e058086, 0x00, "Intel Panther Point", 0}, - {0x1e068086, 0x00, "Intel Panther Point", 0}, - {0x1e078086, 0x00, "Intel Panther Point", 0}, - {0x1e0e8086, 0x00, "Intel Panther Point", 0}, - {0x1e0f8086, 0x00, "Intel Panther Point", 0}, + {0x1e048086, 0x00, "Intel Panther Point (RAID)", 0}, + {0x1e058086, 0x00, "Intel Panther Point (RAID)", 0}, + {0x1e068086, 0x00, "Intel Panther Point (RAID)", 0}, + {0x1e078086, 0x00, "Intel Panther Point (RAID)", 0}, + {0x1e0e8086, 0x00, "Intel Panther Point (RAID)", 0}, + {0x1e0f8086, 0x00, "Intel Panther Point (RAID)", 0}, + {0x1f228086, 0x00, "Intel Avoton", 0}, + {0x1f238086, 0x00, "Intel Avoton", 0}, + {0x1f248086, 0x00, "Intel Avoton (RAID)", 0}, + {0x1f258086, 0x00, "Intel Avoton (RAID)", 0}, + {0x1f268086, 0x00, "Intel Avoton (RAID)", 0}, + {0x1f278086, 0x00, "Intel Avoton (RAID)", 0}, + {0x1f2e8086, 0x00, "Intel Avoton (RAID)", 0}, + {0x1f2f8086, 0x00, "Intel Avoton (RAID)", 0}, + {0x1f328086, 0x00, "Intel Avoton", 0}, + {0x1f338086, 0x00, "Intel Avoton", 0}, + {0x1f348086, 0x00, "Intel Avoton (RAID)", 0}, + {0x1f358086, 0x00, "Intel Avoton (RAID)", 0}, + {0x1f368086, 0x00, "Intel Avoton (RAID)", 0}, + {0x1f378086, 0x00, "Intel Avoton (RAID)", 0}, + {0x1f3e8086, 0x00, "Intel Avoton (RAID)", 0}, + {0x1f3f8086, 0x00, "Intel Avoton (RAID)", 0}, {0x23a38086, 0x00, "Intel Coleto Creek", 0}, + {0x28238086, 0x00, "Intel Wellsburg (RAID)", 0}, + {0x28278086, 0x00, "Intel Wellsburg (RAID)", 0}, {0x8c028086, 0x00, "Intel Lynx Point", 0}, {0x8c038086, 0x00, "Intel Lynx Point", 0}, - {0x8c048086, 0x00, "Intel Lynx Point", 0}, - {0x8c058086, 0x00, "Intel Lynx Point", 0}, - {0x8c068086, 0x00, "Intel Lynx Point", 0}, - {0x8c078086, 0x00, "Intel Lynx Point", 0}, - {0x8c0e8086, 0x00, "Intel Lynx Point", 0}, - {0x8c0f8086, 0x00, "Intel Lynx Point", 0}, + {0x8c048086, 0x00, "Intel Lynx Point (RAID)", 0}, + {0x8c058086, 0x00, "Intel Lynx Point (RAID)", 0}, + {0x8c068086, 0x00, "Intel Lynx Point (RAID)", 0}, + {0x8c078086, 0x00, "Intel Lynx Point (RAID)", 0}, + {0x8c0e8086, 0x00, "Intel Lynx Point (RAID)", 0}, + {0x8c0f8086, 0x00, "Intel Lynx Point (RAID)", 0}, + {0x8d028086, 0x00, "Intel Wellsburg", 0}, + {0x8d048086, 0x00, "Intel Wellsburg (RAID)", 0}, + {0x8d068086, 0x00, "Intel Wellsburg (RAID)", 0}, + {0x8d628086, 0x00, "Intel Wellsburg", 0}, + {0x8d648086, 0x00, "Intel Wellsburg (RAID)", 0}, + {0x8d668086, 0x00, "Intel Wellsburg (RAID)", 0}, + {0x8d6e8086, 0x00, "Intel Wellsburg (RAID)", 0}, + {0x9c028086, 0x00, "Intel Lynx Point-LP", 0}, + {0x9c038086, 0x00, "Intel Lynx Point-LP", 0}, + {0x9c048086, 0x00, "Intel Lynx Point-LP (RAID)", 0}, + {0x9c058086, 0x00, "Intel Lynx Point-LP (RAID)", 0}, + {0x9c068086, 0x00, "Intel Lynx Point-LP (RAID)", 0}, + {0x9c078086, 0x00, "Intel Lynx Point-LP (RAID)", 0}, + {0x9c0e8086, 0x00, "Intel Lynx Point-LP (RAID)", 0}, + {0x9c0f8086, 0x00, "Intel Lynx Point-LP (RAID)", 0}, {0x23238086, 0x00, "Intel DH89xxCC", 0}, {0x2360197b, 0x00, "JMicron JMB360", 0}, {0x2361197b, 0x00, "JMicron JMB361", AHCI_Q_NOFORCE}, Modified: stable/9/sys/dev/ata/ata-pci.h ============================================================================== --- stable/9/sys/dev/ata/ata-pci.h Tue Aug 12 12:25:56 2014 (r269865) +++ stable/9/sys/dev/ata/ata-pci.h Tue Aug 12 12:26:12 2014 (r269866) @@ -260,6 +260,11 @@ struct ata_pci_controller { #define ATA_PPT_R5 0x1e0e8086 #define ATA_PPT_R6 0x1e0f8086 +#define ATA_AVOTON_S1 0x1f208086 +#define ATA_AVOTON_S2 0x1f218086 +#define ATA_AVOTON_S3 0x1f308086 +#define ATA_AVOTON_S4 0x1f318086 + #define ATA_LPT_S1 0x8c008086 #define ATA_LPT_S2 0x8c018086 #define ATA_LPT_AH1 0x8c028086 @@ -273,6 +278,16 @@ struct ata_pci_controller { #define ATA_LPT_R5 0x8c0e8086 #define ATA_LPT_R6 0x8c0f8086 +#define ATA_WELLS_S1 0x8d008086 +#define ATA_WELLS_S2 0x8d088086 +#define ATA_WELLS_S3 0x8d608086 +#define ATA_WELLS_S4 0x8d688086 + +#define ATA_LPTLP_S1 0x9c008086 +#define ATA_LPTLP_S2 0x9c018086 +#define ATA_LPTLP_S3 0x9c088086 +#define ATA_LPTLP_S4 0x9c098086 + #define ATA_I31244 0x32008086 #define ATA_ISCH 0x811a8086 #define ATA_DH89XXCC 0x23238086 Modified: stable/9/sys/dev/ata/chipsets/ata-intel.c ============================================================================== --- stable/9/sys/dev/ata/chipsets/ata-intel.c Tue Aug 12 12:25:56 2014 (r269865) +++ stable/9/sys/dev/ata/chipsets/ata-intel.c Tue Aug 12 12:26:12 2014 (r269866) @@ -212,6 +212,10 @@ ata_intel_probe(device_t dev) { ATA_PPT_S4, 0, INTEL_6CH2, 0, ATA_SA300, "Panther Point" }, { ATA_PPT_R5, 0, INTEL_AHCI, 0, ATA_SA300, "Panther Point" }, { ATA_PPT_R6, 0, INTEL_AHCI, 0, ATA_SA300, "Panther Point" }, + { ATA_AVOTON_S1, 0, INTEL_6CH, 0, ATA_SA300, "Avoton" }, + { ATA_AVOTON_S2, 0, INTEL_6CH, 0, ATA_SA300, "Avoton" }, + { ATA_AVOTON_S3, 0, INTEL_6CH2, 0, ATA_SA300, "Avoton" }, + { ATA_AVOTON_S4, 0, INTEL_6CH2, 0, ATA_SA300, "Avoton" }, { ATA_LPT_S1, 0, INTEL_6CH, 0, ATA_SA300, "Lynx Point" }, { ATA_LPT_S2, 0, INTEL_6CH, 0, ATA_SA300, "Lynx Point" }, { ATA_LPT_AH1, 0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" }, @@ -224,6 +228,14 @@ ata_intel_probe(device_t dev) { ATA_LPT_S4, 0, INTEL_6CH2, 0, ATA_SA300, "Lynx Point" }, { ATA_LPT_R5, 0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" }, { ATA_LPT_R6, 0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" }, + { ATA_WELLS_S1, 0, INTEL_6CH, 0, ATA_SA300, "Wellsburg" }, + { ATA_WELLS_S2, 0, INTEL_6CH2, 0, ATA_SA300, "Wellsburg" }, + { ATA_WELLS_S3, 0, INTEL_6CH, 0, ATA_SA300, "Wellsburg" }, + { ATA_WELLS_S4, 0, INTEL_6CH2, 0, ATA_SA300, "Wellsburg" }, + { ATA_LPTLP_S1, 0, INTEL_6CH, 0, ATA_SA300, "Lynx Point-LP" }, + { ATA_LPTLP_S2, 0, INTEL_6CH, 0, ATA_SA300, "Lynx Point-LP" }, + { ATA_LPTLP_S3, 0, INTEL_6CH2, 0, ATA_SA300, "Lynx Point-LP" }, + { ATA_LPTLP_S4, 0, INTEL_6CH2, 0, ATA_SA300, "Lynx Point-LP" }, { ATA_I31244, 0, 0, 2, ATA_SA150, "31244" }, { ATA_ISCH, 0, 0, 1, ATA_UDMA5, "SCH" }, { ATA_DH89XXCC, 0, INTEL_AHCI, 0, ATA_SA300, "DH89xxCC" }, Modified: stable/9/sys/dev/usb/controller/ehci_pci.c ============================================================================== --- stable/9/sys/dev/usb/controller/ehci_pci.c Tue Aug 12 12:25:56 2014 (r269865) +++ stable/9/sys/dev/usb/controller/ehci_pci.c Tue Aug 12 12:26:12 2014 (r269866) @@ -124,6 +124,8 @@ ehci_pci_match(device_t self) return ("Intel Panther Point USB 2.0 controller"); case 0x1e2d8086: return ("Intel Panther Point USB 2.0 controller"); + case 0x1f2c8086: + return ("Intel Avoton USB 2.0 controller"); case 0x25ad8086: return "Intel 6300ESB USB 2.0 controller"; case 0x24cd8086: @@ -152,6 +154,10 @@ ehci_pci_match(device_t self) return ("Intel PCH USB 2.0 controller USB-A"); case 0x3b3c8086: return ("Intel PCH USB 2.0 controller USB-B"); + case 0x8c268086: + return ("Intel Lynx Point USB 2.0 controller USB-A"); + case 0x8c2d8086: + return ("Intel Lynx Point USB 2.0 controller USB-B"); case 0x00e01033: return ("NEC uPD 720100 USB 2.0 controller"); From emaste at FreeBSD.org Tue Aug 12 14:53:04 2014 From: emaste at FreeBSD.org (Ed Maste) Date: Tue, 12 Aug 2014 14:53:02 +0000 (UTC) Subject: svn commit: r269879 - in stable/10: . share/examples share/examples/libusb20 Message-ID: <53ea2a4f.65d0.7621b4e1@svn.freebsd.org> Author: emaste Date: Tue Aug 12 14:53:02 2014 New Revision: 269879 URL: http://svnweb.freebsd.org/changeset/base/269879 Log: MFC cleanup of libusb20 example r257779 by hselasky: - Use libusb20_strerror() function instead of custom usb_error() one. - Rename "aux.[ch]" to "util.[ch]" which is a more common name for utility functions and allows checkout on some non-FreeBSD systems where the "aux.*" namespace is reserved. - Fix some compile warnings while at it. r257796 by glebius: Finish r257779. PR: 183728 Added: stable/10/share/examples/libusb20/util.c - copied unchanged from r257779, head/share/examples/libusb20/util.c stable/10/share/examples/libusb20/util.h - copied unchanged from r257779, head/share/examples/libusb20/util.h Deleted: stable/10/share/examples/libusb20/aux.c stable/10/share/examples/libusb20/aux.h Modified: stable/10/ObsoleteFiles.inc stable/10/share/examples/Makefile stable/10/share/examples/libusb20/Makefile stable/10/share/examples/libusb20/bulk.c stable/10/share/examples/libusb20/control.c Directory Properties: stable/10/ (props changed) Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Tue Aug 12 14:37:33 2014 (r269878) +++ stable/10/ObsoleteFiles.inc Tue Aug 12 14:53:02 2014 (r269879) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20140812: example files removed +OLD_FILES+=usr/share/examples/libusb20/aux.c +OLD_FILES+=usr/share/examples/libusb20/aux.h # 20140728: Remove an obsolete man page OLD_FILES+=usr/share/man/man9/VOP_GETVOBJECT.9.gz OLD_FILES+=usr/share/man/man9/VOP_CREATEVOBJECT.9.gz Modified: stable/10/share/examples/Makefile ============================================================================== --- stable/10/share/examples/Makefile Tue Aug 12 14:37:33 2014 (r269878) +++ stable/10/share/examples/Makefile Tue Aug 12 14:53:02 2014 (r269879) @@ -107,8 +107,8 @@ XFILES= BSD_daemon/FreeBSD.pfa \ kld/syscall/test/call.c \ libusb20/Makefile \ libusb20/README \ - libusb20/aux.c \ - libusb20/aux.h \ + libusb20/util.c \ + libusb20/util.h \ libusb20/bulk.c \ libusb20/control.c \ libvgl/Makefile \ Modified: stable/10/share/examples/libusb20/Makefile ============================================================================== --- stable/10/share/examples/libusb20/Makefile Tue Aug 12 14:37:33 2014 (r269878) +++ stable/10/share/examples/libusb20/Makefile Tue Aug 12 14:53:02 2014 (r269879) @@ -1,13 +1,14 @@ # $FreeBSD$ TARGETS= bulk control +CFLAGS+= -Wall all: $(TARGETS) -bulk: bulk.o aux.o - $(CC) $(CFLAGS) -o bulk bulk.o aux.o -lusb +bulk: bulk.o util.o + $(CC) $(CFLAGS) -o bulk bulk.o util.o -lusb -control: control.o aux.o - $(CC) $(CFLAGS) -o control control.o aux.o -lusb +control: control.o util.o + $(CC) $(CFLAGS) -o control control.o util.o -lusb clean: rm -f $(TARGETS) *.o *~ Modified: stable/10/share/examples/libusb20/bulk.c ============================================================================== --- stable/10/share/examples/libusb20/bulk.c Tue Aug 12 14:37:33 2014 (r269878) +++ stable/10/share/examples/libusb20/bulk.c Tue Aug 12 14:53:02 2014 (r269879) @@ -41,7 +41,7 @@ #include #include -#include "aux.h" +#include "util.h" /* * If you want to see the details of the internal datastructures @@ -74,7 +74,7 @@ doit(struct libusb20_device *dev) */ if ((rv = libusb20_dev_open(dev, 2)) != 0) { - fprintf(stderr, "libusb20_dev_open: %s\n", usb_error(rv)); + fprintf(stderr, "libusb20_dev_open: %s\n", libusb20_strerror(rv)); return; } @@ -84,7 +84,7 @@ doit(struct libusb20_device *dev) */ if ((rv = libusb20_dev_set_config_index(dev, 0)) != 0) { - fprintf(stderr, "libusb20_dev_set_config_index: %s\n", usb_error(rv)); + fprintf(stderr, "libusb20_dev_set_config_index: %s\n", libusb20_strerror(rv)); return; } @@ -97,7 +97,7 @@ doit(struct libusb20_device *dev) if (xfr_in == NULL || xfr_out == NULL) { - fprintf(stderr, "libusb20_tr_get_pointer: %s\n", usb_error(rv)); + fprintf(stderr, "libusb20_tr_get_pointer: %s\n", libusb20_strerror(rv)); return; } @@ -107,12 +107,12 @@ doit(struct libusb20_device *dev) */ if ((rv = libusb20_tr_open(xfr_out, 0, 1, out_ep)) != 0) { - fprintf(stderr, "libusb20_tr_open: %s\n", usb_error(rv)); + fprintf(stderr, "libusb20_tr_open: %s\n", libusb20_strerror(rv)); return; } if ((rv = libusb20_tr_open(xfr_in, 0, 1, in_ep)) != 0) { - fprintf(stderr, "libusb20_tr_open: %s\n", usb_error(rv)); + fprintf(stderr, "libusb20_tr_open: %s\n", libusb20_strerror(rv)); return; } @@ -124,7 +124,7 @@ doit(struct libusb20_device *dev) if ((rv = libusb20_tr_bulk_intr_sync(xfr_out, out_buf, out_len, &rlen, TIMEOUT)) != 0) { - fprintf(stderr, "libusb20_tr_bulk_intr_sync (OUT): %s\n", usb_error(rv)); + fprintf(stderr, "libusb20_tr_bulk_intr_sync (OUT): %s\n", libusb20_strerror(rv)); } printf("sent %d bytes\n", rlen); } @@ -132,7 +132,7 @@ doit(struct libusb20_device *dev) if ((rv = libusb20_tr_bulk_intr_sync(xfr_in, in_buf, BUFLEN, &rlen, TIMEOUT)) != 0) { - fprintf(stderr, "libusb20_tr_bulk_intr_sync: %s\n", usb_error(rv)); + fprintf(stderr, "libusb20_tr_bulk_intr_sync: %s\n", libusb20_strerror(rv)); } printf("received %d bytes\n", rlen); if (rlen > 0) Modified: stable/10/share/examples/libusb20/control.c ============================================================================== --- stable/10/share/examples/libusb20/control.c Tue Aug 12 14:37:33 2014 (r269878) +++ stable/10/share/examples/libusb20/control.c Tue Aug 12 14:53:02 2014 (r269879) @@ -11,8 +11,6 @@ /* * Simple demo program to illustrate the handling of FreeBSD's * libusb20. - * - * XXX */ /* @@ -38,12 +36,15 @@ #include #include #include +#include #include #include #include +#include "util.h" + /* * If you want to see the details of the internal datastructures * in the debugger, unifdef the following. @@ -86,7 +87,7 @@ doit(struct libusb20_device *dev) */ if ((rv = libusb20_dev_open(dev, 1)) != 0) { - fprintf(stderr, "libusb20_dev_open: %s\n", usb_error(rv)); + fprintf(stderr, "libusb20_dev_open: %s\n", libusb20_strerror(rv)); return; } @@ -96,7 +97,7 @@ doit(struct libusb20_device *dev) */ if ((rv = libusb20_dev_set_config_index(dev, 0)) != 0) { - fprintf(stderr, "libusb20_dev_set_config_index: %s\n", usb_error(rv)); + fprintf(stderr, "libusb20_dev_set_config_index: %s\n", libusb20_strerror(rv)); return; } @@ -126,7 +127,7 @@ doit(struct libusb20_device *dev) 0 /* flags */)) != 0) { fprintf(stderr, - "libusb20_dev_request_sync: %s\n", usb_error(rv)); + "libusb20_dev_request_sync: %s\n", libusb20_strerror(rv)); } printf("sent %d bytes\n", actlen); if ((setup.bmRequestType & 0x80) != 0) @@ -146,7 +147,7 @@ doit(struct libusb20_device *dev) if (xfr_intr == NULL) { - fprintf(stderr, "libusb20_tr_get_pointer: %s\n", usb_error(rv)); + fprintf(stderr, "libusb20_tr_get_pointer: %s\n", libusb20_strerror(rv)); return; } @@ -155,7 +156,7 @@ doit(struct libusb20_device *dev) */ if ((rv = libusb20_tr_open(xfr_intr, 0, 1, intr_ep)) != 0) { - fprintf(stderr, "libusb20_tr_open: %s\n", usb_error(rv)); + fprintf(stderr, "libusb20_tr_open: %s\n", libusb20_strerror(rv)); return; } @@ -165,7 +166,7 @@ doit(struct libusb20_device *dev) if ((rv = libusb20_tr_bulk_intr_sync(xfr_intr, in_buf, BUFLEN, &rlen, TIMEOUT)) != 0) { - fprintf(stderr, "libusb20_tr_bulk_intr_sync: %s\n", usb_error(rv)); + fprintf(stderr, "libusb20_tr_bulk_intr_sync: %s\n", libusb20_strerror(rv)); } printf("received %d bytes\n", rlen); if (rlen > 0) Copied: stable/10/share/examples/libusb20/util.c (from r257779, head/share/examples/libusb20/util.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/examples/libusb20/util.c Tue Aug 12 14:53:02 2014 (r269879, copy of r257779, head/share/examples/libusb20/util.c) @@ -0,0 +1,50 @@ +/* ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42) (by Poul-Henning Kamp): + * wrote this file. As long as you retain this notice you + * can do whatever you want with this stuff. If we meet some day, and you think + * this stuff is worth it, you can buy me a beer in return. Joerg Wunsch + * ---------------------------------------------------------------------------- + * + * $FreeBSD$ + */ + +/* + * Helper functions common to all examples + */ + +#include +#include +#include + +#include +#include + +#include "util.h" + +/* + * Print "len" bytes from "buf" in hex, followed by an ASCII + * representation (somewhat resembling the output of hd(1)). + */ +void +print_formatted(uint8_t *buf, uint32_t len) +{ + int i, j; + + for (j = 0; j < len; j += 16) + { + printf("%02x: ", j); + + for (i = 0; i < 16 && i + j < len; i++) + printf("%02x ", buf[i + j]); + printf(" "); + for (i = 0; i < 16 && i + j < len; i++) + { + uint8_t c = buf[i + j]; + if(c >= ' ' && c <= '~') + printf("%c", (char)c); + else + putchar('.'); + } + putchar('\n'); + } +} Copied: stable/10/share/examples/libusb20/util.h (from r257779, head/share/examples/libusb20/util.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/examples/libusb20/util.h Tue Aug 12 14:53:02 2014 (r269879, copy of r257779, head/share/examples/libusb20/util.h) @@ -0,0 +1,14 @@ +/* ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42) (by Poul-Henning Kamp): + * wrote this file. As long as you retain this notice you + * can do whatever you want with this stuff. If we meet some day, and you think + * this stuff is worth it, you can buy me a beer in return. Joerg Wunsch + * ---------------------------------------------------------------------------- + * + * $FreeBSD$ + */ + +#include +#include + +void print_formatted(uint8_t *buf, uint32_t len); From dim at FreeBSD.org Tue Aug 12 18:05:26 2014 From: dim at FreeBSD.org (Dimitry Andric) Date: Tue, 12 Aug 2014 17:56:48 +0000 (UTC) Subject: svn commit: r269885 - stable/10/lib/libproc Message-ID: <53ea5560.6840.ea7a307@svn.freebsd.org> Author: dim Date: Tue Aug 12 17:56:48 2014 New Revision: 269885 URL: http://svnweb.freebsd.org/changeset/base/269885 Log: MFC r269750: In r268463, I misplaced a return in demangle(), causing the function to erroneously skip symbols that were not mangled at all. Fix this by moving the return into the preceding if block. While here, simplify the code by letting __cxa_demangle() allocate the needed space for the demangled symbol. This also fixes a memory leak, which would occur whenever __cxa_demangle() failed. Reported by: pgj PR: base/191981 Modified: stable/10/lib/libproc/proc_sym.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libproc/proc_sym.c ============================================================================== --- stable/10/lib/libproc/proc_sym.c Tue Aug 12 17:51:26 2014 (r269884) +++ stable/10/lib/libproc/proc_sym.c Tue Aug 12 17:56:48 2014 (r269885) @@ -57,21 +57,15 @@ demangle(const char *symbol, char *buf, { #ifndef NO_CXA_DEMANGLE char *dembuf; - size_t demlen; if (symbol[0] == '_' && symbol[1] == 'Z' && symbol[2]) { - dembuf = malloc(len); - if (!dembuf) - goto fail; - demlen = len; - dembuf = __cxa_demangle(symbol, dembuf, &demlen, NULL); + dembuf = __cxa_demangle(symbol, NULL, NULL, NULL); if (!dembuf) goto fail; strlcpy(buf, dembuf, len); free(dembuf); + return; } - - return; fail: #endif /* NO_CXA_DEMANGLE */ strlcpy(buf, symbol, len); From jhb at freebsd.org Tue Aug 12 19:37:10 2014 From: jhb at freebsd.org (John Baldwin) Date: Tue, 12 Aug 2014 11:19:31 -0400 Subject: svn commit: r269847 - in stable/10: contrib/apr contrib/apr/docs contrib/apr/encoding contrib/apr/file_io/unix contrib/apr/include contrib/apr/include/arch/unix contrib/apr/include/private contrib/... In-Reply-To: <53e9707c.2d6c.2d976b@svn.freebsd.org> References: <53e9707c.2d6c.2d976b@svn.freebsd.org> Message-ID: <201408121119.32037.jhb@freebsd.org> On Monday, August 11, 2014 9:40:12 pm Peter Wemm wrote: > Author: peter > Date: Tue Aug 12 01:40:11 2014 > New Revision: 269847 > URL: http://svnweb.freebsd.org/changeset/base/269847 > > Log: > MFC r266728,266731,266735,266736,268135,268960,269833 > Update apr 1.4.8 -> 1.5.1 > Update apr-util 1.5.2 -> 1.5.3 > Update serf 1.3.4 -> 1.3.7 > Update svnlite 1.8.8 -> 1.8.10 > Deal with svnlite.1 manpage. Isn't this merge a little quick? 1.8.10 only went into head about 6 hours before this commit. The 1.8.8 merge to 10 was also rather quick (less than an hour after it was merged to HEAD). If the security issues noted in the commit for HEAD are severe enough to warrant an immediate merge, then there should probably be an advisory. Otherwise, I think svn updates should probably have some bake time in HEAD before going to stable. (As an aside, I didn't get a commit mail for 269833 for some reason) -- John Baldwin From jilles at FreeBSD.org Tue Aug 12 19:57:12 2014 From: jilles at FreeBSD.org (Jilles Tjoelker) Date: Tue, 12 Aug 2014 19:57:12 +0000 (UTC) Subject: svn commit: r269890 - stable/9/lib/libc/stdlib Message-ID: <53ea7198.6760.21dd1ae1@svn.freebsd.org> Author: jilles Date: Tue Aug 12 19:57:12 2014 New Revision: 269890 URL: http://svnweb.freebsd.org/changeset/base/269890 Log: MFC r264417: realpath(): Properly fail "." or ".." components after non-directories. If realpath() is called on pathnames like "/dev/null/." or "/dev/null/..", it should fail with [ENOTDIR]. Pathnames like "/dev/null/" already failed as they should. Also, put the check for non-directories after lstatting the previous component instead of when the empty component (consecutive or trailing slashes) is detected, saving an lstat() call and some lines of code. PR: kern/82980 Modified: stable/9/lib/libc/stdlib/realpath.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/stdlib/realpath.c ============================================================================== --- stable/9/lib/libc/stdlib/realpath.c Tue Aug 12 19:56:26 2014 (r269889) +++ stable/9/lib/libc/stdlib/realpath.c Tue Aug 12 19:57:12 2014 (r269890) @@ -132,26 +132,7 @@ realpath(const char * __restrict path, c resolved[resolved_len] = '\0'; } if (next_token[0] == '\0') { - /* - * Handle consequential slashes. The path - * before slash shall point to a directory. - * - * Only the trailing slashes are not covered - * by other checks in the loop, but we verify - * the prefix for any (rare) "//" or "/\0" - * occurence to not implement lookahead. - */ - if (lstat(resolved, &sb) != 0) { - if (m) - free(resolved); - return (NULL); - } - if (!S_ISDIR(sb.st_mode)) { - if (m) - free(resolved); - errno = ENOTDIR; - return (NULL); - } + /* Handle consequential slashes. */ continue; } else if (strcmp(next_token, ".") == 0) @@ -236,6 +217,11 @@ realpath(const char * __restrict path, c } } left_len = strlcpy(left, symlink, sizeof(left)); + } else if (!S_ISDIR(sb.st_mode) && p != NULL) { + if (m) + free(resolved); + errno = ENOTDIR; + return (NULL); } } From peter at wemm.org Tue Aug 12 20:23:23 2014 From: peter at wemm.org (Peter Wemm) Date: Tue, 12 Aug 2014 13:23:16 -0700 Subject: svn commit: r269847 - in stable/10: contrib/apr contrib/apr/docs contrib/apr/encoding contrib/apr/file_io/unix contrib/apr/include contrib/apr/include/arch/unix contrib/apr/include/private contrib/... In-Reply-To: <201408121119.32037.jhb@freebsd.org> References: <53e9707c.2d6c.2d976b@svn.freebsd.org> <201408121119.32037.jhb@freebsd.org> Message-ID: <5874043.odmAkWF3cI@overcee.wemm.org> On Tuesday 12 August 2014 11:19:31 John Baldwin wrote: > On Monday, August 11, 2014 9:40:12 pm Peter Wemm wrote: > > Author: peter > > Date: Tue Aug 12 01:40:11 2014 > > New Revision: 269847 > > URL: http://svnweb.freebsd.org/changeset/base/269847 > > > > Log: > > MFC r266728,266731,266735,266736,268135,268960,269833 > > > > Update apr 1.4.8 -> 1.5.1 > > Update apr-util 1.5.2 -> 1.5.3 > > Update serf 1.3.4 -> 1.3.7 > > Update svnlite 1.8.8 -> 1.8.10 > > Deal with svnlite.1 manpage. > > Isn't this merge a little quick? 1.8.10 only went into head about 6 hours > before this commit. The 1.8.8 merge to 10 was also rather quick (less than > an hour after it was merged to HEAD). If the security issues noted in the > commit for HEAD are severe enough to warrant an immediate merge, then there > should probably be an advisory. Otherwise, I think svn updates should > probably have some bake time in HEAD before going to stable. The jumbo-MFC was mostly to gather up the updates that have been baking in head for a while. 10.1 is coming up soon. It just seemed silly to MFC everything except a specific, targeted security fix. I suspect that for every question I got about including the security update, I'd have received 5 times as many asking why I hadn't included it. -- Peter Wemm - peter at wemm.org; peter at FreeBSD.org; peter at yahoo-inc.com; KI6FJV UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: This is a digitally signed message part. URL: From marcel at FreeBSD.org Wed Aug 13 01:43:39 2014 From: marcel at FreeBSD.org (Marcel Moolenaar) Date: Wed, 13 Aug 2014 01:43:38 +0000 (UTC) Subject: svn commit: r269900 - stable/10/usr.bin/mkimg Message-ID: <201408130143.s7D1hcPx099869@svn.freebsd.org> Author: marcel Date: Wed Aug 13 01:43:38 2014 New Revision: 269900 URL: http://svnweb.freebsd.org/changeset/base/269900 Log: MFC 269745: Create a redundant grain directory and table. Modified: stable/10/usr.bin/mkimg/vmdk.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/mkimg/vmdk.c ============================================================================== --- stable/10/usr.bin/mkimg/vmdk.c Wed Aug 13 01:27:51 2014 (r269899) +++ stable/10/usr.bin/mkimg/vmdk.c Wed Aug 13 01:43:38 2014 (r269900) @@ -110,7 +110,7 @@ static int vmdk_write(int fd) { struct vmdk_header hdr; - uint32_t *gt, *gd; + uint32_t *gt, *gd, *rgd; char *buf, *desc; off_t cur, lim; uint64_t imagesz; @@ -143,25 +143,37 @@ vmdk_write(int fd) le32enc(&hdr.ngtes, VMDK_NGTES); sec = desc_len / VMDK_SECTOR_SIZE + 1; - le64enc(&hdr.rgd_offset, sec); - le64enc(&hdr.gd_offset, sec); ngrains = imagesz / grainsz; ngts = (ngrains + VMDK_NGTES - 1) / VMDK_NGTES; gdsz = (ngts * sizeof(uint32_t) + VMDK_SECTOR_SIZE - 1) & ~(VMDK_SECTOR_SIZE - 1); + gd = calloc(gdsz, 1); if (gd == NULL) { free(desc); return (ENOMEM); } - + le64enc(&hdr.gd_offset, sec); sec += gdsz / VMDK_SECTOR_SIZE; for (n = 0; n < ngts; n++) { le32enc(gd + n, sec); sec += VMDK_NGTES * sizeof(uint32_t) / VMDK_SECTOR_SIZE; } + rgd = calloc(gdsz, 1); + if (rgd == NULL) { + free(gd); + free(desc); + return (ENOMEM); + } + le64enc(&hdr.rgd_offset, sec); + sec += gdsz / VMDK_SECTOR_SIZE; + for (n = 0; n < ngts; n++) { + le32enc(rgd + n, sec); + sec += VMDK_NGTES * sizeof(uint32_t) / VMDK_SECTOR_SIZE; + } + sec = (sec + grainsz - 1) & ~(grainsz - 1); if (verbose) @@ -174,6 +186,7 @@ vmdk_write(int fd) gtsz = ngts * VMDK_NGTES * sizeof(uint32_t); gt = calloc(gtsz, 1); if (gt == NULL) { + free(rgd); free(gd); free(desc); return (ENOMEM); @@ -198,13 +211,18 @@ vmdk_write(int fd) error = errno; if (!error && sparse_write(fd, gt, gtsz) < 0) error = errno; + if (!error && sparse_write(fd, rgd, gdsz) < 0) + error = errno; + if (!error && sparse_write(fd, gt, gtsz) < 0) + error = errno; free(gt); + free(rgd); free(gd); free(desc); if (error) return (error); - cur = VMDK_SECTOR_SIZE + desc_len + gdsz + gtsz; + cur = VMDK_SECTOR_SIZE + desc_len + (gdsz + gtsz) * 2; lim = sec * VMDK_SECTOR_SIZE; if (cur < lim) { buf = calloc(VMDK_SECTOR_SIZE, 1); From rpaulo at FreeBSD.org Wed Aug 13 06:41:07 2014 From: rpaulo at FreeBSD.org (Rui Paulo) Date: Wed, 13 Aug 2014 06:41:06 +0000 (UTC) Subject: svn commit: r269912 - stable/10/cddl/contrib/opensolaris/lib/libdtrace/common Message-ID: <201408130641.s7D6f6gL033631@svn.freebsd.org> Author: rpaulo Date: Wed Aug 13 06:41:06 2014 New Revision: 269912 URL: http://svnweb.freebsd.org/changeset/base/269912 Log: MFC r269776 Remove the BROKEN_LIBELF section. Modified: stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Wed Aug 13 06:39:44 2014 (r269911) +++ stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Wed Aug 13 06:41:06 2014 (r269912) @@ -1915,7 +1915,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. @@ -1939,9 +1938,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); @@ -1953,54 +1949,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 rpaulo at FreeBSD.org Wed Aug 13 06:45:02 2014 From: rpaulo at FreeBSD.org (Rui Paulo) Date: Wed, 13 Aug 2014 06:45:02 +0000 (UTC) Subject: svn commit: r269913 - stable/10 Message-ID: <201408130645.s7D6j2tD036892@svn.freebsd.org> Author: rpaulo Date: Wed Aug 13 06:45:02 2014 New Revision: 269913 URL: http://svnweb.freebsd.org/changeset/base/269913 Log: MFC r269744 Run dtrace in 32-bit mode when compiling 32-bit libraries. Modified: stable/10/Makefile.inc1 Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Wed Aug 13 06:41:06 2014 (r269912) +++ stable/10/Makefile.inc1 Wed Aug 13 06:45:02 2014 (r269913) @@ -391,7 +391,8 @@ LIB32WMAKEENV+= MAKEOBJDIRPREFIX=${OBJTR LIBDIR=/usr/lib32 \ SHLIBDIR=/usr/lib32 \ LIBPRIVATEDIR=/usr/lib32/private \ - COMPILER_TYPE=${WMAKE_COMPILER_TYPE} + COMPILER_TYPE=${WMAKE_COMPILER_TYPE} \ + DTRACE="${DTRACE} -32" LIB32WMAKEFLAGS+= \ CC="${XCC} ${LIB32FLAGS}" \ CXX="${XCXX} ${LIB32FLAGS}" \ From kib at FreeBSD.org Wed Aug 13 06:55:31 2014 From: kib at FreeBSD.org (Konstantin Belousov) Date: Wed, 13 Aug 2014 06:55:30 +0000 (UTC) Subject: svn commit: r269914 - stable/10/sys/vm Message-ID: <201408130655.s7D6tUIs041650@svn.freebsd.org> Author: kib Date: Wed Aug 13 06:55:30 2014 New Revision: 269914 URL: http://svnweb.freebsd.org/changeset/base/269914 Log: MFC r269642: Add wrappers to assert that vm object is unlocked and for try upgrade. Modified: stable/10/sys/vm/vm_object.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_object.h ============================================================================== --- stable/10/sys/vm/vm_object.h Wed Aug 13 06:45:02 2014 (r269913) +++ stable/10/sys/vm/vm_object.h Wed Aug 13 06:55:30 2014 (r269914) @@ -225,6 +225,8 @@ extern struct vm_object kmem_object_stor rw_assert(&(object)->lock, RA_RLOCKED) #define VM_OBJECT_ASSERT_WLOCKED(object) \ rw_assert(&(object)->lock, RA_WLOCKED) +#define VM_OBJECT_ASSERT_UNLOCKED(object) \ + rw_assert(&(object)->lock, RA_UNLOCKED) #define VM_OBJECT_LOCK_DOWNGRADE(object) \ rw_downgrade(&(object)->lock) #define VM_OBJECT_RLOCK(object) \ @@ -237,6 +239,8 @@ extern struct vm_object kmem_object_stor rw_try_rlock(&(object)->lock) #define VM_OBJECT_TRYWLOCK(object) \ rw_try_wlock(&(object)->lock) +#define VM_OBJECT_TRYUPGRADE(object) \ + rw_try_upgrade(&(object)->lock) #define VM_OBJECT_WLOCK(object) \ rw_wlock(&(object)->lock) #define VM_OBJECT_WUNLOCK(object) \ From kib at FreeBSD.org Wed Aug 13 06:58:43 2014 From: kib at FreeBSD.org (Konstantin Belousov) Date: Wed, 13 Aug 2014 06:58:43 +0000 (UTC) Subject: svn commit: r269915 - stable/10/sys/vm Message-ID: <201408130658.s7D6whIc042150@svn.freebsd.org> Author: kib Date: Wed Aug 13 06:58:42 2014 New Revision: 269915 URL: http://svnweb.freebsd.org/changeset/base/269915 Log: MFC r269643: Weaken the requirement for the vm object lock by only asserting locked object in vm_pager_page_unswapped(), instead of locked exclusively. Modified: stable/10/sys/vm/vm_pager.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_pager.h ============================================================================== --- stable/10/sys/vm/vm_pager.h Wed Aug 13 06:55:30 2014 (r269914) +++ stable/10/sys/vm/vm_pager.h Wed Aug 13 06:58:42 2014 (r269915) @@ -187,7 +187,7 @@ static __inline void vm_pager_page_unswapped(vm_page_t m) { - VM_OBJECT_ASSERT_WLOCKED(m->object); + VM_OBJECT_ASSERT_LOCKED(m->object); if (pagertab[m->object->type]->pgo_pageunswapped) (*pagertab[m->object->type]->pgo_pageunswapped)(m); } From hselasky at FreeBSD.org Wed Aug 13 06:59:42 2014 From: hselasky at FreeBSD.org (Hans Petter Selasky) Date: Wed, 13 Aug 2014 06:59:41 +0000 (UTC) Subject: svn commit: r269916 - stable/10/sys/dev/usb/controller Message-ID: <201408130659.s7D6xfTM042333@svn.freebsd.org> Author: hselasky Date: Wed Aug 13 06:59:40 2014 New Revision: 269916 URL: http://svnweb.freebsd.org/changeset/base/269916 Log: MFC r269604: - Implement fast interrupt handler to save CPU usage. - Cleanup some register reads and writes to use existing register access macros. - Ensure code which only applies to the control endpoint is not run for other endpoints in the data transfer path. Modified: stable/10/sys/dev/usb/controller/at91dci.c stable/10/sys/dev/usb/controller/at91dci.h stable/10/sys/dev/usb/controller/at91dci_atmelarm.c stable/10/sys/dev/usb/controller/at91dci_fdt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/at91dci.c ============================================================================== --- stable/10/sys/dev/usb/controller/at91dci.c Wed Aug 13 06:58:42 2014 (r269915) +++ stable/10/sys/dev/usb/controller/at91dci.c Wed Aug 13 06:59:40 2014 (r269916) @@ -91,6 +91,9 @@ #define AT9100_DCI_PC2SC(pc) \ AT9100_DCI_BUS2SC(USB_DMATAG_TO_XROOT((pc)->tag_parent)->bus) +#define AT9100_DCI_THREAD_IRQ \ + (AT91_UDP_INT_BUS | AT91_UDP_INT_END_BR | AT91_UDP_INT_RXRSM | AT91_UDP_INT_RXSUSP) + #ifdef USB_DEBUG static int at91dcidebug = 0; @@ -296,17 +299,15 @@ at91dci_set_address(struct at91dci_softc } static uint8_t -at91dci_setup_rx(struct at91dci_td *td) +at91dci_setup_rx(struct at91dci_softc *sc, struct at91dci_td *td) { - struct at91dci_softc *sc; struct usb_device_request req; uint32_t csr; uint32_t temp; uint16_t count; /* read out FIFO status */ - csr = bus_space_read_4(td->io_tag, td->io_hdl, - td->status_reg); + csr = AT91_UDP_READ_4(sc, td->status_reg); DPRINTFN(5, "csr=0x%08x rem=%u\n", csr, td->remainder); @@ -338,7 +339,7 @@ at91dci_setup_rx(struct at91dci_td *td) goto not_complete; } /* receive data */ - bus_space_read_multi_1(td->io_tag, td->io_hdl, + bus_space_read_multi_1(sc->sc_io_tag, sc->sc_io_hdl, td->fifo_reg, (void *)&req, sizeof(req)); /* copy data into real buffer */ @@ -347,9 +348,6 @@ at91dci_setup_rx(struct at91dci_td *td) td->offset = sizeof(req); td->remainder = 0; - /* get pointer to softc */ - sc = AT9100_DCI_PC2SC(td->pc); - /* sneak peek the set address */ if ((req.bmRequestType == UT_WRITE_DEVICE) && (req.bRequest == UR_SET_ADDRESS)) { @@ -367,8 +365,7 @@ at91dci_setup_rx(struct at91dci_td *td) /* write the direction of the control transfer */ AT91_CSR_ACK(csr, temp); - bus_space_write_4(td->io_tag, td->io_hdl, - td->status_reg, csr); + AT91_UDP_WRITE_4(sc, td->status_reg, csr); return (0); /* complete */ not_complete: @@ -383,15 +380,13 @@ not_complete: if (temp) { DPRINTFN(5, "clearing 0x%08x\n", temp); AT91_CSR_ACK(csr, temp); - bus_space_write_4(td->io_tag, td->io_hdl, - td->status_reg, csr); + AT91_UDP_WRITE_4(sc, td->status_reg, csr); } return (1); /* not complete */ - } static uint8_t -at91dci_data_rx(struct at91dci_td *td) +at91dci_data_rx(struct at91dci_softc *sc, struct at91dci_td *td) { struct usb_page_search buf_res; uint32_t csr; @@ -406,8 +401,7 @@ at91dci_data_rx(struct at91dci_td *td) /* check if any of the FIFO banks have data */ repeat: /* read out FIFO status */ - csr = bus_space_read_4(td->io_tag, td->io_hdl, - td->status_reg); + csr = AT91_UDP_READ_4(sc, td->status_reg); DPRINTFN(5, "csr=0x%08x rem=%u\n", csr, td->remainder); @@ -436,8 +430,7 @@ repeat: if (temp) { /* write command */ AT91_CSR_ACK(csr, temp); - bus_space_write_4(td->io_tag, td->io_hdl, - td->status_reg, csr); + AT91_UDP_WRITE_4(sc, td->status_reg, csr); } return (1); /* not complete */ } @@ -470,7 +463,7 @@ repeat: buf_res.length = count; } /* receive data */ - bus_space_read_multi_1(td->io_tag, td->io_hdl, + bus_space_read_multi_1(sc->sc_io_tag, sc->sc_io_hdl, td->fifo_reg, buf_res.buffer, buf_res.length); /* update counters */ @@ -495,8 +488,7 @@ repeat: /* write command */ AT91_CSR_ACK(csr, temp); - bus_space_write_4(td->io_tag, td->io_hdl, - td->status_reg, csr); + AT91_UDP_WRITE_4(sc, td->status_reg, csr); /* * NOTE: We may have to delay a little bit before @@ -518,7 +510,7 @@ repeat: } static uint8_t -at91dci_data_tx(struct at91dci_td *td) +at91dci_data_tx(struct at91dci_softc *sc, struct at91dci_td *td) { struct usb_page_search buf_res; uint32_t csr; @@ -531,8 +523,7 @@ at91dci_data_tx(struct at91dci_td *td) repeat: /* read out FIFO status */ - csr = bus_space_read_4(td->io_tag, td->io_hdl, - td->status_reg); + csr = AT91_UDP_READ_4(sc, td->status_reg); DPRINTFN(5, "csr=0x%08x rem=%u\n", csr, td->remainder); @@ -552,8 +543,7 @@ repeat: if (temp) { /* write command */ AT91_CSR_ACK(csr, temp); - bus_space_write_4(td->io_tag, td->io_hdl, - td->status_reg, csr); + AT91_UDP_WRITE_4(sc, td->status_reg, csr); } return (1); /* not complete */ } else { @@ -569,7 +559,6 @@ repeat: count = td->remainder; } while (count > 0) { - usbd_get_page(td->pc, td->offset, &buf_res); /* get correct length */ @@ -577,7 +566,7 @@ repeat: buf_res.length = count; } /* transmit data */ - bus_space_write_multi_1(td->io_tag, td->io_hdl, + bus_space_write_multi_1(sc->sc_io_tag, sc->sc_io_hdl, td->fifo_reg, buf_res.buffer, buf_res.length); /* update counters */ @@ -588,8 +577,7 @@ repeat: /* write command */ AT91_CSR_ACK(csr, temp); - bus_space_write_4(td->io_tag, td->io_hdl, - td->status_reg, csr); + AT91_UDP_WRITE_4(sc, td->status_reg, csr); /* check remainder */ if (td->remainder == 0) { @@ -605,19 +593,13 @@ repeat: } static uint8_t -at91dci_data_tx_sync(struct at91dci_td *td) +at91dci_data_tx_sync(struct at91dci_softc *sc, struct at91dci_td *td) { - struct at91dci_softc *sc; uint32_t csr; uint32_t temp; -#if 0 -repeat: -#endif - /* read out FIFO status */ - csr = bus_space_read_4(td->io_tag, td->io_hdl, - td->status_reg); + csr = AT91_UDP_READ_4(sc, td->status_reg); DPRINTFN(5, "csr=0x%08x\n", csr); @@ -637,8 +619,7 @@ repeat: if (!(csr & AT91_UDP_CSR_TXCOMP)) { goto not_complete; } - sc = AT9100_DCI_PC2SC(td->pc); - if (sc->sc_dv_addr != 0xFF) { + if (td->status_reg == AT91_UDP_CSR(0) && sc->sc_dv_addr != 0xFF) { /* * The AT91 has a special requirement with regard to * setting the address and that is to write the new @@ -648,8 +629,7 @@ repeat: } /* write command */ AT91_CSR_ACK(csr, temp); - bus_space_write_4(td->io_tag, td->io_hdl, - td->status_reg, csr); + AT91_UDP_WRITE_4(sc, td->status_reg, csr); return (0); /* complete */ @@ -657,24 +637,26 @@ not_complete: if (temp) { /* write command */ AT91_CSR_ACK(csr, temp); - bus_space_write_4(td->io_tag, td->io_hdl, - td->status_reg, csr); + AT91_UDP_WRITE_4(sc, td->status_reg, csr); } return (1); /* not complete */ } -static uint8_t +static void at91dci_xfer_do_fifo(struct usb_xfer *xfer) { - struct at91dci_softc *sc; + struct at91dci_softc *sc = AT9100_DCI_BUS2SC(xfer->xroot->bus); struct at91dci_td *td; uint8_t temp; DPRINTFN(9, "\n"); td = xfer->td_transfer_cache; + if (td == NULL) + return; + while (1) { - if ((td->func) (td)) { + if ((td->func) (sc, td)) { /* operation in progress */ break; } @@ -704,10 +686,9 @@ at91dci_xfer_do_fifo(struct usb_xfer *xf if (temp & 1) td->fifo_bank = 1; } - return (1); /* not complete */ + return; done: - sc = AT9100_DCI_BUS2SC(xfer->xroot->bus); temp = (xfer->endpointno & UE_ADDR); /* update FIFO bank flag and multi buffer */ @@ -718,23 +699,42 @@ done: } /* compute all actual lengths */ + xfer->td_transfer_cache = NULL; + sc->sc_xfer_complete = 1; +} - at91dci_standard_done(xfer); +static uint8_t +at91dci_xfer_do_complete(struct usb_xfer *xfer) +{ + struct at91dci_td *td; - return (0); /* complete */ + DPRINTFN(9, "\n"); + td = xfer->td_transfer_cache; + if (td == NULL) { + /* compute all actual lengths */ + at91dci_standard_done(xfer); + return(1); + } + return (0); } static void -at91dci_interrupt_poll(struct at91dci_softc *sc) +at91dci_interrupt_poll_locked(struct at91dci_softc *sc) { struct usb_xfer *xfer; + TAILQ_FOREACH(xfer, &sc->sc_bus.intr_q.head, wait_entry) + at91dci_xfer_do_fifo(xfer); +} + +static void +at91dci_interrupt_complete_locked(struct at91dci_softc *sc) +{ + struct usb_xfer *xfer; repeat: TAILQ_FOREACH(xfer, &sc->sc_bus.intr_q.head, wait_entry) { - if (!at91dci_xfer_do_fifo(xfer)) { - /* queue has been modified */ + if (at91dci_xfer_do_complete(xfer)) goto repeat; - } } } @@ -764,20 +764,47 @@ at91dci_vbus_interrupt(struct at91dci_so } } +int +at91dci_filter_interrupt(void *arg) +{ + struct at91dci_softc *sc = arg; + int retval = FILTER_HANDLED; + uint32_t status; + + USB_BUS_SPIN_LOCK(&sc->sc_bus); + + status = AT91_UDP_READ_4(sc, AT91_UDP_ISR); + status &= AT91_UDP_INT_DEFAULT; + + if (status & AT9100_DCI_THREAD_IRQ) + retval = FILTER_SCHEDULE_THREAD; + + /* acknowledge interrupts */ + AT91_UDP_WRITE_4(sc, AT91_UDP_ICR, status & ~AT9100_DCI_THREAD_IRQ); + + /* poll FIFOs, if any */ + at91dci_interrupt_poll_locked(sc); + + if (sc->sc_xfer_complete != 0) + retval = FILTER_SCHEDULE_THREAD; + + USB_BUS_SPIN_UNLOCK(&sc->sc_bus); + + return (retval); +} + void -at91dci_interrupt(struct at91dci_softc *sc) +at91dci_interrupt(void *arg) { + struct at91dci_softc *sc = arg; uint32_t status; USB_BUS_LOCK(&sc->sc_bus); + USB_BUS_SPIN_LOCK(&sc->sc_bus); status = AT91_UDP_READ_4(sc, AT91_UDP_ISR); - status &= AT91_UDP_INT_DEFAULT; + status &= AT9100_DCI_THREAD_IRQ; - if (!status) { - USB_BUS_UNLOCK(&sc->sc_bus); - return; - } /* acknowledge interrupts */ AT91_UDP_WRITE_4(sc, AT91_UDP_ICR, status); @@ -837,14 +864,12 @@ at91dci_interrupt(struct at91dci_softc * /* complete root HUB interrupt endpoint */ at91dci_root_intr(sc); } - /* check for any endpoint interrupts */ - - if (status & AT91_UDP_INT_EPS) { - - DPRINTFN(5, "real endpoint interrupt 0x%08x\n", status); - at91dci_interrupt_poll(sc); + if (sc->sc_xfer_complete != 0) { + sc->sc_xfer_complete = 0; + at91dci_interrupt_complete_locked(sc); } + USB_BUS_SPIN_UNLOCK(&sc->sc_bus); USB_BUS_UNLOCK(&sc->sc_bus); } @@ -1048,12 +1073,17 @@ at91dci_timeout(void *arg) static void at91dci_start_standard_chain(struct usb_xfer *xfer) { + struct at91dci_softc *sc = AT9100_DCI_BUS2SC(xfer->xroot->bus); + DPRINTFN(9, "\n"); + USB_BUS_SPIN_LOCK(&sc->sc_bus); + /* poll one time */ - if (at91dci_xfer_do_fifo(xfer)) { + at91dci_xfer_do_fifo(xfer); + + if (at91dci_xfer_do_complete(xfer) == 0) { - struct at91dci_softc *sc = AT9100_DCI_BUS2SC(xfer->xroot->bus); uint8_t ep_no = xfer->endpointno & UE_ADDR; /* @@ -1074,6 +1104,7 @@ at91dci_start_standard_chain(struct usb_ &at91dci_timeout, xfer->timeout); } } + USB_BUS_SPIN_UNLOCK(&sc->sc_bus); } static void @@ -1214,6 +1245,8 @@ at91dci_device_done(struct usb_xfer *xfe DPRINTFN(2, "xfer=%p, endpoint=%p, error=%d\n", xfer, xfer->endpoint, error); + USB_BUS_SPIN_LOCK(&sc->sc_bus); + if (xfer->flags_int.usb_mode == USB_MODE_DEVICE) { ep_no = (xfer->endpointno & UE_ADDR); @@ -1222,8 +1255,11 @@ at91dci_device_done(struct usb_xfer *xfe DPRINTFN(15, "disable interrupts on endpoint %d\n", ep_no); } + /* dequeue transfer and start next transfer */ usbd_transfer_done(xfer, error); + + USB_BUS_SPIN_UNLOCK(&sc->sc_bus); } static void @@ -1246,11 +1282,14 @@ at91dci_set_stall(struct usb_device *ude /* set FORCESTALL */ sc = AT9100_DCI_BUS2SC(udev->bus); + + USB_BUS_SPIN_LOCK(&sc->sc_bus); csr_reg = (ep->edesc->bEndpointAddress & UE_ADDR); csr_reg = AT91_UDP_CSR(csr_reg); csr_val = AT91_UDP_READ_4(sc, csr_reg); AT91_CSR_ACK(csr_val, AT91_UDP_CSR_FORCESTALL); AT91_UDP_WRITE_4(sc, csr_reg, csr_val); + USB_BUS_SPIN_UNLOCK(&sc->sc_bus); } static void @@ -1267,6 +1306,9 @@ at91dci_clear_stall_sub(struct at91dci_s /* clearing stall is not needed */ return; } + + USB_BUS_SPIN_LOCK(&sc->sc_bus); + /* compute CSR register offset */ csr_reg = AT91_UDP_CSR(ep_no); @@ -1347,6 +1389,8 @@ at91dci_clear_stall_sub(struct at91dci_s /* enable endpoint */ AT91_UDP_WRITE_4(sc, AT91_UDP_CSR(ep_no), csr_val); + + USB_BUS_SPIN_UNLOCK(&sc->sc_bus); } static void @@ -1482,7 +1526,10 @@ at91dci_do_poll(struct usb_bus *bus) struct at91dci_softc *sc = AT9100_DCI_BUS2SC(bus); USB_BUS_LOCK(&sc->sc_bus); - at91dci_interrupt_poll(sc); + USB_BUS_SPIN_LOCK(&sc->sc_bus); + at91dci_interrupt_poll_locked(sc); + at91dci_interrupt_complete_locked(sc); + USB_BUS_SPIN_UNLOCK(&sc->sc_bus); USB_BUS_UNLOCK(&sc->sc_bus); } @@ -2237,8 +2284,6 @@ at91dci_xfer_setup(struct usb_setup_para td = USB_ADD_BYTES(parm->buf, parm->size[0]); /* init TD */ - td->io_tag = sc->sc_io_tag; - td->io_hdl = sc->sc_io_hdl; td->max_packet_size = xfer->max_packet_size; td->status_reg = AT91_UDP_CSR(ep_no); td->fifo_reg = AT91_UDP_FDR(ep_no); Modified: stable/10/sys/dev/usb/controller/at91dci.h ============================================================================== --- stable/10/sys/dev/usb/controller/at91dci.h Wed Aug 13 06:58:42 2014 (r269915) +++ stable/10/sys/dev/usb/controller/at91dci.h Wed Aug 13 06:59:40 2014 (r269916) @@ -133,12 +133,11 @@ bus_space_write_4((sc)->sc_io_tag, (sc)->sc_io_hdl, reg, data) struct at91dci_td; +struct at91dci_softc; -typedef uint8_t (at91dci_cmd_t)(struct at91dci_td *td); +typedef uint8_t (at91dci_cmd_t)(struct at91dci_softc *sc, struct at91dci_td *td); struct at91dci_td { - bus_space_tag_t io_tag; - bus_space_handle_t io_hdl; struct at91dci_td *obj_next; at91dci_cmd_t *func; struct usb_page_cache *pc; @@ -221,6 +220,8 @@ struct at91dci_softc { void (*sc_pull_down) (void *arg); void *sc_pull_arg; + uint32_t sc_xfer_complete; + uint8_t sc_rt_addr; /* root HUB address */ uint8_t sc_dv_addr; /* device address */ uint8_t sc_conf; /* root HUB config */ @@ -235,7 +236,8 @@ struct at91dci_softc { usb_error_t at91dci_init(struct at91dci_softc *sc); void at91dci_uninit(struct at91dci_softc *sc); -void at91dci_interrupt(struct at91dci_softc *sc); +driver_filter_t at91dci_filter_interrupt; +driver_intr_t at91dci_interrupt; void at91dci_vbus_interrupt(struct at91dci_softc *sc, uint8_t is_on); #endif /* _AT9100_DCI_H_ */ Modified: stable/10/sys/dev/usb/controller/at91dci_atmelarm.c ============================================================================== --- stable/10/sys/dev/usb/controller/at91dci_atmelarm.c Wed Aug 13 06:58:42 2014 (r269915) +++ stable/10/sys/dev/usb/controller/at91dci_atmelarm.c Wed Aug 13 06:59:40 2014 (r269916) @@ -212,8 +212,8 @@ at91_udp_attach(device_t dev) } device_set_ivars(sc->sc_dci.sc_bus.bdev, &sc->sc_dci.sc_bus); - err = bus_setup_intr(dev, sc->sc_dci.sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, - NULL, (driver_intr_t *)at91dci_interrupt, sc, &sc->sc_dci.sc_intr_hdl); + err = bus_setup_intr(dev, sc->sc_dci.sc_irq_res, INTR_TYPE_TTY | INTR_MPSAFE, + at91dci_filter_interrupt, at91dci_interrupt, sc, &sc->sc_dci.sc_intr_hdl); if (err) { sc->sc_dci.sc_intr_hdl = NULL; goto error; Modified: stable/10/sys/dev/usb/controller/at91dci_fdt.c ============================================================================== --- stable/10/sys/dev/usb/controller/at91dci_fdt.c Wed Aug 13 06:58:42 2014 (r269915) +++ stable/10/sys/dev/usb/controller/at91dci_fdt.c Wed Aug 13 06:59:40 2014 (r269916) @@ -218,13 +218,8 @@ at91_udp_attach(device_t dev) } device_set_ivars(sc->sc_dci.sc_bus.bdev, &sc->sc_dci.sc_bus); -#if (__FreeBSD_version >= 700031) - err = bus_setup_intr(dev, sc->sc_dci.sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, - NULL, (driver_intr_t *)at91dci_interrupt, sc, &sc->sc_dci.sc_intr_hdl); -#else - err = bus_setup_intr(dev, sc->sc_dci.sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, - (driver_intr_t *)at91dci_interrupt, sc, &sc->sc_dci.sc_intr_hdl); -#endif + err = bus_setup_intr(dev, sc->sc_dci.sc_irq_res, INTR_TYPE_TTY | INTR_MPSAFE, + at91dci_filter_interrupt, at91dci_interrupt, sc, &sc->sc_dci.sc_intr_hdl); if (err) { sc->sc_dci.sc_intr_hdl = NULL; goto error; From hselasky at FreeBSD.org Wed Aug 13 07:02:24 2014 From: hselasky at FreeBSD.org (Hans Petter Selasky) Date: Wed, 13 Aug 2014 07:02:23 +0000 (UTC) Subject: svn commit: r269917 - stable/10/sys/dev/usb Message-ID: <201408130702.s7D72Nbe046018@svn.freebsd.org> Author: hselasky Date: Wed Aug 13 07:02:23 2014 New Revision: 269917 URL: http://svnweb.freebsd.org/changeset/base/269917 Log: MFC r269566: Fix for deadlock in USB device side mode. Modified: stable/10/sys/dev/usb/usb_device.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/usb_device.c ============================================================================== --- stable/10/sys/dev/usb/usb_device.c Wed Aug 13 06:59:40 2014 (r269916) +++ stable/10/sys/dev/usb/usb_device.c Wed Aug 13 07:02:23 2014 (r269917) @@ -451,6 +451,17 @@ usb_endpoint_foreach(struct usb_device * return (NULL); } +#if USB_HAVE_UGEN +static uint16_t +usb_get_refcount(struct usb_device *udev) +{ + if (usb_proc_is_called_from(USB_BUS_EXPLORE_PROC(udev->bus)) || + usb_proc_is_called_from(USB_BUS_CONTROL_XFER_PROC(udev->bus))) + return (1); + return (2); +} +#endif + /*------------------------------------------------------------------------* * usb_wait_pending_ref_locked * @@ -463,9 +474,7 @@ static void usb_wait_pending_ref_locked(struct usb_device *udev) { #if USB_HAVE_UGEN - const uint16_t refcount = - usb_proc_is_called_from( - USB_BUS_EXPLORE_PROC(udev->bus)) ? 1 : 2; + const uint16_t refcount = usb_get_refcount(udev); DPRINTF("Refcount = %d\n", (int)refcount); @@ -496,9 +505,7 @@ static void usb_ref_restore_locked(struct usb_device *udev) { #if USB_HAVE_UGEN - const uint16_t refcount = - usb_proc_is_called_from( - USB_BUS_EXPLORE_PROC(udev->bus)) ? 1 : 2; + const uint16_t refcount = usb_get_refcount(udev); DPRINTF("Refcount = %d\n", (int)refcount); From hselasky at FreeBSD.org Wed Aug 13 07:08:04 2014 From: hselasky at FreeBSD.org (Hans Petter Selasky) Date: Wed, 13 Aug 2014 07:08:03 +0000 (UTC) Subject: svn commit: r269918 - stable/9/sys/dev/usb Message-ID: <201408130708.s7D783mo046896@svn.freebsd.org> Author: hselasky Date: Wed Aug 13 07:08:03 2014 New Revision: 269918 URL: http://svnweb.freebsd.org/changeset/base/269918 Log: MFC r269566: Fix for deadlock in USB device side mode. Modified: stable/9/sys/dev/usb/usb_device.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/usb_device.c ============================================================================== --- stable/9/sys/dev/usb/usb_device.c Wed Aug 13 07:02:23 2014 (r269917) +++ stable/9/sys/dev/usb/usb_device.c Wed Aug 13 07:08:03 2014 (r269918) @@ -430,6 +430,17 @@ usb_endpoint_foreach(struct usb_device * return (NULL); } +#if USB_HAVE_UGEN +static uint16_t +usb_get_refcount(struct usb_device *udev) +{ + if (usb_proc_is_called_from(&udev->bus->explore_proc) || + usb_proc_is_called_from(&udev->bus->control_xfer_proc)) + return (1); + return (2); +} +#endif + /*------------------------------------------------------------------------* * usb_wait_pending_ref_locked * @@ -442,9 +453,7 @@ static void usb_wait_pending_ref_locked(struct usb_device *udev) { #if USB_HAVE_UGEN - const uint16_t refcount = - usb_proc_is_called_from( - &udev->bus->explore_proc) ? 1 : 2; + const uint16_t refcount = usb_get_refcount(udev); DPRINTF("Refcount = %d\n", (int)refcount); @@ -475,9 +484,7 @@ static void usb_ref_restore_locked(struct usb_device *udev) { #if USB_HAVE_UGEN - const uint16_t refcount = - usb_proc_is_called_from( - &udev->bus->explore_proc) ? 1 : 2; + const uint16_t refcount = usb_get_refcount(udev); DPRINTF("Refcount = %d\n", (int)refcount); From hselasky at FreeBSD.org Wed Aug 13 07:11:37 2014 From: hselasky at FreeBSD.org (Hans Petter Selasky) Date: Wed, 13 Aug 2014 07:11:37 +0000 (UTC) Subject: svn commit: r269919 - stable/8/sys/dev/usb Message-ID: <201408130711.s7D7BbJu050277@svn.freebsd.org> Author: hselasky Date: Wed Aug 13 07:11:37 2014 New Revision: 269919 URL: http://svnweb.freebsd.org/changeset/base/269919 Log: MFC r269566: Fix for deadlock in USB device side mode. Modified: stable/8/sys/dev/usb/usb_device.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/usb_device.c ============================================================================== --- stable/8/sys/dev/usb/usb_device.c Wed Aug 13 07:08:03 2014 (r269918) +++ stable/8/sys/dev/usb/usb_device.c Wed Aug 13 07:11:37 2014 (r269919) @@ -430,6 +430,17 @@ usb_endpoint_foreach(struct usb_device * return (NULL); } +#if USB_HAVE_UGEN +static uint16_t +usb_get_refcount(struct usb_device *udev) +{ + if (usb_proc_is_called_from(&udev->bus->explore_proc) || + usb_proc_is_called_from(&udev->bus->control_xfer_proc)) + return (1); + return (2); +} +#endif + /*------------------------------------------------------------------------* * usb_wait_pending_ref_locked * @@ -442,9 +453,7 @@ static void usb_wait_pending_ref_locked(struct usb_device *udev) { #if USB_HAVE_UGEN - const uint16_t refcount = - usb_proc_is_called_from( - &udev->bus->explore_proc) ? 1 : 2; + const uint16_t refcount = usb_get_refcount(udev); DPRINTF("Refcount = %d\n", (int)refcount); @@ -475,9 +484,7 @@ static void usb_ref_restore_locked(struct usb_device *udev) { #if USB_HAVE_UGEN - const uint16_t refcount = - usb_proc_is_called_from( - &udev->bus->explore_proc) ? 1 : 2; + const uint16_t refcount = usb_get_refcount(udev); DPRINTF("Refcount = %d\n", (int)refcount); From hselasky at FreeBSD.org Wed Aug 13 07:13:43 2014 From: hselasky at FreeBSD.org (Hans Petter Selasky) Date: Wed, 13 Aug 2014 07:13:42 +0000 (UTC) Subject: svn commit: r269920 - stable/10/sys/dev/usb/controller Message-ID: <201408130713.s7D7DgS9051156@svn.freebsd.org> Author: hselasky Date: Wed Aug 13 07:13:42 2014 New Revision: 269920 URL: http://svnweb.freebsd.org/changeset/base/269920 Log: MFC r269565: Rename driver name a bit to avoid unit number confusion in dmesg. Modified: stable/10/sys/dev/usb/controller/usb_controller.c stable/10/sys/dev/usb/controller/uss820dci_atmelarm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/usb_controller.c ============================================================================== --- stable/10/sys/dev/usb/controller/usb_controller.c Wed Aug 13 07:11:37 2014 (r269919) +++ stable/10/sys/dev/usb/controller/usb_controller.c Wed Aug 13 07:13:42 2014 (r269920) @@ -133,7 +133,7 @@ DRIVER_MODULE(usbus, xhci, usb_driver, u /* Device Only Drivers */ DRIVER_MODULE(usbus, at91_udp, usb_driver, usb_devclass, 0, 0); DRIVER_MODULE(usbus, musbotg, usb_driver, usb_devclass, 0, 0); -DRIVER_MODULE(usbus, uss820, usb_driver, usb_devclass, 0, 0); +DRIVER_MODULE(usbus, uss820dci, usb_driver, usb_devclass, 0, 0); DRIVER_MODULE(usbus, octusb, usb_driver, usb_devclass, 0, 0); /* Dual Mode Drivers */ Modified: stable/10/sys/dev/usb/controller/uss820dci_atmelarm.c ============================================================================== --- stable/10/sys/dev/usb/controller/uss820dci_atmelarm.c Wed Aug 13 07:11:37 2014 (r269919) +++ stable/10/sys/dev/usb/controller/uss820dci_atmelarm.c Wed Aug 13 07:13:42 2014 (r269920) @@ -77,15 +77,15 @@ static device_method_t uss820dci_methods }; static driver_t uss820dci_driver = { - .name = "uss820", + .name = "uss820dci", .methods = uss820dci_methods, .size = sizeof(struct uss820dci_softc), }; static devclass_t uss820dci_devclass; -DRIVER_MODULE(uss820, atmelarm, uss820dci_driver, uss820dci_devclass, 0, 0); -MODULE_DEPEND(uss820, usb, 1, 1, 1); +DRIVER_MODULE(uss820dci, atmelarm, uss820dci_driver, uss820dci_devclass, 0, 0); +MODULE_DEPEND(uss820dci, usb, 1, 1, 1); static const char *const uss820_desc = "USS820 USB Device Controller"; From hselasky at FreeBSD.org Wed Aug 13 08:18:50 2014 From: hselasky at FreeBSD.org (Hans Petter Selasky) Date: Wed, 13 Aug 2014 08:18:49 +0000 (UTC) Subject: svn commit: r269921 - stable/10/sys/boot/usb Message-ID: <201408130818.s7D8Inlt079420@svn.freebsd.org> Author: hselasky Date: Wed Aug 13 08:18:49 2014 New Revision: 269921 URL: http://svnweb.freebsd.org/changeset/base/269921 Log: MFC r266396 and r267183: Build fixes. Add support for fast interrupts. Modified: stable/10/sys/boot/usb/bsd_kernel.c stable/10/sys/boot/usb/bsd_kernel.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/usb/bsd_kernel.c ============================================================================== --- stable/10/sys/boot/usb/bsd_kernel.c Wed Aug 13 07:13:42 2014 (r269920) +++ stable/10/sys/boot/usb/bsd_kernel.c Wed Aug 13 08:18:49 2014 (r269921) @@ -380,8 +380,10 @@ device_get_parent(device_t dev) } void -device_set_interrupt(device_t dev, intr_fn_t *fn, void *arg) +device_set_interrupt(device_t dev, driver_filter_t *filter, + driver_intr_t *fn, void *arg) { + dev->dev_irq_filter = filter; dev->dev_irq_fn = fn; dev->dev_irq_arg = arg; } @@ -395,8 +397,16 @@ device_run_interrupts(device_t parent) return; TAILQ_FOREACH(child, &parent->dev_children, dev_link) { - if (child->dev_irq_fn != NULL) - (child->dev_irq_fn) (child->dev_irq_arg); + int status; + if (child->dev_irq_filter != NULL) + status = child->dev_irq_filter(child->dev_irq_arg); + else + status = FILTER_SCHEDULE_THREAD; + + if (status == FILTER_SCHEDULE_THREAD) { + if (child->dev_irq_fn != NULL) + (child->dev_irq_fn) (child->dev_irq_arg); + } } } Modified: stable/10/sys/boot/usb/bsd_kernel.h ============================================================================== --- stable/10/sys/boot/usb/bsd_kernel.h Wed Aug 13 07:13:42 2014 (r269920) +++ stable/10/sys/boot/usb/bsd_kernel.h Wed Aug 13 08:18:49 2014 (r269921) @@ -37,6 +37,7 @@ #define isalpha(x) (((x) >= 'a' && (x) <= 'z') || ((x) >= 'A' && (x) <= 'Z')) #define isdigit(x) ((x) >= '0' && (x) <= '9') #define panic(...) do { printf("USB PANIC: " __VA_ARGS__); while (1) ; } while (0) +#define rebooting 0 #define M_USB 0 #define M_USBDEV 0 #define USB_PROC_MAX 3 @@ -96,6 +97,7 @@ SYSINIT_ENTRY(uniq##_entry, "sysuninit", #define MIN(a,b) (((a) < (b)) ? (a) : (b)) #define MAX(a,b) (((a) > (b)) ? (a) : (b)) #define MTX_DEF 0 +#define MTX_SPIN 0 #define MTX_RECURSE 0 #define SX_DUPOK 0 #define SX_NOWITNESS 0 @@ -201,6 +203,8 @@ struct mtx { void mtx_init(struct mtx *, const char *, const char *, int); void mtx_lock(struct mtx *); void mtx_unlock(struct mtx *); +#define mtx_lock_spin(x) mtx_lock(x) +#define mtx_unlock_spin(x) mtx_unlock(x) int mtx_owned(struct mtx *); void mtx_destroy(struct mtx *); @@ -266,7 +270,11 @@ struct module_data; typedef struct driver driver_t; typedef struct devclass *devclass_t; typedef struct device *device_t; -typedef void (intr_fn_t)(void *arg); +typedef void (driver_intr_t)(void *arg); +typedef int (driver_filter_t)(void *arg); +#define FILTER_STRAY 0x01 +#define FILTER_HANDLED 0x02 +#define FILTER_SCHEDULE_THREAD 0x04 typedef int device_attach_t (device_t dev); typedef int device_detach_t (device_t dev); @@ -294,7 +302,8 @@ struct device { const struct module_data *dev_module; void *dev_sc; void *dev_aux; - intr_fn_t *dev_irq_fn; + driver_filter_t *dev_irq_filter; + driver_intr_t *dev_irq_fn; void *dev_irq_arg; uint16_t dev_unit; @@ -341,7 +350,7 @@ const char *device_get_nameunit(device_t printf("%s: " fmt, device_get_nameunit(dev),## __VA_ARGS__) device_t device_add_child(device_t dev, const char *name, int unit); void device_quiet(device_t dev); -void device_set_interrupt(device_t dev, intr_fn_t *fn, void *arg); +void device_set_interrupt(device_t dev, driver_filter_t *, driver_intr_t *, void *); void device_run_interrupts(device_t parent); void device_set_ivars(device_t dev, void *ivars); void *device_get_ivars(device_t dev); From hselasky at FreeBSD.org Wed Aug 13 08:21:54 2014 From: hselasky at FreeBSD.org (Hans Petter Selasky) Date: Wed, 13 Aug 2014 08:21:53 +0000 (UTC) Subject: svn commit: r269922 - in stable/10/sys: boot/usb conf dev/usb dev/usb/template modules/usb/template Message-ID: <201408130821.s7D8LrSD083044@svn.freebsd.org> Author: hselasky Date: Wed Aug 13 08:21:52 2014 New Revision: 269922 URL: http://svnweb.freebsd.org/changeset/base/269922 Log: MFC r269567: Add new USB phone descriptor template for USB device side mode. Added: stable/10/sys/dev/usb/template/usb_template_phone.c - copied unchanged from r269567, head/sys/dev/usb/template/usb_template_phone.c Modified: stable/10/sys/boot/usb/Makefile stable/10/sys/conf/files stable/10/sys/dev/usb/template/usb_template.c stable/10/sys/dev/usb/template/usb_template.h stable/10/sys/dev/usb/usb_ioctl.h stable/10/sys/modules/usb/template/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/usb/Makefile ============================================================================== --- stable/10/sys/boot/usb/Makefile Wed Aug 13 08:18:49 2014 (r269921) +++ stable/10/sys/boot/usb/Makefile Wed Aug 13 08:21:52 2014 (r269922) @@ -116,6 +116,7 @@ SRCS+= usb_template_modem.c SRCS+= usb_template_mouse.c SRCS+= usb_template_kbd.c SRCS+= usb_template_audio.c +SRCS+= usb_template_phone.c SRCS+= sysinit_data.c SRCS+= sysuninit_data.c Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Wed Aug 13 08:18:49 2014 (r269921) +++ stable/10/sys/conf/files Wed Aug 13 08:21:52 2014 (r269922) @@ -2524,6 +2524,7 @@ dev/usb/template/usb_template_modem.c op dev/usb/template/usb_template_mouse.c optional usb_template dev/usb/template/usb_template_msc.c optional usb_template dev/usb/template/usb_template_mtp.c optional usb_template +dev/usb/template/usb_template_phone.c optional usb_template # # USB END # Modified: stable/10/sys/dev/usb/template/usb_template.c ============================================================================== --- stable/10/sys/dev/usb/template/usb_template.c Wed Aug 13 08:18:49 2014 (r269921) +++ stable/10/sys/dev/usb/template/usb_template.c Wed Aug 13 08:21:52 2014 (r269922) @@ -135,7 +135,7 @@ usb_make_raw_desc(struct usb_temp_setup /* check if we have got a CDC union descriptor */ - if ((raw[0] >= sizeof(struct usb_cdc_union_descriptor)) && + if ((raw[0] == sizeof(struct usb_cdc_union_descriptor)) && (raw[1] == UDESC_CS_INTERFACE) && (raw[2] == UDESCSUB_CDC_UNION)) { struct usb_cdc_union_descriptor *ud = (void *)dst; @@ -150,7 +150,7 @@ usb_make_raw_desc(struct usb_temp_setup /* check if we have got an interface association descriptor */ - if ((raw[0] >= sizeof(struct usb_interface_assoc_descriptor)) && + if ((raw[0] == sizeof(struct usb_interface_assoc_descriptor)) && (raw[1] == UDESC_IFACE_ASSOC)) { struct usb_interface_assoc_descriptor *iad = (void *)dst; @@ -162,7 +162,7 @@ usb_make_raw_desc(struct usb_temp_setup /* check if we have got a call management descriptor */ - if ((raw[0] >= sizeof(struct usb_cdc_cm_descriptor)) && + if ((raw[0] == sizeof(struct usb_cdc_cm_descriptor)) && (raw[1] == UDESC_CS_INTERFACE) && (raw[2] == UDESCSUB_CDC_CM)) { struct usb_cdc_cm_descriptor *ccd = (void *)dst; @@ -1368,6 +1368,9 @@ usb_temp_setup_by_index(struct usb_devic case USB_TEMP_MOUSE: err = usb_temp_setup(udev, &usb_template_mouse); break; + case USB_TEMP_PHONE: + err = usb_temp_setup(udev, &usb_template_phone); + break; default: return (USB_ERR_INVAL); } Modified: stable/10/sys/dev/usb/template/usb_template.h ============================================================================== --- stable/10/sys/dev/usb/template/usb_template.h Wed Aug 13 08:18:49 2014 (r269921) +++ stable/10/sys/dev/usb/template/usb_template.h Wed Aug 13 08:21:52 2014 (r269922) @@ -105,6 +105,7 @@ extern const struct usb_temp_device_desc extern const struct usb_temp_device_desc usb_template_mouse; extern const struct usb_temp_device_desc usb_template_msc; extern const struct usb_temp_device_desc usb_template_mtp; +extern const struct usb_temp_device_desc usb_template_phone; usb_error_t usb_temp_setup(struct usb_device *, const struct usb_temp_device_desc *); Copied: stable/10/sys/dev/usb/template/usb_template_phone.c (from r269567, head/sys/dev/usb/template/usb_template_phone.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/dev/usb/template/usb_template_phone.c Wed Aug 13 08:21:52 2014 (r269922, copy of r269567, head/sys/dev/usb/template/usb_template_phone.c) @@ -0,0 +1,419 @@ +/* $FreeBSD$ */ +/*- + * Copyright (c) 2014 Hans Petter Selasky. 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. + */ + +/* + * This file contains the USB template for an USB phone device. + */ + +#ifdef USB_GLOBAL_INCLUDE_FILE +#include USB_GLOBAL_INCLUDE_FILE +#else +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#endif /* USB_GLOBAL_INCLUDE_FILE */ + +enum { + INDEX_PHONE_LANG, + INDEX_PHONE_MIXER, + INDEX_PHONE_RECORD, + INDEX_PHONE_PLAYBACK, + INDEX_PHONE_PRODUCT, + INDEX_PHONE_HID, + INDEX_PHONE_MAX, +}; + +#define STRING_PHONE_PRODUCT \ + "U\0S\0B\0 \0P\0h\0o\0n\0e\0 \0D\0e\0v\0i\0c\0e" + +#define STRING_PHONE_MIXER \ + "M\0i\0x\0e\0r\0 \0i\0n\0t\0e\0r\0f\0a\0c\0e" + +#define STRING_PHONE_RECORD \ + "R\0e\0c\0o\0r\0d\0 \0i\0n\0t\0e\0r\0f\0a\0c\0e" + +#define STRING_PHONE_PLAYBACK \ + "P\0l\0a\0y\0b\0a\0c\0k\0 \0i\0n\0t\0e\0r\0f\0a\0c\0e" + +#define STRING_PHONE_HID \ + "H\0I\0D\0 \0i\0n\0t\0e\0r\0f\0a\0c\0e" + +/* make the real string descriptors */ + +USB_MAKE_STRING_DESC(STRING_PHONE_MIXER, string_phone_mixer); +USB_MAKE_STRING_DESC(STRING_PHONE_RECORD, string_phone_record); +USB_MAKE_STRING_DESC(STRING_PHONE_PLAYBACK, string_phone_playback); +USB_MAKE_STRING_DESC(STRING_PHONE_PRODUCT, string_phone_product); +USB_MAKE_STRING_DESC(STRING_PHONE_HID, string_phone_hid); + +/* prototypes */ + +/* + * Phone Mixer description structures + * + * Some of the phone descriptors were dumped from no longer in + * production Yealink VOIP USB phone adapter: + */ +static uint8_t phone_hid_descriptor[] = { + 0x05, 0x0b, 0x09, 0x01, 0xa1, 0x01, 0x05, 0x09, + 0x19, 0x01, 0x29, 0x3f, 0x15, 0x00, 0x25, 0x01, + 0x75, 0x01, 0x95, 0x80, 0x81, 0x00, 0x05, 0x08, + 0x19, 0x01, 0x29, 0x10, 0x15, 0x00, 0x25, 0x01, + 0x75, 0x01, 0x95, 0x80, 0x91, 0x00, 0xc0 +}; + +static const uint8_t phone_raw_desc_0[] = { + 0x0a, 0x24, 0x01, 0x00, 0x01, 0x4a, 0x00, 0x02, + 0x01, 0x02 +}; + +static const uint8_t phone_raw_desc_1[] = { + 0x0c, 0x24, 0x02, 0x01, 0x01, 0x02, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00 +}; + +static const uint8_t phone_raw_desc_2[] = { + 0x0c, 0x24, 0x02, 0x02, 0x01, 0x01, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00 +}; + +static const uint8_t phone_raw_desc_3[] = { + 0x09, 0x24, 0x03, 0x03, 0x01, 0x03, 0x00, 0x06, + 0x00 +}; + +static const uint8_t phone_raw_desc_4[] = { + 0x09, 0x24, 0x03, 0x04, 0x01, 0x01, 0x00, 0x05, + 0x00 +}; + +static const uint8_t phone_raw_desc_5[] = { + 0x0b, 0x24, 0x06, 0x05, 0x01, 0x02, 0x03, 0x00, + 0x03, 0x00, 0x00 +}; + +static const uint8_t phone_raw_desc_6[] = { + 0x0b, 0x24, 0x06, 0x06, 0x02, 0x02, 0x03, 0x00, + 0x03, 0x00, 0x00 +}; + +static const void *phone_raw_iface_0_desc[] = { + phone_raw_desc_0, + phone_raw_desc_1, + phone_raw_desc_2, + phone_raw_desc_3, + phone_raw_desc_4, + phone_raw_desc_5, + phone_raw_desc_6, + NULL, +}; + +static const struct usb_temp_interface_desc phone_iface_0 = { + .ppEndpoints = NULL, /* no endpoints */ + .ppRawDesc = phone_raw_iface_0_desc, + .bInterfaceClass = 1, + .bInterfaceSubClass = 1, + .bInterfaceProtocol = 0, + .iInterface = INDEX_PHONE_MIXER, +}; + +static const uint8_t phone_raw_desc_20[] = { + 0x07, 0x24, 0x01, 0x04, 0x01, 0x01, 0x00 +}; + +static const uint8_t phone_raw_desc_21[] = { + 0x0b, 0x24, 0x02, 0x01, 0x01, 0x02, 0x10, 0x01, + /* 8kHz */ + 0x40, 0x1f, 0x00 +}; + +static const uint8_t phone_raw_desc_22[] = { + 0x07, 0x25, 0x01, 0x00, 0x00, 0x00, 0x00 +}; + +static const void *phone_raw_iface_1_desc[] = { + phone_raw_desc_20, + phone_raw_desc_21, + NULL, +}; + +static const void *phone_raw_ep_1_desc[] = { + phone_raw_desc_22, + NULL, +}; + +static const struct usb_temp_packet_size phone_isoc_mps = { + .mps[USB_SPEED_FULL] = 0x10, + .mps[USB_SPEED_HIGH] = 0x10, +}; + +static const struct usb_temp_interval phone_isoc_interval = { + .bInterval[USB_SPEED_FULL] = 1, /* 1:1 */ + .bInterval[USB_SPEED_HIGH] = 4, /* 1:8 */ +}; + +static const struct usb_temp_endpoint_desc phone_isoc_in_ep = { + .ppRawDesc = phone_raw_ep_1_desc, + .pPacketSize = &phone_isoc_mps, + .pIntervals = &phone_isoc_interval, + .bEndpointAddress = UE_DIR_IN, + .bmAttributes = UE_ISOCHRONOUS, +}; + +static const struct usb_temp_endpoint_desc *phone_iface_1_ep[] = { + &phone_isoc_in_ep, + NULL, +}; + +static const struct usb_temp_interface_desc phone_iface_1_alt_0 = { + .ppEndpoints = NULL, /* no endpoints */ + .ppRawDesc = NULL, /* no raw descriptors */ + .bInterfaceClass = 1, + .bInterfaceSubClass = 2, + .bInterfaceProtocol = 0, + .iInterface = INDEX_PHONE_PLAYBACK, +}; + +static const struct usb_temp_interface_desc phone_iface_1_alt_1 = { + .ppEndpoints = phone_iface_1_ep, + .ppRawDesc = phone_raw_iface_1_desc, + .bInterfaceClass = 1, + .bInterfaceSubClass = 2, + .bInterfaceProtocol = 0, + .iInterface = INDEX_PHONE_PLAYBACK, + .isAltInterface = 1, /* this is an alternate setting */ +}; + +static const uint8_t phone_raw_desc_30[] = { + 0x07, 0x24, 0x01, 0x02, 0x01, 0x01, 0x00 +}; + +static const uint8_t phone_raw_desc_31[] = { + 0x0b, 0x24, 0x02, 0x01, 0x01, 0x02, 0x10, 0x01, + /* 8kHz */ + 0x40, 0x1f, 0x00 +}; + +static const uint8_t phone_raw_desc_32[] = { + 0x07, 0x25, 0x01, 0x00, 0x00, 0x00, 0x00 +}; + +static const void *phone_raw_iface_2_desc[] = { + phone_raw_desc_30, + phone_raw_desc_31, + NULL, +}; + +static const void *phone_raw_ep_2_desc[] = { + phone_raw_desc_32, + NULL, +}; + +static const struct usb_temp_endpoint_desc phone_isoc_out_ep = { + .ppRawDesc = phone_raw_ep_2_desc, + .pPacketSize = &phone_isoc_mps, + .pIntervals = &phone_isoc_interval, + .bEndpointAddress = UE_DIR_OUT, + .bmAttributes = UE_ISOCHRONOUS, +}; + +static const struct usb_temp_endpoint_desc *phone_iface_2_ep[] = { + &phone_isoc_out_ep, + NULL, +}; + +static const struct usb_temp_interface_desc phone_iface_2_alt_0 = { + .ppEndpoints = NULL, /* no endpoints */ + .ppRawDesc = NULL, /* no raw descriptors */ + .bInterfaceClass = 1, + .bInterfaceSubClass = 2, + .bInterfaceProtocol = 0, + .iInterface = INDEX_PHONE_RECORD, +}; + +static const struct usb_temp_interface_desc phone_iface_2_alt_1 = { + .ppEndpoints = phone_iface_2_ep, + .ppRawDesc = phone_raw_iface_2_desc, + .bInterfaceClass = 1, + .bInterfaceSubClass = 2, + .bInterfaceProtocol = 0, + .iInterface = INDEX_PHONE_RECORD, + .isAltInterface = 1, /* this is an alternate setting */ +}; + +static const uint8_t phone_hid_raw_desc_0[] = { + 0x09, 0x21, 0x00, 0x01, 0x00, 0x01, 0x22, sizeof(phone_hid_descriptor), + 0x00 +}; + +static const void *phone_hid_desc_0[] = { + phone_hid_raw_desc_0, + NULL, +}; + +static const struct usb_temp_packet_size phone_hid_mps = { + .mps[USB_SPEED_FULL] = 0x10, + .mps[USB_SPEED_HIGH] = 0x10, +}; + +static const struct usb_temp_interval phone_hid_interval = { + .bInterval[USB_SPEED_FULL] = 2, /* 2ms */ + .bInterval[USB_SPEED_HIGH] = 2, /* 2ms */ +}; + +static const struct usb_temp_endpoint_desc phone_hid_in_ep = { + .pPacketSize = &phone_hid_mps, + .pIntervals = &phone_hid_interval, + .bEndpointAddress = UE_DIR_IN, + .bmAttributes = UE_INTERRUPT, +}; + +static const struct usb_temp_endpoint_desc *phone_iface_3_ep[] = { + &phone_hid_in_ep, + NULL, +}; + +static const struct usb_temp_interface_desc phone_iface_3 = { + .ppEndpoints = phone_iface_3_ep, + .ppRawDesc = phone_hid_desc_0, + .bInterfaceClass = 3, + .bInterfaceSubClass = 0, + .bInterfaceProtocol = 0, + .iInterface = INDEX_PHONE_HID, +}; + +static const struct usb_temp_interface_desc *phone_interfaces[] = { + &phone_iface_0, + &phone_iface_1_alt_0, + &phone_iface_1_alt_1, + &phone_iface_2_alt_0, + &phone_iface_2_alt_1, + &phone_iface_3, + NULL, +}; + +static const struct usb_temp_config_desc phone_config_desc = { + .ppIfaceDesc = phone_interfaces, + .bmAttributes = UC_BUS_POWERED, + .bMaxPower = 25, /* 50 mA */ + .iConfiguration = INDEX_PHONE_PRODUCT, +}; + +static const struct usb_temp_config_desc *phone_configs[] = { + &phone_config_desc, + NULL, +}; + +static usb_temp_get_string_desc_t phone_get_string_desc; +static usb_temp_get_vendor_desc_t phone_get_vendor_desc; + +const struct usb_temp_device_desc usb_template_phone = { + .getStringDesc = &phone_get_string_desc, + .getVendorDesc = &phone_get_vendor_desc, + .ppConfigDesc = phone_configs, + .idVendor = USB_TEMPLATE_VENDOR, + .idProduct = 0xb001, + .bcdDevice = 0x0100, + .bDeviceClass = UDCLASS_IN_INTERFACE, + .bDeviceSubClass = 0, + .bDeviceProtocol = 0, + .iManufacturer = 0, + .iProduct = INDEX_PHONE_PRODUCT, + .iSerialNumber = 0, +}; + +/*------------------------------------------------------------------------* + * phone_get_vendor_desc + * + * Return values: + * NULL: Failure. No such vendor descriptor. + * Else: Success. Pointer to vendor descriptor is returned. + *------------------------------------------------------------------------*/ +static const void * +phone_get_vendor_desc(const struct usb_device_request *req, uint16_t *plen) +{ + if ((req->bmRequestType == 0x81) && (req->bRequest == 0x06) && + (req->wValue[0] == 0x00) && (req->wValue[1] == 0x22) && + (req->wIndex[1] == 0) && (req->wIndex[0] == 3 /* iface */)) { + + *plen = sizeof(phone_hid_descriptor); + return (phone_hid_descriptor); + } + return (NULL); +} + +/*------------------------------------------------------------------------* + * phone_get_string_desc + * + * Return values: + * NULL: Failure. No such string. + * Else: Success. Pointer to string descriptor is returned. + *------------------------------------------------------------------------*/ +static const void * +phone_get_string_desc(uint16_t lang_id, uint8_t string_index) +{ + static const void *ptr[INDEX_PHONE_MAX] = { + [INDEX_PHONE_LANG] = &usb_string_lang_en, + [INDEX_PHONE_MIXER] = &string_phone_mixer, + [INDEX_PHONE_RECORD] = &string_phone_record, + [INDEX_PHONE_PLAYBACK] = &string_phone_playback, + [INDEX_PHONE_PRODUCT] = &string_phone_product, + [INDEX_PHONE_HID] = &string_phone_hid, + }; + + if (string_index == 0) { + return (&usb_string_lang_en); + } + if (lang_id != 0x0409) { + return (NULL); + } + if (string_index < INDEX_PHONE_MAX) { + return (ptr[string_index]); + } + return (NULL); +} Modified: stable/10/sys/dev/usb/usb_ioctl.h ============================================================================== --- stable/10/sys/dev/usb/usb_ioctl.h Wed Aug 13 08:18:49 2014 (r269921) +++ stable/10/sys/dev/usb/usb_ioctl.h Wed Aug 13 08:21:52 2014 (r269922) @@ -64,6 +64,7 @@ enum { USB_TEMP_AUDIO, /* USB Audio */ USB_TEMP_KBD, /* USB Keyboard */ USB_TEMP_MOUSE, /* USB Mouse */ + USB_TEMP_PHONE, /* USB Phone */ USB_TEMP_MAX, }; Modified: stable/10/sys/modules/usb/template/Makefile ============================================================================== --- stable/10/sys/modules/usb/template/Makefile Wed Aug 13 08:18:49 2014 (r269921) +++ stable/10/sys/modules/usb/template/Makefile Wed Aug 13 08:21:52 2014 (r269922) @@ -38,6 +38,7 @@ SRCS= opt_bus.h opt_usb.h device_if.h bu usb_template_modem.c \ usb_template_mouse.c \ usb_template_msc.c \ - usb_template_mtp.c + usb_template_mtp.c \ + usb_template_phone.c .include From hselasky at FreeBSD.org Wed Aug 13 08:24:49 2014 From: hselasky at FreeBSD.org (Hans Petter Selasky) Date: Wed, 13 Aug 2014 08:24:49 +0000 (UTC) Subject: svn commit: r269923 - stable/9/sys/dev/usb/controller Message-ID: <201408130824.s7D8OnvK083525@svn.freebsd.org> Author: hselasky Date: Wed Aug 13 08:24:48 2014 New Revision: 269923 URL: http://svnweb.freebsd.org/changeset/base/269923 Log: MFC r269565: Rename driver name a bit to avoid unit number confusion in dmesg. Modified: stable/9/sys/dev/usb/controller/usb_controller.c stable/9/sys/dev/usb/controller/uss820dci_atmelarm.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/controller/usb_controller.c ============================================================================== --- stable/9/sys/dev/usb/controller/usb_controller.c Wed Aug 13 08:21:52 2014 (r269922) +++ stable/9/sys/dev/usb/controller/usb_controller.c Wed Aug 13 08:24:48 2014 (r269923) @@ -126,7 +126,7 @@ DRIVER_MODULE(usbus, xhci, usb_driver, u /* Device Only Drivers */ DRIVER_MODULE(usbus, at91_udp, usb_driver, usb_devclass, 0, 0); DRIVER_MODULE(usbus, musbotg, usb_driver, usb_devclass, 0, 0); -DRIVER_MODULE(usbus, uss820, usb_driver, usb_devclass, 0, 0); +DRIVER_MODULE(usbus, uss820dci, usb_driver, usb_devclass, 0, 0); /*------------------------------------------------------------------------* * usb_probe Modified: stable/9/sys/dev/usb/controller/uss820dci_atmelarm.c ============================================================================== --- stable/9/sys/dev/usb/controller/uss820dci_atmelarm.c Wed Aug 13 08:21:52 2014 (r269922) +++ stable/9/sys/dev/usb/controller/uss820dci_atmelarm.c Wed Aug 13 08:24:48 2014 (r269923) @@ -77,15 +77,15 @@ static device_method_t uss820dci_methods }; static driver_t uss820dci_driver = { - .name = "uss820", + .name = "uss820dci", .methods = uss820dci_methods, .size = sizeof(struct uss820dci_softc), }; static devclass_t uss820dci_devclass; -DRIVER_MODULE(uss820, atmelarm, uss820dci_driver, uss820dci_devclass, 0, 0); -MODULE_DEPEND(uss820, usb, 1, 1, 1); +DRIVER_MODULE(uss820dci, atmelarm, uss820dci_driver, uss820dci_devclass, 0, 0); +MODULE_DEPEND(uss820dci, usb, 1, 1, 1); static const char *const uss820_desc = "USS820 USB Device Controller"; From trasz at FreeBSD.org Wed Aug 13 11:11:27 2014 From: trasz at FreeBSD.org (Edward Tomasz Napierala) Date: Wed, 13 Aug 2014 11:11:27 +0000 (UTC) Subject: svn commit: r269925 - stable/10/sys/dev/iscsi Message-ID: <201408131111.s7DBBRUD062419@svn.freebsd.org> Author: trasz Date: Wed Aug 13 11:11:27 2014 New Revision: 269925 URL: http://svnweb.freebsd.org/changeset/base/269925 Log: MFC r269197: Fix potential double free that could happen after connection error. Modified: stable/10/sys/dev/iscsi/icl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi/icl.c ============================================================================== --- stable/10/sys/dev/iscsi/icl.c Wed Aug 13 09:34:33 2014 (r269924) +++ stable/10/sys/dev/iscsi/icl.c Wed Aug 13 11:11:27 2014 (r269925) @@ -669,7 +669,10 @@ icl_conn_receive_pdu(struct icl_conn *ic } if (error != 0) { - icl_pdu_free(request); + /* + * Don't free the PDU; it's pointed to by ic->ic_receive_pdu + * and will get freed in icl_conn_close(). + */ icl_conn_fail(ic); } From gavin at FreeBSD.org Wed Aug 13 12:32:54 2014 From: gavin at FreeBSD.org (Gavin Atkinson) Date: Wed, 13 Aug 2014 12:32:53 +0000 (UTC) Subject: svn commit: r269928 - in stable/10: . etc/mtree share/examples share/examples/cvsup Message-ID: <201408131232.s7DCWrkk006224@svn.freebsd.org> Author: gavin Date: Wed Aug 13 12:32:52 2014 New Revision: 269928 URL: http://svnweb.freebsd.org/changeset/base/269928 Log: Merge r267867 from head: Remove example cvsup config files. Deleted: stable/10/share/examples/cvsup/ Modified: stable/10/ObsoleteFiles.inc stable/10/etc/mtree/BSD.usr.dist stable/10/share/examples/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Wed Aug 13 12:31:36 2014 (r269927) +++ stable/10/ObsoleteFiles.inc Wed Aug 13 12:32:52 2014 (r269928) @@ -45,6 +45,11 @@ OLD_FILES+=usr/share/examples/libusb20/a OLD_FILES+=usr/share/man/man9/VOP_GETVOBJECT.9.gz OLD_FILES+=usr/share/man/man9/VOP_CREATEVOBJECT.9.gz OLD_FILES+=usr/share/man/man9/VOP_DESTROYVOBJECT.9.gz +OLD_FILES+=usr/share/examples/cvsup/README +OLD_FILES+=usr/share/examples/cvsup/cvs-supfile +OLD_FILES+=usr/share/examples/cvsup/stable-supfile +OLD_FILES+=usr/share/examples/cvsup/standard-supfile +OLD_DIRS+=usr/share/examples/cvsup # 20140614: send-pr removal OLD_FILES+=usr/share/man/man1/send-pr.1.gz OLD_FILES+=etc/gnats/freefall Modified: stable/10/etc/mtree/BSD.usr.dist ============================================================================== --- stable/10/etc/mtree/BSD.usr.dist Wed Aug 13 12:31:36 2014 (r269927) +++ stable/10/etc/mtree/BSD.usr.dist Wed Aug 13 12:32:52 2014 (r269928) @@ -301,8 +301,6 @@ .. csh .. - cvsup - .. diskless .. drivers Modified: stable/10/share/examples/Makefile ============================================================================== --- stable/10/share/examples/Makefile Wed Aug 13 12:31:36 2014 (r269927) +++ stable/10/share/examples/Makefile Wed Aug 13 12:32:52 2014 (r269928) @@ -10,7 +10,6 @@ LDIRS= BSD_daemon \ bhyve \ bootforth \ csh \ - cvsup \ diskless \ drivers \ etc \ @@ -52,10 +51,6 @@ XFILES= BSD_daemon/FreeBSD.pfa \ bootforth/menuconf.4th \ bootforth/screen.4th \ csh/dot.cshrc \ - cvsup/README \ - cvsup/cvs-supfile \ - cvsup/stable-supfile \ - cvsup/standard-supfile \ diskless/ME \ diskless/README.BOOTP \ diskless/README.TEMPLATING \ From gavin at FreeBSD.org Wed Aug 13 12:35:12 2014 From: gavin at FreeBSD.org (Gavin Atkinson) Date: Wed, 13 Aug 2014 12:35:12 +0000 (UTC) Subject: svn commit: r269929 - stable/10/usr.sbin/jail Message-ID: <201408131235.s7DCZChR006666@svn.freebsd.org> Author: gavin Date: Wed Aug 13 12:35:11 2014 New Revision: 269929 URL: http://svnweb.freebsd.org/changeset/base/269929 Log: Merge r268488 from head: Reword an awkward option description PR: 191726 Submitted by: yaneurabeya gmail.com Modified: stable/10/usr.sbin/jail/jail.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/jail/jail.8 ============================================================================== --- stable/10/usr.sbin/jail/jail.8 Wed Aug 13 12:32:52 2014 (r269928) +++ stable/10/usr.sbin/jail/jail.8 Wed Aug 13 12:35:11 2014 (r269929) @@ -653,8 +653,9 @@ file, instead of in the prison's file. The user to run commands as, when running in the system environment. The default is to run the commands as the current user. .It Va exec.timeout -The maximum amount of time to wait for a command to complete. -If a command is still running after this many seconds have passed, +The maximum amount of time to wait for a command to complete, in +seconds. +If a command is still running after this timeout has passed, the jail not be created or removed. .It Va exec.consolelog A file to direct command output (stdout and stderr) to. From gavin at FreeBSD.org Wed Aug 13 12:37:00 2014 From: gavin at FreeBSD.org (Gavin Atkinson) Date: Wed, 13 Aug 2014 12:36:59 +0000 (UTC) Subject: svn commit: r269933 - stable/10/games/fortune/fortune Message-ID: <201408131236.s7DCaxZ0007151@svn.freebsd.org> Author: gavin Date: Wed Aug 13 12:36:59 2014 New Revision: 269933 URL: http://svnweb.freebsd.org/changeset/base/269933 Log: Merge r268637 from head: fortune(8): Search fortune files installed by ports/packages as well as those supplied by the base system. PR: 191800 Submitted by: Andy Kosela Modified: stable/10/games/fortune/fortune/pathnames.h Directory Properties: stable/10/ (props changed) Modified: stable/10/games/fortune/fortune/pathnames.h ============================================================================== --- stable/10/games/fortune/fortune/pathnames.h Wed Aug 13 12:35:39 2014 (r269932) +++ stable/10/games/fortune/fortune/pathnames.h Wed Aug 13 12:36:59 2014 (r269933) @@ -30,4 +30,5 @@ * $FreeBSD$ */ -#define FORTDIR "/usr/share/games/fortune" +#define FORTDIR "/usr/share/games/fortune:" \ + "/usr/local/share/games/fortune" From gavin at FreeBSD.org Wed Aug 13 12:38:09 2014 From: gavin at FreeBSD.org (Gavin Atkinson) Date: Wed, 13 Aug 2014 12:38:08 +0000 (UTC) Subject: svn commit: r269934 - stable/9/games/fortune/fortune Message-ID: <201408131238.s7DCc8Sa007448@svn.freebsd.org> Author: gavin Date: Wed Aug 13 12:38:08 2014 New Revision: 269934 URL: http://svnweb.freebsd.org/changeset/base/269934 Log: Merge r268637 from head: fortune(8): Search fortune files installed by ports/packages as well as those supplied by the base system. PR: 191800 Submitted by: Andy Kosela Modified: stable/9/games/fortune/fortune/pathnames.h Directory Properties: stable/9/games/fortune/fortune/ (props changed) Modified: stable/9/games/fortune/fortune/pathnames.h ============================================================================== --- stable/9/games/fortune/fortune/pathnames.h Wed Aug 13 12:36:59 2014 (r269933) +++ stable/9/games/fortune/fortune/pathnames.h Wed Aug 13 12:38:08 2014 (r269934) @@ -30,4 +30,5 @@ * $FreeBSD$ */ -#define FORTDIR "/usr/share/games/fortune" +#define FORTDIR "/usr/share/games/fortune:" \ + "/usr/local/share/games/fortune" From gavin at FreeBSD.org Wed Aug 13 12:41:32 2014 From: gavin at FreeBSD.org (Gavin Atkinson) Date: Wed, 13 Aug 2014 12:41:32 +0000 (UTC) Subject: svn commit: r269935 - stable/10/share/man/man9 Message-ID: <201408131241.s7DCfWiX009449@svn.freebsd.org> Author: gavin Date: Wed Aug 13 12:41:31 2014 New Revision: 269935 URL: http://svnweb.freebsd.org/changeset/base/269935 Log: Merge r268725 from head: Since r202933, kthread_suspend_check() takes no arguments. Update the example to match. Modified: stable/10/share/man/man9/kthread.9 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man9/kthread.9 ============================================================================== --- stable/10/share/man/man9/kthread.9 Wed Aug 13 12:38:08 2014 (r269934) +++ stable/10/share/man/man9/kthread.9 Wed Aug 13 12:41:31 2014 (r269935) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 24, 2010 +.Dd July 15, 2014 .Dt KTHREAD 9 .Os .Sh NAME @@ -275,7 +275,7 @@ buf_daemon() bufdaemonthread, SHUTDOWN_PRI_LAST); ... for (;;) { - kthread_suspend_check(bufdaemonthread); + kthread_suspend_check(); ... } } From gavin at FreeBSD.org Wed Aug 13 12:42:16 2014 From: gavin at FreeBSD.org (Gavin Atkinson) Date: Wed, 13 Aug 2014 12:42:15 +0000 (UTC) Subject: svn commit: r269936 - stable/9/share/man/man9 Message-ID: <201408131242.s7DCgFfB011418@svn.freebsd.org> Author: gavin Date: Wed Aug 13 12:42:15 2014 New Revision: 269936 URL: http://svnweb.freebsd.org/changeset/base/269936 Log: Merge r268725 from head: Since r202933, kthread_suspend_check() takes no arguments. Update the example to match. Modified: stable/9/share/man/man9/kthread.9 Directory Properties: stable/9/share/man/man9/ (props changed) Modified: stable/9/share/man/man9/kthread.9 ============================================================================== --- stable/9/share/man/man9/kthread.9 Wed Aug 13 12:41:31 2014 (r269935) +++ stable/9/share/man/man9/kthread.9 Wed Aug 13 12:42:15 2014 (r269936) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 24, 2010 +.Dd July 15, 2014 .Dt KTHREAD 9 .Os .Sh NAME @@ -275,7 +275,7 @@ buf_daemon() bufdaemonthread, SHUTDOWN_PRI_LAST); ... for (;;) { - kthread_suspend_check(bufdaemonthread); + kthread_suspend_check(); ... } } From gavin at FreeBSD.org Wed Aug 13 12:44:44 2014 From: gavin at FreeBSD.org (Gavin Atkinson) Date: Wed, 13 Aug 2014 12:44:44 +0000 (UTC) Subject: svn commit: r269937 - stable/10/usr.sbin/pkg Message-ID: <201408131244.s7DCiiAG011823@svn.freebsd.org> Author: gavin Date: Wed Aug 13 12:44:44 2014 New Revision: 269937 URL: http://svnweb.freebsd.org/changeset/base/269937 Log: Merge r268728 from head: When we fail to extract the pkg binaries (for example, / is read-only), give a more helpful error message. Modified: stable/10/usr.sbin/pkg/pkg.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pkg/pkg.c ============================================================================== --- stable/10/usr.sbin/pkg/pkg.c Wed Aug 13 12:42:15 2014 (r269936) +++ stable/10/usr.sbin/pkg/pkg.c Wed Aug 13 12:44:44 2014 (r269937) @@ -126,7 +126,8 @@ extract_pkg_static(int fd, char *p, int if (r == ARCHIVE_OK) ret = 0; else - warnx("fail to extract pkg-static"); + warnx("failed to extract pkg-static: %s", + archive_error_string(a)); cleanup: archive_read_free(a); From gavin at FreeBSD.org Wed Aug 13 12:45:26 2014 From: gavin at FreeBSD.org (Gavin Atkinson) Date: Wed, 13 Aug 2014 12:45:26 +0000 (UTC) Subject: svn commit: r269938 - stable/9/usr.sbin/pkg Message-ID: <201408131245.s7DCjQHA012024@svn.freebsd.org> Author: gavin Date: Wed Aug 13 12:45:25 2014 New Revision: 269938 URL: http://svnweb.freebsd.org/changeset/base/269938 Log: Merge r268728 from head: When we fail to extract the pkg binaries (for example, / is read-only), give a more helpful error message. Modified: stable/9/usr.sbin/pkg/pkg.c Directory Properties: stable/9/usr.sbin/pkg/ (props changed) Modified: stable/9/usr.sbin/pkg/pkg.c ============================================================================== --- stable/9/usr.sbin/pkg/pkg.c Wed Aug 13 12:44:44 2014 (r269937) +++ stable/9/usr.sbin/pkg/pkg.c Wed Aug 13 12:45:25 2014 (r269938) @@ -126,7 +126,8 @@ extract_pkg_static(int fd, char *p, int if (r == ARCHIVE_OK) ret = 0; else - warnx("fail to extract pkg-static"); + warnx("failed to extract pkg-static: %s", + archive_error_string(a)); cleanup: archive_read_free(a); From gavin at FreeBSD.org Wed Aug 13 12:47:52 2014 From: gavin at FreeBSD.org (Gavin Atkinson) Date: Wed, 13 Aug 2014 12:47:52 +0000 (UTC) Subject: svn commit: r269939 - stable/10/usr.bin/iscsictl Message-ID: <201408131247.s7DClqGS012531@svn.freebsd.org> Author: gavin Date: Wed Aug 13 12:47:51 2014 New Revision: 269939 URL: http://svnweb.freebsd.org/changeset/base/269939 Log: Merge r268842 from head: Fix two typos in iscsictl.8 PR: 191581 Submitted by: Jimmy Olgeni Modified: stable/10/usr.bin/iscsictl/iscsictl.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/iscsictl/iscsictl.8 ============================================================================== --- stable/10/usr.bin/iscsictl/iscsictl.8 Wed Aug 13 12:45:25 2014 (r269938) +++ stable/10/usr.bin/iscsictl/iscsictl.8 Wed Aug 13 12:47:51 2014 (r269939) @@ -83,7 +83,7 @@ The default is Target host name or address used for SendTargets discovery. When used, it will add a temporary discovery session. After discovery is done, sessions will be added for each discovered target, -and the temporary discovery sesion will be removed. +and the temporary discovery session will be removed. .It Fl n The "nickname" of session defined in the configuration file. .It Fl p @@ -98,7 +98,7 @@ CHAP login. Verbose mode. .El .Pp -Certain parameters are neccessary when adding a session. +Certain parameters are necessary when adding a session. One can specify these either via command line (using the .Fl t , .Fl p , From gavin at FreeBSD.org Wed Aug 13 12:55:45 2014 From: gavin at FreeBSD.org (Gavin Atkinson) Date: Wed, 13 Aug 2014 12:55:44 +0000 (UTC) Subject: svn commit: r269940 - stable/10 Message-ID: <201408131255.s7DCtiUc016904@svn.freebsd.org> Author: gavin Date: Wed Aug 13 12:55:44 2014 New Revision: 269940 URL: http://svnweb.freebsd.org/changeset/base/269940 Log: Merge r267859 (by bapt), r268998 from head: o Mark send-pr info page as an obsolete file o /usr/bin/sendbug and the sendbug(1) man page were part of send-pr and are no longer installed since r267486 (r267734 in stable/10). Add them to ObsoleteFiles.inc1, which should have been done in r267486. PR: 192010 (partial) Submitted by: Vick Khera (partial) Modified: stable/10/ObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Wed Aug 13 12:47:51 2014 (r269939) +++ stable/10/ObsoleteFiles.inc Wed Aug 13 12:55:44 2014 (r269940) @@ -51,7 +51,10 @@ OLD_FILES+=usr/share/examples/cvsup/stab OLD_FILES+=usr/share/examples/cvsup/standard-supfile OLD_DIRS+=usr/share/examples/cvsup # 20140614: send-pr removal +OLD_FILES+=usr/bin/sendbug +OLD_FILES+=usr/share/info/send-pr.info.gz OLD_FILES+=usr/share/man/man1/send-pr.1.gz +OLD_FILES+=usr/share/man/man1/sendbug.1.gz OLD_FILES+=etc/gnats/freefall OLD_DIRS+=etc/gnats # 20140512: new clang import which bumps version from 3.4 to 3.4.1. From gavin at FreeBSD.org Wed Aug 13 12:58:16 2014 From: gavin at FreeBSD.org (Gavin Atkinson) Date: Wed, 13 Aug 2014 12:58:15 +0000 (UTC) Subject: svn commit: r269941 - stable/9 Message-ID: <201408131258.s7DCwFxd017485@svn.freebsd.org> Author: gavin Date: Wed Aug 13 12:58:15 2014 New Revision: 269941 URL: http://svnweb.freebsd.org/changeset/base/269941 Log: Merge r267859 (by bapt), r268998 from head: o Mark send-pr info page as an obsolete file o /usr/bin/sendbug and the sendbug(1) man page were part of send-pr and are no longer installed since r267486 (r267734 in stable/10). Add them to ObsoleteFiles.inc1, which should have been done in r267486. PR: 192010 (partial) Submitted by: Vick Khera (partial) Modified: stable/9/ObsoleteFiles.inc (contents, props changed) Modified: stable/9/ObsoleteFiles.inc ============================================================================== --- stable/9/ObsoleteFiles.inc Wed Aug 13 12:55:44 2014 (r269940) +++ stable/9/ObsoleteFiles.inc Wed Aug 13 12:58:15 2014 (r269941) @@ -43,7 +43,10 @@ OLD_FILES+=usr/share/man/man9/VOP_GETVOB OLD_FILES+=usr/share/man/man9/VOP_CREATEVOBJECT.9.gz OLD_FILES+=usr/share/man/man9/VOP_DESTROYVOBJECT.9.gz # 20140614: send-pr removal +OLD_FILES+=usr/bin/sendbug +OLD_FILES+=usr/share/info/send-pr.info.gz OLD_FILES+=usr/share/man/man1/send-pr.1.gz +OLD_FILES+=usr/share/man/man1/sendbug.1.gz OLD_FILES+=etc/gnats/freefall OLD_DIRS+=etc/gnats # 20140512: new clang import which bumps version from 3.4 to 3.4.1. From ae at FreeBSD.org Wed Aug 13 15:48:10 2014 From: ae at FreeBSD.org (Andrey V. Elsukov) Date: Wed, 13 Aug 2014 15:48:10 +0000 (UTC) Subject: svn commit: r269944 - stable/10/sys/netinet6 Message-ID: <201408131548.s7DFmATv095070@svn.freebsd.org> Author: ae Date: Wed Aug 13 15:48:10 2014 New Revision: 269944 URL: http://svnweb.freebsd.org/changeset/base/269944 Log: MFC r269306: Add new rule to source address selection algorithm. It prefers address with better virtual status. Use ifa_preferred() to choose better address. PR: 187341 Modified: stable/10/sys/netinet6/in6_src.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/in6_src.c ============================================================================== --- stable/10/sys/netinet6/in6_src.c Wed Aug 13 15:29:29 2014 (r269943) +++ stable/10/sys/netinet6/in6_src.c Wed Aug 13 15:48:10 2014 (r269944) @@ -443,6 +443,12 @@ in6_selectsrc(struct sockaddr_in6 *dstso REPLACE(8); /* + * Rule 9: prefer address with better virtual status. + */ + if (ifa_preferred(&ia_best->ia_ifa, &ia->ia_ifa)) + REPLACE(9); + + /* * Rule 14: Use longest matching prefix. * Note: in the address selection draft, this rule is * documented as "Rule 8". However, since it is also From rpaulo at FreeBSD.org Wed Aug 13 16:11:58 2014 From: rpaulo at FreeBSD.org (Rui Paulo) Date: Wed, 13 Aug 2014 16:11:57 +0000 (UTC) Subject: svn commit: r269946 - stable/10/share/mk Message-ID: <201408131611.s7DGBv0P007591@svn.freebsd.org> Author: rpaulo Date: Wed Aug 13 16:11:57 2014 New Revision: 269946 URL: http://svnweb.freebsd.org/changeset/base/269946 Log: MFC r268300 r268541 r268544 r268565 r269775 r269838 r269839 r269840 r269842 r269844 r269899: BSD make support for generating and compiling USDT DTrace probes. Deleted: stable/10/share/mk/bsd.dtrace.mk Modified: stable/10/share/mk/Makefile stable/10/share/mk/bsd.dep.mk stable/10/share/mk/bsd.lib.mk stable/10/share/mk/bsd.prog.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/Makefile ============================================================================== --- stable/10/share/mk/Makefile Wed Aug 13 15:50:16 2014 (r269945) +++ stable/10/share/mk/Makefile Wed Aug 13 16:11:57 2014 (r269946) @@ -11,7 +11,6 @@ FILES= \ bsd.crunchgen.mk \ bsd.dep.mk \ bsd.doc.mk \ - bsd.dtrace.mk \ bsd.endian.mk \ bsd.files.mk \ bsd.incs.mk \ Modified: stable/10/share/mk/bsd.dep.mk ============================================================================== --- stable/10/share/mk/bsd.dep.mk Wed Aug 13 15:50:16 2014 (r269945) +++ stable/10/share/mk/bsd.dep.mk Wed Aug 13 16:11:57 2014 (r269946) @@ -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 @@ -121,14 +121,36 @@ ${_YC:R}.o: ${_YC} .endfor # DTrace probe definitions +# libelf is currently needed for drti.o +.if ${SRCS:M*.d} +LDFLAGS+= -lelf +LDADD+= ${LIBELF} +CFLAGS+= -D_DTRACE_VERSION=1 -I${.OBJDIR} +.endif .for _DSRC in ${SRCS:M*.d:N*/*} -.for _DH in ${_DSRC:R}.h -${_DH}: ${_DSRC} - ${DTRACE} -xnolibs -h -s ${.ALLSRC} -SRCS:= ${SRCS:S/${_DSRC}/${_DH}/} -CLEANFILES+= ${_DH} +.for _D in ${_DSRC:R} +DHDRS+= ${_D}.h +${_D}.h: ${_DSRC} + ${DTRACE} -xnolibs -h -s ${.ALLSRC} +SRCS:= ${SRCS:S/${_DSRC}/${_D}.h/} +OBJS+= ${_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 +beforedepend: ${DHDRS} +beforebuild: ${DHDRS} .endif .if !target(depend) Modified: stable/10/share/mk/bsd.lib.mk ============================================================================== --- stable/10/share/mk/bsd.lib.mk Wed Aug 13 15:50:16 2014 (r269945) +++ stable/10/share/mk/bsd.lib.mk Wed Aug 13 16:11:57 2014 (r269946) @@ -117,7 +117,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: stable/10/share/mk/bsd.prog.mk ============================================================================== --- stable/10/share/mk/bsd.prog.mk Wed Aug 13 15:50:16 2014 (r269945) +++ stable/10/share/mk/bsd.prog.mk Wed Aug 13 16:11:57 2014 (r269946) @@ -146,7 +146,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 gavin at FreeBSD.org Wed Aug 13 22:34:15 2014 From: gavin at FreeBSD.org (Gavin Atkinson) Date: Wed, 13 Aug 2014 22:34:15 +0000 (UTC) Subject: svn commit: r269955 - stable/10 Message-ID: <201408132234.s7DMYFl2083254@svn.freebsd.org> Author: gavin Date: Wed Aug 13 22:34:14 2014 New Revision: 269955 URL: http://svnweb.freebsd.org/changeset/base/269955 Log: Add a header to the entries for the removal of csup example files. This is a direct commit to 10, as the equivelent commit to head included other changes that will not be merged to stable branches. Modified: stable/10/ObsoleteFiles.inc Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Wed Aug 13 21:38:29 2014 (r269954) +++ stable/10/ObsoleteFiles.inc Wed Aug 13 22:34:14 2014 (r269955) @@ -45,6 +45,7 @@ OLD_FILES+=usr/share/examples/libusb20/a OLD_FILES+=usr/share/man/man9/VOP_GETVOBJECT.9.gz OLD_FILES+=usr/share/man/man9/VOP_CREATEVOBJECT.9.gz OLD_FILES+=usr/share/man/man9/VOP_DESTROYVOBJECT.9.gz +# 20140625: csup example files removal OLD_FILES+=usr/share/examples/cvsup/README OLD_FILES+=usr/share/examples/cvsup/cvs-supfile OLD_FILES+=usr/share/examples/cvsup/stable-supfile From roberto at FreeBSD.org Thu Aug 14 12:16:04 2014 From: roberto at FreeBSD.org (Ollivier Robert) Date: Thu, 14 Aug 2014 12:16:04 +0000 (UTC) Subject: svn commit: r269967 - stable/10 Message-ID: <201408141216.s7ECG4Ov062550@svn.freebsd.org> Author: roberto Date: Thu Aug 14 12:16:03 2014 New Revision: 269967 URL: http://svnweb.freebsd.org/changeset/base/269967 Log: MFC r269662: 10 has a new flex (2.5.37) and the config.h for unbound has been updated to take this into account. Alas it breaks source upgrade from any version of 9 because flex is not built as a bootstrap-tools (it would be for older versions). That means "libunbound/configlexer.c" is built with the old flex but using config.h for the new one. Build is thus broken going from 9.* to 10. Make flex a bootstrap-tools entry if host is less than 1000033 to take into account the flex update in 10. Tested on both 9.2-RC3 and 9.3 by myself and dim at . Running buildworld in head but as both 10 and 11 has the new flex, it will not matter. Reviewed by: imp Approved by: des, imp MFC after: 1 week Phabric: D554 Modified: stable/10/Makefile.inc1 Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Thu Aug 14 08:42:16 2014 (r269966) +++ stable/10/Makefile.inc1 Thu Aug 14 12:16:03 2014 (r269967) @@ -1218,10 +1218,6 @@ _mklocale= usr.bin/mklocale _sed= usr.bin/sed .endif -.if ${BOOTSTRAPPING} < 900006 -_lex= usr.bin/lex -.endif - .if ${BOOTSTRAPPING} < 1000002 _m4= usr.bin/m4 .endif @@ -1244,6 +1240,10 @@ _nmtree= lib/libnetbsd \ _cat= bin/cat .endif +.if ${BOOTSTRAPPING} < 1000033 +_lex= usr.bin/lex +.endif + .if ${BOOTSTRAPPING} >= 900040 && ${BOOTSTRAPPING} < 900041 _awk= usr.bin/awk .endif From trasz at FreeBSD.org Thu Aug 14 12:31:19 2014 From: trasz at FreeBSD.org (Edward Tomasz Napierala) Date: Thu, 14 Aug 2014 12:31:19 +0000 (UTC) Subject: svn commit: r269968 - stable/10/usr.bin/iscsictl Message-ID: <201408141231.s7ECVJu7069353@svn.freebsd.org> Author: trasz Date: Thu Aug 14 12:31:18 2014 New Revision: 269968 URL: http://svnweb.freebsd.org/changeset/base/269968 Log: MFC r267614: Add "iscsictl -M", which allows one to change session parameters without removing it and adding back. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.bin/iscsictl/iscsictl.8 stable/10/usr.bin/iscsictl/iscsictl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/iscsictl/iscsictl.8 ============================================================================== --- stable/10/usr.bin/iscsictl/iscsictl.8 Thu Aug 14 12:16:03 2014 (r269967) +++ stable/10/usr.bin/iscsictl/iscsictl.8 Thu Aug 14 12:31:18 2014 (r269968) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 24, 2014 +.Dd June 18, 2014 .Dt ISCSICTL 8 .Os .Sh NAME @@ -47,6 +47,17 @@ .Fl A .Fl n Ar nickname Op Fl c Ar path .Nm +.Fl M +.Fl i Ar session-id +.Op Fl p Ar portal +.Op Fl t Ar target +.Op Fl u Ar user +.Op Fl s Ar secret +.Nm +.Fl M +.Fl i Ar session-id +.Op Fl n Ar nickname Op Fl c Ar path +.Nm .Fl R .Op Fl p Ar portal .Op Fl t Ar target @@ -68,6 +79,8 @@ The following options are available: .Bl -tag -width ".Fl A" .It Fl A Add session. +.It Fl M +Modify session. .It Fl R Remove session. .It Fl L @@ -84,6 +97,10 @@ Target host name or address used for Sen When used, it will add a temporary discovery session. After discovery is done, sessions will be added for each discovered target, and the temporary discovery session will be removed. +.It Fl i +Session ID, as displayed by +.Nm +.Fl v . .It Fl n The "nickname" of session defined in the configuration file. .It Fl p Modified: stable/10/usr.bin/iscsictl/iscsictl.c ============================================================================== --- stable/10/usr.bin/iscsictl/iscsictl.c Thu Aug 14 12:16:03 2014 (r269967) +++ stable/10/usr.bin/iscsictl/iscsictl.c Thu Aug 14 12:31:18 2014 (r269968) @@ -350,6 +350,82 @@ kernel_add(int iscsi_fd, const struct ta } static int +kernel_modify(int iscsi_fd, unsigned int session_id, const struct target *targ) +{ + struct iscsi_session_modify ism; + int error; + + memset(&ism, 0, sizeof(ism)); + ism.ism_session_id = session_id; + conf_from_target(&ism.ism_conf, targ); + error = ioctl(iscsi_fd, ISCSISMODIFY, &ism); + if (error != 0) + warn("ISCSISMODIFY"); + return (error); +} + +static void +kernel_modify_some(int iscsi_fd, unsigned int session_id, const char *target, + const char *target_addr, const char *user, const char *secret) +{ + struct iscsi_session_state *states = NULL; + struct iscsi_session_state *state; + struct iscsi_session_conf *conf; + struct iscsi_session_list isl; + struct iscsi_session_modify ism; + unsigned int i, nentries = 1; + int error; + + for (;;) { + states = realloc(states, + nentries * sizeof(struct iscsi_session_state)); + if (states == NULL) + err(1, "realloc"); + + memset(&isl, 0, sizeof(isl)); + isl.isl_nentries = nentries; + isl.isl_pstates = states; + + error = ioctl(iscsi_fd, ISCSISLIST, &isl); + if (error != 0 && errno == EMSGSIZE) { + nentries *= 4; + continue; + } + break; + } + if (error != 0) + errx(1, "ISCSISLIST"); + + for (i = 0; i < isl.isl_nentries; i++) { + state = &states[i]; + + if (state->iss_id == session_id) + break; + } + if (i == isl.isl_nentries) + errx(1, "session-id %u not found", session_id); + + conf = &state->iss_conf; + + if (target != NULL) + strlcpy(conf->isc_target, target, sizeof(conf->isc_target)); + if (target_addr != NULL) + strlcpy(conf->isc_target_addr, target_addr, + sizeof(conf->isc_target_addr)); + if (user != NULL) + strlcpy(conf->isc_user, user, sizeof(conf->isc_user)); + if (secret != NULL) + strlcpy(conf->isc_secret, secret, sizeof(conf->isc_secret)); + + memset(&ism, 0, sizeof(ism)); + ism.ism_session_id = session_id; + memcpy(&ism.ism_conf, conf, sizeof(ism.ism_conf)); + error = ioctl(iscsi_fd, ISCSISMODIFY, &ism); + if (error != 0) + warn("ISCSISMODIFY"); +} + +static int kernel_remove(int iscsi_fd, const struct target *targ) { struct iscsi_session_remove isr; @@ -404,7 +480,7 @@ kernel_list(int iscsi_fd, const struct t state = &states[i]; conf = &state->iss_conf; - printf("Session ID: %d\n", state->iss_id); + printf("Session ID: %u\n", state->iss_id); printf("Initiator name: %s\n", conf->isc_initiator); printf("Initiator portal: %s\n", conf->isc_initiator_addr); @@ -482,6 +558,10 @@ usage(void) "[-u user -s secret]\n"); fprintf(stderr, " iscsictl -A -a [-c path]\n"); fprintf(stderr, " iscsictl -A -n nickname [-c path]\n"); + fprintf(stderr, " iscsictl -M -i session-id [-p portal] " + "[-t target] [-u user] [-s secret]\n"); + fprintf(stderr, " iscsictl -M -i session-id -n nickname " + "[-c path]\n"); fprintf(stderr, " iscsictl -R [-p portal] [-t target]\n"); fprintf(stderr, " iscsictl -R -a\n"); fprintf(stderr, " iscsictl -R -n nickname [-c path]\n"); @@ -503,20 +583,25 @@ checked_strdup(const char *s) int main(int argc, char **argv) { - int Aflag = 0, Rflag = 0, Lflag = 0, aflag = 0, vflag = 0; + int Aflag = 0, Mflag = 0, Rflag = 0, Lflag = 0, aflag = 0, vflag = 0; const char *conf_path = DEFAULT_CONFIG_PATH; char *nickname = NULL, *discovery_host = NULL, *host = NULL, *target = NULL, *user = NULL, *secret = NULL; + long long session_id = -1; + char *end; int ch, error, iscsi_fd, retval, saved_errno; int failed = 0; struct conf *conf; struct target *targ; - while ((ch = getopt(argc, argv, "ARLac:d:n:p:t:u:s:v")) != -1) { + while ((ch = getopt(argc, argv, "AMRLac:d:i:n:p:t:u:s:v")) != -1) { switch (ch) { case 'A': Aflag = 1; break; + case 'M': + Mflag = 1; + break; case 'R': Rflag = 1; break; @@ -532,6 +617,16 @@ main(int argc, char **argv) case 'd': discovery_host = optarg; break; + case 'i': + session_id = strtol(optarg, &end, 10); + if ((size_t)(end - optarg) != strlen(optarg)) + errx(1, "trailing characters after session-id"); + if (session_id < 0) + errx(1, "session-id cannot be negative"); + if (session_id > UINT_MAX) + errx(1, "session-id cannot be greater than %u", + UINT_MAX); + break; case 'n': nickname = optarg; break; @@ -559,10 +654,10 @@ main(int argc, char **argv) if (argc != 0) usage(); - if (Aflag + Rflag + Lflag == 0) + if (Aflag + Mflag + Rflag + Lflag == 0) Lflag = 1; - if (Aflag + Rflag + Lflag > 1) - errx(1, "at most one of -A, -R, or -L may be specified"); + if (Aflag + Mflag + Rflag + Lflag > 1) + errx(1, "at most one of -A, -M, -R, or -L may be specified"); /* * Note that we ignore unneccessary/inapplicable "-c" flag; so that @@ -614,9 +709,33 @@ main(int argc, char **argv) if (secret != NULL && user == NULL) errx(1, "-s must always be used with -u"); + if (session_id != -1) + errx(1, "-i cannot be used with -A"); if (vflag != 0) errx(1, "-v cannot be used with -A"); + } else if (Mflag != 0) { + if (session_id == -1) + errx(1, "-M requires -i"); + + if (discovery_host != NULL) + errx(1, "-M and -d are mutually exclusive"); + if (aflag != 0) + errx(1, "-M and -a are mutually exclusive"); + if (nickname != NULL) { + if (host != NULL) + errx(1, "-n and -p and mutually exclusive"); + if (target != NULL) + errx(1, "-n and -t and mutually exclusive"); + if (user != NULL) + errx(1, "-n and -u and mutually exclusive"); + if (secret != NULL) + errx(1, "-n and -s and mutually exclusive"); + } + + if (vflag != 0) + errx(1, "-v cannot be used with -M"); + } else if (Rflag != 0) { if (user != NULL) errx(1, "-R and -u are mutually exclusive"); @@ -646,6 +765,8 @@ main(int argc, char **argv) } else errx(1, "must specify either -a, -n, -t, or -p"); + if (session_id != -1) + errx(1, "-i cannot be used with -R"); if (vflag != 0) errx(1, "-v cannot be used with -R"); @@ -664,6 +785,9 @@ main(int argc, char **argv) errx(1, "-L and -n and mutually exclusive"); if (discovery_host != NULL) errx(1, "-L and -d and mutually exclusive"); + + if (session_id != -1) + errx(1, "-i cannot be used with -L"); } iscsi_fd = open(ISCSI_PATH, O_RDWR); @@ -687,15 +811,20 @@ main(int argc, char **argv) conf = conf_new_from_file(conf_path); targ = target_find(conf, nickname); if (targ == NULL) - errx(1, "target %s not found in the configuration file", - nickname); + errx(1, "target %s not found in %s", + nickname, conf_path); if (Aflag != 0) failed += kernel_add(iscsi_fd, targ); + else if (Mflag != 0) + failed += kernel_modify(iscsi_fd, session_id, targ); else if (Rflag != 0) failed += kernel_remove(iscsi_fd, targ); else failed += kernel_list(iscsi_fd, targ, vflag); + } else if (Mflag != 0) { + kernel_modify_some(iscsi_fd, session_id, target, host, + user, secret); } else { if (Aflag != 0 && target != NULL) { if (valid_iscsi_name(target) == false) From trasz at FreeBSD.org Thu Aug 14 12:33:25 2014 From: trasz at FreeBSD.org (Edward Tomasz Napierala) Date: Thu, 14 Aug 2014 12:33:24 +0000 (UTC) Subject: svn commit: r269969 - stable/10/usr.bin/iscsictl Message-ID: <201408141233.s7ECXO4s071691@svn.freebsd.org> Author: trasz Date: Thu Aug 14 12:33:24 2014 New Revision: 269969 URL: http://svnweb.freebsd.org/changeset/base/269969 Log: MFC r267615: Rename a variable; no functional changes. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.bin/iscsictl/iscsictl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/iscsictl/iscsictl.c ============================================================================== --- stable/10/usr.bin/iscsictl/iscsictl.c Thu Aug 14 12:31:18 2014 (r269968) +++ stable/10/usr.bin/iscsictl/iscsictl.c Thu Aug 14 12:33:24 2014 (r269969) @@ -585,7 +585,7 @@ main(int argc, char **argv) { int Aflag = 0, Mflag = 0, Rflag = 0, Lflag = 0, aflag = 0, vflag = 0; const char *conf_path = DEFAULT_CONFIG_PATH; - char *nickname = NULL, *discovery_host = NULL, *host = NULL, + char *nickname = NULL, *discovery_host = NULL, *portal = NULL, *target = NULL, *user = NULL, *secret = NULL; long long session_id = -1; char *end; @@ -631,7 +631,7 @@ main(int argc, char **argv) nickname = optarg; break; case 'p': - host = optarg; + portal = optarg; break; case 't': target = optarg; @@ -666,7 +666,7 @@ main(int argc, char **argv) */ if (Aflag != 0) { if (aflag != 0) { - if (host != NULL) + if (portal != NULL) errx(1, "-a and -p and mutually exclusive"); if (target != NULL) errx(1, "-a and -t and mutually exclusive"); @@ -679,7 +679,7 @@ main(int argc, char **argv) if (discovery_host != NULL) errx(1, "-a and -d and mutually exclusive"); } else if (nickname != NULL) { - if (host != NULL) + if (portal != NULL) errx(1, "-n and -p and mutually exclusive"); if (target != NULL) errx(1, "-n and -t and mutually exclusive"); @@ -690,17 +690,17 @@ main(int argc, char **argv) if (discovery_host != NULL) errx(1, "-n and -d and mutually exclusive"); } else if (discovery_host != NULL) { - if (host != NULL) + if (portal != NULL) errx(1, "-d and -p and mutually exclusive"); if (target != NULL) errx(1, "-d and -t and mutually exclusive"); } else { - if (target == NULL && host == NULL) + if (target == NULL && portal == NULL) errx(1, "must specify -a, -n or -t/-p"); - if (target != NULL && host == NULL) + if (target != NULL && portal == NULL) errx(1, "-t must always be used with -p"); - if (host != NULL && target == NULL) + if (portal != NULL && target == NULL) errx(1, "-p must always be used with -t"); } @@ -723,7 +723,7 @@ main(int argc, char **argv) if (aflag != 0) errx(1, "-M and -a are mutually exclusive"); if (nickname != NULL) { - if (host != NULL) + if (portal != NULL) errx(1, "-n and -p and mutually exclusive"); if (target != NULL) errx(1, "-n and -t and mutually exclusive"); @@ -745,22 +745,22 @@ main(int argc, char **argv) errx(1, "-R and -d are mutually exclusive"); if (aflag != 0) { - if (host != NULL) + if (portal != NULL) errx(1, "-a and -p and mutually exclusive"); if (target != NULL) errx(1, "-a and -t and mutually exclusive"); if (nickname != NULL) errx(1, "-a and -n and mutually exclusive"); } else if (nickname != NULL) { - if (host != NULL) + if (portal != NULL) errx(1, "-n and -p and mutually exclusive"); if (target != NULL) errx(1, "-n and -t and mutually exclusive"); - } else if (host != NULL) { + } else if (portal != NULL) { if (target != NULL) errx(1, "-p and -t and mutually exclusive"); } else if (target != NULL) { - if (host != NULL) + if (portal != NULL) errx(1, "-t and -p and mutually exclusive"); } else errx(1, "must specify either -a, -n, -t, or -p"); @@ -773,7 +773,7 @@ main(int argc, char **argv) } else { assert(Lflag != 0); - if (host != NULL) + if (portal != NULL) errx(1, "-L and -p and mutually exclusive"); if (target != NULL) errx(1, "-L and -t and mutually exclusive"); @@ -823,7 +823,7 @@ main(int argc, char **argv) else failed += kernel_list(iscsi_fd, targ, vflag); } else if (Mflag != 0) { - kernel_modify_some(iscsi_fd, session_id, target, host, + kernel_modify_some(iscsi_fd, session_id, target, portal, user, secret); } else { if (Aflag != 0 && target != NULL) { @@ -841,7 +841,7 @@ main(int argc, char **argv) targ->t_address = discovery_host; } else { targ->t_session_type = SESSION_TYPE_NORMAL; - targ->t_address = host; + targ->t_address = portal; } targ->t_user = user; targ->t_secret = secret; From gavin at FreeBSD.org Thu Aug 14 12:50:26 2014 From: gavin at FreeBSD.org (Gavin Atkinson) Date: Thu, 14 Aug 2014 12:50:26 +0000 (UTC) Subject: svn commit: r269970 - stable/10/usr.sbin/jail Message-ID: <201408141250.s7ECoQ2i077955@svn.freebsd.org> Author: gavin Date: Thu Aug 14 12:50:25 2014 New Revision: 269970 URL: http://svnweb.freebsd.org/changeset/base/269970 Log: Merge r266206 from head (by bjk): Review pass through jail.8 Replace usage of "prison" with "jail", since that term has mostly dropped out of use. Note once at the beginning that the "prison" term is equivalent, but do not use it otherwise. [1] Some grammar issues. Some mdoc formatting fixes. Consistently use \(em for em dashes, with spaces around it. Avoid contractions. Prefer ssh to telnet. PR: 176832 [1] Modified: stable/10/usr.sbin/jail/jail.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/jail/jail.8 ============================================================================== --- stable/10/usr.sbin/jail/jail.8 Thu Aug 14 12:33:24 2014 (r269969) +++ stable/10/usr.sbin/jail/jail.8 Thu Aug 14 12:50:25 2014 (r269970) @@ -63,7 +63,9 @@ The .Nm utility creates new jails, or modifies or removes existing jails. -A jail is specified via parameters on the command line, or in the +A jail +.Pq or Dq prison +is specified via parameters on the command line, or in the .Xr jail.conf 5 file. .Pp @@ -73,7 +75,7 @@ At least one of the options or .Fl r must be specified. -These options are used alone or in combination describe the operation to +These options are used alone or in combination to describe the operation to perform: .Bl -tag -width indent .It Fl c @@ -82,8 +84,7 @@ The jail .Va jid and .Va name -parameters (if specified) on the command line, -or any jails +parameters (if specified on the command line) must not refer to an existing jail. .It Fl m Modify an existing jail. @@ -97,14 +98,15 @@ Some parameters may not be changed on a Remove the .Ar jail specified by jid or name. -All jailed processes are killed, and all children of this jail are also +All jailed processes are killed, and all jails that are +children of this jail are also removed. .It Fl rc Restart an existing jail. The jail is first removed and then re-created, as if -.Dq Nm Fl c -and .Dq Nm Fl r +and +.Dq Nm Fl c were run in succession. .It Fl cm Create a jail if it does not exist, or modify the jail if it does exist. @@ -134,7 +136,7 @@ Resolve the parameter (or .Va hostname ) and add all IP addresses returned by the resolver -to the list of addresses for this prison. +to the list of addresses for this jail. This is equivalent to the .Va ip_hostname parameter. @@ -146,7 +148,7 @@ option. .It Fl J Ar jid_file Write a .Ar jid_file -file, containing parameters used to start the jail. +file, containing the parameters used to start the jail. .It Fl l Run commands in a clean environment. This is deprecated and is equivalent to the exec.clean parameter. @@ -166,7 +168,7 @@ Only error messages will be printed. A variation of the .Fl r option that removes an existing jail without using the configuration file. -No removal-related parameters for this jail will be used - the jail will +No removal-related parameters for this jail will be used \(em the jail will simply be removed. .It Fl s Ar securelevel Set the @@ -183,7 +185,7 @@ and .Va exec.system_jail_user parameters. .It Fl U Ar username -The user name from jailed environment as whom jailed commands should run. +The user name from the jailed environment as whom jailed commands should run. This is deprecated and is equivalent to the .Va exec.jail_user parameter. @@ -237,13 +239,12 @@ This mode will always create a new jail, .Fl c and .Fl m -options don't apply (and must not exist). +options do not apply (and must not be present). .Ss Jail Parameters Parameters in the .Xr jail.conf 5 -file, or on the command line, are generally in -.Dq name=value -form. +file, or on the command line, are generally of the form +.Dq name=value . Some parameters are boolean, and do not have a value but are set by the name alone with or without a .Dq no @@ -264,9 +265,10 @@ for details). .Pp The .Nm -utility recognizes two classes of parameters. There are the true jail +utility recognizes two classes of parameters. +There are the true jail parameters that are passed to the kernel when the jail is created, -can be seen with +which can be seen with .Xr jls 8 , and can (usually) be changed with .Dq Nm Fl m . @@ -314,26 +316,26 @@ parameter is implied by the file format, and need not be explicitly set when using the configuration file. .It Va path -The directory which is to be the root of the prison. -Any commands run inside the prison, either by +The directory which is to be the root of the jail. +Any commands run inside the jail, either by .Nm or from .Xr jexec 8 , are run from this directory. .It Va ip4.addr -A list of IPv4 addresses assigned to the prison. +A list of IPv4 addresses assigned to the jail. If this is set, the jail is restricted to using only these addresses. Any attempts to use other addresses fail, and attempts to use wildcard addresses silently use the jailed address instead. -For IPv4 the first address given will be kept used as the source address -in case source address selection on unbound sockets cannot find a better +For IPv4 the first address given will be used as the source address +when source address selection on unbound sockets cannot find a better match. -It is only possible to start multiple jails with the same IP address, +It is only possible to start multiple jails with the same IP address if none of the jails has more than this single overlapping IP address assigned to itself. .It Va ip4.saddrsel A boolean option to change the formerly mentioned behaviour and disable -IPv4 source address selection for the prison in favour of the primary +IPv4 source address selection for the jail in favour of the primary IPv4 address of the jail. Source address selection is enabled by default for all jails and the .Va ip4.nosaddrsel @@ -345,8 +347,8 @@ Possible values are to allow unrestricted access to all system addresses, .Dq new to restrict addresses via -.Va ip4.addr -above, and +.Va ip4.addr , +and .Dq disable to stop the jail from using IPv4 entirely. Setting the @@ -354,14 +356,14 @@ Setting the parameter implies a value of .Dq new . .It Va ip6.addr , Va ip6.saddrsel , Va ip6 -A set of IPv6 options for the prison, the counterparts to +A set of IPv6 options for the jail, the counterparts to .Va ip4.addr , .Va ip4.saddrsel and .Va ip4 above. .It vnet -Create the prison with its own virtual network stack, +Create the jail with its own virtual network stack, with its own network interfaces, addresses, routing table, etc. The kernel must have been compiled with the .Sy VIMAGE option @@ -373,7 +375,7 @@ and .Dq new to create a new network stack. .It Va host.hostname -The hostname of the prison. +The hostname of the jail. Other similar parameters are .Va host.domainname , .Va host.hostuuid @@ -392,7 +394,7 @@ Setting any of the above fields implies The value of the jail's .Va kern.securelevel sysctl. -A jail never has a lower securelevel than the default system, but by +A jail never has a lower securelevel than its parent system, but by setting this parameter it may have a higher one. If the system securelevel is changed, any jail securelevels will be at least as secure. @@ -432,12 +434,12 @@ section for more information. The number of descendants of this jail, including its own child jails and any jails created under them. .It Va enforce_statfs -This determines which information processes in a jail are able to get +This determines what information processes in a jail are able to get about mount points. It affects the behaviour of the following syscalls: .Xr statfs 2 , .Xr fstatfs 2 , -.Xr getfsstat 2 +.Xr getfsstat 2 , and .Xr fhstatfs 2 (as well as similar compatibility syscalls). @@ -488,12 +490,12 @@ namespace across the host and jail envir within a jail would be able to communicate with (and potentially interfere with) processes outside of the jail, and in other jails. .It Va allow.raw_sockets -The prison root is allowed to create raw sockets. +The jail root is allowed to create raw sockets. Setting this parameter allows utilities like .Xr ping 8 and .Xr traceroute 8 -to operate inside the prison. +to operate inside the jail. If this is set, the source IP addresses are enforced to comply with the IP address bound to the jail, regardless of whether or not the @@ -523,10 +525,10 @@ privileged users inside the jail will be devfs file system. This permission is effective only together with .Va allow.mount -and if +and only when .Va enforce_statfs is set to a value lower than 2. -Please consider restricting the devfs ruleset with the +The devfs ruleset should be restricted from the default by using the .Va devfs_ruleset option. .It Va allow.mount.nullfs @@ -534,7 +536,7 @@ privileged users inside the jail will be nullfs file system. This permission is effective only together with .Va allow.mount -and if +and only when .Va enforce_statfs is set to a value lower than 2. .It Va allow.mount.procfs @@ -542,7 +544,7 @@ privileged users inside the jail will be procfs file system. This permission is effective only together with .Va allow.mount -and if +and only when .Va enforce_statfs is set to a value lower than 2. .It Va allow.mount.tmpfs @@ -550,7 +552,7 @@ privileged users inside the jail will be tmpfs file system. This permission is effective only together with .Va allow.mount -and if +and only when .Va enforce_statfs is set to a value lower than 2. .It Va allow.mount.zfs @@ -558,7 +560,7 @@ privileged users inside the jail will be ZFS file system. This permission is effective only together with .Va allow.mount -and if +and only when .Va enforce_statfs is set to a value lower than 2. See @@ -566,7 +568,7 @@ See for information on how to configure the ZFS filesystem to operate from within a jail. .It Va allow.quotas -The prison root may administer quotas on the jail's filesystem(s). +The jail root may administer quotas on the jail's filesystem(s). This includes filesystems that the jail may share with other jails or with non-jailed parts of the system. .It Va allow.socket_af @@ -576,33 +578,33 @@ have not had jail functionality added to .El .El .Pp -There are pseudo-parameters that aren't passed to the kernel, but are +There are pseudo-parameters that are not passed to the kernel, but are used by .Nm -to set up the prison environment, often by running specified commands +to set up the jail environment, often by running specified commands when jails are created or removed. The .Va exec.* command parameters are .Xr sh 1 -command lines that are run in either the system or prison environment. +command lines that are run in either the system or jail environment. They may be given multiple values, which run would the specified commands in sequence. All commands must succeed (return a zero exit status), or the jail will -not be created or removed. +not be created or removed, as appropriate. .Pp The pseudo-parameters are: .Bl -tag -width indent .It Va exec.prestart -Command(s) to run in the system environment before a prison is created. +Command(s) to run in the system environment before a jail is created. .It Va exec.start -Command(s) to run in the prison environment when a jail is created. +Command(s) to run in the jail environment when a jail is created. A typical command to run is .Dq sh /etc/rc . .It Va command A synonym for .Va exec.start -for use when specifying a prison directly on the command line. +for use when specifying a jail directly on the command line. Unlike other parameters whose value is a single string, .Va command uses the remainder of the @@ -616,7 +618,7 @@ commands have completed. .It Va exec.prestop Command(s) to run in the system environment before a jail is removed. .It Va exec.stop -Command(s) to run in the prison environment before a jail is removed, +Command(s) to run in the jail environment before a jail is removed, and after any .Va exec.prestop commands have completed. @@ -641,14 +643,14 @@ is imported from the current environment The environment variables from the login class capability database for the target login are also set. .It Va exec.jail_user -The user to run commands as, when running in the prison environment. +The user to run commands as, when running in the jail environment. The default is to run the commands as the current user. .It Va exec.system_jail_user This boolean option looks for the .Va exec.jail_user in the system .Xr passwd 5 -file, instead of in the prison's file. +file, instead of in the jail's file. .It Va exec.system_user The user to run commands as, when running in the system environment. The default is to run the commands as the current user. @@ -656,35 +658,35 @@ The default is to run the commands as th The maximum amount of time to wait for a command to complete, in seconds. If a command is still running after this timeout has passed, -the jail not be created or removed. +the jail will not be created or removed, as appropriate. .It Va exec.consolelog A file to direct command output (stdout and stderr) to. .It Va exec.fib -The FIB (routing table) to set when running commands inside the prison. +The FIB (routing table) to set when running commands inside the jail. .It Va stop.timeout -The maximum amount of time to wait for a prison's processes to exit +The maximum amount of time to wait for a jail's processes to exit after sending them a .Dv SIGTERM signal (which happens after the .Va exec.stop commands have completed). -After this many seconds have passed, the prison will be removed, which +After this many seconds have passed, the jail will be removed, which will kill any remaining processes. If this is set to zero, no .Dv SIGTERM -is sent and the prison is immediately removed. +is sent and the jail is immediately removed. The default is 10 seconds. .It Va interface -A network interface to add the prison's IP addresses +A network interface to add the jail's IP addresses .Va ( ip4.addr and .Va ip6.addr ) to. An alias for each address will be added to the interface before the -prison is created, and will be removed from the interface after the -prison is removed. +jail is created, and will be removed from the interface after the +jail is removed. .It Va ip4.addr -In addition to the IP addresses that are passed to the kernel, and +In addition to the IP addresses that are passed to the kernel, an interface, netmask and additional paramters (as supported by .Xr ifconfig 8 Ns ) may also be specified, in the form @@ -692,8 +694,9 @@ may also be specified, in the form If an interface is given before the IP address, an alias for the address will be added to that interface, as it is with the .Va interface -parameter. If a netmask in either dotted-quad or CIDR form is given -after IP address, it will be used when adding the IP alias. +parameter. +If a netmask in either dotted-quad or CIDR form is given +after an IP address, it will be used when adding the IP alias. If additional parameters are specified then they will also be used when adding the IP alias. .It Va ip6.addr @@ -704,20 +707,20 @@ may also be specified, in the form .Dq Ar interface Ns | Ns Ar ip-address Ns / Ns Ar prefix param ... . .It Va vnet.interface A network interface to give to a vnet-enabled jail after is it created. -The interface will automatically be returned when the jail is removed. +The interface will automatically be released when the jail is removed. .It Va ip_hostname Resolve the .Va host.hostname parameter and add all IP addresses returned by the resolver to the list of addresses -.Va ( ip4.addr +.Po Va ip4.addr or -.Va ip6.addr ) -for this prison. +.Va ip6.addr Pc +for this jail. This may affect default address selection for outgoing IPv4 connections -of prisons. +from jails. The address first returned by the resolver for each address family -will be used as primary address. +will be used as the primary address. .It Va mount A filesystem to mount before creating the jail (and to unmount after removing it), given as a single @@ -735,7 +738,7 @@ filesystem on the chrooted directory, and apply the ruleset in the .Va devfs_ruleset parameter (or a default of ruleset 4: devfsrules_jail) -to restrict the devices visible inside the prison. +to restrict the devices visible inside the jail. .It Va mount.fdescfs Mount a .Xr fdescfs 5 @@ -768,11 +771,11 @@ is required, so as to provide the necessary command line tools, daemons, libraries, application configuration files, etc. However, for a virtual server configuration, a fair amount of -additional work is required so as to configure the +additional work is required so as to replace the .Dq boot process. This manual page documents the configuration steps necessary to support -either of these steps, although the configuration steps may be +either of these steps, although the configuration steps may need to be refined based on local requirements. .Ss "Setting up a Jail Directory Tree" To set up a jail directory tree containing an entire @@ -792,7 +795,7 @@ In many cases this example would put far In the other extreme case a jail might contain only one file: the executable to be run in the jail. .Pp -We recommend experimentation and caution that it is a lot easier to +We recommend experimentation, and caution that it is a lot easier to start with a .Dq fat jail and remove things until it stops working, @@ -811,13 +814,13 @@ for a jail named Substitute below as needed with your own directory, IP address, and hostname. .Ss "Setting up the Host Environment" -First, you will want to set up your real system's environment to be +First, set up the real system's environment to be .Dq jail-friendly . For consistency, we will refer to the parent box as the .Dq "host environment" , and to the jailed virtual machine as the .Dq "jail environment" . -Since jail is implemented using IP aliases, one of the first things to do +Since jails are implemented using IP aliases, one of the first things to do is to disable IP services on the host system that listen on all local IP addresses for a service. If a network service is present in the host environment that binds all @@ -840,13 +843,12 @@ rpcbind_enable="NO" is the native IP address for the host system, in this example. Daemons that run out of .Xr inetd 8 -can be easily set to use only the specified host IP address. +can be easily configured to use only the specified host IP address. Other daemons -will need to be manually configured\(emfor some this is possible through -the +will need to be manually configured \(em for some this is possible through .Xr rc.conf 5 flags entries; for others it is necessary to modify per-application -configuration files, or to recompile the applications. +configuration files, or to recompile the application. The following frequently deployed services must have their individual configuration files modified to limit the application to listening to a specific IP address: @@ -884,7 +886,7 @@ easily reconfigured to use only specific hosted directly from the kernel. Any third-party network software running in the host environment should also be checked and configured so that it -does not bind all IP addresses, which would result in those services' also +does not bind all IP addresses, which would result in those services also appearing to be offered by the jail environments. .Pp Once @@ -897,7 +899,7 @@ etc.). Start any jail for the first time without configuring the network interface so that you can clean it up a little and set up accounts. As -with any machine (virtual or not) you will need to set a root password, time +with any machine (virtual or not), you will need to set a root password, time zone, etc. Some of these steps apply only if you intend to run a full virtual server inside the jail; others apply both for constraining a particular application @@ -921,7 +923,7 @@ etc. .It Configure .Pa /etc/resolv.conf -so that name resolution within the jail will work correctly +so that name resolution within the jail will work correctly. .It Run .Xr newaliases 1 @@ -929,13 +931,13 @@ to quell .Xr sendmail 8 warnings. .It -Set a root password, probably different from the real host system +Set a root password, probably different from the real host system. .It -Set the timezone +Set the timezone. .It -Add accounts for users in the jail environment +Add accounts for users in the jail environment. .It -Install any packages the environment requires +Install any packages the environment requires. .El .Pp You may also want to perform any package-specific configuration (web servers, @@ -995,11 +997,12 @@ and other processes running within the j with the .Ql J flag appearing beside jailed processes. -To see an active list of jails, use the -.Xr jls 8 -utility. -You should also be able to -.Xr telnet 1 +To see an active list of jails, use +.Xr jls 8 . +If +.Xr sshd 8 +is enabled in the jail environment, you should be able to +.Xr ssh 1 to the hostname or IP address of the jailed environment, and log in using the accounts you created previously. .Pp @@ -1027,7 +1030,7 @@ This will send the .Dv SIGTERM or .Dv SIGKILL -signals to all processes in the jail - be careful not to run this from +signals to all processes in the jail \(em be careful not to run this from the host environment! Once all of the jail's processes have died, unless the jail was created with the @@ -1082,18 +1085,18 @@ or any file system inside a jail unless the file system is marked jail-friendly, the jail's .Va allow.mount -parameter is set and the jail's +parameter is set, and the jail's .Va enforce_statfs parameter is lower than 2. .Pp Multiple jails sharing the same file system can influence each other. -For example a user in one jail can fill the file system also +For example, a user in one jail can fill the file system, leaving no space for processes in the other jail. Trying to use .Xr quota 1 -to prevent this will not work either as the file system quotas +to prevent this will not work either, as the file system quotas are not aware of jails but only look at the user and group IDs. -This means the same user ID in two jails share the same file +This means the same user ID in two jails share a single file system quota. One would need to use one file system per jail to make this work. .Ss "Sysctl MIB Entries" @@ -1104,11 +1107,11 @@ is one) or not (value is zero). .Pp The variable .Va security.jail.max_af_ips -determines how may address per address family a prison may have. +determines how may address per address family a jail may have. The default is 255. .Pp Some MIB variables have per-jail settings. -Changes to these variables by a jailed process do not effect the host +Changes to these variables by a jailed process do not affect the host environment, only the jail environment. These variables are .Va kern.securelevel , @@ -1133,7 +1136,7 @@ of 0 indicates the jail is a child of th jail if the current process isn't jailed). .Pp Jailed processes are not allowed to confer greater permissions than they -themselves are given, e.g. if a jail is created with +themselves are given, e.g., if a jail is created with .Va allow.nomount , it is not able to create a jail with .Va allow.mount From smh at FreeBSD.org Thu Aug 14 14:07:05 2014 From: smh at FreeBSD.org (Steven Hartland) Date: Thu, 14 Aug 2014 14:07:05 +0000 (UTC) Subject: svn commit: r269975 - in stable/10: . sys/dev/ixgbe Message-ID: <201408141407.s7EE75lC013864@svn.freebsd.org> Author: smh Date: Thu Aug 14 14:07:05 2014 New Revision: 269975 URL: http://svnweb.freebsd.org/changeset/base/269975 Log: Make the ixgbe tunables now match their sysctl counterparts. Previously the tunables and sysctls had different names for example: hw.ixgbe.enable_aim => hw.ix.enable_aim Anyone using ixgbe tunables should ensure they update /boot/loader.conf. This is a direct commit to stable as the changes to sysctls in head already fix this issue in a different way. Sponsored by: Multiplay Modified: stable/10/UPDATING stable/10/sys/dev/ixgbe/ixgbe.c Modified: stable/10/UPDATING ============================================================================== --- stable/10/UPDATING Thu Aug 14 13:57:17 2014 (r269974) +++ stable/10/UPDATING Thu Aug 14 14:07:05 2014 (r269975) @@ -16,6 +16,11 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20140814: + The ixgbe tunables now match their sysctl counterparts, for example: + hw.ixgbe.enable_aim => hw.ix.enable_aim + Anyone using ixgbe tunables should ensure they update /boot/loader.conf. + 20140801: The NFSv4.1 server committed by r269398 changes the internal function call interfaces used between the NFS and krpc modules. Modified: stable/10/sys/dev/ixgbe/ixgbe.c ============================================================================== --- stable/10/sys/dev/ixgbe/ixgbe.c Thu Aug 14 13:57:17 2014 (r269974) +++ stable/10/sys/dev/ixgbe/ixgbe.c Thu Aug 14 14:07:05 2014 (r269975) @@ -244,18 +244,18 @@ static SYSCTL_NODE(_hw, OID_AUTO, ix, CT ** traffic for that interrupt vector */ static int ixgbe_enable_aim = TRUE; -TUNABLE_INT("hw.ixgbe.enable_aim", &ixgbe_enable_aim); +TUNABLE_INT("hw.ix.enable_aim", &ixgbe_enable_aim); SYSCTL_INT(_hw_ix, OID_AUTO, enable_aim, CTLFLAG_RW, &ixgbe_enable_aim, 0, "Enable adaptive interrupt moderation"); static int ixgbe_max_interrupt_rate = (4000000 / IXGBE_LOW_LATENCY); -TUNABLE_INT("hw.ixgbe.max_interrupt_rate", &ixgbe_max_interrupt_rate); +TUNABLE_INT("hw.ix.max_interrupt_rate", &ixgbe_max_interrupt_rate); SYSCTL_INT(_hw_ix, OID_AUTO, max_interrupt_rate, CTLFLAG_RDTUN, &ixgbe_max_interrupt_rate, 0, "Maximum interrupts per second"); /* How many packets rxeof tries to clean at a time */ static int ixgbe_rx_process_limit = 256; -TUNABLE_INT("hw.ixgbe.rx_process_limit", &ixgbe_rx_process_limit); +TUNABLE_INT("hw.ix.rx_process_limit", &ixgbe_rx_process_limit); SYSCTL_INT(_hw_ix, OID_AUTO, rx_process_limit, CTLFLAG_RDTUN, &ixgbe_rx_process_limit, 0, "Maximum number of received packets to process at a time," @@ -263,7 +263,7 @@ SYSCTL_INT(_hw_ix, OID_AUTO, rx_process_ /* How many packets txeof tries to clean at a time */ static int ixgbe_tx_process_limit = 256; -TUNABLE_INT("hw.ixgbe.tx_process_limit", &ixgbe_tx_process_limit); +TUNABLE_INT("hw.ix.tx_process_limit", &ixgbe_tx_process_limit); SYSCTL_INT(_hw_ix, OID_AUTO, tx_process_limit, CTLFLAG_RDTUN, &ixgbe_tx_process_limit, 0, "Maximum number of sent packets to process at a time," @@ -283,7 +283,7 @@ static int ixgbe_smart_speed = ixgbe_sma * but this allows it to be forced off for testing. */ static int ixgbe_enable_msix = 1; -TUNABLE_INT("hw.ixgbe.enable_msix", &ixgbe_enable_msix); +TUNABLE_INT("hw.ix.enable_msix", &ixgbe_enable_msix); SYSCTL_INT(_hw_ix, OID_AUTO, enable_msix, CTLFLAG_RDTUN, &ixgbe_enable_msix, 0, "Enable MSI-X interrupts"); @@ -294,7 +294,7 @@ SYSCTL_INT(_hw_ix, OID_AUTO, enable_msix * can be overriden manually here. */ static int ixgbe_num_queues = 0; -TUNABLE_INT("hw.ixgbe.num_queues", &ixgbe_num_queues); +TUNABLE_INT("hw.ix.num_queues", &ixgbe_num_queues); SYSCTL_INT(_hw_ix, OID_AUTO, num_queues, CTLFLAG_RDTUN, &ixgbe_num_queues, 0, "Number of queues to configure, 0 indicates autoconfigure"); @@ -304,13 +304,13 @@ SYSCTL_INT(_hw_ix, OID_AUTO, num_queues, ** the better performing choice. */ static int ixgbe_txd = PERFORM_TXD; -TUNABLE_INT("hw.ixgbe.txd", &ixgbe_txd); +TUNABLE_INT("hw.ix.txd", &ixgbe_txd); SYSCTL_INT(_hw_ix, OID_AUTO, txd, CTLFLAG_RDTUN, &ixgbe_txd, 0, "Number of transmit descriptors per queue"); /* Number of RX descriptors per ring */ static int ixgbe_rxd = PERFORM_RXD; -TUNABLE_INT("hw.ixgbe.rxd", &ixgbe_rxd); +TUNABLE_INT("hw.ix.rxd", &ixgbe_rxd); SYSCTL_INT(_hw_ix, OID_AUTO, rxd, CTLFLAG_RDTUN, &ixgbe_rxd, 0, "Number of receive descriptors per queue"); @@ -320,7 +320,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 jhb at freebsd.org Thu Aug 14 16:07:15 2014 From: jhb at freebsd.org (John Baldwin) Date: Thu, 14 Aug 2014 11:14:37 -0400 Subject: svn commit: r269847 - in stable/10: contrib/apr contrib/apr/docs contrib/apr/encoding contrib/apr/file_io/unix contrib/apr/include contrib/apr/include/arch/unix contrib/apr/include/private contrib/... In-Reply-To: <5874043.odmAkWF3cI@overcee.wemm.org> References: <53e9707c.2d6c.2d976b@svn.freebsd.org> <201408121119.32037.jhb@freebsd.org> <5874043.odmAkWF3cI@overcee.wemm.org> Message-ID: <201408141114.37992.jhb@freebsd.org> On Tuesday, August 12, 2014 4:23:16 pm Peter Wemm wrote: > On Tuesday 12 August 2014 11:19:31 John Baldwin wrote: > > On Monday, August 11, 2014 9:40:12 pm Peter Wemm wrote: > > > Author: peter > > > Date: Tue Aug 12 01:40:11 2014 > > > New Revision: 269847 > > > URL: http://svnweb.freebsd.org/changeset/base/269847 > > > > > > Log: > > > MFC r266728,266731,266735,266736,268135,268960,269833 > > > > > > Update apr 1.4.8 -> 1.5.1 > > > Update apr-util 1.5.2 -> 1.5.3 > > > Update serf 1.3.4 -> 1.3.7 > > > Update svnlite 1.8.8 -> 1.8.10 > > > Deal with svnlite.1 manpage. > > > > Isn't this merge a little quick? 1.8.10 only went into head about 6 hours > > before this commit. The 1.8.8 merge to 10 was also rather quick (less than > > an hour after it was merged to HEAD). If the security issues noted in the > > commit for HEAD are severe enough to warrant an immediate merge, then there > > should probably be an advisory. Otherwise, I think svn updates should > > probably have some bake time in HEAD before going to stable. > > The jumbo-MFC was mostly to gather up the updates that have been baking in > head for a while. 10.1 is coming up soon. > > It just seemed silly to MFC everything except a specific, targeted security fix. > I suspect that for every question I got about including the security update, > I'd have received 5 times as many asking why I hadn't included it. Surely the MFC could have waited 3 days or so though? We generally default to having some sort of bake-in period for MFCs and only bypassing that if there is an urgent need (such as an SA). The code flush for 10.1 is still a week away. -- John Baldwin From markj at FreeBSD.org Thu Aug 14 16:45:02 2014 From: markj at FreeBSD.org (Mark Johnston) Date: Thu, 14 Aug 2014 16:45:01 +0000 (UTC) Subject: svn commit: r269986 - stable/10/cddl/contrib/opensolaris/lib/libdtrace/common Message-ID: <201408141645.s7EGj1Ef086626@svn.freebsd.org> Author: markj Date: Thu Aug 14 16:45:01 2014 New Revision: 269986 URL: http://svnweb.freebsd.org/changeset/base/269986 Log: MFC r257877: Don't try to use the 32-bit drti.o unless the data model is explicitly set to ILP32. Otherwise dtrace -G will attempt to use it on amd64 if it can't determine which data model to use, which happens when -64 is omitted and no object files are provided, e.g. with # dtrace -G -n BEGIN This would result in a linker error, but now works properly. Also remove an unnecessary #ifdef. Modified: stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Thu Aug 14 16:25:43 2014 (r269985) +++ stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Thu Aug 14 16:45:01 2014 (r269986) @@ -1871,7 +1871,7 @@ dtrace_program_link(dtrace_hdl_t *dtp, d * Arches which default to 64-bit need to explicitly use * the 32-bit library path. */ - int use_32 = !(dtp->dt_oflags & DTRACE_O_LP64); + int use_32 = (dtp->dt_oflags & DTRACE_O_ILP32); #else /* * Arches which are 32-bit only just use the normal @@ -1886,9 +1886,7 @@ dtrace_program_link(dtrace_hdl_t *dtp, d len = snprintf(&tmp, 1, fmt, dtp->dt_ld_path, file, tfile, drti) + 1; -#if !defined(sun) len *= 2; -#endif cmd = alloca(len); (void) snprintf(cmd, len, fmt, dtp->dt_ld_path, file, From markj at FreeBSD.org Thu Aug 14 16:45:03 2014 From: markj at FreeBSD.org (Mark Johnston) Date: Thu, 14 Aug 2014 16:45:02 +0000 (UTC) Subject: svn commit: r269987 - stable/9/cddl/contrib/opensolaris/lib/libdtrace/common Message-ID: <201408141645.s7EGj2GF086670@svn.freebsd.org> Author: markj Date: Thu Aug 14 16:45:02 2014 New Revision: 269987 URL: http://svnweb.freebsd.org/changeset/base/269987 Log: MFC r257877: Don't try to use the 32-bit drti.o unless the data model is explicitly set to ILP32. Otherwise dtrace -G will attempt to use it on amd64 if it can't determine which data model to use, which happens when -64 is omitted and no object files are provided, e.g. with # dtrace -G -n BEGIN This would result in a linker error, but now works properly. Also remove an unnecessary #ifdef. Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Thu Aug 14 16:45:01 2014 (r269986) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Thu Aug 14 16:45:02 2014 (r269987) @@ -1790,7 +1790,7 @@ dtrace_program_link(dtrace_hdl_t *dtp, d * Arches which default to 64-bit need to explicitly use * the 32-bit library path. */ - int use_32 = !(dtp->dt_oflags & DTRACE_O_LP64); + int use_32 = (dtp->dt_oflags & DTRACE_O_ILP32); #else /* * Arches which are 32-bit only just use the normal @@ -1805,9 +1805,7 @@ dtrace_program_link(dtrace_hdl_t *dtp, d len = snprintf(&tmp, 1, fmt, dtp->dt_ld_path, file, tfile, drti) + 1; -#if !defined(sun) len *= 2; -#endif cmd = alloca(len); (void) snprintf(cmd, len, fmt, dtp->dt_ld_path, file, From jhb at FreeBSD.org Thu Aug 14 22:01:28 2014 From: jhb at FreeBSD.org (John Baldwin) Date: Thu, 14 Aug 2014 20:20:22 +0000 (UTC) Subject: svn commit: r270002 - in stable/10: include lib/libc/gen Message-ID: <201408142020.s7EKKMP5085498@svn.freebsd.org> Author: jhb Date: Thu Aug 14 20:20:21 2014 New Revision: 270002 URL: http://svnweb.freebsd.org/changeset/base/270002 Log: MFC 268531,269079,269204: Fix various edge cases with rewinddir(), seekdir(), and telldir(): - In the unionfs case, opendir() and fdopendir() read the directory's full contents and cache it. This cache is not refreshed when rewinddir() is called, so rewinddir() will not notice updates to a directory. Fix this by splitting the code to fetch a directory's contents out of __opendir_common() into a new _filldir() function and call this from rewinddir() when operating on a unionfs directory. - If rewinddir() is called on a directory opened with fdopendir() before any directory entries are fetched, rewinddir() will not adjust the seek location of the backing file descriptor. If the file descriptor passed to fdopendir() had a non-zero offset, the rewinddir() will not rewind to the beginning. Fix this by always seeking back to 0 in rewinddir(). This means the dd_rewind hack can also be removed. - Add missing locking to rewinddir() - POSIX says that passing a location returned by telldir() to seekdir() after an intervening call to rewinddir() is undefined, so reclaim any pending telldir() cookies in the directory when rewinddir() is called. - If telldir() is called immediately after a call to seekdir(), POSIX requires the return value of telldir() to equal the value passed to seekdir(). The current seekdir code with SINGLEUSE enabled breaks this case as each call to telldir() allocates a new cookie. Instead, remove the SINGLEUSE code and change telldir() to look for an existing cookie for the directory's current location rather than always creating a new cookie. PR: 121656 Modified: stable/10/include/dirent.h stable/10/lib/libc/gen/directory.3 stable/10/lib/libc/gen/gen-private.h stable/10/lib/libc/gen/opendir.c stable/10/lib/libc/gen/readdir.c stable/10/lib/libc/gen/rewinddir.c stable/10/lib/libc/gen/telldir.c stable/10/lib/libc/gen/telldir.h Directory Properties: stable/10/ (props changed) Modified: stable/10/include/dirent.h ============================================================================== --- stable/10/include/dirent.h Thu Aug 14 20:17:23 2014 (r270001) +++ stable/10/include/dirent.h Thu Aug 14 20:20:21 2014 (r270002) @@ -63,6 +63,7 @@ typedef struct _dirdesc DIR; #define DTF_NODUP 0x0002 /* don't return duplicate names */ #define DTF_REWIND 0x0004 /* rewind after reading union stack */ #define __DTF_READALL 0x0008 /* everything has been read */ +#define __DTF_SKIPREAD 0x0010 /* assume internal buffer is populated */ #else /* !__BSD_VISIBLE */ Modified: stable/10/lib/libc/gen/directory.3 ============================================================================== --- stable/10/lib/libc/gen/directory.3 Thu Aug 14 20:17:23 2014 (r270001) +++ stable/10/lib/libc/gen/directory.3 Thu Aug 14 20:20:21 2014 (r270002) @@ -28,7 +28,7 @@ .\" @(#)directory.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd August 18, 2013 +.Dd July 28, 2014 .Dt DIRECTORY 3 .Os .Sh NAME @@ -169,6 +169,10 @@ If the directory is closed and then reopened, prior values returned by .Fn telldir will no longer be valid. +Values returned by +.Fn telldir +are also invalidated by a call to +.Fn rewinddir . .Pp The .Fn seekdir @@ -182,13 +186,6 @@ The new position reverts to the one asso when the .Fn telldir operation was performed. -State associated with the token returned by -.Fn telldir is freed when it is passed to -.Fn seekdir . -If you wish return to the same location again, -then you must create a new token with another -.Fn telldir -call. .Pp The .Fn rewinddir Modified: stable/10/lib/libc/gen/gen-private.h ============================================================================== --- stable/10/lib/libc/gen/gen-private.h Thu Aug 14 20:17:23 2014 (r270001) +++ stable/10/lib/libc/gen/gen-private.h Thu Aug 14 20:20:21 2014 (r270002) @@ -48,7 +48,6 @@ struct _dirdesc { char *dd_buf; /* data buffer */ int dd_len; /* size of data buffer */ long dd_seek; /* magic cookie returned by getdirentries */ - long dd_rewind; /* magic cookie for rewinding */ int dd_flags; /* flags for readdir */ struct pthread_mutex *dd_lock; /* lock */ struct _telldir *dd_td; /* telldir position recording */ Modified: stable/10/lib/libc/gen/opendir.c ============================================================================== --- stable/10/lib/libc/gen/opendir.c Thu Aug 14 20:17:23 2014 (r270001) +++ stable/10/lib/libc/gen/opendir.c Thu Aug 14 20:20:21 2014 (r270002) @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); #include "gen-private.h" #include "telldir.h" -static DIR * __opendir_common(int, int); +static DIR * __opendir_common(int, int, bool); /* * Open a directory. @@ -67,18 +67,10 @@ opendir(const char *name) DIR * fdopendir(int fd) { - struct stat statb; - /* Check that fd is associated with a directory. */ - if (_fstat(fd, &statb) != 0) - return (NULL); - if (!S_ISDIR(statb.st_mode)) { - errno = ENOTDIR; - return (NULL); - } if (_fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) return (NULL); - return (__opendir_common(fd, DTF_HIDEW|DTF_NODUP)); + return (__opendir_common(fd, DTF_HIDEW|DTF_NODUP, true)); } DIR * @@ -88,11 +80,13 @@ __opendir2(const char *name, int flags) DIR *dir; int saved_errno; + if ((flags & (__DTF_READALL | __DTF_SKIPREAD)) != 0) + return (NULL); if ((fd = _open(name, O_RDONLY | O_NONBLOCK | O_DIRECTORY | O_CLOEXEC)) == -1) return (NULL); - dir = __opendir_common(fd, flags); + dir = __opendir_common(fd, flags, false); if (dir == NULL) { saved_errno = errno; _close(fd); @@ -110,22 +104,195 @@ opendir_compar(const void *p1, const voi } /* + * For a directory at the top of a unionfs stack, the entire directory's + * contents are read and cached locally until the next call to rewinddir(). + * For the fdopendir() case, the initial seek position must be preserved. + * For rewinddir(), the full directory should always be re-read from the + * beginning. + * + * If an error occurs, the existing buffer and state of 'dirp' is left + * unchanged. + */ +bool +_filldir(DIR *dirp, bool use_current_pos) +{ + struct dirent **dpv; + char *buf, *ddptr, *ddeptr; + off_t pos; + int fd2, incr, len, n, saved_errno, space; + + len = 0; + space = 0; + buf = NULL; + ddptr = NULL; + + /* + * Use the system page size if that is a multiple of DIRBLKSIZ. + * Hopefully this can be a big win someday by allowing page + * trades to user space to be done by _getdirentries(). + */ + incr = getpagesize(); + if ((incr % DIRBLKSIZ) != 0) + incr = DIRBLKSIZ; + + /* + * The strategy here is to read all the directory + * entries into a buffer, sort the buffer, and + * remove duplicate entries by setting the inode + * number to zero. + * + * We reopen the directory because _getdirentries() + * on a MNT_UNION mount modifies the open directory, + * making it refer to the lower directory after the + * upper directory's entries are exhausted. + * This would otherwise break software that uses + * the directory descriptor for fchdir or *at + * functions, such as fts.c. + */ + if ((fd2 = _openat(dirp->dd_fd, ".", O_RDONLY | O_CLOEXEC)) == -1) + return (false); + + if (use_current_pos) { + pos = lseek(dirp->dd_fd, 0, SEEK_CUR); + if (pos == -1 || lseek(fd2, pos, SEEK_SET) == -1) { + saved_errno = errno; + _close(fd2); + errno = saved_errno; + return (false); + } + } + + do { + /* + * Always make at least DIRBLKSIZ bytes + * available to _getdirentries + */ + if (space < DIRBLKSIZ) { + space += incr; + len += incr; + buf = reallocf(buf, len); + if (buf == NULL) { + saved_errno = errno; + _close(fd2); + errno = saved_errno; + return (false); + } + ddptr = buf + (len - space); + } + + n = _getdirentries(fd2, ddptr, space, &dirp->dd_seek); + if (n > 0) { + ddptr += n; + space -= n; + } + if (n < 0) { + saved_errno = errno; + _close(fd2); + errno = saved_errno; + return (false); + } + } while (n > 0); + _close(fd2); + + ddeptr = ddptr; + + /* + * There is now a buffer full of (possibly) duplicate + * names. + */ + dirp->dd_buf = buf; + + /* + * Go round this loop twice... + * + * Scan through the buffer, counting entries. + * On the second pass, save pointers to each one. + * Then sort the pointers and remove duplicate names. + */ + for (dpv = 0;;) { + n = 0; + ddptr = buf; + while (ddptr < ddeptr) { + struct dirent *dp; + + dp = (struct dirent *) ddptr; + if ((long)dp & 03L) + break; + if ((dp->d_reclen <= 0) || + (dp->d_reclen > (ddeptr + 1 - ddptr))) + break; + ddptr += dp->d_reclen; + if (dp->d_fileno) { + if (dpv) + dpv[n] = dp; + n++; + } + } + + if (dpv) { + struct dirent *xp; + + /* + * This sort must be stable. + */ + mergesort(dpv, n, sizeof(*dpv), opendir_compar); + + dpv[n] = NULL; + xp = NULL; + + /* + * Scan through the buffer in sort order, + * zapping the inode number of any + * duplicate names. + */ + for (n = 0; dpv[n]; n++) { + struct dirent *dp = dpv[n]; + + if ((xp == NULL) || + strcmp(dp->d_name, xp->d_name)) { + xp = dp; + } else { + dp->d_fileno = 0; + } + if (dp->d_type == DT_WHT && + (dirp->dd_flags & DTF_HIDEW)) + dp->d_fileno = 0; + } + + free(dpv); + break; + } else { + dpv = malloc((n+1) * sizeof(struct dirent *)); + if (dpv == NULL) + break; + } + } + + dirp->dd_len = len; + dirp->dd_size = ddptr - dirp->dd_buf; + return (true); +} + + +/* * Common routine for opendir(3), __opendir2(3) and fdopendir(3). */ static DIR * -__opendir_common(int fd, int flags) +__opendir_common(int fd, int flags, bool use_current_pos) { DIR *dirp; int incr; int saved_errno; int unionstack; - int fd2; - - fd2 = -1; if ((dirp = malloc(sizeof(DIR) + sizeof(struct _telldir))) == NULL) return (NULL); + dirp->dd_buf = NULL; + dirp->dd_fd = fd; + dirp->dd_flags = flags; + dirp->dd_loc = 0; + dirp->dd_lock = NULL; dirp->dd_td = (struct _telldir *)((char *)dirp + sizeof(DIR)); LIST_INIT(&dirp->dd_td->td_locq); dirp->dd_td->td_loccnt = 0; @@ -154,163 +321,39 @@ __opendir_common(int fd, int flags) } if (unionstack) { - int len = 0; - int space = 0; - char *buf = 0; - char *ddptr = 0; - char *ddeptr; - int n; - struct dirent **dpv; - - /* - * The strategy here is to read all the directory - * entries into a buffer, sort the buffer, and - * remove duplicate entries by setting the inode - * number to zero. - * - * We reopen the directory because _getdirentries() - * on a MNT_UNION mount modifies the open directory, - * making it refer to the lower directory after the - * upper directory's entries are exhausted. - * This would otherwise break software that uses - * the directory descriptor for fchdir or *at - * functions, such as fts.c. - */ - if ((fd2 = _openat(fd, ".", O_RDONLY | O_CLOEXEC)) == -1) { - saved_errno = errno; - free(buf); - free(dirp); - errno = saved_errno; - return (NULL); - } - - do { - /* - * Always make at least DIRBLKSIZ bytes - * available to _getdirentries - */ - if (space < DIRBLKSIZ) { - space += incr; - len += incr; - buf = reallocf(buf, len); - if (buf == NULL) - goto fail; - ddptr = buf + (len - space); - } - - n = _getdirentries(fd2, ddptr, space, &dirp->dd_seek); - if (n > 0) { - ddptr += n; - space -= n; - } - } while (n > 0); - - ddeptr = ddptr; - flags |= __DTF_READALL; - - _close(fd2); - fd2 = -1; - - /* - * There is now a buffer full of (possibly) duplicate - * names. - */ - dirp->dd_buf = buf; - - /* - * Go round this loop twice... - * - * Scan through the buffer, counting entries. - * On the second pass, save pointers to each one. - * Then sort the pointers and remove duplicate names. - */ - for (dpv = 0;;) { - n = 0; - ddptr = buf; - while (ddptr < ddeptr) { - struct dirent *dp; - - dp = (struct dirent *) ddptr; - if ((long)dp & 03L) - break; - if ((dp->d_reclen <= 0) || - (dp->d_reclen > (ddeptr + 1 - ddptr))) - break; - ddptr += dp->d_reclen; - if (dp->d_fileno) { - if (dpv) - dpv[n] = dp; - n++; - } - } - - if (dpv) { - struct dirent *xp; - - /* - * This sort must be stable. - */ - mergesort(dpv, n, sizeof(*dpv), - opendir_compar); - - dpv[n] = NULL; - xp = NULL; - - /* - * Scan through the buffer in sort order, - * zapping the inode number of any - * duplicate names. - */ - for (n = 0; dpv[n]; n++) { - struct dirent *dp = dpv[n]; - - if ((xp == NULL) || - strcmp(dp->d_name, xp->d_name)) { - xp = dp; - } else { - dp->d_fileno = 0; - } - if (dp->d_type == DT_WHT && - (flags & DTF_HIDEW)) - dp->d_fileno = 0; - } - - free(dpv); - break; - } else { - dpv = malloc((n+1) * sizeof(struct dirent *)); - if (dpv == NULL) - break; - } - } - - dirp->dd_len = len; - dirp->dd_size = ddptr - dirp->dd_buf; + if (!_filldir(dirp, use_current_pos)) + goto fail; + dirp->dd_flags |= __DTF_READALL; } else { dirp->dd_len = incr; - dirp->dd_size = 0; dirp->dd_buf = malloc(dirp->dd_len); if (dirp->dd_buf == NULL) goto fail; - dirp->dd_seek = 0; + if (use_current_pos) { + /* + * Read the first batch of directory entries + * to prime dd_seek. This also checks if the + * fd passed to fdopendir() is a directory. + */ + dirp->dd_size = _getdirentries(dirp->dd_fd, + dirp->dd_buf, dirp->dd_len, &dirp->dd_seek); + if (dirp->dd_size < 0) { + if (errno == EINVAL) + errno = ENOTDIR; + goto fail; + } + dirp->dd_flags |= __DTF_SKIPREAD; + } else { + dirp->dd_size = 0; + dirp->dd_seek = 0; + } } - dirp->dd_loc = 0; - dirp->dd_fd = fd; - dirp->dd_flags = flags; - dirp->dd_lock = NULL; - - /* - * Set up seek point for rewinddir. - */ - dirp->dd_rewind = telldir(dirp); - return (dirp); fail: saved_errno = errno; - if (fd2 != -1) - _close(fd2); + free(dirp->dd_buf); free(dirp); errno = saved_errno; return (NULL); Modified: stable/10/lib/libc/gen/readdir.c ============================================================================== --- stable/10/lib/libc/gen/readdir.c Thu Aug 14 20:17:23 2014 (r270001) +++ stable/10/lib/libc/gen/readdir.c Thu Aug 14 20:20:21 2014 (r270002) @@ -61,12 +61,14 @@ _readdir_unlocked(dirp, skip) return (NULL); dirp->dd_loc = 0; } - if (dirp->dd_loc == 0 && !(dirp->dd_flags & __DTF_READALL)) { + if (dirp->dd_loc == 0 && + !(dirp->dd_flags & (__DTF_READALL | __DTF_SKIPREAD))) { dirp->dd_size = _getdirentries(dirp->dd_fd, dirp->dd_buf, dirp->dd_len, &dirp->dd_seek); if (dirp->dd_size <= 0) return (NULL); } + dirp->dd_flags &= ~__DTF_SKIPREAD; dp = (struct dirent *)(dirp->dd_buf + dirp->dd_loc); if ((long)dp & 03L) /* bogus pointer check */ return (NULL); Modified: stable/10/lib/libc/gen/rewinddir.c ============================================================================== --- stable/10/lib/libc/gen/rewinddir.c Thu Aug 14 20:17:23 2014 (r270001) +++ stable/10/lib/libc/gen/rewinddir.c Thu Aug 14 20:20:21 2014 (r270002) @@ -33,9 +33,14 @@ static char sccsid[] = "@(#)rewinddir.c #include __FBSDID("$FreeBSD$"); +#include "namespace.h" #include #include +#include +#include +#include "un-namespace.h" +#include "libc_private.h" #include "gen-private.h" #include "telldir.h" @@ -44,6 +49,16 @@ rewinddir(dirp) DIR *dirp; { - _seekdir(dirp, dirp->dd_rewind); - dirp->dd_rewind = telldir(dirp); + if (__isthreaded) + _pthread_mutex_lock(&dirp->dd_lock); + if (dirp->dd_flags & __DTF_READALL) + _filldir(dirp, false); + else if (dirp->dd_seek != 0) { + (void) lseek(dirp->dd_fd, 0, SEEK_SET); + dirp->dd_seek = 0; + } + dirp->dd_loc = 0; + _reclaim_telldir(dirp); + if (__isthreaded) + _pthread_mutex_unlock(&dirp->dd_lock); } Modified: stable/10/lib/libc/gen/telldir.c ============================================================================== --- stable/10/lib/libc/gen/telldir.c Thu Aug 14 20:17:23 2014 (r270001) +++ stable/10/lib/libc/gen/telldir.c Thu Aug 14 20:20:21 2014 (r270002) @@ -47,13 +47,6 @@ __FBSDID("$FreeBSD$"); #include "telldir.h" /* - * The option SINGLEUSE may be defined to say that a telldir - * cookie may be used only once before it is freed. This option - * is used to avoid having memory usage grow without bound. - */ -#define SINGLEUSE - -/* * return a pointer into a directory */ long @@ -61,18 +54,31 @@ telldir(dirp) DIR *dirp; { struct ddloc *lp; + long idx; - if ((lp = (struct ddloc *)malloc(sizeof(struct ddloc))) == NULL) - return (-1); if (__isthreaded) _pthread_mutex_lock(&dirp->dd_lock); - lp->loc_index = dirp->dd_td->td_loccnt++; - lp->loc_seek = dirp->dd_seek; - lp->loc_loc = dirp->dd_loc; - LIST_INSERT_HEAD(&dirp->dd_td->td_locq, lp, loc_lqe); + LIST_FOREACH(lp, &dirp->dd_td->td_locq, loc_lqe) { + if (lp->loc_seek == dirp->dd_seek && + lp->loc_loc == dirp->dd_loc) + break; + } + if (lp == NULL) { + lp = malloc(sizeof(struct ddloc)); + if (lp == NULL) { + if (__isthreaded) + _pthread_mutex_unlock(&dirp->dd_lock); + return (-1); + } + lp->loc_index = dirp->dd_td->td_loccnt++; + lp->loc_seek = dirp->dd_seek; + lp->loc_loc = dirp->dd_loc; + LIST_INSERT_HEAD(&dirp->dd_td->td_locq, lp, loc_lqe); + } + idx = lp->loc_index; if (__isthreaded) _pthread_mutex_unlock(&dirp->dd_lock); - return (lp->loc_index); + return (idx); } /* @@ -94,7 +100,7 @@ _seekdir(dirp, loc) if (lp == NULL) return; if (lp->loc_loc == dirp->dd_loc && lp->loc_seek == dirp->dd_seek) - goto found; + return; (void) lseek(dirp->dd_fd, (off_t)lp->loc_seek, SEEK_SET); dirp->dd_seek = lp->loc_seek; dirp->dd_loc = 0; @@ -103,11 +109,6 @@ _seekdir(dirp, loc) if (dp == NULL) break; } -found: -#ifdef SINGLEUSE - LIST_REMOVE(lp, loc_lqe); - free((caddr_t)lp); -#endif } /* Modified: stable/10/lib/libc/gen/telldir.h ============================================================================== --- stable/10/lib/libc/gen/telldir.h Thu Aug 14 20:17:23 2014 (r270001) +++ stable/10/lib/libc/gen/telldir.h Thu Aug 14 20:20:21 2014 (r270002) @@ -36,6 +36,7 @@ #define _TELLDIR_H_ #include +#include /* * One of these structures is malloced to describe the current directory @@ -59,6 +60,7 @@ struct _telldir { long td_loccnt; /* index of entry for sequential readdir's */ }; +bool _filldir(DIR *, bool); struct dirent *_readdir_unlocked(DIR *, int); void _reclaim_telldir(DIR *); void _seekdir(DIR *, long); From mckusick at FreeBSD.org Thu Aug 14 23:38:05 2014 From: mckusick at FreeBSD.org (Kirk McKusick) Date: Thu, 14 Aug 2014 23:38:04 +0000 (UTC) Subject: svn commit: r270007 - stable/10/sys/ufs/ffs Message-ID: <201408142338.s7ENc4kx078342@svn.freebsd.org> Author: mckusick Date: Thu Aug 14 23:38:04 2014 New Revision: 270007 URL: http://svnweb.freebsd.org/changeset/base/270007 Log: MFC of 269674: The journal is only prepared to handle full-size block numbers, so we have to adjust freeblk records to reflect the change to a full-size block. For example, suppose we have a block made up of fragments 8-15 and want to free its last two fragments. We are given a request that says: FREEBLK ino=5, blkno=14, lbn=0, frags=2, oldfrags=0 where frags are the number of frags to free and oldfrags are the number of fragments to keep. To block align it, we have to change it to have a valid full-size blkno, so it becomes: FREEBLK ino=5, blkno=8, lbn=0, frags=2, oldfrags=6 Submitted by: Mikihito Takehara Tested by: Mikihito Takehara Reviewed by: Jeff Roberson Modified: stable/10/sys/ufs/ffs/ffs_softdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/10/sys/ufs/ffs/ffs_softdep.c Thu Aug 14 23:17:33 2014 (r270006) +++ stable/10/sys/ufs/ffs/ffs_softdep.c Thu Aug 14 23:38:04 2014 (r270007) @@ -931,6 +931,7 @@ static inline struct jsegdep *inoref_jse static struct jmvref *newjmvref(struct inode *, ino_t, off_t, off_t); static struct jfreeblk *newjfreeblk(struct freeblks *, ufs_lbn_t, ufs2_daddr_t, int); +static void adjust_newfreework(struct freeblks *, int); static struct jtrunc *newjtrunc(struct freeblks *, off_t, int); static void move_newblock_dep(struct jaddref *, struct inodedep *); static void cancel_jfreeblk(struct freeblks *, ufs2_daddr_t); @@ -4066,6 +4067,33 @@ newjfreeblk(freeblks, lbn, blkno, frags) } /* + * The journal is only prepared to handle full-size block numbers, so we + * have to adjust the record to reflect the change to a full-size block. + * For example, suppose we have a block made up of fragments 8-15 and + * want to free its last two fragments. We are given a request that says: + * FREEBLK ino=5, blkno=14, lbn=0, frags=2, oldfrags=0 + * where frags are the number of fragments to free and oldfrags are the + * number of fragments to keep. To block align it, we have to change it to + * have a valid full-size blkno, so it becomes: + * FREEBLK ino=5, blkno=8, lbn=0, frags=2, oldfrags=6 + */ +static void +adjust_newfreework(freeblks, frag_offset) + struct freeblks *freeblks; + int frag_offset; +{ + struct jfreeblk *jfreeblk; + + KASSERT((LIST_FIRST(&freeblks->fb_jblkdephd) != NULL && + LIST_FIRST(&freeblks->fb_jblkdephd)->jb_list.wk_type == D_JFREEBLK), + ("adjust_newfreework: Missing freeblks dependency")); + + jfreeblk = WK_JFREEBLK(LIST_FIRST(&freeblks->fb_jblkdephd)); + jfreeblk->jf_blkno -= frag_offset; + jfreeblk->jf_frags += frag_offset; +} + +/* * Allocate a new jtrunc to track a partial truncation. */ static struct jtrunc * @@ -6432,6 +6460,9 @@ softdep_journal_freeblocks(ip, cred, len blkno += numfrags(ip->i_fs, frags); newfreework(ump, freeblks, NULL, lastlbn, blkno, oldfrags, 0, needj); + if (needj) + adjust_newfreework(freeblks, + numfrags(ip->i_fs, frags)); } else if (blkno == 0) allocblock = 1; } From gjb at FreeBSD.org Fri Aug 15 03:52:41 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Fri, 15 Aug 2014 03:52:41 +0000 (UTC) Subject: svn commit: r270009 - in stable: 10/sbin/ifconfig 9/sbin/ifconfig Message-ID: <201408150352.s7F3qfvi001167@svn.freebsd.org> Author: gjb Date: Fri Aug 15 03:52:40 2014 New Revision: 270009 URL: http://svnweb.freebsd.org/changeset/base/270009 Log: MFC r269888: Fix a typo in a comment: s/interprete/interpret/ Sponsored by: The FreeBSD Foundation Modified: stable/10/sbin/ifconfig/ifconfig.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sbin/ifconfig/ifconfig.c Directory Properties: stable/9/sbin/ifconfig/ (props changed) Modified: stable/10/sbin/ifconfig/ifconfig.c ============================================================================== --- stable/10/sbin/ifconfig/ifconfig.c Fri Aug 15 02:43:02 2014 (r270008) +++ stable/10/sbin/ifconfig/ifconfig.c Fri Aug 15 03:52:40 2014 (r270009) @@ -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 gjb at FreeBSD.org Fri Aug 15 03:52:41 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Fri, 15 Aug 2014 03:52:41 +0000 (UTC) Subject: svn commit: r270009 - in stable: 10/sbin/ifconfig 9/sbin/ifconfig Message-ID: <201408150352.s7F3qfnl001174@svn.freebsd.org> Author: gjb Date: Fri Aug 15 03:52:40 2014 New Revision: 270009 URL: http://svnweb.freebsd.org/changeset/base/270009 Log: MFC r269888: Fix a typo in a comment: s/interprete/interpret/ Sponsored by: The FreeBSD Foundation Modified: stable/9/sbin/ifconfig/ifconfig.c Directory Properties: stable/9/sbin/ifconfig/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sbin/ifconfig/ifconfig.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sbin/ifconfig/ifconfig.c ============================================================================== --- stable/9/sbin/ifconfig/ifconfig.c Fri Aug 15 02:43:02 2014 (r270008) +++ stable/9/sbin/ifconfig/ifconfig.c Fri Aug 15 03:52:40 2014 (r270009) @@ -76,7 +76,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 emaste at FreeBSD.org Fri Aug 15 19:07:00 2014 From: emaste at FreeBSD.org (Ed Maste) Date: Fri, 15 Aug 2014 19:06:59 +0000 (UTC) Subject: svn commit: r270026 - in stable/10/contrib/nvi: cl common Message-ID: <201408151906.s7FJ6xlE031737@svn.freebsd.org> Author: emaste Date: Fri Aug 15 19:06:59 2014 New Revision: 270026 URL: http://svnweb.freebsd.org/changeset/base/270026 Log: MFC r259088: Vendor import nvi-2.1.2-c80f493b038 a multikey mapping fix PR: bin/182463 Modified: stable/10/contrib/nvi/cl/cl_term.c stable/10/contrib/nvi/common/key.c stable/10/contrib/nvi/common/key.h Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/nvi/cl/cl_term.c ============================================================================== --- stable/10/contrib/nvi/cl/cl_term.c Fri Aug 15 16:08:52 2014 (r270025) +++ stable/10/contrib/nvi/cl/cl_term.c Fri Aug 15 19:06:59 2014 (r270026) @@ -10,7 +10,7 @@ #include "config.h" #ifndef lint -static const char sccsid[] = "$Id: cl_term.c,v 10.33 2012/04/21 23:51:46 zy Exp $"; +static const char sccsid[] = "$Id: cl_term.c,v 10.34 2013/12/07 16:21:14 wjenkner Exp $"; #endif /* not lint */ #include @@ -187,14 +187,18 @@ cl_term_init(SCR *sp) int cl_term_end(GS *gp) { - SEQ *qp, *nqp; + SEQ *qp, *nqp, *pre_qp = NULL; /* Delete screen specific mappings. */ SLIST_FOREACH_SAFE(qp, gp->seqq, q, nqp) if (F_ISSET(qp, SEQ_SCREEN)) { - SLIST_REMOVE_HEAD(gp->seqq, q); + if (qp == SLIST_FIRST(gp->seqq)) + SLIST_REMOVE_HEAD(gp->seqq, q); + else + SLIST_REMOVE_AFTER(pre_qp, q); (void)seq_free(qp); - } + } else + pre_qp = qp; return (0); } Modified: stable/10/contrib/nvi/common/key.c ============================================================================== --- stable/10/contrib/nvi/common/key.c Fri Aug 15 16:08:52 2014 (r270025) +++ stable/10/contrib/nvi/common/key.c Fri Aug 15 19:06:59 2014 (r270026) @@ -10,7 +10,7 @@ #include "config.h" #ifndef lint -static const char sccsid[] = "$Id: key.c,v 10.53 2013/03/11 01:20:53 yamt Exp $"; +static const char sccsid[] = "$Id: key.c,v 10.54 2013/11/13 12:15:27 zy Exp $"; #endif /* not lint */ #include @@ -272,7 +272,7 @@ v_key_name( * The code prints non-printable wide characters in 4 or 5 digits * Unicode escape sequences, so only supports plane 0 to 15. */ - if (ISPRINT(ach)) + if (CAN_PRINT(sp, ach)) goto done; nopr: if (iscntrl(ch) && (ch < 0x20 || ch == 0x7f)) { sp->cname[0] = '^'; Modified: stable/10/contrib/nvi/common/key.h ============================================================================== --- stable/10/contrib/nvi/common/key.h Fri Aug 15 16:08:52 2014 (r270025) +++ stable/10/contrib/nvi/common/key.h Fri Aug 15 19:06:59 2014 (r270026) @@ -6,7 +6,7 @@ * * See the LICENSE file for redistribution information. * - * $Id: key.h,v 10.55 2012/10/07 01:31:17 zy Exp $ + * $Id: key.h,v 10.56 2013/11/13 12:15:27 zy Exp $ */ #include "multibyte.h" @@ -23,8 +23,9 @@ #define INPUT2INT5(sp,cw,n,nlen,w,wlen) \ sp->conv.input2int(sp, n, nlen, &(cw), &wlen, &w) #define CONST +#define INTISWIDE(c) (wctob(c) == EOF) #define CHAR_WIDTH(sp, ch) wcwidth(ch) -#define INTISWIDE(c) (wctob(c) == EOF) +#define CAN_PRINT(sp, ch) (CHAR_WIDTH(sp, ch) > 0) #else #define FILE2INT5(sp,buf,n,nlen,w,wlen) \ (w = n, wlen = nlen, 0) @@ -36,9 +37,10 @@ (n = w, nlen = wlen, 0) #define INPUT2INT5(sp,buf,n,nlen,w,wlen) \ (w = n, wlen = nlen, 0) -#define CONST const -#define INTISWIDE(c) 0 +#define CONST const +#define INTISWIDE(c) 0 #define CHAR_WIDTH(sp, ch) 1 +#define CAN_PRINT(sp, ch) isprint(ch) #endif #define FILE2INT(sp,n,nlen,w,wlen) \ FILE2INT5(sp,sp->cw,n,nlen,w,wlen) From pfg at FreeBSD.org Sat Aug 16 00:52:14 2014 From: pfg at FreeBSD.org (Pedro F. Giffuni) Date: Sat, 16 Aug 2014 00:52:13 +0000 (UTC) Subject: svn commit: r270030 - stable/10/cddl/contrib/opensolaris/lib/libdtrace/common Message-ID: <201408160052.s7G0qDhT009535@svn.freebsd.org> Author: pfg Date: Sat Aug 16 00:52:13 2014 New Revision: 270030 URL: http://svnweb.freebsd.org/changeset/base/270030 Log: MFC r267875: 4251 libdtrace leaks open file handles Illumos commit: 93ed8d0d4b068b95d0bb50d57bb854df462a8485 (partial) Reference: https://www.illumos.org/issues/4251 Discussed with: Robert Mustacchi Obtained from: Illumos Modified: stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c Fri Aug 15 22:36:41 2014 (r270029) +++ stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c Sat Aug 16 00:52:13 2014 (r270030) @@ -2289,12 +2289,15 @@ dt_load_libs_dir(dtrace_hdl_t *dtp, cons dt_dprintf("skipping library %s, already processed " "library with the same name: %s", dp->d_name, dld->dtld_library); + (void) fclose(fp); continue; } dtp->dt_filetag = fname; - if (dt_lib_depend_add(dtp, &dtp->dt_lib_dep, fname) != 0) + if (dt_lib_depend_add(dtp, &dtp->dt_lib_dep, fname) != 0) { + (void) fclose(fp); return (-1); /* preserve dt_errno */ + } rv = dt_compile(dtp, DT_CTX_DPROG, DTRACE_PROBESPEC_NAME, NULL, @@ -2302,8 +2305,10 @@ dt_load_libs_dir(dtrace_hdl_t *dtp, cons if (rv != NULL && dtp->dt_errno && (dtp->dt_errno != EDT_COMPILER || - dtp->dt_errtag != dt_errtag(D_PRAGMA_DEPEND))) + dtp->dt_errtag != dt_errtag(D_PRAGMA_DEPEND))) { + (void) fclose(fp); return (-1); /* preserve dt_errno */ + } if (dtp->dt_errno) dt_dprintf("error parsing library %s: %s\n", From pfg at FreeBSD.org Sat Aug 16 00:54:56 2014 From: pfg at FreeBSD.org (Pedro F. Giffuni) Date: Sat, 16 Aug 2014 00:54:56 +0000 (UTC) Subject: svn commit: r270031 - stable/10/lib/libutil Message-ID: <201408160054.s7G0su2P009901@svn.freebsd.org> Author: pfg Date: Sat Aug 16 00:54:56 2014 New Revision: 270031 URL: http://svnweb.freebsd.org/changeset/base/270031 Log: MFC r269015: fparseln(3): Update from NetBSD sources. -fix a condition so that fparseln() doesn't report spurious empty lines eg after 2 comment lines, or on EOF after a single comment line -no escape character means no escaped characters modify the previous fix so that no pointless realloc()s are done in the case of multiple empty continuation lines, and comment the code to make the logics obvious. fparseln is now part of libc in NetBSD so this changes the previous revision numbering. Obtained from: NetBSD (CVS Rev. 1.6-1.7) Modified: stable/10/lib/libutil/fparseln.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libutil/fparseln.c ============================================================================== --- stable/10/lib/libutil/fparseln.c Sat Aug 16 00:52:13 2014 (r270030) +++ stable/10/lib/libutil/fparseln.c Sat Aug 16 00:54:56 2014 (r270031) @@ -1,4 +1,4 @@ -/* $NetBSD: fparseln.c,v 1.9 1999/09/20 04:48:06 lukem Exp $ */ +/* $NetBSD: fparseln.c,v 1.7 2007/03/08 19:57:53 drochner Exp $ */ /* * Copyright (c) 1997 Christos Zoulas. All rights reserved. @@ -59,7 +59,7 @@ isescaped(const char *sp, const char *p, /* No escape character */ if (esc == '\0') - return 1; + return 0; /* Count the number of escape characters that precede ours */ for (ne = 0, cp = p; --cp >= sp && *cp == esc; ne++) @@ -135,13 +135,19 @@ fparseln(FILE *fp, size_t *size, size_t cp = &ptr[s - 1]; if (*cp == con && !isescaped(ptr, cp, esc)) { - s--; /* forget escape */ + s--; /* forget continuation char */ cnt = 1; } } - if (s == 0 && buf != NULL) - continue; + if (s == 0) { + /* + * nothing to add, skip realloc except in case + * we need a minimal buf to return an empty line + */ + if (cnt || buf != NULL) + continue; + } if ((cp = realloc(buf, len + s + 1)) == NULL) { free(buf); From pfg at FreeBSD.org Sat Aug 16 01:00:38 2014 From: pfg at FreeBSD.org (Pedro F. Giffuni) Date: Sat, 16 Aug 2014 01:00:38 +0000 (UTC) Subject: svn commit: r270032 - stable/10/lib/libc/net Message-ID: <201408160100.s7G10cHo012814@svn.freebsd.org> Author: pfg Date: Sat Aug 16 01:00:37 2014 New Revision: 270032 URL: http://svnweb.freebsd.org/changeset/base/270032 Log: MFC r269695: Const-ify character string Obtained from: Apple Inc. (Libc 997.90.3) MFC after: 3 days Modified: stable/10/lib/libc/net/linkaddr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/net/linkaddr.c ============================================================================== --- stable/10/lib/libc/net/linkaddr.c Sat Aug 16 00:54:56 2014 (r270031) +++ stable/10/lib/libc/net/linkaddr.c Sat Aug 16 01:00:37 2014 (r270032) @@ -118,7 +118,7 @@ link_addr(addr, sdl) return; } -static char hexlist[] = "0123456789abcdef"; +static const char hexlist[] = "0123456789abcdef"; char * link_ntoa(sdl) From pfg at FreeBSD.org Sat Aug 16 01:03:51 2014 From: pfg at FreeBSD.org (Pedro F. Giffuni) Date: Sat, 16 Aug 2014 01:03:51 +0000 (UTC) Subject: svn commit: r270033 - stable/10/lib/libc/stdlib Message-ID: <201408160103.s7G13pWh014383@svn.freebsd.org> Author: pfg Date: Sat Aug 16 01:03:51 2014 New Revision: 270033 URL: http://svnweb.freebsd.org/changeset/base/270033 Log: MFC r269901: Minor style tweaks. Obtained from: OpenBSD (CVS rev. 1.7) Modified: stable/10/lib/libc/stdlib/strtonum.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/stdlib/strtonum.c ============================================================================== --- stable/10/lib/libc/stdlib/strtonum.c Sat Aug 16 01:00:37 2014 (r270032) +++ stable/10/lib/libc/stdlib/strtonum.c Sat Aug 16 01:03:51 2014 (r270033) @@ -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 pfg at FreeBSD.org Sat Aug 16 01:06:24 2014 From: pfg at FreeBSD.org (Pedro F. Giffuni) Date: Sat, 16 Aug 2014 01:06:23 +0000 (UTC) Subject: svn commit: r270034 - stable/10/sbin/newfs_msdos Message-ID: <201408160106.s7G16NJ2014777@svn.freebsd.org> Author: pfg Date: Sat Aug 16 01:06:23 2014 New Revision: 270034 URL: http://svnweb.freebsd.org/changeset/base/270034 Log: MFC r269953: 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) Modified: stable/10/sbin/newfs_msdos/newfs_msdos.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/newfs_msdos/newfs_msdos.c ============================================================================== --- stable/10/sbin/newfs_msdos/newfs_msdos.c Sat Aug 16 01:03:51 2014 (r270033) +++ stable/10/sbin/newfs_msdos/newfs_msdos.c Sat Aug 16 01:06:23 2014 (r270034) @@ -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 pfg at FreeBSD.org Sat Aug 16 01:29:50 2014 From: pfg at FreeBSD.org (Pedro F. Giffuni) Date: Sat, 16 Aug 2014 01:29:50 +0000 (UTC) Subject: svn commit: r270035 - stable/10/lib/libc/stdio Message-ID: <201408160129.s7G1TojV024013@svn.freebsd.org> Author: pfg Date: Sat Aug 16 01:29:49 2014 New Revision: 270035 URL: http://svnweb.freebsd.org/changeset/base/270035 Log: MFC r268924: Update fflush(3) to return success on a read-only stream. This is done for compliance with SUSv3. The changes cause no secondary effects in the gnulib tests (we pass them). Obtained from: Apple Inc. (Libc 997.90.3 with changes) Reviewed by: bde Phabric: D440 Modified: stable/10/lib/libc/stdio/fflush.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/stdio/fflush.c ============================================================================== --- stable/10/lib/libc/stdio/fflush.c Sat Aug 16 01:06:23 2014 (r270034) +++ stable/10/lib/libc/stdio/fflush.c Sat Aug 16 01:29:49 2014 (r270035) @@ -60,7 +60,7 @@ fflush(FILE *fp) /* * There is disagreement about the correct behaviour of fflush() - * when passed a file which is not open for reading. According to + * when passed a file which is not open for writing. According to * the ISO C standard, the behaviour is undefined. * Under linux, such an fflush returns success and has no effect; * under Windows, such an fflush is documented as behaving instead @@ -68,11 +68,13 @@ fflush(FILE *fp) * Given that applications may be written with the expectation of * either of these two behaviours, the only safe (non-astonishing) * option is to return EBADF and ask that applications be fixed. + * SUSv3 now requires that fflush() returns success on a read-only + * stream. + * */ - if ((fp->_flags & (__SWR | __SRW)) == 0) { - errno = EBADF; - retval = EOF; - } else + if ((fp->_flags & (__SWR | __SRW)) == 0) + retval = 0; + else retval = __sflush(fp); FUNLOCKFILE(fp); return (retval); @@ -89,10 +91,9 @@ __fflush(FILE *fp) if (fp == NULL) return (_fwalk(sflush_locked)); - if ((fp->_flags & (__SWR | __SRW)) == 0) { - errno = EBADF; - retval = EOF; - } else + if ((fp->_flags & (__SWR | __SRW)) == 0) + retval = 0; + else retval = __sflush(fp); return (retval); } @@ -122,6 +123,12 @@ __sflush(FILE *fp) for (; n > 0; n -= t, p += t) { t = _swrite(fp, (char *)p, n); if (t <= 0) { + /* Reset _p and _w. */ + if (p > fp->_p) /* Some was written. */ + memmove(fp->_p, p, n); + fp->_p += n; + if ((fp->_flags & (__SLBF | __SNBF)) == 0) + fp->_w -= n; fp->_flags |= __SERR; return (EOF); } From kib at FreeBSD.org Sat Aug 16 08:37:13 2014 From: kib at FreeBSD.org (Konstantin Belousov) Date: Sat, 16 Aug 2014 08:37:13 +0000 (UTC) Subject: svn commit: r270039 - stable/10/lib/libthr/thread Message-ID: <201408160837.s7G8bDmw013539@svn.freebsd.org> Author: kib Date: Sat Aug 16 08:37:13 2014 New Revision: 270039 URL: http://svnweb.freebsd.org/changeset/base/270039 Log: MFC r269908: Style. Modified: stable/10/lib/libthr/thread/thr_stack.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libthr/thread/thr_stack.c ============================================================================== --- stable/10/lib/libthr/thread/thr_stack.c Sat Aug 16 08:31:25 2014 (r270038) +++ stable/10/lib/libthr/thread/thr_stack.c Sat Aug 16 08:37:13 2014 (r270039) @@ -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 kib at FreeBSD.org Sat Aug 16 08:38:54 2014 From: kib at FreeBSD.org (Konstantin Belousov) Date: Sat, 16 Aug 2014 08:38:53 +0000 (UTC) Subject: svn commit: r270040 - stable/10/lib/libthr/thread Message-ID: <201408160838.s7G8crTM013850@svn.freebsd.org> Author: kib Date: Sat Aug 16 08:38:53 2014 New Revision: 270040 URL: http://svnweb.freebsd.org/changeset/base/270040 Log: MFC r269909: 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. Modified: stable/10/lib/libthr/thread/thr_init.c stable/10/lib/libthr/thread/thr_stack.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libthr/thread/thr_init.c ============================================================================== --- stable/10/lib/libthr/thread/thr_init.c Sat Aug 16 08:37:13 2014 (r270039) +++ stable/10/lib/libthr/thread/thr_init.c Sat Aug 16 08:38:53 2014 (r270040) @@ -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: stable/10/lib/libthr/thread/thr_stack.c ============================================================================== --- stable/10/lib/libthr/thread/thr_stack.c Sat Aug 16 08:37:13 2014 (r270039) +++ stable/10/lib/libthr/thread/thr_stack.c Sat Aug 16 08:38:53 2014 (r270040) @@ -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 bz at FreeBSD.org Sat Aug 16 12:59:49 2014 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Sat, 16 Aug 2014 12:59:48 +0000 (UTC) Subject: svn commit: r270042 - in stable/10/sys: kern sys Message-ID: <201408161259.s7GCxmNT028776@svn.freebsd.org> Author: bz Date: Sat Aug 16 12:59:47 2014 New Revision: 270042 URL: http://svnweb.freebsd.org/changeset/base/270042 Log: MFC r269669: Split up sys_ktimer_getoverrun() into a sys_ and a kern_ variant and export the kern_ version needed by an upcoming linuxolator change. Sponsored by: DARPA,AFRL Modified: stable/10/sys/kern/kern_time.c stable/10/sys/sys/syscallsubr.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_time.c ============================================================================== --- stable/10/sys/kern/kern_time.c Sat Aug 16 10:47:24 2014 (r270041) +++ stable/10/sys/kern/kern_time.c Sat Aug 16 12:59:47 2014 (r270042) @@ -1361,13 +1361,20 @@ struct timer_getoverrun_args { int sys_ktimer_getoverrun(struct thread *td, struct ktimer_getoverrun_args *uap) { + + return (kern_ktimer_getoverrun(td, uap->timerid)); +} + +int +kern_ktimer_getoverrun(struct thread *td, int timer_id) +{ struct proc *p = td->td_proc; struct itimer *it; int error ; PROC_LOCK(p); - if (uap->timerid < 3 || - (it = itimer_find(p, uap->timerid)) == NULL) { + if (timer_id < 3 || + (it = itimer_find(p, timer_id)) == NULL) { PROC_UNLOCK(p); error = EINVAL; } else { Modified: stable/10/sys/sys/syscallsubr.h ============================================================================== --- stable/10/sys/sys/syscallsubr.h Sat Aug 16 10:47:24 2014 (r270041) +++ stable/10/sys/sys/syscallsubr.h Sat Aug 16 12:59:47 2014 (r270042) @@ -239,6 +239,7 @@ int kern_ktimer_settime(struct thread *t struct itimerspec *val, struct itimerspec *oval); int kern_ktimer_gettime(struct thread *td, int timer_id, struct itimerspec *val); +int kern_ktimer_getoverrun(struct thread *td, int timer_id); int kern_thr_new(struct thread *td, struct thr_param *param); int kern_thr_suspend(struct thread *td, struct timespec *tsp); int kern_truncate(struct thread *td, char *path, enum uio_seg pathseg, From bz at FreeBSD.org Sat Aug 16 13:06:12 2014 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Sat, 16 Aug 2014 13:06:11 +0000 (UTC) Subject: svn commit: r270043 - stable/10/sbin/mount_nfs Message-ID: <201408161306.s7GD6BlG033054@svn.freebsd.org> Author: bz Date: Sat Aug 16 13:06:11 2014 New Revision: 270043 URL: http://svnweb.freebsd.org/changeset/base/270043 Log: MFC r269583: Provide -o vers= support for mount_nfs. Our mount_nfs does use -o nfsv<2|3|4> or -2 or -3 to specify the version. OSX (these days), Solaris, and Linux use -o vers=<2,3,4>. With the upcoming autofs support we can make a lot of (entrerprisy) setups getting mount options from LDAP just work by providing -o vers= compatibility. Reviewed by: wblock, bjk (man page), rmacklem, emaste Sponsored by: DARPA,AFRL PR: 192379 Modified: stable/10/sbin/mount_nfs/mount_nfs.8 stable/10/sbin/mount_nfs/mount_nfs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/mount_nfs/mount_nfs.8 ============================================================================== --- stable/10/sbin/mount_nfs/mount_nfs.8 Sat Aug 16 12:59:47 2014 (r270042) +++ stable/10/sbin/mount_nfs/mount_nfs.8 Sat Aug 16 13:06:11 2014 (r270043) @@ -28,7 +28,7 @@ .\" @(#)mount_nfs.8 8.3 (Berkeley) 3/29/95 .\" $FreeBSD$ .\" -.Dd December 7, 2013 +.Dd August 5, 2014 .Dt MOUNT_NFS 8 .Os .Sh NAME @@ -371,6 +371,14 @@ tune the timeout interval.) .It Cm udp Use UDP transport. +.It Cm vers Ns = Ns Aq Ar vers_number +Use the specified version number for NFS requests. +See the +.Cm nfsv2 , +.Cm nfsv3 , +and +.Cm nfsv4 +options for details. .It Cm wcommitsize Ns = Ns Aq Ar value Set the maximum pending write commit size to the specified value. This determines the maximum amount of pending write data that the NFS @@ -466,6 +474,26 @@ Same as Same as .Fl o Cm retrans Ns = Ns Aq Ar value .El +.Pp +The following +.Fl o +named options are equivalent to other +.Fl o +named options and are supported for compatibility with other +operating systems (e.g., Linux, Solaris, and OSX) to ease usage of +.Xr autofs 5 +support. +.Bl -tag -width indent +.It Fl o Cm vers Ns = Ns 2 +Same as +.Fl o Cm nfsv2 +.It Fl o Cm vers Ns = Ns 3 +Same as +.Fl o Cm nfsv3 +.It Fl o Cm vers Ns = Ns 4 +Same as +.Fl o Cm nfsv4 +.El .Sh SEE ALSO .Xr nmount 2 , .Xr unmount 2 , Modified: stable/10/sbin/mount_nfs/mount_nfs.c ============================================================================== --- stable/10/sbin/mount_nfs/mount_nfs.c Sat Aug 16 12:59:47 2014 (r270042) +++ stable/10/sbin/mount_nfs/mount_nfs.c Sat Aug 16 13:06:11 2014 (r270043) @@ -310,6 +310,32 @@ main(int argc, char *argv[]) if (*p || num <= 0) errx(1, "illegal maxgroups value -- %s", val); //set_rpc_maxgrouplist(num); + } else if (strcmp(opt, "vers") == 0) { + num = strtol(val, &p, 10); + if (*p || num <= 0) + errx(1, "illegal vers value -- " + "%s", val); + switch (num) { + case 2: + mountmode = V2; + break; + case 3: + mountmode = V3; + build_iovec(&iov, &iovlen, + "nfsv3", NULL, 0); + break; + case 4: + mountmode = V4; + fstype = "nfs"; + nfsproto = IPPROTO_TCP; + if (portspec == NULL) + portspec = "2049"; + break; + default: + errx(1, "illegal nfs version " + "value -- %s", val); + } + pass_flag_to_nmount=0; } if (pass_flag_to_nmount) build_iovec(&iov, &iovlen, opt, val, From bz at FreeBSD.org Sat Aug 16 13:09:40 2014 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Sat, 16 Aug 2014 13:09:40 +0000 (UTC) Subject: svn commit: r270044 - stable/10/sys/netinet6 Message-ID: <201408161309.s7GD9ejb033510@svn.freebsd.org> Author: bz Date: Sat Aug 16 13:09:40 2014 New Revision: 270044 URL: http://svnweb.freebsd.org/changeset/base/270044 Log: MFC r259884: Correct warnings comparing unsigned variables < 0 constantly reported while building kernels. All instances removed are indeed unsigned so the expressions could not be true. Modified: stable/10/sys/netinet6/in6_mcast.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/in6_mcast.c ============================================================================== --- stable/10/sys/netinet6/in6_mcast.c Sat Aug 16 13:06:11 2014 (r270043) +++ stable/10/sys/netinet6/in6_mcast.c Sat Aug 16 13:09:40 2014 (r270044) @@ -1849,8 +1849,7 @@ in6p_join_group(struct inpcb *inp, struc if (mreq.ipv6mr_interface == 0) { ifp = in6p_lookup_mcast_ifp(inp, &gsa->sin6); } else { - if (mreq.ipv6mr_interface < 0 || - V_if_index < mreq.ipv6mr_interface) + if (V_if_index < mreq.ipv6mr_interface) return (EADDRNOTAVAIL); ifp = ifnet_byindex(mreq.ipv6mr_interface); } @@ -2194,7 +2193,7 @@ in6p_leave_group(struct inpcb *inp, stru * XXX SCOPE6 lock potentially taken here. */ if (ifindex != 0) { - if (ifindex < 0 || V_if_index < ifindex) + if (V_if_index < ifindex) return (EADDRNOTAVAIL); ifp = ifnet_byindex(ifindex); if (ifp == NULL) @@ -2349,7 +2348,7 @@ in6p_set_multicast_if(struct inpcb *inp, error = sooptcopyin(sopt, &ifindex, sizeof(u_int), sizeof(u_int)); if (error) return (error); - if (ifindex < 0 || V_if_index < ifindex) + if (V_if_index < ifindex) return (EINVAL); ifp = ifnet_byindex(ifindex); From bz at FreeBSD.org Sat Aug 16 13:12:00 2014 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Sat, 16 Aug 2014 13:11:59 +0000 (UTC) Subject: svn commit: r270045 - stable/10/sys/security/mac Message-ID: <201408161311.s7GDBxkg037046@svn.freebsd.org> Author: bz Date: Sat Aug 16 13:11:59 2014 New Revision: 270045 URL: http://svnweb.freebsd.org/changeset/base/270045 Log: MFC r259885: As constantly reported during kernel compilation, m_buflen is unsigned so can never be < 0. Remove the expression, which can never be true. Modified: stable/10/sys/security/mac/mac_framework.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/security/mac/mac_framework.c ============================================================================== --- stable/10/sys/security/mac/mac_framework.c Sat Aug 16 13:09:40 2014 (r270044) +++ stable/10/sys/security/mac/mac_framework.c Sat Aug 16 13:11:59 2014 (r270045) @@ -587,8 +587,7 @@ int mac_check_structmac_consistent(struct mac *mac) { - if (mac->m_buflen < 0 || - mac->m_buflen > MAC_MAX_LABEL_BUF_LEN) + if (mac->m_buflen > MAC_MAX_LABEL_BUF_LEN) return (EINVAL); return (0); From bz at FreeBSD.org Sat Aug 16 13:18:14 2014 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Sat, 16 Aug 2014 13:17:48 +0000 Subject: svn commit: r265946 - in stable/10: lib/libc/net sys/netinet sys/netinet6 sys/sys In-Reply-To: <201405130605.s4D65rsn092973@svn.freebsd.org> References: <201405130605.s4D65rsn092973@svn.freebsd.org> Message-ID: <13DBB4CD-1A87-4AD9-B1D9-8A709C143C20@FreeBSD.org> On 13 May 2014, at 06:05 , Kevin Lo wrote: > Author: kevlo > Date: Tue May 13 06:05:53 2014 > New Revision: 265946 > URL: http://svnweb.freebsd.org/changeset/base/265946 > > Log: > MFC r264212,r264213,r264248,r265776,r265811,r265909: Just for the records; this commit also merged unrelated r259887: Add more (IPv6) related Internet Protocols: - Host Identity Protocol (RFC5201) - Shim6 Protocol (RFC5533) - 2x experimentation and testing (RFC3692, RFC4727) This does not indicate interest to implement/support these protocols, but they are part of the "IPv6 Extension Header Types" [1] based on RFC7045 and might thus be needed by filtering and next header parsing implementations. References: [1] http://www.iana.org/assignments/ipv6-parameters Obtained from: http://www.iana.org/assignments/protocol-numbers > > - Add support for UDP-Lite protocol (RFC 3828) to IPv4 and IPv6 stacks. > Tested with vlc and a test suite [1]. > [1] http://www.erg.abdn.ac.uk/~gerrit/udp-lite/files/udplite_linux.tar.gz > > Reviewed by: jhb, glebius, adrian > > - Fix a logic bug which prevented the sending of UDP packet with 0 checksum. > > - Disable TX checksum offload for UDP-Lite completely. It wasn't used for > partial checksum coverage, but even for full checksum coverage it doesn't > work. > > Added: > stable/10/sys/netinet/udplite.h > - copied unchanged from r264212, head/sys/netinet/udplite.h > Modified: > stable/10/lib/libc/net/getaddrinfo.c > stable/10/sys/netinet/in.c > stable/10/sys/netinet/in.h > stable/10/sys/netinet/in_pcb.c > stable/10/sys/netinet/in_proto.c > stable/10/sys/netinet/udp_usrreq.c > stable/10/sys/netinet/udp_var.h > stable/10/sys/netinet6/in6_ifattach.c > stable/10/sys/netinet6/in6_proto.c > stable/10/sys/netinet6/udp6_usrreq.c > stable/10/sys/netinet6/udp6_var.h > stable/10/sys/sys/param.h > Directory Properties: > stable/10/ (props changed) > > Modified: stable/10/lib/libc/net/getaddrinfo.c > ============================================================================== > --- stable/10/lib/libc/net/getaddrinfo.c Tue May 13 05:26:43 2014 (r265945) > +++ stable/10/lib/libc/net/getaddrinfo.c Tue May 13 06:05:53 2014 (r265946) > @@ -170,12 +170,14 @@ static const struct explore explore[] = > { PF_INET6, SOCK_STREAM, IPPROTO_TCP, 0x07 }, > { PF_INET6, SOCK_STREAM, IPPROTO_SCTP, 0x03 }, > { PF_INET6, SOCK_SEQPACKET, IPPROTO_SCTP, 0x07 }, > + { PF_INET6, SOCK_DGRAM, IPPROTO_UDPLITE, 0x03 }, > { PF_INET6, SOCK_RAW, ANY, 0x05 }, > #endif > { PF_INET, SOCK_DGRAM, IPPROTO_UDP, 0x07 }, > { PF_INET, SOCK_STREAM, IPPROTO_TCP, 0x07 }, > { PF_INET, SOCK_STREAM, IPPROTO_SCTP, 0x03 }, > { PF_INET, SOCK_SEQPACKET, IPPROTO_SCTP, 0x07 }, > + { PF_INET, SOCK_DGRAM, IPPROTO_UDPLITE, 0x03 }, > { PF_INET, SOCK_RAW, ANY, 0x05 }, > { -1, 0, 0, 0 }, > }; > @@ -1477,6 +1479,9 @@ get_port(struct addrinfo *ai, const char > case IPPROTO_SCTP: > proto = "sctp"; > break; > + case IPPROTO_UDPLITE: > + proto = "udplite"; > + break; > default: > proto = NULL; > break; > > Modified: stable/10/sys/netinet/in.c > ============================================================================== > --- stable/10/sys/netinet/in.c Tue May 13 05:26:43 2014 (r265945) > +++ stable/10/sys/netinet/in.c Tue May 13 06:05:53 2014 (r265946) > @@ -1167,6 +1167,7 @@ in_ifdetach(struct ifnet *ifp) > > in_pcbpurgeif0(&V_ripcbinfo, ifp); > in_pcbpurgeif0(&V_udbinfo, ifp); > + in_pcbpurgeif0(&V_ulitecbinfo, ifp); > in_purgemaddrs(ifp); > } > > > Modified: stable/10/sys/netinet/in.h > ============================================================================== > --- stable/10/sys/netinet/in.h Tue May 13 05:26:43 2014 (r265945) > +++ stable/10/sys/netinet/in.h Tue May 13 06:05:53 2014 (r265946) > @@ -237,12 +237,17 @@ __END_DECLS > #define IPPROTO_IPCOMP 108 /* payload compression (IPComp) */ > #define IPPROTO_SCTP 132 /* SCTP */ > #define IPPROTO_MH 135 /* IPv6 Mobility Header */ > +#define IPPROTO_UDPLITE 136 /* UDP-Lite */ > +#define IPPROTO_HIP 139 /* IP6 Host Identity Protocol */ > +#define IPPROTO_SHIM6 140 /* IP6 Shim6 Protocol */ > /* 101-254: Partly Unassigned */ > #define IPPROTO_PIM 103 /* Protocol Independent Mcast */ > #define IPPROTO_CARP 112 /* CARP */ > #define IPPROTO_PGM 113 /* PGM */ > #define IPPROTO_MPLS 137 /* MPLS-in-IP */ > #define IPPROTO_PFSYNC 240 /* PFSYNC */ > +#define IPPROTO_RESERVED_253 253 /* Reserved */ > +#define IPPROTO_RESERVED_254 254 /* Reserved */ > /* 255: Reserved */ > /* BSD Private, local use, namespace incursion, no longer used */ > #define IPPROTO_OLD_DIVERT 254 /* OLD divert pseudo-proto */ > > Modified: stable/10/sys/netinet/in_pcb.c > ============================================================================== > --- stable/10/sys/netinet/in_pcb.c Tue May 13 05:26:43 2014 (r265945) > +++ stable/10/sys/netinet/in_pcb.c Tue May 13 06:05:53 2014 (r265946) > @@ -386,13 +386,14 @@ in_pcb_lport(struct inpcb *inp, struct i > lastport = &pcbinfo->ipi_lastport; > } > /* > - * For UDP, use random port allocation as long as the user > + * For UDP(-Lite), use random port allocation as long as the user > * allows it. For TCP (and as of yet unknown) connections, > * use random port allocation only if the user allows it AND > * ipport_tick() allows it. > */ > if (V_ipport_randomized && > - (!V_ipport_stoprandom || pcbinfo == &V_udbinfo)) > + (!V_ipport_stoprandom || pcbinfo == &V_udbinfo || > + pcbinfo == &V_ulitecbinfo)) > dorandom = 1; > else > dorandom = 0; > @@ -402,8 +403,8 @@ in_pcb_lport(struct inpcb *inp, struct i > */ > if (first == last) > dorandom = 0; > - /* Make sure to not include UDP packets in the count. */ > - if (pcbinfo != &V_udbinfo) > + /* Make sure to not include UDP(-Lite) packets in the count. */ > + if (pcbinfo != &V_udbinfo || pcbinfo != &V_ulitecbinfo) > V_ipport_tcpallocs++; > /* > * Instead of having two loops further down counting up or down > > Modified: stable/10/sys/netinet/in_proto.c > ============================================================================== > --- stable/10/sys/netinet/in_proto.c Tue May 13 05:26:43 2014 (r265945) > +++ stable/10/sys/netinet/in_proto.c Tue May 13 06:05:53 2014 (r265946) > @@ -184,6 +184,20 @@ struct protosw inetsw[] = { > }, > #endif /* SCTP */ > { > + .pr_type = SOCK_DGRAM, > + .pr_domain = &inetdomain, > + .pr_protocol = IPPROTO_UDPLITE, > + .pr_flags = PR_ATOMIC|PR_ADDR, > + .pr_input = udp_input, > + .pr_ctlinput = udplite_ctlinput, > + .pr_ctloutput = udp_ctloutput, > + .pr_init = udplite_init, > +#ifdef VIMAGE > + .pr_destroy = udplite_destroy, > +#endif > + .pr_usrreqs = &udp_usrreqs > +}, > +{ > .pr_type = SOCK_RAW, > .pr_domain = &inetdomain, > .pr_protocol = IPPROTO_RAW, > > Modified: stable/10/sys/netinet/udp_usrreq.c > ============================================================================== > --- stable/10/sys/netinet/udp_usrreq.c Tue May 13 05:26:43 2014 (r265945) > +++ stable/10/sys/netinet/udp_usrreq.c Tue May 13 06:05:53 2014 (r265946) > @@ -3,6 +3,7 @@ > * The Regents of the University of California. > * Copyright (c) 2008 Robert N. M. Watson > * Copyright (c) 2010-2011 Juniper Networks, Inc. > + * Copyright (c) 2014 Kevin Lo > * All rights reserved. > * > * Portions of this software were developed by Robert N. M. Watson under > @@ -87,6 +88,7 @@ __FBSDID("$FreeBSD$"); > #endif > #include > #include > +#include > > #ifdef IPSEC > #include > @@ -98,8 +100,9 @@ __FBSDID("$FreeBSD$"); > #include > > /* > - * UDP protocol implementation. > + * UDP and UDP-Lite protocols implementation. > * Per RFC 768, August, 1980. > + * Per RFC 3828, July, 2004. > */ > > /* > @@ -139,6 +142,8 @@ SYSCTL_ULONG(_net_inet_udp, UDPCTL_RECVS > > VNET_DEFINE(struct inpcbhead, udb); /* from udp_var.h */ > VNET_DEFINE(struct inpcbinfo, udbinfo); > +VNET_DEFINE(struct inpcbhead, ulitecb); > +VNET_DEFINE(struct inpcbinfo, ulitecbinfo); > static VNET_DEFINE(uma_zone_t, udpcb_zone); > #define V_udpcb_zone VNET(udpcb_zone) > > @@ -187,6 +192,16 @@ udp_inpcb_init(void *mem, int size, int > return (0); > } > > +static int > +udplite_inpcb_init(void *mem, int size, int flags) > +{ > + struct inpcb *inp; > + > + inp = mem; > + INP_LOCK_INIT(inp, "inp", "udpliteinp"); > + return (0); > +} > + > void > udp_init(void) > { > @@ -202,6 +217,15 @@ udp_init(void) > EVENTHANDLER_PRI_ANY); > } > > +void > +udplite_init(void) > +{ > + > + in_pcbinfo_init(&V_ulitecbinfo, "udplite", &V_ulitecb, UDBHASHSIZE, > + UDBHASHSIZE, "udplite_inpcb", udplite_inpcb_init, NULL, > + UMA_ZONE_NOFREE, IPI_HASHFIELDS_2TUPLE); > +} > + > /* > * Kernel module interface for updating udpstat. The argument is an index > * into udpstat treated as an array of u_long. While this encodes the > @@ -243,6 +267,13 @@ udp_destroy(void) > in_pcbinfo_destroy(&V_udbinfo); > uma_zdestroy(V_udpcb_zone); > } > + > +void > +udplite_destroy(void) > +{ > + > + in_pcbinfo_destroy(&V_ulitecbinfo); > +} > #endif > > #ifdef INET > @@ -346,9 +377,12 @@ udp_input(struct mbuf *m, int off) > struct ifnet *ifp; > struct inpcb *inp; > uint16_t len, ip_len; > + struct inpcbinfo *pcbinfo; > struct ip save_ip; > struct sockaddr_in udp_in; > struct m_tag *fwd_tag; > + int cscov_partial; > + uint8_t pr; > > ifp = m->m_pkthdr.rcvif; > UDPSTAT_INC(udps_ipackets); > @@ -368,13 +402,15 @@ udp_input(struct mbuf *m, int off) > */ > ip = mtod(m, struct ip *); > if (m->m_len < iphlen + sizeof(struct udphdr)) { > - if ((m = m_pullup(m, iphlen + sizeof(struct udphdr))) == 0) { > + if ((m = m_pullup(m, iphlen + sizeof(struct udphdr))) == NULL) { > UDPSTAT_INC(udps_hdrops); > return; > } > ip = mtod(m, struct ip *); > } > uh = (struct udphdr *)((caddr_t)ip + iphlen); > + pr = ip->ip_p; > + cscov_partial = (pr == IPPROTO_UDPLITE) ? 1 : 0; > > /* > * Destination port of 0 is illegal, based on RFC768. > @@ -398,12 +434,18 @@ udp_input(struct mbuf *m, int off) > */ > len = ntohs((u_short)uh->uh_ulen); > ip_len = ntohs(ip->ip_len) - iphlen; > + if (pr == IPPROTO_UDPLITE && len == 0) { > + /* Zero means checksum over the complete packet. */ > + len = ip_len; > + cscov_partial = 0; > + } > if (ip_len != len) { > if (len > ip_len || len < sizeof(struct udphdr)) { > UDPSTAT_INC(udps_badlen); > goto badunlocked; > } > - m_adj(m, len - ip_len); > + if (pr == IPPROTO_UDP) > + m_adj(m, len - ip_len); > } > > /* > @@ -421,20 +463,22 @@ udp_input(struct mbuf *m, int off) > if (uh->uh_sum) { > u_short uh_sum; > > - if (m->m_pkthdr.csum_flags & CSUM_DATA_VALID) { > + if ((m->m_pkthdr.csum_flags & CSUM_DATA_VALID) && > + !cscov_partial) { > if (m->m_pkthdr.csum_flags & CSUM_PSEUDO_HDR) > uh_sum = m->m_pkthdr.csum_data; > else > uh_sum = in_pseudo(ip->ip_src.s_addr, > ip->ip_dst.s_addr, htonl((u_short)len + > - m->m_pkthdr.csum_data + IPPROTO_UDP)); > + m->m_pkthdr.csum_data + pr)); > uh_sum ^= 0xffff; > } else { > char b[9]; > > bcopy(((struct ipovly *)ip)->ih_x1, b, 9); > bzero(((struct ipovly *)ip)->ih_x1, 9); > - ((struct ipovly *)ip)->ih_len = uh->uh_ulen; > + ((struct ipovly *)ip)->ih_len = (pr == IPPROTO_UDP) ? > + uh->uh_ulen : htons(ip_len); > uh_sum = in_cksum(m, len + sizeof (struct ip)); > bcopy(b, ((struct ipovly *)ip)->ih_x1, 9); > } > @@ -446,14 +490,17 @@ udp_input(struct mbuf *m, int off) > } else > UDPSTAT_INC(udps_nosum); > > + pcbinfo = get_inpcbinfo(pr); > if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr)) || > in_broadcast(ip->ip_dst, ifp)) { > struct inpcb *last; > + struct inpcbhead *pcblist; > struct ip_moptions *imo; > > - INP_INFO_RLOCK(&V_udbinfo); > + INP_INFO_RLOCK(pcbinfo); > + pcblist = get_pcblist(pr); > last = NULL; > - LIST_FOREACH(inp, &V_udb, inp_list) { > + LIST_FOREACH(inp, pcblist, inp_list) { > if (inp->inp_lport != uh->uh_dport) > continue; > #ifdef INET6 > @@ -539,12 +586,12 @@ udp_input(struct mbuf *m, int off) > UDPSTAT_INC(udps_noportbcast); > if (inp) > INP_RUNLOCK(inp); > - INP_INFO_RUNLOCK(&V_udbinfo); > + INP_INFO_RUNLOCK(pcbinfo); > goto badunlocked; > } > udp_append(last, ip, m, iphlen, &udp_in); > INP_RUNLOCK(last); > - INP_INFO_RUNLOCK(&V_udbinfo); > + INP_INFO_RUNLOCK(pcbinfo); > return; > } > > @@ -565,7 +612,7 @@ udp_input(struct mbuf *m, int off) > * Transparently forwarded. Pretend to be the destination. > * Already got one like this? > */ > - inp = in_pcblookup_mbuf(&V_udbinfo, ip->ip_src, uh->uh_sport, > + inp = in_pcblookup_mbuf(pcbinfo, ip->ip_src, uh->uh_sport, > ip->ip_dst, uh->uh_dport, INPLOOKUP_RLOCKPCB, ifp, m); > if (!inp) { > /* > @@ -573,7 +620,7 @@ udp_input(struct mbuf *m, int off) > * Because we've rewritten the destination address, > * any hardware-generated hash is ignored. > */ > - inp = in_pcblookup(&V_udbinfo, ip->ip_src, > + inp = in_pcblookup(pcbinfo, ip->ip_src, > uh->uh_sport, next_hop->sin_addr, > next_hop->sin_port ? htons(next_hop->sin_port) : > uh->uh_dport, INPLOOKUP_WILDCARD | > @@ -583,7 +630,7 @@ udp_input(struct mbuf *m, int off) > m_tag_delete(m, fwd_tag); > m->m_flags &= ~M_IP_NEXTHOP; > } else > - inp = in_pcblookup_mbuf(&V_udbinfo, ip->ip_src, uh->uh_sport, > + inp = in_pcblookup_mbuf(pcbinfo, ip->ip_src, uh->uh_sport, > ip->ip_dst, uh->uh_dport, INPLOOKUP_WILDCARD | > INPLOOKUP_RLOCKPCB, ifp, m); > if (inp == NULL) { > @@ -619,6 +666,16 @@ udp_input(struct mbuf *m, int off) > m_freem(m); > return; > } > + if (cscov_partial) { > + struct udpcb *up; > + > + up = intoudpcb(inp); > + if (up->u_rxcslen > len) { > + INP_RUNLOCK(inp); > + m_freem(m); > + return; > + } > + } > > UDP_PROBE(receive, NULL, inp, ip, inp, uh); > udp_append(inp, ip, m, iphlen, &udp_in); > @@ -653,8 +710,9 @@ udp_notify(struct inpcb *inp, int errno) > } > > #ifdef INET > -void > -udp_ctlinput(int cmd, struct sockaddr *sa, void *vip) > +static void > +udp_common_ctlinput(int cmd, struct sockaddr *sa, void *vip, > + struct inpcbinfo *pcbinfo) > { > struct ip *ip = vip; > struct udphdr *uh; > @@ -683,7 +741,7 @@ udp_ctlinput(int cmd, struct sockaddr *s > return; > if (ip != NULL) { > uh = (struct udphdr *)((caddr_t)ip + (ip->ip_hl << 2)); > - inp = in_pcblookup(&V_udbinfo, faddr, uh->uh_dport, > + inp = in_pcblookup(pcbinfo, faddr, uh->uh_dport, > ip->ip_src, uh->uh_sport, INPLOOKUP_RLOCKPCB, NULL); > if (inp != NULL) { > INP_RLOCK_ASSERT(inp); > @@ -693,9 +751,22 @@ udp_ctlinput(int cmd, struct sockaddr *s > INP_RUNLOCK(inp); > } > } else > - in_pcbnotifyall(&V_udbinfo, faddr, inetctlerrmap[cmd], > + in_pcbnotifyall(pcbinfo, faddr, inetctlerrmap[cmd], > udp_notify); > } > +void > +udp_ctlinput(int cmd, struct sockaddr *sa, void *vip) > +{ > + > + return (udp_common_ctlinput(cmd, sa, vip, &V_udbinfo)); > +} > + > +void > +udplite_ctlinput(int cmd, struct sockaddr *sa, void *vip) > +{ > + > + return (udp_common_ctlinput(cmd, sa, vip, &V_ulitecbinfo)); > +} > #endif /* INET */ > > static int > @@ -851,16 +922,16 @@ SYSCTL_PROC(_net_inet_udp, OID_AUTO, get > int > udp_ctloutput(struct socket *so, struct sockopt *sopt) > { > - int error = 0, optval; > struct inpcb *inp; > -#ifdef IPSEC_NAT_T > struct udpcb *up; > -#endif > + int isudplite, error, optval; > > + error = 0; > + isudplite = (so->so_proto->pr_protocol == IPPROTO_UDPLITE) ? 1 : 0; > inp = sotoinpcb(so); > KASSERT(inp != NULL, ("%s: inp == NULL", __func__)); > INP_WLOCK(inp); > - if (sopt->sopt_level != IPPROTO_UDP) { > + if (sopt->sopt_level != so->so_proto->pr_protocol) { > #ifdef INET6 > if (INP_CHECK_SOCKAF(so, AF_INET6)) { > INP_WUNLOCK(inp); > @@ -918,6 +989,34 @@ udp_ctloutput(struct socket *so, struct > } > INP_WUNLOCK(inp); > break; > + case UDPLITE_SEND_CSCOV: > + case UDPLITE_RECV_CSCOV: > + if (!isudplite) { > + INP_WUNLOCK(inp); > + error = ENOPROTOOPT; > + break; > + } > + INP_WUNLOCK(inp); > + error = sooptcopyin(sopt, &optval, sizeof(optval), > + sizeof(optval)); > + if (error != 0) > + break; > + inp = sotoinpcb(so); > + KASSERT(inp != NULL, ("%s: inp == NULL", __func__)); > + INP_WLOCK(inp); > + up = intoudpcb(inp); > + KASSERT(up != NULL, ("%s: up == NULL", __func__)); > + if (optval != 0 && optval < 8) { > + INP_WUNLOCK(inp); > + error = EINVAL; > + break; > + } > + if (sopt->sopt_name == UDPLITE_SEND_CSCOV) > + up->u_txcslen = optval; > + else > + up->u_rxcslen = optval; > + INP_WUNLOCK(inp); > + break; > default: > INP_WUNLOCK(inp); > error = ENOPROTOOPT; > @@ -935,6 +1034,22 @@ udp_ctloutput(struct socket *so, struct > error = sooptcopyout(sopt, &optval, sizeof optval); > break; > #endif > + case UDPLITE_SEND_CSCOV: > + case UDPLITE_RECV_CSCOV: > + if (!isudplite) { > + INP_WUNLOCK(inp); > + error = ENOPROTOOPT; > + break; > + } > + up = intoudpcb(inp); > + KASSERT(up != NULL, ("%s: up == NULL", __func__)); > + if (sopt->sopt_name == UDPLITE_SEND_CSCOV) > + optval = up->u_txcslen; > + else > + optval = up->u_rxcslen; > + INP_WUNLOCK(inp); > + error = sooptcopyout(sopt, &optval, sizeof(optval)); > + break; > default: > INP_WUNLOCK(inp); > error = ENOPROTOOPT; > @@ -957,12 +1072,16 @@ udp_output(struct inpcb *inp, struct mbu > int len = m->m_pkthdr.len; > struct in_addr faddr, laddr; > struct cmsghdr *cm; > + struct inpcbinfo *pcbinfo; > struct sockaddr_in *sin, src; > + int cscov_partial = 0; > int error = 0; > int ipflags; > u_short fport, lport; > int unlock_udbinfo; > u_char tos; > + uint8_t pr; > + uint16_t cscov = 0; > > /* > * udp_output() may need to temporarily bind or connect the current > @@ -1057,12 +1176,14 @@ udp_output(struct inpcb *inp, struct mbu > * > * XXXRW: Check that hash locking update here is correct. > */ > + pr = inp->inp_socket->so_proto->pr_protocol; > + pcbinfo = get_inpcbinfo(pr); > sin = (struct sockaddr_in *)addr; > if (sin != NULL && > (inp->inp_laddr.s_addr == INADDR_ANY && inp->inp_lport == 0)) { > INP_RUNLOCK(inp); > INP_WLOCK(inp); > - INP_HASH_WLOCK(&V_udbinfo); > + INP_HASH_WLOCK(pcbinfo); > unlock_udbinfo = UH_WLOCKED; > } else if ((sin != NULL && ( > (sin->sin_addr.s_addr == INADDR_ANY) || > @@ -1070,7 +1191,7 @@ udp_output(struct inpcb *inp, struct mbu > (inp->inp_laddr.s_addr == INADDR_ANY) || > (inp->inp_lport == 0))) || > (src.sin_family == AF_INET)) { > - INP_HASH_RLOCK(&V_udbinfo); > + INP_HASH_RLOCK(pcbinfo); > unlock_udbinfo = UH_RLOCKED; > } else > unlock_udbinfo = UH_UNLOCKED; > @@ -1083,7 +1204,7 @@ udp_output(struct inpcb *inp, struct mbu > laddr = inp->inp_laddr; > lport = inp->inp_lport; > if (src.sin_family == AF_INET) { > - INP_HASH_LOCK_ASSERT(&V_udbinfo); > + INP_HASH_LOCK_ASSERT(pcbinfo); > if ((lport == 0) || > (laddr.s_addr == INADDR_ANY && > src.sin_addr.s_addr == INADDR_ANY)) { > @@ -1134,7 +1255,7 @@ udp_output(struct inpcb *inp, struct mbu > inp->inp_lport == 0 || > sin->sin_addr.s_addr == INADDR_ANY || > sin->sin_addr.s_addr == INADDR_BROADCAST) { > - INP_HASH_LOCK_ASSERT(&V_udbinfo); > + INP_HASH_LOCK_ASSERT(pcbinfo); > error = in_pcbconnect_setup(inp, addr, &laddr.s_addr, > &lport, &faddr.s_addr, &fport, NULL, > td->td_ucred); > @@ -1149,7 +1270,7 @@ udp_output(struct inpcb *inp, struct mbu > if (inp->inp_laddr.s_addr == INADDR_ANY && > inp->inp_lport == 0) { > INP_WLOCK_ASSERT(inp); > - INP_HASH_WLOCK_ASSERT(&V_udbinfo); > + INP_HASH_WLOCK_ASSERT(pcbinfo); > /* > * Remember addr if jailed, to prevent > * rebinding. > @@ -1198,13 +1319,30 @@ udp_output(struct inpcb *inp, struct mbu > */ > ui = mtod(m, struct udpiphdr *); > bzero(ui->ui_x1, sizeof(ui->ui_x1)); /* XXX still needed? */ > - ui->ui_v = IPVERSION << 4; > - ui->ui_pr = IPPROTO_UDP; > + ui->ui_pr = pr; > ui->ui_src = laddr; > ui->ui_dst = faddr; > ui->ui_sport = lport; > ui->ui_dport = fport; > ui->ui_ulen = htons((u_short)len + sizeof(struct udphdr)); > + if (pr == IPPROTO_UDPLITE) { > + struct udpcb *up; > + uint16_t plen; > + > + up = intoudpcb(inp); > + cscov = up->u_txcslen; > + plen = (u_short)len + sizeof(struct udphdr); > + if (cscov >= plen) > + cscov = 0; > + ui->ui_len = htons(plen); > + ui->ui_ulen = htons(cscov); > + /* > + * For UDP-Lite, checksum coverage length of zero means > + * the entire UDPLite packet is covered by the checksum. > + */ > + cscov_partial = (cscov == 0) ? 0 : 1; > + } else > + ui->ui_v = IPVERSION << 4; > > /* > * Set the Don't Fragment bit in the IP header. > @@ -1231,24 +1369,34 @@ udp_output(struct inpcb *inp, struct mbu > /* > * Set up checksum and output datagram. > */ > - if (V_udp_cksum) { > + ui->ui_sum = 0; > + if (pr == IPPROTO_UDPLITE) { > + if (inp->inp_flags & INP_ONESBCAST) > + faddr.s_addr = INADDR_BROADCAST; > + if (cscov_partial) { > + if ((ui->ui_sum = in_cksum(m, sizeof(struct ip) + cscov)) == 0) > + ui->ui_sum = 0xffff; > + } else { > + if ((ui->ui_sum = in_cksum(m, sizeof(struct udpiphdr) + len)) == 0) > + ui->ui_sum = 0xffff; > + } > + } else if (V_udp_cksum) { > if (inp->inp_flags & INP_ONESBCAST) > faddr.s_addr = INADDR_BROADCAST; > ui->ui_sum = in_pseudo(ui->ui_src.s_addr, faddr.s_addr, > - htons((u_short)len + sizeof(struct udphdr) + IPPROTO_UDP)); > + htons((u_short)len + sizeof(struct udphdr) + pr)); > m->m_pkthdr.csum_flags = CSUM_UDP; > m->m_pkthdr.csum_data = offsetof(struct udphdr, uh_sum); > - } else > - ui->ui_sum = 0; > + } > ((struct ip *)ui)->ip_len = htons(sizeof(struct udpiphdr) + len); > ((struct ip *)ui)->ip_ttl = inp->inp_ip_ttl; /* XXX */ > ((struct ip *)ui)->ip_tos = tos; /* XXX */ > UDPSTAT_INC(udps_opackets); > > if (unlock_udbinfo == UH_WLOCKED) > - INP_HASH_WUNLOCK(&V_udbinfo); > + INP_HASH_WUNLOCK(pcbinfo); > else if (unlock_udbinfo == UH_RLOCKED) > - INP_HASH_RUNLOCK(&V_udbinfo); > + INP_HASH_RUNLOCK(pcbinfo); > UDP_PROBE(send, NULL, inp, &ui->ui_i, inp, &ui->ui_u); > error = ip_output(m, inp->inp_options, NULL, ipflags, > inp->inp_moptions, inp); > @@ -1260,10 +1408,10 @@ udp_output(struct inpcb *inp, struct mbu > > release: > if (unlock_udbinfo == UH_WLOCKED) { > - INP_HASH_WUNLOCK(&V_udbinfo); > + INP_HASH_WUNLOCK(pcbinfo); > INP_WUNLOCK(inp); > } else if (unlock_udbinfo == UH_RLOCKED) { > - INP_HASH_RUNLOCK(&V_udbinfo); > + INP_HASH_RUNLOCK(pcbinfo); > INP_RUNLOCK(inp); > } else > INP_RUNLOCK(inp); > @@ -1410,15 +1558,17 @@ static void > udp_abort(struct socket *so) > { > struct inpcb *inp; > + struct inpcbinfo *pcbinfo; > > + pcbinfo = get_inpcbinfo(so->so_proto->pr_protocol); > inp = sotoinpcb(so); > KASSERT(inp != NULL, ("udp_abort: inp == NULL")); > INP_WLOCK(inp); > if (inp->inp_faddr.s_addr != INADDR_ANY) { > - INP_HASH_WLOCK(&V_udbinfo); > + INP_HASH_WLOCK(pcbinfo); > in_pcbdisconnect(inp); > inp->inp_laddr.s_addr = INADDR_ANY; > - INP_HASH_WUNLOCK(&V_udbinfo); > + INP_HASH_WUNLOCK(pcbinfo); > soisdisconnected(so); > } > INP_WUNLOCK(inp); > @@ -1428,17 +1578,19 @@ static int > udp_attach(struct socket *so, int proto, struct thread *td) > { > struct inpcb *inp; > + struct inpcbinfo *pcbinfo; > int error; > > + pcbinfo = get_inpcbinfo(so->so_proto->pr_protocol); > inp = sotoinpcb(so); > KASSERT(inp == NULL, ("udp_attach: inp != NULL")); > error = soreserve(so, udp_sendspace, udp_recvspace); > if (error) > return (error); > - INP_INFO_WLOCK(&V_udbinfo); > - error = in_pcballoc(so, &V_udbinfo); > + INP_INFO_WLOCK(pcbinfo); > + error = in_pcballoc(so, pcbinfo); > if (error) { > - INP_INFO_WUNLOCK(&V_udbinfo); > + INP_INFO_WUNLOCK(pcbinfo); > return (error); > } > > @@ -1450,12 +1602,12 @@ udp_attach(struct socket *so, int proto, > if (error) { > in_pcbdetach(inp); > in_pcbfree(inp); > - INP_INFO_WUNLOCK(&V_udbinfo); > + INP_INFO_WUNLOCK(pcbinfo); > return (error); > } > > INP_WUNLOCK(inp); > - INP_INFO_WUNLOCK(&V_udbinfo); > + INP_INFO_WUNLOCK(pcbinfo); > return (0); > } > #endif /* INET */ > @@ -1486,14 +1638,16 @@ static int > udp_bind(struct socket *so, struct sockaddr *nam, struct thread *td) > { > struct inpcb *inp; > + struct inpcbinfo *pcbinfo; > int error; > > + pcbinfo = get_inpcbinfo(so->so_proto->pr_protocol); > inp = sotoinpcb(so); > KASSERT(inp != NULL, ("udp_bind: inp == NULL")); > INP_WLOCK(inp); > - INP_HASH_WLOCK(&V_udbinfo); > + INP_HASH_WLOCK(pcbinfo); > error = in_pcbbind(inp, nam, td->td_ucred); > - INP_HASH_WUNLOCK(&V_udbinfo); > + INP_HASH_WUNLOCK(pcbinfo); > INP_WUNLOCK(inp); > return (error); > } > @@ -1502,15 +1656,17 @@ static void > udp_close(struct socket *so) > { > struct inpcb *inp; > + struct inpcbinfo *pcbinfo; > > + pcbinfo = get_inpcbinfo(so->so_proto->pr_protocol); > inp = sotoinpcb(so); > KASSERT(inp != NULL, ("udp_close: inp == NULL")); > INP_WLOCK(inp); > if (inp->inp_faddr.s_addr != INADDR_ANY) { > - INP_HASH_WLOCK(&V_udbinfo); > + INP_HASH_WLOCK(pcbinfo); > in_pcbdisconnect(inp); > inp->inp_laddr.s_addr = INADDR_ANY; > - INP_HASH_WUNLOCK(&V_udbinfo); > + INP_HASH_WUNLOCK(pcbinfo); > soisdisconnected(so); > } > INP_WUNLOCK(inp); > @@ -1520,9 +1676,11 @@ static int > udp_connect(struct socket *so, struct sockaddr *nam, struct thread *td) > { > struct inpcb *inp; > - int error; > + struct inpcbinfo *pcbinfo; > struct sockaddr_in *sin; > + int error; > > + pcbinfo = get_inpcbinfo(so->so_proto->pr_protocol); > inp = sotoinpcb(so); > KASSERT(inp != NULL, ("udp_connect: inp == NULL")); > INP_WLOCK(inp); > @@ -1536,9 +1694,9 @@ udp_connect(struct socket *so, struct so > INP_WUNLOCK(inp); > return (error); > } > - INP_HASH_WLOCK(&V_udbinfo); > + INP_HASH_WLOCK(pcbinfo); > error = in_pcbconnect(inp, nam, td->td_ucred); > - INP_HASH_WUNLOCK(&V_udbinfo); > + INP_HASH_WUNLOCK(pcbinfo); > if (error == 0) > soisconnected(so); > INP_WUNLOCK(inp); > @@ -1549,20 +1707,22 @@ static void > udp_detach(struct socket *so) > { > struct inpcb *inp; > + struct inpcbinfo *pcbinfo; > struct udpcb *up; > > + pcbinfo = get_inpcbinfo(so->so_proto->pr_protocol); > inp = sotoinpcb(so); > KASSERT(inp != NULL, ("udp_detach: inp == NULL")); > KASSERT(inp->inp_faddr.s_addr == INADDR_ANY, > ("udp_detach: not disconnected")); > - INP_INFO_WLOCK(&V_udbinfo); > + INP_INFO_WLOCK(pcbinfo); > INP_WLOCK(inp); > up = intoudpcb(inp); > KASSERT(up != NULL, ("%s: up == NULL", __func__)); > inp->inp_ppcb = NULL; > in_pcbdetach(inp); > in_pcbfree(inp); > - INP_INFO_WUNLOCK(&V_udbinfo); > + INP_INFO_WUNLOCK(pcbinfo); > udp_discardcb(up); > } > > @@ -1570,7 +1730,9 @@ static int > udp_disconnect(struct socket *so) > { > struct inpcb *inp; > + struct inpcbinfo *pcbinfo; > > + pcbinfo = get_inpcbinfo(so->so_proto->pr_protocol); > inp = sotoinpcb(so); > KASSERT(inp != NULL, ("udp_disconnect: inp == NULL")); > INP_WLOCK(inp); > @@ -1578,10 +1740,10 @@ udp_disconnect(struct socket *so) > INP_WUNLOCK(inp); > return (ENOTCONN); > } > - INP_HASH_WLOCK(&V_udbinfo); > + INP_HASH_WLOCK(pcbinfo); > in_pcbdisconnect(inp); > inp->inp_laddr.s_addr = INADDR_ANY; > - INP_HASH_WUNLOCK(&V_udbinfo); > + INP_HASH_WUNLOCK(pcbinfo); > SOCK_LOCK(so); > so->so_state &= ~SS_ISCONNECTED; /* XXX */ > SOCK_UNLOCK(so); > > Modified: stable/10/sys/netinet/udp_var.h > ============================================================================== > --- stable/10/sys/netinet/udp_var.h Tue May 13 05:26:43 2014 (r265945) > +++ stable/10/sys/netinet/udp_var.h Tue May 13 06:05:53 2014 (r265946) > @@ -63,6 +63,8 @@ typedef void(*udp_tun_func_t)(struct mbu > struct udpcb { > udp_tun_func_t u_tun_func; /* UDP kernel tunneling callback. */ > u_int u_flags; /* Generic UDP flags. */ > + uint16_t u_rxcslen; /* Coverage for incoming datagrams. */ > + uint16_t u_txcslen; /* Coverage for outgoing datagrams. */ > }; > > #define intoudpcb(ip) ((struct udpcb *)(ip)->inp_ppcb) > @@ -130,8 +132,12 @@ SYSCTL_DECL(_net_inet_udp); > extern struct pr_usrreqs udp_usrreqs; > VNET_DECLARE(struct inpcbhead, udb); > VNET_DECLARE(struct inpcbinfo, udbinfo); > +VNET_DECLARE(struct inpcbhead, ulitecb); > +VNET_DECLARE(struct inpcbinfo, ulitecbinfo); > #define V_udb VNET(udb) > #define V_udbinfo VNET(udbinfo) > +#define V_ulitecb VNET(ulitecb) > +#define V_ulitecbinfo VNET(ulitecbinfo) > > extern u_long udp_sendspace; > extern u_long udp_recvspace; > @@ -141,20 +147,37 @@ VNET_DECLARE(int, udp_blackhole); > #define V_udp_blackhole VNET(udp_blackhole) > extern int udp_log_in_vain; > > -int udp_newudpcb(struct inpcb *); > -void udp_discardcb(struct udpcb *); > - > -void udp_ctlinput(int, struct sockaddr *, void *); > -int udp_ctloutput(struct socket *, struct sockopt *); > -void udp_init(void); > +static __inline struct inpcbinfo * > +get_inpcbinfo(uint8_t protocol) > +{ > + return (protocol == IPPROTO_UDP) ? &V_udbinfo : &V_ulitecbinfo; > +} > + > +static __inline struct inpcbhead * > +get_pcblist(uint8_t protocol) > +{ > + return (protocol == IPPROTO_UDP) ? &V_udb : &V_ulitecb; > +} > + > +int udp_newudpcb(struct inpcb *); > +void udp_discardcb(struct udpcb *); > + > +void udp_ctlinput(int, struct sockaddr *, void *); > +void udplite_ctlinput(int, struct sockaddr *, void *); > +int udp_ctloutput(struct socket *, struct sockopt *); > +void udp_init(void); > +void udplite_init(void); > #ifdef VIMAGE > -void udp_destroy(void); > +void udp_destroy(void); > +void udplite_destroy(void); > #endif > -void udp_input(struct mbuf *, int); > +void udp_input(struct mbuf *, int); > +void udplite_input(struct mbuf *, int); > struct inpcb *udp_notify(struct inpcb *inp, int errno); > -int udp_shutdown(struct socket *so); > +int udp_shutdown(struct socket *so); > > -int udp_set_kernel_tunneling(struct socket *so, udp_tun_func_t f); > -#endif > +int udp_set_kernel_tunneling(struct socket *so, udp_tun_func_t f); > > -#endif > +#endif /* _KERNEL */ > + > +#endif /* _NETINET_UDP_VAR_H_ */ > > Copied: stable/10/sys/netinet/udplite.h (from r264212, head/sys/netinet/udplite.h) > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ stable/10/sys/netinet/udplite.h Tue May 13 06:05:53 2014 (r265946, copy of r264212, head/sys/netinet/udplite.h) > @@ -0,0 +1,38 @@ > +/*- > + * Copyright (c) 2014, Kevin Lo > + * 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 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 > + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS 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$ > + */ > + > +#ifndef _NETINET_UDPLITE_H_ > +#define _NETINET_UDPLITE_H_ > + > +/* > + * User-settable options (used with setsockopt). > + */ > +#define UDPLITE_SEND_CSCOV 2 /* Sender checksum coverage. */ > +#define UDPLITE_RECV_CSCOV 4 /* Receiver checksum coverage. */ > + > +#endif /* !_NETINET_UDPLITE_H_ */ > > Modified: stable/10/sys/netinet6/in6_ifattach.c > ============================================================================== > --- stable/10/sys/netinet6/in6_ifattach.c Tue May 13 05:26:43 2014 (r265945) > +++ stable/10/sys/netinet6/in6_ifattach.c Tue May 13 06:05:53 2014 (r265946) > @@ -856,6 +856,7 @@ in6_ifdetach(struct ifnet *ifp) > } > > in6_pcbpurgeif0(&V_udbinfo, ifp); > + in6_pcbpurgeif0(&V_ulitecbinfo, ifp); > in6_pcbpurgeif0(&V_ripcbinfo, ifp); > /* leave from all multicast groups joined */ > in6_purgemaddrs(ifp); > > Modified: stable/10/sys/netinet6/in6_proto.c > ============================================================================== > --- stable/10/sys/netinet6/in6_proto.c Tue May 13 05:26:43 2014 (r265945) > +++ stable/10/sys/netinet6/in6_proto.c Tue May 13 06:05:53 2014 (r265946) > @@ -207,13 +207,26 @@ struct ip6protosw inet6sw[] = { > .pr_protocol = IPPROTO_SCTP, > .pr_flags = PR_WANTRCVD, > .pr_input = sctp6_input, > - .pr_ctlinput = sctp6_ctlinput, > + .pr_ctlinput = sctp6_ctlinput, > .pr_ctloutput = sctp_ctloutput, > .pr_drain = sctp_drain, > .pr_usrreqs = &sctp6_usrreqs > }, > #endif /* SCTP */ > { > + .pr_type = SOCK_DGRAM, > + .pr_domain = &inet6domain, > + .pr_protocol = IPPROTO_UDPLITE, > + .pr_flags = PR_ATOMIC|PR_ADDR, > + .pr_input = udp6_input, > + .pr_ctlinput = udplite6_ctlinput, > + .pr_ctloutput = udp_ctloutput, > +#ifndef INET /* Do not call initialization twice. */ > + .pr_init = udplite_init, > +#endif > + .pr_usrreqs = &udp6_usrreqs, > +}, > +{ > .pr_type = SOCK_RAW, > .pr_domain = &inet6domain, > .pr_protocol = IPPROTO_RAW, > > Modified: stable/10/sys/netinet6/udp6_usrreq.c > ============================================================================== > --- stable/10/sys/netinet6/udp6_usrreq.c Tue May 13 05:26:43 2014 (r265945) > +++ stable/10/sys/netinet6/udp6_usrreq.c Tue May 13 06:05:53 2014 (r265946) > @@ -1,6 +1,7 @@ > /*- > * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. > * Copyright (c) 2010-2011 Juniper Networks, Inc. > + * Copyright (c) 2014 Kevin Lo > * All rights reserved. > * > * Portions of this software were developed by Robert N. M. Watson under > @@ -109,6 +110,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > > #include > #include > @@ -181,12 +183,15 @@ udp6_input(struct mbuf **mp, int *offp, > struct ip6_hdr *ip6; > struct udphdr *uh; > struct inpcb *inp; > + struct inpcbinfo *pcbinfo; > struct udpcb *up; > int off = *offp; > + int cscov_partial; > int plen, ulen; > struct sockaddr_in6 fromsa; > struct m_tag *fwd_tag; > uint16_t uh_sum; > + uint8_t nxt; > > ifp = m->m_pkthdr.rcvif; > ip6 = mtod(m, struct ip6_hdr *); > @@ -218,6 +223,13 @@ udp6_input(struct mbuf **mp, int *offp, > plen = ntohs(ip6->ip6_plen) - off + sizeof(*ip6); > ulen = ntohs((u_short)uh->uh_ulen); > > + nxt = ip6->ip6_nxt; > + cscov_partial = (nxt == IPPROTO_UDPLITE) ? 1 : 0; > + if (nxt == IPPROTO_UDPLITE && ulen == 0) { > + /* Zero means checksum over the complete packet. */ > + ulen = plen; > + cscov_partial = 0; > + } > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > ? Bjoern A. Zeeb "Come on. Learn, goddamn it.", WarGames, 1983 From bz at FreeBSD.org Sat Aug 16 13:20:46 2014 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Sat, 16 Aug 2014 13:20:44 +0000 (UTC) Subject: svn commit: r270047 - stable/10/sbin/pfctl Message-ID: <201408161320.s7GDKjYJ038831@svn.freebsd.org> Author: bz Date: Sat Aug 16 13:20:44 2014 New Revision: 270047 URL: http://svnweb.freebsd.org/changeset/base/270047 Log: MFC r259916: Use feature_present(3) to determine whether to open an INET or an INET6 socket when needed to allow pfctl to work on noinet and noinet6 kernels (and try to provide a fallback using AF_LINK as best effort). Adjust the Makefile to also respect relevant src.conf(5) options for compile time decisions on INET and INET6 support. Reviewed by: glebius (no objections) Modified: stable/10/sbin/pfctl/Makefile stable/10/sbin/pfctl/pfctl_altq.c stable/10/sbin/pfctl/pfctl_parser.c stable/10/sbin/pfctl/pfctl_parser.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/pfctl/Makefile ============================================================================== --- stable/10/sbin/pfctl/Makefile Sat Aug 16 13:13:17 2014 (r270046) +++ stable/10/sbin/pfctl/Makefile Sat Aug 16 13:20:44 2014 (r270047) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + # pf_ruleset.c is shared between kernel and pfctl .PATH: ${.CURDIR}/../../sys/netpfil/pf @@ -16,6 +18,14 @@ CFLAGS+= -Wall -Wmissing-prototypes -Wno CFLAGS+= -Wstrict-prototypes CFLAGS+= -DENABLE_ALTQ -I${.CURDIR} +# Need to use "WITH_" prefix to not conflict with the l/y INET/INET6 keywords +.if ${MK_INET6_SUPPORT} != "no" +CFLAGS+= -DWITH_INET6 +.endif +.if ${MK_INET_SUPPORT} != "no" +CFLAGS+= -DWITH_INET +.endif + YFLAGS= LDADD+= -lm -lmd Modified: stable/10/sbin/pfctl/pfctl_altq.c ============================================================================== --- stable/10/sbin/pfctl/pfctl_altq.c Sat Aug 16 13:13:17 2014 (r270046) +++ stable/10/sbin/pfctl/pfctl_altq.c Sat Aug 16 13:20:44 2014 (r270047) @@ -1122,7 +1122,7 @@ getifspeed(char *ifname) struct ifreq ifr; struct if_data ifrdat; - if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) + if ((s = socket(get_socket_domain(), SOCK_DGRAM, 0)) < 0) err(1, "socket"); bzero(&ifr, sizeof(ifr)); if (strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)) >= @@ -1143,7 +1143,7 @@ getifmtu(char *ifname) int s; struct ifreq ifr; - if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) + if ((s = socket(get_socket_domain(), SOCK_DGRAM, 0)) < 0) err(1, "socket"); bzero(&ifr, sizeof(ifr)); if (strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)) >= Modified: stable/10/sbin/pfctl/pfctl_parser.c ============================================================================== --- stable/10/sbin/pfctl/pfctl_parser.c Sat Aug 16 13:13:17 2014 (r270046) +++ stable/10/sbin/pfctl/pfctl_parser.c Sat Aug 16 13:20:44 2014 (r270047) @@ -1231,6 +1231,26 @@ ifa_load(void) freeifaddrs(ifap); } +int +get_socket_domain(void) +{ + int sdom; + + sdom = AF_UNSPEC; +#ifdef WITH_INET6 + if (sdom == AF_UNSPEC && feature_present("inet6")) + sdom = AF_INET6; +#endif +#ifdef WITH_INET + if (sdom == AF_UNSPEC && feature_present("inet")) + sdom = AF_INET; +#endif + if (sdom == AF_UNSPEC) + sdom = AF_LINK; + + return (sdom); +} + struct node_host * ifa_exists(const char *ifa_name) { @@ -1242,7 +1262,7 @@ ifa_exists(const char *ifa_name) ifa_load(); /* check wether this is a group */ - if ((s = socket(AF_INET, SOCK_DGRAM, 0)) == -1) + if ((s = socket(get_socket_domain(), SOCK_DGRAM, 0)) == -1) err(1, "socket"); bzero(&ifgr, sizeof(ifgr)); strlcpy(ifgr.ifgr_name, ifa_name, sizeof(ifgr.ifgr_name)); @@ -1273,7 +1293,7 @@ ifa_grouplookup(const char *ifa_name, in int s, len; struct node_host *n, *h = NULL; - if ((s = socket(AF_INET, SOCK_DGRAM, 0)) == -1) + if ((s = socket(get_socket_domain(), SOCK_DGRAM, 0)) == -1) err(1, "socket"); bzero(&ifgr, sizeof(ifgr)); strlcpy(ifgr.ifgr_name, ifa_name, sizeof(ifgr.ifgr_name)); Modified: stable/10/sbin/pfctl/pfctl_parser.h ============================================================================== --- stable/10/sbin/pfctl/pfctl_parser.h Sat Aug 16 13:13:17 2014 (r270046) +++ stable/10/sbin/pfctl/pfctl_parser.h Sat Aug 16 13:20:44 2014 (r270047) @@ -294,6 +294,7 @@ void set_ipmask(struct node_host *, u int check_netmask(struct node_host *, sa_family_t); int unmask(struct pf_addr *, sa_family_t); void ifa_load(void); +int get_socket_domain(void); struct node_host *ifa_exists(const char *); struct node_host *ifa_lookup(const char *, int); struct node_host *host(const char *); From bz at FreeBSD.org Sat Aug 16 13:23:24 2014 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Sat, 16 Aug 2014 13:23:24 +0000 (UTC) Subject: svn commit: r270048 - stable/10/sys/dev/ie Message-ID: <201408161323.s7GDNOo5041930@svn.freebsd.org> Author: bz Date: Sat Aug 16 13:23:23 2014 New Revision: 270048 URL: http://svnweb.freebsd.org/changeset/base/270048 Log: MFC r259886: Bite the bullet and start removing the first compile time warnings by removing unsued file local functions and then unused callees. A lot more warnings to resolve but someone had to break the ice. X-Comment: I am not the new maintainer; chime in, it's ours. Modified: stable/10/sys/dev/ie/if_ie.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ie/if_ie.c ============================================================================== --- stable/10/sys/dev/ie/if_ie.c Sat Aug 16 13:20:44 2014 (r270047) +++ stable/10/sys/dev/ie/if_ie.c Sat Aug 16 13:23:23 2014 (r270048) @@ -172,17 +172,12 @@ static void iestart_locked (struct ifne static __inline void ee16_interrupt_enable (struct ie_softc *); -static void ee16_eeprom_outbits (struct ie_softc *, int, int); -static void ee16_eeprom_clock (struct ie_softc *, int); -static u_short ee16_read_eeprom (struct ie_softc *, int); -static int ee16_eeprom_inbits (struct ie_softc *); static __inline void ie_ack (struct ie_softc *, u_int); static void iereset (struct ie_softc *); static void ie_readframe (struct ie_softc *, int); static void ie_drop_packet_buffer (struct ie_softc *); -static void find_ie_mem_size (struct ie_softc *); static int command_and_wait (struct ie_softc *, int, void volatile *, int); static void run_tdr (struct ie_softc *, @@ -1090,26 +1085,6 @@ check_ie_present(struct ie_softc *sc) return (1); } -/* - * Divine the memory size of ie board UNIT. - * Better hope there's nothing important hiding just below the ie card... - */ -static void -find_ie_mem_size(struct ie_softc *sc) -{ - unsigned size; - - sc->iosize = 0; - - for (size = 65536; size >= 8192; size -= 8192) { - if (check_ie_present(sc)) { - return; - } - } - - return; -} - void el_reset_586(struct ie_softc *sc) { @@ -1152,82 +1127,6 @@ ee16_chan_attn(struct ie_softc *sc) outb(PORT(sc) + IEE16_ATTN, 0); } -u_short -ee16_read_eeprom(struct ie_softc *sc, int location) -{ - int ectrl, edata; - - ectrl = inb(sc->port + IEE16_ECTRL); - ectrl &= IEE16_ECTRL_MASK; - ectrl |= IEE16_ECTRL_EECS; - outb(sc->port + IEE16_ECTRL, ectrl); - - ee16_eeprom_outbits(sc, IEE16_EEPROM_READ, IEE16_EEPROM_OPSIZE1); - ee16_eeprom_outbits(sc, location, IEE16_EEPROM_ADDR_SIZE); - edata = ee16_eeprom_inbits(sc); - ectrl = inb(sc->port + IEE16_ECTRL); - ectrl &= ~(IEE16_RESET_ASIC | IEE16_ECTRL_EEDI | IEE16_ECTRL_EECS); - outb(sc->port + IEE16_ECTRL, ectrl); - ee16_eeprom_clock(sc, 1); - ee16_eeprom_clock(sc, 0); - return edata; -} - -static void -ee16_eeprom_outbits(struct ie_softc *sc, int edata, int count) -{ - int ectrl, i; - - ectrl = inb(sc->port + IEE16_ECTRL); - ectrl &= ~IEE16_RESET_ASIC; - for (i = count - 1; i >= 0; i--) { - ectrl &= ~IEE16_ECTRL_EEDI; - if (edata & (1 << i)) { - ectrl |= IEE16_ECTRL_EEDI; - } - outb(sc->port + IEE16_ECTRL, ectrl); - DELAY(1); /* eeprom data must be setup for 0.4 uSec */ - ee16_eeprom_clock(sc, 1); - ee16_eeprom_clock(sc, 0); - } - ectrl &= ~IEE16_ECTRL_EEDI; - outb(sc->port + IEE16_ECTRL, ectrl); - DELAY(1); /* eeprom data must be held for 0.4 uSec */ -} - -static int -ee16_eeprom_inbits(struct ie_softc *sc) -{ - int ectrl, edata, i; - - ectrl = inb(sc->port + IEE16_ECTRL); - ectrl &= ~IEE16_RESET_ASIC; - for (edata = 0, i = 0; i < 16; i++) { - edata = edata << 1; - ee16_eeprom_clock(sc, 1); - ectrl = inb(sc->port + IEE16_ECTRL); - if (ectrl & IEE16_ECTRL_EEDO) { - edata |= 1; - } - ee16_eeprom_clock(sc, 0); - } - return (edata); -} - -static void -ee16_eeprom_clock(struct ie_softc *sc, int state) -{ - int ectrl; - - ectrl = inb(sc->port + IEE16_ECTRL); - ectrl &= ~(IEE16_RESET_ASIC | IEE16_ECTRL_EESK); - if (state) { - ectrl |= IEE16_ECTRL_EESK; - } - outb(sc->port + IEE16_ECTRL, ectrl); - DELAY(9); /* EESK must be stable for 8.38 uSec */ -} - static __inline void ee16_interrupt_enable(struct ie_softc *sc) { From bz at FreeBSD.org Sat Aug 16 13:25:50 2014 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Sat, 16 Aug 2014 13:25:50 +0000 (UTC) Subject: svn commit: r270049 - stable/10/usr.bin/netstat Message-ID: <201408161325.s7GDPoAK042303@svn.freebsd.org> Author: bz Date: Sat Aug 16 13:25:49 2014 New Revision: 270049 URL: http://svnweb.freebsd.org/changeset/base/270049 Log: MFC r261525: Print the MD5 signature information introduced in r221023 (head) in the TCP statistics output. Modified: stable/10/usr.bin/netstat/inet.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/netstat/inet.c ============================================================================== --- stable/10/usr.bin/netstat/inet.c Sat Aug 16 13:23:23 2014 (r270048) +++ stable/10/usr.bin/netstat/inet.c Sat Aug 16 13:25:49 2014 (r270049) @@ -723,6 +723,17 @@ tcp_stats(u_long off, const char *name, p(tcps_ecn_ect1, "\t%ju packet%s with ECN ECT(1) bit set\n"); p(tcps_ecn_shs, "\t%ju successful ECN handshake%s\n"); p(tcps_ecn_rcwnd, "\t%ju time%s ECN reduced the congestion window\n"); + + p(tcps_sig_rcvgoodsig, + "\t%ju packet%s with valid tcp-md5 signature received\n"); + p(tcps_sig_rcvbadsig, + "\t%ju packet%s with invalid tcp-md5 signature received\n"); + p(tcps_sig_err_buildsig, + "\t%ju packet%s with tcp-md5 signature mismatch\n"); + p(tcps_sig_err_sigopt, + "\t%ju packet%s with unexpected tcp-md5 signature received\n"); + p(tcps_sig_err_nosigopt, + "\t%ju packet%s without expected tcp-md5 signature received\n"); #undef p #undef p1a #undef p2 From bz at FreeBSD.org Sat Aug 16 13:47:05 2014 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Sat, 16 Aug 2014 13:47:05 +0000 (UTC) Subject: svn commit: r270050 - stable/10/sbin/route Message-ID: <201408161347.s7GDl5co051217@svn.freebsd.org> Author: bz Date: Sat Aug 16 13:47:04 2014 New Revision: 270050 URL: http://svnweb.freebsd.org/changeset/base/270050 Log: MFC r264539: When switching variables to flags in r243185 a few cases were missed. After r263152 (in head) this leaves unused variables if route(8) is compiled without INET support. Switch the remaining variable accesses to flags and remove now obsolete variables. Reviewed by: glebius Modified: stable/10/sbin/route/route.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/route/route.c ============================================================================== --- stable/10/sbin/route/route.c Sat Aug 16 13:25:49 2014 (r270049) +++ stable/10/sbin/route/route.c Sat Aug 16 13:47:04 2014 (r270050) @@ -81,7 +81,7 @@ static struct keytab { static struct sockaddr_storage so[RTAX_MAX]; static int pid, rtm_addrs; static int s; -static int forcehost, forcenet, nflag, af, qflag, tflag; +static int nflag, af, qflag, tflag; static int verbose, aflen; static int locking, lockrest, debugonly; static struct rt_metrics rt_metrics; @@ -1235,7 +1235,7 @@ getaddr(int idx, char *str, struct hoste */ switch (idx) { case RTAX_DST: - forcenet++; + nrflags |= F_FORCENET; getaddr(RTAX_NETMASK, str, 0, nrflags); break; } @@ -1275,7 +1275,7 @@ getaddr(int idx, char *str, struct hoste if (!atalk_aton(str, &sat->sat_addr)) errx(EX_NOHOST, "bad address: %s", str); rtm_addrs |= RTA_NETMASK; - return(forcehost || sat->sat_addr.s_node != 0); + return(nrflags & F_FORCEHOST || sat->sat_addr.s_node != 0); } case AF_LINK: link_addr(str, (struct sockaddr_dl *)(void *)sa); @@ -1308,10 +1308,10 @@ getaddr(int idx, char *str, struct hoste } *q = '/'; } - if ((idx != RTAX_DST || forcenet == 0) && + if ((idx != RTAX_DST || (nrflags & F_FORCENET) == 0) && inet_aton(str, &sin->sin_addr)) { val = sin->sin_addr.s_addr; - if (idx != RTAX_DST || forcehost || + if (idx != RTAX_DST || nrflags & F_FORCEHOST || inet_lnaof(sin->sin_addr) != INADDR_ANY) return (1); else { @@ -1319,7 +1319,7 @@ getaddr(int idx, char *str, struct hoste goto netdone; } } - if (idx == RTAX_DST && forcehost == 0 && + if (idx == RTAX_DST && (nrflags & F_FORCEHOST) == 0 && ((val = inet_network(str)) != INADDR_NONE || ((np = getnetbyname(str)) != NULL && (val = np->n_net) != 0))) { netdone: From bz at FreeBSD.org Sat Aug 16 13:50:16 2014 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Sat, 16 Aug 2014 13:50:15 +0000 (UTC) Subject: svn commit: r270051 - in stable/10/sys: dev/cxgbe/tom netinet Message-ID: <201408161350.s7GDoFj3051712@svn.freebsd.org> Author: bz Date: Sat Aug 16 13:50:15 2014 New Revision: 270051 URL: http://svnweb.freebsd.org/changeset/base/270051 Log: MFC r266596: Move the tcp_fields_to_host() and tcp_fields_to_net() (inline) functions to the tcp_var.h header file in order to avoid further duplication with upcoming commits. Reviewed by: np Modified: stable/10/sys/dev/cxgbe/tom/t4_listen.c stable/10/sys/netinet/tcp_input.c stable/10/sys/netinet/tcp_var.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_listen.c Sat Aug 16 13:47:04 2014 (r270050) +++ stable/10/sys/dev/cxgbe/tom/t4_listen.c Sat Aug 16 13:50:15 2014 (r270051) @@ -1052,17 +1052,6 @@ calc_opt2p(struct adapter *sc, struct po return htobe32(opt2); } -/* XXX: duplication. */ -static inline void -tcp_fields_to_host(struct tcphdr *th) -{ - - th->th_seq = ntohl(th->th_seq); - th->th_ack = ntohl(th->th_ack); - th->th_win = ntohs(th->th_win); - th->th_urp = ntohs(th->th_urp); -} - static void pass_accept_req_to_protohdrs(const struct mbuf *m, struct in_conninfo *inc, struct tcphdr *th) Modified: stable/10/sys/netinet/tcp_input.c ============================================================================== --- stable/10/sys/netinet/tcp_input.c Sat Aug 16 13:47:04 2014 (r270050) +++ stable/10/sys/netinet/tcp_input.c Sat Aug 16 13:50:15 2014 (r270051) @@ -455,27 +455,7 @@ cc_post_recovery(struct tcpcb *tp, struc tp->t_bytes_acked = 0; } -static inline void -tcp_fields_to_host(struct tcphdr *th) -{ - - th->th_seq = ntohl(th->th_seq); - th->th_ack = ntohl(th->th_ack); - th->th_win = ntohs(th->th_win); - th->th_urp = ntohs(th->th_urp); -} - #ifdef TCP_SIGNATURE -static inline void -tcp_fields_to_net(struct tcphdr *th) -{ - - th->th_seq = htonl(th->th_seq); - th->th_ack = htonl(th->th_ack); - th->th_win = htons(th->th_win); - th->th_urp = htons(th->th_urp); -} - static inline int tcp_signature_verify_input(struct mbuf *m, int off0, int tlen, int optlen, struct tcpopt *to, struct tcphdr *th, u_int tcpbflag) Modified: stable/10/sys/netinet/tcp_var.h ============================================================================== --- stable/10/sys/netinet/tcp_var.h Sat Aug 16 13:47:04 2014 (r270050) +++ stable/10/sys/netinet/tcp_var.h Sat Aug 16 13:50:15 2014 (r270051) @@ -736,6 +736,27 @@ u_long tcp_seq_subtract(u_long, u_long void cc_cong_signal(struct tcpcb *tp, struct tcphdr *th, uint32_t type); +static inline void +tcp_fields_to_host(struct tcphdr *th) +{ + + th->th_seq = ntohl(th->th_seq); + th->th_ack = ntohl(th->th_ack); + th->th_win = ntohs(th->th_win); + th->th_urp = ntohs(th->th_urp); +} + +#ifdef TCP_SIGNATURE +static inline void +tcp_fields_to_net(struct tcphdr *th) +{ + + th->th_seq = htonl(th->th_seq); + th->th_ack = htonl(th->th_ack); + th->th_win = htons(th->th_win); + th->th_urp = htons(th->th_urp); +} +#endif #endif /* _KERNEL */ #endif /* _NETINET_TCP_VAR_H_ */ From bz at FreeBSD.org Sat Aug 16 13:53:05 2014 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Sat, 16 Aug 2014 13:53:05 +0000 (UTC) Subject: svn commit: r270052 - stable/10/sys/netinet Message-ID: <201408161353.s7GDr5RC055210@svn.freebsd.org> Author: bz Date: Sat Aug 16 13:53:05 2014 New Revision: 270052 URL: http://svnweb.freebsd.org/changeset/base/270052 Log: MFC r266597: Remove the prototypes for things that are no longer file local but were moved to the header file. Was suppoed to be MFCed with: r266596 Pointy hat to: bz Modified: stable/10/sys/netinet/tcp_input.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/tcp_input.c ============================================================================== --- stable/10/sys/netinet/tcp_input.c Sat Aug 16 13:50:15 2014 (r270051) +++ stable/10/sys/netinet/tcp_input.c Sat Aug 16 13:53:05 2014 (r270052) @@ -229,9 +229,7 @@ static void tcp_pulloutofband(struct so struct tcphdr *, struct mbuf *, int); static void tcp_xmit_timer(struct tcpcb *, int); static void tcp_newreno_partial_ack(struct tcpcb *, struct tcphdr *); -static void inline tcp_fields_to_host(struct tcphdr *); #ifdef TCP_SIGNATURE -static void inline tcp_fields_to_net(struct tcphdr *); static int inline tcp_signature_verify_input(struct mbuf *, int, int, int, struct tcpopt *, struct tcphdr *, u_int); #endif From bz at FreeBSD.org Sat Aug 16 13:55:44 2014 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Sat, 16 Aug 2014 13:55:44 +0000 (UTC) Subject: svn commit: r270053 - stable/10/sys/netipsec Message-ID: <201408161355.s7GDtiBk055857@svn.freebsd.org> Author: bz Date: Sat Aug 16 13:55:44 2014 New Revision: 270053 URL: http://svnweb.freebsd.org/changeset/base/270053 Log: MFC r266606: Only do a ports check if this is a NAT-T SA. Otherwise other lookups providing ports may get unexpected results. Modified: stable/10/sys/netipsec/key.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netipsec/key.c ============================================================================== --- stable/10/sys/netipsec/key.c Sat Aug 16 13:53:05 2014 (r270052) +++ stable/10/sys/netipsec/key.c Sat Aug 16 13:55:44 2014 (r270053) @@ -1085,7 +1085,9 @@ key_allocsa( struct secasvar *sav; u_int stateidx, arraysize, state; const u_int *saorder_state_valid; - int chkport; +#ifdef IPSEC_NAT_T + int natt_chkport; +#endif IPSEC_ASSERT(dst != NULL, ("null dst address")); @@ -1093,11 +1095,9 @@ key_allocsa( printf("DP %s from %s:%u\n", __func__, where, tag)); #ifdef IPSEC_NAT_T - chkport = (dst->sa.sa_family == AF_INET && + natt_chkport = (dst->sa.sa_family == AF_INET && dst->sa.sa_len == sizeof(struct sockaddr_in) && dst->sin.sin_port != 0); -#else - chkport = 0; #endif /* @@ -1115,6 +1115,8 @@ key_allocsa( arraysize = _ARRAYLEN(saorder_state_valid_prefer_new); } LIST_FOREACH(sah, &V_sahtree, chain) { + int checkport; + /* search valid state */ for (stateidx = 0; stateidx < arraysize; stateidx++) { state = saorder_state_valid[stateidx]; @@ -1129,13 +1131,25 @@ key_allocsa( continue; if (spi != sav->spi) continue; + checkport = 0; +#ifdef IPSEC_NAT_T + /* + * Really only check ports when this is a NAT-T + * SA. Otherwise other lookups providing ports + * might suffer. + */ + if (sav->natt_type && natt_chkport) + checkport = 1; +#endif #if 0 /* don't check src */ /* check src address */ - if (key_sockaddrcmp(&src->sa, &sav->sah->saidx.src.sa, chkport) != 0) + if (key_sockaddrcmp(&src->sa, + &sav->sah->saidx.src.sa, checkport) != 0) continue; #endif /* check dst address */ - if (key_sockaddrcmp(&dst->sa, &sav->sah->saidx.dst.sa, chkport) != 0) + if (key_sockaddrcmp(&dst->sa, + &sav->sah->saidx.dst.sa, checkport) != 0) continue; sa_addref(sav); goto done; From bz at FreeBSD.org Sat Aug 16 13:58:46 2014 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Sat, 16 Aug 2014 13:58:46 +0000 (UTC) Subject: svn commit: r270054 - stable/10/sys/netinet Message-ID: <201408161358.s7GDwkM9056256@svn.freebsd.org> Author: bz Date: Sat Aug 16 13:58:45 2014 New Revision: 270054 URL: http://svnweb.freebsd.org/changeset/base/270054 Log: MFC r266618: Make tcp_twrespond() file local private; this removes it from the public KPI; it is not used anywhere else and seems it never was. Modified: stable/10/sys/netinet/tcp_timewait.c stable/10/sys/netinet/tcp_var.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/tcp_timewait.c ============================================================================== --- stable/10/sys/netinet/tcp_timewait.c Sat Aug 16 13:55:44 2014 (r270053) +++ stable/10/sys/netinet/tcp_timewait.c Sat Aug 16 13:58:45 2014 (r270054) @@ -105,6 +105,7 @@ static VNET_DEFINE(TAILQ_HEAD(, tcptw), static void tcp_tw_2msl_reset(struct tcptw *, int); static void tcp_tw_2msl_stop(struct tcptw *); +static int tcp_twrespond(struct tcptw *, int); static int tcptw_auto_size(void) @@ -501,7 +502,7 @@ tcp_twclose(struct tcptw *tw, int reuse) uma_zfree(V_tcptw_zone, tw); } -int +static int tcp_twrespond(struct tcptw *tw, int flags) { struct inpcb *inp = tw->tw_inpcb; Modified: stable/10/sys/netinet/tcp_var.h ============================================================================== --- stable/10/sys/netinet/tcp_var.h Sat Aug 16 13:55:44 2014 (r270053) +++ stable/10/sys/netinet/tcp_var.h Sat Aug 16 13:58:45 2014 (r270054) @@ -695,7 +695,6 @@ void tcp_tw_destroy(void); void tcp_tw_zone_change(void); int tcp_twcheck(struct inpcb *, struct tcpopt *, struct tcphdr *, struct mbuf *, int); -int tcp_twrespond(struct tcptw *, int); void tcp_setpersist(struct tcpcb *); #ifdef TCP_SIGNATURE int tcp_signature_compute(struct mbuf *, int, int, int, u_char *, u_int); From bz at FreeBSD.org Sat Aug 16 14:03:01 2014 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Sat, 16 Aug 2014 14:03:00 +0000 (UTC) Subject: svn commit: r270055 - stable/10/sys/netinet Message-ID: <201408161403.s7GE30ft060090@svn.freebsd.org> Author: bz Date: Sat Aug 16 14:03:00 2014 New Revision: 270055 URL: http://svnweb.freebsd.org/changeset/base/270055 Log: MFC r266619: syncache_lookup() is a file local function. Make it static and take it out of the public KPI; seems it was never used elsewhere. Modified: stable/10/sys/netinet/tcp_syncache.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/tcp_syncache.c ============================================================================== --- stable/10/sys/netinet/tcp_syncache.c Sat Aug 16 13:58:45 2014 (r270054) +++ stable/10/sys/netinet/tcp_syncache.c Sat Aug 16 14:03:00 2014 (r270055) @@ -121,7 +121,6 @@ SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, static void syncache_drop(struct syncache *, struct syncache_head *); static void syncache_free(struct syncache *); static void syncache_insert(struct syncache *, struct syncache_head *); -struct syncache *syncache_lookup(struct in_conninfo *, struct syncache_head **); static int syncache_respond(struct syncache *); static struct socket *syncache_socket(struct syncache *, struct socket *, struct mbuf *m); @@ -492,7 +491,7 @@ syncache_timer(void *xsch) * Find an entry in the syncache. * Returns always with locked syncache_head plus a matching entry or NULL. */ -struct syncache * +static struct syncache * syncache_lookup(struct in_conninfo *inc, struct syncache_head **schp) { struct syncache *sc; From bz at FreeBSD.org Sat Aug 16 14:05:32 2014 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Sat, 16 Aug 2014 14:05:31 +0000 (UTC) Subject: svn commit: r270056 - stable/10/sys/netinet Message-ID: <201408161405.s7GE5VLh060470@svn.freebsd.org> Author: bz Date: Sat Aug 16 14:05:31 2014 New Revision: 270056 URL: http://svnweb.freebsd.org/changeset/base/270056 Log: MFC r266620: Remove the prototpye for the static inline function tcp_signature_verify_input(). The function is defined before first use already. Modified: stable/10/sys/netinet/tcp_input.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/tcp_input.c ============================================================================== --- stable/10/sys/netinet/tcp_input.c Sat Aug 16 14:03:00 2014 (r270055) +++ stable/10/sys/netinet/tcp_input.c Sat Aug 16 14:05:31 2014 (r270056) @@ -229,10 +229,6 @@ static void tcp_pulloutofband(struct so struct tcphdr *, struct mbuf *, int); static void tcp_xmit_timer(struct tcpcb *, int); static void tcp_newreno_partial_ack(struct tcpcb *, struct tcphdr *); -#ifdef TCP_SIGNATURE -static int inline tcp_signature_verify_input(struct mbuf *, int, int, - int, struct tcpopt *, struct tcphdr *, u_int); -#endif static void inline cc_ack_received(struct tcpcb *tp, struct tcphdr *th, uint16_t type); static void inline cc_conn_init(struct tcpcb *tp); From bz at FreeBSD.org Sat Aug 16 14:09:26 2014 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Sat, 16 Aug 2014 14:09:26 +0000 (UTC) Subject: svn commit: r270057 - stable/10/sys/netinet Message-ID: <201408161409.s7GE9QJ0060978@svn.freebsd.org> Author: bz Date: Sat Aug 16 14:09:26 2014 New Revision: 270057 URL: http://svnweb.freebsd.org/changeset/base/270057 Log: MFC r266907: While PAWS is disabled, there are no consumers for the tcp options argument to tcp_twcheck(); thus mark it __unused. Modified: stable/10/sys/netinet/tcp_timewait.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/tcp_timewait.c ============================================================================== --- stable/10/sys/netinet/tcp_timewait.c Sat Aug 16 14:05:31 2014 (r270056) +++ stable/10/sys/netinet/tcp_timewait.c Sat Aug 16 14:09:26 2014 (r270057) @@ -350,7 +350,7 @@ tcp_twrecycleable(struct tcptw *tw) * looking for a pcb in the listen state. Returns 0 otherwise. */ int -tcp_twcheck(struct inpcb *inp, struct tcpopt *to, struct tcphdr *th, +tcp_twcheck(struct inpcb *inp, struct tcpopt *to __unused, struct tcphdr *th, struct mbuf *m, int tlen) { struct tcptw *tw; From bz at FreeBSD.org Sat Aug 16 14:14:30 2014 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Sat, 16 Aug 2014 14:14:30 +0000 (UTC) Subject: svn commit: r270058 - stable/10/sys/mips/beri Message-ID: <201408161414.s7GEEUSb064828@svn.freebsd.org> Author: bz Date: Sat Aug 16 14:14:29 2014 New Revision: 270058 URL: http://svnweb.freebsd.org/changeset/base/270058 Log: MFC r264605: Based on xlp_machdep.c and completed the list of options based on boot/mips/beri/loader/metadata.c allow FDT configuration to set command line options. This leads to an interesting quesiton of future interactions with loader. However for configurations without loader this allows bootverbose or boot single user to be set by compiling a new kernel, which is good enough for testing and debugging. Reviewed by: rwatson Sponsored by: DARPA/AFRL Modified: stable/10/sys/mips/beri/beri_machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/mips/beri/beri_machdep.c ============================================================================== --- stable/10/sys/mips/beri/beri_machdep.c Sat Aug 16 14:09:26 2014 (r270057) +++ stable/10/sys/mips/beri/beri_machdep.c Sat Aug 16 14:14:29 2014 (r270058) @@ -131,6 +131,46 @@ platform_reset(void) __asm__ __volatile("wait"); } +#ifdef FDT +/* Parse cmd line args as env - copied from xlp_machdep. */ +/* XXX-BZ this should really be centrally provided for all (boot) code. */ +static void +_parse_bootargs(char *cmdline) +{ + char *n, *v; + + while ((v = strsep(&cmdline, " \n")) != NULL) { + if (*v == '\0') + continue; + if (*v == '-') { + while (*v != '\0') { + v++; + switch (*v) { + case 'a': boothowto |= RB_ASKNAME; break; + /* Someone should simulate that ;-) */ + case 'C': boothowto |= RB_CDROM; break; + case 'd': boothowto |= RB_KDB; break; + case 'D': boothowto |= RB_MULTIPLE; break; + case 'm': boothowto |= RB_MUTE; break; + case 'g': boothowto |= RB_GDB; break; + case 'h': boothowto |= RB_SERIAL; break; + case 'p': boothowto |= RB_PAUSE; break; + case 'r': boothowto |= RB_DFLTROOT; break; + case 's': boothowto |= RB_SINGLE; break; + case 'v': boothowto |= RB_VERBOSE; break; + } + } + } else { + n = strsep(&v, "="); + if (v == NULL) + setenv(n, "1"); + else + setenv(n, v); + } + } +} +#endif + void platform_start(__register_t a0, __register_t a1, __register_t a2, __register_t a3) @@ -142,7 +182,9 @@ platform_start(__register_t a0, __regist char **envp = (char **)a2; unsigned int memsize = a3; #ifdef FDT + char buf[2048]; /* early stack supposedly big enough */ vm_offset_t dtbp; + phandle_t chosen; void *kmdp; #endif int i; @@ -180,6 +222,13 @@ platform_start(__register_t a0, __regist while (1); if (OF_init((void *)dtbp) != 0) while (1); + + /* + * Get bootargs from FDT if specified. + */ + chosen = OF_finddevice("/chosen"); + if (OF_getprop(chosen, "bootargs", buf, sizeof(buf)) != -1) + _parse_bootargs(buf); #endif /* From bz at FreeBSD.org Sat Aug 16 14:17:10 2014 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Sat, 16 Aug 2014 14:17:10 +0000 (UTC) Subject: svn commit: r270059 - stable/10/sys/dev/altera/atse Message-ID: <201408161417.s7GEHAfM065319@svn.freebsd.org> Author: bz Date: Sat Aug 16 14:17:09 2014 New Revision: 270059 URL: http://svnweb.freebsd.org/changeset/base/270059 Log: MFC r264542: Use ETHER_ALIGN as argument to m_adj() to offset the beginning of packet rather than the magic number 2. While here fix a typo in a comment. No functional changes. Sponsored by: DARPA/AFRL Modified: stable/10/sys/dev/altera/atse/if_atse.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/altera/atse/if_atse.c ============================================================================== --- stable/10/sys/dev/altera/atse/if_atse.c Sat Aug 16 14:14:29 2014 (r270058) +++ stable/10/sys/dev/altera/atse/if_atse.c Sat Aug 16 14:17:09 2014 (r270059) @@ -1179,7 +1179,7 @@ outer: return (rx_npkts); m->m_len = m->m_pkthdr.len = MCLBYTES; /* Make sure upper layers will be aligned. */ - m_adj(m, 2); + m_adj(m, ETHER_ALIGN); sc->atse_rx_m = m; } @@ -1815,7 +1815,7 @@ atse_detach(device_t dev) return (0); } -/* Shared between nexus anf fdt implementation. */ +/* Shared between nexus and fdt implementation. */ void atse_detach_resources(device_t dev) { From bz at FreeBSD.org Sat Aug 16 14:21:04 2014 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Sat, 16 Aug 2014 14:21:03 +0000 (UTC) Subject: svn commit: r270060 - in stable/10/sys: boot/fdt/dts/mips mips/conf Message-ID: <201408161421.s7GEL3UE066305@svn.freebsd.org> Author: bz Date: Sat Aug 16 14:21:03 2014 New Revision: 270060 URL: http://svnweb.freebsd.org/changeset/base/270060 Log: MFC r263632: For BERI on NetFPGA assume HZ=100 by default. Remove the uart support in favour of a "jtag-uart" interface imitation providing a much simpler interface, directly exported to the host, allowing the toolchain to be shared with BERI on Altera. [1] Submitted by: Jong Hun HAN (jong.han cl.cam.ac.uk) [1] Sponsored by: DARPA/AFRL Modified: stable/10/sys/boot/fdt/dts/mips/beri-netfpga.dts stable/10/sys/mips/conf/BERI_NETFPGA_MDROOT Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/fdt/dts/mips/beri-netfpga.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/mips/beri-netfpga.dts Sat Aug 16 14:17:09 2014 (r270059) +++ stable/10/sys/boot/fdt/dts/mips/beri-netfpga.dts Sat Aug 16 14:21:03 2014 (r270060) @@ -113,6 +113,14 @@ soft-interrupt-sources = <64>; }; + serial0: serial at 7f000000 { + compatible = "altera,jtag_uart-11_0"; + reg = <0x7f000000 0x40>; + interrupts = <0>; + interrupt-parent = <&beripic>; + }; + +/* serial0: serial at 7f002100 { compatible = "ns16550"; reg = <0x7f002100 0x20>; @@ -121,6 +129,7 @@ interrupts = <8>; interrupt-parent = <&beripic>; }; +*/ }; aliases { Modified: stable/10/sys/mips/conf/BERI_NETFPGA_MDROOT ============================================================================== --- stable/10/sys/mips/conf/BERI_NETFPGA_MDROOT Sat Aug 16 14:17:09 2014 (r270059) +++ stable/10/sys/mips/conf/BERI_NETFPGA_MDROOT Sat Aug 16 14:21:03 2014 (r270060) @@ -10,11 +10,14 @@ include "BERI_TEMPLATE" ident BERI_NETFPGA_MDROOT +options HZ=100 + options FDT options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=beri-netfpga.dts -device uart +#device uart +device altera_jtag_uart # # This kernel configuration uses an embedded memory root file system. From bz at FreeBSD.org Sat Aug 16 14:30:49 2014 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Sat, 16 Aug 2014 14:30:47 +0000 (UTC) Subject: svn commit: r270061 - in stable/10: share/man/man4 sys/boot/fdt/dts/mips sys/dev/netfpga10g sys/dev/netfpga10g/nf10bmac sys/mips/beri sys/mips/conf sys/modules sys/modules/netfpga10g Message-ID: <201408161430.s7GEUlN4072809@svn.freebsd.org> Author: bz Date: Sat Aug 16 14:30:46 2014 New Revision: 270061 URL: http://svnweb.freebsd.org/changeset/base/270061 Log: MFC r264601,264646,265766,267918,267919,267920: Merge if_nf10bmac(4), a driver to support an NetFPGA-10G Embedded CPU Ethernet Core. The current version operates on a simple PIO based interface connected to a NetFPGA-10G port. To avoid confusion: this driver operates on a CPU running on the FPGA, e.g. BERI/mips, and is not suited for the PCI host interface. Adjust the register layout to allow for 64bit registers in the future for nf10bmac(4). Also, add support for and enable RX interrupts. Allow switching between 32bit and 64bit bus width data access at compile time by setting NF10BMAC_64BIT and using a REGWTYPE #define to set correct variable and return value widths. Adjust comments to indicate the 32 or 64bit register widths. Relnotes: yes Sponsored by: DARPA/AFRL Added: stable/10/share/man/man4/netfpga10g_nf10bmac.4 - copied unchanged from r264601, head/share/man/man4/netfpga10g_nf10bmac.4 stable/10/sys/dev/netfpga10g/ - copied from r264601, head/sys/dev/netfpga10g/ stable/10/sys/modules/netfpga10g/ - copied from r264601, head/sys/modules/netfpga10g/ Modified: stable/10/share/man/man4/Makefile stable/10/sys/boot/fdt/dts/mips/beri-netfpga.dts stable/10/sys/dev/netfpga10g/nf10bmac/if_nf10bmac.c stable/10/sys/dev/netfpga10g/nf10bmac/if_nf10bmac_fdt.c stable/10/sys/dev/netfpga10g/nf10bmac/if_nf10bmacreg.h stable/10/sys/mips/beri/files.beri stable/10/sys/mips/conf/BERI_NETFPGA_MDROOT stable/10/sys/modules/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/Makefile ============================================================================== --- stable/10/share/man/man4/Makefile Sat Aug 16 14:21:03 2014 (r270060) +++ stable/10/share/man/man4/Makefile Sat Aug 16 14:30:46 2014 (r270061) @@ -282,6 +282,7 @@ MAN= aac.4 \ ncv.4 \ ${_ndis.4} \ net80211.4 \ + netfpga10g_nf10bmac.4 \ netgraph.4 \ netintro.4 \ netmap.4 \ @@ -678,6 +679,7 @@ MLINKS+=mwl.4 if_mwl.4 MLINKS+=mxge.4 if_mxge.4 MLINKS+=my.4 if_my.4 MLINKS+=${_ndis.4} ${_if_ndis.4} +MLINKS+=netfpga10g_nf10bmac.4 if_nf10bmac.4 MLINKS+=netintro.4 net.4 \ netintro.4 networking.4 MLINKS+=${_nfe.4} ${_if_nfe.4} Copied: stable/10/share/man/man4/netfpga10g_nf10bmac.4 (from r264601, head/share/man/man4/netfpga10g_nf10bmac.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/man/man4/netfpga10g_nf10bmac.4 Sat Aug 16 14:30:46 2014 (r270061, copy of r264601, head/share/man/man4/netfpga10g_nf10bmac.4) @@ -0,0 +1,70 @@ +.\"- +.\" Copyright (c) 2014 Bjoern A. Zeeb +.\" All rights reserved. +.\" +.\" This software was developed by SRI International and the University of +.\" Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-11-C-0249 +.\" ("MRC2"), as part of the DARPA MRC research programme. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd April 17, 2014 +.Dt NETFPGA10G_NF10BMAC 4 +.Os +.Sh NAME +.Nm netfpga10g_nf10bmac +.Nd driver for the NetFPGA-10G Embedded CPU Ethernet Core +.Sh SYNOPSIS +.Cd "device netfpga10g_nf10bmac" +.Sh DESCRIPTION +The +.Nm +device driver provides support for the NetFPGA-10G Embedded CPU Ethernet +Core. +.Sh HARDWARE +The current version of the +.Nm +driver works with one PIO mode interface of the +NetFPGA-10G Embedded CPU Ethernet Core version 1.00a. +.Sh SEE ALSO +.Xr netintro 4 , +.Xr ifconfig 8 +.Rs +.%T NetFPGA-10G Wiki +.%U https://github.com/NetFPGA/NetFPGA-public/wiki +.Re +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 11.0 . +.Sh AUTHORS +This software and this manual page were +developed by SRI International and the University of Cambridge Computer +Laboratory under DARPA/AFRL contract +.Pq FA8750-11-C-0249 +.Pq Do MRC2 Dc , +as part of the DARPA MRC research programme. +The device driver was written by +.An Bjoern A. Zeeb . Modified: stable/10/sys/boot/fdt/dts/mips/beri-netfpga.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/mips/beri-netfpga.dts Sat Aug 16 14:21:03 2014 (r270060) +++ stable/10/sys/boot/fdt/dts/mips/beri-netfpga.dts Sat Aug 16 14:30:46 2014 (r270061) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2012-2013 Robert N. M. Watson * Copyright (c) 2013 SRI International - * Copyright (c) 2013 Bjoern A. Zeeb + * Copyright (c) 2013-2014 Bjoern A. Zeeb * All rights reserved. * * This software was developed by SRI International and the University of @@ -130,6 +130,18 @@ interrupt-parent = <&beripic>; }; */ + + ethernet at 7f005000 { + compatible = "netfpag10g,nf10bmac"; + // LOOP, TX, RX, INTR + reg = <0x7f005000 0x20 + 0x7f005020 0x30 + 0x7f005050 0x30 + 0x7f005100 0x10>; + // RX + interrupts = <1>; + interrupt-parent = <&beripic>; + }; }; aliases { Modified: stable/10/sys/dev/netfpga10g/nf10bmac/if_nf10bmac.c ============================================================================== --- head/sys/dev/netfpga10g/nf10bmac/if_nf10bmac.c Thu Apr 17 12:33:26 2014 (r264601) +++ stable/10/sys/dev/netfpga10g/nf10bmac/if_nf10bmac.c Sat Aug 16 14:30:46 2014 (r270061) @@ -92,13 +92,15 @@ static poll_handler_t nf10bmac_poll; #define NF10BMAC_LOCK_ASSERT(_sc) \ mtx_assert(&(_sc)->nf10bmac_mtx, MA_OWNED) -#define NF10BMAC_TX_LEN 0x08 -#define NF10BMAC_TX_META 0x04 +#define NF10BMAC_CTRL0 0x00 #define NF10BMAC_TX_DATA 0x00 -#define NF10BMAC_RX_LEN 0x08 -#define NF10BMAC_RX_META 0x04 +#define NF10BMAC_TX_META 0x08 +#define NF10BMAC_TX_LEN 0x10 #define NF10BMAC_RX_DATA 0x00 -#define NF10BMAC_CTRL0 0x00 +#define NF10BMAC_RX_META 0x08 +#define NF10BMAC_RX_LEN 0x10 +#define NF10BMAC_INTR_CLEAR_DIS 0x00 +#define NF10BMAC_INTR_CTRL 0x08 #define NF10BMAC_TUSER_MAC0 (1 << 0) #define NF10BMAC_TUSER_CPU0 (1 << 1) @@ -109,63 +111,101 @@ static poll_handler_t nf10bmac_poll; #define NF10BMAC_TUSER_MAC3 (1 << 6) #define NF10BMAC_TUSER_CPU3 (1 << 7) +#define NF10BMAC_DATA_LEN_MASK 0x0000ffff #define NF10BMAC_DATA_DPORT_MASK 0xff000000 #define NF10BMAC_DATA_DPORT_SHIFT 24 #define NF10BMAC_DATA_SPORT_MASK 0x00ff0000 #define NF10BMAC_DATA_SPORT_SHIFT 16 -#define NF10BMAC_DATA_LAST 0x00000080 +#define NF10BMAC_DATA_LAST 0x00008000 +#ifdef NF10BMAC_64BIT +#define NF10BMAC_DATA_STRB 0x000000ff +#define REGWTYPE uint64_t +#else #define NF10BMAC_DATA_STRB 0x0000000f +#define REGWTYPE uint32_t +#endif static inline void -nf10bmac_write_4(struct resource *res, uint32_t reg, uint32_t val4, +nf10bmac_write(struct resource *res, REGWTYPE reg, REGWTYPE val, const char *f __unused, const int l __unused) { - bus_write_4(res, reg, htole32(val4)); +#ifdef NF10BMAC_64BIT + bus_write_8(res, reg, htole64(val)); +#else + bus_write_4(res, reg, htole32(val)); +#endif } -static inline uint32_t -nf10bmac_read_4(struct resource *res, uint32_t reg, +static inline REGWTYPE +nf10bmac_read(struct resource *res, REGWTYPE reg, const char *f __unused, const int l __unused) { +#ifdef NF10BMAC_64BIT + return (le64toh(bus_read_8(res, reg))); +#else return (le32toh(bus_read_4(res, reg))); +#endif } static inline void -nf10bmac_write_4_be(struct resource *res, uint32_t reg, uint32_t val4, +nf10bmac_write_be(struct resource *res, REGWTYPE reg, REGWTYPE val, const char *f __unused, const int l __unused) { - bus_write_4(res, reg, htobe32(val4)); +#ifdef NF10BMAC_64BIT + bus_write_8(res, reg, htobe64(val)); +#else + bus_write_4(res, reg, htobe32(val)); +#endif } -static inline uint32_t -nf10bmac_read_4_be(struct resource *res, uint32_t reg, +static inline REGWTYPE +nf10bmac_read_be(struct resource *res, REGWTYPE reg, const char *f __unused, const int l __unused) { +#ifdef NF10BMAC_64BIT + return (be64toh(bus_read_8(res, reg))); +#else return (be32toh(bus_read_4(res, reg))); +#endif } -#define NF10BMAC_WRITE_CTRL_4(sc, reg, val) \ - nf10bmac_write_4((sc)->nf10bmac_mem_res, (reg), (val), \ +#define NF10BMAC_WRITE_CTRL(sc, reg, val) \ + nf10bmac_write((sc)->nf10bmac_ctrl_res, (reg), (val), \ __func__, __LINE__) -#define NF10BMAC_WRITE_4(sc, reg, val) \ - nf10bmac_write_4((sc)->nf10bmac_tx_mem_res, (reg), (val), \ +#define NF10BMAC_WRITE(sc, reg, val) \ + nf10bmac_write((sc)->nf10bmac_tx_mem_res, (reg), (val), \ __func__, __LINE__) -#define NF10BMAC_READ_4(sc, reg) \ - nf10bmac_read_4((sc)->nf10bmac_rx_mem_res, (reg), \ +#define NF10BMAC_READ(sc, reg) \ + nf10bmac_read((sc)->nf10bmac_rx_mem_res, (reg), \ __func__, __LINE__) -#define NF10BMAC_WRITE_4_BE(sc, reg, val) \ - nf10bmac_write_4_be((sc)->nf10bmac_tx_mem_res, (reg), (val), \ +#define NF10BMAC_WRITE_BE(sc, reg, val) \ + nf10bmac_write_be((sc)->nf10bmac_tx_mem_res, (reg), (val), \ __func__, __LINE__) -#define NF10BMAC_READ_4_BE(sc, reg) \ - nf10bmac_read_4_be((sc)->nf10bmac_rx_mem_res, (reg), \ +#define NF10BMAC_READ_BE(sc, reg) \ + nf10bmac_read_be((sc)->nf10bmac_rx_mem_res, (reg), \ __func__, __LINE__) +#define NF10BMAC_WRITE_INTR(sc, reg, val, _f, _l) \ + nf10bmac_write((sc)->nf10bmac_intr_res, (reg), (val), \ + (_f), (_l)) + +#define NF10BMAC_RX_INTR_CLEAR_DIS(sc) \ + NF10BMAC_WRITE_INTR((sc), NF10BMAC_INTR_CLEAR_DIS, 1, \ + __func__, __LINE__) +#define NF10BMAC_RX_INTR_ENABLE(sc) \ + NF10BMAC_WRITE_INTR((sc), NF10BMAC_INTR_CTRL, 1, \ + __func__, __LINE__) +#define NF10BMAC_RX_INTR_DISABLE(sc) \ + NF10BMAC_WRITE_INTR((sc), NF10BMAC_INTR_CTRL, 0, \ + __func__, __LINE__) + + #ifdef ENABLE_WATCHDOG static void nf10bmac_tick(void *); #endif @@ -178,7 +218,7 @@ static int nf10bmac_tx_locked(struct nf10bmac_softc *sc, struct mbuf *m) { int32_t len, l, ml; - uint32_t m4, val4; + REGWTYPE md, val; NF10BMAC_LOCK_ASSERT(sc); @@ -193,16 +233,16 @@ nf10bmac_tx_locked(struct nf10bmac_softc len = m->m_pkthdr.len; /* Write the length at start of packet. */ - NF10BMAC_WRITE_4(sc, NF10BMAC_TX_LEN, len); + NF10BMAC_WRITE(sc, NF10BMAC_TX_LEN, len); /* Write the meta data and data. */ - ml = len / sizeof(val4); - len -= (ml * sizeof(val4)); + ml = len / sizeof(val); + len -= (ml * sizeof(val)); for (l = 0; l <= ml; l++) { int32_t cl; - cl = sizeof(val4); - m4 = (NF10BMAC_TUSER_CPU0 << NF10BMAC_DATA_SPORT_SHIFT); + cl = sizeof(val); + md = (NF10BMAC_TUSER_CPU0 << NF10BMAC_DATA_SPORT_SHIFT); if (l == ml || (len == 0 && l == (ml - 1))) { if (l == ml && len == 0) { break; @@ -211,20 +251,20 @@ nf10bmac_tx_locked(struct nf10bmac_softc int sl; if (l == (ml - 1)) - len = 4; + len = sizeof(val); cl = len; for (s = 0, sl = len; sl > 0; sl--) s |= (1 << (sl - 1)); - m4 |= (s & NF10BMAC_DATA_STRB); - m4 |= NF10BMAC_DATA_LAST; + md |= (s & NF10BMAC_DATA_STRB); + md |= NF10BMAC_DATA_LAST; } } else { - m4 |= NF10BMAC_DATA_STRB; + md |= NF10BMAC_DATA_STRB; } - NF10BMAC_WRITE_4(sc, NF10BMAC_TX_META, m4); - bcopy(&sc->nf10bmac_tx_buf[l*sizeof(val4)], &val4, cl); - NF10BMAC_WRITE_4_BE(sc, NF10BMAC_TX_DATA, val4); + NF10BMAC_WRITE(sc, NF10BMAC_TX_META, md); + bcopy(&sc->nf10bmac_tx_buf[l*sizeof(val)], &val, cl); + NF10BMAC_WRITE_BE(sc, NF10BMAC_TX_DATA, val); } /* If anyone is interested give them a copy. */ @@ -293,14 +333,14 @@ nf10bmac_start(struct ifnet *ifp) static void nf10bmac_eat_packet_munch_munch(struct nf10bmac_softc *sc) { - uint32_t m4, val4; + REGWTYPE md, val; do { - m4 = NF10BMAC_READ_4_BE(sc, NF10BMAC_RX_META); - if ((m4 & NF10BMAC_DATA_STRB) != 0) - val4 = NF10BMAC_READ_4_BE(sc, NF10BMAC_RX_DATA); - } while ((m4 & NF10BMAC_DATA_STRB) != 0 && - (m4 & NF10BMAC_DATA_LAST) == 0); + md = NF10BMAC_READ_BE(sc, NF10BMAC_RX_META); + if ((md & NF10BMAC_DATA_STRB) != 0) + val = NF10BMAC_READ_BE(sc, NF10BMAC_RX_DATA); + } while ((md & NF10BMAC_DATA_STRB) != 0 && + (md & NF10BMAC_DATA_LAST) == 0); } static int @@ -308,7 +348,7 @@ nf10bmac_rx_locked(struct nf10bmac_softc { struct ifnet *ifp; struct mbuf *m; - uint32_t m4, val4; + REGWTYPE md, val; int32_t len, l; /* @@ -318,21 +358,21 @@ nf10bmac_rx_locked(struct nf10bmac_softc * skip to tlast). */ - len = NF10BMAC_READ_4(sc, NF10BMAC_RX_LEN); + len = NF10BMAC_READ(sc, NF10BMAC_RX_LEN) & NF10BMAC_DATA_LEN_MASK; if (len > (MCLBYTES - ETHER_ALIGN)) { nf10bmac_eat_packet_munch_munch(sc); return (0); } - m4 = NF10BMAC_READ_4(sc, NF10BMAC_RX_META); - if (len == 0 && (m4 & NF10BMAC_DATA_STRB) == 0) { + md = NF10BMAC_READ(sc, NF10BMAC_RX_META); + if (len == 0 && (md & NF10BMAC_DATA_STRB) == 0) { /* No packet data available. */ return (0); - } else if (len == 0 && (m4 & NF10BMAC_DATA_STRB) != 0) { + } else if (len == 0 && (md & NF10BMAC_DATA_STRB) != 0) { /* We are in the middle of a packet. */ nf10bmac_eat_packet_munch_munch(sc); return (0); - } else if ((m4 & NF10BMAC_DATA_STRB) == 0) { + } else if ((md & NF10BMAC_DATA_STRB) == 0) { /* Invalid length "hint". */ device_printf(sc->nf10bmac_dev, "Unexpected length %d on zero strb\n", len); @@ -359,13 +399,13 @@ nf10bmac_rx_locked(struct nf10bmac_softc ifp = sc->nf10bmac_ifp; l = 0; /* - while ((m4 & NF10BMAC_DATA_STRB) != 0 && l < len) { + while ((md & NF10BMAC_DATA_STRB) != 0 && l < len) { */ while (l < len) { size_t cl; - if ((m4 & NF10BMAC_DATA_LAST) == 0 && - (len - l) < sizeof(val4)) { + if ((md & NF10BMAC_DATA_LAST) == 0 && + (len - l) < sizeof(val)) { /* * Our length and LAST disagree. We have a valid STRB. * We could continue until we fill the mbuf and just @@ -376,34 +416,34 @@ nf10bmac_rx_locked(struct nf10bmac_softc ifp->if_ierrors++; m_freem(m); return (0); - } else if ((len - l) <= sizeof(val4)) { + } else if ((len - l) <= sizeof(val)) { cl = len - l; } else { - cl = sizeof(val4); + cl = sizeof(val); } /* Read the first bytes of data as well. */ - val4 = NF10BMAC_READ_4_BE(sc, NF10BMAC_RX_DATA); - bcopy(&val4, (uint8_t *)(m->m_data + l), cl); + val = NF10BMAC_READ_BE(sc, NF10BMAC_RX_DATA); + bcopy(&val, (uint8_t *)(m->m_data + l), cl); l += cl; - if ((m4 & NF10BMAC_DATA_LAST) != 0 || l >= len) + if ((md & NF10BMAC_DATA_LAST) != 0 || l >= len) break; else { DELAY(50); - m4 = NF10BMAC_READ_4(sc, NF10BMAC_RX_META); + md = NF10BMAC_READ(sc, NF10BMAC_RX_META); } cl = 10; - while ((m4 & NF10BMAC_DATA_STRB) == 0 && cl-- > 0) { + while ((md & NF10BMAC_DATA_STRB) == 0 && cl-- > 0) { DELAY(10); - m4 = NF10BMAC_READ_4(sc, NF10BMAC_RX_META); + md = NF10BMAC_READ(sc, NF10BMAC_RX_META); } } /* We should get out of this loop with tlast and tsrb. */ - if ((m4 & NF10BMAC_DATA_LAST) == 0 || (m4 & NF10BMAC_DATA_STRB) == 0) { + if ((md & NF10BMAC_DATA_LAST) == 0 || (md & NF10BMAC_DATA_STRB) == 0) { device_printf(sc->nf10bmac_dev, "Unexpected rx loop end state: " - "m4=0x%08x len=%d l=%d\n", m4, len, l); + "md=0x%08jx len=%d l=%d\n", (uintmax_t)md, len, l); ifp->if_ierrors++; m_freem(m); return (0); @@ -435,6 +475,7 @@ nf10bmac_stop_locked(struct nf10bmac_sof ifp = sc->nf10bmac_ifp; ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); + NF10BMAC_RX_INTR_CLEAR_DIS(sc); sc->nf10bmac_flags &= ~NF10BMAC_FLAGS_LINK; if_link_state_change(ifp, LINK_STATE_DOWN); @@ -446,7 +487,25 @@ static int nf10bmac_reset(struct nf10bmac_softc *sc) { - /* Currently we cannot do anything. */ + /* + * If we do not have an ether address set, initialize to the same + * OUI as NetFPGA-10G Linux driver does (which luckily seems + * unallocated). We just change the NIC specific part from + * the slightly long "\0NF10C0" to "\0NFBSD". + * Oh and we keep the way of setting it from a string as they do. + * It's an amazing way to hide it. + * XXX-BZ If NetFPGA gets their own OUI we should fix this. + */ + if (sc->nf10bmac_eth_addr[0] == 0x00 && + sc->nf10bmac_eth_addr[1] == 0x00 && + sc->nf10bmac_eth_addr[2] == 0x00 && + sc->nf10bmac_eth_addr[3] == 0x00 && + sc->nf10bmac_eth_addr[4] == 0x00 && + sc->nf10bmac_eth_addr[5] == 0x00) { + memcpy(&sc->nf10bmac_eth_addr, "\0NFBSD", ETHER_ADDR_LEN); + sc->nf10bmac_eth_addr[5] += sc->nf10bmac_unit; + } + return (0); } @@ -480,6 +539,16 @@ nf10bmac_init_locked(struct nf10bmac_sof /* Instead drain the FIFO; or at least a possible first packet.. */ nf10bmac_eat_packet_munch_munch(sc); +#ifdef DEVICE_POLLING + /* Only enable interrupts if we are not polling. */ + if (ifp->if_capenable & IFCAP_POLLING) { + NF10BMAC_RX_INTR_CLEAR_DIS(sc); + } else +#endif + { + NF10BMAC_RX_INTR_ENABLE(sc); + } + ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; @@ -538,6 +607,49 @@ nf10bmac_tick(void *xsc) } #endif +static void +nf10bmac_intr(void *arg) +{ + struct nf10bmac_softc *sc; + struct ifnet *ifp; + int rx_npkts; + + sc = (struct nf10bmac_softc *)arg; + ifp = sc->nf10bmac_ifp; + + NF10BMAC_LOCK(sc); +#ifdef DEVICE_POLLING + if (ifp->if_capenable & IFCAP_POLLING) { + NF10BMAC_UNLOCK(sc); + return; + } +#endif + + /* NF10BMAC_RX_INTR_DISABLE(sc); */ + NF10BMAC_RX_INTR_CLEAR_DIS(sc); + + /* We only have an RX interrupt and no status information. */ + rx_npkts = 0; + while (rx_npkts < NF10BMAC_MAX_PKTS) { + int c; + + c = nf10bmac_rx_locked(sc); + rx_npkts += c; + if (c == 0) + break; + } + + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + /* Re-enable interrupts. */ + NF10BMAC_RX_INTR_ENABLE(sc); + + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) + nf10bmac_start_locked(ifp); + } + NF10BMAC_UNLOCK(sc); +} + + #ifdef DEVICE_POLLING static int nf10bmac_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) @@ -631,10 +743,16 @@ nf10bmac_ioctl(struct ifnet *ifp, u_long break; } + NF10BMAC_RX_INTR_CLEAR_DIS(sc); + /* * Do not allow disabling of polling if we do * not have interrupts. */ + } else if (sc->nf10bmac_rx_irq_res != NULL) { + error = ether_poll_deregister(ifp); + /* Enable interrupts. */ + NF10BMAC_RX_INTR_ENABLE(sc); } else { ifp->if_capenable ^= IFCAP_POLLING; error = EINVAL; @@ -655,7 +773,6 @@ nf10bmac_ioctl(struct ifnet *ifp, u_long return (error); } - /* * Generic device handling routines. */ @@ -715,18 +832,40 @@ nf10bmac_attach(device_t dev) ifmedia_add(&sc->nf10bmac_media, IFM_ETHER | IFM_10G_T, 0, NULL); ifmedia_set(&sc->nf10bmac_media, IFM_ETHER | IFM_10G_T); - /* Interrupts would go here. */ + /* Initialise. */ + error = 0; + + /* Hook up interrupts. Well the one. */ + if (sc->nf10bmac_rx_irq_res != NULL) { + error = bus_setup_intr(dev, sc->nf10bmac_rx_irq_res, + INTR_TYPE_NET | INTR_MPSAFE, NULL, nf10bmac_intr, + sc, &sc->nf10bmac_rx_intrhand); + if (error != 0) { + device_printf(dev, "enabling RX IRQ failed\n"); + ether_ifdetach(ifp); + goto err; + } + } + if ((ifp->if_capenable & IFCAP_POLLING) != 0 || + sc->nf10bmac_rx_irq_res == NULL) { #ifdef DEVICE_POLLING - ifp->if_capenable |= IFCAP_POLLING; - device_printf(dev, "forcing to polling due to no interrupts\n"); - error = ether_poll_register(nf10bmac_poll, ifp); - if (error != 0) - goto err; + /* If not on and no IRQs force it on. */ + if (sc->nf10bmac_rx_irq_res == NULL) { + ifp->if_capenable |= IFCAP_POLLING; + device_printf(dev, + "forcing to polling due to no interrupts\n"); + } + error = ether_poll_register(nf10bmac_poll, ifp); + if (error != 0) + goto err; #else - device_printf(dev, "no DEVICE_POLLING in kernel and no IRQs\n"); - error = ENXIO; + device_printf(dev, "no DEVICE_POLLING in kernel and no IRQs\n"); + error = ENXIO; #endif + } else { + NF10BMAC_RX_INTR_ENABLE(sc); + } err: if (error != 0) @@ -762,6 +901,10 @@ nf10bmac_detach(device_t dev) ether_ifdetach(ifp); } + if (sc->nf10bmac_rx_intrhand) + bus_teardown_intr(dev, sc->nf10bmac_rx_irq_res, + sc->nf10bmac_rx_intrhand); + if (ifp != NULL) if_free(ifp); ifmedia_removeall(&sc->nf10bmac_media); @@ -779,10 +922,15 @@ nf10bmac_detach_resources(device_t dev) sc = device_get_softc(dev); - if (sc->nf10bmac_mem_res != NULL) { + if (sc->nf10bmac_rx_irq_res != NULL) { + bus_release_resource(dev, SYS_RES_IRQ, sc->nf10bmac_rx_irq_rid, + sc->nf10bmac_rx_irq_res); + sc->nf10bmac_rx_irq_res = NULL; + } + if (sc->nf10bmac_intr_res != NULL) { bus_release_resource(dev, SYS_RES_MEMORY, - sc->nf10bmac_mem_rid, sc->nf10bmac_mem_res); - sc->nf10bmac_mem_res = NULL; + sc->nf10bmac_intr_rid, sc->nf10bmac_intr_res); + sc->nf10bmac_intr_res = NULL; } if (sc->nf10bmac_rx_mem_res != NULL) { bus_release_resource(dev, SYS_RES_MEMORY, @@ -794,6 +942,11 @@ nf10bmac_detach_resources(device_t dev) sc->nf10bmac_tx_mem_rid, sc->nf10bmac_tx_mem_res); sc->nf10bmac_tx_mem_res = NULL; } + if (sc->nf10bmac_ctrl_res != NULL) { + bus_release_resource(dev, SYS_RES_MEMORY, + sc->nf10bmac_ctrl_rid, sc->nf10bmac_ctrl_res); + sc->nf10bmac_ctrl_res = NULL; + } } int Modified: stable/10/sys/dev/netfpga10g/nf10bmac/if_nf10bmac_fdt.c ============================================================================== --- head/sys/dev/netfpga10g/nf10bmac/if_nf10bmac_fdt.c Thu Apr 17 12:33:26 2014 (r264601) +++ stable/10/sys/dev/netfpga10g/nf10bmac/if_nf10bmac_fdt.c Sat Aug 16 14:30:46 2014 (r270061) @@ -85,16 +85,34 @@ nf10bmac_attach_fdt(device_t dev) /* * FDT lists our resources. For convenience we use three different * mappings. We need to attach them in the oder specified in .dts: - * TX (size 0xc), RX (size 0xc), LOOP (size 0x4). + * LOOP (size 0x1f), TX (0x2f), RX (0x2f), INTR (0xf). */ + /* + * LOOP memory region (this could be a general control region). + * 0x00: 32/64bit register to enable a Y-"lopback". + */ + sc->nf10bmac_ctrl_rid = 0; + sc->nf10bmac_ctrl_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &sc->nf10bmac_ctrl_rid, RF_ACTIVE); + if (sc->nf10bmac_ctrl_res == NULL) { + device_printf(dev, "failed to map memory for CTRL region\n"); + error = ENXIO; + goto err; + } + if (bootverbose) + device_printf(sc->nf10bmac_dev, "CTRL region at mem %p-%p\n", + (void *)rman_get_start(sc->nf10bmac_ctrl_res), + (void *)(rman_get_start(sc->nf10bmac_ctrl_res) + + rman_get_size(sc->nf10bmac_ctrl_res))); + /* * TX and TX metadata FIFO memory region. - * 0x00: 32bit FIFO data, - * 0x04: 32bit FIFO metadata, - * 0x08: 32bit packet length. + * 0x00: 32/64bit FIFO data, + * 0x08: 32/64bit FIFO metadata, + * 0x10: 32/64bit packet length. */ - sc->nf10bmac_tx_mem_rid = 0; + sc->nf10bmac_tx_mem_rid = 1; sc->nf10bmac_tx_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->nf10bmac_tx_mem_rid, RF_ACTIVE); if (sc->nf10bmac_tx_mem_res == NULL) { @@ -110,11 +128,11 @@ nf10bmac_attach_fdt(device_t dev) /* * RX and RXC metadata FIFO memory region. - * 0x00: 32bit FIFO data, - * 0x04: 32bit FIFO metadata, - * 0x08: 32bit packet length. + * 0x00: 32/64bit FIFO data, + * 0x08: 32/64bit FIFO metadata, + * 0x10: 32/64bit packet length. */ - sc->nf10bmac_rx_mem_rid = 1; + sc->nf10bmac_rx_mem_rid = 2; sc->nf10bmac_rx_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->nf10bmac_rx_mem_rid, RF_ACTIVE); if (sc->nf10bmac_rx_mem_res == NULL) { @@ -129,22 +147,28 @@ nf10bmac_attach_fdt(device_t dev) rman_get_size(sc->nf10bmac_rx_mem_res))); /* - * LOOP memory region (this could be a general control region). - * 0x00: 32bit register to enable a Y-"lopback". + * Interrupt handling registers. + * 0x00: 32/64bit register to clear (and disable) the RX interrupt. + * 0x08: 32/64bit register to enable or disable the RX interrupt. */ - sc->nf10bmac_mem_rid = 2; - sc->nf10bmac_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, - &sc->nf10bmac_mem_rid, RF_ACTIVE); - if (sc->nf10bmac_mem_res == NULL) { - device_printf(dev, "failed to map memory for CTRL region\n"); + sc->nf10bmac_intr_rid = 3; + sc->nf10bmac_intr_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &sc->nf10bmac_intr_rid, RF_ACTIVE); + if (sc->nf10bmac_intr_res == NULL) { + device_printf(dev, "failed to map memory for INTR region\n"); error = ENXIO; goto err; } if (bootverbose) - device_printf(sc->nf10bmac_dev, "CTRL region at mem %p-%p\n", - (void *)rman_get_start(sc->nf10bmac_mem_res), - (void *)(rman_get_start(sc->nf10bmac_mem_res) + - rman_get_size(sc->nf10bmac_mem_res))); + device_printf(sc->nf10bmac_dev, "INTR region at mem %p-%p\n", + (void *)rman_get_start(sc->nf10bmac_intr_res), + (void *)(rman_get_start(sc->nf10bmac_intr_res) + + rman_get_size(sc->nf10bmac_intr_res))); + + /* (Optional) RX and TX IRQ. */ + sc->nf10bmac_rx_irq_rid = 0; + sc->nf10bmac_rx_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, + &sc->nf10bmac_rx_irq_rid, RF_ACTIVE | RF_SHAREABLE); error = nf10bmac_attach(dev); if (error) Modified: stable/10/sys/dev/netfpga10g/nf10bmac/if_nf10bmacreg.h ============================================================================== --- head/sys/dev/netfpga10g/nf10bmac/if_nf10bmacreg.h Thu Apr 17 12:33:26 2014 (r264601) +++ stable/10/sys/dev/netfpga10g/nf10bmac/if_nf10bmacreg.h Sat Aug 16 14:30:46 2014 (r270061) @@ -35,15 +35,20 @@ struct nf10bmac_softc { struct ifnet *nf10bmac_ifp; + struct resource *nf10bmac_ctrl_res; struct resource *nf10bmac_tx_mem_res; struct resource *nf10bmac_rx_mem_res; - struct resource *nf10bmac_mem_res; + struct resource *nf10bmac_intr_res; + struct resource *nf10bmac_rx_irq_res; + void *nf10bmac_rx_intrhand; uint8_t *nf10bmac_tx_buf; device_t nf10bmac_dev; int nf10bmac_unit; + int nf10bmac_ctrl_rid; int nf10bmac_tx_mem_rid; int nf10bmac_rx_mem_rid; - int nf10bmac_mem_rid; + int nf10bmac_intr_rid; + int nf10bmac_rx_irq_rid; int nf10bmac_if_flags; uint32_t nf10bmac_flags; #define NF10BMAC_FLAGS_LINK 0x00000001 Modified: stable/10/sys/mips/beri/files.beri ============================================================================== --- stable/10/sys/mips/beri/files.beri Sat Aug 16 14:21:03 2014 (r270060) +++ stable/10/sys/mips/beri/files.beri Sat Aug 16 14:30:46 2014 (r270061) @@ -6,6 +6,8 @@ dev/altera/jtag_uart/altera_jtag_uart_co dev/altera/jtag_uart/altera_jtag_uart_tty.c optional altera_jtag_uart dev/altera/jtag_uart/altera_jtag_uart_fdt.c optional altera_jtag_uart fdt dev/altera/jtag_uart/altera_jtag_uart_nexus.c optional altera_jtag_uart +dev/netfpga10g/nf10bmac/if_nf10bmac_fdt.c optional netfpga10g_nf10bmac fdt +dev/netfpga10g/nf10bmac/if_nf10bmac.c optional netfpga10g_nf10bmac dev/terasic/de4led/terasic_de4led.c optional terasic_de4led dev/terasic/de4led/terasic_de4led_fdt.c optional terasic_de4led fdt dev/terasic/de4led/terasic_de4led_nexus.c optional terasic_de4led Modified: stable/10/sys/mips/conf/BERI_NETFPGA_MDROOT ============================================================================== --- stable/10/sys/mips/conf/BERI_NETFPGA_MDROOT Sat Aug 16 14:21:03 2014 (r270060) +++ stable/10/sys/mips/conf/BERI_NETFPGA_MDROOT Sat Aug 16 14:30:46 2014 (r270061) @@ -19,6 +19,11 @@ makeoptions FDT_DTS_FILE=beri-netfpga.dt #device uart device altera_jtag_uart +device bpf + +options DEVICE_POLLING +device netfpga10g_nf10bmac + # # This kernel configuration uses an embedded memory root file system. # Adjust the following path and size based on local requirements. Modified: stable/10/sys/modules/Makefile ============================================================================== --- stable/10/sys/modules/Makefile Sat Aug 16 14:21:03 2014 (r270060) +++ stable/10/sys/modules/Makefile Sat Aug 16 14:30:46 2014 (r270061) @@ -239,6 +239,7 @@ SUBDIR= \ ${_ncp} \ ${_ncv} \ ${_ndis} \ + netfpga10g \ ${_netgraph} \ ${_nfe} \ nfs_common \ From rmacklem at FreeBSD.org Sat Aug 16 21:36:23 2014 From: rmacklem at FreeBSD.org (Rick Macklem) Date: Sat, 16 Aug 2014 21:36:22 +0000 (UTC) Subject: svn commit: r270066 - stable/10/sys/fs/nfsserver Message-ID: <201408162136.s7GLaM6g077450@svn.freebsd.org> Author: rmacklem Date: Sat Aug 16 21:36:22 2014 New Revision: 270066 URL: http://svnweb.freebsd.org/changeset/base/270066 Log: MFC: r269771 Change the NFS server's printf related to hitting the DRC cache's flood level so that it suggests increasing vfs.nfsd.tcphighwater. Modified: stable/10/sys/fs/nfsserver/nfs_nfsdsocket.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsserver/nfs_nfsdsocket.c ============================================================================== --- stable/10/sys/fs/nfsserver/nfs_nfsdsocket.c Sat Aug 16 20:44:45 2014 (r270065) +++ stable/10/sys/fs/nfsserver/nfs_nfsdsocket.c Sat Aug 16 21:36:22 2014 (r270066) @@ -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 grehan at FreeBSD.org Sun Aug 17 00:52:10 2014 From: grehan at FreeBSD.org (Peter Grehan) Date: Sun, 17 Aug 2014 00:52:08 +0000 (UTC) Subject: svn commit: r270070 - in stable/10: lib/libvmmapi sys/amd64/include sys/amd64/vmm sys/amd64/vmm/io usr.sbin/bhyve usr.sbin/bhyvectl Message-ID: <201408170052.s7H0q8nn067016@svn.freebsd.org> Author: grehan Date: Sun Aug 17 00:52:07 2014 New Revision: 270070 URL: http://svnweb.freebsd.org/changeset/base/270070 Log: MFC r266933 Activate vcpus from bhyve(8) using the ioctl VM_ACTIVATE_CPU instead of doing it implicitly in vmm.ko. Modified: stable/10/lib/libvmmapi/vmmapi.c stable/10/lib/libvmmapi/vmmapi.h stable/10/sys/amd64/include/vmm.h stable/10/sys/amd64/include/vmm_dev.h stable/10/sys/amd64/vmm/io/vlapic.c stable/10/sys/amd64/vmm/vmm.c stable/10/sys/amd64/vmm/vmm_dev.c stable/10/usr.sbin/bhyve/bhyverun.c stable/10/usr.sbin/bhyve/pci_lpc.c stable/10/usr.sbin/bhyvectl/bhyvectl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libvmmapi/vmmapi.c ============================================================================== --- stable/10/lib/libvmmapi/vmmapi.c Sat Aug 16 22:55:58 2014 (r270069) +++ stable/10/lib/libvmmapi/vmmapi.c Sun Aug 17 00:52:07 2014 (r270070) @@ -29,11 +29,12 @@ #include __FBSDID("$FreeBSD$"); -#include +#include #include #include #include #include +#include #include #include @@ -1043,3 +1044,44 @@ vm_copyout(struct vmctx *ctx, int vcpu, len -= n; } } + +static int +vm_get_cpus(struct vmctx *ctx, int which, cpuset_t *cpus) +{ + struct vm_cpuset vm_cpuset; + int error; + + bzero(&vm_cpuset, sizeof(struct vm_cpuset)); + vm_cpuset.which = which; + vm_cpuset.cpusetsize = sizeof(cpuset_t); + vm_cpuset.cpus = cpus; + + error = ioctl(ctx->fd, VM_GET_CPUS, &vm_cpuset); + return (error); +} + +int +vm_active_cpus(struct vmctx *ctx, cpuset_t *cpus) +{ + + return (vm_get_cpus(ctx, VM_ACTIVE_CPUS, cpus)); +} + +int +vm_suspended_cpus(struct vmctx *ctx, cpuset_t *cpus) +{ + + return (vm_get_cpus(ctx, VM_SUSPENDED_CPUS, cpus)); +} + +int +vm_activate_cpu(struct vmctx *ctx, int vcpu) +{ + struct vm_activate_cpu ac; + int error; + + bzero(&ac, sizeof(struct vm_activate_cpu)); + ac.vcpuid = vcpu; + error = ioctl(ctx->fd, VM_ACTIVATE_CPU, &ac); + return (error); +} Modified: stable/10/lib/libvmmapi/vmmapi.h ============================================================================== --- stable/10/lib/libvmmapi/vmmapi.h Sat Aug 16 22:55:58 2014 (r270069) +++ stable/10/lib/libvmmapi/vmmapi.h Sun Aug 17 00:52:07 2014 (r270070) @@ -29,6 +29,9 @@ #ifndef _VMMAPI_H_ #define _VMMAPI_H_ +#include +#include + struct iovec; struct vmctx; enum x2apic_state; @@ -125,6 +128,10 @@ void vm_copyout(struct vmctx *ctx, int v /* Reset vcpu register state */ int vcpu_reset(struct vmctx *ctx, int vcpu); +int vm_active_cpus(struct vmctx *ctx, cpuset_t *cpus); +int vm_suspended_cpus(struct vmctx *ctx, cpuset_t *cpus); +int vm_activate_cpu(struct vmctx *ctx, int vcpu); + /* * FreeBSD specific APIs */ Modified: stable/10/sys/amd64/include/vmm.h ============================================================================== --- stable/10/sys/amd64/include/vmm.h Sat Aug 16 22:55:58 2014 (r270069) +++ stable/10/sys/amd64/include/vmm.h Sun Aug 17 00:52:07 2014 (r270070) @@ -140,8 +140,9 @@ int vm_set_capability(struct vm *vm, int int vm_get_x2apic_state(struct vm *vm, int vcpu, enum x2apic_state *state); int vm_set_x2apic_state(struct vm *vm, int vcpu, enum x2apic_state state); int vm_apicid2vcpuid(struct vm *vm, int apicid); -void vm_activate_cpu(struct vm *vm, int vcpu); +int vm_activate_cpu(struct vm *vm, int vcpu); cpuset_t vm_active_cpus(struct vm *vm); +cpuset_t vm_suspended_cpus(struct vm *vm); struct vm_exit *vm_exitinfo(struct vm *vm, int vcpuid); void vm_exit_suspended(struct vm *vm, int vcpuid, uint64_t rip); Modified: stable/10/sys/amd64/include/vmm_dev.h ============================================================================== --- stable/10/sys/amd64/include/vmm_dev.h Sat Aug 16 22:55:58 2014 (r270069) +++ stable/10/sys/amd64/include/vmm_dev.h Sun Aug 17 00:52:07 2014 (r270070) @@ -177,6 +177,18 @@ struct vm_gla2gpa { uint64_t gpa; }; +struct vm_activate_cpu { + int vcpuid; +}; + +struct vm_cpuset { + int which; + int cpusetsize; + cpuset_t *cpus; +}; +#define VM_ACTIVE_CPUS 0 +#define VM_SUSPENDED_CPUS 1 + enum { /* general routines */ IOCNUM_ABIVERS = 0, @@ -229,6 +241,10 @@ enum { IOCNUM_ISA_DEASSERT_IRQ = 81, IOCNUM_ISA_PULSE_IRQ = 82, IOCNUM_ISA_SET_IRQ_TRIGGER = 83, + + /* vm_cpuset */ + IOCNUM_ACTIVATE_CPU = 90, + IOCNUM_GET_CPUSET = 91, }; #define VM_RUN \ @@ -301,4 +317,8 @@ enum { _IOWR('v', IOCNUM_GET_GPA_PMAP, struct vm_gpa_pte) #define VM_GLA2GPA \ _IOWR('v', IOCNUM_GLA2GPA, struct vm_gla2gpa) +#define VM_ACTIVATE_CPU \ + _IOW('v', IOCNUM_ACTIVATE_CPU, struct vm_activate_cpu) +#define VM_GET_CPUS \ + _IOW('v', IOCNUM_GET_CPUSET, struct vm_cpuset) #endif Modified: stable/10/sys/amd64/vmm/io/vlapic.c ============================================================================== --- stable/10/sys/amd64/vmm/io/vlapic.c Sat Aug 16 22:55:58 2014 (r270069) +++ stable/10/sys/amd64/vmm/io/vlapic.c Sun Aug 17 00:52:07 2014 (r270070) @@ -1004,11 +1004,7 @@ vlapic_icrlo_write_handler(struct vlapic if (vlapic2->boot_state != BS_SIPI) return (0); - /* - * XXX this assumes that the startup IPI always succeeds - */ vlapic2->boot_state = BS_RUNNING; - vm_activate_cpu(vlapic2->vm, dest); *retu = true; vmexit = vm_exitinfo(vlapic->vm, vlapic->vcpuid); Modified: stable/10/sys/amd64/vmm/vmm.c ============================================================================== --- stable/10/sys/amd64/vmm/vmm.c Sat Aug 16 22:55:58 2014 (r270069) +++ stable/10/sys/amd64/vmm/vmm.c Sun Aug 17 00:52:07 2014 (r270070) @@ -342,8 +342,6 @@ vm_create(const char *name, struct vm ** struct vm *vm; struct vmspace *vmspace; - const int BSP = 0; - /* * If vmm.ko could not be successfully initialized then don't attempt * to create the virtual machine. @@ -373,8 +371,6 @@ vm_create(const char *name, struct vm ** guest_msrs_init(vm, i); } - vm_activate_cpu(vm, BSP); - *retvm = vm; return (0); } @@ -1294,6 +1290,12 @@ vm_run(struct vm *vm, struct vm_run *vmr if (vcpuid < 0 || vcpuid >= VM_MAXCPU) return (EINVAL); + if (!CPU_ISSET(vcpuid, &vm->active_cpus)) + return (EINVAL); + + if (CPU_ISSET(vcpuid, &vm->suspended_cpus)) + return (EINVAL); + rptr = &vm->rendezvous_func; sptr = &vm->suspend; pmap = vmspace_pmap(vm->vmspace); @@ -1708,17 +1710,19 @@ vcpu_get_state(struct vm *vm, int vcpuid return (state); } -void +int vm_activate_cpu(struct vm *vm, int vcpuid) { - KASSERT(vcpuid >= 0 && vcpuid < VM_MAXCPU, - ("vm_activate_cpu: invalid vcpuid %d", vcpuid)); - KASSERT(!CPU_ISSET(vcpuid, &vm->active_cpus), - ("vm_activate_cpu: vcpuid %d is already active", vcpuid)); + if (vcpuid < 0 || vcpuid >= VM_MAXCPU) + return (EINVAL); + + if (CPU_ISSET(vcpuid, &vm->active_cpus)) + return (EBUSY); VCPU_CTR0(vm, vcpuid, "activated"); CPU_SET_ATOMIC(vcpuid, &vm->active_cpus); + return (0); } cpuset_t @@ -1728,6 +1732,13 @@ vm_active_cpus(struct vm *vm) return (vm->active_cpus); } +cpuset_t +vm_suspended_cpus(struct vm *vm) +{ + + return (vm->suspended_cpus); +} + void * vcpu_stats(struct vm *vm, int vcpuid) { Modified: stable/10/sys/amd64/vmm/vmm_dev.c ============================================================================== --- stable/10/sys/amd64/vmm/vmm_dev.c Sat Aug 16 22:55:58 2014 (r270069) +++ stable/10/sys/amd64/vmm/vmm_dev.c Sun Aug 17 00:52:07 2014 (r270070) @@ -146,7 +146,8 @@ static int vmmdev_ioctl(struct cdev *cdev, u_long cmd, caddr_t data, int fflag, struct thread *td) { - int error, vcpu, state_changed; + int error, vcpu, state_changed, size; + cpuset_t *cpuset; struct vmmdev_softc *sc; struct vm_memory_segment *seg; struct vm_register *vmreg; @@ -170,6 +171,8 @@ vmmdev_ioctl(struct cdev *cdev, u_long c struct vm_gpa_pte *gpapte; struct vm_suspend *vmsuspend; struct vm_gla2gpa *gg; + struct vm_activate_cpu *vac; + struct vm_cpuset *vm_cpuset; sc = vmmdev_lookup2(cdev); if (sc == NULL) @@ -195,6 +198,7 @@ vmmdev_ioctl(struct cdev *cdev, u_long c case VM_PPTDEV_MSIX: case VM_SET_X2APIC_STATE: case VM_GLA2GPA: + case VM_ACTIVATE_CPU: /* * XXX fragile, handle with care * Assumes that the first field of the ioctl data is the vcpu. @@ -439,6 +443,29 @@ vmmdev_ioctl(struct cdev *cdev, u_long c } break; } + case VM_ACTIVATE_CPU: + vac = (struct vm_activate_cpu *)data; + error = vm_activate_cpu(sc->vm, vac->vcpuid); + break; + case VM_GET_CPUS: + error = 0; + vm_cpuset = (struct vm_cpuset *)data; + size = vm_cpuset->cpusetsize; + if (size < sizeof(cpuset_t) || size > CPU_MAXSIZE / NBBY) { + error = ERANGE; + break; + } + cpuset = malloc(size, M_TEMP, M_WAITOK | M_ZERO); + if (vm_cpuset->which == VM_ACTIVE_CPUS) + *cpuset = vm_active_cpus(sc->vm); + else if (vm_cpuset->which == VM_SUSPENDED_CPUS) + *cpuset = vm_suspended_cpus(sc->vm); + else + error = EINVAL; + if (error == 0) + error = copyout(cpuset, vm_cpuset->cpus, size); + free(cpuset, M_TEMP); + break; default: error = ENOTTY; break; Modified: stable/10/usr.sbin/bhyve/bhyverun.c ============================================================================== --- stable/10/usr.sbin/bhyve/bhyverun.c Sat Aug 16 22:55:58 2014 (r270069) +++ stable/10/usr.sbin/bhyve/bhyverun.c Sun Aug 17 00:52:07 2014 (r270070) @@ -242,6 +242,15 @@ fbsdrun_addcpu(struct vmctx *ctx, int fr assert(fromcpu == BSP); + /* + * The 'newcpu' must be activated in the context of 'fromcpu'. If + * vm_activate_cpu() is delayed until newcpu's pthread starts running + * then vmm.ko is out-of-sync with bhyve and this can create a race + * with vm_suspend(). + */ + error = vm_activate_cpu(ctx, newcpu); + assert(error == 0); + CPU_SET_ATOMIC(newcpu, &cpumask); /* @@ -532,6 +541,7 @@ vm_loop(struct vmctx *ctx, int vcpu, uin int error, rc, prevcpu; enum vm_exitcode exitcode; enum vm_suspend_how how; + cpuset_t active_cpus; if (vcpumap[vcpu] != NULL) { error = pthread_setaffinity_np(pthread_self(), @@ -539,6 +549,9 @@ vm_loop(struct vmctx *ctx, int vcpu, uin assert(error == 0); } + error = vm_active_cpus(ctx, &active_cpus); + assert(CPU_ISSET(vcpu, &active_cpus)); + while (1) { error = vm_run(ctx, vcpu, rip, &vmexit[vcpu]); if (error != 0) Modified: stable/10/usr.sbin/bhyve/pci_lpc.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_lpc.c Sat Aug 16 22:55:58 2014 (r270069) +++ stable/10/usr.sbin/bhyve/pci_lpc.c Sun Aug 17 00:52:07 2014 (r270070) @@ -32,7 +32,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: stable/10/usr.sbin/bhyvectl/bhyvectl.c ============================================================================== --- stable/10/usr.sbin/bhyvectl/bhyvectl.c Sat Aug 16 22:55:58 2014 (r270069) +++ stable/10/usr.sbin/bhyvectl/bhyvectl.c Sun Aug 17 00:52:07 2014 (r270070) @@ -193,7 +193,9 @@ usage(void) " [--assert-lapic-lvt=]\n" " [--inject-nmi]\n" " [--force-reset]\n" - " [--force-poweroff]\n", + " [--force-poweroff]\n" + " [--get-active-cpus]\n" + " [--get-suspended-cpus]\n", progname); exit(1); } @@ -203,6 +205,7 @@ static int inject_nmi, assert_lapic_lvt; static int force_reset, force_poweroff; static const char *capname; static int create, destroy, get_lowmem, get_highmem; +static int get_active_cpus, get_suspended_cpus; static uint64_t memsize; static int set_cr0, get_cr0, set_cr3, get_cr3, set_cr4, get_cr4; static int set_efer, get_efer; @@ -390,6 +393,25 @@ enum { ASSERT_LAPIC_LVT, }; +static void +print_cpus(const char *banner, const cpuset_t *cpus) +{ + int i, first; + + first = 1; + printf("%s:\t", banner); + if (!CPU_EMPTY(cpus)) { + for (i = 0; i < CPU_SETSIZE; i++) { + if (CPU_ISSET(i, cpus)) { + printf("%s%d", first ? " " : ", ", i); + first = 0; + } + } + } else + printf(" (none)"); + printf("\n"); +} + int main(int argc, char *argv[]) { @@ -401,6 +423,7 @@ main(int argc, char *argv[]) uint64_t ctl, eptp, bm, addr, u64, pteval[4], *pte; struct vmctx *ctx; int wired; + cpuset_t cpus; uint64_t cr0, cr3, cr4, dr7, rsp, rip, rflags, efer, pat; uint64_t rax, rbx, rcx, rdx, rsi, rdi, rbp; @@ -570,6 +593,8 @@ main(int argc, char *argv[]) { "inject-nmi", NO_ARG, &inject_nmi, 1 }, { "force-reset", NO_ARG, &force_reset, 1 }, { "force-poweroff", NO_ARG, &force_poweroff, 1 }, + { "get-active-cpus", NO_ARG, &get_active_cpus, 1 }, + { "get-suspended-cpus", NO_ARG, &get_suspended_cpus, 1 }, { NULL, 0, NULL, 0 } }; @@ -1529,6 +1554,18 @@ main(int argc, char *argv[]) } } + if (!error && (get_active_cpus || get_all)) { + error = vm_active_cpus(ctx, &cpus); + if (!error) + print_cpus("active cpus", &cpus); + } + + if (!error && (get_suspended_cpus || get_all)) { + error = vm_suspended_cpus(ctx, &cpus); + if (!error) + print_cpus("suspended cpus", &cpus); + } + if (!error && run) { error = vm_get_register(ctx, vcpu, VM_REG_GUEST_RIP, &rip); assert(error == 0); From grehan at FreeBSD.org Sun Aug 17 01:00:45 2014 From: grehan at FreeBSD.org (Peter Grehan) Date: Sun, 17 Aug 2014 01:00:43 +0000 (UTC) Subject: svn commit: r270071 - in stable/10: lib/libvmmapi sys/amd64/include sys/amd64/vmm usr.sbin/bhyveload Message-ID: <201408170100.s7H10hcY069652@svn.freebsd.org> Author: grehan Date: Sun Aug 17 01:00:42 2014 New Revision: 270071 URL: http://svnweb.freebsd.org/changeset/base/270071 Log: MFC r267216 Add ioctl(VM_REINIT) to reinitialize the virtual machine state maintained by vmm.ko. This allows the virtual machine to be restarted without having to destroy it first. Modified: stable/10/lib/libvmmapi/vmmapi.c stable/10/lib/libvmmapi/vmmapi.h stable/10/sys/amd64/include/vmm.h stable/10/sys/amd64/include/vmm_dev.h stable/10/sys/amd64/vmm/vmm.c stable/10/sys/amd64/vmm/vmm_dev.c stable/10/sys/amd64/vmm/vmm_stat.c stable/10/sys/amd64/vmm/vmm_stat.h stable/10/usr.sbin/bhyveload/bhyveload.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libvmmapi/vmmapi.c ============================================================================== --- stable/10/lib/libvmmapi/vmmapi.c Sun Aug 17 00:52:07 2014 (r270070) +++ stable/10/lib/libvmmapi/vmmapi.c Sun Aug 17 01:00:42 2014 (r270071) @@ -367,6 +367,13 @@ vm_suspend(struct vmctx *ctx, enum vm_su return (ioctl(ctx->fd, VM_SUSPEND, &vmsuspend)); } +int +vm_reinit(struct vmctx *ctx) +{ + + return (ioctl(ctx->fd, VM_REINIT, 0)); +} + static int vm_inject_exception_real(struct vmctx *ctx, int vcpu, int vector, int error_code, int error_code_valid) Modified: stable/10/lib/libvmmapi/vmmapi.h ============================================================================== --- stable/10/lib/libvmmapi/vmmapi.h Sun Aug 17 00:52:07 2014 (r270070) +++ stable/10/lib/libvmmapi/vmmapi.h Sun Aug 17 01:00:42 2014 (r270071) @@ -69,6 +69,7 @@ int vm_get_register(struct vmctx *ctx, i int vm_run(struct vmctx *ctx, int vcpu, uint64_t rip, struct vm_exit *ret_vmexit); int vm_suspend(struct vmctx *ctx, enum vm_suspend_how how); +int vm_reinit(struct vmctx *ctx); int vm_apicid2vcpu(struct vmctx *ctx, int apicid); int vm_inject_exception(struct vmctx *ctx, int vcpu, int vec); int vm_inject_exception2(struct vmctx *ctx, int vcpu, int vec, int errcode); Modified: stable/10/sys/amd64/include/vmm.h ============================================================================== --- stable/10/sys/amd64/include/vmm.h Sun Aug 17 00:52:07 2014 (r270070) +++ stable/10/sys/amd64/include/vmm.h Sun Aug 17 01:00:42 2014 (r270071) @@ -105,6 +105,7 @@ extern struct vmm_ops vmm_ops_amd; int vm_create(const char *name, struct vm **retvm); void vm_destroy(struct vm *vm); +int vm_reinit(struct vm *vm); const char *vm_name(struct vm *vm); int vm_malloc(struct vm *vm, vm_paddr_t gpa, size_t len); int vm_map_mmio(struct vm *vm, vm_paddr_t gpa, size_t len, vm_paddr_t hpa); Modified: stable/10/sys/amd64/include/vmm_dev.h ============================================================================== --- stable/10/sys/amd64/include/vmm_dev.h Sun Aug 17 00:52:07 2014 (r270070) +++ stable/10/sys/amd64/include/vmm_dev.h Sun Aug 17 01:00:42 2014 (r270071) @@ -196,6 +196,7 @@ enum { IOCNUM_SET_CAPABILITY = 2, IOCNUM_GET_CAPABILITY = 3, IOCNUM_SUSPEND = 4, + IOCNUM_REINIT = 5, /* memory apis */ IOCNUM_MAP_MEMORY = 10, @@ -251,6 +252,8 @@ enum { _IOWR('v', IOCNUM_RUN, struct vm_run) #define VM_SUSPEND \ _IOW('v', IOCNUM_SUSPEND, struct vm_suspend) +#define VM_REINIT \ + _IO('v', IOCNUM_REINIT) #define VM_MAP_MEMORY \ _IOWR('v', IOCNUM_MAP_MEMORY, struct vm_memory_segment) #define VM_GET_MEMORY_SEG \ Modified: stable/10/sys/amd64/vmm/vmm.c ============================================================================== --- stable/10/sys/amd64/vmm/vmm.c Sun Aug 17 00:52:07 2014 (r270070) +++ stable/10/sys/amd64/vmm/vmm.c Sun Aug 17 01:00:42 2014 (r270071) @@ -84,25 +84,31 @@ __FBSDID("$FreeBSD$"); struct vlapic; +/* + * Initialization: + * (a) allocated when vcpu is created + * (i) initialized when vcpu is created and when it is reinitialized + * (o) initialized the first time the vcpu is created + * (x) initialized before use + */ struct vcpu { - int flags; - enum vcpu_state state; - struct mtx mtx; - int hostcpu; /* host cpuid this vcpu last ran on */ - uint64_t guest_msrs[VMM_MSR_NUM]; - struct vlapic *vlapic; - int vcpuid; - struct savefpu *guestfpu; /* guest fpu state */ - uint64_t guest_xcr0; - void *stats; - struct vm_exit exitinfo; - enum x2apic_state x2apic_state; - int nmi_pending; - int extint_pending; - struct vm_exception exception; - int exception_pending; + struct mtx mtx; /* (o) protects 'state' and 'hostcpu' */ + enum vcpu_state state; /* (o) vcpu state */ + int hostcpu; /* (o) vcpu's host cpu */ + struct vlapic *vlapic; /* (i) APIC device model */ + enum x2apic_state x2apic_state; /* (i) APIC mode */ + int nmi_pending; /* (i) NMI pending */ + int extint_pending; /* (i) INTR pending */ + struct vm_exception exception; /* (x) exception collateral */ + int exception_pending; /* (i) exception pending */ + struct savefpu *guestfpu; /* (a,i) guest fpu state */ + uint64_t guest_xcr0; /* (i) guest %xcr0 register */ + void *stats; /* (a,i) statistics */ + uint64_t guest_msrs[VMM_MSR_NUM]; /* (i) emulated MSRs */ + struct vm_exit exitinfo; /* (x) exit reason and collateral */ }; +#define vcpu_lock_initialized(v) mtx_initialized(&((v)->mtx)) #define vcpu_lock_init(v) mtx_init(&((v)->mtx), "vcpu lock", 0, MTX_SPIN) #define vcpu_lock(v) mtx_lock_spin(&((v)->mtx)) #define vcpu_unlock(v) mtx_unlock_spin(&((v)->mtx)) @@ -116,36 +122,33 @@ struct mem_seg { }; #define VM_MAX_MEMORY_SEGMENTS 2 +/* + * Initialization: + * (o) initialized the first time the VM is created + * (i) initialized when VM is created and when it is reinitialized + * (x) initialized before use + */ struct vm { - void *cookie; /* processor-specific data */ - void *iommu; /* iommu-specific data */ - struct vhpet *vhpet; /* virtual HPET */ - struct vioapic *vioapic; /* virtual ioapic */ - struct vatpic *vatpic; /* virtual atpic */ - struct vatpit *vatpit; /* virtual atpit */ - struct vmspace *vmspace; /* guest's address space */ - struct vcpu vcpu[VM_MAXCPU]; - int num_mem_segs; - struct mem_seg mem_segs[VM_MAX_MEMORY_SEGMENTS]; - char name[VM_MAX_NAMELEN]; - - /* - * Set of active vcpus. - * An active vcpu is one that has been started implicitly (BSP) or - * explicitly (AP) by sending it a startup ipi. - */ - volatile cpuset_t active_cpus; - - struct mtx rendezvous_mtx; - cpuset_t rendezvous_req_cpus; - cpuset_t rendezvous_done_cpus; - void *rendezvous_arg; + void *cookie; /* (i) cpu-specific data */ + void *iommu; /* (x) iommu-specific data */ + struct vhpet *vhpet; /* (i) virtual HPET */ + struct vioapic *vioapic; /* (i) virtual ioapic */ + struct vatpic *vatpic; /* (i) virtual atpic */ + struct vatpit *vatpit; /* (i) virtual atpit */ + volatile cpuset_t active_cpus; /* (i) active vcpus */ + int suspend; /* (i) stop VM execution */ + volatile cpuset_t suspended_cpus; /* (i) suspended vcpus */ + volatile cpuset_t halted_cpus; /* (x) cpus in a hard halt */ + cpuset_t rendezvous_req_cpus; /* (x) rendezvous requested */ + cpuset_t rendezvous_done_cpus; /* (x) rendezvous finished */ + void *rendezvous_arg; /* (x) rendezvous func/arg */ vm_rendezvous_func_t rendezvous_func; - - int suspend; - volatile cpuset_t suspended_cpus; - - volatile cpuset_t halted_cpus; + struct mtx rendezvous_mtx; /* (o) rendezvous lock */ + int num_mem_segs; /* (o) guest memory segments */ + struct mem_seg mem_segs[VM_MAX_MEMORY_SEGMENTS]; + struct vmspace *vmspace; /* (o) guest's address space */ + char name[VM_MAX_NAMELEN]; /* (o) virtual machine name */ + struct vcpu vcpu[VM_MAXCPU]; /* (i) guest vcpus */ }; static int vmm_initialized; @@ -206,31 +209,46 @@ SYSCTL_INT(_hw_vmm, OID_AUTO, ipinum, CT "IPI vector used for vcpu notifications"); static void -vcpu_cleanup(struct vm *vm, int i) +vcpu_cleanup(struct vm *vm, int i, bool destroy) { struct vcpu *vcpu = &vm->vcpu[i]; VLAPIC_CLEANUP(vm->cookie, vcpu->vlapic); - vmm_stat_free(vcpu->stats); - fpu_save_area_free(vcpu->guestfpu); + if (destroy) { + vmm_stat_free(vcpu->stats); + fpu_save_area_free(vcpu->guestfpu); + } } static void -vcpu_init(struct vm *vm, uint32_t vcpu_id) +vcpu_init(struct vm *vm, int vcpu_id, bool create) { struct vcpu *vcpu; - + + KASSERT(vcpu_id >= 0 && vcpu_id < VM_MAXCPU, + ("vcpu_init: invalid vcpu %d", vcpu_id)); + vcpu = &vm->vcpu[vcpu_id]; - vcpu_lock_init(vcpu); - vcpu->hostcpu = NOCPU; - vcpu->vcpuid = vcpu_id; + if (create) { + KASSERT(!vcpu_lock_initialized(vcpu), ("vcpu %d already " + "initialized", vcpu_id)); + vcpu_lock_init(vcpu); + vcpu->state = VCPU_IDLE; + vcpu->hostcpu = NOCPU; + vcpu->guestfpu = fpu_save_area_alloc(); + vcpu->stats = vmm_stat_alloc(); + } + vcpu->vlapic = VLAPIC_INIT(vm->cookie, vcpu_id); vm_set_x2apic_state(vm, vcpu_id, X2APIC_DISABLED); + vcpu->nmi_pending = 0; + vcpu->extint_pending = 0; + vcpu->exception_pending = 0; vcpu->guest_xcr0 = XFEATURE_ENABLED_X87; - vcpu->guestfpu = fpu_save_area_alloc(); fpu_save_area_reset(vcpu->guestfpu); - vcpu->stats = vmm_stat_alloc(); + vmm_stat_init(vcpu->stats); + guest_msrs_init(vm, vcpu_id); } struct vm_exit * @@ -335,10 +353,30 @@ static moduledata_t vmm_kmod = { DECLARE_MODULE(vmm, vmm_kmod, SI_SUB_SMP + 1, SI_ORDER_ANY); MODULE_VERSION(vmm, 1); +static void +vm_init(struct vm *vm, bool create) +{ + int i; + + vm->cookie = VMINIT(vm, vmspace_pmap(vm->vmspace)); + vm->iommu = NULL; + vm->vioapic = vioapic_init(vm); + vm->vhpet = vhpet_init(vm); + vm->vatpic = vatpic_init(vm); + vm->vatpit = vatpit_init(vm); + + CPU_ZERO(&vm->active_cpus); + + vm->suspend = 0; + CPU_ZERO(&vm->suspended_cpus); + + for (i = 0; i < VM_MAXCPU; i++) + vcpu_init(vm, i, create); +} + int vm_create(const char *name, struct vm **retvm) { - int i; struct vm *vm; struct vmspace *vmspace; @@ -358,18 +396,11 @@ vm_create(const char *name, struct vm ** vm = malloc(sizeof(struct vm), M_VM, M_WAITOK | M_ZERO); strcpy(vm->name, name); + vm->num_mem_segs = 0; vm->vmspace = vmspace; mtx_init(&vm->rendezvous_mtx, "vm rendezvous lock", 0, MTX_DEF); - vm->cookie = VMINIT(vm, vmspace_pmap(vmspace)); - vm->vioapic = vioapic_init(vm); - vm->vhpet = vhpet_init(vm); - vm->vatpic = vatpic_init(vm); - vm->vatpit = vatpit_init(vm); - for (i = 0; i < VM_MAXCPU; i++) { - vcpu_init(vm, i); - guest_msrs_init(vm, i); - } + vm_init(vm, true); *retvm = vm; return (0); @@ -385,8 +416,8 @@ vm_free_mem_seg(struct vm *vm, struct me bzero(seg, sizeof(*seg)); } -void -vm_destroy(struct vm *vm) +static void +vm_cleanup(struct vm *vm, bool destroy) { int i; @@ -400,21 +431,48 @@ vm_destroy(struct vm *vm) vatpic_cleanup(vm->vatpic); vioapic_cleanup(vm->vioapic); - for (i = 0; i < vm->num_mem_segs; i++) - vm_free_mem_seg(vm, &vm->mem_segs[i]); + for (i = 0; i < VM_MAXCPU; i++) + vcpu_cleanup(vm, i, destroy); - vm->num_mem_segs = 0; + VMCLEANUP(vm->cookie); - for (i = 0; i < VM_MAXCPU; i++) - vcpu_cleanup(vm, i); + if (destroy) { + for (i = 0; i < vm->num_mem_segs; i++) + vm_free_mem_seg(vm, &vm->mem_segs[i]); - VMSPACE_FREE(vm->vmspace); + vm->num_mem_segs = 0; - VMCLEANUP(vm->cookie); + VMSPACE_FREE(vm->vmspace); + vm->vmspace = NULL; + } +} +void +vm_destroy(struct vm *vm) +{ + vm_cleanup(vm, true); free(vm, M_VM); } +int +vm_reinit(struct vm *vm) +{ + int error; + + /* + * A virtual machine can be reset only if all vcpus are suspended. + */ + if (CPU_CMP(&vm->suspended_cpus, &vm->active_cpus) == 0) { + vm_cleanup(vm, false); + vm_init(vm, false); + error = 0; + } else { + error = EBUSY; + } + + return (error); +} + const char * vm_name(struct vm *vm) { Modified: stable/10/sys/amd64/vmm/vmm_dev.c ============================================================================== --- stable/10/sys/amd64/vmm/vmm_dev.c Sun Aug 17 00:52:07 2014 (r270070) +++ stable/10/sys/amd64/vmm/vmm_dev.c Sun Aug 17 01:00:42 2014 (r270071) @@ -220,6 +220,7 @@ vmmdev_ioctl(struct cdev *cdev, u_long c case VM_BIND_PPTDEV: case VM_UNBIND_PPTDEV: case VM_MAP_MEMORY: + case VM_REINIT: /* * ioctls that operate on the entire virtual machine must * prevent all vcpus from running. @@ -253,6 +254,9 @@ vmmdev_ioctl(struct cdev *cdev, u_long c vmsuspend = (struct vm_suspend *)data; error = vm_suspend(sc->vm, vmsuspend->how); break; + case VM_REINIT: + error = vm_reinit(sc->vm); + break; case VM_STAT_DESC: { statdesc = (struct vm_stat_desc *)data; error = vmm_stat_desc_copy(statdesc->index, Modified: stable/10/sys/amd64/vmm/vmm_stat.c ============================================================================== --- stable/10/sys/amd64/vmm/vmm_stat.c Sun Aug 17 00:52:07 2014 (r270070) +++ stable/10/sys/amd64/vmm/vmm_stat.c Sun Aug 17 01:00:42 2014 (r270071) @@ -52,8 +52,10 @@ static struct vmm_stat_type *vsttab[MAX_ static MALLOC_DEFINE(M_VMM_STAT, "vmm stat", "vmm stat"); +#define vst_size ((size_t)vst_num_elems * sizeof(uint64_t)) + void -vmm_stat_init(void *arg) +vmm_stat_register(void *arg) { struct vmm_stat_type *vst = arg; @@ -97,11 +99,15 @@ vmm_stat_copy(struct vm *vm, int vcpu, i void * vmm_stat_alloc(void) { - u_long size; - - size = vst_num_elems * sizeof(uint64_t); - return (malloc(size, M_VMM_STAT, M_ZERO | M_WAITOK)); + return (malloc(vst_size, M_VMM_STAT, M_WAITOK)); +} + +void +vmm_stat_init(void *vp) +{ + + bzero(vp, vst_size); } void Modified: stable/10/sys/amd64/vmm/vmm_stat.h ============================================================================== --- stable/10/sys/amd64/vmm/vmm_stat.h Sun Aug 17 00:52:07 2014 (r270070) +++ stable/10/sys/amd64/vmm/vmm_stat.h Sun Aug 17 01:00:42 2014 (r270071) @@ -49,13 +49,13 @@ struct vmm_stat_type { enum vmm_stat_scope scope; }; -void vmm_stat_init(void *arg); +void vmm_stat_register(void *arg); #define VMM_STAT_DEFINE(type, nelems, desc, scope) \ struct vmm_stat_type type[1] = { \ { -1, nelems, desc, scope } \ }; \ - SYSINIT(type##_stat, SI_SUB_KLD, SI_ORDER_ANY, vmm_stat_init, type) + SYSINIT(type##_stat, SI_SUB_KLD, SI_ORDER_ANY, vmm_stat_register, type) #define VMM_STAT_DECLARE(type) \ extern struct vmm_stat_type type[1] @@ -71,6 +71,7 @@ void vmm_stat_init(void *arg); VMM_STAT_DEFINE(type, nelems, desc, VMM_STAT_SCOPE_ANY) void *vmm_stat_alloc(void); +void vmm_stat_init(void *vp); void vmm_stat_free(void *vp); /* Modified: stable/10/usr.sbin/bhyveload/bhyveload.c ============================================================================== --- stable/10/usr.sbin/bhyveload/bhyveload.c Sun Aug 17 00:52:07 2014 (r270070) +++ stable/10/usr.sbin/bhyveload/bhyveload.c Sun Aug 17 01:00:42 2014 (r270071) @@ -642,7 +642,7 @@ main(int argc, char** argv) void *h; void (*func)(struct loader_callbacks *, void *, int, int); uint64_t mem_size; - int opt, error; + int opt, error, need_reinit; progname = basename(argv[0]); @@ -691,11 +691,14 @@ main(int argc, char** argv) vmname = argv[0]; + need_reinit = 0; error = vm_create(vmname); - if (error != 0 && errno != EEXIST) { - perror("vm_create"); - exit(1); - + if (error) { + if (errno != EEXIST) { + perror("vm_create"); + exit(1); + } + need_reinit = 1; } ctx = vm_open(vmname); @@ -704,6 +707,14 @@ main(int argc, char** argv) exit(1); } + if (need_reinit) { + error = vm_reinit(ctx); + if (error) { + perror("vm_reinit"); + exit(1); + } + } + error = vm_setup_memory(ctx, mem_size, VM_MMAP_ALL); if (error) { perror("vm_setup_memory"); From ian at FreeBSD.org Sun Aug 17 01:15:35 2014 From: ian at FreeBSD.org (Ian Lepore) Date: Sun, 17 Aug 2014 01:15:35 +0000 (UTC) Subject: svn commit: r270072 - stable/10/contrib/llvm/tools/clang/lib/Driver Message-ID: <201408170115.s7H1FZmg076512@svn.freebsd.org> Author: ian Date: Sun Aug 17 01:15:34 2014 New Revision: 270072 URL: http://svnweb.freebsd.org/changeset/base/270072 Log: MFC r269387: Update the ARMv6 core clang targets to be an arm1176jzf-s. Modified: stable/10/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp stable/10/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp ============================================================================== --- stable/10/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp Sun Aug 17 01:00:42 2014 (r270071) +++ stable/10/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp Sun Aug 17 01:15:34 2014 (r270072) @@ -183,7 +183,8 @@ static const char *getARMTargetCPU(const MArch = Triple.getArchName(); } - if (Triple.getOS() == llvm::Triple::NetBSD) { + if (Triple.getOS() == llvm::Triple::NetBSD || + Triple.getOS() == llvm::Triple::FreeBSD) { if (MArch == "armv6") return "arm1176jzf-s"; } Modified: stable/10/contrib/llvm/tools/clang/lib/Driver/Tools.cpp ============================================================================== --- stable/10/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Sun Aug 17 01:00:42 2014 (r270071) +++ stable/10/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Sun Aug 17 01:15:34 2014 (r270072) @@ -499,7 +499,8 @@ static std::string getARMTargetCPU(const MArch = Triple.getArchName(); } - if (Triple.getOS() == llvm::Triple::NetBSD) { + if (Triple.getOS() == llvm::Triple::NetBSD || + Triple.getOS() == llvm::Triple::FreeBSD) { if (MArch == "armv6") return "arm1176jzf-s"; } From grehan at FreeBSD.org Sun Aug 17 01:16:42 2014 From: grehan at FreeBSD.org (Peter Grehan) Date: Sun, 17 Aug 2014 01:16:41 +0000 (UTC) Subject: svn commit: r270073 - in stable/10/sys/amd64/vmm: intel io Message-ID: <201408170116.s7H1Gfgh076709@svn.freebsd.org> Author: grehan Date: Sun Aug 17 01:16:40 2014 New Revision: 270073 URL: http://svnweb.freebsd.org/changeset/base/270073 Log: MFC r267178, r267300 Support guest accesses to %cr8 Add reserved bit checking when doing %CR8 emulation and inject #GP if required. Modified: stable/10/sys/amd64/vmm/intel/vmx.c stable/10/sys/amd64/vmm/io/vlapic.c stable/10/sys/amd64/vmm/io/vlapic.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/vmm/intel/vmx.c ============================================================================== --- stable/10/sys/amd64/vmm/intel/vmx.c Sun Aug 17 01:15:34 2014 (r270072) +++ stable/10/sys/amd64/vmm/intel/vmx.c Sun Aug 17 01:16:40 2014 (r270073) @@ -83,7 +83,9 @@ __FBSDID("$FreeBSD$"); (PROCBASED_SECONDARY_CONTROLS | \ PROCBASED_IO_EXITING | \ PROCBASED_MSR_BITMAPS | \ - PROCBASED_CTLS_WINDOW_SETTING) + PROCBASED_CTLS_WINDOW_SETTING | \ + PROCBASED_CR8_LOAD_EXITING | \ + PROCBASED_CR8_STORE_EXITING) #define PROCBASED_CTLS_ZERO_SETTING \ (PROCBASED_CR3_LOAD_EXITING | \ PROCBASED_CR3_STORE_EXITING | \ @@ -714,6 +716,13 @@ vmx_init(int ipinum) procbased_ctls2 &= ~PROCBASED2_VIRTUALIZE_X2APIC_MODE; /* + * No need to emulate accesses to %CR8 if virtual + * interrupt delivery is enabled. + */ + procbased_ctls &= ~PROCBASED_CR8_LOAD_EXITING; + procbased_ctls &= ~PROCBASED_CR8_STORE_EXITING; + + /* * Check for Posted Interrupts only if Virtual Interrupt * Delivery is enabled. */ @@ -1442,97 +1451,130 @@ vmx_emulate_xsetbv(struct vmx *vmx, int return (HANDLED); } -static int -vmx_emulate_cr_access(struct vmx *vmx, int vcpu, uint64_t exitqual) +static uint64_t +vmx_get_guest_reg(struct vmx *vmx, int vcpu, int ident) { - int cr, vmcs_guest_cr, vmcs_shadow_cr; - uint64_t crval, regval, ones_mask, zeros_mask; const struct vmxctx *vmxctx; - /* We only handle mov to %cr0 or %cr4 at this time */ - if ((exitqual & 0xf0) != 0x00) - return (UNHANDLED); + vmxctx = &vmx->ctx[vcpu]; - cr = exitqual & 0xf; - if (cr != 0 && cr != 4) - return (UNHANDLED); + switch (ident) { + case 0: + return (vmxctx->guest_rax); + case 1: + return (vmxctx->guest_rcx); + case 2: + return (vmxctx->guest_rdx); + case 3: + return (vmxctx->guest_rbx); + case 4: + return (vmcs_read(VMCS_GUEST_RSP)); + case 5: + return (vmxctx->guest_rbp); + case 6: + return (vmxctx->guest_rsi); + case 7: + return (vmxctx->guest_rdi); + case 8: + return (vmxctx->guest_r8); + case 9: + return (vmxctx->guest_r9); + case 10: + return (vmxctx->guest_r10); + case 11: + return (vmxctx->guest_r11); + case 12: + return (vmxctx->guest_r12); + case 13: + return (vmxctx->guest_r13); + case 14: + return (vmxctx->guest_r14); + case 15: + return (vmxctx->guest_r15); + default: + panic("invalid vmx register %d", ident); + } +} + +static void +vmx_set_guest_reg(struct vmx *vmx, int vcpu, int ident, uint64_t regval) +{ + struct vmxctx *vmxctx; - regval = 0; /* silence gcc */ vmxctx = &vmx->ctx[vcpu]; - /* - * We must use vmcs_write() directly here because vmcs_setreg() will - * call vmclear(vmcs) as a side-effect which we certainly don't want. - */ - switch ((exitqual >> 8) & 0xf) { + switch (ident) { case 0: - regval = vmxctx->guest_rax; + vmxctx->guest_rax = regval; break; case 1: - regval = vmxctx->guest_rcx; + vmxctx->guest_rcx = regval; break; case 2: - regval = vmxctx->guest_rdx; + vmxctx->guest_rdx = regval; break; case 3: - regval = vmxctx->guest_rbx; + vmxctx->guest_rbx = regval; break; case 4: - regval = vmcs_read(VMCS_GUEST_RSP); + vmcs_write(VMCS_GUEST_RSP, regval); break; case 5: - regval = vmxctx->guest_rbp; + vmxctx->guest_rbp = regval; break; case 6: - regval = vmxctx->guest_rsi; + vmxctx->guest_rsi = regval; break; case 7: - regval = vmxctx->guest_rdi; + vmxctx->guest_rdi = regval; break; case 8: - regval = vmxctx->guest_r8; + vmxctx->guest_r8 = regval; break; case 9: - regval = vmxctx->guest_r9; + vmxctx->guest_r9 = regval; break; case 10: - regval = vmxctx->guest_r10; + vmxctx->guest_r10 = regval; break; case 11: - regval = vmxctx->guest_r11; + vmxctx->guest_r11 = regval; break; case 12: - regval = vmxctx->guest_r12; + vmxctx->guest_r12 = regval; break; case 13: - regval = vmxctx->guest_r13; + vmxctx->guest_r13 = regval; break; case 14: - regval = vmxctx->guest_r14; + vmxctx->guest_r14 = regval; break; case 15: - regval = vmxctx->guest_r15; + vmxctx->guest_r15 = regval; break; + default: + panic("invalid vmx register %d", ident); } +} - if (cr == 0) { - ones_mask = cr0_ones_mask; - zeros_mask = cr0_zeros_mask; - vmcs_guest_cr = VMCS_GUEST_CR0; - vmcs_shadow_cr = VMCS_CR0_SHADOW; - } else { - ones_mask = cr4_ones_mask; - zeros_mask = cr4_zeros_mask; - vmcs_guest_cr = VMCS_GUEST_CR4; - vmcs_shadow_cr = VMCS_CR4_SHADOW; - } - vmcs_write(vmcs_shadow_cr, regval); - - crval = regval | ones_mask; - crval &= ~zeros_mask; - vmcs_write(vmcs_guest_cr, crval); +static int +vmx_emulate_cr0_access(struct vmx *vmx, int vcpu, uint64_t exitqual) +{ + uint64_t crval, regval; + + /* We only handle mov to %cr0 at this time */ + if ((exitqual & 0xf0) != 0x00) + return (UNHANDLED); - if (cr == 0 && regval & CR0_PG) { + regval = vmx_get_guest_reg(vmx, vcpu, (exitqual >> 8) & 0xf); + + vmcs_write(VMCS_CR0_SHADOW, regval); + + crval = regval | cr0_ones_mask; + crval &= ~cr0_zeros_mask; + vmcs_write(VMCS_GUEST_CR0, crval); + + if (regval & CR0_PG) { uint64_t efer, entry_ctls; /* @@ -1553,6 +1595,51 @@ vmx_emulate_cr_access(struct vmx *vmx, i return (HANDLED); } +static int +vmx_emulate_cr4_access(struct vmx *vmx, int vcpu, uint64_t exitqual) +{ + uint64_t crval, regval; + + /* We only handle mov to %cr4 at this time */ + if ((exitqual & 0xf0) != 0x00) + return (UNHANDLED); + + regval = vmx_get_guest_reg(vmx, vcpu, (exitqual >> 8) & 0xf); + + vmcs_write(VMCS_CR4_SHADOW, regval); + + crval = regval | cr4_ones_mask; + crval &= ~cr4_zeros_mask; + vmcs_write(VMCS_GUEST_CR4, crval); + + return (HANDLED); +} + +static int +vmx_emulate_cr8_access(struct vmx *vmx, int vcpu, uint64_t exitqual) +{ + struct vlapic *vlapic; + uint64_t cr8; + int regnum; + + /* We only handle mov %cr8 to/from a register at this time. */ + if ((exitqual & 0xe0) != 0x00) { + return (UNHANDLED); + } + + vlapic = vm_lapic(vmx->vm, vcpu); + regnum = (exitqual >> 8) & 0xf; + if (exitqual & 0x10) { + cr8 = vlapic_get_cr8(vlapic); + vmx_set_guest_reg(vmx, vcpu, regnum, cr8); + } else { + cr8 = vmx_get_guest_reg(vmx, vcpu, regnum); + vlapic_set_cr8(vlapic, cr8); + } + + return (HANDLED); +} + /* * From section "Guest Register State" in the Intel SDM: CPL = SS.DPL */ @@ -1945,7 +2032,17 @@ vmx_exit_process(struct vmx *vmx, int vc switch (reason) { case EXIT_REASON_CR_ACCESS: vmm_stat_incr(vmx->vm, vcpu, VMEXIT_CR_ACCESS, 1); - handled = vmx_emulate_cr_access(vmx, vcpu, qual); + switch (qual & 0xf) { + case 0: + handled = vmx_emulate_cr0_access(vmx, vcpu, qual); + break; + case 4: + handled = vmx_emulate_cr4_access(vmx, vcpu, qual); + break; + case 8: + handled = vmx_emulate_cr8_access(vmx, vcpu, qual); + break; + } break; case EXIT_REASON_RDMSR: vmm_stat_incr(vmx->vm, vcpu, VMEXIT_RDMSR, 1); Modified: stable/10/sys/amd64/vmm/io/vlapic.c ============================================================================== --- stable/10/sys/amd64/vmm/io/vlapic.c Sun Aug 17 01:15:34 2014 (r270072) +++ stable/10/sys/amd64/vmm/io/vlapic.c Sun Aug 17 01:16:40 2014 (r270073) @@ -906,6 +906,46 @@ vlapic_calcdest(struct vm *vm, cpuset_t static VMM_STAT_ARRAY(IPIS_SENT, VM_MAXCPU, "ipis sent to vcpu"); +static void +vlapic_set_tpr(struct vlapic *vlapic, uint8_t val) +{ + struct LAPIC *lapic = vlapic->apic_page; + + lapic->tpr = val; + vlapic_update_ppr(vlapic); +} + +static uint8_t +vlapic_get_tpr(struct vlapic *vlapic) +{ + struct LAPIC *lapic = vlapic->apic_page; + + return (lapic->tpr); +} + +void +vlapic_set_cr8(struct vlapic *vlapic, uint64_t val) +{ + uint8_t tpr; + + if (val & ~0xf) { + vm_inject_gp(vlapic->vm, vlapic->vcpuid); + return; + } + + tpr = val << 4; + vlapic_set_tpr(vlapic, tpr); +} + +uint64_t +vlapic_get_cr8(struct vlapic *vlapic) +{ + uint8_t tpr; + + tpr = vlapic_get_tpr(vlapic); + return (tpr >> 4); +} + int vlapic_icrlo_write_handler(struct vlapic *vlapic, bool *retu) { @@ -1184,7 +1224,7 @@ vlapic_read(struct vlapic *vlapic, int m *data = lapic->version; break; case APIC_OFFSET_TPR: - *data = lapic->tpr; + *data = vlapic_get_tpr(vlapic); break; case APIC_OFFSET_APR: *data = lapic->apr; @@ -1305,8 +1345,7 @@ vlapic_write(struct vlapic *vlapic, int vlapic_id_write_handler(vlapic); break; case APIC_OFFSET_TPR: - lapic->tpr = data & 0xff; - vlapic_update_ppr(vlapic); + vlapic_set_tpr(vlapic, data & 0xff); break; case APIC_OFFSET_EOI: vlapic_process_eoi(vlapic); Modified: stable/10/sys/amd64/vmm/io/vlapic.h ============================================================================== --- stable/10/sys/amd64/vmm/io/vlapic.h Sun Aug 17 01:15:34 2014 (r270072) +++ stable/10/sys/amd64/vmm/io/vlapic.h Sun Aug 17 01:16:40 2014 (r270073) @@ -92,6 +92,9 @@ void vlapic_reset_tmr(struct vlapic *vla void vlapic_set_tmr_level(struct vlapic *vlapic, uint32_t dest, bool phys, int delmode, int vector); +void vlapic_set_cr8(struct vlapic *vlapic, uint64_t val); +uint64_t vlapic_get_cr8(struct vlapic *vlapic); + /* APIC write handlers */ void vlapic_id_write_handler(struct vlapic *vlapic); void vlapic_ldr_write_handler(struct vlapic *vlapic); From grehan at FreeBSD.org Sun Aug 17 01:23:56 2014 From: grehan at FreeBSD.org (Peter Grehan) Date: Sun, 17 Aug 2014 01:23:53 +0000 (UTC) Subject: svn commit: r270074 - in stable/10: lib/libvmmapi sys/amd64/include sys/amd64/vmm sys/amd64/vmm/intel usr.sbin/bhyve usr.sbin/bhyveload Message-ID: <201408170123.s7H1Nr4s080866@svn.freebsd.org> Author: grehan Date: Sun Aug 17 01:23:52 2014 New Revision: 270074 URL: http://svnweb.freebsd.org/changeset/base/270074 Log: MFC r267311, r267330, r267811, r267884 Turn on interrupt window exiting unconditionally when an ExtINT is being injected into the guest. Add helper functions to populate VM exit information for rendezvous and astpending exits. Provide APIs to directly get 'lowmem' and 'highmem' size directly. Expose the amount of resident and wired memory from the guest's vmspace Modified: stable/10/lib/libvmmapi/vmmapi.c stable/10/lib/libvmmapi/vmmapi.h stable/10/sys/amd64/include/vmm.h stable/10/sys/amd64/vmm/intel/vmx.c stable/10/sys/amd64/vmm/vmm.c stable/10/sys/amd64/vmm/vmm_stat.c stable/10/sys/amd64/vmm/vmm_stat.h stable/10/usr.sbin/bhyve/pci_emul.c stable/10/usr.sbin/bhyve/rtc.c stable/10/usr.sbin/bhyve/smbiostbl.c stable/10/usr.sbin/bhyveload/bhyveload.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libvmmapi/vmmapi.c ============================================================================== --- stable/10/lib/libvmmapi/vmmapi.c Sun Aug 17 01:16:40 2014 (r270073) +++ stable/10/lib/libvmmapi/vmmapi.c Sun Aug 17 01:23:52 2014 (r270074) @@ -274,6 +274,20 @@ vm_map_gpa(struct vmctx *ctx, vm_paddr_t return (NULL); } +size_t +vm_get_lowmem_size(struct vmctx *ctx) +{ + + return (ctx->lowmem); +} + +size_t +vm_get_highmem_size(struct vmctx *ctx) +{ + + return (ctx->highmem); +} + int vm_set_desc(struct vmctx *ctx, int vcpu, int reg, uint64_t base, uint32_t limit, uint32_t access) Modified: stable/10/lib/libvmmapi/vmmapi.h ============================================================================== --- stable/10/lib/libvmmapi/vmmapi.h Sun Aug 17 01:16:40 2014 (r270073) +++ stable/10/lib/libvmmapi/vmmapi.h Sun Aug 17 01:23:52 2014 (r270074) @@ -60,6 +60,8 @@ int vm_get_gpa_pmap(struct vmctx *, uint uint32_t vm_get_lowmem_limit(struct vmctx *ctx); void vm_set_lowmem_limit(struct vmctx *ctx, uint32_t limit); void vm_set_memflags(struct vmctx *ctx, int flags); +size_t vm_get_lowmem_size(struct vmctx *ctx); +size_t vm_get_highmem_size(struct vmctx *ctx); int vm_set_desc(struct vmctx *ctx, int vcpu, int reg, uint64_t base, uint32_t limit, uint32_t access); int vm_get_desc(struct vmctx *ctx, int vcpu, int reg, Modified: stable/10/sys/amd64/include/vmm.h ============================================================================== --- stable/10/sys/amd64/include/vmm.h Sun Aug 17 01:16:40 2014 (r270073) +++ stable/10/sys/amd64/include/vmm.h Sun Aug 17 01:23:52 2014 (r270074) @@ -146,6 +146,8 @@ cpuset_t vm_active_cpus(struct vm *vm); cpuset_t vm_suspended_cpus(struct vm *vm); struct vm_exit *vm_exitinfo(struct vm *vm, int vcpuid); void vm_exit_suspended(struct vm *vm, int vcpuid, uint64_t rip); +void vm_exit_rendezvous(struct vm *vm, int vcpuid, uint64_t rip); +void vm_exit_astpending(struct vm *vm, int vcpuid, uint64_t rip); /* * Rendezvous all vcpus specified in 'dest' and execute 'func(arg)'. Modified: stable/10/sys/amd64/vmm/intel/vmx.c ============================================================================== --- stable/10/sys/amd64/vmm/intel/vmx.c Sun Aug 17 01:16:40 2014 (r270073) +++ stable/10/sys/amd64/vmm/intel/vmx.c Sun Aug 17 01:23:52 2014 (r270074) @@ -1327,9 +1327,13 @@ vmx_inject_interrupts(struct vmx *vmx, i * have posted another one. If that is the case, set * the Interrupt Window Exiting execution control so * we can inject that one too. + * + * Also, interrupt window exiting allows us to inject any + * pending APIC vector that was preempted by the ExtINT + * as soon as possible. This applies both for the software + * emulated vlapic and the hardware assisted virtual APIC. */ - if (vm_extint_pending(vmx->vm, vcpu)) - vmx_set_int_window_exiting(vmx, vcpu); + vmx_set_int_window_exiting(vmx, vcpu); } VCPU_CTR1(vmx->vm, vcpu, "Injecting hwintr at vector %d", vector); @@ -2275,32 +2279,7 @@ vmx_exit_process(struct vmx *vmx, int vc return (handled); } -static __inline int -vmx_exit_astpending(struct vmx *vmx, int vcpu, struct vm_exit *vmexit) -{ - - vmexit->rip = vmcs_guest_rip(); - vmexit->inst_length = 0; - vmexit->exitcode = VM_EXITCODE_BOGUS; - vmx_astpending_trace(vmx, vcpu, vmexit->rip); - vmm_stat_incr(vmx->vm, vcpu, VMEXIT_ASTPENDING, 1); - - return (HANDLED); -} - -static __inline int -vmx_exit_rendezvous(struct vmx *vmx, int vcpu, struct vm_exit *vmexit) -{ - - vmexit->rip = vmcs_guest_rip(); - vmexit->inst_length = 0; - vmexit->exitcode = VM_EXITCODE_RENDEZVOUS; - vmm_stat_incr(vmx->vm, vcpu, VMEXIT_RENDEZVOUS, 1); - - return (UNHANDLED); -} - -static __inline int +static __inline void vmx_exit_inst_error(struct vmxctx *vmxctx, int rc, struct vm_exit *vmexit) { @@ -2324,8 +2303,6 @@ vmx_exit_inst_error(struct vmxctx *vmxct default: panic("vm_exit_inst_error: vmx_enter_guest returned %d", rc); } - - return (UNHANDLED); } /* @@ -2398,6 +2375,8 @@ vmx_run(void *arg, int vcpu, register_t vmcs_write(VMCS_GUEST_RIP, startrip); vmx_set_pcpu_defaults(vmx, vcpu, pmap); do { + handled = UNHANDLED; + /* * Interrupts are disabled from this point on until the * guest starts executing. This is done for the following @@ -2420,19 +2399,20 @@ vmx_run(void *arg, int vcpu, register_t if (vcpu_suspended(suspend_cookie)) { enable_intr(); vm_exit_suspended(vmx->vm, vcpu, vmcs_guest_rip()); - handled = UNHANDLED; break; } if (vcpu_rendezvous_pending(rendezvous_cookie)) { enable_intr(); - handled = vmx_exit_rendezvous(vmx, vcpu, vmexit); + vm_exit_rendezvous(vmx->vm, vcpu, vmcs_guest_rip()); break; } if (curthread->td_flags & (TDF_ASTPENDING | TDF_NEEDRESCHED)) { enable_intr(); - handled = vmx_exit_astpending(vmx, vcpu, vmexit); + vm_exit_astpending(vmx->vm, vcpu, vmcs_guest_rip()); + vmx_astpending_trace(vmx, vcpu, vmexit->rip); + handled = HANDLED; break; } @@ -2452,7 +2432,7 @@ vmx_run(void *arg, int vcpu, register_t handled = vmx_exit_process(vmx, vcpu, vmexit); } else { enable_intr(); - handled = vmx_exit_inst_error(vmxctx, rc, vmexit); + vmx_exit_inst_error(vmxctx, rc, vmexit); } launched = 1; vmx_exit_trace(vmx, vcpu, rip, exit_reason, handled); Modified: stable/10/sys/amd64/vmm/vmm.c ============================================================================== --- stable/10/sys/amd64/vmm/vmm.c Sun Aug 17 01:16:40 2014 (r270073) +++ stable/10/sys/amd64/vmm/vmm.c Sun Aug 17 01:23:52 2014 (r270074) @@ -1331,6 +1331,32 @@ vm_exit_suspended(struct vm *vm, int vcp vmexit->u.suspended.how = vm->suspend; } +void +vm_exit_rendezvous(struct vm *vm, int vcpuid, uint64_t rip) +{ + struct vm_exit *vmexit; + + KASSERT(vm->rendezvous_func != NULL, ("rendezvous not in progress")); + + vmexit = vm_exitinfo(vm, vcpuid); + vmexit->rip = rip; + vmexit->inst_length = 0; + vmexit->exitcode = VM_EXITCODE_RENDEZVOUS; + vmm_stat_incr(vm, vcpuid, VMEXIT_RENDEZVOUS, 1); +} + +void +vm_exit_astpending(struct vm *vm, int vcpuid, uint64_t rip) +{ + struct vm_exit *vmexit; + + vmexit = vm_exitinfo(vm, vcpuid); + vmexit->rip = rip; + vmexit->inst_length = 0; + vmexit->exitcode = VM_EXITCODE_BOGUS; + vmm_stat_incr(vm, vcpuid, VMEXIT_ASTPENDING, 1); +} + int vm_run(struct vm *vm, struct vm_run *vmrun) { @@ -1966,3 +1992,34 @@ vm_segment_name(int seg) ("%s: invalid segment encoding %d", __func__, seg)); return (seg_names[seg]); } + + +/* + * Return the amount of in-use and wired memory for the VM. Since + * these are global stats, only return the values with for vCPU 0 + */ +VMM_STAT_DECLARE(VMM_MEM_RESIDENT); +VMM_STAT_DECLARE(VMM_MEM_WIRED); + +static void +vm_get_rescnt(struct vm *vm, int vcpu, struct vmm_stat_type *stat) +{ + + if (vcpu == 0) { + vmm_stat_set(vm, vcpu, VMM_MEM_RESIDENT, + PAGE_SIZE * vmspace_resident_count(vm->vmspace)); + } +} + +static void +vm_get_wiredcnt(struct vm *vm, int vcpu, struct vmm_stat_type *stat) +{ + + if (vcpu == 0) { + vmm_stat_set(vm, vcpu, VMM_MEM_WIRED, + PAGE_SIZE * pmap_wired_count(vmspace_pmap(vm->vmspace))); + } +} + +VMM_STAT_FUNC(VMM_MEM_RESIDENT, "Resident memory", vm_get_rescnt); +VMM_STAT_FUNC(VMM_MEM_WIRED, "Wired memory", vm_get_wiredcnt); Modified: stable/10/sys/amd64/vmm/vmm_stat.c ============================================================================== --- stable/10/sys/amd64/vmm/vmm_stat.c Sun Aug 17 01:16:40 2014 (r270073) +++ stable/10/sys/amd64/vmm/vmm_stat.c Sun Aug 17 01:23:52 2014 (r270074) @@ -83,12 +83,21 @@ vmm_stat_register(void *arg) int vmm_stat_copy(struct vm *vm, int vcpu, int *num_stats, uint64_t *buf) { - int i; + struct vmm_stat_type *vst; uint64_t *stats; + int i; if (vcpu < 0 || vcpu >= VM_MAXCPU) return (EINVAL); - + + /* Let stats functions update their counters */ + for (i = 0; i < vst_num_types; i++) { + vst = vsttab[i]; + if (vst->func != NULL) + (*vst->func)(vm, vcpu, vst); + } + + /* Copy over the stats */ stats = vcpu_stats(vm, vcpu); for (i = 0; i < vst_num_elems; i++) buf[i] = stats[i]; Modified: stable/10/sys/amd64/vmm/vmm_stat.h ============================================================================== --- stable/10/sys/amd64/vmm/vmm_stat.h Sun Aug 17 01:16:40 2014 (r270073) +++ stable/10/sys/amd64/vmm/vmm_stat.h Sun Aug 17 01:23:52 2014 (r270074) @@ -42,21 +42,29 @@ enum vmm_stat_scope { VMM_STAT_SCOPE_AMD, /* AMD SVM specific statistic */ }; +struct vmm_stat_type; +typedef void (*vmm_stat_func_t)(struct vm *vm, int vcpu, + struct vmm_stat_type *stat); + struct vmm_stat_type { int index; /* position in the stats buffer */ int nelems; /* standalone or array */ const char *desc; /* description of statistic */ + vmm_stat_func_t func; enum vmm_stat_scope scope; }; void vmm_stat_register(void *arg); -#define VMM_STAT_DEFINE(type, nelems, desc, scope) \ +#define VMM_STAT_FDEFINE(type, nelems, desc, func, scope) \ struct vmm_stat_type type[1] = { \ - { -1, nelems, desc, scope } \ + { -1, nelems, desc, func, scope } \ }; \ SYSINIT(type##_stat, SI_SUB_KLD, SI_ORDER_ANY, vmm_stat_register, type) +#define VMM_STAT_DEFINE(type, nelems, desc, scope) \ + VMM_STAT_FDEFINE(type, nelems, desc, NULL, scope) + #define VMM_STAT_DECLARE(type) \ extern struct vmm_stat_type type[1] @@ -67,6 +75,9 @@ void vmm_stat_register(void *arg); #define VMM_STAT_AMD(type, desc) \ VMM_STAT_DEFINE(type, 1, desc, VMM_STAT_SCOPE_AMD) +#define VMM_STAT_FUNC(type, desc, func) \ + VMM_STAT_FDEFINE(type, 1, desc, func, VMM_STAT_SCOPE_ANY) + #define VMM_STAT_ARRAY(type, nelems, desc) \ VMM_STAT_DEFINE(type, nelems, desc, VMM_STAT_SCOPE_ANY) @@ -93,9 +104,22 @@ vmm_stat_array_incr(struct vm *vm, int v stats[vst->index + statidx] += x; #endif } - static void __inline +vmm_stat_array_set(struct vm *vm, int vcpu, struct vmm_stat_type *vst, + int statidx, uint64_t val) +{ +#ifdef VMM_KEEP_STATS + uint64_t *stats; + + stats = vcpu_stats(vm, vcpu); + + if (vst->index >= 0 && statidx < vst->nelems) + stats[vst->index + statidx] = val; +#endif +} + +static void __inline vmm_stat_incr(struct vm *vm, int vcpu, struct vmm_stat_type *vst, uint64_t x) { @@ -104,6 +128,15 @@ vmm_stat_incr(struct vm *vm, int vcpu, s #endif } +static void __inline +vmm_stat_set(struct vm *vm, int vcpu, struct vmm_stat_type *vst, uint64_t val) +{ + +#ifdef VMM_KEEP_STATS + vmm_stat_array_set(vm, vcpu, vst, 0, val); +#endif +} + VMM_STAT_DECLARE(VCPU_MIGRATIONS); VMM_STAT_DECLARE(VMEXIT_COUNT); VMM_STAT_DECLARE(VMEXIT_EXTINT); Modified: stable/10/usr.sbin/bhyve/pci_emul.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_emul.c Sun Aug 17 01:16:40 2014 (r270073) +++ stable/10/usr.sbin/bhyve/pci_emul.c Sun Aug 17 01:23:52 2014 (r270074) @@ -1118,8 +1118,7 @@ init_pci(struct vmctx *ctx) * Accesses to memory addresses that are not allocated to system * memory or PCI devices return 0xff's. */ - error = vm_get_memory_seg(ctx, 0, &lowmem, NULL); - assert(error == 0); + lowmem = vm_get_lowmem_size(ctx); memset(&pci_mem_hole, 0, sizeof(struct mem_range)); pci_mem_hole.name = "PCI hole"; Modified: stable/10/usr.sbin/bhyve/rtc.c ============================================================================== --- stable/10/usr.sbin/bhyve/rtc.c Sun Aug 17 01:16:40 2014 (r270073) +++ stable/10/usr.sbin/bhyve/rtc.c Sun Aug 17 01:23:52 2014 (r270074) @@ -343,19 +343,14 @@ rtc_init(struct vmctx *ctx) * 0x34/0x35 - 64KB chunks above 16MB, below 4GB * 0x5b/0x5c/0x5d - 64KB chunks above 4GB */ - err = vm_get_memory_seg(ctx, 0, &lomem, NULL); - assert(err == 0); - - lomem = (lomem - m_16MB) / m_64KB; + lomem = (vm_get_lowmem_size(ctx) - m_16MB) / m_64KB; rtc_nvram[nvoff(RTC_LMEM_LSB)] = lomem; rtc_nvram[nvoff(RTC_LMEM_MSB)] = lomem >> 8; - if (vm_get_memory_seg(ctx, m_4GB, &himem, NULL) == 0) { - himem /= m_64KB; - rtc_nvram[nvoff(RTC_HMEM_LSB)] = himem; - rtc_nvram[nvoff(RTC_HMEM_SB)] = himem >> 8; - rtc_nvram[nvoff(RTC_HMEM_MSB)] = himem >> 16; - } + himem = vm_get_highmem_size(ctx) / m_64KB; + rtc_nvram[nvoff(RTC_HMEM_LSB)] = himem; + rtc_nvram[nvoff(RTC_HMEM_SB)] = himem >> 8; + rtc_nvram[nvoff(RTC_HMEM_MSB)] = himem >> 16; } INOUT_PORT(rtc, IO_RTC, IOPORT_F_INOUT, rtc_addr_handler); Modified: stable/10/usr.sbin/bhyve/smbiostbl.c ============================================================================== --- stable/10/usr.sbin/bhyve/smbiostbl.c Sun Aug 17 01:16:40 2014 (r270073) +++ stable/10/usr.sbin/bhyve/smbiostbl.c Sun Aug 17 01:23:52 2014 (r270074) @@ -779,13 +779,8 @@ smbios_build(struct vmctx *ctx) int i; int err; - err = vm_get_memory_seg(ctx, 0, &guest_lomem, NULL); - if (err != 0) - return (err); - - err = vm_get_memory_seg(ctx, 4*GB, &guest_himem, NULL); - if (err != 0) - return (err); + guest_lomem = vm_get_lowmem_size(ctx); + guest_himem = vm_get_highmem_size(ctx); startaddr = paddr_guest2host(ctx, SMBIOS_BASE, SMBIOS_MAX_LENGTH); if (startaddr == NULL) { Modified: stable/10/usr.sbin/bhyveload/bhyveload.c ============================================================================== --- stable/10/usr.sbin/bhyveload/bhyveload.c Sun Aug 17 01:16:40 2014 (r270073) +++ stable/10/usr.sbin/bhyveload/bhyveload.c Sun Aug 17 01:23:52 2014 (r270074) @@ -505,8 +505,8 @@ static void cb_getmem(void *arg, uint64_t *ret_lowmem, uint64_t *ret_highmem) { - vm_get_memory_seg(ctx, 0, ret_lowmem, NULL); - vm_get_memory_seg(ctx, 4 * GB, ret_highmem, NULL); + *ret_lowmem = vm_get_lowmem_size(ctx); + *ret_highmem = vm_get_highmem_size(ctx); } struct env { From ian at FreeBSD.org Sun Aug 17 01:28:06 2014 From: ian at FreeBSD.org (Ian Lepore) Date: Sun, 17 Aug 2014 01:28:03 +0000 (UTC) Subject: svn commit: r270075 - in stable/10/sys: arm/arm arm/include conf dev/fdt dev/ofw sys Message-ID: <201408170128.s7H1S344081448@svn.freebsd.org> Author: ian Date: Sun Aug 17 01:28:03 2014 New Revision: 270075 URL: http://svnweb.freebsd.org/changeset/base/270075 Log: MFC r269594, r269596, r269597, r269598, r269605, r269606: Set ofwbus and simplebus to attach during BUS_PASS_BUS. Define names that drivers can use to adjust their position relative to other drivers within a BUS_PASS Adjust ofwbus and simplebus to attach at BUS_PASS_ORDER_MIDDLE, so that a platform can attach some other bus first if necessary. Set the pl310 L2 cache driver to attach during the middle of BUS_PASS_CPU. Attach arm generic interrupt and timer drivers in the middle of BUS_PASS_INTERRUPT and BUS_PASS_TIMER, respectively. Add an arm option, ARM_DEVICE_MULTIPASS, used to opt-in to multi-pass device attachment on arm platforms. If this is defined, nexus attaches early in BUS_PASS_BUS, and other busses and devices attach later, in the pass number they are set up for. Without it defined, nexus attaches in BUS_PASS_DEFAULT and thus so does everything else, which is status quo. Modified: stable/10/sys/arm/arm/generic_timer.c stable/10/sys/arm/arm/gic.c stable/10/sys/arm/arm/mpcore_timer.c stable/10/sys/arm/arm/nexus.c stable/10/sys/arm/arm/pl190.c stable/10/sys/arm/arm/pl310.c stable/10/sys/arm/include/pl310.h stable/10/sys/conf/options.arm stable/10/sys/dev/fdt/simplebus.c stable/10/sys/dev/ofw/ofwbus.c stable/10/sys/sys/bus.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/generic_timer.c ============================================================================== --- stable/10/sys/arm/arm/generic_timer.c Sun Aug 17 01:23:52 2014 (r270074) +++ stable/10/sys/arm/arm/generic_timer.c Sun Aug 17 01:28:03 2014 (r270075) @@ -343,7 +343,8 @@ static driver_t arm_tmr_driver = { static devclass_t arm_tmr_devclass; -DRIVER_MODULE(timer, simplebus, arm_tmr_driver, arm_tmr_devclass, 0, 0); +EARLY_DRIVER_MODULE(timer, simplebus, arm_tmr_driver, arm_tmr_devclass, 0, 0, + BUS_PASS_TIMER + BUS_PASS_ORDER_MIDDLE); void DELAY(int usec) Modified: stable/10/sys/arm/arm/gic.c ============================================================================== --- stable/10/sys/arm/arm/gic.c Sun Aug 17 01:23:52 2014 (r270074) +++ stable/10/sys/arm/arm/gic.c Sun Aug 17 01:28:03 2014 (r270075) @@ -263,7 +263,8 @@ static driver_t arm_gic_driver = { static devclass_t arm_gic_devclass; -DRIVER_MODULE(gic, simplebus, arm_gic_driver, arm_gic_devclass, 0, 0); +EARLY_DRIVER_MODULE(gic, simplebus, arm_gic_driver, arm_gic_devclass, 0, 0, + BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE); static void gic_post_filter(void *arg) Modified: stable/10/sys/arm/arm/mpcore_timer.c ============================================================================== --- stable/10/sys/arm/arm/mpcore_timer.c Sun Aug 17 01:23:52 2014 (r270074) +++ stable/10/sys/arm/arm/mpcore_timer.c Sun Aug 17 01:28:03 2014 (r270075) @@ -382,7 +382,8 @@ static driver_t arm_tmr_driver = { static devclass_t arm_tmr_devclass; -DRIVER_MODULE(mp_tmr, simplebus, arm_tmr_driver, arm_tmr_devclass, 0, 0); +EARLY_DRIVER_MODULE(mp_tmr, simplebus, arm_tmr_driver, arm_tmr_devclass, 0, 0, + BUS_PASS_TIMER + BUS_PASS_ORDER_MIDDLE); /* * Handle a change in clock frequency. The mpcore timer runs at half the CPU Modified: stable/10/sys/arm/arm/nexus.c ============================================================================== --- stable/10/sys/arm/arm/nexus.c Sun Aug 17 01:23:52 2014 (r270074) +++ stable/10/sys/arm/arm/nexus.c Sun Aug 17 01:28:03 2014 (r270075) @@ -125,7 +125,12 @@ static driver_t nexus_driver = { nexus_methods, 1 /* no softc */ }; +#ifdef ARM_DEVICE_MULTIPASS +EARLY_DRIVER_MODULE(nexus, root, nexus_driver, nexus_devclass, 0, 0, + BUS_PASS_BUS + BUS_PASS_ORDER_EARLY); +#else DRIVER_MODULE(nexus, root, nexus_driver, nexus_devclass, 0, 0); +#endif static int nexus_probe(device_t dev) Modified: stable/10/sys/arm/arm/pl190.c ============================================================================== --- stable/10/sys/arm/arm/pl190.c Sun Aug 17 01:23:52 2014 (r270074) +++ stable/10/sys/arm/arm/pl190.c Sun Aug 17 01:28:03 2014 (r270075) @@ -152,7 +152,8 @@ static driver_t pl190_intc_driver = { static devclass_t pl190_intc_devclass; -DRIVER_MODULE(intc, simplebus, pl190_intc_driver, pl190_intc_devclass, 0, 0); +EARLY_DRIVER_MODULE(intc, simplebus, pl190_intc_driver, pl190_intc_devclass, + 0, 0, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE); int arm_get_next_irq(int last_irq) Modified: stable/10/sys/arm/arm/pl310.c ============================================================================== --- stable/10/sys/arm/arm/pl310.c Sun Aug 17 01:23:52 2014 (r270074) +++ stable/10/sys/arm/arm/pl310.c Sun Aug 17 01:28:03 2014 (r270075) @@ -378,6 +378,44 @@ pl310_set_way_sizes(struct pl310_softc * g_l2cache_size = g_way_size * g_ways_assoc; } +/* + * Setup interrupt handling. This is done only if the cache controller is + * disabled, for debugging. We set counters so when a cache event happens we'll + * get interrupted and be warned that something is wrong, because no cache + * events should happen if we're disabled. + */ +static void +pl310_config_intr(void *arg) +{ + struct pl310_softc * sc; + + sc = arg; + + /* activate the interrupt */ + bus_setup_intr(sc->sc_dev, sc->sc_irq_res, INTR_TYPE_MISC | INTR_MPSAFE, + pl310_filter, NULL, sc, &sc->sc_irq_h); + + /* Cache Line Eviction for Counter 0 */ + pl310_write4(sc, PL310_EVENT_COUNTER0_CONF, + EVENT_COUNTER_CONF_INCR | EVENT_COUNTER_CONF_CO); + /* Data Read Request for Counter 1 */ + pl310_write4(sc, PL310_EVENT_COUNTER1_CONF, + EVENT_COUNTER_CONF_INCR | EVENT_COUNTER_CONF_DRREQ); + + /* Enable and clear pending interrupts */ + pl310_write4(sc, PL310_INTR_CLEAR, INTR_MASK_ECNTR); + pl310_write4(sc, PL310_INTR_MASK, INTR_MASK_ALL); + + /* Enable counters and reset C0 and C1 */ + pl310_write4(sc, PL310_EVENT_COUNTER_CTRL, + EVENT_COUNTER_CTRL_ENABLED | + EVENT_COUNTER_CTRL_C0_RESET | + EVENT_COUNTER_CTRL_C1_RESET); + + config_intrhook_disestablish(sc->sc_ich); + free(sc->sc_ich, M_DEVBUF); +} + static int pl310_probe(device_t dev) { @@ -416,10 +454,6 @@ pl310_attach(device_t dev) pl310_softc = sc; mtx_init(&sc->sc_mtx, "pl310lock", NULL, MTX_SPIN); - /* activate the interrupt */ - bus_setup_intr(dev, sc->sc_irq_res, INTR_TYPE_MISC | INTR_MPSAFE, - pl310_filter, NULL, sc, &sc->sc_irq_h); - cache_id = pl310_read4(sc, PL310_CACHE_ID); sc->sc_rtl_revision = (cache_id >> CACHE_ID_RELEASE_SHIFT) & CACHE_ID_RELEASE_MASK; @@ -466,28 +500,14 @@ pl310_attach(device_t dev) if (bootverbose) pl310_print_config(sc); } else { - /* - * Set counters so when cache event happens we'll get interrupt - * and be warned that something is off. - */ - - /* Cache Line Eviction for Counter 0 */ - pl310_write4(sc, PL310_EVENT_COUNTER0_CONF, - EVENT_COUNTER_CONF_INCR | EVENT_COUNTER_CONF_CO); - /* Data Read Request for Counter 1 */ - pl310_write4(sc, PL310_EVENT_COUNTER1_CONF, - EVENT_COUNTER_CONF_INCR | EVENT_COUNTER_CONF_DRREQ); - - /* Enable and clear pending interrupts */ - pl310_write4(sc, PL310_INTR_CLEAR, INTR_MASK_ECNTR); - pl310_write4(sc, PL310_INTR_MASK, INTR_MASK_ALL); - - /* Enable counters and reset C0 and C1 */ - pl310_write4(sc, PL310_EVENT_COUNTER_CTRL, - EVENT_COUNTER_CTRL_ENABLED | - EVENT_COUNTER_CTRL_C0_RESET | - EVENT_COUNTER_CTRL_C1_RESET); - + malloc(sizeof(*sc->sc_ich), M_DEVBUF, M_WAITOK); + sc->sc_ich->ich_func = pl310_config_intr; + sc->sc_ich->ich_arg = sc; + if (config_intrhook_establish(sc->sc_ich) != 0) { + device_printf(dev, + "config_intrhook_establish failed\n"); + return(ENXIO); + } device_printf(dev, "L2 Cache disabled\n"); } @@ -514,4 +534,6 @@ static driver_t pl310_driver = { }; static devclass_t pl310_devclass; -DRIVER_MODULE(pl310, simplebus, pl310_driver, pl310_devclass, 0, 0); +EARLY_DRIVER_MODULE(pl310, simplebus, pl310_driver, pl310_devclass, 0, 0, + BUS_PASS_CPU + BUS_PASS_ORDER_MIDDLE); + Modified: stable/10/sys/arm/include/pl310.h ============================================================================== --- stable/10/sys/arm/include/pl310.h Sun Aug 17 01:23:52 2014 (r270074) +++ stable/10/sys/arm/include/pl310.h Sun Aug 17 01:28:03 2014 (r270075) @@ -137,6 +137,8 @@ #define POWER_CTRL_ENABLE_GATING (1 << 0) #define POWER_CTRL_ENABLE_STANDBY (1 << 1) +struct intr_config_hook; + struct pl310_softc { device_t sc_dev; struct resource *sc_mem_res; @@ -145,6 +147,7 @@ struct pl310_softc { int sc_enabled; struct mtx sc_mtx; u_int sc_rtl_revision; + struct intr_config_hook *sc_ich; }; /** Modified: stable/10/sys/conf/options.arm ============================================================================== --- stable/10/sys/conf/options.arm Sun Aug 17 01:23:52 2014 (r270074) +++ stable/10/sys/conf/options.arm Sun Aug 17 01:28:03 2014 (r270075) @@ -1,6 +1,7 @@ #$FreeBSD$ ARM9_CACHE_WRITE_THROUGH opt_global.h ARM_CACHE_LOCK_ENABLE opt_global.h +ARM_DEVICE_MULTIPASS opt_global.h ARM_KERN_DIRECTMAP opt_vm.h ARM_L2_PIPT opt_global.h ARM_MANY_BOARD opt_global.h Modified: stable/10/sys/dev/fdt/simplebus.c ============================================================================== --- stable/10/sys/dev/fdt/simplebus.c Sun Aug 17 01:23:52 2014 (r270074) +++ stable/10/sys/dev/fdt/simplebus.c Sun Aug 17 01:28:03 2014 (r270075) @@ -121,8 +121,10 @@ static driver_t simplebus_driver = { sizeof(struct simplebus_softc) }; static devclass_t simplebus_devclass; -DRIVER_MODULE(simplebus, ofwbus, simplebus_driver, simplebus_devclass, 0, 0); -DRIVER_MODULE(simplebus, simplebus, simplebus_driver, simplebus_devclass, 0, 0); +EARLY_DRIVER_MODULE(simplebus, ofwbus, simplebus_driver, simplebus_devclass, + 0, 0, BUS_PASS_BUS); +EARLY_DRIVER_MODULE(simplebus, simplebus, simplebus_driver, simplebus_devclass, + 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE); static int simplebus_probe(device_t dev) Modified: stable/10/sys/dev/ofw/ofwbus.c ============================================================================== --- stable/10/sys/dev/ofw/ofwbus.c Sun Aug 17 01:23:52 2014 (r270074) +++ stable/10/sys/dev/ofw/ofwbus.c Sun Aug 17 01:28:03 2014 (r270075) @@ -136,7 +136,8 @@ static driver_t ofwbus_driver = { sizeof(struct ofwbus_softc) }; static devclass_t ofwbus_devclass; -DRIVER_MODULE(ofwbus, nexus, ofwbus_driver, ofwbus_devclass, 0, 0); +EARLY_DRIVER_MODULE(ofwbus, nexus, ofwbus_driver, ofwbus_devclass, 0, 0, + BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE); MODULE_VERSION(ofwbus, 1); static const char *const ofwbus_excl_name[] = { Modified: stable/10/sys/sys/bus.h ============================================================================== --- stable/10/sys/sys/bus.h Sun Aug 17 01:23:52 2014 (r270074) +++ stable/10/sys/sys/bus.h Sun Aug 17 01:28:03 2014 (r270075) @@ -569,6 +569,12 @@ void bus_data_generation_update(void); #define BUS_PASS_SCHEDULER 60 /* Start scheduler. */ #define BUS_PASS_DEFAULT __INT_MAX /* Everything else. */ +#define BUS_PASS_ORDER_FIRST 0 +#define BUS_PASS_ORDER_EARLY 2 +#define BUS_PASS_ORDER_MIDDLE 5 +#define BUS_PASS_ORDER_LATE 7 +#define BUS_PASS_ORDER_LAST 9 + extern int bus_current_pass; void bus_set_pass(int pass); From ian at FreeBSD.org Sun Aug 17 01:32:34 2014 From: ian at FreeBSD.org (Ian Lepore) Date: Sun, 17 Aug 2014 01:32:33 +0000 (UTC) Subject: svn commit: r270076 - stable/10/sys/arm/freescale/imx Message-ID: <201408170132.s7H1WXUn085360@svn.freebsd.org> Author: ian Date: Sun Aug 17 01:32:33 2014 New Revision: 270076 URL: http://svnweb.freebsd.org/changeset/base/270076 Log: MFC r269607, r269698: Cache the imx6 SoC type in a static var so that it only has to be figured out by sniffing hardware registers once. Add a missing clock register definition. Modified: stable/10/sys/arm/freescale/imx/imx6_ccmreg.h stable/10/sys/arm/freescale/imx/imx6_machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/freescale/imx/imx6_ccmreg.h ============================================================================== --- stable/10/sys/arm/freescale/imx/imx6_ccmreg.h Sun Aug 17 01:28:03 2014 (r270075) +++ stable/10/sys/arm/freescale/imx/imx6_ccmreg.h Sun Aug 17 01:32:33 2014 (r270076) @@ -36,6 +36,7 @@ #define CCM_CLPCR_LPM_STOP 0x02 #define CCM_CGPR 0x064 #define CCM_CGPR_INT_MEM_CLK_LPM (1 << 17) +#define CCM_CCGR0 0x068 #define CCM_CCGR1 0x06C #define CCM_CCGR2 0x070 #define CCM_CCGR3 0x074 Modified: stable/10/sys/arm/freescale/imx/imx6_machdep.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx6_machdep.c Sun Aug 17 01:28:03 2014 (r270075) +++ stable/10/sys/arm/freescale/imx/imx6_machdep.c Sun Aug 17 01:32:33 2014 (r270076) @@ -145,12 +145,16 @@ u_int imx_soc_type() { uint32_t digprog, hwsoc; uint32_t *pcr; + static u_int soctype; const vm_offset_t SCU_CONFIG_PHYSADDR = 0x00a00004; #define HWSOC_MX6SL 0x60 #define HWSOC_MX6DL 0x61 #define HWSOC_MX6SOLO 0x62 #define HWSOC_MX6Q 0x63 + if (soctype != 0) + return (soctype); + digprog = imx6_anatop_read_4(IMX6_ANALOG_DIGPROG_SL); hwsoc = (digprog >> IMX6_ANALOG_DIGPROG_SOCTYPE_SHIFT) & IMX6_ANALOG_DIGPROG_SOCTYPE_MASK; @@ -174,20 +178,25 @@ u_int imx_soc_type() switch (hwsoc) { case HWSOC_MX6SL: - return (IMXSOC_6SL); + soctype = IMXSOC_6SL; + break; case HWSOC_MX6SOLO: - return (IMXSOC_6S); + soctype = IMXSOC_6S; + break; case HWSOC_MX6DL: - return (IMXSOC_6DL); + soctype = IMXSOC_6DL; + break; case HWSOC_MX6Q : - return (IMXSOC_6Q); + soctype = IMXSOC_6Q; + break; default: printf("imx_soc_type: Don't understand hwsoc 0x%02x, " "digprog 0x%08x; assuming IMXSOC_6Q\n", hwsoc, digprog); + soctype = IMXSOC_6Q; break; } - return (IMXSOC_6Q); + return (soctype); } /* From ian at FreeBSD.org Sun Aug 17 01:48:13 2014 From: ian at FreeBSD.org (Ian Lepore) Date: Sun, 17 Aug 2014 01:48:13 +0000 (UTC) Subject: svn commit: r270077 - stable/10/sys/arm/arm Message-ID: <201408170148.s7H1mD00090592@svn.freebsd.org> Author: ian Date: Sun Aug 17 01:48:12 2014 New Revision: 270077 URL: http://svnweb.freebsd.org/changeset/base/270077 Log: MFC r269646: Use a SYSINIT to init the array of interrupt names on arm. Modified: stable/10/sys/arm/arm/intr.c stable/10/sys/arm/arm/machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/intr.c ============================================================================== --- stable/10/sys/arm/arm/intr.c Sun Aug 17 01:32:33 2014 (r270076) +++ stable/10/sys/arm/arm/intr.c Sun Aug 17 01:48:12 2014 (r270077) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -75,8 +76,8 @@ size_t sintrnames = sizeof(intrnames); * assumptions of vmstat(8) and the kdb "show intrcnt" command, the two * consumers of this data. */ -void -arm_intrnames_init(void) +static void +intr_init(void *unused) { int i; @@ -86,6 +87,8 @@ arm_intrnames_init(void) } } +SYSINIT(intr_init, SI_SUB_INTR, SI_ORDER_FIRST, intr_init, NULL); + void arm_setup_irqhandler(const char *name, driver_filter_t *filt, void (*hand)(void*), void *arg, int irq, int flags, void **cookiep) Modified: stable/10/sys/arm/arm/machdep.c ============================================================================== --- stable/10/sys/arm/arm/machdep.c Sun Aug 17 01:32:33 2014 (r270076) +++ stable/10/sys/arm/arm/machdep.c Sun Aug 17 01:48:12 2014 (r270077) @@ -1277,7 +1277,6 @@ initarm(struct arm_boot_params *abp) init_proc0(kernelstack.pv_va); - arm_intrnames_init(); arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL); pmap_bootstrap(freemempos, &kernel_l1pt); msgbufp = (void *)msgbufpv.pv_va; From ian at FreeBSD.org Sun Aug 17 01:59:55 2014 From: ian at FreeBSD.org (Ian Lepore) Date: Sun, 17 Aug 2014 01:59:54 +0000 (UTC) Subject: svn commit: r270078 - stable/10/sys/dev/ofw Message-ID: <201408170159.s7H1xsZc095196@svn.freebsd.org> Author: ian Date: Sun Aug 17 01:59:54 2014 New Revision: 270078 URL: http://svnweb.freebsd.org/changeset/base/270078 Log: MFC r269769, r269770: Use a separate variable for resource id, because 'i' may increment at a rate greater than 1 on each iteration. Handle various ways that interrupt config data can be malformed by warning and assuming more or less reasonable values. Modified: stable/10/sys/dev/ofw/ofwbus.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ofw/ofwbus.c ============================================================================== --- stable/10/sys/dev/ofw/ofwbus.c Sun Aug 17 01:48:12 2014 (r270077) +++ stable/10/sys/dev/ofw/ofwbus.c Sun Aug 17 01:59:54 2014 (r270078) @@ -435,10 +435,11 @@ 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; - int i, j; + int i, j, rid; int nintr; int nreg; @@ -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,11 +464,11 @@ 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; } - 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 +480,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); @@ -487,15 +488,28 @@ 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)); - for (i = 0; i < nintr; i+= 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]); - 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 ian at FreeBSD.org Sun Aug 17 02:40:45 2014 From: ian at FreeBSD.org (Ian Lepore) Date: Sun, 17 Aug 2014 02:40:44 +0000 (UTC) Subject: svn commit: r270079 - stable/10 Message-ID: <201408170240.s7H2eiYq015451@svn.freebsd.org> Author: ian Date: Sun Aug 17 02:40:44 2014 New Revision: 270079 URL: http://svnweb.freebsd.org/changeset/base/270079 Log: MFC r269688: m4 now requires libohash, build it when bootstrapping. Modified: stable/10/Makefile.inc1 Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Sun Aug 17 01:59:54 2014 (r270078) +++ stable/10/Makefile.inc1 Sun Aug 17 02:40:44 2014 (r270079) @@ -1219,7 +1219,8 @@ _sed= usr.bin/sed .endif .if ${BOOTSTRAPPING} < 1000002 -_m4= usr.bin/m4 +_m4= lib/libohash \ + usr.bin/m4 .endif .if ${BOOTSTRAPPING} < 1000013 From grehan at FreeBSD.org Sun Aug 17 03:01:57 2014 From: grehan at FreeBSD.org (Peter Grehan) Date: Sun, 17 Aug 2014 03:01:56 +0000 (UTC) Subject: svn commit: r270082 - stable/10/sys/amd64/include Message-ID: <201408170301.s7H31unI026967@svn.freebsd.org> Author: grehan Date: Sun Aug 17 03:01:56 2014 New Revision: 270082 URL: http://svnweb.freebsd.org/changeset/base/270082 Log: MFC r267338 Replace enum forward declarations with complete definitions Modified: stable/10/sys/amd64/include/vmm.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/include/vmm.h ============================================================================== --- stable/10/sys/amd64/include/vmm.h Sun Aug 17 02:56:58 2014 (r270081) +++ stable/10/sys/amd64/include/vmm.h Sun Aug 17 03:01:56 2014 (r270082) @@ -37,6 +37,53 @@ enum vm_suspend_how { VM_SUSPEND_LAST }; +/* + * Identifiers for architecturally defined registers. + */ +enum vm_reg_name { + VM_REG_GUEST_RAX, + VM_REG_GUEST_RBX, + VM_REG_GUEST_RCX, + VM_REG_GUEST_RDX, + VM_REG_GUEST_RSI, + VM_REG_GUEST_RDI, + VM_REG_GUEST_RBP, + VM_REG_GUEST_R8, + VM_REG_GUEST_R9, + VM_REG_GUEST_R10, + VM_REG_GUEST_R11, + VM_REG_GUEST_R12, + VM_REG_GUEST_R13, + VM_REG_GUEST_R14, + VM_REG_GUEST_R15, + VM_REG_GUEST_CR0, + VM_REG_GUEST_CR3, + VM_REG_GUEST_CR4, + VM_REG_GUEST_DR7, + VM_REG_GUEST_RSP, + VM_REG_GUEST_RIP, + VM_REG_GUEST_RFLAGS, + VM_REG_GUEST_ES, + VM_REG_GUEST_CS, + VM_REG_GUEST_SS, + VM_REG_GUEST_DS, + VM_REG_GUEST_FS, + VM_REG_GUEST_GS, + VM_REG_GUEST_LDTR, + VM_REG_GUEST_TR, + VM_REG_GUEST_IDTR, + VM_REG_GUEST_GDTR, + VM_REG_GUEST_EFER, + VM_REG_GUEST_CR2, + VM_REG_LAST +}; + +enum x2apic_state { + X2APIC_DISABLED, + X2APIC_ENABLED, + X2APIC_STATE_LAST +}; + #ifdef _KERNEL #define VM_MAX_NAMELEN 32 @@ -54,9 +101,6 @@ struct vmspace; struct vm_object; struct pmap; -enum vm_reg_name; -enum x2apic_state; - typedef int (*vmm_init_func_t)(int ipinum); typedef int (*vmm_cleanup_func_t)(void); typedef void (*vmm_resume_func_t)(void); @@ -250,47 +294,6 @@ enum vm_reg_name vm_segment_name(int seg #define VM_MAXCPU 16 /* maximum virtual cpus */ /* - * Identifiers for architecturally defined registers. - */ -enum vm_reg_name { - VM_REG_GUEST_RAX, - VM_REG_GUEST_RBX, - VM_REG_GUEST_RCX, - VM_REG_GUEST_RDX, - VM_REG_GUEST_RSI, - VM_REG_GUEST_RDI, - VM_REG_GUEST_RBP, - VM_REG_GUEST_R8, - VM_REG_GUEST_R9, - VM_REG_GUEST_R10, - VM_REG_GUEST_R11, - VM_REG_GUEST_R12, - VM_REG_GUEST_R13, - VM_REG_GUEST_R14, - VM_REG_GUEST_R15, - VM_REG_GUEST_CR0, - VM_REG_GUEST_CR3, - VM_REG_GUEST_CR4, - VM_REG_GUEST_DR7, - VM_REG_GUEST_RSP, - VM_REG_GUEST_RIP, - VM_REG_GUEST_RFLAGS, - VM_REG_GUEST_ES, - VM_REG_GUEST_CS, - VM_REG_GUEST_SS, - VM_REG_GUEST_DS, - VM_REG_GUEST_FS, - VM_REG_GUEST_GS, - VM_REG_GUEST_LDTR, - VM_REG_GUEST_TR, - VM_REG_GUEST_IDTR, - VM_REG_GUEST_GDTR, - VM_REG_GUEST_EFER, - VM_REG_GUEST_CR2, - VM_REG_LAST -}; - -/* * Identifiers for optional vmm capabilities */ enum vm_cap_type { @@ -302,12 +305,6 @@ enum vm_cap_type { VM_CAP_MAX }; -enum x2apic_state { - X2APIC_DISABLED, - X2APIC_ENABLED, - X2APIC_STATE_LAST -}; - enum vm_intr_trigger { EDGE_TRIGGER, LEVEL_TRIGGER From mjg at FreeBSD.org Sun Aug 17 06:52:36 2014 From: mjg at FreeBSD.org (Mateusz Guzik) Date: Sun, 17 Aug 2014 06:52:35 +0000 (UTC) Subject: svn commit: r270084 - stable/10/sys/kern Message-ID: <201408170652.s7H6qZeH028464@svn.freebsd.org> Author: mjg Date: Sun Aug 17 06:52:35 2014 New Revision: 270084 URL: http://svnweb.freebsd.org/changeset/base/270084 Log: MFC r268074: Perform a lockless check in sigacts_shared. It is used only during execve (i.e. singlethreaded), so there is no fear of returning 'not shared' which soon becomes 'shared'. While here reorganize the code a little to avoid proc lock/unlock in shared case. Modified: stable/10/sys/kern/kern_exec.c stable/10/sys/kern/kern_sig.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_exec.c ============================================================================== --- stable/10/sys/kern/kern_exec.c Sun Aug 17 06:28:57 2014 (r270083) +++ stable/10/sys/kern/kern_exec.c Sun Aug 17 06:52:35 2014 (r270084) @@ -624,18 +624,17 @@ interpret: * handlers. In execsigs(), the new process will have its signals * reset. */ - PROC_LOCK(p); - oldcred = crcopysafe(p, newcred); if (sigacts_shared(p->p_sigacts)) { oldsigacts = p->p_sigacts; - PROC_UNLOCK(p); newsigacts = sigacts_alloc(); sigacts_copy(newsigacts, oldsigacts); - PROC_LOCK(p); - p->p_sigacts = newsigacts; } else oldsigacts = NULL; + PROC_LOCK(p); + if (oldsigacts) + p->p_sigacts = newsigacts; + oldcred = crcopysafe(p, newcred); /* Stop profiling */ stopprofclock(p); Modified: stable/10/sys/kern/kern_sig.c ============================================================================== --- stable/10/sys/kern/kern_sig.c Sun Aug 17 06:28:57 2014 (r270083) +++ stable/10/sys/kern/kern_sig.c Sun Aug 17 06:52:35 2014 (r270084) @@ -3463,10 +3463,6 @@ sigacts_copy(struct sigacts *dest, struc int sigacts_shared(struct sigacts *ps) { - int shared; - mtx_lock(&ps->ps_mtx); - shared = ps->ps_refcnt > 1; - mtx_unlock(&ps->ps_mtx); - return (shared); + return (ps->ps_refcnt > 1); } From mjg at FreeBSD.org Sun Aug 17 06:54:49 2014 From: mjg at FreeBSD.org (Mateusz Guzik) Date: Sun, 17 Aug 2014 06:54:49 +0000 (UTC) Subject: svn commit: r270085 - stable/10/sys/kern Message-ID: <201408170654.s7H6snCW031090@svn.freebsd.org> Author: mjg Date: Sun Aug 17 06:54:49 2014 New Revision: 270085 URL: http://svnweb.freebsd.org/changeset/base/270085 Log: MFC r268087: Don't call crcopysafe or uifind unnecessarily in execve. Modified: stable/10/sys/kern/kern_exec.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_exec.c ============================================================================== --- stable/10/sys/kern/kern_exec.c Sun Aug 17 06:52:35 2014 (r270084) +++ stable/10/sys/kern/kern_exec.c Sun Aug 17 06:54:49 2014 (r270085) @@ -339,7 +339,7 @@ do_execve(td, args, mac_p) struct proc *p = td->td_proc; struct nameidata nd; struct ucred *newcred = NULL, *oldcred; - struct uidinfo *euip; + struct uidinfo *euip = NULL; register_t *stack_base; int error, i; struct image_params image_params, *imgp; @@ -604,8 +604,6 @@ interpret: /* * Malloc things before we need locks. */ - newcred = crget(); - euip = uifind(attr.va_uid); i = imgp->args->begin_envv - imgp->args->begin_argv; /* Cache arguments if they fit inside our allowance */ if (ps_arg_cache_limit >= i + sizeof(struct pargs)) { @@ -634,7 +632,7 @@ interpret: PROC_LOCK(p); if (oldsigacts) p->p_sigacts = newsigacts; - oldcred = crcopysafe(p, newcred); + oldcred = p->p_ucred; /* Stop profiling */ stopprofclock(p); @@ -724,6 +722,8 @@ interpret: vn_lock(imgp->vp, LK_SHARED | LK_RETRY); if (error != 0) goto done1; + newcred = crdup(oldcred); + euip = uifind(attr.va_uid); PROC_LOCK(p); /* * Set the new credentials. @@ -748,7 +748,6 @@ interpret: change_svuid(newcred, newcred->cr_uid); change_svgid(newcred, newcred->cr_gid); p->p_ucred = newcred; - newcred = NULL; } else { if (oldcred->cr_uid == oldcred->cr_ruid && oldcred->cr_gid == oldcred->cr_rgid) @@ -767,10 +766,12 @@ interpret: */ if (oldcred->cr_svuid != oldcred->cr_uid || oldcred->cr_svgid != oldcred->cr_gid) { + PROC_UNLOCK(p); + newcred = crdup(oldcred); + PROC_LOCK(p); change_svuid(newcred, newcred->cr_uid); change_svgid(newcred, newcred->cr_gid); p->p_ucred = newcred; - newcred = NULL; } } @@ -847,11 +848,10 @@ done1: /* * Free any resources malloc'd earlier that we didn't use. */ - uifree(euip); - if (newcred == NULL) + if (euip != NULL) + uifree(euip); + if (newcred != NULL) crfree(oldcred); - else - crfree(newcred); VOP_UNLOCK(imgp->vp, 0); /* From mjg at FreeBSD.org Sun Aug 17 06:56:23 2014 From: mjg at FreeBSD.org (Mateusz Guzik) Date: Sun, 17 Aug 2014 06:56:22 +0000 (UTC) Subject: svn commit: r270086 - stable/10/sys/kern Message-ID: <201408170656.s7H6uMDj031393@svn.freebsd.org> Author: mjg Date: Sun Aug 17 06:56:22 2014 New Revision: 270086 URL: http://svnweb.freebsd.org/changeset/base/270086 Log: MFC r268136: Plug gcc warning after r268074 about unitialized newsigacts Modified: stable/10/sys/kern/kern_exec.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_exec.c ============================================================================== --- stable/10/sys/kern/kern_exec.c Sun Aug 17 06:54:49 2014 (r270085) +++ stable/10/sys/kern/kern_exec.c Sun Aug 17 06:56:22 2014 (r270086) @@ -626,8 +626,10 @@ interpret: oldsigacts = p->p_sigacts; newsigacts = sigacts_alloc(); sigacts_copy(newsigacts, oldsigacts); - } else + } else { oldsigacts = NULL; + newsigacts = NULL; /* satisfy gcc */ + } PROC_LOCK(p); if (oldsigacts) From mjg at FreeBSD.org Sun Aug 17 06:58:15 2014 From: mjg at FreeBSD.org (Mateusz Guzik) Date: Sun, 17 Aug 2014 06:58:14 +0000 (UTC) Subject: svn commit: r270087 - stable/10/sys/kern Message-ID: <201408170658.s7H6wEEI031675@svn.freebsd.org> Author: mjg Date: Sun Aug 17 06:58:14 2014 New Revision: 270087 URL: http://svnweb.freebsd.org/changeset/base/270087 Log: MFC r268365: Don't call crdup nor uifind under vnode lock. A locked vnode can get into the way of satisyfing malloc with M_WATOK. This is a fixup to r268087. Modified: stable/10/sys/kern/kern_exec.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_exec.c ============================================================================== --- stable/10/sys/kern/kern_exec.c Sun Aug 17 06:56:22 2014 (r270086) +++ stable/10/sys/kern/kern_exec.c Sun Aug 17 06:58:14 2014 (r270087) @@ -721,11 +721,11 @@ interpret: VOP_UNLOCK(imgp->vp, 0); setugidsafety(td); error = fdcheckstd(td); - vn_lock(imgp->vp, LK_SHARED | LK_RETRY); if (error != 0) goto done1; newcred = crdup(oldcred); euip = uifind(attr.va_uid); + vn_lock(imgp->vp, LK_SHARED | LK_RETRY); PROC_LOCK(p); /* * Set the new credentials. @@ -769,7 +769,9 @@ interpret: if (oldcred->cr_svuid != oldcred->cr_uid || oldcred->cr_svgid != oldcred->cr_gid) { PROC_UNLOCK(p); + VOP_UNLOCK(imgp->vp, 0); newcred = crdup(oldcred); + vn_lock(imgp->vp, LK_SHARED | LK_RETRY); PROC_LOCK(p); change_svuid(newcred, newcred->cr_uid); change_svgid(newcred, newcred->cr_gid); @@ -846,6 +848,7 @@ interpret: SDT_PROBE(proc, kernel, , exec__success, args->fname, 0, 0, 0, 0); + VOP_UNLOCK(imgp->vp, 0); done1: /* * Free any resources malloc'd earlier that we didn't use. @@ -854,7 +857,6 @@ done1: uifree(euip); if (newcred != NULL) crfree(oldcred); - VOP_UNLOCK(imgp->vp, 0); /* * Handle deferred decrement of ref counts. From mjg at FreeBSD.org Sun Aug 17 07:00:48 2014 From: mjg at FreeBSD.org (Mateusz Guzik) Date: Sun, 17 Aug 2014 07:00:48 +0000 (UTC) Subject: svn commit: r270088 - stable/10/sys/kern Message-ID: <201408170700.s7H70m4d034361@svn.freebsd.org> Author: mjg Date: Sun Aug 17 07:00:47 2014 New Revision: 270088 URL: http://svnweb.freebsd.org/changeset/base/270088 Log: MFC r268505, r268507: Avoid relocking filedesc lock when closing fds during fdp destruction. Don't call bzero nor fdunused from fdfree for such cases. It would do unnecessary work and complain that the lock is not taken. ======= Don't zero fd_nfiles during fdp destruction. Code trying to take a look has to check fd_refcnt and it is 0 by that time. This is a follow up to r268505, without this the code would leak memory for tables bigger than the default. Modified: stable/10/sys/kern/kern_descrip.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_descrip.c ============================================================================== --- stable/10/sys/kern/kern_descrip.c Sun Aug 17 06:58:14 2014 (r270087) +++ stable/10/sys/kern/kern_descrip.c Sun Aug 17 07:00:47 2014 (r270088) @@ -295,18 +295,36 @@ fdunused(struct filedesc *fdp, int fd) /* * Free a file descriptor. + * + * Avoid some work if fdp is about to be destroyed. */ static inline void -fdfree(struct filedesc *fdp, int fd) +_fdfree(struct filedesc *fdp, int fd, int last) { struct filedescent *fde; fde = &fdp->fd_ofiles[fd]; filecaps_free(&fde->fde_caps); + if (last) + return; bzero(fde, sizeof(*fde)); fdunused(fdp, fd); } +static inline void +fdfree(struct filedesc *fdp, int fd) +{ + + _fdfree(fdp, fd, 0); +} + +static inline void +fdfree_last(struct filedesc *fdp, int fd) +{ + + _fdfree(fdp, fd, 1); +} + /* * System calls on descriptors. */ @@ -2044,36 +2062,32 @@ fdescfree(struct thread *td) FILEDESC_XLOCK(fdp); i = --fdp->fd_refcnt; - FILEDESC_XUNLOCK(fdp); - if (i > 0) + if (i > 0) { + FILEDESC_XUNLOCK(fdp); return; + } + + cdir = fdp->fd_cdir; + fdp->fd_cdir = NULL; + rdir = fdp->fd_rdir; + fdp->fd_rdir = NULL; + jdir = fdp->fd_jdir; + fdp->fd_jdir = NULL; + FILEDESC_XUNLOCK(fdp); for (i = 0; i <= fdp->fd_lastfile; i++) { fp = fdp->fd_ofiles[i].fde_file; if (fp != NULL) { - FILEDESC_XLOCK(fdp); - fdfree(fdp, i); - FILEDESC_XUNLOCK(fdp); + fdfree_last(fdp, i); (void) closef(fp, td); } } - FILEDESC_XLOCK(fdp); if (fdp->fd_nfiles > NDFILE) free(fdp->fd_ofiles, M_FILEDESC); if (NDSLOTS(fdp->fd_nfiles) > NDSLOTS(NDFILE)) free(fdp->fd_map, M_FILEDESC); - fdp->fd_nfiles = 0; - - cdir = fdp->fd_cdir; - fdp->fd_cdir = NULL; - rdir = fdp->fd_rdir; - fdp->fd_rdir = NULL; - jdir = fdp->fd_jdir; - fdp->fd_jdir = NULL; - FILEDESC_XUNLOCK(fdp); - if (cdir != NULL) vrele(cdir); if (rdir != NULL) From mjg at FreeBSD.org Sun Aug 17 07:05:31 2014 From: mjg at FreeBSD.org (Mateusz Guzik) Date: Sun, 17 Aug 2014 07:05:30 +0000 (UTC) Subject: svn commit: r270089 - stable/10/sys/kern Message-ID: <201408170705.s7H75U0N035958@svn.freebsd.org> Author: mjg Date: Sun Aug 17 07:05:30 2014 New Revision: 270089 URL: http://svnweb.freebsd.org/changeset/base/270089 Log: MFC r259407: proc exit: don't take PROC_LOCK while freeing rlimits Code wishing to check rlimits of some process should check whether it is exiting first, which current consumers do. Modified: stable/10/sys/kern/kern_exit.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_exit.c ============================================================================== --- stable/10/sys/kern/kern_exit.c Sun Aug 17 07:00:47 2014 (r270088) +++ stable/10/sys/kern/kern_exit.c Sun Aug 17 07:05:30 2014 (r270089) @@ -387,10 +387,8 @@ exit1(struct thread *td, int rv) /* * Release our limits structure. */ - PROC_LOCK(p); plim = p->p_limit; p->p_limit = NULL; - PROC_UNLOCK(p); lim_free(plim); tidhash_remove(td); From mjg at FreeBSD.org Sun Aug 17 07:06:56 2014 From: mjg at FreeBSD.org (Mateusz Guzik) Date: Sun, 17 Aug 2014 07:06:56 +0000 (UTC) Subject: svn commit: r270090 - stable/10/sys/kern Message-ID: <201408170706.s7H76uin036176@svn.freebsd.org> Author: mjg Date: Sun Aug 17 07:06:55 2014 New Revision: 270090 URL: http://svnweb.freebsd.org/changeset/base/270090 Log: MFC r268514: Eliminate plim and vtmp local vars in exit1. No functional changes. Modified: stable/10/sys/kern/kern_exit.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_exit.c ============================================================================== --- stable/10/sys/kern/kern_exit.c Sun Aug 17 07:05:30 2014 (r270089) +++ stable/10/sys/kern/kern_exit.c Sun Aug 17 07:06:55 2014 (r270090) @@ -131,9 +131,7 @@ void exit1(struct thread *td, int rv) { struct proc *p, *nq, *q; - struct vnode *vtmp; struct vnode *ttyvp = NULL; - struct plimit *plim; mtx_assert(&Giant, MA_NOTOWNED); @@ -379,17 +377,16 @@ exit1(struct thread *td, int rv) /* * Release reference to text vnode */ - if ((vtmp = p->p_textvp) != NULL) { + if (p->p_textvp != NULL) { + vrele(p->p_textvp); p->p_textvp = NULL; - vrele(vtmp); } /* * Release our limits structure. */ - plim = p->p_limit; + lim_free(p->p_limit); p->p_limit = NULL; - lim_free(plim); tidhash_remove(td); From mjg at FreeBSD.org Sun Aug 17 07:16:04 2014 From: mjg at FreeBSD.org (Mateusz Guzik) Date: Sun, 17 Aug 2014 07:16:04 +0000 (UTC) Subject: svn commit: r270091 - stable/10/sys/kern Message-ID: <201408170716.s7H7G4h5040702@svn.freebsd.org> Author: mjg Date: Sun Aug 17 07:16:03 2014 New Revision: 270091 URL: http://svnweb.freebsd.org/changeset/base/270091 Log: MFC r264114, r264310, r268570: r264114 by davidxu: Fix SIGIO delivery. Use fsetown() to handle file descriptor owner ioctl and use pgsigio() to send SIGIO. r264310 by davidxu: Add kqueue support for devctl. r268570: Clear nonblock and async on devctl close instaed of open. This is a purely cosmetic change. Modified: stable/10/sys/kern/subr_bus.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/subr_bus.c ============================================================================== --- stable/10/sys/kern/subr_bus.c Sun Aug 17 07:06:55 2014 (r270090) +++ stable/10/sys/kern/subr_bus.c Sun Aug 17 07:16:03 2014 (r270091) @@ -374,6 +374,7 @@ static d_close_t devclose; static d_read_t devread; static d_ioctl_t devioctl; static d_poll_t devpoll; +static d_kqfilter_t devkqfilter; static struct cdevsw dev_cdevsw = { .d_version = D_VERSION, @@ -382,6 +383,7 @@ static struct cdevsw dev_cdevsw = { .d_read = devread, .d_ioctl = devioctl, .d_poll = devpoll, + .d_kqfilter = devkqfilter, .d_name = "devctl", }; @@ -398,13 +400,23 @@ static struct dev_softc int inuse; int nonblock; int queued; + int async; struct mtx mtx; struct cv cv; struct selinfo sel; struct devq devq; - struct proc *async_proc; + struct sigio *sigio; } devsoftc; +static void filt_devctl_detach(struct knote *kn); +static int filt_devctl_read(struct knote *kn, long hint); + +struct filterops devctl_rfiltops = { + .f_isfd = 1, + .f_detach = filt_devctl_detach, + .f_event = filt_devctl_read, +}; + static struct cdev *devctl_dev; static void @@ -415,6 +427,7 @@ devinit(void) mtx_init(&devsoftc.mtx, "dev mtx", "devd", MTX_DEF); cv_init(&devsoftc.cv, "dev cv"); TAILQ_INIT(&devsoftc.devq); + knlist_init_mtx(&devsoftc.sel.si_note, &devsoftc.mtx); } static int @@ -428,8 +441,6 @@ devopen(struct cdev *dev, int oflags, in } /* move to init */ devsoftc.inuse = 1; - devsoftc.nonblock = 0; - devsoftc.async_proc = NULL; mtx_unlock(&devsoftc.mtx); return (0); } @@ -440,8 +451,10 @@ devclose(struct cdev *dev, int fflag, in mtx_lock(&devsoftc.mtx); devsoftc.inuse = 0; - devsoftc.async_proc = NULL; + devsoftc.nonblock = 0; + devsoftc.async = 0; cv_broadcast(&devsoftc.cv); + funsetown(&devsoftc.sigio); mtx_unlock(&devsoftc.mtx); return (0); } @@ -497,33 +510,21 @@ devioctl(struct cdev *dev, u_long cmd, c devsoftc.nonblock = 0; return (0); case FIOASYNC: - /* - * FIXME: - * Since this is a simple assignment there is no guarantee that - * devsoftc.async_proc consumers will get a valid pointer. - * - * Example scenario where things break (processes A and B): - * 1. A opens devctl - * 2. A sends fd to B - * 3. B sets itself as async_proc - * 4. B exits - * - * However, normally this requires root privileges and the only - * in-tree consumer does not behave in a dangerous way so the - * issue is not critical. - */ if (*(int*)data) - devsoftc.async_proc = td->td_proc; + devsoftc.async = 1; else - devsoftc.async_proc = NULL; + devsoftc.async = 0; + return (0); + case FIOSETOWN: + return fsetown(*(int *)data, &devsoftc.sigio); + case FIOGETOWN: + *(int *)data = fgetown(&devsoftc.sigio); return (0); /* (un)Support for other fcntl() calls. */ case FIOCLEX: case FIONCLEX: case FIONREAD: - case FIOSETOWN: - case FIOGETOWN: default: break; } @@ -547,6 +548,34 @@ devpoll(struct cdev *dev, int events, st return (revents); } +static int +devkqfilter(struct cdev *dev, struct knote *kn) +{ + int error; + + if (kn->kn_filter == EVFILT_READ) { + kn->kn_fop = &devctl_rfiltops; + knlist_add(&devsoftc.sel.si_note, kn, 0); + error = 0; + } else + error = EINVAL; + return (error); +} + +static void +filt_devctl_detach(struct knote *kn) +{ + + knlist_remove(&devsoftc.sel.si_note, kn, 0); +} + +static int +filt_devctl_read(struct knote *kn, long hint) +{ + kn->kn_data = devsoftc.queued; + return (kn->kn_data != 0); +} + /** * @brief Return whether the userland process is running */ @@ -567,7 +596,6 @@ void devctl_queue_data_f(char *data, int flags) { struct dev_event_info *n1 = NULL, *n2 = NULL; - struct proc *p; if (strlen(data) == 0) goto out; @@ -595,15 +623,11 @@ devctl_queue_data_f(char *data, int flag TAILQ_INSERT_TAIL(&devsoftc.devq, n1, dei_link); devsoftc.queued++; cv_broadcast(&devsoftc.cv); + KNOTE_LOCKED(&devsoftc.sel.si_note, 0); mtx_unlock(&devsoftc.mtx); selwakeup(&devsoftc.sel); - /* XXX see a comment in devioctl */ - p = devsoftc.async_proc; - if (p != NULL) { - PROC_LOCK(p); - kern_psignal(p, SIGIO); - PROC_UNLOCK(p); - } + if (devsoftc.async && devsoftc.sigio != NULL) + pgsigio(&devsoftc.sigio, SIGIO, 0); return; out: /* From mjg at FreeBSD.org Sun Aug 17 07:20:38 2014 From: mjg at FreeBSD.org (Mateusz Guzik) Date: Sun, 17 Aug 2014 07:20:37 +0000 (UTC) Subject: svn commit: r270092 - in stable/10/sys: kern sys Message-ID: <201408170720.s7H7Kbsl041737@svn.freebsd.org> Author: mjg Date: Sun Aug 17 07:20:37 2014 New Revision: 270092 URL: http://svnweb.freebsd.org/changeset/base/270092 Log: MFC r268634: Manage struct sigacts refcnt with atomics instead of a mutex. Modified: stable/10/sys/kern/kern_sig.c stable/10/sys/sys/signalvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_sig.c ============================================================================== --- stable/10/sys/kern/kern_sig.c Sun Aug 17 07:16:03 2014 (r270091) +++ stable/10/sys/kern/kern_sig.c Sun Aug 17 07:20:37 2014 (r270092) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -3432,21 +3433,17 @@ void sigacts_free(struct sigacts *ps) { - mtx_lock(&ps->ps_mtx); - ps->ps_refcnt--; - if (ps->ps_refcnt == 0) { - mtx_destroy(&ps->ps_mtx); - free(ps, M_SUBPROC); - } else - mtx_unlock(&ps->ps_mtx); + if (refcount_release(&ps->ps_refcnt) == 0) + return; + mtx_destroy(&ps->ps_mtx); + free(ps, M_SUBPROC); } struct sigacts * sigacts_hold(struct sigacts *ps) { - mtx_lock(&ps->ps_mtx); - ps->ps_refcnt++; - mtx_unlock(&ps->ps_mtx); + + refcount_acquire(&ps->ps_refcnt); return (ps); } Modified: stable/10/sys/sys/signalvar.h ============================================================================== --- stable/10/sys/sys/signalvar.h Sun Aug 17 07:16:03 2014 (r270091) +++ stable/10/sys/sys/signalvar.h Sun Aug 17 07:20:37 2014 (r270092) @@ -63,7 +63,7 @@ struct sigacts { sigset_t ps_osigset; /* Signals using <= 3.x osigset_t. */ sigset_t ps_usertramp; /* SunOS compat; libc sigtramp. XXX */ int ps_flag; - int ps_refcnt; + u_int ps_refcnt; struct mtx ps_mtx; }; From mjg at FreeBSD.org Sun Aug 17 07:22:41 2014 From: mjg at FreeBSD.org (Mateusz Guzik) Date: Sun, 17 Aug 2014 07:22:41 +0000 (UTC) Subject: svn commit: r270093 - stable/10/sys/kern Message-ID: <201408170722.s7H7Mff8044785@svn.freebsd.org> Author: mjg Date: Sun Aug 17 07:22:40 2014 New Revision: 270093 URL: http://svnweb.freebsd.org/changeset/base/270093 Log: MFC r268636: Plug p_pptr null test in do_execve. It is always true. Modified: stable/10/sys/kern/kern_exec.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_exec.c ============================================================================== --- stable/10/sys/kern/kern_exec.c Sun Aug 17 07:20:37 2014 (r270092) +++ stable/10/sys/kern/kern_exec.c Sun Aug 17 07:22:40 2014 (r270093) @@ -658,7 +658,7 @@ interpret: * it that it now has its own resources back */ p->p_flag |= P_EXEC; - if (p->p_pptr && (p->p_flag & P_PPWAIT)) { + if (p->p_flag & P_PPWAIT) { p->p_flag &= ~(P_PPWAIT | P_PPTRACE); cv_broadcast(&p->p_pwait); } From mjg at FreeBSD.org Sun Aug 17 07:24:24 2014 From: mjg at FreeBSD.org (Mateusz Guzik) Date: Sun, 17 Aug 2014 07:24:23 +0000 (UTC) Subject: svn commit: r270094 - stable/10/sys/kern Message-ID: <201408170724.s7H7ONCM045044@svn.freebsd.org> Author: mjg Date: Sun Aug 17 07:24:23 2014 New Revision: 270094 URL: http://svnweb.freebsd.org/changeset/base/270094 Log: MFC r269020: Cosmetic changes to unp_internalize Don't throw away the result of fget_unlocked. Move fdp increment to for loop to make it consistent with similar code elsewhere. Modified: stable/10/sys/kern/uipc_usrreq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/uipc_usrreq.c ============================================================================== --- stable/10/sys/kern/uipc_usrreq.c Sun Aug 17 07:22:40 2014 (r270093) +++ stable/10/sys/kern/uipc_usrreq.c Sun Aug 17 07:24:23 2014 (r270094) @@ -1853,7 +1853,7 @@ unp_internalize(struct mbuf **controlp, struct filedescent *fde, **fdep, *fdev; struct file *fp; struct timeval *tv; - int i, fd, *fdp; + int i, *fdp; void *data; socklen_t clen = control->m_len, datalen; int error, oldfds; @@ -1906,14 +1906,13 @@ unp_internalize(struct mbuf **controlp, */ fdp = data; FILEDESC_SLOCK(fdesc); - for (i = 0; i < oldfds; i++) { - fd = *fdp++; - if (fget_locked(fdesc, fd) == NULL) { + for (i = 0; i < oldfds; i++, fdp++) { + fp = fget_locked(fdesc, *fdp); + if (fp == NULL) { FILEDESC_SUNLOCK(fdesc); error = EBADF; goto out; } - fp = fdesc->fd_ofiles[fd].fde_file; if (!(fp->f_ops->fo_flags & DFLAG_PASSABLE)) { FILEDESC_SUNLOCK(fdesc); error = EOPNOTSUPP; From kib at FreeBSD.org Sun Aug 17 09:07:22 2014 From: kib at FreeBSD.org (Konstantin Belousov) Date: Sun, 17 Aug 2014 09:07:21 +0000 (UTC) Subject: svn commit: r270095 - in stable/10/sys: kern sys Message-ID: <201408170907.s7H97LKn090483@svn.freebsd.org> Author: kib Date: Sun Aug 17 09:07:21 2014 New Revision: 270095 URL: http://svnweb.freebsd.org/changeset/base/270095 Log: MFC r269457: Remove Giant acquisition from the mount and unmount pathes. Modified: stable/10/sys/kern/vfs_init.c stable/10/sys/kern/vfs_mount.c stable/10/sys/kern/vfs_subr.c stable/10/sys/sys/mount.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/vfs_init.c ============================================================================== --- stable/10/sys/kern/vfs_init.c Sun Aug 17 07:24:23 2014 (r270094) +++ stable/10/sys/kern/vfs_init.c Sun Aug 17 09:07:21 2014 (r270095) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -64,6 +65,8 @@ int maxvfsconf = VFS_GENERIC + 1; * New entries are added/deleted by vfs_register()/vfs_unregister() */ struct vfsconfhead vfsconf = TAILQ_HEAD_INITIALIZER(vfsconf); +struct sx vfsconf_sx; +SX_SYSINIT(vfsconf, &vfsconf_sx, "vfsconf"); /* * Loader.conf variable vfs.typenumhash enables setting vfc_typenum using a hash @@ -105,20 +108,33 @@ struct vattr va_null; * Routines having to do with the management of the vnode table. */ -struct vfsconf * -vfs_byname(const char *name) +static struct vfsconf * +vfs_byname_locked(const char *name) { struct vfsconf *vfsp; + sx_assert(&vfsconf_sx, SA_LOCKED); if (!strcmp(name, "ffs")) name = "ufs"; - TAILQ_FOREACH(vfsp, &vfsconf, vfc_list) + TAILQ_FOREACH(vfsp, &vfsconf, vfc_list) { if (!strcmp(name, vfsp->vfc_name)) return (vfsp); + } return (NULL); } struct vfsconf * +vfs_byname(const char *name) +{ + struct vfsconf *vfsp; + + vfsconf_slock(); + vfsp = vfs_byname_locked(name); + vfsconf_sunlock(); + return (vfsp); +} + +struct vfsconf * vfs_byname_kld(const char *fstype, struct thread *td, int *error) { struct vfsconf *vfsp; @@ -169,8 +185,11 @@ vfs_register(struct vfsconf *vfc) vfc->vfc_name, vfc->vfc_version); return (EINVAL); } - if (vfs_byname(vfc->vfc_name) != NULL) + vfsconf_lock(); + if (vfs_byname_locked(vfc->vfc_name) != NULL) { + vfsconf_unlock(); return (EEXIST); + } if (vfs_typenumhash != 0) { /* @@ -203,26 +222,6 @@ vfs_register(struct vfsconf *vfc) TAILQ_INSERT_TAIL(&vfsconf, vfc, vfc_list); /* - * If this filesystem has a sysctl node under vfs - * (i.e. vfs.xxfs), then change the oid number of that node to - * match the filesystem's type number. This allows user code - * which uses the type number to read sysctl variables defined - * by the filesystem to continue working. Since the oids are - * in a sorted list, we need to make sure the order is - * preserved by re-registering the oid after modifying its - * number. - */ - sysctl_lock(); - SLIST_FOREACH(oidp, &sysctl__vfs_children, oid_link) - if (strcmp(oidp->oid_name, vfc->vfc_name) == 0) { - sysctl_unregister_oid(oidp); - oidp->oid_number = vfc->vfc_typenum; - sysctl_register_oid(oidp); - break; - } - sysctl_unlock(); - - /* * Initialise unused ``struct vfsops'' fields, to use * the vfs_std*() functions. Note, we need the mount * and unmount operations, at the least. The check @@ -281,8 +280,30 @@ vfs_register(struct vfsconf *vfc) * Call init function for this VFS... */ (*(vfc->vfc_vfsops->vfs_init))(vfc); + vfsconf_unlock(); - return 0; + /* + * If this filesystem has a sysctl node under vfs + * (i.e. vfs.xxfs), then change the oid number of that node to + * match the filesystem's type number. This allows user code + * which uses the type number to read sysctl variables defined + * by the filesystem to continue working. Since the oids are + * in a sorted list, we need to make sure the order is + * preserved by re-registering the oid after modifying its + * number. + */ + sysctl_lock(); + SLIST_FOREACH(oidp, &sysctl__vfs_children, oid_link) { + if (strcmp(oidp->oid_name, vfc->vfc_name) == 0) { + sysctl_unregister_oid(oidp); + oidp->oid_number = vfc->vfc_typenum; + sysctl_register_oid(oidp); + break; + } + } + sysctl_unlock(); + + return (0); } @@ -295,15 +316,22 @@ vfs_unregister(struct vfsconf *vfc) i = vfc->vfc_typenum; - vfsp = vfs_byname(vfc->vfc_name); - if (vfsp == NULL) - return EINVAL; - if (vfsp->vfc_refcount) - return EBUSY; + vfsconf_lock(); + vfsp = vfs_byname_locked(vfc->vfc_name); + if (vfsp == NULL) { + vfsconf_unlock(); + return (EINVAL); + } + if (vfsp->vfc_refcount != 0) { + vfsconf_unlock(); + return (EBUSY); + } if (vfc->vfc_vfsops->vfs_uninit != NULL) { error = (*vfc->vfc_vfsops->vfs_uninit)(vfsp); - if (error) + if (error != 0) { + vfsconf_unlock(); return (error); + } } TAILQ_REMOVE(&vfsconf, vfsp, vfc_list); maxtypenum = VFS_GENERIC; @@ -311,7 +339,8 @@ vfs_unregister(struct vfsconf *vfc) if (maxtypenum < vfsp->vfc_typenum) maxtypenum = vfsp->vfc_typenum; maxvfsconf = maxtypenum + 1; - return 0; + vfsconf_unlock(); + return (0); } /* Modified: stable/10/sys/kern/vfs_mount.c ============================================================================== --- stable/10/sys/kern/vfs_mount.c Sun Aug 17 07:24:23 2014 (r270094) +++ stable/10/sys/kern/vfs_mount.c Sun Aug 17 09:07:21 2014 (r270095) @@ -463,9 +463,9 @@ vfs_mount_alloc(struct vnode *vp, struct mp->mnt_activevnodelistsize = 0; mp->mnt_ref = 0; (void) vfs_busy(mp, MBF_NOWAIT); + atomic_add_acq_int(&vfsp->vfc_refcount, 1); mp->mnt_op = vfsp->vfc_vfsops; mp->mnt_vfc = vfsp; - vfsp->vfc_refcount++; /* XXX Unlocked */ mp->mnt_stat.f_type = vfsp->vfc_typenum; mp->mnt_gen++; strlcpy(mp->mnt_stat.f_fstypename, vfsp->vfc_name, MFSNAMELEN); @@ -505,7 +505,7 @@ vfs_mount_destroy(struct mount *mp) panic("vfs_mount_destroy: nonzero writeopcount"); if (mp->mnt_secondary_writes != 0) panic("vfs_mount_destroy: nonzero secondary_writes"); - mp->mnt_vfc->vfc_refcount--; + atomic_subtract_rel_int(&mp->mnt_vfc->vfc_refcount, 1); if (!TAILQ_EMPTY(&mp->mnt_nvnodelist)) { struct vnode *vp; @@ -736,17 +736,12 @@ sys_mount(td, uap) } AUDIT_ARG_TEXT(fstype); - mtx_lock(&Giant); vfsp = vfs_byname_kld(fstype, td, &error); free(fstype, M_TEMP); - if (vfsp == NULL) { - mtx_unlock(&Giant); + if (vfsp == NULL) return (ENOENT); - } - if (vfsp->vfc_vfsops->vfs_cmount == NULL) { - mtx_unlock(&Giant); + if (vfsp->vfc_vfsops->vfs_cmount == NULL) return (EOPNOTSUPP); - } ma = mount_argsu(ma, "fstype", uap->type, MFSNAMELEN); ma = mount_argsu(ma, "fspath", uap->path, MNAMELEN); @@ -755,7 +750,6 @@ sys_mount(td, uap) ma = mount_argb(ma, !(flags & MNT_NOEXEC), "noexec"); error = vfsp->vfc_vfsops->vfs_cmount(ma, uap->data, flags); - mtx_unlock(&Giant); return (error); } @@ -777,7 +771,6 @@ vfs_domount_first( struct vnode *newdp; int error; - mtx_assert(&Giant, MA_OWNED); ASSERT_VOP_ELOCKED(vp, __func__); KASSERT((fsflags & MNT_UPDATE) == 0, ("MNT_UPDATE shouldn't be here")); @@ -889,7 +882,6 @@ vfs_domount_update( int error, export_error; uint64_t flag; - mtx_assert(&Giant, MA_OWNED); ASSERT_VOP_ELOCKED(vp, __func__); KASSERT((fsflags & MNT_UPDATE) != 0, ("MNT_UPDATE should be here")); @@ -1091,7 +1083,6 @@ vfs_domount( error = namei(&nd); if (error != 0) return (error); - mtx_lock(&Giant); NDFREE(&nd, NDF_ONLY_PNBUF); vp = nd.ni_vp; if ((fsflags & MNT_UPDATE) == 0) { @@ -1106,7 +1097,6 @@ vfs_domount( free(pathbuf, M_TEMP); } else error = vfs_domount_update(td, vp, fsflags, optlist); - mtx_unlock(&Giant); ASSERT_VI_UNLOCKED(vp, __func__); ASSERT_VOP_UNLOCKED(vp, __func__); @@ -1153,12 +1143,10 @@ sys_unmount(td, uap) free(pathbuf, M_TEMP); return (error); } - mtx_lock(&Giant); if (uap->flags & MNT_BYFSID) { AUDIT_ARG_TEXT(pathbuf); /* Decode the filesystem ID. */ if (sscanf(pathbuf, "FSID:%d:%d", &id0, &id1) != 2) { - mtx_unlock(&Giant); free(pathbuf, M_TEMP); return (EINVAL); } @@ -1198,19 +1186,15 @@ sys_unmount(td, uap) * now, so in the !MNT_BYFSID case return the more likely * EINVAL for compatibility. */ - mtx_unlock(&Giant); return ((uap->flags & MNT_BYFSID) ? ENOENT : EINVAL); } /* * Don't allow unmounting the root filesystem. */ - if (mp->mnt_flag & MNT_ROOTFS) { - mtx_unlock(&Giant); + if (mp->mnt_flag & MNT_ROOTFS) return (EINVAL); - } error = dounmount(mp, uap->flags, td); - mtx_unlock(&Giant); return (error); } @@ -1228,8 +1212,6 @@ dounmount(mp, flags, td) uint64_t async_flag; int mnt_gen_r; - mtx_assert(&Giant, MA_OWNED); - if ((coveredvp = mp->mnt_vnodecovered) != NULL) { mnt_gen_r = mp->mnt_gen; VI_LOCK(coveredvp); Modified: stable/10/sys/kern/vfs_subr.c ============================================================================== --- stable/10/sys/kern/vfs_subr.c Sun Aug 17 07:24:23 2014 (r270094) +++ stable/10/sys/kern/vfs_subr.c Sun Aug 17 09:07:21 2014 (r270095) @@ -3231,6 +3231,7 @@ sysctl_vfs_conflist(SYSCTL_HANDLER_ARGS) int error; error = 0; + vfsconf_slock(); TAILQ_FOREACH(vfsp, &vfsconf, vfc_list) { #ifdef COMPAT_FREEBSD32 if (req->flags & SCTL_MASK32) @@ -3241,11 +3242,12 @@ sysctl_vfs_conflist(SYSCTL_HANDLER_ARGS) if (error) break; } + vfsconf_sunlock(); return (error); } -SYSCTL_PROC(_vfs, OID_AUTO, conflist, CTLTYPE_OPAQUE | CTLFLAG_RD, - NULL, 0, sysctl_vfs_conflist, +SYSCTL_PROC(_vfs, OID_AUTO, conflist, CTLTYPE_OPAQUE | CTLFLAG_RD | + CTLFLAG_MPSAFE, NULL, 0, sysctl_vfs_conflist, "S,xvfsconf", "List of all configured filesystems"); #ifndef BURN_BRIDGES @@ -3275,9 +3277,12 @@ vfs_sysctl(SYSCTL_HANDLER_ARGS) case VFS_CONF: if (namelen != 3) return (ENOTDIR); /* overloaded */ - TAILQ_FOREACH(vfsp, &vfsconf, vfc_list) + vfsconf_slock(); + TAILQ_FOREACH(vfsp, &vfsconf, vfc_list) { if (vfsp->vfc_typenum == name[2]) break; + } + vfsconf_sunlock(); if (vfsp == NULL) return (EOPNOTSUPP); #ifdef COMPAT_FREEBSD32 @@ -3290,8 +3295,9 @@ vfs_sysctl(SYSCTL_HANDLER_ARGS) return (EOPNOTSUPP); } -static SYSCTL_NODE(_vfs, VFS_GENERIC, generic, CTLFLAG_RD | CTLFLAG_SKIP, - vfs_sysctl, "Generic filesystem"); +static SYSCTL_NODE(_vfs, VFS_GENERIC, generic, CTLFLAG_RD | CTLFLAG_SKIP | + CTLFLAG_MPSAFE, vfs_sysctl, + "Generic filesystem"); #if 1 || defined(COMPAT_PRELITE2) @@ -3302,6 +3308,7 @@ sysctl_ovfs_conf(SYSCTL_HANDLER_ARGS) struct vfsconf *vfsp; struct ovfsconf ovfs; + vfsconf_slock(); TAILQ_FOREACH(vfsp, &vfsconf, vfc_list) { bzero(&ovfs, sizeof(ovfs)); ovfs.vfc_vfsops = vfsp->vfc_vfsops; /* XXX used as flag */ @@ -3310,10 +3317,13 @@ sysctl_ovfs_conf(SYSCTL_HANDLER_ARGS) ovfs.vfc_refcount = vfsp->vfc_refcount; ovfs.vfc_flags = vfsp->vfc_flags; error = SYSCTL_OUT(req, &ovfs, sizeof ovfs); - if (error) - return error; + if (error != 0) { + vfsconf_sunlock(); + return (error); + } } - return 0; + vfsconf_sunlock(); + return (0); } #endif /* 1 || COMPAT_PRELITE2 */ @@ -3411,8 +3421,9 @@ sysctl_vnode(SYSCTL_HANDLER_ARGS) return (error); } -SYSCTL_PROC(_kern, KERN_VNODE, vnode, CTLTYPE_OPAQUE|CTLFLAG_RD, - 0, 0, sysctl_vnode, "S,xvnode", ""); +SYSCTL_PROC(_kern, KERN_VNODE, vnode, CTLTYPE_OPAQUE | CTLFLAG_RD | + CTLFLAG_MPSAFE, 0, 0, sysctl_vnode, "S,xvnode", + ""); #endif /* Modified: stable/10/sys/sys/mount.h ============================================================================== --- stable/10/sys/sys/mount.h Sun Aug 17 07:24:23 2014 (r270094) +++ stable/10/sys/sys/mount.h Sun Aug 17 09:07:21 2014 (r270095) @@ -39,6 +39,7 @@ #include #include #include +#include #endif /* @@ -891,6 +892,11 @@ void vfs_unmountall(void); extern TAILQ_HEAD(mntlist, mount) mountlist; /* mounted filesystem list */ extern struct mtx mountlist_mtx; extern struct nfs_public nfs_pub; +extern struct sx vfsconf_sx; +#define vfsconf_lock() sx_xlock(&vfsconf_sx) +#define vfsconf_unlock() sx_xunlock(&vfsconf_sx) +#define vfsconf_slock() sx_slock(&vfsconf_sx) +#define vfsconf_sunlock() sx_sunlock(&vfsconf_sx) /* * Declarations for these vfs default operations are located in From dim at FreeBSD.org Sun Aug 17 13:08:15 2014 From: dim at FreeBSD.org (Dimitry Andric) Date: Sun, 17 Aug 2014 13:08:15 +0000 (UTC) Subject: svn commit: r270099 - in stable: 10/contrib/gcc/config/i386 9/contrib/gcc/config/i386 Message-ID: <201408171308.s7HD8Fnh099147@svn.freebsd.org> Author: dim Date: Sun Aug 17 13:08:15 2014 New Revision: 270099 URL: http://svnweb.freebsd.org/changeset/base/270099 Log: MFC r269948: 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 Modified: stable/9/contrib/gcc/config/i386/emmintrin.h Directory Properties: stable/9/contrib/gcc/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/gcc/config/i386/emmintrin.h Directory Properties: stable/10/ (props changed) Modified: stable/9/contrib/gcc/config/i386/emmintrin.h ============================================================================== --- stable/9/contrib/gcc/config/i386/emmintrin.h Sun Aug 17 11:59:23 2014 (r270098) +++ stable/9/contrib/gcc/config/i386/emmintrin.h Sun Aug 17 13:08:15 2014 (r270099) @@ -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 dim at FreeBSD.org Sun Aug 17 13:08:16 2014 From: dim at FreeBSD.org (Dimitry Andric) Date: Sun, 17 Aug 2014 13:08:15 +0000 (UTC) Subject: svn commit: r270099 - in stable: 10/contrib/gcc/config/i386 9/contrib/gcc/config/i386 Message-ID: <201408171308.s7HD8FPf099154@svn.freebsd.org> Author: dim Date: Sun Aug 17 13:08:15 2014 New Revision: 270099 URL: http://svnweb.freebsd.org/changeset/base/270099 Log: MFC r269948: 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 Modified: stable/10/contrib/gcc/config/i386/emmintrin.h Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/contrib/gcc/config/i386/emmintrin.h Directory Properties: stable/9/contrib/gcc/ (props changed) Modified: stable/10/contrib/gcc/config/i386/emmintrin.h ============================================================================== --- stable/10/contrib/gcc/config/i386/emmintrin.h Sun Aug 17 11:59:23 2014 (r270098) +++ stable/10/contrib/gcc/config/i386/emmintrin.h Sun Aug 17 13:08:15 2014 (r270099) @@ -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 dim at FreeBSD.org Sun Aug 17 13:12:08 2014 From: dim at FreeBSD.org (Dimitry Andric) Date: Sun, 17 Aug 2014 13:12:07 +0000 (UTC) Subject: svn commit: r270100 - in stable: 10/lib/clang/include/clang/Config 10/lib/clang/include/llvm/Config 9/lib/clang/include/clang/Config 9/lib/clang/include/llvm/Config Message-ID: <201408171312.s7HDC7Gr004733@svn.freebsd.org> Author: dim Date: Sun Aug 17 13:12:07 2014 New Revision: 270100 URL: http://svnweb.freebsd.org/changeset/base/270100 Log: MFC r269954: 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. Modified: stable/9/lib/clang/include/clang/Config/config.h stable/9/lib/clang/include/llvm/Config/config.h Directory Properties: stable/9/lib/clang/ (props changed) Changes in other areas also in this revision: Modified: stable/10/lib/clang/include/clang/Config/config.h stable/10/lib/clang/include/llvm/Config/config.h Directory Properties: stable/10/ (props changed) Modified: stable/9/lib/clang/include/clang/Config/config.h ============================================================================== --- stable/9/lib/clang/include/clang/Config/config.h Sun Aug 17 13:08:15 2014 (r270099) +++ stable/9/lib/clang/include/clang/Config/config.h Sun Aug 17 13:12:07 2014 (r270100) @@ -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: stable/9/lib/clang/include/llvm/Config/config.h ============================================================================== --- stable/9/lib/clang/include/llvm/Config/config.h Sun Aug 17 13:08:15 2014 (r270099) +++ stable/9/lib/clang/include/llvm/Config/config.h Sun Aug 17 13:12:07 2014 (r270100) @@ -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 dim at FreeBSD.org Sun Aug 17 13:12:08 2014 From: dim at FreeBSD.org (Dimitry Andric) Date: Sun, 17 Aug 2014 13:12:07 +0000 (UTC) Subject: svn commit: r270100 - in stable: 10/lib/clang/include/clang/Config 10/lib/clang/include/llvm/Config 9/lib/clang/include/clang/Config 9/lib/clang/include/llvm/Config Message-ID: <201408171312.s7HDC7Kt004740@svn.freebsd.org> Author: dim Date: Sun Aug 17 13:12:07 2014 New Revision: 270100 URL: http://svnweb.freebsd.org/changeset/base/270100 Log: MFC r269954: 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. Modified: stable/10/lib/clang/include/clang/Config/config.h stable/10/lib/clang/include/llvm/Config/config.h Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/lib/clang/include/clang/Config/config.h stable/9/lib/clang/include/llvm/Config/config.h Directory Properties: stable/9/lib/clang/ (props changed) Modified: stable/10/lib/clang/include/clang/Config/config.h ============================================================================== --- stable/10/lib/clang/include/clang/Config/config.h Sun Aug 17 13:08:15 2014 (r270099) +++ stable/10/lib/clang/include/clang/Config/config.h Sun Aug 17 13:12:07 2014 (r270100) @@ -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: stable/10/lib/clang/include/llvm/Config/config.h ============================================================================== --- stable/10/lib/clang/include/llvm/Config/config.h Sun Aug 17 13:08:15 2014 (r270099) +++ stable/10/lib/clang/include/llvm/Config/config.h Sun Aug 17 13:12:07 2014 (r270100) @@ -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 danfe at FreeBSD.org Sun Aug 17 13:19:42 2014 From: danfe at FreeBSD.org (Alexey Dokuchaev) Date: Sun, 17 Aug 2014 13:19:42 +0000 Subject: svn commit: r270099 - in stable: 10/contrib/gcc/config/i386 9/contrib/gcc/config/i386 In-Reply-To: <201408171308.s7HD8Fnh099147@svn.freebsd.org> References: <201408171308.s7HD8Fnh099147@svn.freebsd.org> Message-ID: <20140817131942.GA38672@FreeBSD.org> On Sun, Aug 17, 2014 at 01:08:15PM +0000, Dimitry Andric wrote: > New Revision: 270099 > URL: http://svnweb.freebsd.org/changeset/base/270099 > > Log: > MFC r269948: > > 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 Is it applicable to stable/8? If yes, can it be also MFCed there? ./danfe From dim at FreeBSD.org Sun Aug 17 13:30:05 2014 From: dim at FreeBSD.org (Dimitry Andric) Date: Sun, 17 Aug 2014 15:29:42 +0200 Subject: svn commit: r270099 - in stable: 10/contrib/gcc/config/i386 9/contrib/gcc/config/i386 In-Reply-To: <20140817131942.GA38672@FreeBSD.org> References: <201408171308.s7HD8Fnh099147@svn.freebsd.org> <20140817131942.GA38672@FreeBSD.org> Message-ID: <8CA269F6-BCD2-4E78-947F-682214367F36@FreeBSD.org> On 17 Aug 2014, at 15:19, Alexey Dokuchaev wrote: > On Sun, Aug 17, 2014 at 01:08:15PM +0000, Dimitry Andric wrote: >> New Revision: 270099 >> URL: http://svnweb.freebsd.org/changeset/base/270099 >> >> Log: >> MFC r269948: >> >> 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 > > Is it applicable to stable/8? If yes, can it be also MFCed there? In principle it is applicable, but the same file also has other changes in head which were not MFCd, so just MFCing this one commit does not make much sense. For example, the earlier cast fixes were part of a much larger commit by Pedro Giffuni, adding "experimental support for amdfam10/barcelona CPUs": http://svnweb.freebsd.org/base?view=revision&revision=251212 Does it still make sense to backport such experimental changes to an old stable branch? Of course I could split off just the changes to emmintrin.h, and leave the others out, but then we would have a partial MFC. I'm not sure if that is the usual way of doing things... -Dimitry -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 203 bytes Desc: Message signed with OpenPGP using GPGMail URL: From danfe at FreeBSD.org Sun Aug 17 13:45:09 2014 From: danfe at FreeBSD.org (Alexey Dokuchaev) Date: Sun, 17 Aug 2014 13:45:09 +0000 Subject: svn commit: r270099 - in stable: 10/contrib/gcc/config/i386 9/contrib/gcc/config/i386 In-Reply-To: <8CA269F6-BCD2-4E78-947F-682214367F36@FreeBSD.org> References: <201408171308.s7HD8Fnh099147@svn.freebsd.org> <20140817131942.GA38672@FreeBSD.org> <8CA269F6-BCD2-4E78-947F-682214367F36@FreeBSD.org> Message-ID: <20140817134509.GA47327@FreeBSD.org> On Sun, Aug 17, 2014 at 03:29:42PM +0200, Dimitry Andric wrote: > In principle it is applicable, but the same file also has other changes > in head which were not MFCd, so just MFCing this one commit does not > make much sense. For example, the earlier cast fixes were part of a > much larger commit by Pedro Giffuni, adding "experimental support for > amdfam10/barcelona CPUs": > > http://svnweb.freebsd.org/base?view=revision&revision=251212 I'm running my stable/8 with Pedro's patches applied, including r251212, no problems so far (although I don't have recent AMD CPUs to play with). > Does it still make sense to backport such experimental changes to an old > stable branch? Of course I could split off just the changes to > emmintrin.h, and leave the others out, but then we would have a partial > MFC. I'm not sure if that is the usual way of doing things... Understood. My goal here is to try to keep stable/8 as alive as possible, since I plan to keep using it beyond its official EOL. Hence, when I see fixes that potentially help ports to be buildable on it I'd usually ask if they can be MFCed (when it's easy enough to do). ./danfe From ache at freebsd.org Sun Aug 17 18:20:39 2014 From: ache at freebsd.org (Andrey Chernov) Date: Sun, 17 Aug 2014 22:20:19 +0400 Subject: svn commit: r270035 - stable/10/lib/libc/stdio In-Reply-To: <201408160129.s7G1TojV024013@svn.freebsd.org> References: <201408160129.s7G1TojV024013@svn.freebsd.org> Message-ID: <53F0F263.7040202@freebsd.org> On 16.08.2014 5:29, Pedro F. Giffuni wrote: > Author: pfg > Date: Sat Aug 16 01:29:49 2014 > New Revision: 270035 > URL: http://svnweb.freebsd.org/changeset/base/270035 > > Log: > MFC r268924: > Update fflush(3) to return success on a read-only stream. > > This is done for compliance with SUSv3. The changes cause > no secondary effects in the gnulib tests (we pass them). ... > @@ -122,6 +123,12 @@ __sflush(FILE *fp) > for (; n > 0; n -= t, p += t) { > t = _swrite(fp, (char *)p, n); > if (t <= 0) { > + /* Reset _p and _w. */ > + if (p > fp->_p) /* Some was written. */ > + memmove(fp->_p, p, n); > + fp->_p += n; > + if ((fp->_flags & (__SLBF | __SNBF)) == 0) > + fp->_w -= n; > fp->_flags |= __SERR; > return (EOF); > } > The description is incomplete. This code also does internal stdio structure adjustment for partial write. -- http://ache.vniz.net/ From mav at FreeBSD.org Sun Aug 17 18:22:44 2014 From: mav at FreeBSD.org (Alexander Motin) Date: Sun, 17 Aug 2014 18:22:43 +0000 (UTC) Subject: svn commit: r270106 - in stable/10/sys/cam: ctl scsi Message-ID: <201408171822.s7HIMhE1049355@svn.freebsd.org> Author: mav Date: Sun Aug 17 18:22:42 2014 New Revision: 270106 URL: http://svnweb.freebsd.org/changeset/base/270106 Log: MFC r269497: Add support for Windows dialect of EXTENDED COPY command, aka Microsoft ODX. This allows to avoid extra network traffic when copying files on NTFS iSCSI disks within one storage host by drag'n'dropping them in Windows Explorer of Windows 8/2012. It should also accelerate Hyper-V VM operations, etc. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_cmd_table.c stable/10/sys/cam/ctl/ctl_private.h stable/10/sys/cam/ctl/ctl_ser_table.c stable/10/sys/cam/ctl/ctl_tpc.c stable/10/sys/cam/scsi/scsi_all.c stable/10/sys/cam/scsi/scsi_all.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Sun Aug 17 16:53:19 2014 (r270105) +++ stable/10/sys/cam/ctl/ctl.c Sun Aug 17 18:22:42 2014 (r270106) @@ -1025,6 +1025,7 @@ ctl_init(void) STAILQ_INIT(&softc->port_list); STAILQ_INIT(&softc->be_list); STAILQ_INIT(&softc->io_pools); + ctl_tpc_init(softc); if (ctl_pool_create(softc, CTL_POOL_INTERNAL, CTL_POOL_ENTRIES_INTERNAL, &internal_pool)!= 0){ @@ -1172,6 +1173,7 @@ ctl_shutdown(void) mtx_destroy(&softc->queue_lock); #endif + ctl_tpc_shutdown(softc); mtx_destroy(&softc->pool_lock); mtx_destroy(&softc->ctl_lock); @@ -4598,7 +4600,7 @@ ctl_alloc_lun(struct ctl_softc *ctl_soft TAILQ_INIT(&lun->ooa_queue); TAILQ_INIT(&lun->blocked_queue); STAILQ_INIT(&lun->error_list); - ctl_tpc_init(lun); + ctl_tpc_lun_init(lun); /* * Initialize the mode page index. @@ -4750,7 +4752,7 @@ ctl_free_lun(struct ctl_lun *lun) atomic_subtract_int(&lun->be_lun->be->num_luns, 1); lun->be_lun->lun_shutdown(lun->be_lun->be_lun); - ctl_tpc_shutdown(lun); + ctl_tpc_lun_shutdown(lun); mtx_destroy(&lun->lun_lock); free(lun->lun_devid, M_CTL); if (lun->flags & CTL_LUN_MALLOCED) Modified: stable/10/sys/cam/ctl/ctl_cmd_table.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_cmd_table.c Sun Aug 17 16:53:19 2014 (r270105) +++ stable/10/sys/cam/ctl/ctl_cmd_table.c Sun Aug 17 18:22:42 2014 (r270106) @@ -248,10 +248,18 @@ const struct ctl_cmd_entry ctl_cmd_table {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, /* 10 POPULATE TOKEN */ -{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, +{ctl_populate_token, CTL_SERIDX_RD_CAP, CTL_CMD_FLAG_OK_ON_SLUN | + CTL_FLAG_DATA_OUT, + CTL_LUN_PAT_NONE, + 16, { 0x10, 0, 0, 0, 0, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, /* 11 WRITE USING TOKEN */ -{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, +{ctl_write_using_token, CTL_SERIDX_RD_CAP, CTL_CMD_FLAG_OK_ON_SLUN | + CTL_FLAG_DATA_OUT, + CTL_LUN_PAT_NONE, + 16, { 0x11, 0, 0, 0, 0, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, /* 12 */ {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, @@ -334,10 +342,18 @@ const struct ctl_cmd_entry ctl_cmd_table {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, /* 07 RECEIVE ROD TOKEN INFORMATION */ -{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, +{ctl_receive_rod_token_information, CTL_SERIDX_RD_CAP, + CTL_CMD_FLAG_OK_ON_BOTH | + CTL_FLAG_DATA_IN, + CTL_LUN_PAT_NONE, + 16, {0x07, 0xff, 0xff, 0xff, 0xff, 0, 0, 0, 0, 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, /* 08 REPORT ALL ROD TOKENS */ -{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, +{ctl_report_all_rod_tokens, CTL_SERIDX_RD_CAP, + CTL_CMD_FLAG_OK_ON_BOTH | + CTL_FLAG_DATA_IN, + CTL_LUN_PAT_NONE, + 16, {0x08, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, }; /* 9E SERVICE ACTION IN(16) */ Modified: stable/10/sys/cam/ctl/ctl_private.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_private.h Sun Aug 17 16:53:19 2014 (r270105) +++ stable/10/sys/cam/ctl/ctl_private.h Sun Aug 17 18:22:42 2014 (r270106) @@ -422,6 +422,7 @@ struct ctl_thread { STAILQ_HEAD(, ctl_io_hdr) isc_queue; }; +struct tpc_token; struct ctl_softc { struct mtx ctl_lock; struct cdev *dev; @@ -460,6 +461,8 @@ struct ctl_softc { time_t last_print_jiffies; uint32_t skipped_prints; struct ctl_thread threads[CTL_MAX_THREADS]; + TAILQ_HEAD(tpc_tokens, tpc_token) tpc_tokens; + struct callout tpc_timeout; }; #ifdef _KERNEL @@ -500,8 +503,10 @@ int ctl_report_supported_tmf(struct ctl_ int ctl_report_timestamp(struct ctl_scsiio *ctsio); int ctl_isc(struct ctl_scsiio *ctsio); -void ctl_tpc_init(struct ctl_lun *lun); -void ctl_tpc_shutdown(struct ctl_lun *lun); +void ctl_tpc_init(struct ctl_softc *softc); +void ctl_tpc_shutdown(struct ctl_softc *softc); +void ctl_tpc_lun_init(struct ctl_lun *lun); +void ctl_tpc_lun_shutdown(struct ctl_lun *lun); int ctl_inquiry_evpd_tpc(struct ctl_scsiio *ctsio, int alloc_len); int ctl_receive_copy_status_lid1(struct ctl_scsiio *ctsio); int ctl_receive_copy_failure_details(struct ctl_scsiio *ctsio); @@ -510,6 +515,10 @@ int ctl_receive_copy_operating_parameter int ctl_extended_copy_lid1(struct ctl_scsiio *ctsio); int ctl_extended_copy_lid4(struct ctl_scsiio *ctsio); int ctl_copy_operation_abort(struct ctl_scsiio *ctsio); +int ctl_populate_token(struct ctl_scsiio *ctsio); +int ctl_write_using_token(struct ctl_scsiio *ctsio); +int ctl_receive_rod_token_information(struct ctl_scsiio *ctsio); +int ctl_report_all_rod_tokens(struct ctl_scsiio *ctsio); #endif /* _KERNEL */ Modified: stable/10/sys/cam/ctl/ctl_ser_table.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_ser_table.c Sun Aug 17 16:53:19 2014 (r270105) +++ stable/10/sys/cam/ctl/ctl_ser_table.c Sun Aug 17 18:22:42 2014 (r270106) @@ -69,7 +69,7 @@ ctl_serialize_table[CTL_SERIDX_COUNT][CT /*MD_SEL */{ bK, bK, bK, bK, bK, bK, bK, pS, pS, bK, pS, bK, bK}, /*RQ_SNS */{ pS, pS, pS, pS, pS, pS, bK, pS, pS, bK, pS, bK, bK}, /*INQ */{ pS, pS, pS, pS, pS, pS, bK, pS, pS, pS, pS, bK, bK}, -/*RD_CAP */{ pS, pS, pS, pS, pS, pS, bK, pS, pS, pS, pS, bK, bK}, +/*RD_CAP */{ pS, pS, pS, pS, pS, pS, bK, pS, pS, pS, pS, bK, pS}, /*RES */{ bK, bK, bK, bK, bK, bK, bK, pS, bK, bK, bK, bK, bK}, /*LOG_SNS */{ pS, pS, pS, pS, pS, bK, bK, pS, pS, bK, pS, bK, bK}, /*FORMAT */{ pS, bK, bK, bK, bK, bK, pS, pS, bK, bK, bK, bK, bK}, Modified: stable/10/sys/cam/ctl/ctl_tpc.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_tpc.c Sun Aug 17 16:53:19 2014 (r270105) +++ stable/10/sys/cam/ctl/ctl_tpc.c Sun Aug 17 18:22:42 2014 (r270106) @@ -65,6 +65,10 @@ __FBSDID("$FreeBSD$"); #define TPC_MAX_INLINE 0 #define TPC_MAX_LISTS 255 #define TPC_MAX_IO_SIZE (1024 * 1024) +#define TPC_MAX_IOCHUNK_SIZE (TPC_MAX_IO_SIZE * 16) +#define TPC_MIN_TOKEN_TIMEOUT 1 +#define TPC_DFL_TOKEN_TIMEOUT 60 +#define TPC_MAX_TOKEN_TIMEOUT 600 MALLOC_DEFINE(M_CTL_TPC, "ctltpc", "CTL TPC"); @@ -86,6 +90,19 @@ struct tpc_io { TAILQ_ENTRY(tpc_io) links; }; +struct tpc_token { + uint8_t token[512]; + uint64_t lun; + uint32_t blocksize; + uint8_t *params; + struct scsi_range_desc *range; + int nrange; + int active; + time_t last_active; + uint32_t timeout; + TAILQ_ENTRY(tpc_token) links; +}; + struct tpc_list { uint8_t service_action; int init_port; @@ -99,43 +116,127 @@ struct tpc_list { int ncscd; int nseg; int leninl; + struct tpc_token *token; + struct scsi_range_desc *range; + int nrange; + off_t offset_into_rod; + int curseg; + off_t cursectors; off_t curbytes; int curops; int stage; uint8_t *buf; - int segbytes; + off_t segsectors; + off_t segbytes; int tbdio; int error; int abort; int completed; + time_t last_active; TAILQ_HEAD(, tpc_io) allio; struct scsi_sense_data sense_data; uint8_t sense_len; uint8_t scsi_status; struct ctl_scsiio *ctsio; struct ctl_lun *lun; + int res_token_valid; + uint8_t res_token[512]; TAILQ_ENTRY(tpc_list) links; }; +extern struct ctl_softc *control_softc; + +static void +tpc_timeout(void *arg) +{ + struct ctl_softc *softc = arg; + struct ctl_lun *lun; + struct tpc_token *token, *ttoken; + struct tpc_list *list, *tlist; + + /* Free completed lists with expired timeout. */ + STAILQ_FOREACH(lun, &softc->lun_list, links) { + mtx_lock(&lun->lun_lock); + TAILQ_FOREACH_SAFE(list, &lun->tpc_lists, links, tlist) { + if (!list->completed || time_uptime < list->last_active + + TPC_DFL_TOKEN_TIMEOUT) + continue; + TAILQ_REMOVE(&lun->tpc_lists, list, links); + free(list, M_CTL); + } + mtx_unlock(&lun->lun_lock); + } + + /* Free inactive ROD tokens with expired timeout. */ + TAILQ_FOREACH_SAFE(token, &softc->tpc_tokens, links, ttoken) { + if (token->active || + time_uptime < token->last_active + token->timeout + 1) + continue; + TAILQ_REMOVE(&softc->tpc_tokens, token, links); + free(token->params, M_CTL); + free(token, M_CTL); + } + callout_schedule(&softc->tpc_timeout, hz); +} + +void +ctl_tpc_init(struct ctl_softc *softc) +{ + + TAILQ_INIT(&softc->tpc_tokens); + callout_init_mtx(&softc->tpc_timeout, &softc->ctl_lock, 0); + callout_reset(&softc->tpc_timeout, hz, tpc_timeout, softc); +} + void -ctl_tpc_init(struct ctl_lun *lun) +ctl_tpc_shutdown(struct ctl_softc *softc) +{ + struct tpc_token *token; + + callout_drain(&softc->tpc_timeout); + + /* Free ROD tokens. */ + mtx_lock(&softc->ctl_lock); + while ((token = TAILQ_FIRST(&softc->tpc_tokens)) != NULL) { + TAILQ_REMOVE(&softc->tpc_tokens, token, links); + free(token->params, M_CTL); + free(token, M_CTL); + } + mtx_unlock(&softc->ctl_lock); +} + +void +ctl_tpc_lun_init(struct ctl_lun *lun) { TAILQ_INIT(&lun->tpc_lists); } void -ctl_tpc_shutdown(struct ctl_lun *lun) +ctl_tpc_lun_shutdown(struct ctl_lun *lun) { struct tpc_list *list; + struct tpc_token *token, *ttoken; + /* Free lists for this LUN. */ while ((list = TAILQ_FIRST(&lun->tpc_lists)) != NULL) { TAILQ_REMOVE(&lun->tpc_lists, list, links); KASSERT(list->completed, ("Not completed TPC (%p) on shutdown", list)); free(list, M_CTL); } + + /* Free ROD tokens for this LUN. */ + mtx_lock(&control_softc->ctl_lock); + TAILQ_FOREACH_SAFE(token, &control_softc->tpc_tokens, links, ttoken) { + if (token->lun != lun->lun || token->active) + continue; + TAILQ_REMOVE(&control_softc->tpc_tokens, token, links); + free(token->params, M_CTL); + free(token, M_CTL); + } + mtx_unlock(&control_softc->ctl_lock); } int @@ -143,11 +244,16 @@ ctl_inquiry_evpd_tpc(struct ctl_scsiio * { struct scsi_vpd_tpc *tpc_ptr; struct scsi_vpd_tpc_descriptor *d_ptr; + struct scsi_vpd_tpc_descriptor_bdrl *bdrl_ptr; struct scsi_vpd_tpc_descriptor_sc *sc_ptr; struct scsi_vpd_tpc_descriptor_sc_descr *scd_ptr; struct scsi_vpd_tpc_descriptor_pd *pd_ptr; struct scsi_vpd_tpc_descriptor_sd *sd_ptr; struct scsi_vpd_tpc_descriptor_sdid *sdid_ptr; + struct scsi_vpd_tpc_descriptor_rtf *rtf_ptr; + struct scsi_vpd_tpc_descriptor_rtf_block *rtfb_ptr; + struct scsi_vpd_tpc_descriptor_srt *srt_ptr; + struct scsi_vpd_tpc_descriptor_srtd *srtd_ptr; struct scsi_vpd_tpc_descriptor_gco *gco_ptr; struct ctl_lun *lun; int data_len; @@ -155,11 +261,16 @@ ctl_inquiry_evpd_tpc(struct ctl_scsiio * lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; data_len = sizeof(struct scsi_vpd_tpc) + + sizeof(struct scsi_vpd_tpc_descriptor_bdrl) + roundup2(sizeof(struct scsi_vpd_tpc_descriptor_sc) + - 2 * sizeof(struct scsi_vpd_tpc_descriptor_sc_descr) + 7, 4) + + 2 * sizeof(struct scsi_vpd_tpc_descriptor_sc_descr) + 11, 4) + sizeof(struct scsi_vpd_tpc_descriptor_pd) + roundup2(sizeof(struct scsi_vpd_tpc_descriptor_sd) + 4, 4) + roundup2(sizeof(struct scsi_vpd_tpc_descriptor_sdid) + 2, 4) + + sizeof(struct scsi_vpd_tpc_descriptor_rtf) + + sizeof(struct scsi_vpd_tpc_descriptor_rtf_block) + + sizeof(struct scsi_vpd_tpc_descriptor_srt) + + 2*sizeof(struct scsi_vpd_tpc_descriptor_srtd) + sizeof(struct scsi_vpd_tpc_descriptor_gco); ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); @@ -191,26 +302,44 @@ ctl_inquiry_evpd_tpc(struct ctl_scsiio * tpc_ptr->page_code = SVPD_SCSI_TPC; scsi_ulto2b(data_len - 4, tpc_ptr->page_length); - /* Supported commands */ + /* Block Device ROD Limits */ d_ptr = (struct scsi_vpd_tpc_descriptor *)&tpc_ptr->descr[0]; + bdrl_ptr = (struct scsi_vpd_tpc_descriptor_bdrl *)d_ptr; + scsi_ulto2b(SVPD_TPC_BDRL, bdrl_ptr->desc_type); + scsi_ulto2b(sizeof(*bdrl_ptr) - 4, bdrl_ptr->desc_length); + scsi_ulto2b(TPC_MAX_SEGS, bdrl_ptr->maximum_ranges); + scsi_ulto4b(TPC_MAX_TOKEN_TIMEOUT, + bdrl_ptr->maximum_inactivity_timeout); + scsi_ulto4b(TPC_DFL_TOKEN_TIMEOUT, + bdrl_ptr->default_inactivity_timeout); + scsi_u64to8b(0, bdrl_ptr->maximum_token_transfer_size); + scsi_u64to8b(0, bdrl_ptr->optimal_transfer_count); + + /* Supported commands */ + d_ptr = (struct scsi_vpd_tpc_descriptor *) + (&d_ptr->parameters[0] + scsi_2btoul(d_ptr->desc_length)); sc_ptr = (struct scsi_vpd_tpc_descriptor_sc *)d_ptr; scsi_ulto2b(SVPD_TPC_SC, sc_ptr->desc_type); - sc_ptr->list_length = 2 * sizeof(*scd_ptr) + 7; + sc_ptr->list_length = 2 * sizeof(*scd_ptr) + 11; scsi_ulto2b(roundup2(1 + sc_ptr->list_length, 4), sc_ptr->desc_length); scd_ptr = &sc_ptr->descr[0]; scd_ptr->opcode = EXTENDED_COPY; - scd_ptr->sa_length = 3; + scd_ptr->sa_length = 5; scd_ptr->supported_service_actions[0] = EC_EC_LID1; scd_ptr->supported_service_actions[1] = EC_EC_LID4; - scd_ptr->supported_service_actions[2] = EC_COA; + scd_ptr->supported_service_actions[2] = EC_PT; + scd_ptr->supported_service_actions[3] = EC_WUT; + scd_ptr->supported_service_actions[4] = EC_COA; scd_ptr = (struct scsi_vpd_tpc_descriptor_sc_descr *) &scd_ptr->supported_service_actions[scd_ptr->sa_length]; scd_ptr->opcode = RECEIVE_COPY_STATUS; - scd_ptr->sa_length = 4; + scd_ptr->sa_length = 6; scd_ptr->supported_service_actions[0] = RCS_RCS_LID1; scd_ptr->supported_service_actions[1] = RCS_RCFD; scd_ptr->supported_service_actions[2] = RCS_RCS_LID4; scd_ptr->supported_service_actions[3] = RCS_RCOP; + scd_ptr->supported_service_actions[4] = RCS_RRTI; + scd_ptr->supported_service_actions[5] = RCS_RART; /* Parameter data. */ d_ptr = (struct scsi_vpd_tpc_descriptor *) @@ -244,6 +373,47 @@ ctl_inquiry_evpd_tpc(struct ctl_scsiio * scsi_ulto2b(2, sdid_ptr->list_length); scsi_ulto2b(0xffff, &sdid_ptr->supported_descriptor_ids[0]); + /* ROD Token Features */ + d_ptr = (struct scsi_vpd_tpc_descriptor *) + (&d_ptr->parameters[0] + scsi_2btoul(d_ptr->desc_length)); + rtf_ptr = (struct scsi_vpd_tpc_descriptor_rtf *)d_ptr; + scsi_ulto2b(SVPD_TPC_RTF, rtf_ptr->desc_type); + scsi_ulto2b(sizeof(*rtf_ptr) - 4 + sizeof(*rtfb_ptr), rtf_ptr->desc_length); + rtf_ptr->remote_tokens = 0; + scsi_ulto4b(TPC_MIN_TOKEN_TIMEOUT, rtf_ptr->minimum_token_lifetime); + scsi_ulto4b(UINT32_MAX, rtf_ptr->maximum_token_lifetime); + scsi_ulto4b(TPC_MAX_TOKEN_TIMEOUT, + rtf_ptr->maximum_token_inactivity_timeout); + scsi_ulto2b(sizeof(*rtfb_ptr), rtf_ptr->type_specific_features_length); + rtfb_ptr = (struct scsi_vpd_tpc_descriptor_rtf_block *) + &rtf_ptr->type_specific_features; + rtfb_ptr->type_format = SVPD_TPC_RTF_BLOCK; + scsi_ulto2b(sizeof(*rtfb_ptr) - 4, rtfb_ptr->desc_length); + scsi_ulto2b(0, rtfb_ptr->optimal_length_granularity); + scsi_u64to8b(0, rtfb_ptr->maximum_bytes); + scsi_u64to8b(0, rtfb_ptr->optimal_bytes); + scsi_u64to8b(TPC_MAX_IOCHUNK_SIZE, + rtfb_ptr->optimal_bytes_to_token_per_segment); + scsi_u64to8b(TPC_MAX_IOCHUNK_SIZE, + rtfb_ptr->optimal_bytes_from_token_per_segment); + + /* Supported ROD Tokens */ + d_ptr = (struct scsi_vpd_tpc_descriptor *) + (&d_ptr->parameters[0] + scsi_2btoul(d_ptr->desc_length)); + srt_ptr = (struct scsi_vpd_tpc_descriptor_srt *)d_ptr; + scsi_ulto2b(SVPD_TPC_SRT, srt_ptr->desc_type); + scsi_ulto2b(sizeof(*srt_ptr) - 4 + 2*sizeof(*srtd_ptr), srt_ptr->desc_length); + scsi_ulto2b(2*sizeof(*srtd_ptr), srt_ptr->rod_type_descriptors_length); + srtd_ptr = (struct scsi_vpd_tpc_descriptor_srtd *) + &srt_ptr->rod_type_descriptors; + scsi_ulto4b(ROD_TYPE_AUR, srtd_ptr->rod_type); + srtd_ptr->flags = SVPD_TPC_SRTD_TIN | SVPD_TPC_SRTD_TOUT; + scsi_ulto2b(0, srtd_ptr->preference_indicator); + srtd_ptr++; + scsi_ulto4b(ROD_TYPE_BLOCK_ZERO, srtd_ptr->rod_type); + srtd_ptr->flags = SVPD_TPC_SRTD_TIN; + scsi_ulto2b(0, srtd_ptr->preference_indicator); + /* General Copy Operations */ d_ptr = (struct scsi_vpd_tpc_descriptor *) (&d_ptr->parameters[0] + scsi_2btoul(d_ptr->desc_length)); @@ -267,7 +437,6 @@ ctl_inquiry_evpd_tpc(struct ctl_scsiio * int ctl_receive_copy_operating_parameters(struct ctl_scsiio *ctsio) { - struct ctl_lun *lun; struct scsi_receive_copy_operating_parameters *cdb; struct scsi_receive_copy_operating_parameters_data *data; int retval; @@ -276,7 +445,6 @@ ctl_receive_copy_operating_parameters(st CTL_DEBUG_PRINT(("ctl_report_supported_tmf\n")); cdb = (struct scsi_receive_copy_operating_parameters *)ctsio->cdb; - lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; retval = CTL_RETVAL_COMPLETE; @@ -661,6 +829,7 @@ complete: /*asc*/ 0x0d, /*ascq*/ 0x01, SSD_ELEM_NONE); return (CTL_RETVAL_ERROR); } else { + list->cursectors += list->segsectors; list->curbytes += list->segbytes; return (CTL_RETVAL_COMPLETE); } @@ -706,6 +875,7 @@ complete: list->buf = malloc(numbytes, M_CTL, M_WAITOK); list->segbytes = numbytes; + list->segsectors = numbytes / dstblock; donebytes = 0; TAILQ_INIT(&run); prun = &run; @@ -901,6 +1071,197 @@ complete: return (CTL_RETVAL_QUEUED); } +static off_t +tpc_ranges_length(struct scsi_range_desc *range, int nrange) +{ + off_t length = 0; + int r; + + for (r = 0; r < nrange; r++) + length += scsi_4btoul(range[r].length); + return (length); +} + +static int +tpc_skip_ranges(struct scsi_range_desc *range, int nrange, off_t skip, + int *srange, off_t *soffset) +{ + off_t off; + int r; + + r = 0; + off = 0; + while (r < nrange) { + if (skip - off < scsi_4btoul(range[r].length)) { + *srange = r; + *soffset = skip - off; + return (0); + } + off += scsi_4btoul(range[r].length); + r++; + } + return (-1); +} + +static int +tpc_process_wut(struct tpc_list *list) +{ + struct tpc_io *tio, *tior, *tiow; + struct runl run, *prun; + int drange, srange; + off_t doffset, soffset; + off_t srclba, dstlba, numbytes, donebytes, roundbytes; + uint32_t srcblock, dstblock; + + if (list->stage > 0) { +complete: + /* Cleanup after previous rounds. */ + while ((tio = TAILQ_FIRST(&list->allio)) != NULL) { + TAILQ_REMOVE(&list->allio, tio, links); + ctl_free_io(tio->io); + free(tio, M_CTL); + } + free(list->buf, M_CTL); + if (list->abort) { + ctl_set_task_aborted(list->ctsio); + return (CTL_RETVAL_ERROR); + } else if (list->error) { + ctl_set_sense(list->ctsio, /*current_error*/ 1, + /*sense_key*/ SSD_KEY_COPY_ABORTED, + /*asc*/ 0x0d, /*ascq*/ 0x01, SSD_ELEM_NONE); + return (CTL_RETVAL_ERROR); + } + list->cursectors += list->segsectors; + list->curbytes += list->segbytes; + } + + /* Check where we are on destination ranges list. */ + if (tpc_skip_ranges(list->range, list->nrange, list->cursectors, + &drange, &doffset) != 0) + return (CTL_RETVAL_COMPLETE); + dstblock = list->lun->be_lun->blocksize; + + /* Special case: no token == Block device zero ROD token */ + if (list->token == NULL) { + srcblock = 1; + srclba = 0; + numbytes = INT64_MAX; + goto dstp; + } + + /* Check where we are on source ranges list. */ + srcblock = list->token->blocksize; + if (tpc_skip_ranges(list->token->range, list->token->nrange, + list->offset_into_rod + list->cursectors * dstblock / srcblock, + &srange, &soffset) != 0) { + ctl_set_sense(list->ctsio, /*current_error*/ 1, + /*sense_key*/ SSD_KEY_COPY_ABORTED, + /*asc*/ 0x0d, /*ascq*/ 0x04, SSD_ELEM_NONE); + return (CTL_RETVAL_ERROR); + } + + srclba = scsi_8btou64(list->token->range[srange].lba) + soffset; + numbytes = srcblock * omin(TPC_MAX_IOCHUNK_SIZE / srcblock, + (scsi_4btoul(list->token->range[srange].length) - soffset)); +dstp: + dstlba = scsi_8btou64(list->range[drange].lba) + doffset; + numbytes = omin(numbytes, + dstblock * omin(TPC_MAX_IOCHUNK_SIZE / dstblock, + (scsi_4btoul(list->range[drange].length) - doffset))); + + if (numbytes % srcblock != 0 || numbytes % dstblock != 0) { + ctl_set_sense(list->ctsio, /*current_error*/ 1, + /*sense_key*/ SSD_KEY_COPY_ABORTED, + /*asc*/ 0x26, /*ascq*/ 0x0A, SSD_ELEM_NONE); + return (CTL_RETVAL_ERROR); + } + + list->buf = malloc(numbytes, M_CTL, M_WAITOK | + (list->token == NULL ? M_ZERO : 0)); + list->segbytes = numbytes; + list->segsectors = numbytes / dstblock; +//printf("Copy chunk of %ju sectors from %ju to %ju\n", list->segsectors, +// srclba, dstlba); + donebytes = 0; + TAILQ_INIT(&run); + prun = &run; + list->tbdio = 1; + TAILQ_INIT(&list->allio); + while (donebytes < numbytes) { + roundbytes = MIN(numbytes - donebytes, TPC_MAX_IO_SIZE); + + if (list->token == NULL) { + tior = NULL; + goto dstw; + } + tior = malloc(sizeof(*tior), M_CTL, M_WAITOK | M_ZERO); + TAILQ_INIT(&tior->run); + tior->list = list; + TAILQ_INSERT_TAIL(&list->allio, tior, links); + tior->io = tpcl_alloc_io(); + if (tior->io == NULL) { + list->error = 1; + goto complete; + } + ctl_scsi_read_write(tior->io, + /*data_ptr*/ &list->buf[donebytes], + /*data_len*/ roundbytes, + /*read_op*/ 1, + /*byte2*/ 0, + /*minimum_cdb_size*/ 0, + /*lba*/ srclba + donebytes / srcblock, + /*num_blocks*/ roundbytes / srcblock, + /*tag_type*/ CTL_TAG_SIMPLE, + /*control*/ 0); + tior->io->io_hdr.retries = 3; + tior->lun = list->token->lun; + tior->io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = tior; + +dstw: + tiow = malloc(sizeof(*tiow), M_CTL, M_WAITOK | M_ZERO); + TAILQ_INIT(&tiow->run); + tiow->list = list; + TAILQ_INSERT_TAIL(&list->allio, tiow, links); + tiow->io = tpcl_alloc_io(); + if (tiow->io == NULL) { + list->error = 1; + goto complete; + } + ctl_scsi_read_write(tiow->io, + /*data_ptr*/ &list->buf[donebytes], + /*data_len*/ roundbytes, + /*read_op*/ 0, + /*byte2*/ 0, + /*minimum_cdb_size*/ 0, + /*lba*/ dstlba + donebytes / dstblock, + /*num_blocks*/ roundbytes / dstblock, + /*tag_type*/ CTL_TAG_SIMPLE, + /*control*/ 0); + tiow->io->io_hdr.retries = 3; + tiow->lun = list->lun->lun; + tiow->io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = tiow; + + if (tior) { + TAILQ_INSERT_TAIL(&tior->run, tiow, rlinks); + TAILQ_INSERT_TAIL(prun, tior, rlinks); + prun = &tior->run; + } else { + TAILQ_INSERT_TAIL(prun, tiow, rlinks); + prun = &tiow->run; + } + donebytes += roundbytes; + } + + while ((tior = TAILQ_FIRST(&run)) != NULL) { + TAILQ_REMOVE(&run, tior, rlinks); + if (tpcl_queue(tior->io, tior->lun) != CTL_RETVAL_COMPLETE) + panic("tpcl_queue() error"); + } + + list->stage++; + return (CTL_RETVAL_QUEUED); +} + static void tpc_process(struct tpc_list *list) { @@ -909,33 +1270,43 @@ tpc_process(struct tpc_list *list) struct ctl_scsiio *ctsio = list->ctsio; int retval = CTL_RETVAL_COMPLETE; -//printf("ZZZ %d cscd, %d segs\n", list->ncscd, list->nseg); - while (list->curseg < list->nseg) { - seg = list->seg[list->curseg]; - switch (seg->type_code) { - case EC_SEG_B2B: - retval = tpc_process_b2b(list); - break; - case EC_SEG_VERIFY: - retval = tpc_process_verify(list); - break; - case EC_SEG_REGISTER_KEY: - retval = tpc_process_register_key(list); - break; - default: - ctl_set_sense(ctsio, /*current_error*/ 1, - /*sense_key*/ SSD_KEY_COPY_ABORTED, - /*asc*/ 0x26, /*ascq*/ 0x09, SSD_ELEM_NONE); - goto done; - } + if (list->service_action == EC_WUT) { + retval = tpc_process_wut(list); if (retval == CTL_RETVAL_QUEUED) return; if (retval == CTL_RETVAL_ERROR) { list->error = 1; goto done; } - list->curseg++; - list->stage = 0; + } else { +//printf("ZZZ %d cscd, %d segs\n", list->ncscd, list->nseg); + while (list->curseg < list->nseg) { + seg = list->seg[list->curseg]; + switch (seg->type_code) { + case EC_SEG_B2B: + retval = tpc_process_b2b(list); + break; + case EC_SEG_VERIFY: + retval = tpc_process_verify(list); + break; + case EC_SEG_REGISTER_KEY: + retval = tpc_process_register_key(list); + break; + default: + ctl_set_sense(ctsio, /*current_error*/ 1, + /*sense_key*/ SSD_KEY_COPY_ABORTED, + /*asc*/ 0x26, /*ascq*/ 0x09, SSD_ELEM_NONE); + goto done; + } + if (retval == CTL_RETVAL_QUEUED) + return; + if (retval == CTL_RETVAL_ERROR) { + list->error = 1; + goto done; + } + list->curseg++; + list->stage = 0; + } } ctl_set_success(ctsio); @@ -944,12 +1315,20 @@ done: //printf("ZZZ done\n"); free(list->params, M_CTL); list->params = NULL; + if (list->token) { + mtx_lock(&control_softc->ctl_lock); + if (--list->token->active == 0) + list->token->last_active = time_uptime; + mtx_unlock(&control_softc->ctl_lock); + list->token = NULL; + } mtx_lock(&lun->lun_lock); if ((list->flags & EC_LIST_ID_USAGE_MASK) == EC_LIST_ID_USAGE_NONE) { TAILQ_REMOVE(&lun->tpc_lists, list, links); free(list, M_CTL); } else { list->completed = 1; + list->last_active = time_uptime; list->sense_data = ctsio->sense_data; list->sense_len = ctsio->sense_len; list->scsi_status = ctsio->scsi_status; @@ -1361,3 +1740,455 @@ done: return (CTL_RETVAL_COMPLETE); } +static void +tpc_create_token(struct ctl_lun *lun, struct ctl_port *port, off_t len, + struct scsi_token *token) +{ + static int id = 0; + struct scsi_vpd_id_descriptor *idd = NULL; + int targid_len; + + scsi_ulto4b(ROD_TYPE_AUR, token->type); + scsi_ulto2b(0x01f8, token->length); + scsi_u64to8b(atomic_fetchadd_int(&id, 1), &token->body[0]); + if (lun->lun_devid) + idd = scsi_get_devid_desc((struct scsi_vpd_id_descriptor *) + lun->lun_devid->data, lun->lun_devid->len, + scsi_devid_is_lun_naa); + if (idd == NULL && lun->lun_devid) + idd = scsi_get_devid_desc((struct scsi_vpd_id_descriptor *) + lun->lun_devid->data, lun->lun_devid->len, + scsi_devid_is_lun_eui64); + if (idd != NULL) + memcpy(&token->body[8], idd, 4 + idd->length); + scsi_u64to8b(0, &token->body[40]); + scsi_u64to8b(len, &token->body[48]); + if (port->target_devid) { + targid_len = port->target_devid->len; + memcpy(&token->body[120], port->target_devid->data, targid_len); + } else + targid_len = 32; + arc4rand(&token->body[120 + targid_len], 384 - targid_len, 0); +}; + +int +ctl_populate_token(struct ctl_scsiio *ctsio) +{ + struct scsi_populate_token *cdb; + struct scsi_populate_token_data *data; + struct ctl_lun *lun; + struct ctl_port *port; + struct tpc_list *list, *tlist; + struct tpc_token *token; + int len, lendesc; + + CTL_DEBUG_PRINT(("ctl_populate_token\n")); + + lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; + port = control_softc->ctl_ports[ctl_port_idx(ctsio->io_hdr.nexus.targ_port)]; + cdb = (struct scsi_populate_token *)ctsio->cdb; + len = scsi_4btoul(cdb->length); + + if (len < sizeof(struct scsi_populate_token_data) || + len > sizeof(struct scsi_populate_token_data) + + TPC_MAX_SEGS * sizeof(struct scsi_range_desc)) { + ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, /*command*/ 1, + /*field*/ 9, /*bit_valid*/ 0, /*bit*/ 0); + goto done; + } + + /* + * If we've got a kernel request that hasn't been malloced yet, + * malloc it and tell the caller the data buffer is here. + */ + if ((ctsio->io_hdr.flags & CTL_FLAG_ALLOCATED) == 0) { + ctsio->kern_data_ptr = malloc(len, M_CTL, M_WAITOK); + ctsio->kern_data_len = len; + ctsio->kern_total_len = len; + ctsio->kern_data_resid = 0; + ctsio->kern_rel_offset = 0; + ctsio->kern_sg_entries = 0; + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; + ctsio->be_move_done = ctl_config_move_done; + ctl_datamove((union ctl_io *)ctsio); + + return (CTL_RETVAL_COMPLETE); + } + + data = (struct scsi_populate_token_data *)ctsio->kern_data_ptr; + lendesc = scsi_2btoul(data->range_descriptor_length); + if (len < sizeof(struct scsi_populate_token_data) + lendesc) { + ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, /*command*/ 0, + /*field*/ 2, /*bit_valid*/ 0, /*bit*/ 0); + goto done; + } +/* + printf("PT(list=%u) flags=%x to=%d rt=%x len=%x\n", + scsi_4btoul(cdb->list_identifier), + data->flags, scsi_4btoul(data->inactivity_timeout), + scsi_4btoul(data->rod_type), + scsi_2btoul(data->range_descriptor_length)); +*/ + if ((data->flags & EC_PT_RTV) && + scsi_4btoul(data->rod_type) != ROD_TYPE_AUR) { + ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, /*command*/ 0, + /*field*/ 8, /*bit_valid*/ 0, /*bit*/ 0); + goto done; + } + + list = malloc(sizeof(struct tpc_list), M_CTL, M_WAITOK | M_ZERO); + list->service_action = cdb->service_action; + list->init_port = ctsio->io_hdr.nexus.targ_port; + list->init_idx = ctl_get_resindex(&ctsio->io_hdr.nexus); + list->list_id = scsi_4btoul(cdb->list_identifier); + list->flags = data->flags; + list->ctsio = ctsio; + list->lun = lun; + mtx_lock(&lun->lun_lock); + tlist = tpc_find_list(lun, list->list_id, list->init_idx); + if (tlist != NULL && !tlist->completed) { + mtx_unlock(&lun->lun_lock); + free(list, M_CTL); + ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, + /*command*/ 0, /*field*/ 0, /*bit_valid*/ 0, + /*bit*/ 0); + goto done; + } + if (tlist != NULL) { + TAILQ_REMOVE(&lun->tpc_lists, tlist, links); + free(tlist, M_CTL); + } + TAILQ_INSERT_TAIL(&lun->tpc_lists, list, links); + mtx_unlock(&lun->lun_lock); + + token = malloc(sizeof(*token), M_CTL, M_WAITOK | M_ZERO); + token->lun = lun->lun; + token->blocksize = lun->be_lun->blocksize; + token->params = ctsio->kern_data_ptr; + token->range = &data->desc[0]; + token->nrange = scsi_2btoul(data->range_descriptor_length) / + sizeof(struct scsi_range_desc); + tpc_create_token(lun, port, list->curbytes, + (struct scsi_token *)token->token); + token->active = 0; + token->last_active = time_uptime; + token->timeout = scsi_4btoul(data->inactivity_timeout); + if (token->timeout == 0) + token->timeout = TPC_DFL_TOKEN_TIMEOUT; + else if (token->timeout < TPC_MIN_TOKEN_TIMEOUT) + token->timeout = TPC_MIN_TOKEN_TIMEOUT; + else if (token->timeout > TPC_MAX_TOKEN_TIMEOUT) { + ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, + /*command*/ 0, /*field*/ 4, /*bit_valid*/ 0, + /*bit*/ 0); + } + memcpy(list->res_token, token->token, sizeof(list->res_token)); + list->res_token_valid = 1; + list->cursectors = tpc_ranges_length(token->range, token->nrange); + list->curbytes = (off_t)list->cursectors * lun->be_lun->blocksize; + list->curseg = 0; + list->completed = 1; + list->last_active = time_uptime; + mtx_lock(&control_softc->ctl_lock); + TAILQ_INSERT_TAIL(&control_softc->tpc_tokens, token, links); + mtx_unlock(&control_softc->ctl_lock); + ctl_set_success(ctsio); + ctl_done((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); + +done: + if (ctsio->io_hdr.flags & CTL_FLAG_ALLOCATED) + free(ctsio->kern_data_ptr, M_CTL); + ctl_done((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); +} + +int +ctl_write_using_token(struct ctl_scsiio *ctsio) +{ + struct scsi_write_using_token *cdb; + struct scsi_write_using_token_data *data; + struct ctl_lun *lun; + struct tpc_list *list, *tlist; + struct tpc_token *token; + int len, lendesc; + + CTL_DEBUG_PRINT(("ctl_write_using_token\n")); + + lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; + cdb = (struct scsi_write_using_token *)ctsio->cdb; + len = scsi_4btoul(cdb->length); + + if (len < sizeof(struct scsi_populate_token_data) || + len > sizeof(struct scsi_populate_token_data) + + TPC_MAX_SEGS * sizeof(struct scsi_range_desc)) { + ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, /*command*/ 1, + /*field*/ 9, /*bit_valid*/ 0, /*bit*/ 0); + goto done; + } + + /* + * If we've got a kernel request that hasn't been malloced yet, + * malloc it and tell the caller the data buffer is here. + */ + if ((ctsio->io_hdr.flags & CTL_FLAG_ALLOCATED) == 0) { + ctsio->kern_data_ptr = malloc(len, M_CTL, M_WAITOK); + ctsio->kern_data_len = len; + ctsio->kern_total_len = len; + ctsio->kern_data_resid = 0; + ctsio->kern_rel_offset = 0; + ctsio->kern_sg_entries = 0; + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; + ctsio->be_move_done = ctl_config_move_done; + ctl_datamove((union ctl_io *)ctsio); + + return (CTL_RETVAL_COMPLETE); + } + + data = (struct scsi_write_using_token_data *)ctsio->kern_data_ptr; + lendesc = scsi_2btoul(data->range_descriptor_length); + if (len < sizeof(struct scsi_populate_token_data) + lendesc) { + ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, /*command*/ 0, + /*field*/ 2, /*bit_valid*/ 0, /*bit*/ 0); + goto done; + } +/* + printf("WUT(list=%u) flags=%x off=%ju len=%x\n", + scsi_4btoul(cdb->list_identifier), + data->flags, scsi_8btou64(data->offset_into_rod), + scsi_2btoul(data->range_descriptor_length)); +*/ + list = malloc(sizeof(struct tpc_list), M_CTL, M_WAITOK | M_ZERO); + list->service_action = cdb->service_action; + list->init_port = ctsio->io_hdr.nexus.targ_port; + list->init_idx = ctl_get_resindex(&ctsio->io_hdr.nexus); + list->list_id = scsi_4btoul(cdb->list_identifier); + list->flags = data->flags; + list->params = ctsio->kern_data_ptr; + list->range = &data->desc[0]; + list->nrange = scsi_2btoul(data->range_descriptor_length) / + sizeof(struct scsi_range_desc); + list->offset_into_rod = scsi_8btou64(data->offset_into_rod); + list->ctsio = ctsio; + list->lun = lun; + mtx_lock(&lun->lun_lock); + tlist = tpc_find_list(lun, list->list_id, list->init_idx); + if (tlist != NULL && !tlist->completed) { + mtx_unlock(&lun->lun_lock); + free(list, M_CTL); + ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, + /*command*/ 0, /*field*/ 0, /*bit_valid*/ 0, + /*bit*/ 0); + goto done; + } + if (tlist != NULL) { + TAILQ_REMOVE(&lun->tpc_lists, tlist, links); + free(tlist, M_CTL); + } + TAILQ_INSERT_TAIL(&lun->tpc_lists, list, links); + mtx_unlock(&lun->lun_lock); + + /* Block device zero ROD token -> no token. */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From mav at FreeBSD.org Sun Aug 17 18:23:44 2014 From: mav at FreeBSD.org (Alexander Motin) Date: Sun, 17 Aug 2014 18:23:43 +0000 (UTC) Subject: svn commit: r270107 - stable/10/sys/cam/ctl Message-ID: <201408171823.s7HINhjt049553@svn.freebsd.org> Author: mav Date: Sun Aug 17 18:23:43 2014 New Revision: 270107 URL: http://svnweb.freebsd.org/changeset/base/270107 Log: MFC r269587: Reimplement WRITE USING TOKEN with Block Zero token using WRITE SAME. On my ZVOL of SSDs that increases speed of zero writing in that way from 1 to 2.5GB/s by reducing CPU overhead. Modified: stable/10/sys/cam/ctl/ctl_tpc.c stable/10/sys/cam/ctl/ctl_util.c stable/10/sys/cam/ctl/ctl_util.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_tpc.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_tpc.c Sun Aug 17 18:22:42 2014 (r270106) +++ stable/10/sys/cam/ctl/ctl_tpc.c Sun Aug 17 18:23:43 2014 (r270107) @@ -828,11 +828,10 @@ complete: /*sense_key*/ SSD_KEY_COPY_ABORTED, /*asc*/ 0x0d, /*ascq*/ 0x01, SSD_ELEM_NONE); return (CTL_RETVAL_ERROR); - } else { - list->cursectors += list->segsectors; - list->curbytes += list->segbytes; - return (CTL_RETVAL_COMPLETE); } + list->cursectors += list->segsectors; + list->curbytes += list->segbytes; + return (CTL_RETVAL_COMPLETE); } TAILQ_INIT(&list->allio); @@ -1141,14 +1140,6 @@ complete: return (CTL_RETVAL_COMPLETE); dstblock = list->lun->be_lun->blocksize; - /* Special case: no token == Block device zero ROD token */ - if (list->token == NULL) { - srcblock = 1; - srclba = 0; - numbytes = INT64_MAX; - goto dstp; - } - /* Check where we are on source ranges list. */ srcblock = list->token->blocksize; if (tpc_skip_ranges(list->token->range, list->token->nrange, @@ -1163,7 +1154,6 @@ complete: srclba = scsi_8btou64(list->token->range[srange].lba) + soffset; numbytes = srcblock * omin(TPC_MAX_IOCHUNK_SIZE / srcblock, (scsi_4btoul(list->token->range[srange].length) - soffset)); -dstp: dstlba = scsi_8btou64(list->range[drange].lba) + doffset; numbytes = omin(numbytes, dstblock * omin(TPC_MAX_IOCHUNK_SIZE / dstblock, @@ -1190,10 +1180,6 @@ dstp: while (donebytes < numbytes) { roundbytes = MIN(numbytes - donebytes, TPC_MAX_IO_SIZE); - if (list->token == NULL) { - tior = NULL; - goto dstw; - } tior = malloc(sizeof(*tior), M_CTL, M_WAITOK | M_ZERO); TAILQ_INIT(&tior->run); tior->list = list; @@ -1217,7 +1203,6 @@ dstp: tior->lun = list->token->lun; tior->io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = tior; -dstw: tiow = malloc(sizeof(*tiow), M_CTL, M_WAITOK | M_ZERO); TAILQ_INIT(&tiow->run); tiow->list = list; @@ -1241,14 +1226,9 @@ dstw: tiow->lun = list->lun->lun; tiow->io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = tiow; - if (tior) { - TAILQ_INSERT_TAIL(&tior->run, tiow, rlinks); - TAILQ_INSERT_TAIL(prun, tior, rlinks); - prun = &tior->run; - } else { - TAILQ_INSERT_TAIL(prun, tiow, rlinks); - prun = &tiow->run; - } + TAILQ_INSERT_TAIL(&tior->run, tiow, rlinks); + TAILQ_INSERT_TAIL(prun, tior, rlinks); + prun = &tior->run; donebytes += roundbytes; } @@ -1262,6 +1242,89 @@ dstw: return (CTL_RETVAL_QUEUED); } +static int +tpc_process_zero_wut(struct tpc_list *list) +{ + struct tpc_io *tio, *tiow; + struct runl run, *prun; + int r; + uint32_t dstblock, len; + + if (list->stage > 0) { +complete: + /* Cleanup after previous rounds. */ + while ((tio = TAILQ_FIRST(&list->allio)) != NULL) { + TAILQ_REMOVE(&list->allio, tio, links); + ctl_free_io(tio->io); + free(tio, M_CTL); + } + free(list->buf, M_CTL); + if (list->abort) { + ctl_set_task_aborted(list->ctsio); + return (CTL_RETVAL_ERROR); + } else if (list->error) { + ctl_set_sense(list->ctsio, /*current_error*/ 1, + /*sense_key*/ SSD_KEY_COPY_ABORTED, + /*asc*/ 0x0d, /*ascq*/ 0x01, SSD_ELEM_NONE); + return (CTL_RETVAL_ERROR); + } + list->cursectors += list->segsectors; + list->curbytes += list->segbytes; + return (CTL_RETVAL_COMPLETE); + } + + dstblock = list->lun->be_lun->blocksize; + list->buf = malloc(dstblock, M_CTL, M_WAITOK | M_ZERO); + TAILQ_INIT(&run); + prun = &run; + list->tbdio = 1; + TAILQ_INIT(&list->allio); + list->segsectors = 0; + for (r = 0; r < list->nrange; r++) { + len = scsi_4btoul(list->range[r].length); + if (len == 0) + continue; + + tiow = malloc(sizeof(*tiow), M_CTL, M_WAITOK | M_ZERO); + TAILQ_INIT(&tiow->run); + tiow->list = list; + TAILQ_INSERT_TAIL(&list->allio, tiow, links); + tiow->io = tpcl_alloc_io(); + if (tiow->io == NULL) { + list->error = 1; + goto complete; + } + ctl_scsi_write_same(tiow->io, + /*data_ptr*/ list->buf, + /*data_len*/ dstblock, + /*byte2*/ 0, + /*lba*/ scsi_8btou64(list->range[r].lba), + /*num_blocks*/ len, + /*tag_type*/ CTL_TAG_SIMPLE, + /*control*/ 0); + tiow->io->io_hdr.retries = 3; + tiow->lun = list->lun->lun; + tiow->io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = tiow; + + TAILQ_INSERT_TAIL(prun, tiow, rlinks); + prun = &tiow->run; + list->segsectors += len; + } + list->segbytes = list->segsectors * dstblock; + + if (TAILQ_EMPTY(&run)) + goto complete; + + while ((tiow = TAILQ_FIRST(&run)) != NULL) { + TAILQ_REMOVE(&run, tiow, rlinks); + if (tpcl_queue(tiow->io, tiow->lun) != CTL_RETVAL_COMPLETE) + panic("tpcl_queue() error"); + } + + list->stage++; + return (CTL_RETVAL_QUEUED); +} + static void tpc_process(struct tpc_list *list) { @@ -1271,7 +1334,10 @@ tpc_process(struct tpc_list *list) int retval = CTL_RETVAL_COMPLETE; if (list->service_action == EC_WUT) { - retval = tpc_process_wut(list); + if (list->token != NULL) + retval = tpc_process_wut(list); + else + retval = tpc_process_zero_wut(list); if (retval == CTL_RETVAL_QUEUED) return; if (retval == CTL_RETVAL_ERROR) { Modified: stable/10/sys/cam/ctl/ctl_util.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_util.c Sun Aug 17 18:22:42 2014 (r270106) +++ stable/10/sys/cam/ctl/ctl_util.c Sun Aug 17 18:23:43 2014 (r270107) @@ -345,6 +345,37 @@ ctl_scsi_read_write(union ctl_io *io, ui } void +ctl_scsi_write_same(union ctl_io *io, uint8_t *data_ptr, uint32_t data_len, + uint8_t byte2, uint64_t lba, uint32_t num_blocks, + ctl_tag_type tag_type, uint8_t control) +{ + struct ctl_scsiio *ctsio; + struct scsi_write_same_16 *cdb; + + ctl_scsi_zero_io(io); + + io->io_hdr.io_type = CTL_IO_SCSI; + ctsio = &io->scsiio; + ctsio->cdb_len = sizeof(*cdb); + cdb = (struct scsi_write_same_16 *)ctsio->cdb; + cdb->opcode = WRITE_SAME_16; + cdb->byte2 = byte2; + scsi_u64to8b(lba, cdb->addr); + scsi_ulto4b(num_blocks, cdb->length); + cdb->group = 0; + cdb->control = control; + + io->io_hdr.io_type = CTL_IO_SCSI; + io->io_hdr.flags = CTL_FLAG_DATA_OUT; + ctsio->tag_type = tag_type; + ctsio->ext_data_ptr = data_ptr; + ctsio->ext_data_len = data_len; + ctsio->ext_sg_entries = 0; + ctsio->ext_data_filled = 0; + ctsio->sense_len = SSD_FULL_SIZE; +} + +void ctl_scsi_read_capacity(union ctl_io *io, uint8_t *data_ptr, uint32_t data_len, uint32_t addr, int reladr, int pmi, ctl_tag_type tag_type, uint8_t control) Modified: stable/10/sys/cam/ctl/ctl_util.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_util.h Sun Aug 17 18:22:42 2014 (r270106) +++ stable/10/sys/cam/ctl/ctl_util.h Sun Aug 17 18:23:43 2014 (r270107) @@ -61,6 +61,10 @@ void ctl_scsi_read_write(union ctl_io *i int minimum_cdb_size, uint64_t lba, uint32_t num_blocks, ctl_tag_type tag_type, uint8_t control); +void ctl_scsi_write_same(union ctl_io *io, uint8_t *data_ptr, + uint32_t data_len, uint8_t byte2, + uint64_t lba, uint32_t num_blocks, + ctl_tag_type tag_type, uint8_t control); void ctl_scsi_read_capacity(union ctl_io *io, uint8_t *data_ptr, uint32_t data_len, uint32_t addr, int reladr, int pmi, ctl_tag_type tag_type, uint8_t control); From mav at FreeBSD.org Sun Aug 17 18:25:01 2014 From: mav at FreeBSD.org (Alexander Motin) Date: Sun, 17 Aug 2014 18:25:00 +0000 (UTC) Subject: svn commit: r270108 - in stable/10/sys/cam: ctl scsi Message-ID: <201408171825.s7HIP0u5049771@svn.freebsd.org> Author: mav Date: Sun Aug 17 18:24:59 2014 New Revision: 270108 URL: http://svnweb.freebsd.org/changeset/base/270108 Log: MFC r269622: Fix several issues and inconsistencies in UNMAP capabilities reporting. This makes Windows 2012 to start using UNMAP on our disks. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_backend_block.c stable/10/sys/cam/ctl/ctl_cmd_table.c stable/10/sys/cam/scsi/scsi_all.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Sun Aug 17 18:23:43 2014 (r270107) +++ stable/10/sys/cam/ctl/ctl.c Sun Aug 17 18:24:59 2014 (r270108) @@ -322,10 +322,10 @@ SYSCTL_INT(_kern_cam_ctl, OID_AUTO, verb /* * Supported pages (0x00), Serial number (0x80), Device ID (0x83), - * SCSI Ports (0x88), Third-party Copy (0x8F), Block limits (0xB0) and - * Logical Block Provisioning (0xB2) + * SCSI Ports (0x88), Third-party Copy (0x8F), Block limits (0xB0), + * Block Device Characteristics (0xB1) and Logical Block Provisioning (0xB2) */ -#define SCSI_EVPD_NUM_SUPPORTED_PAGES 7 +#define SCSI_EVPD_NUM_SUPPORTED_PAGES 8 static void ctl_isc_event_handler(ctl_ha_channel chanel, ctl_ha_event event, int param); @@ -385,6 +385,7 @@ static int ctl_inquiry_evpd_scsi_ports(s int alloc_len); static int ctl_inquiry_evpd_block_limits(struct ctl_scsiio *ctsio, int alloc_len); +static int ctl_inquiry_evpd_bdc(struct ctl_scsiio *ctsio, int alloc_len); static int ctl_inquiry_evpd_lbp(struct ctl_scsiio *ctsio, int alloc_len); static int ctl_inquiry_evpd(struct ctl_scsiio *ctsio); static int ctl_inquiry_std(struct ctl_scsiio *ctsio); @@ -7254,7 +7255,7 @@ ctl_read_capacity_16(struct ctl_scsiio * data->prot_lbppbe = lun->be_lun->pblockexp & SRC16_LBPPBE; scsi_ulto2b(lun->be_lun->pblockoff & SRC16_LALBA_A, data->lalba_lbp); if (lun->be_lun->flags & CTL_LUN_FLAG_UNMAP) - data->lalba_lbp[0] |= SRC16_LBPME; + data->lalba_lbp[0] |= SRC16_LBPME | SRC16_LBPRZ; ctsio->scsi_status = SCSI_STATUS_OK; @@ -9811,8 +9812,10 @@ ctl_inquiry_evpd_supported(struct ctl_sc pages->page_list[4] = SVPD_SCSI_TPC; /* Block limits */ pages->page_list[5] = SVPD_BLOCK_LIMITS; + /* Block Device Characteristics */ + pages->page_list[6] = SVPD_BDC; /* Logical Block Provisioning */ - pages->page_list[6] = SVPD_LBP; + pages->page_list[7] = SVPD_LBP; ctsio->scsi_status = SCSI_STATUS_OK; @@ -10168,6 +10171,12 @@ ctl_inquiry_evpd_block_limits(struct ctl if (lun->be_lun->flags & CTL_LUN_FLAG_UNMAP) { scsi_ulto4b(0xffffffff, bl_ptr->max_unmap_lba_cnt); scsi_ulto4b(0xffffffff, bl_ptr->max_unmap_blk_cnt); + if (lun->be_lun->pblockexp != 0) { + scsi_ulto4b((1 << lun->be_lun->pblockexp), + bl_ptr->opt_unmap_grain); + scsi_ulto4b(0x80000000 | lun->be_lun->pblockoff, + bl_ptr->unmap_grain_align); + } } } scsi_u64to8b(UINT64_MAX, bl_ptr->max_write_same_length); @@ -10181,6 +10190,54 @@ ctl_inquiry_evpd_block_limits(struct ctl } static int +ctl_inquiry_evpd_bdc(struct ctl_scsiio *ctsio, int alloc_len) +{ + struct scsi_vpd_block_device_characteristics *bdc_ptr; + struct ctl_lun *lun; + + lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; + + ctsio->kern_data_ptr = malloc(sizeof(*bdc_ptr), M_CTL, M_WAITOK | M_ZERO); + bdc_ptr = (struct scsi_vpd_block_device_characteristics *)ctsio->kern_data_ptr; + ctsio->kern_sg_entries = 0; + + if (sizeof(*bdc_ptr) < alloc_len) { + ctsio->residual = alloc_len - sizeof(*bdc_ptr); + ctsio->kern_data_len = sizeof(*bdc_ptr); + ctsio->kern_total_len = sizeof(*bdc_ptr); + } else { + ctsio->residual = 0; + ctsio->kern_data_len = alloc_len; + ctsio->kern_total_len = alloc_len; + } + ctsio->kern_data_resid = 0; + ctsio->kern_rel_offset = 0; + ctsio->kern_sg_entries = 0; + + /* + * The control device is always connected. The disk device, on the + * other hand, may not be online all the time. Need to change this + * to figure out whether the disk device is actually online or not. + */ + if (lun != NULL) + bdc_ptr->device = (SID_QUAL_LU_CONNECTED << 5) | + lun->be_lun->lun_type; + else + bdc_ptr->device = (SID_QUAL_LU_OFFLINE << 5) | T_DIRECT; + bdc_ptr->page_code = SVPD_BDC; + scsi_ulto2b(sizeof(*bdc_ptr) - 4, bdc_ptr->page_length); + scsi_ulto2b(SVPD_NON_ROTATING, bdc_ptr->medium_rotation_rate); + bdc_ptr->flags = SVPD_FUAB | SVPD_VBULS; + + ctsio->scsi_status = SCSI_STATUS_OK; + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; + ctsio->be_move_done = ctl_config_move_done; + ctl_datamove((union ctl_io *)ctsio); + + return (CTL_RETVAL_COMPLETE); +} + +static int ctl_inquiry_evpd_lbp(struct ctl_scsiio *ctsio, int alloc_len) { struct scsi_vpd_logical_block_prov *lbp_ptr; @@ -10217,8 +10274,12 @@ ctl_inquiry_evpd_lbp(struct ctl_scsiio * lbp_ptr->device = (SID_QUAL_LU_OFFLINE << 5) | T_DIRECT; lbp_ptr->page_code = SVPD_LBP; - if (lun != NULL && lun->be_lun->flags & CTL_LUN_FLAG_UNMAP) - lbp_ptr->flags = SVPD_LBP_UNMAP | SVPD_LBP_WS16 | SVPD_LBP_WS10; + scsi_ulto2b(sizeof(*lbp_ptr) - 4, lbp_ptr->page_length); + if (lun != NULL && lun->be_lun->flags & CTL_LUN_FLAG_UNMAP) { + lbp_ptr->flags = SVPD_LBP_UNMAP | SVPD_LBP_WS16 | + SVPD_LBP_WS10 | SVPD_LBP_RZ | SVPD_LBP_ANC_SUP; + lbp_ptr->prov_type = SVPD_LBP_RESOURCE; + } ctsio->scsi_status = SCSI_STATUS_OK; ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; @@ -10261,6 +10322,9 @@ ctl_inquiry_evpd(struct ctl_scsiio *ctsi case SVPD_BLOCK_LIMITS: retval = ctl_inquiry_evpd_block_limits(ctsio, alloc_len); break; + case SVPD_BDC: + retval = ctl_inquiry_evpd_bdc(ctsio, alloc_len); + break; case SVPD_LBP: retval = ctl_inquiry_evpd_lbp(ctsio, alloc_len); break; Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Sun Aug 17 18:23:43 2014 (r270107) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Sun Aug 17 18:24:59 2014 (r270108) @@ -1042,8 +1042,8 @@ ctl_be_block_cw_dispatch_ws(struct ctl_b softc = be_lun->softc; lbalen = ARGS(beio->io); - if (lbalen->flags & ~(SWS_LBDATA | SWS_UNMAP) || - (lbalen->flags & SWS_UNMAP && be_lun->unmap == NULL)) { + if (lbalen->flags & ~(SWS_LBDATA | SWS_UNMAP | SWS_ANCHOR) || + (lbalen->flags & (SWS_UNMAP | SWS_ANCHOR) && be_lun->unmap == NULL)) { ctl_free_beio(beio); ctl_set_invalid_field(&io->scsiio, /*sks_valid*/ 1, @@ -1079,7 +1079,7 @@ ctl_be_block_cw_dispatch_ws(struct ctl_b break; } - if (lbalen->flags & SWS_UNMAP) { + if (lbalen->flags & (SWS_UNMAP | SWS_ANCHOR)) { beio->io_offset = lbalen->lba * be_lun->blocksize; beio->io_len = (uint64_t)lbalen->len * be_lun->blocksize; beio->bio_cmd = BIO_DELETE; @@ -1149,7 +1149,7 @@ ctl_be_block_cw_dispatch_unmap(struct ct softc = be_lun->softc; ptrlen = (struct ctl_ptr_len_flags *)&io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; - if (ptrlen->flags != 0 || be_lun->unmap == NULL) { + if ((ptrlen->flags & ~SU_ANCHOR) != 0 || be_lun->unmap == NULL) { ctl_free_beio(beio); ctl_set_invalid_field(&io->scsiio, /*sks_valid*/ 0, Modified: stable/10/sys/cam/ctl/ctl_cmd_table.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_cmd_table.c Sun Aug 17 18:23:43 2014 (r270107) +++ stable/10/sys/cam/ctl/ctl_cmd_table.c Sun Aug 17 18:24:59 2014 (r270108) @@ -785,12 +785,12 @@ const struct ctl_cmd_entry ctl_cmd_table {ctl_write_same, CTL_SERIDX_WRITE, CTL_CMD_FLAG_OK_ON_SLUN | CTL_FLAG_DATA_OUT, CTL_LUN_PAT_WRITE | CTL_LUN_PAT_RANGE, - 10, {0x0a, 0xff, 0xff, 0xff, 0xff, 0, 0xff, 0xff, 0x07}}, + 10, {0x1a, 0xff, 0xff, 0xff, 0xff, 0, 0xff, 0xff, 0x07}}, /* 42 READ SUB-CHANNEL / UNMAP */ {ctl_unmap, CTL_SERIDX_UNMAP, CTL_CMD_FLAG_OK_ON_SLUN | CTL_FLAG_DATA_OUT, CTL_LUN_PAT_WRITE, - 10, {0, 0, 0, 0, 0, 0, 0xff, 0xff, 0x07}}, + 10, {1, 0, 0, 0, 0, 0, 0xff, 0xff, 0x07}}, /* 43 READ TOC/PMA/ATIP */ {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, @@ -1085,7 +1085,7 @@ const struct ctl_cmd_entry ctl_cmd_table {ctl_write_same, CTL_SERIDX_WRITE, CTL_CMD_FLAG_OK_ON_SLUN | CTL_FLAG_DATA_OUT, CTL_LUN_PAT_WRITE | CTL_LUN_PAT_RANGE, - 16, {0x0a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 16, {0x1a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, /* 94 */ Modified: stable/10/sys/cam/scsi/scsi_all.h ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.h Sun Aug 17 18:23:43 2014 (r270107) +++ stable/10/sys/cam/scsi/scsi_all.h Sun Aug 17 18:24:59 2014 (r270108) @@ -2315,6 +2315,27 @@ struct scsi_vpd_block_characteristics }; /* + * Block Device Characteristics VPD Page + */ +struct scsi_vpd_block_device_characteristics +{ + uint8_t device; + uint8_t page_code; +#define SVPD_BDC 0xB1 + uint8_t page_length[2]; + uint8_t medium_rotation_rate[2]; +#define SVPD_NOT_REPORTED 0x0000 +#define SVPD_NON_ROTATING 0x0001 + uint8_t product_type; + uint8_t wab_wac_ff; + uint8_t flags; +#define SVPD_VBULS 0x01 +#define SVPD_FUAB 0x02 +#define SVPD_HAW_ZBC 0x10 + uint8_t reserved[55]; +}; + +/* * Logical Block Provisioning VPD Page based on * T10/1799-D Revision 31 */ From mav at FreeBSD.org Sun Aug 17 18:26:35 2014 From: mav at FreeBSD.org (Alexander Motin) Date: Sun, 17 Aug 2014 18:26:35 +0000 (UTC) Subject: svn commit: r270109 - stable/10/sys/cam/ctl Message-ID: <201408171826.s7HIQZfJ050049@svn.freebsd.org> Author: mav Date: Sun Aug 17 18:26:34 2014 New Revision: 270109 URL: http://svnweb.freebsd.org/changeset/base/270109 Log: MFC r269631: Reduce reported additional INQUIRY data length. sizeof(struct scsi_inquiry_data) of 256 bytes combined with off-by-one error in the changed code gave total INQUIRY data length above 255 bytes, that was maximal INQUIRY length in SPC-2. While SPC-3 increased the maximal length to 64K, at least sg3_utils are still confused by that. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Sun Aug 17 18:24:59 2014 (r270108) +++ stable/10/sys/cam/ctl/ctl.c Sun Aug 17 18:26:34 2014 (r270109) @@ -10464,7 +10464,9 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio */ inq_ptr->response_format = SID_HiSup | 2; - inq_ptr->additional_length = sizeof(*inq_ptr) - 4; + inq_ptr->additional_length = + offsetof(struct scsi_inquiry_data, vendor_specific1) - + (offsetof(struct scsi_inquiry_data, additional_length) + 1); CTL_DEBUG_PRINT(("additional_length = %d\n", inq_ptr->additional_length)); From pfg at freebsd.org Sun Aug 17 19:11:24 2014 From: pfg at freebsd.org (Pedro Giffuni) Date: Sun, 17 Aug 2014 14:11:36 -0500 Subject: svn commit: r270035 - stable/10/lib/libc/stdio In-Reply-To: <53F0F263.7040202@freebsd.org> References: <201408160129.s7G1TojV024013@svn.freebsd.org> <53F0F263.7040202@freebsd.org> Message-ID: <53F0FE68.6080501@freebsd.org> On 08/17/14 13:20, Andrey Chernov wrote: > On 16.08.2014 5:29, Pedro F. Giffuni wrote: >> Author: pfg >> Date: Sat Aug 16 01:29:49 2014 >> New Revision: 270035 >> URL: http://svnweb.freebsd.org/changeset/base/270035 >> >> Log: >> MFC r268924: >> Update fflush(3) to return success on a read-only stream. >> >> This is done for compliance with SUSv3. The changes cause >> no secondary effects in the gnulib tests (we pass them). > ... >> @@ -122,6 +123,12 @@ __sflush(FILE *fp) >> for (; n > 0; n -= t, p += t) { >> t = _swrite(fp, (char *)p, n); >> if (t <= 0) { >> + /* Reset _p and _w. */ >> + if (p > fp->_p) /* Some was written. */ >> + memmove(fp->_p, p, n); >> + fp->_p += n; >> + if ((fp->_flags & (__SLBF | __SNBF)) == 0) >> + fp->_w -= n; >> fp->_flags |= __SERR; >> return (EOF); >> } >> > The description is incomplete. This code also does internal stdio > structure adjustment for partial write. > Oh yes, I forgot about that part. The story is that Apple only does this for EAGAIN but Bruce suggested it should be done for other errors as well. TBH, I wasn't going to merge this change but it seemed consistent to have all the changes that originated from Apple's libc together. Pedro. From rmacklem at FreeBSD.org Sun Aug 17 19:24:27 2014 From: rmacklem at FreeBSD.org (Rick Macklem) Date: Sun, 17 Aug 2014 19:24:27 +0000 (UTC) Subject: svn commit: r270112 - stable/10/usr.sbin/nfsd Message-ID: <201408171924.s7HJORSQ081872@svn.freebsd.org> Author: rmacklem Date: Sun Aug 17 19:24:26 2014 New Revision: 270112 URL: http://svnweb.freebsd.org/changeset/base/270112 Log: MFC: r269788 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. Modified: stable/10/usr.sbin/nfsd/nfsd.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/nfsd/nfsd.8 ============================================================================== --- stable/10/usr.sbin/nfsd/nfsd.8 Sun Aug 17 19:06:26 2014 (r270111) +++ stable/10/usr.sbin/nfsd/nfsd.8 Sun Aug 17 19:24:26 2014 (r270112) @@ -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 dim at FreeBSD.org Sun Aug 17 22:46:37 2014 From: dim at FreeBSD.org (Dimitry Andric) Date: Mon, 18 Aug 2014 00:45:52 +0200 Subject: svn commit: r270099 - in stable: 10/contrib/gcc/config/i386 9/contrib/gcc/config/i386 In-Reply-To: <20140817134509.GA47327@FreeBSD.org> References: <201408171308.s7HD8Fnh099147@svn.freebsd.org> <20140817131942.GA38672@FreeBSD.org> <8CA269F6-BCD2-4E78-947F-682214367F36@FreeBSD.org> <20140817134509.GA47327@FreeBSD.org> Message-ID: <9181921C-43BB-48C9-B63D-7C6F99D7A763@FreeBSD.org> On 17 Aug 2014, at 15:45, Alexey Dokuchaev wrote: > On Sun, Aug 17, 2014 at 03:29:42PM +0200, Dimitry Andric wrote: >> In principle it is applicable, but the same file also has other changes >> in head which were not MFCd, so just MFCing this one commit does not >> make much sense. For example, the earlier cast fixes were part of a >> much larger commit by Pedro Giffuni, adding "experimental support for >> amdfam10/barcelona CPUs": >> >> http://svnweb.freebsd.org/base?view=revision&revision=251212 > > I'm running my stable/8 with Pedro's patches applied, including r251212, > no problems so far (although I don't have recent AMD CPUs to play with). > >> Does it still make sense to backport such experimental changes to an old >> stable branch? Of course I could split off just the changes to >> emmintrin.h, and leave the others out, but then we would have a partial >> MFC. I'm not sure if that is the usual way of doing things... > > Understood. My goal here is to try to keep stable/8 as alive as possible, > since I plan to keep using it beyond its official EOL. Hence, when I see > fixes that potentially help ports to be buildable on it I'd usually ask if > they can be MFCed (when it's easy enough to do). Can you please try this diff [1], which merges most of the stable/9 gcc changes to stable/8? I've ran it through a make universe, and the only failure I got was with the amd64 XENHVM kernel: amd64 XENHVM kernel failed, check _.amd64.XENHVM for deatils but I don't know if this is an expected failure or not. Tinderbox seems to have other trouble with its stable/8 builds. The actual error is: In file included from sys/sys/param.h:86, from sys/compat/ia32/ia32_genassym.c:6: sys/sys/types.h:44:28: error: machine/endian.h: No such file or directory I didn't test any ports yet, though. -Dimitry [1] http://www.andric.com/freebsd/sync-stable8-gcc-with-stable9-1.diff.xz -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 203 bytes Desc: Message signed with OpenPGP using GPGMail URL: From brde at optusnet.com.au Mon Aug 18 01:55:29 2014 From: brde at optusnet.com.au (Bruce Evans) Date: Mon, 18 Aug 2014 11:26:40 +1000 (EST) Subject: svn commit: r270035 - stable/10/lib/libc/stdio In-Reply-To: <53F0FE68.6080501@freebsd.org> References: <201408160129.s7G1TojV024013@svn.freebsd.org> <53F0F263.7040202@freebsd.org> <53F0FE68.6080501@freebsd.org> Message-ID: <20140818102031.C948@besplex.bde.org> On Sun, 17 Aug 2014, Pedro Giffuni wrote: > > On 08/17/14 13:20, Andrey Chernov wrote: >> On 16.08.2014 5:29, Pedro F. Giffuni wrote: >>> Author: pfg >>> Date: Sat Aug 16 01:29:49 2014 >>> New Revision: 270035 >>> URL: http://svnweb.freebsd.org/changeset/base/270035 >>> >>> Log: >>> MFC r268924: >>> Update fflush(3) to return success on a read-only stream. >>> This is done for compliance with SUSv3. The changes cause >>> no secondary effects in the gnulib tests (we pass them). >> ... >>> @@ -122,6 +123,12 @@ __sflush(FILE *fp) >>> for (; n > 0; n -= t, p += t) { >>> t = _swrite(fp, (char *)p, n); >>> if (t <= 0) { >>> + /* Reset _p and _w. */ >>> + if (p > fp->_p) /* Some was written. */ >>> + memmove(fp->_p, p, n); >>> + fp->_p += n; >>> + if ((fp->_flags & (__SLBF | __SNBF)) == 0) >>> + fp->_w -= n; >>> fp->_flags |= __SERR; >>> return (EOF); >>> } >>> >> The description is incomplete. This code also does internal stdio >> structure adjustment for partial write. >> > Oh yes, I forgot about that part. > > The story is that Apple only does this for EAGAIN but Bruce suggested it > should be done for other errors as well. > > TBH, I wasn't going to merge this change but it seemed consistent to have > all the changes that originated from Apple's libc together. The tests for it seem to be missing too. The other errors are mainly EINTR. stdio is almost unusable in the presence of EAGAIN or EINTR. Its philosophy is to treat these as normal errors push the error handling up to the caller, but this means that almost any stdio operation can fail in unexpected ways, and stdio provides no portable way to even classify these errors. Normally in BSD, EINTR rarely happens because at least read() and write() are restarted after interrupts and files with non-blocking i/o are rare. Both using SA_RESTART to stop syscalls being restarted and using O_NONBLOCK are at a lower level than stdio, so applications that use them are mostly on their own. But non-BSD programs have to deal with EINTR (especially POSIX ones where EINTR is not at a lower level than the system), an file descriptors with O_NONBLOCK can be produced by users and enforced on stdio by fdopen() (again in POSIX). POSIX does document EAGAIN and EINTR as extensions of C99 for stdio functions. Non-stdio is difficult to use in the absence of these errors. Signal handling in top(1) is still broken by restarting read(). It used to work in most cases using unsafe signal handling (clean up and exit in the SIGINT handler). It would work with no syscall restarting and safe signal handling (just set a flag in the syscall and check it in the main loop). But FreeBSD has syscall restarting and safe signal handling, so input waits unboundedly for a newline, EOF, or an actual error after receiving a SIGINT (EOF handling is broken too). It seems necessary for _any_ interactive program to turn off syscall restarting around _any_ syscall that might block unboundedly, and then handle the EINTRs that may occur from this. This is nontrivial and not done by most programs. top(1) is relatively easy to fix since it only has about place to change and this place doesn't use stdio. I know too much about this since I once broke a version of stdio to handle EAGAIN internally. Any handling prevents the application seeing the EAGAIN and handling it appropriately. Stdio has no way to know if the application wants to retry immediately, and there is no way to tell it what to do. Spinning retrying EAGAIN in stdio is just better than what an average application will do. Bruce From ache at FreeBSD.org Mon Aug 18 02:13:46 2014 From: ache at FreeBSD.org (Andrey A. Chernov) Date: Mon, 18 Aug 2014 02:13:45 +0000 (UTC) Subject: svn commit: r270120 - in stable/10: contrib/opie contrib/opie/libopie usr.bin/opiekey Message-ID: <201408180213.s7I2Djxe073901@svn.freebsd.org> Author: ache Date: Mon Aug 18 02:13:45 2014 New Revision: 270120 URL: http://svnweb.freebsd.org/changeset/base/270120 Log: MFC: r269806,r269809,r269811,r269810 r269806: 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). r269809: When sha1 support was added, they forget to increase OPIE_HASHNAME_MAX r269811: Last '/' for program name, not first one. r269810: Link otp-sha1 to match real challenge prompt, not otp-sha. PR: 191511 Submitted by: mitsururike at gmail.com (partially, PR 269806) Modified: stable/10/contrib/opie/libopie/challenge.c stable/10/contrib/opie/opie.h stable/10/contrib/opie/opiekey.c stable/10/usr.bin/opiekey/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/opie/libopie/challenge.c ============================================================================== --- stable/10/contrib/opie/libopie/challenge.c Mon Aug 18 01:49:42 2014 (r270119) +++ stable/10/contrib/opie/libopie/challenge.c Mon Aug 18 02:13:45 2014 (r270120) @@ -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: stable/10/contrib/opie/opie.h ============================================================================== --- stable/10/contrib/opie/opie.h Mon Aug 18 01:49:42 2014 (r270119) +++ stable/10/contrib/opie/opie.h Mon Aug 18 02:13:45 2014 (r270120) @@ -69,11 +69,11 @@ 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) */ -#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) Modified: stable/10/contrib/opie/opiekey.c ============================================================================== --- stable/10/contrib/opie/opiekey.c Mon Aug 18 01:49:42 2014 (r270119) +++ stable/10/contrib/opie/opiekey.c Mon Aug 18 02:13:45 2014 (r270120) @@ -144,7 +144,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]; Modified: stable/10/usr.bin/opiekey/Makefile ============================================================================== --- stable/10/usr.bin/opiekey/Makefile Mon Aug 18 01:49:42 2014 (r270119) +++ stable/10/usr.bin/opiekey/Makefile Mon Aug 18 02:13:45 2014 (r270120) @@ -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 ache at FreeBSD.org Mon Aug 18 02:32:49 2014 From: ache at FreeBSD.org (Andrey A. Chernov) Date: Mon, 18 Aug 2014 02:32:49 +0000 (UTC) Subject: svn commit: r270121 - stable/10 Message-ID: <201408180232.s7I2WnOv082657@svn.freebsd.org> Author: ache Date: Mon Aug 18 02:32:48 2014 New Revision: 270121 URL: http://svnweb.freebsd.org/changeset/base/270121 Log: Direct commit to stable/10 reflecting r269815 because rest can't be merged Add otp-sha Modified: stable/10/ObsoleteFiles.inc Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Mon Aug 18 02:13:45 2014 (r270120) +++ stable/10/ObsoleteFiles.inc Mon Aug 18 02:32:48 2014 (r270121) @@ -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 # 20140812: example files removed OLD_FILES+=usr/share/examples/libusb20/aux.c OLD_FILES+=usr/share/examples/libusb20/aux.h From ache at FreeBSD.org Mon Aug 18 02:42:24 2014 From: ache at FreeBSD.org (Andrey A. Chernov) Date: Mon, 18 Aug 2014 02:42:23 +0000 (UTC) Subject: svn commit: r270122 - in stable/10: . lib/libopie Message-ID: <201408180242.s7I2gNaq087095@svn.freebsd.org> Author: ache Date: Mon Aug 18 02:42:23 2014 New Revision: 270122 URL: http://svnweb.freebsd.org/changeset/base/270122 Log: Direct commit to stable/10 reflecting r269961 because the rest can't be merged. Bump version because challenge buffer size changed. Modified: stable/10/ObsoleteFiles.inc stable/10/lib/libopie/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Mon Aug 18 02:32:48 2014 (r270121) +++ stable/10/ObsoleteFiles.inc Mon Aug 18 02:42:23 2014 (r270122) @@ -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: stable/10/lib/libopie/Makefile ============================================================================== --- stable/10/lib/libopie/Makefile Mon Aug 18 02:32:48 2014 (r270121) +++ stable/10/lib/libopie/Makefile Mon Aug 18 02:42:23 2014 (r270122) @@ -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 ache at FreeBSD.org Mon Aug 18 03:06:51 2014 From: ache at FreeBSD.org (Andrey A. Chernov) Date: Mon, 18 Aug 2014 03:06:50 +0000 (UTC) Subject: svn commit: r270125 - stable/10/lib/libpam/modules/pam_opie Message-ID: <201408180306.s7I36oie097678@svn.freebsd.org> Author: ache Date: Mon Aug 18 03:06:49 2014 New Revision: 270125 URL: http://svnweb.freebsd.org/changeset/base/270125 Log: MFC: r269875 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 Modified: stable/10/lib/libpam/modules/pam_opie/pam_opie.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libpam/modules/pam_opie/pam_opie.c ============================================================================== --- stable/10/lib/libpam/modules/pam_opie/pam_opie.c Mon Aug 18 02:45:06 2014 (r270124) +++ stable/10/lib/libpam/modules/pam_opie/pam_opie.c Mon Aug 18 03:06:49 2014 (r270125) @@ -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 delphij at FreeBSD.org Mon Aug 18 05:13:46 2014 From: delphij at FreeBSD.org (Xin LI) Date: Mon, 18 Aug 2014 05:13:46 +0000 (UTC) Subject: svn commit: r270126 - stable/10/cddl/contrib/opensolaris/cmd/ztest Message-ID: <201408180513.s7I5Dk6C054584@svn.freebsd.org> Author: delphij Date: Mon Aug 18 05:13:46 2014 New Revision: 270126 URL: http://svnweb.freebsd.org/changeset/base/270126 Log: MFC r269430: MFV r269426: Double test device size for ztest(1). Illumos issue: 5039 ztest should default to larger device sizes Author: Matthew Ahrens Modified: stable/10/cddl/contrib/opensolaris/cmd/ztest/ztest.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/ztest/ztest.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/ztest/ztest.c Mon Aug 18 03:06:49 2014 (r270125) +++ stable/10/cddl/contrib/opensolaris/cmd/ztest/ztest.c Mon Aug 18 05:13:46 2014 (r270126) @@ -172,7 +172,7 @@ static const ztest_shared_opts_t ztest_o .zo_mirrors = 2, .zo_raidz = 4, .zo_raidz_parity = 1, - .zo_vdev_size = SPA_MINDEVSIZE, + .zo_vdev_size = SPA_MINDEVSIZE * 2, .zo_datasets = 7, .zo_threads = 23, .zo_passtime = 60, /* 60 seconds */ From delphij at FreeBSD.org Mon Aug 18 05:17:25 2014 From: delphij at FreeBSD.org (Xin LI) Date: Mon, 18 Aug 2014 05:17:24 +0000 (UTC) Subject: svn commit: r270127 - in stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys Message-ID: <201408180517.s7I5HOWw055138@svn.freebsd.org> Author: delphij Date: Mon Aug 18 05:17:24 2014 New Revision: 270127 URL: http://svnweb.freebsd.org/changeset/base/270127 Log: MFC r269431: MFV r269427: In dnode_children_t, use C99's "[]" idiom for declaring the variable sized array dnc_children at the end of the structure. This prevents the compiler from mistakenly optimizing away accesses beyond the array's defined size. Illumos issue: 5038 Remove "old-style" flexible array usage in ZFS. Author: Justin T. Gibbs Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Mon Aug 18 05:13:46 2014 (r270126) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Mon Aug 18 05:17:24 2014 (r270127) @@ -1026,7 +1026,7 @@ dnode_buf_pageout(dmu_buf_t *db, void *a dnh->dnh_dnode = NULL; } kmem_free(children_dnodes, sizeof (dnode_children_t) + - (epb - 1) * sizeof (dnode_handle_t)); + epb * sizeof (dnode_handle_t)); } /* @@ -1111,7 +1111,7 @@ dnode_hold_impl(objset_t *os, uint64_t o int i; dnode_children_t *winner; children_dnodes = kmem_zalloc(sizeof (dnode_children_t) + - (epb - 1) * sizeof (dnode_handle_t), KM_SLEEP); + epb * sizeof (dnode_handle_t), KM_SLEEP); children_dnodes->dnc_count = epb; dnh = &children_dnodes->dnc_children[0]; for (i = 0; i < epb; i++) { @@ -1126,7 +1126,7 @@ dnode_hold_impl(objset_t *os, uint64_t o } kmem_free(children_dnodes, sizeof (dnode_children_t) + - (epb - 1) * sizeof (dnode_handle_t)); + epb * sizeof (dnode_handle_t)); children_dnodes = winner; } } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Mon Aug 18 05:13:46 2014 (r270126) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Mon Aug 18 05:17:24 2014 (r270127) @@ -245,7 +245,7 @@ typedef struct dnode_handle { typedef struct dnode_children { size_t dnc_count; /* number of children */ - dnode_handle_t dnc_children[1]; /* sized dynamically */ + dnode_handle_t dnc_children[]; /* sized dynamically */ } dnode_children_t; typedef struct free_range { From delphij at FreeBSD.org Mon Aug 18 05:22:09 2014 From: delphij at FreeBSD.org (Xin LI) Date: Mon, 18 Aug 2014 05:22:09 +0000 (UTC) Subject: svn commit: r270128 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <201408180522.s7I5M9ox059004@svn.freebsd.org> Author: delphij Date: Mon Aug 18 05:22:09 2014 New Revision: 270128 URL: http://svnweb.freebsd.org/changeset/base/270128 Log: MFC r269543: MFV r269542: In vdev_get_stats, check that the vdev is not a hole before computing the fragmentation. This fixes a panic when removing log device. Illumos issue: 5049 panic when removing log device Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Mon Aug 18 05:17:24 2014 (r270127) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Mon Aug 18 05:22:09 2014 (r270128) @@ -2766,8 +2766,9 @@ vdev_get_stats(vdev_t *vd, vdev_stat_t * ? vd->vdev_top->vdev_ashift : vd->vdev_ashift; vs->vs_logical_ashift = vd->vdev_logical_ashift; vs->vs_physical_ashift = vd->vdev_physical_ashift; - if (vd->vdev_aux == NULL && vd == vd->vdev_top) + if (vd->vdev_aux == NULL && vd == vd->vdev_top && !vd->vdev_ishole) { vs->vs_fragmentation = vd->vdev_mg->mg_fragmentation; + } /* * If we're getting stats on the root vdev, aggregate the I/O counts From royger at FreeBSD.org Mon Aug 18 08:50:06 2014 From: royger at FreeBSD.org (Roger Pau Monné) Date: Mon, 18 Aug 2014 08:50:05 +0000 (UTC) Subject: svn commit: r270130 - stable/10/sys/dev/xen/blkfront Message-ID: <201408180850.s7I8o53Q050143@svn.freebsd.org> Author: royger Date: Mon Aug 18 08:50:05 2014 New Revision: 270130 URL: http://svnweb.freebsd.org/changeset/base/270130 Log: MFC r269814: blkfront: add support for unmapped IO Sponsored by: Citrix Systems R&D Tested by: robak PR: 191173 Modified: stable/10/sys/dev/xen/blkfront/blkfront.c Modified: stable/10/sys/dev/xen/blkfront/blkfront.c ============================================================================== --- stable/10/sys/dev/xen/blkfront/blkfront.c Mon Aug 18 08:07:50 2014 (r270129) +++ stable/10/sys/dev/xen/blkfront/blkfront.c Mon Aug 18 08:50:05 2014 (r270130) @@ -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 mav at FreeBSD.org Mon Aug 18 15:54:36 2014 From: mav at FreeBSD.org (Alexander Motin) Date: Mon, 18 Aug 2014 15:54:35 +0000 (UTC) Subject: svn commit: r270136 - stable/10/sys/net Message-ID: <201408181554.s7IFsZOl048875@svn.freebsd.org> Author: mav Date: Mon Aug 18 15:54:35 2014 New Revision: 270136 URL: http://svnweb.freebsd.org/changeset/base/270136 Log: MFC r269492: Improve locking of multicast addresses in VLAN and LAGG interfaces. This fixes several scenarios of reproducible panics, cause by races between multicast address changes and interface destruction. Modified: stable/10/sys/net/if_lagg.c stable/10/sys/net/if_lagg.h stable/10/sys/net/if_vlan.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/if_lagg.c ============================================================================== --- stable/10/sys/net/if_lagg.c Mon Aug 18 14:47:13 2014 (r270135) +++ stable/10/sys/net/if_lagg.c Mon Aug 18 15:54:35 2014 (r270136) @@ -1219,39 +1219,39 @@ lagg_ether_cmdmulti(struct lagg_port *lp struct ifnet *ifp = lp->lp_ifp; struct ifnet *scifp = sc->sc_ifp; struct lagg_mc *mc; - struct ifmultiaddr *ifma, *rifma = NULL; - struct sockaddr_dl sdl; + struct ifmultiaddr *ifma; int error; LAGG_WLOCK_ASSERT(sc); - bzero((char *)&sdl, sizeof(sdl)); - sdl.sdl_len = sizeof(sdl); - sdl.sdl_family = AF_LINK; - sdl.sdl_type = IFT_ETHER; - sdl.sdl_alen = ETHER_ADDR_LEN; - sdl.sdl_index = ifp->if_index; - if (set) { + IF_ADDR_WLOCK(scifp); TAILQ_FOREACH(ifma, &scifp->if_multiaddrs, ifma_link) { if (ifma->ifma_addr->sa_family != AF_LINK) continue; - bcopy(LLADDR((struct sockaddr_dl *)ifma->ifma_addr), - LLADDR(&sdl), ETHER_ADDR_LEN); - - error = if_addmulti(ifp, (struct sockaddr *)&sdl, &rifma); - if (error) - return (error); mc = malloc(sizeof(struct lagg_mc), M_DEVBUF, M_NOWAIT); - if (mc == NULL) + if (mc == NULL) { + IF_ADDR_WUNLOCK(scifp); return (ENOMEM); - mc->mc_ifma = rifma; + } + bcopy(ifma->ifma_addr, &mc->mc_addr, + ifma->ifma_addr->sa_len); + mc->mc_addr.sdl_index = ifp->if_index; + mc->mc_ifma = NULL; SLIST_INSERT_HEAD(&lp->lp_mc_head, mc, mc_entries); } + IF_ADDR_WUNLOCK(scifp); + SLIST_FOREACH (mc, &lp->lp_mc_head, mc_entries) { + error = if_addmulti(ifp, + (struct sockaddr *)&mc->mc_addr, &mc->mc_ifma); + if (error) + return (error); + } } else { while ((mc = SLIST_FIRST(&lp->lp_mc_head)) != NULL) { SLIST_REMOVE(&lp->lp_mc_head, mc, lagg_mc, mc_entries); - if_delmulti_ifma(mc->mc_ifma); + if (mc->mc_ifma && !lp->lp_detaching) + if_delmulti_ifma(mc->mc_ifma); free(mc, M_DEVBUF); } } Modified: stable/10/sys/net/if_lagg.h ============================================================================== --- stable/10/sys/net/if_lagg.h Mon Aug 18 14:47:13 2014 (r270135) +++ stable/10/sys/net/if_lagg.h Mon Aug 18 15:54:35 2014 (r270136) @@ -174,6 +174,7 @@ struct lagg_lb { }; struct lagg_mc { + struct sockaddr_dl mc_addr; struct ifmultiaddr *mc_ifma; SLIST_ENTRY(lagg_mc) mc_entries; }; Modified: stable/10/sys/net/if_vlan.c ============================================================================== --- stable/10/sys/net/if_vlan.c Mon Aug 18 14:47:13 2014 (r270135) +++ stable/10/sys/net/if_vlan.c Mon Aug 18 15:54:35 2014 (r270136) @@ -458,48 +458,48 @@ trunk_destroy(struct ifvlantrunk *trunk) * traffic that it doesn't really want, which ends up being discarded * later by the upper protocol layers. Unfortunately, there's no way * to avoid this: there really is only one physical interface. - * - * XXX: There is a possible race here if more than one thread is - * modifying the multicast state of the vlan interface at the same time. */ static int vlan_setmulti(struct ifnet *ifp) { struct ifnet *ifp_p; - struct ifmultiaddr *ifma, *rifma = NULL; + struct ifmultiaddr *ifma; struct ifvlan *sc; struct vlan_mc_entry *mc; int error; - /*VLAN_LOCK_ASSERT();*/ - /* Find the parent. */ sc = ifp->if_softc; + TRUNK_LOCK_ASSERT(TRUNK(sc)); ifp_p = PARENT(sc); CURVNET_SET_QUIET(ifp_p->if_vnet); /* First, remove any existing filter entries. */ while ((mc = SLIST_FIRST(&sc->vlan_mc_listhead)) != NULL) { - error = if_delmulti(ifp_p, (struct sockaddr *)&mc->mc_addr); - if (error) - return (error); SLIST_REMOVE_HEAD(&sc->vlan_mc_listhead, mc_entries); + (void)if_delmulti(ifp_p, (struct sockaddr *)&mc->mc_addr); free(mc, M_VLAN); } /* Now program new ones. */ + IF_ADDR_WLOCK(ifp); TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { if (ifma->ifma_addr->sa_family != AF_LINK) continue; mc = malloc(sizeof(struct vlan_mc_entry), M_VLAN, M_NOWAIT); - if (mc == NULL) + if (mc == NULL) { + IF_ADDR_WUNLOCK(ifp); return (ENOMEM); + } bcopy(ifma->ifma_addr, &mc->mc_addr, ifma->ifma_addr->sa_len); mc->mc_addr.sdl_index = ifp_p->if_index; SLIST_INSERT_HEAD(&sc->vlan_mc_listhead, mc, mc_entries); + } + IF_ADDR_WUNLOCK(ifp); + SLIST_FOREACH (mc, &sc->vlan_mc_listhead, mc_entries) { error = if_addmulti(ifp_p, (struct sockaddr *)&mc->mc_addr, - &rifma); + NULL); if (error) return (error); } @@ -1372,7 +1372,7 @@ vlan_unconfig_locked(struct ifnet *ifp, * Check if we were the last. */ if (trunk->refcnt == 0) { - trunk->parent->if_vlantrunk = NULL; + parent->if_vlantrunk = NULL; /* * XXXGL: If some ithread has already entered * vlan_input() and is now blocked on the trunk @@ -1566,6 +1566,7 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd struct ifreq *ifr; struct ifaddr *ifa; struct ifvlan *ifv; + struct ifvlantrunk *trunk; struct vlanreq vlr; int error = 0; @@ -1710,8 +1711,12 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd * If we don't have a parent, just remember the membership for * when we do. */ - if (TRUNK(ifv) != NULL) + trunk = TRUNK(ifv); + if (trunk != NULL) { + TRUNK_LOCK(trunk); error = vlan_setmulti(ifp); + TRUNK_UNLOCK(trunk); + } break; default: From mav at FreeBSD.org Mon Aug 18 16:06:06 2014 From: mav at FreeBSD.org (Alexander Motin) Date: Mon, 18 Aug 2014 16:06:04 +0000 (UTC) Subject: svn commit: r270137 - stable/10/usr.sbin/ctld Message-ID: <201408181606.s7IG64eD054219@svn.freebsd.org> Author: mav Date: Mon Aug 18 16:06:04 2014 New Revision: 270137 URL: http://svnweb.freebsd.org/changeset/base/270137 Log: MFC r269183, r269191: Add netmasks support to initiator-portal option. Modified: stable/10/usr.sbin/ctld/ctl.conf.5 stable/10/usr.sbin/ctld/ctld.c stable/10/usr.sbin/ctld/ctld.h stable/10/usr.sbin/ctld/login.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/ctl.conf.5 ============================================================================== --- stable/10/usr.sbin/ctld/ctl.conf.5 Mon Aug 18 15:54:35 2014 (r270136) +++ stable/10/usr.sbin/ctld/ctl.conf.5 Mon Aug 18 16:06:04 2014 (r270137) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 20, 2014 +.Dd July 28, 2014 .Dt CTL.CONF 5 .Os .Sh NAME @@ -119,7 +119,7 @@ name. Otherwise, only initiators with names matching one of defined ones will be allowed to connect. .It Ic initiator-portal Ao Ar address Ac -Specifies iSCSI initiator portal - IPv4 or IPv6 address. +Specifies iSCSI initiator portal - IPv4 or IPv6 address or network. If not defined, there will be no restrictions based on initiator address. Otherwise, only initiators with addresses matching one of defined Modified: stable/10/usr.sbin/ctld/ctld.c ============================================================================== --- stable/10/usr.sbin/ctld/ctld.c Mon Aug 18 15:54:35 2014 (r270136) +++ stable/10/usr.sbin/ctld/ctld.c Mon Aug 18 16:06:04 2014 (r270137) @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -319,14 +320,56 @@ const struct auth_portal * auth_portal_new(struct auth_group *ag, const char *portal) { struct auth_portal *ap; + char *net, *mask, *str, *tmp; + int len, dm, m; ap = calloc(1, sizeof(*ap)); if (ap == NULL) log_err(1, "calloc"); ap->ap_auth_group = ag; ap->ap_initator_portal = checked_strdup(portal); + mask = str = checked_strdup(portal); + net = strsep(&mask, "/"); + if (net[0] == '[') + net++; + len = strlen(net); + if (len == 0) + goto error; + if (net[len - 1] == ']') + net[len - 1] = 0; + if (strchr(net, ':') != NULL) { + struct sockaddr_in6 *sin6 = + (struct sockaddr_in6 *)&ap->ap_sa; + + sin6->sin6_len = sizeof(*sin6); + sin6->sin6_family = AF_INET6; + if (inet_pton(AF_INET6, net, &sin6->sin6_addr) <= 0) + goto error; + dm = 128; + } else { + struct sockaddr_in *sin = + (struct sockaddr_in *)&ap->ap_sa; + + sin->sin_len = sizeof(*sin); + sin->sin_family = AF_INET; + if (inet_pton(AF_INET, net, &sin->sin_addr) <= 0) + goto error; + dm = 32; + } + if (mask != NULL) { + m = strtol(mask, &tmp, 0); + if (m < 0 || m > dm || tmp[0] != 0) + goto error; + } else + m = dm; + ap->ap_mask = m; + free(str); TAILQ_INSERT_TAIL(&ag->ag_portals, ap, ap_next); return (ap); + +error: + log_errx(1, "Incorrect initiator portal '%s'", portal); + return (NULL); } static void @@ -347,13 +390,39 @@ auth_portal_defined(const struct auth_gr } const struct auth_portal * -auth_portal_find(const struct auth_group *ag, const char *portal) +auth_portal_find(const struct auth_group *ag, const struct sockaddr_storage *ss) { - const struct auth_portal *auth_portal; + const struct auth_portal *ap; + const uint8_t *a, *b; + int i; + uint8_t bmask; - TAILQ_FOREACH(auth_portal, &ag->ag_portals, ap_next) { - if (strcmp(auth_portal->ap_initator_portal, portal) == 0) - return (auth_portal); + TAILQ_FOREACH(ap, &ag->ag_portals, ap_next) { + if (ap->ap_sa.ss_family != ss->ss_family) + continue; + if (ss->ss_family == AF_INET) { + a = (const uint8_t *) + &((const struct sockaddr_in *)ss)->sin_addr; + b = (const uint8_t *) + &((const struct sockaddr_in *)&ap->ap_sa)->sin_addr; + } else { + a = (const uint8_t *) + &((const struct sockaddr_in6 *)ss)->sin6_addr; + b = (const uint8_t *) + &((const struct sockaddr_in6 *)&ap->ap_sa)->sin6_addr; + } + for (i = 0; i < ap->ap_mask / 8; i++) { + if (a[i] != b[i]) + goto next; + } + if (ap->ap_mask % 8) { + bmask = 0xff << (8 - (ap->ap_mask % 8)); + if ((a[i] & bmask) != (b[i] & bmask)) + goto next; + } + return (ap); +next: + ; } return (NULL); @@ -950,7 +1019,8 @@ lun_option_set(struct lun_option *lo, co } static struct connection * -connection_new(struct portal *portal, int fd, const char *host) +connection_new(struct portal *portal, int fd, const char *host, + const struct sockaddr *client_sa) { struct connection *conn; @@ -960,6 +1030,7 @@ connection_new(struct portal *portal, in conn->conn_portal = portal; conn->conn_socket = fd; conn->conn_initiator_addr = checked_strdup(host); + memcpy(&conn->conn_initiator_sa, client_sa, client_sa->sa_len); /* * Default values, from RFC 3720, section 12. @@ -1586,7 +1657,7 @@ wait_for_children(bool block) static void handle_connection(struct portal *portal, int fd, - const struct sockaddr *client_sa, socklen_t client_salen, bool dont_fork) + const struct sockaddr *client_sa, bool dont_fork) { struct connection *conn; int error; @@ -1621,7 +1692,7 @@ handle_connection(struct portal *portal, } pidfile_close(conf->conf_pidfh); - error = getnameinfo(client_sa, client_salen, + error = getnameinfo(client_sa, client_sa->sa_len, host, sizeof(host), NULL, 0, NI_NUMERICHOST); if (error != 0) log_errx(1, "getnameinfo: %s", gai_strerror(error)); @@ -1631,7 +1702,7 @@ handle_connection(struct portal *portal, log_set_peer_addr(host); setproctitle("%s", host); - conn = connection_new(portal, fd, host); + conn = connection_new(portal, fd, host, client_sa); set_timeout(conf); kernel_capsicate(); login(conn); @@ -1687,6 +1758,9 @@ main_loop(struct conf *conf, bool dont_f client_salen = sizeof(client_sa); kernel_accept(&connection_id, &portal_id, (struct sockaddr *)&client_sa, &client_salen); + if (client_salen < client_sa.ss_len) + log_errx(1, "salen %u < %u", + client_salen, client_sa.ss_len); log_debugx("incoming connection, id %d, portal id %d", connection_id, portal_id); @@ -1703,8 +1777,7 @@ main_loop(struct conf *conf, bool dont_f found: handle_connection(portal, connection_id, - (struct sockaddr *)&client_sa, client_salen, - dont_fork); + (struct sockaddr *)&client_sa, dont_fork); } else { #endif assert(proxy_mode == false); @@ -1731,9 +1804,13 @@ found: &client_salen); if (client_fd < 0) log_err(1, "accept"); + if (client_salen < client_sa.ss_len) + log_errx(1, "salen %u < %u", + client_salen, + client_sa.ss_len); handle_connection(portal, client_fd, (struct sockaddr *)&client_sa, - client_salen, dont_fork); + dont_fork); break; } } Modified: stable/10/usr.sbin/ctld/ctld.h ============================================================================== --- stable/10/usr.sbin/ctld/ctld.h Mon Aug 18 15:54:35 2014 (r270136) +++ stable/10/usr.sbin/ctld/ctld.h Mon Aug 18 16:06:04 2014 (r270137) @@ -35,8 +35,8 @@ #include #ifdef ICL_KERNEL_PROXY #include -#include #endif +#include #include #include @@ -67,6 +67,8 @@ struct auth_portal { TAILQ_ENTRY(auth_portal) ap_next; struct auth_group *ap_auth_group; char *ap_initator_portal; + struct sockaddr_storage ap_sa; + int ap_mask; }; #define AG_TYPE_UNKNOWN 0 @@ -179,6 +181,7 @@ struct connection { char *conn_initiator_addr; char *conn_initiator_alias; uint8_t conn_initiator_isid[6]; + struct sockaddr_storage conn_initiator_sa; uint32_t conn_cmdsn; uint32_t conn_statsn; size_t conn_max_data_segment_length; @@ -235,7 +238,7 @@ const struct auth_portal *auth_portal_ne const char *initiator_portal); bool auth_portal_defined(const struct auth_group *ag); const struct auth_portal *auth_portal_find(const struct auth_group *ag, - const char *initiator_portal); + const struct sockaddr_storage *sa); struct portal_group *portal_group_new(struct conf *conf, const char *name); void portal_group_delete(struct portal_group *pg); Modified: stable/10/usr.sbin/ctld/login.c ============================================================================== --- stable/10/usr.sbin/ctld/login.c Mon Aug 18 15:54:35 2014 (r270136) +++ stable/10/usr.sbin/ctld/login.c Mon Aug 18 16:06:04 2014 (r270137) @@ -954,7 +954,7 @@ login(struct connection *conn) } if (auth_portal_defined(ag)) { - if (auth_portal_find(ag, conn->conn_initiator_addr) == NULL) { + if (auth_portal_find(ag, &conn->conn_initiator_sa) == NULL) { login_send_error(request, 0x02, 0x02); log_errx(1, "initiator does not match allowed " "initiator portals"); From pfg at freebsd.org Mon Aug 18 19:27:33 2014 From: pfg at freebsd.org (Pedro Giffuni) Date: Mon, 18 Aug 2014 14:27:21 -0500 Subject: svn commit: r270099 - in stable: 10/contrib/gcc/config/i386 9/contrib/gcc/config/i386 In-Reply-To: <9181921C-43BB-48C9-B63D-7C6F99D7A763@FreeBSD.org> References: <201408171308.s7HD8Fnh099147@svn.freebsd.org> <20140817131942.GA38672@FreeBSD.org> <8CA269F6-BCD2-4E78-947F-682214367F36@FreeBSD.org> <20140817134509.GA47327@FreeBSD.org> <9181921C-43BB-48C9-B63D-7C6F99D7A763@FreeBSD.org> Message-ID: <53F25399.40204@freebsd.org> Hello; On 08/17/14 17:45, Dimitry Andric wrote: > On 17 Aug 2014, at 15:45, Alexey Dokuchaev wrote: >> On Sun, Aug 17, 2014 at 03:29:42PM +0200, Dimitry Andric wrote: >>> In principle it is applicable, but the same file also has other changes >>> in head which were not MFCd, so just MFCing this one commit does not >>> make much sense. For example, the earlier cast fixes were part of a >>> much larger commit by Pedro Giffuni, adding "experimental support for >>> amdfam10/barcelona CPUs": >>> >>> http://svnweb.freebsd.org/base?view=revision&revision=251212 >> I'm running my stable/8 with Pedro's patches applied, including r251212, >> no problems so far (although I don't have recent AMD CPUs to play with). >> >>> Does it still make sense to backport such experimental changes to an old >>> stable branch? Of course I could split off just the changes to >>> emmintrin.h, and leave the others out, but then we would have a partial >>> MFC. I'm not sure if that is the usual way of doing things... >> Understood. My goal here is to try to keep stable/8 as alive as possible, >> since I plan to keep using it beyond its official EOL. Hence, when I see >> fixes that potentially help ports to be buildable on it I'd usually ask if >> they can be MFCed (when it's easy enough to do). FWIW, I recall the AMD patch was developed on stable/8 and should be safe to merge. You still need have to teach the build system about the new CPUs (that was a different change that I didn't do) but it should work. I personally stopped merging stuff to the stable/8 branch and more recently to the stable/9 branch as I don't run those anymore. In the case of the stable/8 branch I find the ancient version of binutils a real threat/limitation. I would really suggest people move on to at least stable/9 which has all the clang cleanups and should be functionally much better. Pedro. > Can you please try this diff [1], which merges most of the stable/9 gcc > changes to stable/8? I've ran it through a make universe, and the only > failure I got was with the amd64 XENHVM kernel: > > amd64 XENHVM kernel failed, check _.amd64.XENHVM for deatils > > but I don't know if this is an expected failure or not. Tinderbox seems > to have other trouble with its stable/8 builds. The actual error is: > > In file included from sys/sys/param.h:86, > from sys/compat/ia32/ia32_genassym.c:6: > sys/sys/types.h:44:28: error: machine/endian.h: No such file or directory > > I didn't test any ports yet, though. > > -Dimitry > > [1] http://www.andric.com/freebsd/sync-stable8-gcc-with-stable9-1.diff.xz > From asomers at FreeBSD.org Mon Aug 18 20:21:13 2014 From: asomers at FreeBSD.org (Alan Somers) Date: Mon, 18 Aug 2014 20:21:12 +0000 (UTC) Subject: svn commit: r270150 - stable/10/bin/pkill/tests Message-ID: <201408182021.s7IKLCbd073240@svn.freebsd.org> Author: asomers Date: Mon Aug 18 20:21:12 2014 New Revision: 270150 URL: http://svnweb.freebsd.org/changeset/base/270150 Log: MFC r269977 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. Modified: stable/10/bin/pkill/tests/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/pkill/tests/Makefile ============================================================================== --- stable/10/bin/pkill/tests/Makefile Mon Aug 18 19:27:47 2014 (r270149) +++ stable/10/bin/pkill/tests/Makefile Mon Aug 18 20:21:12 2014 (r270150) @@ -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 mckusick at FreeBSD.org Mon Aug 18 22:53:49 2014 From: mckusick at FreeBSD.org (Kirk McKusick) Date: Mon, 18 Aug 2014 22:53:48 +0000 (UTC) Subject: svn commit: r270157 - in stable/10/sys: kern ufs/ffs Message-ID: <201408182253.s7IMrmSF044491@svn.freebsd.org> Author: mckusick Date: Mon Aug 18 22:53:48 2014 New Revision: 270157 URL: http://svnweb.freebsd.org/changeset/base/270157 Log: MFC of 269533 (by mckusick): Add support for multi-threading of soft updates. Replace a single soft updates thread with a thread per FFS-filesystem mount point. The threads are associated with the bufdaemon process. Reviewed by: kib Tested by: Peter Holm and Scott Long MFC after: 2 weeks Sponsored by: Netflix MFC of 269853 (by kib): 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 Modified: stable/10/sys/kern/vfs_bio.c stable/10/sys/ufs/ffs/ffs_softdep.c stable/10/sys/ufs/ffs/softdep.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/vfs_bio.c ============================================================================== --- stable/10/sys/kern/vfs_bio.c Mon Aug 18 21:07:12 2014 (r270156) +++ stable/10/sys/kern/vfs_bio.c Mon Aug 18 22:53:48 2014 (r270157) @@ -98,7 +98,8 @@ struct buf_ops buf_ops_bio = { struct buf *buf; /* buffer header pool */ caddr_t unmapped_buf; -static struct proc *bufdaemonproc; +/* Used below and for softdep flushing threads in ufs/ffs/ffs_softdep.c */ +struct proc *bufdaemonproc; static int inmem(struct vnode *vp, daddr_t blkno); static void vm_hold_free_pages(struct buf *bp, int newbsize); Modified: stable/10/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/10/sys/ufs/ffs/ffs_softdep.c Mon Aug 18 21:07:12 2014 (r270156) +++ stable/10/sys/ufs/ffs/ffs_softdep.c Mon Aug 18 22:53:48 2014 (r270157) @@ -908,9 +908,9 @@ static void add_to_worklist(struct workl static void wake_worklist(struct worklist *); static void wait_worklist(struct worklist *, char *); static void remove_from_worklist(struct worklist *); -static void softdep_flush(void); +static void softdep_flush(void *); static void softdep_flushjournal(struct mount *); -static int softdep_speedup(void); +static int softdep_speedup(struct ufsmount *); static void worklist_speedup(struct mount *); static int journal_mount(struct mount *, struct fs *, struct ucred *); static void journal_unmount(struct ufsmount *); @@ -963,18 +963,21 @@ static int softdep_count_dependencies(st /* * Global lock over all of soft updates. */ -static struct rwlock lk; -RW_SYSINIT(softdep_lock, &lk, "Softdep Lock"); +static struct mtx lk; +MTX_SYSINIT(softdep_lock, &lk, "Global Softdep Lock", MTX_DEF); + +#define ACQUIRE_GBLLOCK(lk) mtx_lock(lk) +#define FREE_GBLLOCK(lk) mtx_unlock(lk) +#define GBLLOCK_OWNED(lk) mtx_assert((lk), MA_OWNED) /* - * Allow per-filesystem soft-updates locking. - * For now all use the same global lock defined above. + * Per-filesystem soft-updates locking. */ -#define LOCK_PTR(ump) ((ump)->um_softdep->sd_fslock) -#define TRY_ACQUIRE_LOCK(ump) rw_try_wlock((ump)->um_softdep->sd_fslock) -#define ACQUIRE_LOCK(ump) rw_wlock((ump)->um_softdep->sd_fslock) -#define FREE_LOCK(ump) rw_wunlock((ump)->um_softdep->sd_fslock) -#define LOCK_OWNED(ump) rw_assert((ump)->um_softdep->sd_fslock, \ +#define LOCK_PTR(ump) (&(ump)->um_softdep->sd_fslock) +#define TRY_ACQUIRE_LOCK(ump) rw_try_wlock(&(ump)->um_softdep->sd_fslock) +#define ACQUIRE_LOCK(ump) rw_wlock(&(ump)->um_softdep->sd_fslock) +#define FREE_LOCK(ump) rw_wunlock(&(ump)->um_softdep->sd_fslock) +#define LOCK_OWNED(ump) rw_assert(&(ump)->um_softdep->sd_fslock, \ RA_WLOCKED) #define BUF_AREC(bp) lockallowrecurse(&(bp)->b_lock) @@ -1179,7 +1182,7 @@ workitem_free(item, type) KASSERT(ump->softdep_curdeps[item->wk_type] > 0, ("workitem_free: %s: softdep_curdeps[%s] going negative", ump->um_fs->fs_fsmnt, TYPENAME(item->wk_type))); - dep_current[item->wk_type]--; + atomic_subtract_long(&dep_current[item->wk_type], 1); ump->softdep_curdeps[item->wk_type] -= 1; free(item, DtoM(type)); } @@ -1197,11 +1200,13 @@ workitem_alloc(item, type, mp) item->wk_state = 0; ump = VFSTOUFS(mp); - ACQUIRE_LOCK(ump); + ACQUIRE_GBLLOCK(&lk); dep_current[type]++; if (dep_current[type] > dep_highuse[type]) dep_highuse[type] = dep_current[type]; dep_total[type]++; + FREE_GBLLOCK(&lk); + ACQUIRE_LOCK(ump); ump->softdep_curdeps[type] += 1; ump->softdep_deps++; ump->softdep_accdeps++; @@ -1225,11 +1230,13 @@ workitem_reassign(item, newtype) KASSERT(dep_current[item->wk_type] > 0, ("workitem_reassign: %s: dep_current[%s] going negative", VFSTOUFS(item->wk_mp)->um_fs->fs_fsmnt, TYPENAME(item->wk_type))); - dep_current[item->wk_type]--; + ACQUIRE_GBLLOCK(&lk); dep_current[newtype]++; + dep_current[item->wk_type]--; if (dep_current[newtype] > dep_highuse[newtype]) dep_highuse[newtype] = dep_current[newtype]; dep_total[newtype]++; + FREE_GBLLOCK(&lk); item->wk_type = newtype; } @@ -1237,13 +1244,10 @@ workitem_reassign(item, newtype) * Workitem queue management */ static int max_softdeps; /* maximum number of structs before slowdown */ -static int maxindirdeps = 50; /* max number of indirdeps before slowdown */ static int tickdelay = 2; /* number of ticks to pause during slowdown */ static int proc_waiting; /* tracks whether we have a timeout posted */ static int *stat_countp; /* statistic to count in proc_waiting timeout */ static struct callout softdep_callout; -static struct mount *req_pending; -#define ALLCLEAN ((struct mount *)-1) static int req_clear_inodedeps; /* syncer process flush some inodedeps */ static int req_clear_remove; /* syncer process flush some freeblks */ static int softdep_flushcache = 0; /* Should we do BIO_FLUSH? */ @@ -1251,7 +1255,7 @@ static int softdep_flushcache = 0; /* Sh /* * runtime statistics */ -static int stat_softdep_mounts; /* number of softdep mounted filesystems */ +static int stat_flush_threads; /* number of softdep flushing threads */ static int stat_worklist_push; /* number of worklist cleanups */ static int stat_blk_limit_push; /* number of times block limit neared */ static int stat_ino_limit_push; /* number of times inode limit neared */ @@ -1282,10 +1286,8 @@ SYSCTL_INT(_debug_softdep, OID_AUTO, max &max_softdeps, 0, ""); SYSCTL_INT(_debug_softdep, OID_AUTO, tickdelay, CTLFLAG_RW, &tickdelay, 0, ""); -SYSCTL_INT(_debug_softdep, OID_AUTO, maxindirdeps, CTLFLAG_RW, - &maxindirdeps, 0, ""); -SYSCTL_INT(_debug_softdep, OID_AUTO, softdep_mounts, CTLFLAG_RD, - &stat_softdep_mounts, 0, ""); +SYSCTL_INT(_debug_softdep, OID_AUTO, flush_threads, CTLFLAG_RD, + &stat_flush_threads, 0, ""); SYSCTL_INT(_debug_softdep, OID_AUTO, worklist_push, CTLFLAG_RW, &stat_worklist_push, 0,""); SYSCTL_INT(_debug_softdep, OID_AUTO, blk_limit_push, CTLFLAG_RW, @@ -1345,53 +1347,67 @@ SYSCTL_DECL(_vfs_ffs); static int compute_summary_at_mount = 0; SYSCTL_INT(_vfs_ffs, OID_AUTO, compute_summary_at_mount, CTLFLAG_RW, &compute_summary_at_mount, 0, "Recompute summary at mount"); -static struct proc *softdepproc; -static struct kproc_desc softdep_kp = { - "softdepflush", - softdep_flush, - &softdepproc -}; -SYSINIT(sdproc, SI_SUB_KTHREAD_UPDATE, SI_ORDER_ANY, kproc_start, - &softdep_kp); - +static int print_threads = 0; +SYSCTL_INT(_debug_softdep, OID_AUTO, print_threads, CTLFLAG_RW, + &print_threads, 0, "Notify flusher thread start/stop"); + +/* List of all filesystems mounted with soft updates */ +static TAILQ_HEAD(, mount_softdeps) softdepmounts; + +/* + * This function cleans the worklist for a filesystem. + * Each filesystem running with soft dependencies gets its own + * thread to run in this function. The thread is started up in + * softdep_mount and shutdown in softdep_unmount. They show up + * as part of the kernel "bufdaemon" process whose process + * entry is available in bufdaemonproc. + */ +static int searchfailed; +extern struct proc *bufdaemonproc; static void -softdep_flush(void) +softdep_flush(addr) + void *addr; { - struct mount *nmp; struct mount *mp; - struct ufsmount *ump; struct thread *td; - int remaining; - int progress; + struct ufsmount *ump; td = curthread; td->td_pflags |= TDP_NORUNNINGBUF; - + mp = (struct mount *)addr; + ump = VFSTOUFS(mp); + atomic_add_int(&stat_flush_threads, 1); + if (print_threads) { + if (stat_flush_threads == 1) + printf("Running %s at pid %d\n", bufdaemonproc->p_comm, + bufdaemonproc->p_pid); + printf("Start thread %s\n", td->td_name); + } for (;;) { - kproc_suspend_check(softdepproc); - remaining = progress = 0; - mtx_lock(&mountlist_mtx); - for (mp = TAILQ_FIRST(&mountlist); mp != NULL; mp = nmp) { - nmp = TAILQ_NEXT(mp, mnt_list); - if (MOUNTEDSOFTDEP(mp) == 0) - continue; - if (vfs_busy(mp, MBF_NOWAIT | MBF_MNTLSTLOCK)) - continue; - ump = VFSTOUFS(mp); - progress += softdep_process_worklist(mp, 0); - remaining += ump->softdep_on_worklist; - mtx_lock(&mountlist_mtx); - nmp = TAILQ_NEXT(mp, mnt_list); - vfs_unbusy(mp); - } - mtx_unlock(&mountlist_mtx); - if (remaining && progress) + while (softdep_process_worklist(mp, 0) > 0 || + (MOUNTEDSUJ(mp) && + VFSTOUFS(mp)->softdep_jblocks->jb_suspended)) + kthread_suspend_check(); + ACQUIRE_LOCK(ump); + if ((ump->softdep_flags & FLUSH_CLEANUP) == 0) + msleep(&ump->softdep_flushtd, LOCK_PTR(ump), PVM, + "sdflush", hz / 2); + ump->softdep_flags &= ~FLUSH_CLEANUP; + /* + * Check to see if we are done and need to exit. + */ + if ((ump->softdep_flags & FLUSH_EXIT) == 0) { + FREE_LOCK(ump); continue; - rw_wlock(&lk); - if (req_pending == NULL) - msleep(&req_pending, &lk, PVM, "sdflush", hz); - req_pending = NULL; - rw_wunlock(&lk); + } + ump->softdep_flags &= ~FLUSH_EXIT; + FREE_LOCK(ump); + wakeup(&ump->softdep_flags); + if (print_threads) + printf("Stop thread %s: searchfailed %d, did cleanups %d\n", td->td_name, searchfailed, ump->um_softdep->sd_cleanups); + atomic_subtract_int(&stat_flush_threads, 1); + kthread_exit(); + panic("kthread_exit failed\n"); } } @@ -1399,19 +1415,70 @@ static void worklist_speedup(mp) struct mount *mp; { - rw_assert(&lk, RA_WLOCKED); - if (req_pending == 0) { - req_pending = mp; - wakeup(&req_pending); + struct ufsmount *ump; + + ump = VFSTOUFS(mp); + LOCK_OWNED(ump); + if ((ump->softdep_flags & (FLUSH_CLEANUP | FLUSH_EXIT)) == 0) { + ump->softdep_flags |= FLUSH_CLEANUP; + if (ump->softdep_flushtd->td_wchan == &ump->softdep_flushtd) + wakeup(&ump->softdep_flushtd); } } static int -softdep_speedup(void) +softdep_speedup(ump) + struct ufsmount *ump; { + struct ufsmount *altump; + struct mount_softdeps *sdp; - worklist_speedup(ALLCLEAN); + LOCK_OWNED(ump); + worklist_speedup(ump->um_mountp); bd_speedup(); + /* + * If we have global shortages, then we need other + * filesystems to help with the cleanup. Here we wakeup a + * flusher thread for a filesystem that is over its fair + * share of resources. + */ + if (req_clear_inodedeps || req_clear_remove) { + ACQUIRE_GBLLOCK(&lk); + TAILQ_FOREACH(sdp, &softdepmounts, sd_next) { + if ((altump = sdp->sd_ump) == ump) + continue; + if (((req_clear_inodedeps && + altump->softdep_curdeps[D_INODEDEP] > + max_softdeps / stat_flush_threads) || + (req_clear_remove && + altump->softdep_curdeps[D_DIRREM] > + (max_softdeps / 2) / stat_flush_threads)) && + TRY_ACQUIRE_LOCK(altump)) + break; + } + if (sdp == NULL) { + searchfailed++; + FREE_GBLLOCK(&lk); + } else { + /* + * Move to the end of the list so we pick a + * different one on out next try. + */ + TAILQ_REMOVE(&softdepmounts, sdp, sd_next); + TAILQ_INSERT_TAIL(&softdepmounts, sdp, sd_next); + FREE_GBLLOCK(&lk); + if ((altump->softdep_flags & + (FLUSH_CLEANUP | FLUSH_EXIT)) == 0) { + altump->softdep_flags |= FLUSH_CLEANUP; + altump->um_softdep->sd_cleanups++; + if (altump->softdep_flushtd->td_wchan == + &altump->softdep_flushtd) { + wakeup(&altump->softdep_flushtd); + } + } + FREE_LOCK(altump); + } + } return (speedup_syncer()); } @@ -2127,9 +2194,14 @@ inodedep_lookup(mp, inum, flags, inodede if ((flags & DEPALLOC) == 0) return (0); /* - * If we are over our limit, try to improve the situation. - */ - if (dep_current[D_INODEDEP] > max_softdeps && (flags & NODELAY) == 0) + * If the system is over its limit and our filesystem is + * responsible for more than our share of that usage and + * we are not in a rush, request some inodedep cleanup. + */ + while (dep_current[D_INODEDEP] > max_softdeps && + (flags & NODELAY) == 0 && + ump->softdep_curdeps[D_INODEDEP] > + max_softdeps / stat_flush_threads) request_cleanup(mp, FLUSH_INODES); FREE_LOCK(ump); inodedep = malloc(sizeof(struct inodedep), @@ -2321,6 +2393,7 @@ void softdep_initialize() { + TAILQ_INIT(&softdepmounts); max_softdeps = desiredvnodes * 4; /* initialise bioops hack */ @@ -2379,7 +2452,8 @@ softdep_mount(devvp, mp, fs, cred) ump = VFSTOUFS(mp); ump->um_softdep = sdp; MNT_IUNLOCK(mp); - LOCK_PTR(ump) = &lk; + rw_init(LOCK_PTR(ump), "Per-Filesystem Softdep Lock"); + sdp->sd_ump = ump; LIST_INIT(&ump->softdep_workitem_pending); LIST_INIT(&ump->softdep_journal_pending); TAILQ_INIT(&ump->softdep_unlinked); @@ -2404,13 +2478,21 @@ 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); softdep_unmount(mp); return (error); } - atomic_add_int(&stat_softdep_mounts, 1); + /* + * Start our flushing thread in the bufdaemon process. + */ + kproc_kthread_add(&softdep_flush, mp, &bufdaemonproc, + &ump->softdep_flushtd, 0, 0, "softdepflush", "%s worker", + mp->mnt_stat.f_mntonname); /* * When doing soft updates, the counters in the * superblock may have gotten out of sync. Recomputation @@ -2466,7 +2548,26 @@ softdep_unmount(mp) MNT_IUNLOCK(mp); journal_unmount(ump); } - atomic_subtract_int(&stat_softdep_mounts, 1); + /* + * Shut down our flushing thread. Check for NULL is if + * softdep_mount errors out before the thread has been created. + */ + if (ump->softdep_flushtd != NULL) { + ACQUIRE_LOCK(ump); + ump->softdep_flags |= FLUSH_EXIT; + wakeup(&ump->softdep_flushtd); + msleep(&ump->softdep_flags, LOCK_PTR(ump), PVM | PDROP, + "sdwait", 0); + KASSERT((ump->softdep_flags & FLUSH_EXIT) == 0, + ("Thread shutdown failed")); + } + /* + * Free up our resources. + */ + 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); @@ -2789,7 +2890,7 @@ journal_space(ump, thresh) */ limit = (max_softdeps / 10) * 9; if (dep_current[D_INODEDEP] > limit && - ump->softdep_curdeps[D_INODEDEP] > limit / stat_softdep_mounts) + ump->softdep_curdeps[D_INODEDEP] > limit / stat_flush_threads) return (0); if (thresh) thresh = jblocks->jb_min; @@ -2814,7 +2915,7 @@ journal_suspend(ump) if ((mp->mnt_kern_flag & MNTK_SUSPEND) == 0) { stat_journal_min++; mp->mnt_kern_flag |= MNTK_SUSPEND; - mp->mnt_susp_owner = FIRST_THREAD_IN_PROC(softdepproc); + mp->mnt_susp_owner = ump->softdep_flushtd; } jblocks->jb_suspended = 1; MNT_IUNLOCK(mp); @@ -2889,7 +2990,7 @@ softdep_prealloc(vp, waitok) process_removes(vp); process_truncates(vp); if (journal_space(ump, 0) == 0) { - softdep_speedup(); + softdep_speedup(ump); if (journal_space(ump, 1) == 0) journal_suspend(ump); } @@ -2933,10 +3034,10 @@ softdep_prelink(dvp, vp) } process_removes(dvp); process_truncates(dvp); - softdep_speedup(); + softdep_speedup(ump); process_worklist_item(UFSTOVFS(ump), 2, LK_NOWAIT); if (journal_space(ump, 0) == 0) { - softdep_speedup(); + softdep_speedup(ump); if (journal_space(ump, 1) == 0) journal_suspend(ump); } @@ -3258,7 +3359,7 @@ softdep_process_journal(mp, needwk, flag if (flags != MNT_WAIT) break; printf("softdep: Out of journal space!\n"); - softdep_speedup(); + softdep_speedup(ump); msleep(jblocks, LOCK_PTR(ump), PRIBIO, "jblocks", hz); } FREE_LOCK(ump); @@ -3971,7 +4072,7 @@ free_freedep(freedep) /* * Allocate a new freework structure that may be a level in an indirect * when parent is not NULL or a top level block when it is. The top level - * freework structures are allocated without the soft updates lock held + * freework structures are allocated without the per-filesystem lock held * and before the freeblks is visible outside of softdep_setup_freeblocks(). */ static struct freework * @@ -4040,7 +4141,7 @@ cancel_jfreeblk(freeblks, blkno) /* * Allocate a new jfreeblk to journal top level block pointer when truncating - * a file. The caller must add this to the worklist when the soft updates + * a file. The caller must add this to the worklist when the per-filesystem * lock is held. */ static struct jfreeblk * @@ -7450,7 +7551,7 @@ softdep_freefile(pvp, ino, mode) clear_unlinked_inodedep(inodedep); /* * Re-acquire inodedep as we've dropped the - * soft updates lock in clear_unlinked_inodedep(). + * per-filesystem lock in clear_unlinked_inodedep(). */ inodedep_lookup(pvp->v_mount, ino, 0, &inodedep); } @@ -7996,10 +8097,8 @@ indir_trunc(freework, dbn, lbn) * If we're goingaway, free the indirdep. Otherwise it will * linger until the write completes. */ - if (goingaway) { + if (goingaway) free_indirdep(indirdep); - ump->softdep_numindirdeps -= 1; - } } FREE_LOCK(ump); /* Initialize pointers depending on block size. */ @@ -8171,7 +8270,7 @@ cancel_allocindir(aip, bp, freeblks, tru * Create the mkdir dependencies for . and .. in a new directory. Link them * in to a newdirblk so any subsequent additions are tracked properly. The * caller is responsible for adding the mkdir1 dependency to the journal - * and updating id_mkdiradd. This function returns with the soft updates + * and updating id_mkdiradd. This function returns with the per-filesystem * lock held. */ static struct mkdir * @@ -8989,12 +9088,16 @@ newdirrem(bp, dp, ip, isrmdir, prevdirre panic("newdirrem: whiteout"); dvp = ITOV(dp); /* - * If we are over our limit, try to improve the situation. + * If the system is over its limit and our filesystem is + * responsible for more than our share of that usage and + * we are not a snapshot, request some inodedep cleanup. * Limiting the number of dirrem structures will also limit * the number of freefile and freeblks structures. */ ACQUIRE_LOCK(ip->i_ump); - if (!IS_SNAPSHOT(ip) && dep_current[D_DIRREM] > max_softdeps / 2) + while (!IS_SNAPSHOT(ip) && dep_current[D_DIRREM] > max_softdeps / 2 && + ip->i_ump->softdep_curdeps[D_DIRREM] > + (max_softdeps / 2) / stat_flush_threads) (void) request_cleanup(ITOV(dp)->v_mount, FLUSH_BLOCKS); FREE_LOCK(ip->i_ump); dirrem = malloc(sizeof(struct dirrem), @@ -9945,7 +10048,7 @@ initiate_write_filepage(pagedep, bp) * Wait for all journal remove dependencies to hit the disk. * We can not allow any potentially conflicting directory adds * to be visible before removes and rollback is too difficult. - * The soft updates lock may be dropped and re-acquired, however + * The per-filesystem lock may be dropped and re-acquired, however * we hold the buf locked so the dependency can not go away. */ LIST_FOREACH(dirrem, &pagedep->pd_dirremhd, dm_next) @@ -10409,7 +10512,6 @@ cancel_indirdep(indirdep, bp, freeblks) LIST_REMOVE(indirdep, ir_next); } indirdep->ir_state |= GOINGAWAY; - VFSTOUFS(indirdep->ir_list.wk_mp)->softdep_numindirdeps += 1; /* * Pass in bp for blocks still have journal writes * pending so we can cancel them on their own. @@ -10836,7 +10938,7 @@ softdep_disk_write_complete(bp) ACQUIRE_LOCK(ump); while ((wk = LIST_FIRST(&bp->b_dep)) != NULL) { WORKLIST_REMOVE(wk); - dep_write[wk->wk_type]++; + atomic_add_long(&dep_write[wk->wk_type], 1); if (wk == owk) panic("duplicate worklist: %p\n", wk); owk = wk; @@ -11519,7 +11621,7 @@ diradd_inode_written(dap, inodedep) /* * Returns true if the bmsafemap will have rollbacks when written. Must only - * be called with the soft updates lock and the buf lock on the cg held. + * be called with the per-filesystem lock and the buf lock on the cg held. */ static int bmsafemap_backgroundwrite(bmsafemap, bp) @@ -12943,18 +13045,42 @@ softdep_slowdown(vp) if (journal_space(ump, 0) == 0) jlow = 1; } + /* + * If the system is under its limits and our filesystem is + * not responsible for more than our share of the usage and + * we are not low on journal space, then no need to slow down. + */ max_softdeps_hard = max_softdeps * 11 / 10; if (dep_current[D_DIRREM] < max_softdeps_hard / 2 && dep_current[D_INODEDEP] < max_softdeps_hard && - VFSTOUFS(vp->v_mount)->softdep_numindirdeps < maxindirdeps && - dep_current[D_FREEBLKS] < max_softdeps_hard && jlow == 0) { + dep_current[D_INDIRDEP] < max_softdeps_hard / 1000 && + dep_current[D_FREEBLKS] < max_softdeps_hard && jlow == 0 && + ump->softdep_curdeps[D_DIRREM] < + (max_softdeps_hard / 2) / stat_flush_threads && + ump->softdep_curdeps[D_INODEDEP] < + max_softdeps_hard / stat_flush_threads && + ump->softdep_curdeps[D_INDIRDEP] < + (max_softdeps_hard / 1000) / stat_flush_threads && + ump->softdep_curdeps[D_FREEBLKS] < + max_softdeps_hard / stat_flush_threads) { FREE_LOCK(ump); return (0); } - if (VFSTOUFS(vp->v_mount)->softdep_numindirdeps >= maxindirdeps || jlow) - softdep_speedup(); + /* + * If the journal is low or our filesystem is over its limit + * then speedup the cleanup. + */ + if (ump->softdep_curdeps[D_INDIRDEP] < + (max_softdeps_hard / 1000) / stat_flush_threads || jlow) + softdep_speedup(ump); stat_sync_limit_hit += 1; FREE_LOCK(ump); + /* + * We only slow down the rate at which new dependencies are + * generated if we are not using journaling. With journaling, + * the cleanup should always be sufficient to keep things + * under control. + */ if (DOINGSUJ(vp)) return (0); return (1); @@ -13012,13 +13138,12 @@ softdep_request_cleanup(fs, vp, cred, re return (0); } /* - * If we are in need of resources, consider pausing for - * tickdelay to give ourselves some breathing room. + * If we are in need of resources, start by cleaning up + * any block removals associated with our inode. */ ACQUIRE_LOCK(ump); process_removes(vp); process_truncates(vp); - request_cleanup(UFSTOVFS(ump), resource); FREE_LOCK(ump); /* * Now clean up at least as many resources as we will need. @@ -13151,7 +13276,7 @@ request_cleanup(mp, resource) * Next, we attempt to speed up the syncer process. If that * is successful, then we allow the process to continue. */ - if (softdep_speedup() && + if (softdep_speedup(ump) && resource != FLUSH_BLOCKS_WAIT && resource != FLUSH_INODES_WAIT) return(0); @@ -13169,15 +13294,19 @@ request_cleanup(mp, resource) case FLUSH_INODES: case FLUSH_INODES_WAIT: + ACQUIRE_GBLLOCK(&lk); stat_ino_limit_push += 1; req_clear_inodedeps += 1; + FREE_GBLLOCK(&lk); stat_countp = &stat_ino_limit_hit; break; case FLUSH_BLOCKS: case FLUSH_BLOCKS_WAIT: + ACQUIRE_GBLLOCK(&lk); stat_blk_limit_push += 1; req_clear_remove += 1; + FREE_GBLLOCK(&lk); stat_countp = &stat_blk_limit_hit; break; @@ -13188,6 +13317,8 @@ request_cleanup(mp, resource) * Hopefully the syncer daemon will catch up and awaken us. * We wait at most tickdelay before proceeding in any case. */ + ACQUIRE_GBLLOCK(&lk); + FREE_LOCK(ump); proc_waiting += 1; if (callout_pending(&softdep_callout) == FALSE) callout_reset(&softdep_callout, tickdelay > 2 ? tickdelay : 2, @@ -13195,6 +13326,8 @@ request_cleanup(mp, resource) msleep((caddr_t)&proc_waiting, &lk, PPAUSE, "softupdate", 0); proc_waiting -= 1; + FREE_GBLLOCK(&lk); + ACQUIRE_LOCK(ump); return (1); } @@ -13208,16 +13341,13 @@ pause_timer(arg) void *arg; { - rw_assert(&lk, RA_WLOCKED); + GBLLOCK_OWNED(&lk); /* * The callout_ API has acquired mtx and will hold it around this * function call. */ - *stat_countp += 1; - wakeup_one(&proc_waiting); - if (proc_waiting > 0) - callout_reset(&softdep_callout, tickdelay > 2 ? tickdelay : 2, - pause_timer, 0); + *stat_countp += proc_waiting; + wakeup(&proc_waiting); } /* @@ -13228,7 +13358,6 @@ check_clear_deps(mp) struct mount *mp; { - rw_assert(&lk, RA_WLOCKED); /* * If we are suspended, it may be because of our using * too many inodedeps, so help clear them out. @@ -13238,16 +13367,22 @@ check_clear_deps(mp) /* * General requests for cleanup of backed up dependencies */ + ACQUIRE_GBLLOCK(&lk); if (req_clear_inodedeps) { req_clear_inodedeps -= 1; + FREE_GBLLOCK(&lk); clear_inodedeps(mp); - wakeup_one(&proc_waiting); + ACQUIRE_GBLLOCK(&lk); + wakeup(&proc_waiting); } if (req_clear_remove) { req_clear_remove -= 1; + FREE_GBLLOCK(&lk); clear_remove(mp); - wakeup_one(&proc_waiting); + ACQUIRE_GBLLOCK(&lk); + wakeup(&proc_waiting); } + FREE_GBLLOCK(&lk); } /* Modified: stable/10/sys/ufs/ffs/softdep.h ============================================================================== --- stable/10/sys/ufs/ffs/softdep.h Mon Aug 18 21:07:12 2014 (r270156) +++ stable/10/sys/ufs/ffs/softdep.h Mon Aug 18 22:53:48 2014 (r270157) @@ -1025,7 +1025,7 @@ TAILQ_HEAD(indir_hashhead, freework); * Allocated at mount and freed at unmount. */ struct mount_softdeps { - struct rwlock *sd_fslock; /* softdep lock */ + struct rwlock sd_fslock; /* softdep lock */ struct workhead sd_workitem_pending; /* softdep work queue */ struct worklist *sd_worklist_tail; /* Tail pointer for above */ struct workhead sd_journal_pending; /* journal work queue */ @@ -1046,15 +1046,24 @@ struct mount_softdeps { u_long sd_bmhashsize; /* bmsafemap hash table size-1*/ struct indir_hashhead *sd_indirhash; /* indir hash table */ u_long sd_indirhashsize; /* indir hash table size-1 */ - long sd_numindirdeps; /* outstanding indirdeps */ int sd_on_journal; /* Items on the journal list */ int sd_on_worklist; /* Items on the worklist */ int sd_deps; /* Total dependency count */ int sd_accdeps; /* accumulated dep count */ int sd_req; /* Wakeup when deps hits 0. */ + int sd_flags; /* comm with flushing thread */ + int sd_cleanups; /* Calls to cleanup */ + struct thread *sd_flushtd; /* thread handling flushing */ + TAILQ_ENTRY(mount_softdeps) sd_next; /* List of softdep filesystem */ + struct ufsmount *sd_ump; /* our ufsmount structure */ u_long sd_curdeps[D_LAST + 1]; /* count of current deps */ }; /* + * Flags for communicating with the syncer thread. + */ +#define FLUSH_EXIT 0x0001 /* time to exit */ +#define FLUSH_CLEANUP 0x0002 /* need to clear out softdep structures */ +/* * Keep the old names from when these were in the ufsmount structure. */ #define softdep_workitem_pending um_softdep->sd_workitem_pending @@ -1077,10 +1086,11 @@ struct mount_softdeps { #define bmsafemap_hash_size um_softdep->sd_bmhashsize #define indir_hashtbl um_softdep->sd_indirhash #define indir_hash_size um_softdep->sd_indirhashsize -#define softdep_numindirdeps um_softdep->sd_numindirdeps #define softdep_on_journal um_softdep->sd_on_journal #define softdep_on_worklist um_softdep->sd_on_worklist #define softdep_deps um_softdep->sd_deps #define softdep_accdeps um_softdep->sd_accdeps #define softdep_req um_softdep->sd_req +#define softdep_flags um_softdep->sd_flags +#define softdep_flushtd um_softdep->sd_flushtd #define softdep_curdeps um_softdep->sd_curdeps From grehan at FreeBSD.org Tue Aug 19 01:20:27 2014 From: grehan at FreeBSD.org (Peter Grehan) Date: Tue, 19 Aug 2014 01:20:25 +0000 (UTC) Subject: svn commit: r270159 - in stable/10: lib/libvmmapi sys/amd64/amd64 sys/amd64/include sys/amd64/vmm sys/amd64/vmm/intel sys/amd64/vmm/io sys/x86/include usr.sbin/bhyve usr.sbin/bhyvectl usr.sbin/bhyv... Message-ID: <201408190120.s7J1KP93011521@svn.freebsd.org> Author: grehan Date: Tue Aug 19 01:20:24 2014 New Revision: 270159 URL: http://svnweb.freebsd.org/changeset/base/270159 Log: MFC r267921, r267934, r267949, r267959, r267966, r268202, r268276, r268427, r268428, r268521, r268638, r268639, r268701, r268777, r268889, r268922, r269008, r269042, r269043, r269080, r269094, r269108, r269109, r269281, r269317, r269700, r269896, r269962, r269989. Catch bhyve up to CURRENT. Lightly tested with FreeBSD i386/amd64, Linux i386/amd64, and OpenBSD/amd64. Still resolving an issue with OpenBSD/i386. Many thanks to jhb@ for all the hard work on the prior MFCs ! r267921 - support the "mov r/m8, imm8" instruction r267934 - document options r267949 - set DMI vers/date to fixed values r267959 - doc: sort cmd flags r267966 - EPT misconf post-mortem info r268202 - use correct flag for event index r268276 - 64-bit virtio capability api r268427 - invalidate guest TLB when cr3 is updated, needed for TSS r268428 - identify vcpu's operating mode r268521 - use correct offset in guest logical-to-linear translation r268638 - chs value r268639 - chs fake values r268701 - instr emul operand/address size override prefix support r268777 - emulation for legacy x86 task switching r268889 - nested exception support r268922 - fix INVARIANTS build r269008 - emulate instructions found in the OpenBSD/i386 5.5 kernel r269042 - fix fault injection r269043 - Reduce VMEXIT_RESTARTs in task_switch.c r269080 - fix issues in PUSH emulation r269094 - simplify return values from the inout handlers r269108 - don't return -1 from the push emulation handler r269109 - avoid permanent sleep in vm_handle_hlt() r269281 - list VT-x features in base kernel dmesg r269317 - Mark AHCI fatal errors as not completed r269700 - Support PCI extended config space in bhyve r269896 - Minor cleanup r269962 - use max guest memory when creating IOMMU domain r269989 - fix interrupt mode names Added: stable/10/usr.sbin/bhyve/task_switch.c - copied, changed from r268777, head/usr.sbin/bhyve/task_switch.c Modified: stable/10/lib/libvmmapi/vmmapi.c stable/10/lib/libvmmapi/vmmapi.h stable/10/sys/amd64/amd64/identcpu.c stable/10/sys/amd64/include/vmm.h stable/10/sys/amd64/include/vmm_dev.h stable/10/sys/amd64/include/vmm_instruction_emul.h stable/10/sys/amd64/vmm/intel/vmcs.c stable/10/sys/amd64/vmm/intel/vmcs.h stable/10/sys/amd64/vmm/intel/vmx.c stable/10/sys/amd64/vmm/intel/vmx_msr.c stable/10/sys/amd64/vmm/intel/vmx_msr.h stable/10/sys/amd64/vmm/intel/vtd.c stable/10/sys/amd64/vmm/io/vatpic.c stable/10/sys/amd64/vmm/vmm.c stable/10/sys/amd64/vmm/vmm_dev.c stable/10/sys/amd64/vmm/vmm_instruction_emul.c stable/10/sys/x86/include/specialreg.h stable/10/usr.sbin/bhyve/Makefile stable/10/usr.sbin/bhyve/acpi.c stable/10/usr.sbin/bhyve/atkbdc.c stable/10/usr.sbin/bhyve/bhyve.8 stable/10/usr.sbin/bhyve/bhyverun.c stable/10/usr.sbin/bhyve/bhyverun.h stable/10/usr.sbin/bhyve/block_if.c stable/10/usr.sbin/bhyve/block_if.h stable/10/usr.sbin/bhyve/inout.c stable/10/usr.sbin/bhyve/inout.h stable/10/usr.sbin/bhyve/mem.c stable/10/usr.sbin/bhyve/mem.h stable/10/usr.sbin/bhyve/pci_ahci.c stable/10/usr.sbin/bhyve/pci_emul.c stable/10/usr.sbin/bhyve/pci_emul.h stable/10/usr.sbin/bhyve/pci_irq.c stable/10/usr.sbin/bhyve/pm.c stable/10/usr.sbin/bhyve/smbiostbl.c stable/10/usr.sbin/bhyve/virtio.c stable/10/usr.sbin/bhyve/virtio.h stable/10/usr.sbin/bhyvectl/bhyvectl.c stable/10/usr.sbin/bhyveload/bhyveload.8 stable/10/usr.sbin/bhyveload/bhyveload.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libvmmapi/vmmapi.c ============================================================================== --- stable/10/lib/libvmmapi/vmmapi.c Mon Aug 18 23:45:40 2014 (r270158) +++ stable/10/lib/libvmmapi/vmmapi.c Tue Aug 19 01:20:24 2014 (r270159) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -327,6 +328,16 @@ vm_get_desc(struct vmctx *ctx, int vcpu, } int +vm_get_seg_desc(struct vmctx *ctx, int vcpu, int reg, struct seg_desc *seg_desc) +{ + int error; + + error = vm_get_desc(ctx, vcpu, reg, &seg_desc->base, &seg_desc->limit, + &seg_desc->access); + return (error); +} + +int vm_set_register(struct vmctx *ctx, int vcpu, int reg, uint64_t val) { int error; @@ -988,7 +999,7 @@ gla2gpa(struct vmctx *ctx, int vcpu, str #endif int -vm_gla2gpa(struct vmctx *ctx, int vcpu, struct vm_guest_paging *paging, +vm_copy_setup(struct vmctx *ctx, int vcpu, struct vm_guest_paging *paging, uint64_t gla, size_t len, int prot, struct iovec *iov, int iovcnt) { uint64_t gpa; @@ -1106,3 +1117,32 @@ vm_activate_cpu(struct vmctx *ctx, int v error = ioctl(ctx->fd, VM_ACTIVATE_CPU, &ac); return (error); } + +int +vm_get_intinfo(struct vmctx *ctx, int vcpu, uint64_t *info1, uint64_t *info2) +{ + struct vm_intinfo vmii; + int error; + + bzero(&vmii, sizeof(struct vm_intinfo)); + vmii.vcpuid = vcpu; + error = ioctl(ctx->fd, VM_GET_INTINFO, &vmii); + if (error == 0) { + *info1 = vmii.info1; + *info2 = vmii.info2; + } + return (error); +} + +int +vm_set_intinfo(struct vmctx *ctx, int vcpu, uint64_t info1) +{ + struct vm_intinfo vmii; + int error; + + bzero(&vmii, sizeof(struct vm_intinfo)); + vmii.vcpuid = vcpu; + vmii.info1 = info1; + error = ioctl(ctx->fd, VM_SET_INTINFO, &vmii); + return (error); +} Modified: stable/10/lib/libvmmapi/vmmapi.h ============================================================================== --- stable/10/lib/libvmmapi/vmmapi.h Mon Aug 18 23:45:40 2014 (r270158) +++ stable/10/lib/libvmmapi/vmmapi.h Tue Aug 19 01:20:24 2014 (r270159) @@ -66,6 +66,8 @@ int vm_set_desc(struct vmctx *ctx, int v uint64_t base, uint32_t limit, uint32_t access); int vm_get_desc(struct vmctx *ctx, int vcpu, int reg, uint64_t *base, uint32_t *limit, uint32_t *access); +int vm_get_seg_desc(struct vmctx *ctx, int vcpu, int reg, + struct seg_desc *seg_desc); int vm_set_register(struct vmctx *ctx, int vcpu, int reg, uint64_t val); int vm_get_register(struct vmctx *ctx, int vcpu, int reg, uint64_t *retval); int vm_run(struct vmctx *ctx, int vcpu, uint64_t rip, @@ -104,6 +106,9 @@ int vm_setup_pptdev_msix(struct vmctx *c int func, int idx, uint64_t addr, uint64_t msg, uint32_t vector_control); +int vm_get_intinfo(struct vmctx *ctx, int vcpu, uint64_t *i1, uint64_t *i2); +int vm_set_intinfo(struct vmctx *ctx, int vcpu, uint64_t exit_intinfo); + /* * Return a pointer to the statistics buffer. Note that this is not MT-safe. */ @@ -121,7 +126,7 @@ int vm_get_hpet_capabilities(struct vmct * The 'iovcnt' should be big enough to accomodate all GPA segments. * Returns 0 on success, 1 on a guest fault condition and -1 otherwise. */ -int vm_gla2gpa(struct vmctx *ctx, int vcpu, struct vm_guest_paging *paging, +int vm_copy_setup(struct vmctx *ctx, int vcpu, struct vm_guest_paging *pg, uint64_t gla, size_t len, int prot, struct iovec *iov, int iovcnt); void vm_copyin(struct vmctx *ctx, int vcpu, struct iovec *guest_iov, void *host_dst, size_t len); Modified: stable/10/sys/amd64/amd64/identcpu.c ============================================================================== --- stable/10/sys/amd64/amd64/identcpu.c Mon Aug 18 23:45:40 2014 (r270158) +++ stable/10/sys/amd64/amd64/identcpu.c Tue Aug 19 01:20:24 2014 (r270159) @@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include /* XXX - should be in header file: */ @@ -73,6 +74,7 @@ static u_int find_cpu_vendor_id(void); static void print_AMD_info(void); static void print_AMD_assoc(int i); static void print_via_padlock_info(void); +static void print_vmx_info(void); int cpu_class; char machine[] = "amd64"; @@ -428,6 +430,9 @@ printcpuinfo(void) if (via_feature_rng != 0 || via_feature_xcrypt != 0) print_via_padlock_info(); + if (cpu_feature2 & CPUID2_VMX) + print_vmx_info(); + if ((cpu_feature & CPUID_HTT) && cpu_vendor_id == CPU_VENDOR_AMD) cpu_feature &= ~CPUID_HTT; @@ -722,3 +727,197 @@ print_via_padlock_info(void) "\015RSA" /* PMM */ ); } + +static uint32_t +vmx_settable(uint64_t basic, int msr, int true_msr) +{ + uint64_t val; + + if (basic & (1UL << 55)) + val = rdmsr(true_msr); + else + val = rdmsr(msr); + + /* Just report the controls that can be set to 1. */ + return (val >> 32); +} + +static void +print_vmx_info(void) +{ + uint64_t basic, msr; + uint32_t entry, exit, mask, pin, proc, proc2; + int comma; + + printf("\n VT-x: "); + msr = rdmsr(MSR_IA32_FEATURE_CONTROL); + if (!(msr & IA32_FEATURE_CONTROL_VMX_EN)) + printf("(disabled in BIOS) "); + basic = rdmsr(MSR_VMX_BASIC); + pin = vmx_settable(basic, MSR_VMX_PINBASED_CTLS, + MSR_VMX_TRUE_PINBASED_CTLS); + proc = vmx_settable(basic, MSR_VMX_PROCBASED_CTLS, + MSR_VMX_TRUE_PROCBASED_CTLS); + if (proc & PROCBASED_SECONDARY_CONTROLS) + proc2 = vmx_settable(basic, MSR_VMX_PROCBASED_CTLS2, + MSR_VMX_PROCBASED_CTLS2); + else + proc2 = 0; + exit = vmx_settable(basic, MSR_VMX_EXIT_CTLS, MSR_VMX_TRUE_EXIT_CTLS); + entry = vmx_settable(basic, MSR_VMX_ENTRY_CTLS, MSR_VMX_TRUE_ENTRY_CTLS); + + if (!bootverbose) { + comma = 0; + if (exit & VM_EXIT_SAVE_PAT && exit & VM_EXIT_LOAD_PAT && + entry & VM_ENTRY_LOAD_PAT) { + printf("%sPAT", comma ? "," : ""); + comma = 1; + } + if (proc & PROCBASED_HLT_EXITING) { + printf("%sHLT", comma ? "," : ""); + comma = 1; + } + if (proc & PROCBASED_MTF) { + printf("%sMTF", comma ? "," : ""); + comma = 1; + } + if (proc & PROCBASED_PAUSE_EXITING) { + printf("%sPAUSE", comma ? "," : ""); + comma = 1; + } + if (proc2 & PROCBASED2_ENABLE_EPT) { + printf("%sEPT", comma ? "," : ""); + comma = 1; + } + if (proc2 & PROCBASED2_UNRESTRICTED_GUEST) { + printf("%sUG", comma ? "," : ""); + comma = 1; + } + if (proc2 & PROCBASED2_ENABLE_VPID) { + printf("%sVPID", comma ? "," : ""); + comma = 1; + } + if (proc & PROCBASED_USE_TPR_SHADOW && + proc2 & PROCBASED2_VIRTUALIZE_APIC_ACCESSES && + proc2 & PROCBASED2_VIRTUALIZE_X2APIC_MODE && + proc2 & PROCBASED2_APIC_REGISTER_VIRTUALIZATION && + proc2 & PROCBASED2_VIRTUAL_INTERRUPT_DELIVERY) { + printf("%sVID", comma ? "," : ""); + comma = 1; + if (pin & PINBASED_POSTED_INTERRUPT) + printf(",PostIntr"); + } + return; + } + + mask = basic >> 32; + printf("Basic Features=0x%b", mask, + "\020" + "\02132PA" /* 32-bit physical addresses */ + "\022SMM" /* SMM dual-monitor */ + "\027INS/OUTS" /* VM-exit info for INS and OUTS */ + "\030TRUE" /* TRUE_CTLS MSRs */ + ); + printf("\n Pin-Based Controls=0x%b", pin, + "\020" + "\001ExtINT" /* External-interrupt exiting */ + "\004NMI" /* NMI exiting */ + "\006VNMI" /* Virtual NMIs */ + "\007PreTmr" /* Activate VMX-preemption timer */ + "\010PostIntr" /* Process posted interrupts */ + ); + printf("\n Primary Processor Controls=0x%b", proc, + "\020" + "\003INTWIN" /* Interrupt-window exiting */ + "\004TSCOff" /* Use TSC offsetting */ + "\010HLT" /* HLT exiting */ + "\012INVLPG" /* INVLPG exiting */ + "\013MWAIT" /* MWAIT exiting */ + "\014RDPMC" /* RDPMC exiting */ + "\015RDTSC" /* RDTSC exiting */ + "\020CR3-LD" /* CR3-load exiting */ + "\021CR3-ST" /* CR3-store exiting */ + "\024CR8-LD" /* CR8-load exiting */ + "\025CR8-ST" /* CR8-store exiting */ + "\026TPR" /* Use TPR shadow */ + "\027NMIWIN" /* NMI-window exiting */ + "\030MOV-DR" /* MOV-DR exiting */ + "\031IO" /* Unconditional I/O exiting */ + "\032IOmap" /* Use I/O bitmaps */ + "\034MTF" /* Monitor trap flag */ + "\035MSRmap" /* Use MSR bitmaps */ + "\036MONITOR" /* MONITOR exiting */ + "\037PAUSE" /* PAUSE exiting */ + ); + if (proc & PROCBASED_SECONDARY_CONTROLS) + printf("\n Secondary Processor Controls=0x%b", proc2, + "\020" + "\001APIC" /* Virtualize APIC accesses */ + "\002EPT" /* Enable EPT */ + "\003DT" /* Descriptor-table exiting */ + "\004RDTSCP" /* Enable RDTSCP */ + "\005x2APIC" /* Virtualize x2APIC mode */ + "\006VPID" /* Enable VPID */ + "\007WBINVD" /* WBINVD exiting */ + "\010UG" /* Unrestricted guest */ + "\011APIC-reg" /* APIC-register virtualization */ + "\012VID" /* Virtual-interrupt delivery */ + "\013PAUSE-loop" /* PAUSE-loop exiting */ + "\014RDRAND" /* RDRAND exiting */ + "\015INVPCID" /* Enable INVPCID */ + "\016VMFUNC" /* Enable VM functions */ + "\017VMCS" /* VMCS shadowing */ + "\020EPT#VE" /* EPT-violation #VE */ + "\021XSAVES" /* Enable XSAVES/XRSTORS */ + ); + printf("\n Exit Controls=0x%b", mask, + "\020" + "\003DR" /* Save debug controls */ + /* Ignore Host address-space size */ + "\015PERF" /* Load MSR_PERF_GLOBAL_CTRL */ + "\020AckInt" /* Acknowledge interrupt on exit */ + "\023PAT-SV" /* Save MSR_PAT */ + "\024PAT-LD" /* Load MSR_PAT */ + "\025EFER-SV" /* Save MSR_EFER */ + "\026EFER-LD" /* Load MSR_EFER */ + "\027PTMR-SV" /* Save VMX-preemption timer value */ + ); + printf("\n Entry Controls=0x%b", mask, + "\020" + "\003DR" /* Save debug controls */ + /* Ignore IA-32e mode guest */ + /* Ignore Entry to SMM */ + /* Ignore Deactivate dual-monitor treatment */ + "\016PERF" /* Load MSR_PERF_GLOBAL_CTRL */ + "\017PAT" /* Load MSR_PAT */ + "\020EFER" /* Load MSR_EFER */ + ); + if (proc & PROCBASED_SECONDARY_CONTROLS && + (proc2 & (PROCBASED2_ENABLE_EPT | PROCBASED2_ENABLE_VPID)) != 0) { + msr = rdmsr(MSR_VMX_EPT_VPID_CAP); + mask = msr; + printf("\n EPT Features=0x%b", mask, + "\020" + "\001XO" /* Execute-only translations */ + "\007PW4" /* Page-walk length of 4 */ + "\011UC" /* EPT paging-structure mem can be UC */ + "\017WB" /* EPT paging-structure mem can be WB */ + "\0212M" /* EPT PDE can map a 2-Mbyte page */ + "\0221G" /* EPT PDPTE can map a 1-Gbyte page */ + "\025INVEPT" /* INVEPT is supported */ + "\026AD" /* Accessed and dirty flags for EPT */ + "\032single" /* INVEPT single-context type */ + "\033all" /* INVEPT all-context type */ + ); + mask = msr >> 32; + printf("\n VPID Features=0x%b", mask, + "\020" + "\001INVVPID" /* INVVPID is supported */ + "\011individual" /* INVVPID individual-address type */ + "\012single" /* INVVPID single-context type */ + "\013all" /* INVVPID all-context type */ + /* INVVPID single-context-retaining-globals type */ + "\014single-globals" + ); + } +} Modified: stable/10/sys/amd64/include/vmm.h ============================================================================== --- stable/10/sys/amd64/include/vmm.h Mon Aug 18 23:45:40 2014 (r270158) +++ stable/10/sys/amd64/include/vmm.h Tue Aug 19 01:20:24 2014 (r270159) @@ -29,11 +29,14 @@ #ifndef _VMM_H_ #define _VMM_H_ +#include + enum vm_suspend_how { VM_SUSPEND_NONE, VM_SUSPEND_RESET, VM_SUSPEND_POWEROFF, VM_SUSPEND_HALT, + VM_SUSPEND_TRIPLEFAULT, VM_SUSPEND_LAST }; @@ -75,6 +78,10 @@ enum vm_reg_name { VM_REG_GUEST_GDTR, VM_REG_GUEST_EFER, VM_REG_GUEST_CR2, + VM_REG_GUEST_PDPTE0, + VM_REG_GUEST_PDPTE1, + VM_REG_GUEST_PDPTE2, + VM_REG_GUEST_PDPTE3, VM_REG_LAST }; @@ -84,6 +91,16 @@ enum x2apic_state { X2APIC_STATE_LAST }; +#define VM_INTINFO_VECTOR(info) ((info) & 0xff) +#define VM_INTINFO_DEL_ERRCODE 0x800 +#define VM_INTINFO_RSVD 0x7ffff000 +#define VM_INTINFO_VALID 0x80000000 +#define VM_INTINFO_TYPE 0x700 +#define VM_INTINFO_HWINTR (0 << 8) +#define VM_INTINFO_NMI (2 << 8) +#define VM_INTINFO_HWEXCEPTION (3 << 8) +#define VM_INTINFO_SWINTR (4 << 8) + #ifdef _KERNEL #define VM_MAX_NAMELEN 32 @@ -99,6 +116,7 @@ struct vioapic; struct vlapic; struct vmspace; struct vm_object; +struct vm_guest_paging; struct pmap; typedef int (*vmm_init_func_t)(int ipinum); @@ -252,6 +270,14 @@ vcpu_is_running(struct vm *vm, int vcpu, return (vcpu_get_state(vm, vcpu, hostcpu) == VCPU_RUNNING); } +#ifdef _SYS_PROC_H_ +static int __inline +vcpu_should_yield(struct vm *vm, int vcpu) +{ + return (curthread->td_flags & (TDF_ASTPENDING | TDF_NEEDRESCHED)); +} +#endif + void *vcpu_stats(struct vm *vm, int vcpu); void vcpu_notify_event(struct vm *vm, int vcpuid, bool lapic_intr); struct vmspace *vm_get_vmspace(struct vm *vm); @@ -274,21 +300,63 @@ struct vatpit *vm_atpit(struct vm *vm); int vm_inject_exception(struct vm *vm, int vcpuid, struct vm_exception *vme); /* - * Returns 0 if there is no exception pending for this vcpu. Returns 1 if an - * exception is pending and also updates 'vme'. The pending exception is - * cleared when this function returns. + * This function is called after a VM-exit that occurred during exception or + * interrupt delivery through the IDT. The format of 'intinfo' is described + * in Figure 15-1, "EXITINTINFO for All Intercepts", APM, Vol 2. * - * This function should only be called in the context of the thread that is - * executing this vcpu. + * If a VM-exit handler completes the event delivery successfully then it + * should call vm_exit_intinfo() to extinguish the pending event. For e.g., + * if the task switch emulation is triggered via a task gate then it should + * call this function with 'intinfo=0' to indicate that the external event + * is not pending anymore. + * + * Return value is 0 on success and non-zero on failure. */ -int vm_exception_pending(struct vm *vm, int vcpuid, struct vm_exception *vme); +int vm_exit_intinfo(struct vm *vm, int vcpuid, uint64_t intinfo); -void vm_inject_gp(struct vm *vm, int vcpuid); /* general protection fault */ -void vm_inject_ud(struct vm *vm, int vcpuid); /* undefined instruction fault */ -void vm_inject_pf(struct vm *vm, int vcpuid, int error_code, uint64_t cr2); +/* + * This function is called before every VM-entry to retrieve a pending + * event that should be injected into the guest. This function combines + * nested events into a double or triple fault. + * + * Returns 0 if there are no events that need to be injected into the guest + * and non-zero otherwise. + */ +int vm_entry_intinfo(struct vm *vm, int vcpuid, uint64_t *info); + +int vm_get_intinfo(struct vm *vm, int vcpuid, uint64_t *info1, uint64_t *info2); enum vm_reg_name vm_segment_name(int seg_encoding); +struct vm_copyinfo { + uint64_t gpa; + size_t len; + void *hva; + void *cookie; +}; + +/* + * Set up 'copyinfo[]' to copy to/from guest linear address space starting + * at 'gla' and 'len' bytes long. The 'prot' should be set to PROT_READ for + * a copyin or PROT_WRITE for a copyout. + * + * Returns 0 on success. + * Returns 1 if an exception was injected into the guest. + * Returns -1 otherwise. + * + * The 'copyinfo[]' can be passed to 'vm_copyin()' or 'vm_copyout()' only if + * the return value is 0. The 'copyinfo[]' resources should be freed by calling + * 'vm_copy_teardown()' after the copy is done. + */ +int vm_copy_setup(struct vm *vm, int vcpuid, struct vm_guest_paging *paging, + uint64_t gla, size_t len, int prot, struct vm_copyinfo *copyinfo, + int num_copyinfo); +void vm_copy_teardown(struct vm *vm, int vcpuid, struct vm_copyinfo *copyinfo, + int num_copyinfo); +void vm_copyin(struct vm *vm, int vcpuid, struct vm_copyinfo *copyinfo, + void *kaddr, size_t len); +void vm_copyout(struct vm *vm, int vcpuid, const void *kaddr, + struct vm_copyinfo *copyinfo, size_t len); #endif /* KERNEL */ #define VM_MAXCPU 16 /* maximum virtual cpus */ @@ -322,13 +390,16 @@ struct seg_desc { uint32_t limit; uint32_t access; }; -#define SEG_DESC_TYPE(desc) ((desc)->access & 0x001f) -#define SEG_DESC_PRESENT(desc) ((desc)->access & 0x0080) -#define SEG_DESC_DEF32(desc) ((desc)->access & 0x4000) -#define SEG_DESC_GRANULARITY(desc) ((desc)->access & 0x8000) -#define SEG_DESC_UNUSABLE(desc) ((desc)->access & 0x10000) +#define SEG_DESC_TYPE(access) ((access) & 0x001f) +#define SEG_DESC_DPL(access) (((access) >> 5) & 0x3) +#define SEG_DESC_PRESENT(access) (((access) & 0x0080) ? 1 : 0) +#define SEG_DESC_DEF32(access) (((access) & 0x4000) ? 1 : 0) +#define SEG_DESC_GRANULARITY(access) (((access) & 0x8000) ? 1 : 0) +#define SEG_DESC_UNUSABLE(access) (((access) & 0x10000) ? 1 : 0) enum vm_cpu_mode { + CPU_MODE_REAL, + CPU_MODE_PROTECTED, CPU_MODE_COMPATIBILITY, /* IA-32E mode (CS.L = 0) */ CPU_MODE_64BIT, /* IA-32E mode (CS.L = 1) */ }; @@ -364,11 +435,14 @@ struct vie { uint8_t num_valid; /* size of the instruction */ uint8_t num_processed; + uint8_t addrsize:4, opsize:4; /* address and operand sizes */ uint8_t rex_w:1, /* REX prefix */ rex_r:1, rex_x:1, rex_b:1, - rex_present:1; + rex_present:1, + opsize_override:1, /* Operand size override */ + addrsize_override:1; /* Address size override */ uint8_t mod:2, /* ModRM byte */ reg:4, @@ -410,6 +484,7 @@ enum vm_exitcode { VM_EXITCODE_IOAPIC_EOI, VM_EXITCODE_SUSPENDED, VM_EXITCODE_INOUT_STR, + VM_EXITCODE_TASK_SWITCH, VM_EXITCODE_MAX }; @@ -434,6 +509,22 @@ struct vm_inout_str { struct seg_desc seg_desc; }; +enum task_switch_reason { + TSR_CALL, + TSR_IRET, + TSR_JMP, + TSR_IDT_GATE, /* task gate in IDT */ +}; + +struct vm_task_switch { + uint16_t tsssel; /* new TSS selector */ + int ext; /* task switch due to external event */ + uint32_t errcode; + int errcode_valid; /* push 'errcode' on the new stack */ + enum task_switch_reason reason; + struct vm_guest_paging paging; +}; + struct vm_exit { enum vm_exitcode exitcode; int inst_length; /* 0 means unknown */ @@ -448,6 +539,7 @@ struct vm_exit { struct { uint64_t gpa; uint64_t gla; + int cs_d; /* CS.D */ struct vm_guest_paging paging; struct vie vie; } inst_emul; @@ -487,7 +579,38 @@ struct vm_exit { struct { enum vm_suspend_how how; } suspended; + struct vm_task_switch task_switch; } u; }; +/* APIs to inject faults into the guest */ +void vm_inject_fault(void *vm, int vcpuid, int vector, int errcode_valid, + int errcode); + +static void __inline +vm_inject_ud(void *vm, int vcpuid) +{ + vm_inject_fault(vm, vcpuid, IDT_UD, 0, 0); +} + +static void __inline +vm_inject_gp(void *vm, int vcpuid) +{ + vm_inject_fault(vm, vcpuid, IDT_GP, 1, 0); +} + +static void __inline +vm_inject_ac(void *vm, int vcpuid, int errcode) +{ + vm_inject_fault(vm, vcpuid, IDT_AC, 1, errcode); +} + +static void __inline +vm_inject_ss(void *vm, int vcpuid, int errcode) +{ + vm_inject_fault(vm, vcpuid, IDT_SS, 1, errcode); +} + +void vm_inject_pf(void *vm, int vcpuid, int error_code, uint64_t cr2); + #endif /* _VMM_H_ */ Modified: stable/10/sys/amd64/include/vmm_dev.h ============================================================================== --- stable/10/sys/amd64/include/vmm_dev.h Mon Aug 18 23:45:40 2014 (r270158) +++ stable/10/sys/amd64/include/vmm_dev.h Tue Aug 19 01:20:24 2014 (r270159) @@ -189,6 +189,12 @@ struct vm_cpuset { #define VM_ACTIVE_CPUS 0 #define VM_SUSPENDED_CPUS 1 +struct vm_intinfo { + int vcpuid; + uint64_t info1; + uint64_t info2; +}; + enum { /* general routines */ IOCNUM_ABIVERS = 0, @@ -211,6 +217,8 @@ enum { IOCNUM_GET_SEGMENT_DESCRIPTOR = 23, /* interrupt injection */ + IOCNUM_GET_INTINFO = 28, + IOCNUM_SET_INTINFO = 29, IOCNUM_INJECT_EXCEPTION = 30, IOCNUM_LAPIC_IRQ = 31, IOCNUM_INJECT_NMI = 32, @@ -324,4 +332,8 @@ enum { _IOW('v', IOCNUM_ACTIVATE_CPU, struct vm_activate_cpu) #define VM_GET_CPUS \ _IOW('v', IOCNUM_GET_CPUSET, struct vm_cpuset) +#define VM_SET_INTINFO \ + _IOW('v', IOCNUM_SET_INTINFO, struct vm_intinfo) +#define VM_GET_INTINFO \ + _IOWR('v', IOCNUM_GET_INTINFO, struct vm_intinfo) #endif Modified: stable/10/sys/amd64/include/vmm_instruction_emul.h ============================================================================== --- stable/10/sys/amd64/include/vmm_instruction_emul.h Mon Aug 18 23:45:40 2014 (r270158) +++ stable/10/sys/amd64/include/vmm_instruction_emul.h Tue Aug 19 01:20:24 2014 (r270159) @@ -52,8 +52,8 @@ typedef int (*mem_region_write_t)(void * * s */ int vmm_emulate_instruction(void *vm, int cpuid, uint64_t gpa, struct vie *vie, - mem_region_read_t mrr, mem_region_write_t mrw, - void *mrarg); + struct vm_guest_paging *paging, mem_region_read_t mrr, + mem_region_write_t mrw, void *mrarg); int vie_update_register(void *vm, int vcpuid, enum vm_reg_name reg, uint64_t val, int size); @@ -108,7 +108,7 @@ void vie_init(struct vie *vie); */ #define VIE_INVALID_GLA (1UL << 63) /* a non-canonical address */ int vmm_decode_instruction(struct vm *vm, int cpuid, uint64_t gla, - enum vm_cpu_mode cpu_mode, struct vie *vie); + enum vm_cpu_mode cpu_mode, int csd, struct vie *vie); #endif /* _KERNEL */ #endif /* _VMM_INSTRUCTION_EMUL_H_ */ Modified: stable/10/sys/amd64/vmm/intel/vmcs.c ============================================================================== --- stable/10/sys/amd64/vmm/intel/vmcs.c Mon Aug 18 23:45:40 2014 (r270158) +++ stable/10/sys/amd64/vmm/intel/vmcs.c Tue Aug 19 01:20:24 2014 (r270159) @@ -103,6 +103,14 @@ vmcs_field_encoding(int ident) return (VMCS_GUEST_LDTR_SELECTOR); case VM_REG_GUEST_EFER: return (VMCS_GUEST_IA32_EFER); + case VM_REG_GUEST_PDPTE0: + return (VMCS_GUEST_PDPTE0); + case VM_REG_GUEST_PDPTE1: + return (VMCS_GUEST_PDPTE1); + case VM_REG_GUEST_PDPTE2: + return (VMCS_GUEST_PDPTE2); + case VM_REG_GUEST_PDPTE3: + return (VMCS_GUEST_PDPTE3); default: return (-1); } Modified: stable/10/sys/amd64/vmm/intel/vmcs.h ============================================================================== --- stable/10/sys/amd64/vmm/intel/vmcs.h Mon Aug 18 23:45:40 2014 (r270158) +++ stable/10/sys/amd64/vmm/intel/vmcs.h Tue Aug 19 01:20:24 2014 (r270159) @@ -346,6 +346,9 @@ vmcs_write(uint32_t encoding, uint64_t v #define VMCS_INTR_T_HWINTR (0 << 8) #define VMCS_INTR_T_NMI (2 << 8) #define VMCS_INTR_T_HWEXCEPTION (3 << 8) +#define VMCS_INTR_T_SWINTR (4 << 8) +#define VMCS_INTR_T_PRIV_SWEXCEPTION (5 << 8) +#define VMCS_INTR_T_SWEXCEPTION (6 << 8) #define VMCS_INTR_DEL_ERRCODE (1 << 11) /* Modified: stable/10/sys/amd64/vmm/intel/vmx.c ============================================================================== --- stable/10/sys/amd64/vmm/intel/vmx.c Mon Aug 18 23:45:40 2014 (r270158) +++ stable/10/sys/amd64/vmm/intel/vmx.c Tue Aug 19 01:20:24 2014 (r270159) @@ -149,8 +149,6 @@ SYSCTL_ULONG(_hw_vmm_vmx, OID_AUTO, cr4_ SYSCTL_ULONG(_hw_vmm_vmx, OID_AUTO, cr4_zeros_mask, CTLFLAG_RD, &cr4_zeros_mask, 0, NULL); -static int vmx_no_patmsr; - static int vmx_initialized; SYSCTL_INT(_hw_vmm_vmx, OID_AUTO, initialized, CTLFLAG_RD, &vmx_initialized, 0, "Intel VMX initialized"); @@ -158,18 +156,38 @@ SYSCTL_INT(_hw_vmm_vmx, OID_AUTO, initia /* * Optional capabilities */ +static SYSCTL_NODE(_hw_vmm_vmx, OID_AUTO, cap, CTLFLAG_RW, NULL, NULL); + +static int vmx_patmsr; +SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, patmsr, CTLFLAG_RD, &vmx_patmsr, 0, + "PAT MSR saved and restored in VCMS"); + static int cap_halt_exit; +SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, halt_exit, CTLFLAG_RD, &cap_halt_exit, 0, + "HLT triggers a VM-exit"); + static int cap_pause_exit; +SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, pause_exit, CTLFLAG_RD, &cap_pause_exit, + 0, "PAUSE triggers a VM-exit"); + static int cap_unrestricted_guest; +SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, unrestricted_guest, CTLFLAG_RD, + &cap_unrestricted_guest, 0, "Unrestricted guests"); + static int cap_monitor_trap; +SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, monitor_trap, CTLFLAG_RD, + &cap_monitor_trap, 0, "Monitor trap flag"); + static int cap_invpcid; +SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, invpcid, CTLFLAG_RD, &cap_invpcid, + 0, "Guests are allowed to use INVPCID"); static int virtual_interrupt_delivery; -SYSCTL_INT(_hw_vmm_vmx, OID_AUTO, virtual_interrupt_delivery, CTLFLAG_RD, +SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, virtual_interrupt_delivery, CTLFLAG_RD, &virtual_interrupt_delivery, 0, "APICv virtual interrupt delivery support"); static int posted_interrupts; -SYSCTL_INT(_hw_vmm_vmx, OID_AUTO, posted_interrupts, CTLFLAG_RD, +SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, posted_interrupts, CTLFLAG_RD, &posted_interrupts, 0, "APICv posted interrupt support"); static int pirvec; @@ -618,6 +636,7 @@ vmx_init(int ipinum) } /* Check support for VM-exit controls */ + vmx_patmsr = 1; error = vmx_set_ctlreg(MSR_VMX_EXIT_CTLS, MSR_VMX_TRUE_EXIT_CTLS, VM_EXIT_CTLS_ONE_SETTING, VM_EXIT_CTLS_ZERO_SETTING, @@ -637,12 +656,12 @@ vmx_init(int ipinum) if (bootverbose) printf("vmm: PAT MSR access not supported\n"); guest_msr_valid(MSR_PAT); - vmx_no_patmsr = 1; + vmx_patmsr = 0; } } /* Check support for VM-entry controls */ - if (!vmx_no_patmsr) { + if (vmx_patmsr) { error = vmx_set_ctlreg(MSR_VMX_ENTRY_CTLS, MSR_VMX_TRUE_ENTRY_CTLS, VM_ENTRY_CTLS_ONE_SETTING, @@ -918,7 +937,7 @@ vmx_vminit(struct vm *vm, pmap_t pmap) * MSR_PAT save/restore support, leave access disabled so accesses * will be trapped. */ - if (!vmx_no_patmsr && guest_msr_rw(vmx, MSR_PAT)) + if (vmx_patmsr && guest_msr_rw(vmx, MSR_PAT)) panic("vmx_vminit: error setting guest pat msr access"); vpid_alloc(vpid, VM_MAXCPU); @@ -974,7 +993,7 @@ vmx_vminit(struct vm *vm, pmap_t pmap) vmx->cap[i].proc_ctls = procbased_ctls; vmx->cap[i].proc_ctls2 = procbased_ctls2; - vmx->state[i].lastcpu = -1; + vmx->state[i].lastcpu = NOCPU; vmx->state[i].vpid = vpid[i]; msr_save_area_init(vmx->guest_msrs[i], &guest_msr_count); @@ -1047,27 +1066,37 @@ vmx_astpending_trace(struct vmx *vmx, in } static VMM_STAT_INTEL(VCPU_INVVPID_SAVED, "Number of vpid invalidations saved"); +static VMM_STAT_INTEL(VCPU_INVVPID_DONE, "Number of vpid invalidations done"); -static void -vmx_set_pcpu_defaults(struct vmx *vmx, int vcpu, pmap_t pmap) +/* + * Invalidate guest mappings identified by its vpid from the TLB. + */ +static __inline void +vmx_invvpid(struct vmx *vmx, int vcpu, pmap_t pmap, int running) { struct vmxstate *vmxstate; struct invvpid_desc invvpid_desc; vmxstate = &vmx->state[vcpu]; - if (vmxstate->lastcpu == curcpu) + if (vmxstate->vpid == 0) return; - vmxstate->lastcpu = curcpu; - - vmm_stat_incr(vmx->vm, vcpu, VCPU_MIGRATIONS, 1); + if (!running) { + /* + * Set the 'lastcpu' to an invalid host cpu. + * + * This will invalidate TLB entries tagged with the vcpu's + * vpid the next time it runs via vmx_set_pcpu_defaults(). + */ + vmxstate->lastcpu = NOCPU; + return; + } - vmcs_write(VMCS_HOST_TR_BASE, vmm_get_host_trbase()); - vmcs_write(VMCS_HOST_GDTR_BASE, vmm_get_host_gdtrbase()); - vmcs_write(VMCS_HOST_GS_BASE, vmm_get_host_gsbase()); + KASSERT(curthread->td_critnest > 0, ("%s: vcpu %d running outside " + "critical section", __func__, vcpu)); /* - * If we are using VPIDs then invalidate all mappings tagged with 'vpid' + * Invalidate all mappings tagged with 'vpid' * * We do this because this vcpu was executing on a different host * cpu when it last ran. We do not track whether it invalidated @@ -1081,25 +1110,43 @@ vmx_set_pcpu_defaults(struct vmx *vmx, i * Note also that this will invalidate mappings tagged with 'vpid' * for "all" EP4TAs. */ - if (vmxstate->vpid != 0) { - if (pmap->pm_eptgen == vmx->eptgen[curcpu]) { - invvpid_desc._res1 = 0; - invvpid_desc._res2 = 0; - invvpid_desc.vpid = vmxstate->vpid; - invvpid_desc.linear_addr = 0; - invvpid(INVVPID_TYPE_SINGLE_CONTEXT, invvpid_desc); - } else { - /* - * The invvpid can be skipped if an invept is going to - * be performed before entering the guest. The invept - * will invalidate combined mappings tagged with - * 'vmx->eptp' for all vpids. - */ - vmm_stat_incr(vmx->vm, vcpu, VCPU_INVVPID_SAVED, 1); - } + if (pmap->pm_eptgen == vmx->eptgen[curcpu]) { + invvpid_desc._res1 = 0; + invvpid_desc._res2 = 0; + invvpid_desc.vpid = vmxstate->vpid; + invvpid_desc.linear_addr = 0; + invvpid(INVVPID_TYPE_SINGLE_CONTEXT, invvpid_desc); + vmm_stat_incr(vmx->vm, vcpu, VCPU_INVVPID_DONE, 1); + } else { + /* + * The invvpid can be skipped if an invept is going to + * be performed before entering the guest. The invept + * will invalidate combined mappings tagged with + * 'vmx->eptp' for all vpids. + */ + vmm_stat_incr(vmx->vm, vcpu, VCPU_INVVPID_SAVED, 1); } } +static void +vmx_set_pcpu_defaults(struct vmx *vmx, int vcpu, pmap_t pmap) +{ + struct vmxstate *vmxstate; + + vmxstate = &vmx->state[vcpu]; + if (vmxstate->lastcpu == curcpu) + return; + + vmxstate->lastcpu = curcpu; + + vmm_stat_incr(vmx->vm, vcpu, VCPU_MIGRATIONS, 1); + + vmcs_write(VMCS_HOST_TR_BASE, vmm_get_host_trbase()); + vmcs_write(VMCS_HOST_GDTR_BASE, vmm_get_host_gdtrbase()); + vmcs_write(VMCS_HOST_GS_BASE, vmm_get_host_gsbase()); + vmx_invvpid(vmx, vcpu, pmap, 1); +} + /* * We depend on 'procbased_ctls' to have the Interrupt Window Exiting bit set. */ @@ -1183,24 +1230,32 @@ vmx_inject_nmi(struct vmx *vmx, int vcpu static void vmx_inject_interrupts(struct vmx *vmx, int vcpu, struct vlapic *vlapic) { - struct vm_exception exc; int vector, need_nmi_exiting, extint_pending; - uint64_t rflags; + uint64_t rflags, entryinfo; uint32_t gi, info; - if (vm_exception_pending(vmx->vm, vcpu, &exc)) { - KASSERT(exc.vector >= 0 && exc.vector < 32, - ("%s: invalid exception vector %d", __func__, exc.vector)); + if (vm_entry_intinfo(vmx->vm, vcpu, &entryinfo)) { + KASSERT((entryinfo & VMCS_INTR_VALID) != 0, ("%s: entry " + "intinfo is not valid: %#lx", __func__, entryinfo)); info = vmcs_read(VMCS_ENTRY_INTR_INFO); KASSERT((info & VMCS_INTR_VALID) == 0, ("%s: cannot inject " - "pending exception %d: %#x", __func__, exc.vector, info)); + "pending exception: %#lx/%#x", __func__, entryinfo, info)); - info = exc.vector | VMCS_INTR_T_HWEXCEPTION | VMCS_INTR_VALID; - if (exc.error_code_valid) { - info |= VMCS_INTR_DEL_ERRCODE; - vmcs_write(VMCS_ENTRY_EXCEPTION_ERROR, exc.error_code); + info = entryinfo; + vector = info & 0xff; + if (vector == IDT_BP || vector == IDT_OF) { + /* + * VT-x requires #BP and #OF to be injected as software + * exceptions. + */ + info &= ~VMCS_INTR_T_MASK; + info |= VMCS_INTR_T_SWEXCEPTION; } + + if (info & VMCS_INTR_DEL_ERRCODE) + vmcs_write(VMCS_ENTRY_EXCEPTION_ERROR, entryinfo >> 32); + vmcs_write(VMCS_ENTRY_INTR_INFO, info); } @@ -1379,6 +1434,16 @@ vmx_clear_nmi_blocking(struct vmx *vmx, vmcs_write(VMCS_GUEST_INTERRUPTIBILITY, gi); } +static void +vmx_assert_nmi_blocking(struct vmx *vmx, int vcpuid) +{ + uint32_t gi; + + gi = vmcs_read(VMCS_GUEST_INTERRUPTIBILITY); + KASSERT(gi & VMCS_INTERRUPTIBILITY_NMI_BLOCKING, + ("NMI blocking is not in effect %#x", gi)); +} + static int vmx_emulate_xsetbv(struct vmx *vmx, int vcpu, struct vm_exit *vmexit) { @@ -1659,11 +1724,19 @@ vmx_cpl(void) static enum vm_cpu_mode vmx_cpu_mode(void) { + uint32_t csar; - if (vmcs_read(VMCS_GUEST_IA32_EFER) & EFER_LMA) - return (CPU_MODE_64BIT); - else - return (CPU_MODE_COMPATIBILITY); + if (vmcs_read(VMCS_GUEST_IA32_EFER) & EFER_LMA) { + csar = vmcs_read(VMCS_GUEST_CS_ACCESS_RIGHTS); + if (csar & 0x2000) + return (CPU_MODE_64BIT); /* CS.L = 1 */ + else + return (CPU_MODE_COMPATIBILITY); + } else if (vmcs_read(VMCS_GUEST_CR0) & CR0_PE) { + return (CPU_MODE_PROTECTED); + } else { + return (CPU_MODE_REAL); + } } static enum vm_paging_mode @@ -1757,10 +1830,25 @@ vmx_paging_info(struct vm_guest_paging * static void vmexit_inst_emul(struct vm_exit *vmexit, uint64_t gpa, uint64_t gla) { + struct vm_guest_paging *paging; + uint32_t csar; + + paging = &vmexit->u.inst_emul.paging; + vmexit->exitcode = VM_EXITCODE_INST_EMUL; vmexit->u.inst_emul.gpa = gpa; vmexit->u.inst_emul.gla = gla; - vmx_paging_info(&vmexit->u.inst_emul.paging); + vmx_paging_info(paging); + switch (paging->cpu_mode) { + case CPU_MODE_PROTECTED: + case CPU_MODE_COMPATIBILITY: + csar = vmcs_read(VMCS_GUEST_CS_ACCESS_RIGHTS); + vmexit->u.inst_emul.cs_d = SEG_DESC_DEF32(csar); + break; + default: + vmexit->u.inst_emul.cs_d = 0; + break; + } } static int @@ -1969,6 +2057,26 @@ vmx_handle_apic_access(struct vmx *vmx, return (UNHANDLED); } +static enum task_switch_reason +vmx_task_switch_reason(uint64_t qual) +{ + int reason; + + reason = (qual >> 30) & 0x3; + switch (reason) { + case 0: + return (TSR_CALL); + case 1: + return (TSR_IRET); + case 2: + return (TSR_JMP); + case 3: + return (TSR_IDT_GATE); + default: + panic("%s: invalid reason %d", __func__, reason); + } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From danfe at FreeBSD.org Tue Aug 19 01:31:12 2014 From: danfe at FreeBSD.org (Alexey Dokuchaev) Date: Tue, 19 Aug 2014 01:31:12 +0000 Subject: svn commit: r270099 - in stable: 10/contrib/gcc/config/i386 9/contrib/gcc/config/i386 In-Reply-To: <53F25399.40204@freebsd.org> References: <201408171308.s7HD8Fnh099147@svn.freebsd.org> <20140817131942.GA38672@FreeBSD.org> <8CA269F6-BCD2-4E78-947F-682214367F36@FreeBSD.org> <20140817134509.GA47327@FreeBSD.org> <9181921C-43BB-48C9-B63D-7C6F99D7A763@FreeBSD.org> <53F25399.40204@freebsd.org> Message-ID: <20140819013112.GA5938@FreeBSD.org> On Mon, Aug 18, 2014 at 02:27:21PM -0500, Pedro Giffuni wrote: > I personally stopped merging stuff to the stable/8 branch and more recently > to the stable/9 branch as I don't run those anymore. In the case of the > stable/8 branch I find the ancient version of binutils a real threat/ > limitation. Contemporary version of binutils can be installed from the port, right? I don't have a problem with it since binutils are relatively fast to build and releases do not happen that often to become annoying. > I would really suggest people move on to at least stable/9 which has all > the clang cleanups and should be functionally much better. Clang/LLVM is a nuisance to build, which is one of the reason to avoid 9+ on my rusty laptop. I run -CURRENT more or less happily on modern hardware. ./danfe From pfg at freebsd.org Tue Aug 19 04:06:07 2014 From: pfg at freebsd.org (Pedro Giffuni) Date: Mon, 18 Aug 2014 23:05:59 -0500 Subject: svn commit: r270099 - in stable: 10/contrib/gcc/config/i386 9/contrib/gcc/config/i386 In-Reply-To: <20140819013112.GA5938@FreeBSD.org> References: <201408171308.s7HD8Fnh099147@svn.freebsd.org> <20140817131942.GA38672@FreeBSD.org> <8CA269F6-BCD2-4E78-947F-682214367F36@FreeBSD.org> <20140817134509.GA47327@FreeBSD.org> <9181921C-43BB-48C9-B63D-7C6F99D7A763@FreeBSD.org> <53F25399.40204@freebsd.org> <20140819013112.GA5938@FreeBSD.org> Message-ID: <38DE0BE3-EE01-4B9C-A604-74F95FD5F084@freebsd.org> Il giorno 18/ago/2014, alle ore 20:31, Alexey Dokuchaev ha scritto: > On Mon, Aug 18, 2014 at 02:27:21PM -0500, Pedro Giffuni wrote: >> I personally stopped merging stuff to the stable/8 branch and more recently >> to the stable/9 branch as I don't run those anymore. In the case of the >> stable/8 branch I find the ancient version of binutils a real threat/ >> limitation. > > Contemporary version of binutils can be installed from the port, right? I > don't have a problem with it since binutils are relatively fast to build > and releases do not happen that often to become annoying. > We are talking about updates to the base that may be affected by the binutils version. I have no idea if the base system in stable/8 will work with the version in ports but still that doesn?t solve the issue one might have merging code that expects binutils 2.17.1+ and that will therefore break the tinderbox. >> I would really suggest people move on to at least stable/9 which has all >> the clang cleanups and should be functionally much better. > > Clang/LLVM is a nuisance to build, which is one of the reason to avoid 9+ > on my rusty laptop. I run -CURRENT more or less happily on modern hardware. > I meant 9.x has cleanups that make the base system build cleanly with both clang and gcc. 8.x has been lagging many suchcleanups. You can disable building clang in /etc/src.conf, and I actually do that when testing crossbuilds. Pedro. From hselasky at FreeBSD.org Tue Aug 19 11:04:25 2014 From: hselasky at FreeBSD.org (Hans Petter Selasky) Date: Tue, 19 Aug 2014 11:04:25 +0000 (UTC) Subject: svn commit: r270166 - stable/10/sys/ofed/include/linux Message-ID: <201408191104.s7JB4Pp0074119@svn.freebsd.org> Author: hselasky Date: Tue Aug 19 11:04:24 2014 New Revision: 270166 URL: http://svnweb.freebsd.org/changeset/base/270166 Log: MFC r269859: Fix for memory leak. Sponsored by: Mellanox Technologies Modified: stable/10/sys/ofed/include/linux/linux_radix.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ofed/include/linux/linux_radix.c ============================================================================== --- stable/10/sys/ofed/include/linux/linux_radix.c Tue Aug 19 09:02:58 2014 (r270165) +++ stable/10/sys/ofed/include/linux/linux_radix.c Tue Aug 19 11:04:24 2014 (r270166) @@ -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 hselasky at FreeBSD.org Tue Aug 19 11:06:22 2014 From: hselasky at FreeBSD.org (Hans Petter Selasky) Date: Tue, 19 Aug 2014 11:06:22 +0000 (UTC) Subject: svn commit: r270167 - stable/9/sys/ofed/include/linux Message-ID: <201408191106.s7JB6Mfo074459@svn.freebsd.org> Author: hselasky Date: Tue Aug 19 11:06:21 2014 New Revision: 270167 URL: http://svnweb.freebsd.org/changeset/base/270167 Log: MFC r269859: Fix for memory leak. Sponsored by: Mellanox Technologies Modified: stable/9/sys/ofed/include/linux/linux_radix.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ofed/include/linux/linux_radix.c ============================================================================== --- stable/9/sys/ofed/include/linux/linux_radix.c Tue Aug 19 11:04:24 2014 (r270166) +++ stable/9/sys/ofed/include/linux/linux_radix.c Tue Aug 19 11:06:21 2014 (r270167) @@ -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 bdrewery at FreeBSD.org Tue Aug 19 15:49:39 2014 From: bdrewery at FreeBSD.org (Bryan Drewery) Date: Tue, 19 Aug 2014 15:49:38 +0000 (UTC) Subject: svn commit: r270174 - stable/10/sys/sys Message-ID: <201408191549.s7JFncAV008433@svn.freebsd.org> Author: bdrewery Date: Tue Aug 19 15:49:38 2014 New Revision: 270174 URL: http://svnweb.freebsd.org/changeset/base/270174 Log: Bump __FreeBSD_version after r269490 so ports can use it. Modified: stable/10/sys/sys/param.h Modified: stable/10/sys/sys/param.h ============================================================================== --- stable/10/sys/sys/param.h Tue Aug 19 15:47:51 2014 (r270173) +++ stable/10/sys/sys/param.h Tue Aug 19 15:49:38 2014 (r270174) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1000713 /* Master, propagated to newvers */ +#define __FreeBSD_version 1000714 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From bdrewery at FreeBSD.org Tue Aug 19 15:51:44 2014 From: bdrewery at FreeBSD.org (Bryan Drewery) Date: Tue, 19 Aug 2014 15:51:43 +0000 (UTC) Subject: svn commit: r270175 - stable/9/sys/sys Message-ID: <201408191551.s7JFph5J011975@svn.freebsd.org> Author: bdrewery Date: Tue Aug 19 15:51:43 2014 New Revision: 270175 URL: http://svnweb.freebsd.org/changeset/base/270175 Log: Bump __FreeBSD_version after r269789 so ports can use it. Modified: stable/9/sys/sys/param.h Modified: stable/9/sys/sys/param.h ============================================================================== --- stable/9/sys/sys/param.h Tue Aug 19 15:49:38 2014 (r270174) +++ stable/9/sys/sys/param.h Tue Aug 19 15:51:43 2014 (r270175) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 903501 /* Master, propagated to newvers */ +#define __FreeBSD_version 903502 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From jhb at FreeBSD.org Tue Aug 19 17:54:17 2014 From: jhb at FreeBSD.org (John Baldwin) Date: Tue, 19 Aug 2014 17:54:15 +0000 (UTC) Subject: svn commit: r270177 - in stable/8: tools/regression/usr.sbin/etcupdate usr.sbin usr.sbin/etcupdate Message-ID: <201408191754.s7JHsF2M069832@svn.freebsd.org> Author: jhb Date: Tue Aug 19 17:54:15 2014 New Revision: 270177 URL: http://svnweb.freebsd.org/changeset/base/270177 Log: MFC 238423,238426,238428,258063,258064,258066,258097,258185,259134: The etcupdate utility is a tool for managing updates to files that are not updated as part of `make installworld' such as files in /etc. It manages updates by doing a three-way merge of changes made to these files against the local versions. It is also designed to minimize the amount of user intervention with the goal of simplifying upgrades for clusters of machines. Requested by: peter Added: - copied from r238423, head/tools/regression/usr.sbin/etcupdate/ stable/8/tools/regression/usr.sbin/etcupdate/preworld.sh - copied, changed from r258066, head/tools/regression/usr.sbin/etcupdate/preworld.sh stable/8/tools/regression/usr.sbin/etcupdate/tzsetup.sh - copied unchanged from r259134, head/tools/regression/usr.sbin/etcupdate/tzsetup.sh - copied from r238423, head/usr.sbin/etcupdate/ Directory Properties: stable/8/tools/regression/usr.sbin/etcupdate/ (props changed) stable/8/usr.sbin/etcupdate/ (props changed) Modified: stable/8/tools/regression/usr.sbin/etcupdate/always.sh stable/8/tools/regression/usr.sbin/etcupdate/conflicts.sh stable/8/tools/regression/usr.sbin/etcupdate/fbsdid.sh stable/8/tools/regression/usr.sbin/etcupdate/ignore.sh stable/8/tools/regression/usr.sbin/etcupdate/tests.sh stable/8/usr.sbin/Makefile (contents, props changed) stable/8/usr.sbin/etcupdate/etcupdate.8 stable/8/usr.sbin/etcupdate/etcupdate.sh Directory Properties: stable/8/tools/regression/usr.sbin/ (props changed) stable/8/usr.sbin/ (props changed) Modified: stable/8/tools/regression/usr.sbin/etcupdate/always.sh ============================================================================== --- head/tools/regression/usr.sbin/etcupdate/always.sh Fri Jul 13 13:23:48 2012 (r238423) +++ stable/8/tools/regression/usr.sbin/etcupdate/always.sh Tue Aug 19 17:54:15 2014 (r270177) @@ -33,13 +33,17 @@ WORKDIR=work usage() { - echo "Usage: always.sh [-w workdir]" + echo "Usage: always.sh [-s script] [-w workdir]" exit 1 } -# Allow the user to specify an alternate work directory. -while getopts "w:" option; do +# Allow the user to specify an alternate work directory or script. +COMMAND=etcupdate +while getopts "s:w:" option; do case $option in + s) + COMMAND="sh $OPTARG" + ;; w) WORKDIR=$OPTARG ;; @@ -372,7 +376,7 @@ fi build_trees -etcupdate -r -d $WORKDIR -D $TEST > $WORKDIR/test.out +$COMMAND -r -d $WORKDIR -D $TEST > $WORKDIR/test.out cat > $WORKDIR/correct.out < \ +$COMMAND -r -A '/first*' -A '/second* /*di*' -d $WORKDIR -D $TEST > \ $WORKDIR/test1.out cat > $WORKDIR/correct1.out </dev/null + $COMMAND -r -d $WORKDIR -D $TEST >/dev/null } # This is used to verify special handling for /etc/mail/aliases and @@ -122,7 +126,7 @@ MAILER-DAEMON: postmaster postmaster: foo EOF - etcupdate -r -d $WORKDIR -D $TEST >/dev/null + $COMMAND -r -d $WORKDIR -D $TEST >/dev/null } # $1 - relative path to file that should be missing from TEST @@ -201,7 +205,7 @@ build_login_conflict # Verify that 'p' doesn't do anything. echo "Checking 'p':" -echo 'p' | etcupdate resolve -d $WORKDIR -D $TEST >/dev/null +echo 'p' | $COMMAND resolve -d $WORKDIR -D $TEST >/dev/null file /etc/login.conf "" 95de92ea3f1bb1bf4f612a8b5908cddd missing /etc/login.conf.db @@ -209,7 +213,7 @@ conflict /etc/login.conf # Verify that 'mf' removes the conflict, but does nothing else. echo "Checking 'mf':" -echo 'mf' | etcupdate resolve -d $WORKDIR -D $TEST >/dev/null +echo 'mf' | $COMMAND resolve -d $WORKDIR -D $TEST >/dev/null file /etc/login.conf "" 95de92ea3f1bb1bf4f612a8b5908cddd missing /etc/login.conf.db @@ -219,7 +223,7 @@ build_login_conflict # Verify that 'tf' installs the new version of the file. echo "Checking 'tf':" -echo 'tf' | etcupdate resolve -d $WORKDIR -D $TEST >/dev/null +echo 'tf' | $COMMAND resolve -d $WORKDIR -D $TEST >/dev/null file /etc/login.conf "" 7774a0f9a3a372c7c109c32fd31c4b6b file /etc/login.conf.db @@ -238,7 +242,7 @@ default:\\ :welcome=/etc/motd: EOF -echo 'r' | etcupdate resolve -d $WORKDIR -D $TEST >/dev/null +echo 'r' | $COMMAND resolve -d $WORKDIR -D $TEST >/dev/null file /etc/login.conf "" 966e25984b9b63da8eaac8479dcb0d4d file /etc/login.conf.db @@ -248,12 +252,12 @@ build_aliases_conflict # Verify that 'p' and 'mf' do not generate the newaliases warning. echo "Checking newalias warning for 'p'": -echo 'p' | etcupdate resolve -d $WORKDIR -D $TEST | grep -q newalias +echo 'p' | $COMMAND resolve -d $WORKDIR -D $TEST | grep -q newalias if [ $? -eq 0 ]; then echo "+ Extra warning" fi echo "Checking newalias warning for 'mf'": -echo 'mf' | etcupdate resolve -d $WORKDIR -D $TEST | grep -q newalias +echo 'mf' | $COMMAND resolve -d $WORKDIR -D $TEST | grep -q newalias if [ $? -eq 0 ]; then echo "+ Extra warning" fi @@ -261,14 +265,14 @@ fi # Verify that 'tf' and 'r' do generate the newaliases warning. build_aliases_conflict echo "Checking newalias warning for 'tf'": -echo 'tf' | etcupdate resolve -d $WORKDIR -D $TEST | grep -q newalias +echo 'tf' | $COMMAND resolve -d $WORKDIR -D $TEST | grep -q newalias if [ $? -ne 0 ]; then echo "- Missing warning" fi build_aliases_conflict cp $TEST/etc/mail/aliases $CONFLICTS/etc/mail/aliases -echo 'r' | etcupdate resolve -d $WORKDIR -D $TEST | grep -q newalias +echo 'r' | $COMMAND resolve -d $WORKDIR -D $TEST | grep -q newalias if [ $? -ne 0 ]; then echo "- Missing warning" fi Modified: stable/8/tools/regression/usr.sbin/etcupdate/fbsdid.sh ============================================================================== --- head/tools/regression/usr.sbin/etcupdate/fbsdid.sh Fri Jul 13 13:23:48 2012 (r238423) +++ stable/8/tools/regression/usr.sbin/etcupdate/fbsdid.sh Tue Aug 19 17:54:15 2014 (r270177) @@ -33,13 +33,17 @@ WORKDIR=work usage() { - echo "Usage: fbsdid.sh [-w workdir]" + echo "Usage: fbsdid.sh [-s script] [-w workdir]" exit 1 } -# Allow the user to specify an alternate work directory. -while getopts "w:" option; do +# Allow the user to specify an alternate work directory or script. +COMMAND=etcupdate +while getopts "s:w:" option; do case $option in + s) + COMMAND="sh $OPTARG" + ;; w) WORKDIR=$OPTARG ;; @@ -191,6 +195,17 @@ EOF these are some local mods to the file EOF + + # local-remove: A file removed locally changed it's FreeBSD ID + # but nothing else + store_id $OLD/local-remove ": head/local-remove 12000 jhb " + store_id $NEW/local-remove ": head/local-remove 12345 jhb " + for i in $OLD $NEW; do + cat >> $i/local-remove < $WORKDIR/test.out +$COMMAND -r -d $WORKDIR -D $TEST > $WORKDIR/test.out cat > $WORKDIR/correct.out < $WORKDIR/correct.out < $WORKDIR/testF.out +$COMMAND -rF -d $WORKDIR -D $TEST > $WORKDIR/testF.out cat > $WORKDIR/correctF.out < $WORKDIR/testAF.out + +cat > $WORKDIR/correctAF.out < $WORKDIR/test.out +$COMMAND -r -d $WORKDIR -D $TEST > $WORKDIR/test.out cat > $WORKDIR/correct.out < $WORKDIR/test1.out +$COMMAND -r -I '/tree/*' -d $WORKDIR -D $TEST > $WORKDIR/test1.out cat > $WORKDIR/correct1.out < \ +$COMMAND -r -I '/tree/*' -I '/rmdir*' -d $WORKDIR -D $TEST > \ $WORKDIR/test2.out cat > $WORKDIR/correct2.out < \ +$COMMAND -r -I '/tree/* /rmdir/*' -d $WORKDIR -D $TEST > \ $WORKDIR/test3.out cat > $WORKDIR/correct3.out < $OLD/etc/services < $NEW/etc/services < $WORKDIR/testn.out +$COMMAND -nr -d $WORKDIR -D $TEST > $WORKDIR/testn.out cat > $WORKDIR/correct.out < $WORKDIR/correct.out < $WORKDIR/test.out +$COMMAND -r -d $WORKDIR -D $TEST > $WORKDIR/test.out echo "Differences for real:" diff -u -L "correct" $WORKDIR/correct.out -L "test" $WORKDIR/test.out Copied: stable/8/tools/regression/usr.sbin/etcupdate/tzsetup.sh (from r259134, head/tools/regression/usr.sbin/etcupdate/tzsetup.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.sbin/etcupdate/tzsetup.sh Tue Aug 19 17:54:15 2014 (r270177, copy of r259134, head/tools/regression/usr.sbin/etcupdate/tzsetup.sh) @@ -0,0 +1,221 @@ +#!/bin/sh +# +# Copyright (c) 2013 Advanced Computing Technologies LLC +# Written by: John H. Baldwin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ + +# Various regression tests for the tzsetup handling in the 'update' command. + +WORKDIR=work + +usage() +{ + echo "Usage: tzsetup.sh [-s script] [-w workdir]" + exit 1 +} + +# Allow the user to specify an alternate work directory or script. +COMMAND=etcupdate +while getopts "s:w:" option; do + case $option in + s) + COMMAND="sh $OPTARG" + ;; + w) + WORKDIR=$OPTARG + ;; + *) + echo + usage + ;; + esac +done +shift $((OPTIND - 1)) +if [ $# -ne 0 ]; then + usage +fi + +CONFLICTS=$WORKDIR/conflicts +OLD=$WORKDIR/old +NEW=$WORKDIR/current +TEST=$WORKDIR/test + +build_trees() +{ + + # Build the base tree, but not /etc/localtime itself + local i j k + + rm -rf $OLD $NEW $TEST $CONFLICTS + mkdir -p $OLD $NEW $TEST + mkdir -p $TEST/etc + mkdir -p $TEST/var/db + mkdir -p $TEST/usr/share/zoneinfo + + # Create a dummy timezone file + echo "foo" > $TEST/usr/share/zoneinfo/foo + +} + +# $1 - relative path to file that should be missing from TEST +missing() +{ + if [ -e $TEST/$1 -o -L $TEST/$1 ]; then + echo "File $1 should be missing" + fi +} + +# $1 - relative path to file that should be a symlink in TEST +# $2 - optional value of the link +link() +{ + local val + + if ! [ -L $TEST/$1 ]; then + echo "File $1 should be a link" + elif [ $# -gt 1 ]; then + val=`readlink $TEST/$1` + if [ "$val" != "$2" ]; then + echo "Link $1 should link to \"$2\"" + fi + fi +} + +# $1 - relative path to regular file that should be present in TEST +# $2 - optional string that should match file contents +# $3 - optional MD5 of the flie contents, overrides $2 if present +file() +{ + local contents sum + + if ! [ -f $TEST/$1 ]; then + echo "File $1 should be a regular file" + elif [ $# -eq 2 ]; then + contents=`cat $TEST/$1` + if [ "$contents" != "$2" ]; then + echo "File $1 has wrong contents" + fi + elif [ $# -eq 3 ]; then + sum=`md5 -q $TEST/$1` + if [ "$sum" != "$3" ]; then + echo "File $1 has wrong contents" + fi + fi +} + +if [ `id -u` -ne 0 ]; then + echo "must be root" +fi + +if [ -r /etc/etcupdate.conf ]; then + echo "WARNING: /etc/etcupdate.conf settings may break some tests." +fi + +# First, test for /etc/localtime not existing + +build_trees + +$COMMAND -nr -d $WORKDIR -D $TEST > $WORKDIR/testn.out + +cat > $WORKDIR/correct.out < $WORKDIR/test.out + +echo "Differences for no /etc/localtime:" +diff -u -L "correct" $WORKDIR/correct.out -L "test" $WORKDIR/test.out + +missing /etc/localtime +missing /var/db/zoneinfo + +# Second, test for /etc/localtime being a symlink + +build_trees +ln -s /dev/null $TEST/etc/localtime + +$COMMAND -nr -d $WORKDIR -D $TEST > $WORKDIR/testn.out + +cat > $WORKDIR/correct.out < $WORKDIR/test.out + +echo "Differences for symlinked /etc/localtime:" +diff -u -L "correct" $WORKDIR/correct.out -L "test" $WORKDIR/test.out + +link /etc/localtime "/dev/null" +missing /var/db/zoneinfo + +# Third, test for /etc/localtime as a file and a missing /var/db/zoneinfo + +build_trees +echo "bar" > $TEST/etc/localtime + +$COMMAND -nr -d $WORKDIR -D $TEST > $WORKDIR/testn.out + +cat > $WORKDIR/correct.out < $WORKDIR/test.out + +echo "Differences for missing /var/db/zoneinfo:" +diff -u -L "correct" $WORKDIR/correct.out -L "test" $WORKDIR/test.out + +file /etc/localtime "bar" +missing /var/db/zoneinfo + +# Finally, test the case where it should update /etc/localtime + +build_trees +echo "bar" > $TEST/etc/localtime +echo "foo" > $TEST/var/db/zoneinfo + +$COMMAND -nr -d $WORKDIR -D $TEST > $WORKDIR/testn.out + +cat > $WORKDIR/correct.out < $WORKDIR/test.out + +echo "Differences for real update:" +diff -u -L "correct" $WORKDIR/correct.out -L "test" $WORKDIR/test.out + +file /etc/localtime "foo" +file /var/db/zoneinfo "foo" Modified: stable/8/usr.sbin/Makefile ============================================================================== --- stable/8/usr.sbin/Makefile Tue Aug 19 17:04:18 2014 (r270176) +++ stable/8/usr.sbin/Makefile Tue Aug 19 17:54:15 2014 (r270177) @@ -47,6 +47,7 @@ SUBDIR= ${_ac} \ ${_editmap} \ ${_edquota} \ ${_eeprom} \ + etcupdate \ extattr \ extattrctl \ ${_faithd} \ Modified: stable/8/usr.sbin/etcupdate/etcupdate.8 ============================================================================== --- head/usr.sbin/etcupdate/etcupdate.8 Fri Jul 13 13:23:48 2012 (r238423) +++ stable/8/usr.sbin/etcupdate/etcupdate.8 Tue Aug 19 17:54:15 2014 (r270177) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2010-2012 Advanced Computing Technologies LLC +.\" Copyright (c) 2010-2013 Advanced Computing Technologies LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 16, 2012 +.Dd December 9, 2013 .Dt ETCUPDATE 8 .Os .Sh NAME @@ -33,7 +33,7 @@ .Nd "manage updates to system files not updated by installworld" .Sh SYNOPSIS .Nm -.Op Fl nBF +.Op Fl npBF .Op Fl d Ar workdir .Op Fl r | Fl s Ar source | Fl t Ar tarball .Op Fl A Ar patterns @@ -64,6 +64,7 @@ .Op Fl M Ar options .Nm .Cm resolve +.Op Fl p .Op Fl d Ar workdir .Op Fl D Ar destdir .Op Fl L Ar logfile @@ -112,7 +113,6 @@ The utility will not perform a new merge until all conflicts from an earlier merge are resolved. .Sh MODES -.Pp The .Nm utility supports several modes of operation. @@ -150,7 +150,7 @@ tree. An older .Dq previous tree is removed if it exists. -By default the new +By default the new .Dq current tree is built from a source tree. However, @@ -343,25 +343,7 @@ then nothing will be output. .Sh OPTIONS The following options are available. Note that most options do not apply to all modes. -.Bl -tag -width ".Fl d Ar workdir" -.It Fl B -Do not build generated files in a private object tree. -Instead, -reuse the generated files from a previously built object tree that matches -the source tree. -This can be useful to avoid gratuitous conflicts in sendmail configuration -files when bootstrapping. -It can also be useful for building a tarball that matches a specific -world build. -.It Fl d Ar workdir -Specify an alternate directory to use as the work directory. -The work directory is used to store the -.Dq current -and -.Dq previous -trees as well as unresolved conflicts. -The default work directory is -.Pa /var/db/etcupdate . +.Bl -tag -width ".Fl A Ar patterns" .It Fl A Ar patterns Always install the new version of any files that match any of the patterns listed in @@ -377,9 +359,20 @@ Note that ignored files specified via th variable or the .Fl I option will not be installed. +.It Fl B +Do not build generated files in a private object tree. +Instead, +reuse the generated files from a previously built object tree that matches +the source tree. +This can be useful to avoid gratuitous conflicts in +.Xr sendmail 8 +configuration +files when bootstrapping. +It can also be useful for building a tarball that matches a specific +world build. .It Fl D Ar destdir Specify an alternate destination directory as the target of a merge. -This is analagous to the +This is analogous to the .Dv DESTDIR variable used with .Sq make installworld . @@ -387,6 +380,15 @@ The default destination directory is an merges updating .Pa /etc on the local machine. +.It Fl d Ar workdir +Specify an alternate directory to use as the work directory. +The work directory is used to store the +.Dq current +and +.Dq previous +trees as well as unresolved conflicts. +The default work directory is +.Pa /var/db/etcupdate . .It Fl F Ignore changes in the FreeBSD ID string when comparing files in the destination directory to files in either of the @@ -480,6 +482,33 @@ option is not specified, then a temporary .Dq current tree will be extracted to perform the comparison. +.It Fl p +Enable +.Dq pre-world +mode. +Only merge changes to files that are necessary to successfully run +.Sq make installworld +or +.Sq make installkernel . +When this flag is enabled, +the existing +.Dq current +and +.Dq previous +trees are left alone. +Instead, +a temporary tree is populated with the necessary files. +This temporary tree is compared against the +.Dq current +tree. +This allows a normal update to be run after +.Sq make installworld +has completed. +Any conflicts generated during a +.Dq pre-world +update should be resolved by a +.Dq pre-world +.Cm resolve . .It Fl r Do not update the .Dq current @@ -666,6 +695,25 @@ has been removed from the tree, but it has been locally modified. The modified version of the file remains in the destination directory. +.It "Needs update: /etc/localtime (required manual update via tzsetup(1))" +The +.Fa /var/db/zoneinfo +file does not exist, +so +.Nm +was not able to refresh +.Fa /etc/localtime +from its source file in +.Fa /usr/share/zoneinfo . +Running +.Xr tzsetup 1 +will both refresh +.Fa /etc/localtime +and generate +.Fa /var/db/zoneinfo +permitting future updates to refresh +.Fa /etc/localtime +automatically. .It "Needs update: /etc/mail/aliases.db (required manual update via newaliases(1))" The file .Pa /etc/mail/aliases @@ -739,12 +787,16 @@ but it has been removed in the destinati .El .Sh SEE ALSO .Xr cap_mkdb 1 , -.Xr diff 1 , +.Xr diff 1 , .Xr make 1 , .Xr newaliases 1 , .Xr sh 1 , .Xr pwd_mkdb 8 -.\".Sh HISTORY +.Sh HISTORY +The +.Nm +utility first appeared in +.Fx 10.0 . .Sh AUTHORS The .Nm Modified: stable/8/usr.sbin/etcupdate/etcupdate.sh ============================================================================== --- head/usr.sbin/etcupdate/etcupdate.sh Fri Jul 13 13:23:48 2012 (r238423) +++ stable/8/usr.sbin/etcupdate/etcupdate.sh Tue Aug 19 17:54:15 2014 (r270177) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010-2013 Advanced Computing Technologies LLC # Written by: John H. Baldwin # All rights reserved. # @@ -61,14 +61,15 @@ usage() { cat < etcupdate diff [-d workdir] [-D destdir] [-I patterns] [-L logfile] etcupdate extract [-B] [-d workdir] [-s source | -t tarball] [-L logfile] [-M options] - etcupdate resolve [-d workdir] [-D destdir] [-L logfile] + etcupdate resolve [-p] [-d workdir] [-D destdir] [-L logfile] etcupdate status [-d workdir] [-D destdir] EOF exit 1 @@ -181,22 +182,31 @@ always_install() # $1 - directory to store new tree in build_tree() { - local make + local destdir dir file make make="make $MAKE_OPTIONS" log "Building tree at $1 with $make" mkdir -p $1/usr/obj >&3 2>&1 - (cd $SRCDIR; $make DESTDIR=$1 distrib-dirs) >&3 2>&1 || return 1 + destdir=`realpath $1` - if ! [ -n "$nobuild" ]; then - (cd $SRCDIR; \ - MAKEOBJDIRPREFIX=$1/usr/obj $make _obj SUBDIR_OVERRIDE=etc && - MAKEOBJDIRPREFIX=$1/usr/obj $make everything SUBDIR_OVERRIDE=etc && - MAKEOBJDIRPREFIX=$1/usr/obj $make DESTDIR=$1 distribution) \ + if [ -n "$preworld" ]; then + # Build a limited tree that only contains files that are + # crucial to installworld. + for file in $PREWORLD_FILES; do + dir=`dirname /$file` + mkdir -p $1/$dir >&3 2>&1 || return 1 + cp -p $SRCDIR/$file $1/$file || return 1 + done + elif ! [ -n "$nobuild" ]; then + (cd $SRCDIR; $make DESTDIR=$destdir distrib-dirs && + MAKEOBJDIRPREFIX=$destdir/usr/obj $make _obj SUBDIR_OVERRIDE=etc && + MAKEOBJDIRPREFIX=$destdir/usr/obj $make everything SUBDIR_OVERRIDE=etc && + MAKEOBJDIRPREFIX=$destdir/usr/obj $make DESTDIR=$destdir distribution) \ >&3 2>&1 || return 1 else - (cd $SRCDIR; $make DESTDIR=$1 distribution) >&3 2>&1 || return 1 + (cd $SRCDIR; $make DESTDIR=$destdir distrib-dirs && + $make DESTDIR=$destdir distribution) >&3 2>&1 || return 1 fi chflags -R noschg $1 >&3 2>&1 || return 1 rm -rf $1/usr/obj >&3 2>&1 || return 1 @@ -218,9 +228,15 @@ build_tree() # source tree. extract_tree() { + local files + # If we have a tarball, extract that into the new directory. if [ -n "$tarball" ]; then - if ! (mkdir -p $NEWTREE && tar xf $tarball -C $NEWTREE) \ + files= + if [ -n "$preworld" ]; then + files="$PREWORLD_FILES" + fi + if ! (mkdir -p $NEWTREE && tar xf $tarball -C $NEWTREE $files) \ >&3 2>&1; then echo "Failed to extract new tree." remove_tree $NEWTREE @@ -470,6 +486,39 @@ diffnode() esac } +# Run one-off commands after an update has completed. These commands +# are not tied to a specific file, so they cannot be handled by +# post_install_file(). +post_update() +{ + local args + + # None of these commands should be run for a pre-world update. + if [ -n "$preworld" ]; then + return + fi + + # If /etc/localtime exists and is not a symlink and /var/db/zoneinfo + # exists, run tzsetup -r to refresh /etc/localtime. + if [ -f ${DESTDIR}/etc/localtime -a \ + ! -L ${DESTDIR}/etc/localtime ]; then + if [ -f ${DESTDIR}/var/db/zoneinfo ]; then + if [ -n "${DESTDIR}" ]; then + args="-C ${DESTDIR}" + else + args="" + fi + log "tzsetup -r ${args}" + if [ -z "$dryrun" ]; then + tzsetup -r ${args} >&3 2>&1 + fi + else + warn "Needs update: /etc/localtime (required" \ + "manual update via tzsetup(1))" + fi + fi +} + # Create missing parent directories of a node in a target tree # preserving the owner, group, and permissions from a specified # template tree. @@ -567,6 +616,14 @@ post_install_file() fi fi ;; + /etc/services) + log "services_mkdb -q -o $DESTDIR/var/db/services.db" \ + "${DESTDIR}$1" + if [ -z "$dryrun" ]; then + services_mkdb -q -o $DESTDIR/var/db/services.db \ + ${DESTDIR}$1 >&3 2>&1 + fi + ;; esac } @@ -1010,16 +1067,6 @@ handle_modified_file() fi fi - # If the only change in the new file versus the old file is a - # change in the FreeBSD ID string and -F is specified, just - # update the FreeBSD ID string in the local file. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From dumbbell at FreeBSD.org Tue Aug 19 20:53:29 2014 From: dumbbell at FreeBSD.org (Jean-Sebastien Pedron) Date: Tue, 19 Aug 2014 20:53:28 +0000 (UTC) Subject: svn commit: r270182 - stable/10/sys/dev/vt Message-ID: <201408192053.s7JKrSK8054325@svn.freebsd.org> Author: dumbbell Date: Tue Aug 19 20:53:28 2014 New Revision: 270182 URL: http://svnweb.freebsd.org/changeset/base/270182 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" This is an MFC of r269780. Modified: stable/10/sys/dev/vt/vt_buf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/vt_buf.c ============================================================================== --- stable/10/sys/dev/vt/vt_buf.c Tue Aug 19 20:35:09 2014 (r270181) +++ stable/10/sys/dev/vt/vt_buf.c Tue Aug 19 20:53:28 2014 (r270182) @@ -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 dumbbell at FreeBSD.org Tue Aug 19 21:31:33 2014 From: dumbbell at FreeBSD.org (Jean-Sebastien Pedron) Date: Tue, 19 Aug 2014 21:31:32 +0000 (UTC) Subject: svn commit: r270184 - stable/9/sys/dev/vt Message-ID: <201408192131.s7JLVW0W071392@svn.freebsd.org> Author: dumbbell Date: Tue Aug 19 21:31:32 2014 New Revision: 270184 URL: http://svnweb.freebsd.org/changeset/base/270184 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" This is an MFC of r269780. Modified: stable/9/sys/dev/vt/vt_buf.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/vt/vt_buf.c ============================================================================== --- stable/9/sys/dev/vt/vt_buf.c Tue Aug 19 21:04:31 2014 (r270183) +++ stable/9/sys/dev/vt/vt_buf.c Tue Aug 19 21:31:32 2014 (r270184) @@ -228,10 +228,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) @@ -244,18 +243,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 @@ -372,9 +379,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 @@ -515,8 +521,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); } } @@ -525,9 +531,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; } @@ -708,10 +716,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 @@ -726,9 +734,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 grehan at FreeBSD.org Tue Aug 19 23:08:47 2014 From: grehan at FreeBSD.org (Peter Grehan) Date: Tue, 19 Aug 2014 23:08:47 +0000 (UTC) Subject: svn commit: r270185 - stable/10/sys/kern Message-ID: <201408192308.s7JN8l8M015950@svn.freebsd.org> Author: grehan Date: Tue Aug 19 23:08:47 2014 New Revision: 270185 URL: http://svnweb.freebsd.org/changeset/base/270185 Log: MFC r265098 Bump WITNESS_PENDLIST by MAXCPU to account for the pmap pvlist locks which are scaled by MAXCPU. Modified: stable/10/sys/kern/subr_witness.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/subr_witness.c ============================================================================== --- stable/10/sys/kern/subr_witness.c Tue Aug 19 21:31:32 2014 (r270184) +++ stable/10/sys/kern/subr_witness.c Tue Aug 19 23:08:47 2014 (r270185) @@ -135,7 +135,7 @@ __FBSDID("$FreeBSD$"); #define WITNESS_COUNT 1024 #define WITNESS_CHILDCOUNT (WITNESS_COUNT * 4) #define WITNESS_HASH_SIZE 251 /* Prime, gives load factor < 2 */ -#define WITNESS_PENDLIST 1024 +#define WITNESS_PENDLIST (1024 + MAXCPU) /* Allocate 256 KB of stack data space */ #define WITNESS_LO_DATA_COUNT 2048 From grehan at FreeBSD.org Tue Aug 19 23:15:48 2014 From: grehan at FreeBSD.org (Peter Grehan) Date: Tue, 19 Aug 2014 23:15:47 +0000 (UTC) Subject: svn commit: r270186 - stable/10/sys/cddl/dev/dtrace/x86 Message-ID: <201408192315.s7JNFl9h020141@svn.freebsd.org> Author: grehan Date: Tue Aug 19 23:15:47 2014 New Revision: 270186 URL: http://svnweb.freebsd.org/changeset/base/270186 Log: MFC r266103 Update dis_tables.c to the latest Illumos version. This includes decodes of recent Intel instructions, in particular VT-x and related instructions. This allows the FBT provider to locate the exit points of routines that include these new instructions. Illumos issues: 3414 Need a new word of AT_SUN_HWCAP bits 3415 Add isainfo support for f16c and rdrand 3416 Need disassembler support for rdrand and f16c 3413 isainfo -v overflows 80 columns 3417 mdb disassembler confuses rdtscp for invlpg 1518 dis should support AMD SVM/AMD-V/Pacifica instructions 1096 i386 disassembler should understand complex nops 1362 add kvmstat for monitoring of KVM statistics 1363 add vmregs[] variable to DTrace 1364 need disassembler support for VMX instructions 1365 mdb needs 16-bit disassembler support This corresponds to Illumos-gate (github) version eb23829ff08a873c612ac45d191d559394b4b408 Modified: stable/10/sys/cddl/dev/dtrace/x86/dis_tables.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/dev/dtrace/x86/dis_tables.c ============================================================================== --- stable/10/sys/cddl/dev/dtrace/x86/dis_tables.c Tue Aug 19 23:08:47 2014 (r270185) +++ stable/10/sys/cddl/dev/dtrace/x86/dis_tables.c Tue Aug 19 23:15:47 2014 (r270186) @@ -21,6 +21,7 @@ */ /* * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, Joyent, Inc. All rights reserved. */ /* @@ -104,16 +105,18 @@ enum { Mv, Mw, M, /* register or memory */ + MG9, /* register or memory in group 9 (prefix optional) */ Mb, /* register or memory, always byte sized */ MO, /* memory only (no registers) */ PREF, - SWAPGS, + SWAPGS_RDTSCP, MONITOR_MWAIT, R, RA, SEG, MR, RM, + RM_66r, /* RM, but with a required 0x66 prefix */ IA, MA, SD, @@ -228,7 +231,10 @@ enum { VEX_RRi, /* VEX mod_rm, imm8 -> mod_reg */ VEX_RM, /* VEX mod_reg -> mod_rm */ VEX_RRM, /* VEX VEX.vvvv, mod_reg -> mod_rm */ - VEX_RMX /* VEX VEX.vvvv, mod_rm -> mod_reg */ + VEX_RMX, /* VEX VEX.vvvv, mod_rm -> mod_reg */ + VMx, /* vmcall/vmlaunch/vmresume/vmxoff */ + VMxo, /* VMx instruction with optional prefix */ + SVM /* AMD SVM instructions */ }; /* @@ -496,8 +502,8 @@ const instable_t dis_op0F00[8] = { */ const instable_t dis_op0F01[8] = { -/* [0] */ TNSZ("sgdt",MO,6), TNSZ("sidt",MONITOR_MWAIT,6), TNSZ("lgdt",XGETBV_XSETBV,6), TNSZ("lidt",MO,6), -/* [4] */ TNSZ("smsw",M,2), INVALID, TNSZ("lmsw",M,2), TNS("invlpg",SWAPGS), +/* [0] */ TNSZ("sgdt",VMx,6), TNSZ("sidt",MONITOR_MWAIT,6), TNSZ("lgdt",XGETBV_XSETBV,6), TNSZ("lidt",SVM,6), +/* [4] */ TNSZ("smsw",M,2), INVALID, TNSZ("lmsw",M,2), TNS("invlpg",SWAPGS_RDTSCP), }; /* @@ -528,15 +534,44 @@ const instable_t dis_op0FBA[8] = { }; /* - * Decode table for 0x0FC7 opcode + * Decode table for 0x0FC7 opcode (group 9) */ const instable_t dis_op0FC7[8] = { /* [0] */ INVALID, TNS("cmpxchg8b",M), INVALID, INVALID, -/* [4] */ INVALID, INVALID, INVALID, INVALID, +/* [4] */ INVALID, INVALID, TNS("vmptrld",MG9), TNS("vmptrst",MG9), }; +/* + * Decode table for 0x0FC7 opcode (group 9) mode 3 + */ + +const instable_t dis_op0FC7m3[8] = { + +/* [0] */ INVALID, INVALID, INVALID, INVALID, +/* [4] */ INVALID, INVALID, TNS("rdrand",MG9), INVALID, +}; + +/* + * Decode table for 0x0FC7 opcode with 0x66 prefix + */ + +const instable_t dis_op660FC7[8] = { + +/* [0] */ INVALID, INVALID, INVALID, INVALID, +/* [4] */ INVALID, INVALID, TNS("vmclear",M), INVALID, +}; + +/* + * Decode table for 0x0FC7 opcode with 0xF3 prefix + */ + +const instable_t dis_opF30FC7[8] = { + +/* [0] */ INVALID, INVALID, INVALID, INVALID, +/* [4] */ INVALID, INVALID, TNS("vmxon",M), INVALID, +}; /* * Decode table for 0x0FC8 opcode -- 486 bswap instruction @@ -1147,7 +1182,7 @@ const instable_t dis_op0F38[256] = { /* [78] */ INVALID, INVALID, INVALID, INVALID, /* [7C] */ INVALID, INVALID, INVALID, INVALID, -/* [80] */ INVALID, INVALID, INVALID, INVALID, +/* [80] */ TNSy("invept", RM_66r), TNSy("invvpid", RM_66r),INVALID, INVALID, /* [84] */ INVALID, INVALID, INVALID, INVALID, /* [88] */ INVALID, INVALID, INVALID, INVALID, /* [8C] */ INVALID, INVALID, INVALID, INVALID, @@ -1193,7 +1228,7 @@ const instable_t dis_opAVX660F38[256] = /* [08] */ TNSZ("vpsignb",VEX_RMrX,16),TNSZ("vpsignw",VEX_RMrX,16),TNSZ("vpsignd",VEX_RMrX,16),TNSZ("vpmulhrsw",VEX_RMrX,16), /* [0C] */ TNSZ("vpermilps",VEX_RMrX,8),TNSZ("vpermilpd",VEX_RMrX,16),TNSZ("vtestps",VEX_RRI,8), TNSZ("vtestpd",VEX_RRI,16), -/* [10] */ INVALID, INVALID, INVALID, INVALID, +/* [10] */ INVALID, INVALID, INVALID, TNSZ("vcvtph2ps",VEX_MX,16), /* [14] */ INVALID, INVALID, INVALID, TNSZ("vptest",VEX_RRI,16), /* [18] */ TNSZ("vbroadcastss",VEX_MX,4),TNSZ("vbroadcastsd",VEX_MX,8),TNSZ("vbroadcastf128",VEX_MX,16),INVALID, /* [1C] */ TNSZ("vpabsb",VEX_MX,16),TNSZ("vpabsw",VEX_MX,16),TNSZ("vpabsd",VEX_MX,16),INVALID, @@ -1359,7 +1394,7 @@ const instable_t dis_opAVX660F3A[256] = /* [10] */ INVALID, INVALID, INVALID, INVALID, /* [14] */ TNSZ("vpextrb",VEX_RRi,8),TNSZ("vpextrw",VEX_RRi,16),TNSZ("vpextrd",VEX_RRi,16),TNSZ("vextractps",VEX_RM,16), /* [18] */ TNSZ("vinsertf128",VEX_RMRX,16),TNSZ("vextractf128",VEX_RX,16),INVALID, INVALID, -/* [1C] */ INVALID, INVALID, INVALID, INVALID, +/* [1C] */ INVALID, TNSZ("vcvtps2ph",VEX_RX,16), INVALID, INVALID, /* [20] */ TNSZ("vpinsrb",VEX_RMRX,8),TNSZ("vinsertps",VEX_RMRX,16),TNSZ("vpinsrd",VEX_RMRX,16),INVALID, /* [24] */ INVALID, INVALID, INVALID, INVALID, @@ -1446,7 +1481,7 @@ const instable_t dis_op0F[16][16] = { /* [10] */ TNSZ("movups",XMMO,16), TNSZ("movups",XMMOS,16),TNSZ("movlps",XMMO,8), TNSZ("movlps",XMMOS,8), /* [14] */ TNSZ("unpcklps",XMMO,16),TNSZ("unpckhps",XMMO,16),TNSZ("movhps",XMMOM,8),TNSZ("movhps",XMMOMS,8), /* [18] */ IND(dis_op0F18), INVALID, INVALID, INVALID, -/* [1C] */ INVALID, INVALID, INVALID, TS("nopw", Mw), +/* [1C] */ INVALID, INVALID, INVALID, TS("nop",Mw), }, { /* [20] */ TSy("mov",SREG), TSy("mov",SREG), TSy("mov",SREG), TSy("mov",SREG), /* [24] */ TSx("mov",SREG), INVALID, TSx("mov",SREG), INVALID, @@ -1475,7 +1510,7 @@ const instable_t dis_op0F[16][16] = { }, { /* [70] */ TNSZ("pshufw",MMOPM,8), TNS("psrXXX",MR), TNS("psrXXX",MR), TNS("psrXXX",MR), /* [74] */ TNSZ("pcmpeqb",MMO,8), TNSZ("pcmpeqw",MMO,8), TNSZ("pcmpeqd",MMO,8), TNS("emms",NORM), -/* [78] */ TNS("INVALID",XMMO), TNS("INVALID",XMMO), INVALID, INVALID, +/* [78] */ TNSy("vmread",RM), TNSy("vmwrite",MR), INVALID, INVALID, /* [7C] */ INVALID, INVALID, TNSZ("movd",MMOS,4), TNSZ("movq",MMOS,8), }, { /* [80] */ TNS("jo",D), TNS("jno",D), TNS("jb",D), TNS("jae",D), @@ -1859,14 +1894,14 @@ const instable_t dis_distable[16][16] = /* [1,C] */ TNS("sbbb",IA), TS("sbb",IA), TSx("push",SEG), TSx("pop",SEG), }, { /* [2,0] */ TNS("andb",RMw), TS("and",RMw), TNS("andb",MRw), TS("and",MRw), -/* [2,4] */ TNS("andb",IA), TS("and",IA), TNS("%es:",OVERRIDE), TNSx("daa",NORM), +/* [2,4] */ TNS("andb",IA), TS("and",IA), TNSx("%es:",OVERRIDE), TNSx("daa",NORM), /* [2,8] */ TNS("subb",RMw), TS("sub",RMw), TNS("subb",MRw), TS("sub",MRw), /* [2,C] */ TNS("subb",IA), TS("sub",IA), TNS("%cs:",OVERRIDE), TNSx("das",NORM), }, { /* [3,0] */ TNS("xorb",RMw), TS("xor",RMw), TNS("xorb",MRw), TS("xor",MRw), -/* [3,4] */ TNS("xorb",IA), TS("xor",IA), TNS("%ss:",OVERRIDE), TNSx("aaa",NORM), +/* [3,4] */ TNS("xorb",IA), TS("xor",IA), TNSx("%ss:",OVERRIDE), TNSx("aaa",NORM), /* [3,8] */ TNS("cmpb",RMw), TS("cmp",RMw), TNS("cmpb",MRw), TS("cmp",MRw), -/* [3,C] */ TNS("cmpb",IA), TS("cmp",IA), TNS("%ds:",OVERRIDE), TNSx("aas",NORM), +/* [3,C] */ TNS("cmpb",IA), TS("cmp",IA), TNSx("%ds:",OVERRIDE), TNSx("aas",NORM), }, { /* [4,0] */ TSx("inc",R), TSx("inc",R), TSx("inc",R), TSx("inc",R), /* [4,4] */ TSx("inc",R), TSx("inc",R), TSx("inc",R), TSx("inc",R), @@ -2905,6 +2940,7 @@ dtrace_disx86(dis86_t *x, uint_t cpu_mod goto error; #endif switch (dp->it_adrmode) { + case RM_66r: case XMM_66r: case XMMM_66r: if (opnd_size_prefix == 0) { @@ -3054,6 +3090,59 @@ dtrace_disx86(dis86_t *x, uint_t cpu_mod } break; + case MG9: + /* + * More horribleness: the group 9 (0xF0 0xC7) instructions are + * allowed an optional prefix of 0x66 or 0xF3. This is similar + * to the SIMD business described above, but with a different + * addressing mode (and an indirect table), so we deal with it + * separately (if similarly). + * + * Intel further complicated this with the release of Ivy Bridge + * where they overloaded these instructions based on the ModR/M + * bytes. The VMX instructions have a mode of 0 since they are + * memory instructions but rdrand instructions have a mode of + * 0b11 (REG_ONLY) because they only operate on registers. While + * there are different prefix formats, for now it is sufficient + * to use a single different table. + */ + + /* + * Calculate our offset in dis_op0FC7 (the group 9 table) + */ + if ((uintptr_t)dp - (uintptr_t)dis_op0FC7 > sizeof (dis_op0FC7)) + goto error; + + off = ((uintptr_t)dp - (uintptr_t)dis_op0FC7) / + sizeof (instable_t); + + /* + * If we have a mode of 0b11 then we have to rewrite this. + */ + dtrace_get_modrm(x, &mode, ®, &r_m); + if (mode == REG_ONLY) { + dp = (instable_t *)&dis_op0FC7m3[off]; + break; + } + + /* + * Rewrite if this instruction used one of the magic prefixes. + */ + if (rep_prefix) { + if (rep_prefix == 0xf3) + dp = (instable_t *)&dis_opF30FC7[off]; + else + goto error; + rep_prefix = 0; + } else if (opnd_size_prefix) { + dp = (instable_t *)&dis_op660FC7[off]; + opnd_size_prefix = 0; + if (opnd_size == SIZE16) + opnd_size = SIZE32; + } + break; + + case MMOSH: /* * As with the "normal" SIMD instructions, the MMX @@ -3434,14 +3523,21 @@ just_mem: dtrace_get_operand(x, mode, r_m, wbit, 0); break; - case SWAPGS: + case SWAPGS_RDTSCP: if (cpu_mode == SIZE64 && mode == 3 && r_m == 0) { #ifdef DIS_TEXT (void) strncpy(x->d86_mnem, "swapgs", OPLEN); #endif NOMEM; break; + } else if (mode == 3 && r_m == 1) { +#ifdef DIS_TEXT + (void) strncpy(x->d86_mnem, "rdtscp", OPLEN); +#endif + NOMEM; + break; } + /*FALLTHROUGH*/ /* prefetch instruction - memory operand, but no memory acess */ @@ -3451,6 +3547,7 @@ just_mem: /* single memory or register operand */ case M: + case MG9: wbit = LONG_OPND; goto just_mem; @@ -3459,6 +3556,76 @@ just_mem: wbit = BYTE_OPND; goto just_mem; + case VMx: + if (mode == 3) { +#ifdef DIS_TEXT + char *vminstr; + + switch (r_m) { + case 1: + vminstr = "vmcall"; + break; + case 2: + vminstr = "vmlaunch"; + break; + case 3: + vminstr = "vmresume"; + break; + case 4: + vminstr = "vmxoff"; + break; + default: + goto error; + } + + (void) strncpy(x->d86_mnem, vminstr, OPLEN); +#else + if (r_m < 1 || r_m > 4) + goto error; +#endif + + NOMEM; + break; + } + /*FALLTHROUGH*/ + case SVM: + if (mode == 3) { +#ifdef DIS_TEXT + char *vinstr; + + switch (r_m) { + case 0: + vinstr = "vmrun"; + break; + case 1: + vinstr = "vmmcall"; + break; + case 2: + vinstr = "vmload"; + break; + case 3: + vinstr = "vmsave"; + break; + case 4: + vinstr = "stgi"; + break; + case 5: + vinstr = "clgi"; + break; + case 6: + vinstr = "skinit"; + break; + case 7: + vinstr = "invlpga"; + break; + } + + (void) strncpy(x->d86_mnem, vinstr, OPLEN); +#endif + NOMEM; + break; + } + /*FALLTHROUGH*/ case MONITOR_MWAIT: if (mode == 3) { if (r_m == 0) { @@ -3597,6 +3764,7 @@ just_mem: break; case RM: + case RM_66r: wbit = LONG_OPND; STANDARD_MODRM(x, mode, reg, r_m, rex_prefix, wbit, 1); break; @@ -4300,7 +4468,8 @@ L_VEX_MX: dtrace_get_operand(x, REG_ONLY, reg, XMM_OPND, 1); dtrace_get_operand(x, mode, r_m, wbit, 0); } else if ((dp == &dis_opAVXF30F[0xE6]) || - (dp == &dis_opAVX0F[0x5][0xA])) { + (dp == &dis_opAVX0F[0x5][0xA]) || + (dp == &dis_opAVX660F38[0x13])) { /* vcvtdq2pd , */ /* or vcvtps2pd , */ dtrace_get_operand(x, REG_ONLY, reg, wbit, 1); @@ -4385,7 +4554,9 @@ L_VEX_MX: case VEX_RX: /* ModR/M.rm := op(ModR/M.reg) */ - if (dp == &dis_opAVX660F3A[0x19]) { /* vextractf128 */ + /* vextractf128 || vcvtps2ph */ + if (dp == &dis_opAVX660F3A[0x19] || + dp == &dis_opAVX660F3A[0x1d]) { x->d86_numopnds = 3; dtrace_get_modrm(x, &mode, ®, &r_m); From ian at FreeBSD.org Tue Aug 19 23:33:52 2014 From: ian at FreeBSD.org (Ian Lepore) Date: Tue, 19 Aug 2014 23:33:51 +0000 (UTC) Subject: svn commit: r270187 - in stable/10: . etc lib share/mk Message-ID: <201408192333.s7JNXpiC028815@svn.freebsd.org> Author: ian Date: Tue Aug 19 23:33:51 2014 New Revision: 270187 URL: http://svnweb.freebsd.org/changeset/base/270187 Log: MFC r266473,267331,267511: Use an intermediate target to associate with _SUBDIR which is marked .MAKE this allows make -n to do tree walks as expected without doing anything else (as intended). Use prefix _sub. to help avoid conflict with any real target. Put the test suite in its own tests.txz distribution file. Force all the contents of /usr/tests to go into a separate distribution file so that users of binary releases can easily choose to not install Create a mechanism for providing fine-grained build order dependencies during SUBDIR_PARALLEL builds. This augments the coarse .WAIT mechanism, which is still useful if you've got a situation such as "almost everything depends on A and B". Modified: stable/10/Makefile.inc1 stable/10/etc/Makefile stable/10/lib/Makefile stable/10/share/mk/bsd.subdir.mk stable/10/share/mk/bsd.test.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Tue Aug 19 23:15:47 2014 (r270186) +++ stable/10/Makefile.inc1 Tue Aug 19 23:33:51 2014 (r270187) @@ -779,6 +779,9 @@ EXTRA_DISTRIBUTIONS+= games .if defined(LIB32TMP) && ${MK_LIB32} != "no" EXTRA_DISTRIBUTIONS+= lib32 .endif +.if ${MK_TESTS} != "no" +EXTRA_DISTRIBUTIONS+= tests +.endif MTREE_MAGIC?= mtree 2.0 @@ -820,6 +823,10 @@ distributeworld installworld: _installch mtree -deU -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ -p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib >/dev/null .endif +.if ${MK_TESTS} != "no" && ${dist} == "tests" + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \ + -p ${DESTDIR}/${DISTDIR}/${dist}/usr >/dev/null +.endif .if defined(NO_ROOT) ${IMAKEENV} nmtree -C -f ${.CURDIR}/etc/mtree/BSD.root.dist | \ sed -e 's#^\./#./${dist}/#' >> ${METALOG} Modified: stable/10/etc/Makefile ============================================================================== --- stable/10/etc/Makefile Tue Aug 19 23:15:47 2014 (r270186) +++ stable/10/etc/Makefile Tue Aug 19 23:33:51 2014 (r270187) @@ -174,7 +174,10 @@ afterinstall: .endif distribute: - ${_+_}cd ${.CURDIR} ; ${MAKE} install DESTDIR=${DISTDIR}/${DISTRIBUTION} + # Avoid installing tests here; "make distribution" will do this and + # correctly place them in the right location. + ${_+_}cd ${.CURDIR} ; ${MAKE} MK_TESTS=no install \ + DESTDIR=${DISTDIR}/${DISTRIBUTION} ${_+_}cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION} .include Modified: stable/10/lib/Makefile ============================================================================== --- stable/10/lib/Makefile Tue Aug 19 23:15:47 2014 (r270186) +++ stable/10/lib/Makefile Tue Aug 19 23:33:51 2014 (r270187) @@ -3,73 +3,40 @@ .include -# To satisfy shared library or ELF linkage when only the libraries being -# built are visible: -# -# csu must be built before all shared libaries for ELF. -# libc must be built before all other shared libraries. -# libbsm must be built before libauditd. -# libcom_err must be built before libpam. -# libcrypt must be built before libpam. -# libkvm must be built before libdevstat. -# libldns must be built before libunbound. -# msun must be built before libg++ and libstdc++. -# libmd must be built before libatm, libopie, libradius, and libtacplus. -# ncurses must be built before libdialog, libedit and libreadline. -# libnetgraph must be built before libbsnmp/modules/snmp_netgraph. -# libopie must be built before libpam. -# libradius must be built before libpam. -# librpcsvc must be built before libpam. -# libsbuf must be built before libcam. -# libtacplus must be built before libpam. -# libutil must be built before libpam. -# libypclnt must be built before libpam. -# libgssapi must be built before librpcsec_gss -# -# Otherwise, the SUBDIR list should be in alphabetical order. -# -# Except it appears bind needs to be compiled last +# The SUBDIR_ORDERED list is a small set of libraries which are used by many +# of the other libraries. These are built first with a .WAIT between them +# and the main list to avoid needing a SUBDIR_DEPEND line on every library +# naming just these few items. SUBDIR_ORDERED= ${_csu} \ + .WAIT \ libc \ libc_nonshared \ - libbsm \ - libauditd \ libcompiler_rt \ - libcrypt \ - libelf \ - ${_libiconv_modules} \ - libkvm \ - ${_libldns} \ - msun \ - libmd \ - ncurses \ - ${_libnetgraph} \ - libradius \ - librpcsvc \ - libsbuf \ - libtacplus \ - libutil \ - ${_libypclnt} \ + ${_libcplusplus} \ ${_libcxxrt} \ - ${_libcplusplus} + libelf \ + msun -.if ${MK_KERBEROS_SUPPORT} != "no" -SUBDIR_ORDERED+= libcom_err -.endif +# The main list; please keep these sorted alphabetically. SUBDIR= ${SUBDIR_ORDERED} \ + .WAIT \ libalias \ libarchive \ ${_libatm} \ + libauditd \ libbegemot \ libblocksruntime \ ${_libbluetooth} \ ${_libbsnmp} \ + libbsm \ libbz2 \ libcalendar \ libcam \ + ${_libcom_err} \ libcompat \ + libcrypt \ libdevinfo \ libdevstat \ libdwarf \ @@ -82,18 +49,23 @@ SUBDIR= ${SUBDIR_ORDERED} \ ${_libgpib} \ ${_libgssapi} \ ${_librpcsec_gss} \ + ${_libiconv_modules} \ libipsec \ ${_libipx} \ libjail \ libkiconv \ + libkvm \ + ${_libldns} \ liblzma \ libmagic \ libmandoc \ libmemstat \ + libmd \ ${_libmilter} \ ${_libmp} \ ${_libnandfs} \ libnetbsd \ + ${_libnetgraph} \ ${_libngatm} \ libopie \ libpam \ @@ -101,8 +73,11 @@ SUBDIR= ${SUBDIR_ORDERED} \ ${_libpmc} \ ${_libproc} \ libprocstat \ + libradius \ + librpcsvc \ librt \ ${_librtld_db} \ + libsbuf \ ${_libsdp} \ ${_libsm} \ ${_libsmb} \ @@ -111,6 +86,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ libstand \ libstdbuf \ libstdthreads \ + libtacplus \ ${_libtelnet} \ ${_libthr} \ libthread_db \ @@ -121,16 +97,49 @@ SUBDIR= ${SUBDIR_ORDERED} \ ${_libunbound} \ ${_libusbhid} \ ${_libusb} \ + libutil \ ${_libvgl} \ ${_libvmmapi} \ libwrap \ liby \ + ${_libypclnt} \ libyaml \ libz \ + ncurses \ ${_atf} \ ${_clang} \ ${_tests} +# Inter-library dependencies. When the makefile for a library contains LDADD +# libraries, those libraries should be listed as build order dependencies here. + +SUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd +SUBDIR_DEPEND_libatm= libmd +SUBDIR_DEPEND_libauditdm= libbsm +SUBDIR_DEPEND_libbsnmp= ${_libnetgraph} +SUBDIR_DEPEND_libc++= libcxxrt +SUBDIR_DEPEND_libc= libcompiler_rt +SUBDIR_DEPEND_libcam= libsbuf +SUBDIR_DEPEND_libdevstat= libkvm +SUBDIR_DEPEND_libdiaglog= ncurses +SUBDIR_DEPEND_libedit= ncurses +SUBDIR_DEPEND_libg++= msun +SUBDIR_DEPEND_libgeom= libexpat libsbuf +SUBDIR_DEPEND_liblibrpcsec_gss= libgssapi +SUBDIR_DEPEND_libmagic= libz +SUBDIR_DEPEND_libmemstat= libkvm +SUBDIR_DEPEND_libopie= libmd +SUBDIR_DEPEND_libpam= libcrypt libopie libradius librpcsvc libtacplus libutil ${_libypclnt} ${_libcom_err} +SUBDIR_DEPEND_libpjdlog= libutil +SUBDIR_DEPEND_libprocstat= libkvm libutil +SUBDIR_DEPEND_libradius= libmd +SUBDIR_DEPEND_libreadline= ncurses +SUBDIR_DEPEND_libsmb= libkiconv +SUBDIR_DEPEND_libstdc++= msun +SUBDIR_DEPEND_libtacplus= libmd +SUBDIR_DEPEND_libulog= libmd +SUBDIR_DEPEND_libunbound= ${_libldns} + .if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf) _csu=csu/${MACHINE_ARCH}-elf .elif exists(${.CURDIR}/csu/${MACHINE_ARCH}) @@ -173,6 +182,10 @@ _librpcsec_gss= librpcsec_gss _libiconv_modules= libiconv_modules .endif +.if ${MK_KERBEROS_SUPPORT} != "no" +_libcom_err= libcom_err +.endif + .if ${MK_IPX} != "no" _libipx= libipx .endif Modified: stable/10/share/mk/bsd.subdir.mk ============================================================================== --- stable/10/share/mk/bsd.subdir.mk Tue Aug 19 23:15:47 2014 (r270186) +++ stable/10/share/mk/bsd.subdir.mk Tue Aug 19 23:33:51 2014 (r270187) @@ -47,15 +47,15 @@ _SUBDIR: .USE .MAKE .if defined(SUBDIR) && !empty(SUBDIR) && !defined(NO_SUBDIR) @${_+_}set -e; for entry in ${SUBDIR:N.WAIT}; do \ if test -d ${.CURDIR}/$${entry}.${MACHINE_ARCH}; then \ - ${ECHODIR} "===> ${DIRPRFX}$${entry}.${MACHINE_ARCH} (${.TARGET:realinstall=install})"; \ + ${ECHODIR} "===> ${DIRPRFX}$${entry}.${MACHINE_ARCH} (${.TARGET:S,realinstall,install,:S,^_sub.,,})"; \ edir=$${entry}.${MACHINE_ARCH}; \ cd ${.CURDIR}/$${edir}; \ else \ - ${ECHODIR} "===> ${DIRPRFX}$$entry (${.TARGET:realinstall=install})"; \ + ${ECHODIR} "===> ${DIRPRFX}$$entry (${.TARGET:S,realinstall,install,:S,^_sub.,,})"; \ edir=$${entry}; \ cd ${.CURDIR}/$${edir}; \ fi; \ - ${MAKE} ${.TARGET:realinstall=install} \ + ${MAKE} ${.TARGET:S,realinstall,install,:S,^_sub.,,} \ DIRPRFX=${DIRPRFX}$$edir/; \ done .endif @@ -80,7 +80,12 @@ __subdir_targets= __subdir_targets+= .WAIT .else __subdir_targets+= ${__target}_subdir_${__dir} -${__target}_subdir_${__dir}: .MAKE +__deps= +.for __dep in ${SUBDIR_DEPEND_${__dir}} +__deps+= ${__target}_subdir_${__dep} +.endfor +${__target}_subdir_${__dir}: .MAKE ${__deps} +.if !defined(NO_SUBDIR) @${_+_}set -e; \ if test -d ${.CURDIR}/${__dir}.${MACHINE_ARCH}; then \ ${ECHODIR} "===> ${DIRPRFX}${__dir}.${MACHINE_ARCH} (${__target:realinstall=install})"; \ @@ -94,10 +99,12 @@ ${__target}_subdir_${__dir}: .MAKE ${MAKE} ${__target:realinstall=install} \ DIRPRFX=${DIRPRFX}$$edir/ .endif +.endif .endfor ${__target}: ${__subdir_targets} .else -${__target}: _SUBDIR +${__target}: _sub.${__target} +_sub.${__target}: _SUBDIR .endif .endfor @@ -105,11 +112,14 @@ ${__target}: _SUBDIR .for __stage in build install ${__stage}${__target}: .if make(${__stage}${__target}) -${__stage}${__target}: _SUBDIR +${__stage}${__target}: _sub.${__stage}${__target} +_sub.${__stage}${__target}: _SUBDIR .endif .endfor +.if !target(${__target}) ${__target}: .MAKE ${_+_}set -e; cd ${.CURDIR}; ${MAKE} build${__target}; ${MAKE} install${__target} +.endif .endfor .if !target(install) Modified: stable/10/share/mk/bsd.test.mk ============================================================================== --- stable/10/share/mk/bsd.test.mk Tue Aug 19 23:15:47 2014 (r270186) +++ stable/10/share/mk/bsd.test.mk Tue Aug 19 23:33:51 2014 (r270187) @@ -27,6 +27,15 @@ TESTS_SUBDIRS?= # List of variables to pass to the tests at run-time via the environment. TESTS_ENV?= +# Force all tests in a separate distribution file. +# +# We want this to be the case even when the distribution name is already +# overriden. For example: we want the tests for programs in the 'games' +# distribution to end up in the 'tests' distribution; the test programs +# themselves have all the necessary logic to detect that the games are not +# installed and thus won't cause false negatives. +DISTRIBUTION:= tests + # Ordered list of directories to construct the PATH for the tests. TESTS_PATH+= ${DESTDIR}/bin ${DESTDIR}/sbin \ ${DESTDIR}/usr/bin ${DESTDIR}/usr/sbin From ian at FreeBSD.org Wed Aug 20 00:06:54 2014 From: ian at FreeBSD.org (Ian Lepore) Date: Wed, 20 Aug 2014 00:06:54 +0000 (UTC) Subject: svn commit: r270188 - stable/8 Message-ID: <201408200006.s7K06sCG043506@svn.freebsd.org> Author: ian Date: Wed Aug 20 00:06:54 2014 New Revision: 270188 URL: http://svnweb.freebsd.org/changeset/base/270188 Log: MFC r255286: don't stop the whole universe build if one kernel fails. Modified: stable/8/Makefile (contents, props changed) Modified: stable/8/Makefile ============================================================================== --- stable/8/Makefile Tue Aug 19 23:33:51 2014 (r270187) +++ stable/8/Makefile Wed Aug 20 00:06:54 2014 (r270188) @@ -372,3 +372,11 @@ universe_epilogue: fi .endif .endif + +.if defined(.PARSEDIR) +.if make(universe) +# we do not want a failure of one branch abort all. +MAKE_JOB_ERROR_TOKEN= no +.export MAKE_JOB_ERROR_TOKEN +.endif +.endif From yaneurabeya at gmail.com Wed Aug 20 00:28:34 2014 From: yaneurabeya at gmail.com (Garrett Cooper) Date: Tue, 19 Aug 2014 17:28:33 -0700 Subject: svn commit: r270187 - in stable/10: . etc lib share/mk In-Reply-To: <201408192333.s7JNXpiC028815@svn.freebsd.org> References: <201408192333.s7JNXpiC028815@svn.freebsd.org> Message-ID: On Tue, Aug 19, 2014 at 4:33 PM, Ian Lepore wrote: > Author: ian > Date: Tue Aug 19 23:33:51 2014 > New Revision: 270187 > URL: http://svnweb.freebsd.org/changeset/base/270187 > > Log: > MFC r266473,267331,267511: ... > Modified: stable/10/etc/Makefile > ============================================================================== > --- stable/10/etc/Makefile Tue Aug 19 23:15:47 2014 (r270186) > +++ stable/10/etc/Makefile Tue Aug 19 23:33:51 2014 (r270187) > @@ -174,7 +174,10 @@ afterinstall: > .endif > > distribute: > - ${_+_}cd ${.CURDIR} ; ${MAKE} install DESTDIR=${DISTDIR}/${DISTRIBUTION} > + # Avoid installing tests here; "make distribution" will do this and > + # correctly place them in the right location. > + ${_+_}cd ${.CURDIR} ; ${MAKE} MK_TESTS=no install \ > + DESTDIR=${DISTDIR}/${DISTRIBUTION} > ${_+_}cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION} Hi Ian! Does explicitly setting MK_TESTS=no work without Warner's changes to bsd.own.mk/src.opts.mk? Did you test this option with WITH_TESTS= yes ? Thanks! -Garrett From kib at FreeBSD.org Wed Aug 20 08:24:39 2014 From: kib at FreeBSD.org (Konstantin Belousov) Date: Wed, 20 Aug 2014 08:24:38 +0000 (UTC) Subject: svn commit: r270205 - in stable/10/sys: kern vm Message-ID: <201408200824.s7K8OcSn069089@svn.freebsd.org> Author: kib Date: Wed Aug 20 08:24:37 2014 New Revision: 270205 URL: http://svnweb.freebsd.org/changeset/base/270205 Log: MFC r269907: Fix leaks of unqueued unwired pages. Modified: stable/10/sys/kern/kern_exec.c stable/10/sys/kern/uipc_shm.c stable/10/sys/vm/vm_glue.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_exec.c ============================================================================== --- stable/10/sys/kern/kern_exec.c Wed Aug 20 08:15:23 2014 (r270204) +++ stable/10/sys/kern/kern_exec.c Wed Aug 20 08:24:37 2014 (r270205) @@ -996,6 +996,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: stable/10/sys/kern/uipc_shm.c ============================================================================== --- stable/10/sys/kern/uipc_shm.c Wed Aug 20 08:15:23 2014 (r270204) +++ stable/10/sys/kern/uipc_shm.c Wed Aug 20 08:24:37 2014 (r270205) @@ -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: stable/10/sys/vm/vm_glue.c ============================================================================== --- stable/10/sys/vm/vm_glue.c Wed Aug 20 08:15:23 2014 (r270204) +++ stable/10/sys/vm/vm_glue.c Wed Aug 20 08:24:37 2014 (r270205) @@ -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 markj at FreeBSD.org Wed Aug 20 14:57:22 2014 From: markj at FreeBSD.org (Mark Johnston) Date: Wed, 20 Aug 2014 14:57:22 +0000 (UTC) Subject: svn commit: r270213 - stable/9/cddl/contrib/opensolaris/lib/libdtrace/common Message-ID: <201408201457.s7KEvMOF046705@svn.freebsd.org> Author: markj Date: Wed Aug 20 14:57:21 2014 New Revision: 270213 URL: http://svnweb.freebsd.org/changeset/base/270213 Log: MFC r269524: Preserve the errno value of an ioctl before calling free(3). Previously, errno was very occasionally being clobbered, resulting in a bogus error from dt_consume() and thus an error from dtrace(1). Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_map.c stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_work.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Wed Aug 20 14:57:20 2014 (r270212) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Wed Aug 20 14:57:21 2014 (r270213) @@ -2555,7 +2555,7 @@ dt_get_buf(dtrace_hdl_t *dtp, int cpu, d { dtrace_optval_t size; dtrace_bufdesc_t *buf = dt_zalloc(dtp, sizeof (*buf)); - int error; + int error, rval; if (buf == NULL) return (-1); @@ -2574,7 +2574,6 @@ dt_get_buf(dtrace_hdl_t *dtp, int cpu, d #else if (dt_ioctl(dtp, DTRACEIOC_BUFSNAP, &buf) == -1) { #endif - dt_put_buf(dtp, buf); /* * If we failed with ENOENT, it may be because the * CPU was unconfigured -- this is okay. Any other @@ -2582,10 +2581,12 @@ dt_get_buf(dtrace_hdl_t *dtp, int cpu, d */ if (errno == ENOENT) { *bufp = NULL; - return (0); - } + rval = 0; + } else + rval = dt_set_errno(dtp, errno); - return (dt_set_errno(dtp, errno)); + dt_put_buf(dtp, buf); + return (rval); } error = dt_unring_buf(dtp, buf); Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_map.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_map.c Wed Aug 20 14:57:20 2014 (r270212) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_map.c Wed Aug 20 14:57:21 2014 (r270213) @@ -39,7 +39,7 @@ static int dt_strdata_add(dtrace_hdl_t *dtp, dtrace_recdesc_t *rec, void ***data, int *max) { - int maxformat; + int maxformat, rval; dtrace_fmtdesc_t fmt; void *result; @@ -63,8 +63,9 @@ dt_strdata_add(dtrace_hdl_t *dtp, dtrace return (dt_set_errno(dtp, EDT_NOMEM)); if (dt_ioctl(dtp, DTRACEIOC_FORMAT, &fmt) == -1) { + rval = dt_set_errno(dtp, errno); free(fmt.dtfd_string); - return (dt_set_errno(dtp, errno)); + return (rval); } while (rec->dtrd_format > (maxformat = *max)) { Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_work.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_work.c Wed Aug 20 14:57:20 2014 (r270212) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_work.c Wed Aug 20 14:57:21 2014 (r270213) @@ -184,7 +184,7 @@ dtrace_go(dtrace_hdl_t *dtp) { dtrace_enable_io_t args; void *dof; - int err; + int error, r; if (dtp->dt_active) return (dt_set_errno(dtp, EINVAL)); @@ -206,11 +206,12 @@ dtrace_go(dtrace_hdl_t *dtp) args.dof = dof; args.n_matched = 0; - err = dt_ioctl(dtp, DTRACEIOC_ENABLE, &args); + r = dt_ioctl(dtp, DTRACEIOC_ENABLE, &args); + error = errno; dtrace_dof_destroy(dtp, dof); - if (err == -1 && (errno != ENOTTY || dtp->dt_vector == NULL)) - return (dt_set_errno(dtp, errno)); + if (r == -1 && (error != ENOTTY || dtp->dt_vector == NULL)) + return (dt_set_errno(dtp, error)); if (dt_ioctl(dtp, DTRACEIOC_GO, &dtp->dt_beganon) == -1) { if (errno == EACCES) From markj at FreeBSD.org Wed Aug 20 14:57:56 2014 From: markj at FreeBSD.org (Mark Johnston) Date: Wed, 20 Aug 2014 14:57:55 +0000 (UTC) Subject: svn commit: r270214 - stable/10/cddl/contrib/opensolaris/lib/libdtrace/common Message-ID: <201408201457.s7KEvtfw046826@svn.freebsd.org> Author: markj Date: Wed Aug 20 14:57:55 2014 New Revision: 270214 URL: http://svnweb.freebsd.org/changeset/base/270214 Log: MFC r269524: Preserve the errno value of an ioctl before calling free(3). Previously, errno was very occasionally being clobbered, resulting in a bogus error from dt_consume() and thus an error from dtrace(1). Modified: stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_map.c stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_work.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Wed Aug 20 14:57:21 2014 (r270213) +++ stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Wed Aug 20 14:57:55 2014 (r270214) @@ -2944,7 +2944,7 @@ dt_get_buf(dtrace_hdl_t *dtp, int cpu, d { dtrace_optval_t size; dtrace_bufdesc_t *buf = dt_zalloc(dtp, sizeof (*buf)); - int error; + int error, rval; if (buf == NULL) return (-1); @@ -2963,7 +2963,6 @@ dt_get_buf(dtrace_hdl_t *dtp, int cpu, d #else if (dt_ioctl(dtp, DTRACEIOC_BUFSNAP, &buf) == -1) { #endif - dt_put_buf(dtp, buf); /* * If we failed with ENOENT, it may be because the * CPU was unconfigured -- this is okay. Any other @@ -2971,10 +2970,12 @@ dt_get_buf(dtrace_hdl_t *dtp, int cpu, d */ if (errno == ENOENT) { *bufp = NULL; - return (0); - } + rval = 0; + } else + rval = dt_set_errno(dtp, errno); - return (dt_set_errno(dtp, errno)); + dt_put_buf(dtp, buf); + return (rval); } error = dt_unring_buf(dtp, buf); Modified: stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_map.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_map.c Wed Aug 20 14:57:21 2014 (r270213) +++ stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_map.c Wed Aug 20 14:57:55 2014 (r270214) @@ -39,7 +39,7 @@ static int dt_strdata_add(dtrace_hdl_t *dtp, dtrace_recdesc_t *rec, void ***data, int *max) { - int maxformat; + int maxformat, rval; dtrace_fmtdesc_t fmt; void *result; @@ -63,8 +63,9 @@ dt_strdata_add(dtrace_hdl_t *dtp, dtrace return (dt_set_errno(dtp, EDT_NOMEM)); if (dt_ioctl(dtp, DTRACEIOC_FORMAT, &fmt) == -1) { + rval = dt_set_errno(dtp, errno); free(fmt.dtfd_string); - return (dt_set_errno(dtp, errno)); + return (rval); } while (rec->dtrd_format > (maxformat = *max)) { Modified: stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_work.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_work.c Wed Aug 20 14:57:21 2014 (r270213) +++ stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_work.c Wed Aug 20 14:57:55 2014 (r270214) @@ -184,7 +184,7 @@ dtrace_go(dtrace_hdl_t *dtp) { dtrace_enable_io_t args; void *dof; - int err; + int error, r; if (dtp->dt_active) return (dt_set_errno(dtp, EINVAL)); @@ -206,11 +206,12 @@ dtrace_go(dtrace_hdl_t *dtp) args.dof = dof; args.n_matched = 0; - err = dt_ioctl(dtp, DTRACEIOC_ENABLE, &args); + r = dt_ioctl(dtp, DTRACEIOC_ENABLE, &args); + error = errno; dtrace_dof_destroy(dtp, dof); - if (err == -1 && (errno != ENOTTY || dtp->dt_vector == NULL)) - return (dt_set_errno(dtp, errno)); + if (r == -1 && (error != ENOTTY || dtp->dt_vector == NULL)) + return (dt_set_errno(dtp, error)); if (dt_ioctl(dtp, DTRACEIOC_GO, &dtp->dt_beganon) == -1) { if (errno == EACCES) From davide at FreeBSD.org Wed Aug 20 17:26:05 2014 From: davide at FreeBSD.org (Davide Italiano) Date: Wed, 20 Aug 2014 17:26:05 +0000 (UTC) Subject: svn commit: r270233 - stable/10/sys/kern Message-ID: <201408201726.s7KHQ5qg018962@svn.freebsd.org> Author: davide Date: Wed Aug 20 17:26:05 2014 New Revision: 270233 URL: http://svnweb.freebsd.org/changeset/base/270233 Log: MFC r269502: Fix an overflow in getsockopt(). optval isn't big enough to hold sbintime_t. Re-introduce r255030 behaviour capping socket timeouts to INT_32 if they're too large. Modified: stable/10/sys/kern/uipc_socket.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/uipc_socket.c ============================================================================== --- stable/10/sys/kern/uipc_socket.c Wed Aug 20 17:07:41 2014 (r270232) +++ stable/10/sys/kern/uipc_socket.c Wed Aug 20 17:26:05 2014 (r270233) @@ -2548,8 +2548,10 @@ sosetopt(struct socket *so, struct socko error = EDOM; goto bad; } - val = tvtosbt(tv); - + if (tv.tv_sec > INT32_MAX) + val = SBT_MAX; + else + val = tvtosbt(tv); switch (sopt->sopt_name) { case SO_SNDTIMEO: so->so_snd.sb_timeo = val; @@ -2699,10 +2701,8 @@ integer: case SO_SNDTIMEO: case SO_RCVTIMEO: - optval = (sopt->sopt_name == SO_SNDTIMEO ? - so->so_snd.sb_timeo : so->so_rcv.sb_timeo); - - tv = sbttotv(optval); + tv = sbttotv(sopt->sopt_name == SO_SNDTIMEO ? + so->so_snd.sb_timeo : so->so_rcv.sb_timeo); #ifdef COMPAT_FREEBSD32 if (SV_CURPROC_FLAG(SV_ILP32)) { struct timeval32 tv32; From luigi at FreeBSD.org Wed Aug 20 17:33:32 2014 From: luigi at FreeBSD.org (Luigi Rizzo) Date: Wed, 20 Aug 2014 17:33:32 +0000 (UTC) Subject: svn commit: r270235 - stable/10/sys/dev/e1000 Message-ID: <201408201733.s7KHXWpi023430@svn.freebsd.org> Author: luigi Date: Wed Aug 20 17:33:32 2014 New Revision: 270235 URL: http://svnweb.freebsd.org/changeset/base/270235 Log: MFC 259907 (dates back to december) use the correct netmap <-> nic slot mapping on the transmit ring for 'lem'. This bug would manifest only in netmap mode and on packets transmitted after a NIC reset while netmap mode is active. Modified: stable/10/sys/dev/e1000/if_lem.c Modified: stable/10/sys/dev/e1000/if_lem.c ============================================================================== --- stable/10/sys/dev/e1000/if_lem.c Wed Aug 20 17:27:15 2014 (r270234) +++ stable/10/sys/dev/e1000/if_lem.c Wed Aug 20 17:33:32 2014 (r270235) @@ -2678,7 +2678,7 @@ lem_setup_transmit_structures(struct ada void *addr; addr = PNMB(slot + si, &paddr); - adapter->tx_desc_base[si].buffer_addr = htole64(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); } From loos at FreeBSD.org Wed Aug 20 17:39:53 2014 From: loos at FreeBSD.org (Luiz Otavio O Souza) Date: Wed, 20 Aug 2014 17:39:53 +0000 (UTC) Subject: svn commit: r270236 - stable/10/sys/dev/gpio Message-ID: <201408201739.s7KHdrYT024256@svn.freebsd.org> Author: loos Date: Wed Aug 20 17:39:53 2014 New Revision: 270236 URL: http://svnweb.freebsd.org/changeset/base/270236 Log: MFC r266922: Add a bounds verification to the SCL and SDA pin values. At attach, print the SCL and SDA pin numbers. Remove a stray blank line. Remove the GPIOBUS locking from gpioiic_reset(), it is already called with this lock held. This fixes a crash when you try to scan the iicbus with i2c(8). Modified: stable/10/sys/dev/gpio/gpioiic.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/gpio/gpioiic.c ============================================================================== --- stable/10/sys/dev/gpio/gpioiic.c Wed Aug 20 17:33:32 2014 (r270235) +++ stable/10/sys/dev/gpio/gpioiic.c Wed Aug 20 17:39:53 2014 (r270236) @@ -46,6 +46,8 @@ __FBSDID("$FreeBSD$"); #include #endif +#include + #include #include @@ -74,7 +76,6 @@ static int gpioiic_getsda(device_t); static int gpioiic_getscl(device_t); static int gpioiic_reset(device_t, u_char, u_char, u_char *); - static int gpioiic_probe(device_t dev) { @@ -91,13 +92,15 @@ gpioiic_probe(device_t dev) static int gpioiic_attach(device_t dev) { - struct gpioiic_softc *sc = device_get_softc(dev); device_t bitbang; #ifdef FDT phandle_t node; pcell_t pin; #endif + struct gpiobus_ivar *devi; + struct gpioiic_softc *sc; + sc = device_get_softc(dev); sc->sc_dev = dev; sc->sc_busdev = device_get_parent(dev); if (resource_int_value(device_get_name(dev), @@ -116,6 +119,15 @@ gpioiic_attach(device_t dev) sc->sda_pin = (int)pin; #endif + if (sc->scl_pin < 0 || sc->scl_pin > 1) + sc->scl_pin = SCL_PIN_DEFAULT; + if (sc->sda_pin < 0 || sc->sda_pin > 1) + sc->sda_pin = SDA_PIN_DEFAULT; + + devi = GPIOBUS_IVAR(dev); + device_printf(dev, "SCL pin: %d, SDA pin: %d\n", + devi->pins[sc->scl_pin], devi->pins[sc->sda_pin]); + /* add generic bit-banging code */ bitbang = device_add_child(dev, "iicbb", -1); device_probe_and_attach(bitbang); @@ -221,16 +233,11 @@ gpioiic_getsda(device_t dev) static int gpioiic_reset(device_t dev, u_char speed, u_char addr, u_char *oldaddr) { - struct gpioiic_softc *sc = device_get_softc(dev); - - GPIOBUS_LOCK_BUS(sc->sc_busdev); - GPIOBUS_ACQUIRE_BUS(sc->sc_busdev, sc->sc_dev); + struct gpioiic_softc *sc; + sc = device_get_softc(dev); gpioiic_reset_bus(sc->sc_dev); - GPIOBUS_RELEASE_BUS(sc->sc_busdev, sc->sc_dev); - GPIOBUS_UNLOCK_BUS(sc->sc_busdev); - return (IIC_ENOADDR); } From loos at FreeBSD.org Wed Aug 20 17:57:23 2014 From: loos at FreeBSD.org (Luiz Otavio O Souza) Date: Wed, 20 Aug 2014 17:57:23 +0000 (UTC) Subject: svn commit: r270237 - stable/10/sys/arm/ti/am335x Message-ID: <201408201757.s7KHvNDJ033666@svn.freebsd.org> Author: loos Date: Wed Aug 20 17:57:23 2014 New Revision: 270237 URL: http://svnweb.freebsd.org/changeset/base/270237 Log: MFC r266937: Export two new settings for the AM335x PWM, the clock prescaler (clkdiv) and the actual PWM frequency. Enforce the maximum value for the period sysctl. The frequency systcl now allows the direct setting of the PWM frequency (it will try to find the better clkdiv and period for a given frequency, i.e. the ones that will give the better PWM resolution). This allows the use lower frequencies on the PWM. Without changing the clock prescaler the minimum PWM frequency was 1.52kHz. PWM frequencies checked with an osciloscope. PWM output tested with some R/C servos at 50Hz. Modified: stable/10/sys/arm/ti/am335x/am335x_pwm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/ti/am335x/am335x_pwm.c ============================================================================== --- stable/10/sys/arm/ti/am335x/am335x_pwm.c Wed Aug 20 17:39:53 2014 (r270236) +++ stable/10/sys/arm/ti/am335x/am335x_pwm.c Wed Aug 20 17:57:23 2014 (r270237) @@ -29,10 +29,11 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include #include +#include +#include #include +#include #include #include #include @@ -53,12 +54,13 @@ __FBSDID("$FreeBSD$"); /* In ticks */ #define DEFAULT_PWM_PERIOD 1000 +#define PWM_CLOCK 100000000UL #define PWM_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) #define PWM_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) #define PWM_LOCK_INIT(_sc) mtx_init(&(_sc)->sc_mtx, \ device_get_nameunit(_sc->sc_dev), "am335x_pwm softc", MTX_DEF) -#define PWM_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_mtx); +#define PWM_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_mtx) static struct resource_spec am335x_pwm_mem_spec[] = { { SYS_RES_MEMORY, 0, RF_ACTIVE }, /* PWMSS */ @@ -170,6 +172,8 @@ static struct resource_spec am335x_pwm_m static device_probe_t am335x_pwm_probe; static device_attach_t am335x_pwm_attach; static device_detach_t am335x_pwm_detach; + +static int am335x_pwm_clkdiv[8] = { 1, 2, 4, 8, 16, 32, 64, 128 }; struct am335x_pwm_softc { device_t sc_dev; @@ -177,6 +181,10 @@ struct am335x_pwm_softc { struct resource *sc_mem_res[4]; int sc_id; /* sysctl for configuration */ + int sc_pwm_clkdiv; + int sc_pwm_freq; + struct sysctl_oid *sc_clkdiv_oid; + struct sysctl_oid *sc_freq_oid; struct sysctl_oid *sc_period_oid; struct sysctl_oid *sc_chanA_oid; struct sysctl_oid *sc_chanB_oid; @@ -241,6 +249,98 @@ am335x_pwm_config_ecas(int unit, int per return (0); } +static void +am335x_pwm_freq(struct am335x_pwm_softc *sc) +{ + int clkdiv; + + clkdiv = am335x_pwm_clkdiv[sc->sc_pwm_clkdiv]; + sc->sc_pwm_freq = PWM_CLOCK / (1 * clkdiv) / sc->sc_pwm_period; +} + +static int +am335x_pwm_sysctl_freq(SYSCTL_HANDLER_ARGS) +{ + int clkdiv, error, freq, i, period; + struct am335x_pwm_softc *sc; + uint32_t reg; + + sc = (struct am335x_pwm_softc *)arg1; + + PWM_LOCK(sc); + freq = sc->sc_pwm_freq; + PWM_UNLOCK(sc); + + error = sysctl_handle_int(oidp, &freq, sizeof(freq), req); + if (error != 0 || req->newptr == NULL) + return (error); + + if (freq > PWM_CLOCK) + freq = PWM_CLOCK; + + PWM_LOCK(sc); + if (freq != sc->sc_pwm_freq) { + for (i = nitems(am335x_pwm_clkdiv) - 1; i >= 0; i--) { + clkdiv = am335x_pwm_clkdiv[i]; + period = PWM_CLOCK / clkdiv / freq; + if (period > USHRT_MAX) + break; + sc->sc_pwm_clkdiv = i; + sc->sc_pwm_period = period; + } + /* Reset the duty cycle settings. */ + sc->sc_pwm_dutyA = 0; + sc->sc_pwm_dutyB = 0; + EPWM_WRITE2(sc, EPWM_CMPA, sc->sc_pwm_dutyA); + EPWM_WRITE2(sc, EPWM_CMPB, sc->sc_pwm_dutyB); + /* Update the clkdiv settings. */ + reg = EPWM_READ2(sc, EPWM_TBCTL); + reg &= ~TBCTL_CLKDIV_MASK; + reg |= TBCTL_CLKDIV(sc->sc_pwm_clkdiv); + EPWM_WRITE2(sc, EPWM_TBCTL, reg); + /* Update the period settings. */ + EPWM_WRITE2(sc, EPWM_TBPRD, sc->sc_pwm_period - 1); + am335x_pwm_freq(sc); + } + PWM_UNLOCK(sc); + + return (0); +} + +static int +am335x_pwm_sysctl_clkdiv(SYSCTL_HANDLER_ARGS) +{ + int error, i, clkdiv; + struct am335x_pwm_softc *sc; + uint32_t reg; + + sc = (struct am335x_pwm_softc *)arg1; + + PWM_LOCK(sc); + clkdiv = am335x_pwm_clkdiv[sc->sc_pwm_clkdiv]; + PWM_UNLOCK(sc); + + error = sysctl_handle_int(oidp, &clkdiv, sizeof(clkdiv), req); + if (error != 0 || req->newptr == NULL) + return (error); + + PWM_LOCK(sc); + if (clkdiv != am335x_pwm_clkdiv[sc->sc_pwm_clkdiv]) { + for (i = 0; i < nitems(am335x_pwm_clkdiv); i++) + if (clkdiv >= am335x_pwm_clkdiv[i]) + sc->sc_pwm_clkdiv = i; + + reg = EPWM_READ2(sc, EPWM_TBCTL); + reg &= ~TBCTL_CLKDIV_MASK; + reg |= TBCTL_CLKDIV(sc->sc_pwm_clkdiv); + EPWM_WRITE2(sc, EPWM_TBCTL, reg); + am335x_pwm_freq(sc); + } + PWM_UNLOCK(sc); + + return (0); +} + static int am335x_pwm_sysctl_duty(SYSCTL_HANDLER_ARGS) { @@ -292,15 +392,19 @@ am335x_pwm_sysctl_period(SYSCTL_HANDLER_ if (period < 1) return (EINVAL); - if ((period < sc->sc_pwm_dutyA) || (period < sc->sc_pwm_dutyB)) { - device_printf(sc->sc_dev, "Period can't be less then duty cycle\n"); - return (EINVAL); - } - + if (period > USHRT_MAX) + period = USHRT_MAX; PWM_LOCK(sc); + /* Reset the duty cycle settings. */ + sc->sc_pwm_dutyA = 0; + sc->sc_pwm_dutyB = 0; + EPWM_WRITE2(sc, EPWM_CMPA, sc->sc_pwm_dutyA); + EPWM_WRITE2(sc, EPWM_CMPB, sc->sc_pwm_dutyB); + /* Update the period settings. */ sc->sc_pwm_period = period; EPWM_WRITE2(sc, EPWM_TBPRD, period - 1); + am335x_pwm_freq(sc); PWM_UNLOCK(sc); return (error); @@ -360,6 +464,14 @@ am335x_pwm_attach(device_t dev) ctx = device_get_sysctl_ctx(sc->sc_dev); tree = device_get_sysctl_tree(sc->sc_dev); + sc->sc_clkdiv_oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "clkdiv", CTLTYPE_INT | CTLFLAG_RW, sc, 0, + am335x_pwm_sysctl_clkdiv, "I", "PWM clock prescaler"); + + sc->sc_freq_oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "freq", CTLTYPE_INT | CTLFLAG_RW, sc, 0, + am335x_pwm_sysctl_freq, "I", "PWM frequency"); + sc->sc_period_oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "period", CTLTYPE_INT | CTLFLAG_RW, sc, 0, am335x_pwm_sysctl_period, "I", "PWM period"); @@ -372,7 +484,6 @@ am335x_pwm_attach(device_t dev) "dutyB", CTLTYPE_INT | CTLFLAG_RW, sc, 0, am335x_pwm_sysctl_duty, "I", "Channel B duty cycles"); - /* CONFIGURE EPWM1 */ reg = EPWM_READ2(sc, EPWM_TBCTL); reg &= ~(TBCTL_CLKDIV_MASK | TBCTL_HSPCLKDIV_MASK); @@ -381,6 +492,7 @@ am335x_pwm_attach(device_t dev) sc->sc_pwm_period = DEFAULT_PWM_PERIOD; sc->sc_pwm_dutyA = 0; sc->sc_pwm_dutyB = 0; + am335x_pwm_freq(sc); EPWM_WRITE2(sc, EPWM_TBPRD, sc->sc_pwm_period - 1); EPWM_WRITE2(sc, EPWM_CMPA, sc->sc_pwm_dutyA); From loos at FreeBSD.org Wed Aug 20 18:10:13 2014 From: loos at FreeBSD.org (Luiz Otavio O Souza) Date: Wed, 20 Aug 2014 18:10:12 +0000 (UTC) Subject: svn commit: r270238 - in stable/10: share/man/man4/man4.arm sys/arm/ti Message-ID: <201408201810.s7KIACcG039614@svn.freebsd.org> Author: loos Date: Wed Aug 20 18:10:12 2014 New Revision: 270238 URL: http://svnweb.freebsd.org/changeset/base/270238 Log: MFC r266960: Configure the analog input 7 which, on BBB, is connected to the 3V3B rail through a voltage divisor (R163 and R164 on page 4 of BBB schematic). Add a note about this on ti_adc(4) man page. The ti_adc(4) man page will first appear on 10.1-RELEASE. Suggested by: Sulev-Madis Silber (ketas) Manual page reviewed by: brueffer (D127) Modified: stable/10/share/man/man4/man4.arm/ti_adc.4 stable/10/sys/arm/ti/ti_adc.c stable/10/sys/arm/ti/ti_adcreg.h stable/10/sys/arm/ti/ti_adcvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/man4.arm/ti_adc.4 ============================================================================== --- stable/10/share/man/man4/man4.arm/ti_adc.4 Wed Aug 20 17:57:23 2014 (r270237) +++ stable/10/share/man/man4/man4.arm/ti_adc.4 Wed Aug 20 18:10:12 2014 (r270238) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 21, 2014 +.Dd June 1, 2014 .Dt TI_ADC 4 .Os .Sh NAME @@ -78,8 +78,17 @@ dev.ti_adc.0.ain.6.enable: 1 dev.ti_adc.0.ain.6.open_delay: 0 dev.ti_adc.0.ain.6.samples_avg: 4 dev.ti_adc.0.ain.6.input: 2308 +dev.ti_adc.0.ain.7.enable: 1 +dev.ti_adc.0.ain.7.open_delay: 0 +dev.ti_adc.0.ain.7.samples_avg: 0 +dev.ti_adc.0.ain.7.input: 3812 .Ed .Pp +On Beaglebone-black the analog input 7 is connected to the 3V3B rail through +a voltage divisor (2:1). +The 3V3B voltage rail comes from the TL5209 LDO regulator which is limited +to 500mA maximum. +.Pp Global settings: .Bl -tag -width ".Va dev.ti_adc.0.clockdiv" .It Va dev.ti_adc.0.clockdiv @@ -112,8 +121,8 @@ It is made of a 12 bit value (0 ~ 4095). The .Nm driver first appeared in -.Fx 11.0 . +.Fx 10.1 . .Sh AUTHORS .An -nosplit The driver and this manual page was written by -.An Luiz Otavio O Souza Aq loos at FreeBSD.org +.An Luiz Otavio O Souza Aq loos at FreeBSD.org . Modified: stable/10/sys/arm/ti/ti_adc.c ============================================================================== --- stable/10/sys/arm/ti/ti_adc.c Wed Aug 20 17:57:23 2014 (r270237) +++ stable/10/sys/arm/ti/ti_adc.c Wed Aug 20 18:10:12 2014 (r270238) @@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include -/* Define our 7 steps, one for each input channel. */ +/* Define our 8 steps, one for each input channel. */ static struct ti_adc_input ti_adc_inputs[TI_ADC_NPINS] = { { .stepconfig = ADC_STEPCFG1, .stepdelay = ADC_STEPDLY1 }, { .stepconfig = ADC_STEPCFG2, .stepdelay = ADC_STEPDLY2 }, @@ -59,6 +59,7 @@ static struct ti_adc_input ti_adc_inputs { .stepconfig = ADC_STEPCFG5, .stepdelay = ADC_STEPDLY5 }, { .stepconfig = ADC_STEPCFG6, .stepdelay = ADC_STEPDLY6 }, { .stepconfig = ADC_STEPCFG7, .stepdelay = ADC_STEPDLY7 }, + { .stepconfig = ADC_STEPCFG8, .stepdelay = ADC_STEPDLY8 }, }; static int ti_adc_samples[5] = { 0, 2, 4, 8, 16 }; Modified: stable/10/sys/arm/ti/ti_adcreg.h ============================================================================== --- stable/10/sys/arm/ti/ti_adcreg.h Wed Aug 20 17:57:23 2014 (r270237) +++ stable/10/sys/arm/ti/ti_adcreg.h Wed Aug 20 18:10:12 2014 (r270238) @@ -81,6 +81,8 @@ #define ADC_STEPDLY6 0x090 #define ADC_STEPCFG7 0x094 #define ADC_STEPDLY7 0x098 +#define ADC_STEPCFG8 0x09c +#define ADC_STEPDLY8 0x0a0 #define ADC_STEP_DIFF_CNTRL (1 << 25) #define ADC_STEP_RFM_MSK 0x01800000 #define ADC_STEP_RFM_SHIFT 23 Modified: stable/10/sys/arm/ti/ti_adcvar.h ============================================================================== --- stable/10/sys/arm/ti/ti_adcvar.h Wed Aug 20 17:57:23 2014 (r270237) +++ stable/10/sys/arm/ti/ti_adcvar.h Wed Aug 20 18:10:12 2014 (r270238) @@ -29,7 +29,7 @@ #ifndef _TI_ADCVAR_H_ #define _TI_ADCVAR_H_ -#define TI_ADC_NPINS 7 +#define TI_ADC_NPINS 8 #define ADC_READ4(_sc, reg) bus_read_4((_sc)->sc_mem_res, reg) #define ADC_WRITE4(_sc, reg, value) \ From davide at FreeBSD.org Wed Aug 20 18:40:30 2014 From: davide at FreeBSD.org (Davide Italiano) Date: Wed, 20 Aug 2014 18:40:30 +0000 (UTC) Subject: svn commit: r270240 - stable/10/sys/sys Message-ID: <201408201840.s7KIeU5X054071@svn.freebsd.org> Author: davide Date: Wed Aug 20 18:40:29 2014 New Revision: 270240 URL: http://svnweb.freebsd.org/changeset/base/270240 Log: Complete MFC of r270233, also unbreak the build. Reported by: grehan Modified: stable/10/sys/sys/time.h Modified: stable/10/sys/sys/time.h ============================================================================== --- stable/10/sys/sys/time.h Wed Aug 20 18:29:18 2014 (r270239) +++ stable/10/sys/sys/time.h Wed Aug 20 18:40:29 2014 (r270240) @@ -129,6 +129,7 @@ bintime_shift(struct bintime *_bt, int _ #define SBT_1MS (SBT_1S / 1000) #define SBT_1US (SBT_1S / 1000000) #define SBT_1NS (SBT_1S / 1000000000) +#define SBT_MAX 0x7fffffffffffffff static __inline int sbintime_getsec(sbintime_t _sbt) From loos at FreeBSD.org Wed Aug 20 19:12:20 2014 From: loos at FreeBSD.org (Luiz Otavio O Souza) Date: Wed, 20 Aug 2014 19:12:19 +0000 (UTC) Subject: svn commit: r270241 - in stable/10/sys: arm/ti dev/iicbus Message-ID: <201408201912.s7KJCJdb070706@svn.freebsd.org> Author: loos Date: Wed Aug 20 19:12:19 2014 New Revision: 270241 URL: http://svnweb.freebsd.org/changeset/base/270241 Log: MFC r266923: Ignore IIC_ENOADDR from iicbus_reset() as it only means we have a master-only controller. This fixes the iic bus scan with i2c(8) (on supported controllers). Tested with gpioiic(4). MFC r267009: Remove the unnecessary i2c slave address assignment. The ti_i2c controller only works in the master mode and the i2c address passed on iicbus_reset() is used to set the controller slave address when operating as an i2c slave (which isn't currently supported). When talking to a slave, the slave address is correctly provided to ti_i2c_tranfer(). Modified: stable/10/sys/arm/ti/ti_i2c.c stable/10/sys/dev/iicbus/iic.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/ti/ti_i2c.c ============================================================================== --- stable/10/sys/arm/ti/ti_i2c.c Wed Aug 20 18:40:29 2014 (r270240) +++ stable/10/sys/arm/ti/ti_i2c.c Wed Aug 20 19:12:19 2014 (r270241) @@ -91,7 +91,6 @@ struct ti_i2c_softc volatile uint16_t sc_stat_flags; /* contains the status flags last IRQ */ - uint16_t sc_i2c_addr; uint16_t sc_rev; }; @@ -294,10 +293,6 @@ ti_i2c_reset(device_t dev, u_char speed, TI_I2C_LOCK(sc); - if (oldaddr) - *oldaddr = sc->sc_i2c_addr; - sc->sc_i2c_addr = addr; - /* First disable the controller while changing the clocks */ con_reg = ti_i2c_read_reg(sc, I2C_REG_CON); ti_i2c_write_reg(sc, I2C_REG_CON, 0x0000); @@ -309,9 +304,6 @@ ti_i2c_reset(device_t dev, u_char speed, ti_i2c_write_reg(sc, I2C_REG_SCLL, clkcfg->scll | (clkcfg->hsscll<<8)); ti_i2c_write_reg(sc, I2C_REG_SCLH, clkcfg->sclh | (clkcfg->hssclh<<8)); - /* Set the remote slave address */ - ti_i2c_write_reg(sc, I2C_REG_SA, addr); - /* Check if we are dealing with high speed mode */ if ((clkcfg->hsscll + clkcfg->hssclh) > 0) con_reg = I2C_CON_OPMODE_HS; @@ -323,7 +315,7 @@ ti_i2c_reset(device_t dev, u_char speed, TI_I2C_UNLOCK(sc); - return 0; + return (IIC_ENOADDR); } /** Modified: stable/10/sys/dev/iicbus/iic.c ============================================================================== --- stable/10/sys/dev/iicbus/iic.c Wed Aug 20 18:40:29 2014 (r270240) +++ stable/10/sys/dev/iicbus/iic.c Wed Aug 20 19:12:19 2014 (r270241) @@ -322,6 +322,12 @@ iicioctl(struct cdev *dev, u_long cmd, c case I2CRSTCARD: error = iicbus_reset(parent, IIC_UNKNOWN, 0, NULL); + /* + * Ignore IIC_ENOADDR as it only means we have a master-only + * controller. + */ + if (error == IIC_ENOADDR) + error = 0; break; case I2CWRITE: From asomers at FreeBSD.org Wed Aug 20 19:31:00 2014 From: asomers at FreeBSD.org (Alan Somers) Date: Wed, 20 Aug 2014 19:30:58 +0000 (UTC) Subject: svn commit: r270242 - in stable/10: etc/mtree sbin/devd sbin/devd/tests Message-ID: <201408201930.s7KJUw5E076882@svn.freebsd.org> Author: asomers Date: Wed Aug 20 19:30:58 2014 New Revision: 270242 URL: http://svnweb.freebsd.org/changeset/base/270242 Log: MFC devd-related changes r270004 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. r270019 (from bz) 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 Added: stable/10/sbin/devd/tests/ - copied from r270004, head/sbin/devd/tests/ Modified: stable/10/etc/mtree/BSD.tests.dist stable/10/sbin/devd/Makefile stable/10/sbin/devd/devd.8 stable/10/sbin/devd/devd.cc stable/10/sbin/devd/tests/client_test.c Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Wed Aug 20 19:12:19 2014 (r270241) +++ stable/10/etc/mtree/BSD.tests.dist Wed Aug 20 19:30:58 2014 (r270242) @@ -95,6 +95,8 @@ sbin dhclient .. + devd + .. growfs .. mdconfig Modified: stable/10/sbin/devd/Makefile ============================================================================== --- stable/10/sbin/devd/Makefile Wed Aug 20 19:12:19 2014 (r270241) +++ stable/10/sbin/devd/Makefile Wed Aug 20 19:30:58 2014 (r270242) @@ -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: stable/10/sbin/devd/devd.8 ============================================================================== --- stable/10/sbin/devd/devd.8 Wed Aug 20 19:12:19 2014 (r270241) +++ stable/10/sbin/devd/devd.8 Wed Aug 20 19:30:58 2014 (r270242) @@ -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: stable/10/sbin/devd/devd.cc ============================================================================== --- stable/10/sbin/devd/devd.cc Wed Aug 20 19:12:19 2014 (r270241) +++ stable/10/sbin/devd/devd.cc Wed Aug 20 19:30:58 2014 (r270242) @@ -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); } Modified: stable/10/sbin/devd/tests/client_test.c ============================================================================== --- head/sbin/devd/tests/client_test.c Thu Aug 14 22:33:56 2014 (r270004) +++ stable/10/sbin/devd/tests/client_test.c Wed Aug 20 19:30:58 2014 (r270242) @@ -49,7 +49,7 @@ create_two_events(void) char destroy_cmd[80]; char *error; - create_stdout = popen("mdconfig -a -s 64 -t null", "r"); + create_stdout = popen("mdconfig -a -s 64 -t swap", "r"); ATF_REQUIRE(create_stdout != NULL); error = fgets(mdname, sizeof(mdname), create_stdout); ATF_REQUIRE(error != NULL); @@ -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 loos at FreeBSD.org Wed Aug 20 19:37:07 2014 From: loos at FreeBSD.org (Luiz Otavio O Souza) Date: Wed, 20 Aug 2014 19:37:06 +0000 (UTC) Subject: svn commit: r270243 - in stable/10: share/man/man4 sys/arm/broadcom/bcm2835 sys/arm/ti sys/boot/fdt/dts/arm Message-ID: <201408201937.s7KJb6Dk080359@svn.freebsd.org> Author: loos Date: Wed Aug 20 19:37:05 2014 New Revision: 270243 URL: http://svnweb.freebsd.org/changeset/base/270243 Log: MFC r267021: FreeBSD, historically, has always used 8-bit addresses for i2c devices (7-bit device address << 1), always leaving the room for the read/write bit. This commit convert ti_i2c and revert r259127 on bcm2835_bsc to make them compatible with 8-bit addresses. Previous to this commit an i2c device would have different addresses depending on the controller it was attached to (by example, when compared to any iicbb(4) based i2c controller), which was a pretty annoying behavior. Also, update the PMIC i2c address on beaglebone* DTS files to match the new address scheme. Now the userland utilities need to do the correct slave address shifting (but it is going to work with any i2c controller on the system). Discussed with: ian MFC r267834: Clarify the expected usage of I2C 7-bit slave addresses on ioctl(2) interface. While here add the cross reference to iic(4) on iicbus(4). CR: D210 Suggested by: jmg Modified: stable/10/share/man/man4/iic.4 stable/10/share/man/man4/iicbus.4 stable/10/sys/arm/broadcom/bcm2835/bcm2835_bsc.c stable/10/sys/arm/ti/ti_i2c.c stable/10/sys/boot/fdt/dts/arm/beaglebone-black.dts stable/10/sys/boot/fdt/dts/arm/beaglebone.dts Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/iic.4 ============================================================================== --- stable/10/share/man/man4/iic.4 Wed Aug 20 19:30:58 2014 (r270242) +++ stable/10/share/man/man4/iic.4 Wed Aug 20 19:37:05 2014 (r270243) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 6, 2006 +.Dd June 24, 2014 .Dt IIC 4 .Os .Sh NAME @@ -51,12 +51,20 @@ following ioctls: Sends the start condition to the slave specified by the .Va slave element to the bus. +The +.Va slave +element consists of a 7-bit address and a read/write bit +(i.e., 7-bit address << 1 | r/w). +If the read/write bit is set a read operation is initiated, if the read/write +bit is cleared a write operation is initiated. All other elements are ignored. .It Dv I2CRPTSTART .Pq Vt "struct iiccmd" Sends the repeated start condition to the slave specified by the .Va slave element to the bus. +The slave address should be specified as in +.Dv I2CSTART . All other elements are ignored. .It Dv I2CSTOP No argument is passed. @@ -115,10 +123,15 @@ is set in Otherwise the transfer is a write transfer. The .Va slave -element specifies the 7-bit address for the transfer. +element specifies the 7-bit address with the read/write bit for the transfer. +The read/write bit will be handled by the iicbus stack based on the specified +transfer operation. The .Va len -element is the length of the data. +element is the number of +.Pq Vt "struct iic_msg" +messages encoded on +.Pq Vt "struct iic_rdwr_data" . The .Va buf element is a buffer for that data. Modified: stable/10/share/man/man4/iicbus.4 ============================================================================== --- stable/10/share/man/man4/iicbus.4 Wed Aug 20 19:30:58 2014 (r270242) +++ stable/10/share/man/man4/iicbus.4 Wed Aug 20 19:37:05 2014 (r270243) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 6, 1998 +.Dd June 24, 2014 .Dt IICBUS 4 .Os .Sh NAME @@ -104,6 +104,7 @@ Some I2C interfaces are available: .It Sy bktr Ta "Brooktree848 video chipset, hardware and software master-only interface" .El .Sh SEE ALSO +.Xr iic 4 , .Xr iicbb 4 , .Xr lpbb 4 , .Xr pcf 4 Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_bsc.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Wed Aug 20 19:30:58 2014 (r270242) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Wed Aug 20 19:37:05 2014 (r270243) @@ -407,7 +407,7 @@ bcm_bsc_transfer(device_t dev, struct ii for (i = 0; i < nmsgs; i++) { /* Write the slave address. */ - BCM_BSC_WRITE(sc, BCM_BSC_SLAVE, msgs[i].slave); + BCM_BSC_WRITE(sc, BCM_BSC_SLAVE, msgs[i].slave >> 1); /* Write the data length. */ BCM_BSC_WRITE(sc, BCM_BSC_DLEN, msgs[i].len); Modified: stable/10/sys/arm/ti/ti_i2c.c ============================================================================== --- stable/10/sys/arm/ti/ti_i2c.c Wed Aug 20 19:30:58 2014 (r270242) +++ stable/10/sys/arm/ti/ti_i2c.c Wed Aug 20 19:37:05 2014 (r270243) @@ -747,7 +747,7 @@ ti_i2c_transfer(device_t dev, struct iic } /* set the slave address */ - ti_i2c_write_reg(sc, I2C_REG_SA, msgs[i].slave); + ti_i2c_write_reg(sc, I2C_REG_SA, msgs[i].slave >> 1); /* perform the read or write */ if (msgs[i].flags & IIC_M_RD) { Modified: stable/10/sys/boot/fdt/dts/arm/beaglebone-black.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/arm/beaglebone-black.dts Wed Aug 20 19:30:58 2014 (r270242) +++ stable/10/sys/boot/fdt/dts/arm/beaglebone-black.dts Wed Aug 20 19:37:05 2014 (r270243) @@ -149,7 +149,7 @@ i2c at 44e0b000 { pmic at 24 { compatible = "ti,am335x-pmic"; - reg = <0x24>; + reg = <0x48>; }; }; }; Modified: stable/10/sys/boot/fdt/dts/arm/beaglebone.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/arm/beaglebone.dts Wed Aug 20 19:30:58 2014 (r270242) +++ stable/10/sys/boot/fdt/dts/arm/beaglebone.dts Wed Aug 20 19:37:05 2014 (r270243) @@ -133,7 +133,7 @@ i2c at 44e0b000 { pmic at 24 { compatible = "ti,am335x-pmic"; - reg = <0x24>; + reg = <0x48>; }; }; }; From jilles at FreeBSD.org Wed Aug 20 19:39:08 2014 From: jilles at FreeBSD.org (Jilles Tjoelker) Date: Wed, 20 Aug 2014 19:39:07 +0000 (UTC) Subject: svn commit: r270244 - in stable/10: bin/sh/tests/builtins tools/build/mk Message-ID: <201408201939.s7KJd7ET080784@svn.freebsd.org> Author: jilles Date: Wed Aug 20 19:39:07 2014 New Revision: 270244 URL: http://svnweb.freebsd.org/changeset/base/270244 Log: MFC r268429: Don't install locale1.0 if MK_NLS == no. The test locale1.0 depends on locale support; it is meaningless without a working LC_MESSAGES. I added an OptionalObsoleteFiles.inc entry. PR: 181151 Submitted by: Garrett Cooper (original version) Sponsored by: EMC / Isilon Storage Division Modified: stable/10/bin/sh/tests/builtins/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/sh/tests/builtins/Makefile ============================================================================== --- stable/10/bin/sh/tests/builtins/Makefile Wed Aug 20 19:37:05 2014 (r270243) +++ stable/10/bin/sh/tests/builtins/Makefile Wed Aug 20 19:39:07 2014 (r270244) @@ -92,7 +92,9 @@ FILES+= local1.0 FILES+= local2.0 FILES+= local3.0 FILES+= local4.0 +.if ${MK_NLS} != "no" FILES+= locale1.0 +.endif FILES+= printf1.0 FILES+= printf2.0 FILES+= printf3.0 Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Aug 20 19:37:05 2014 (r270243) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Aug 20 19:39:07 2014 (r270244) @@ -3336,9 +3336,10 @@ OLD_FILES+=var/yp/Makefile OLD_FILES+=var/yp/Makefile.dist .endif -#.if ${MK_NLS} == no +.if ${MK_NLS} == no +OLD_FILES+=usr/tests/bin/sh/builtins/locale1.0 # to be filled in -#.endif +.endif .if ${MK_NTP} == no OLD_FILES+=etc/ntp.conf From peter at wemm.org Wed Aug 20 19:46:22 2014 From: peter at wemm.org (Peter Wemm) Date: Wed, 20 Aug 2014 12:46:21 -0700 Subject: svn commit: r270177 - in stable/8: tools/regression/usr.sbin/etcupdate usr.sbin usr.sbin/etcupdate In-Reply-To: <201408191754.s7JHsF2M069832@svn.freebsd.org> References: <201408191754.s7JHsF2M069832@svn.freebsd.org> Message-ID: <53F4FB0D.9080605@wemm.org> On 8/19/14 10:54 AM, John Baldwin wrote: > Author: jhb > Date: Tue Aug 19 17:54:15 2014 > New Revision: 270177 > URL: http://svnweb.freebsd.org/changeset/base/270177 > > Log: > MFC 238423,238426,238428,258063,258064,258066,258097,258185,259134: > The etcupdate utility is a tool for managing updates to files that are > not updated as part of `make installworld' such as files in /etc. It > manages updates by doing a three-way merge of changes made to these files > against the local versions. It is also designed to minimize the amount > of user intervention with the goal of simplifying upgrades for clusters > of machines. > > Requested by: peter Much appreciated, thanks! We're making a serious effort at streamlining the cluster refresh process and etcupdate seems to fit the bill nicely for upgrading src-less systems. We have freebsd/8.x machines in the mix so this eliminates a whole bunch of script exceptions. etcupdate is so much nicer than mergemaster when dealing with *many* systems. To paraphrase twitter: mergemaster: i enter i enter i enter ... i enter i enter OH CRAP! -- Peter Wemm - peter at wemm.org; peter at FreeBSD.org; peter at yahoo-inc.com; KI6FJV -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 487 bytes Desc: OpenPGP digital signature URL: From jilles at FreeBSD.org Wed Aug 20 20:12:05 2014 From: jilles at FreeBSD.org (Jilles Tjoelker) Date: Wed, 20 Aug 2014 20:12:05 +0000 (UTC) Subject: svn commit: r270245 - stable/9/lib/libc/gen Message-ID: <201408202012.s7KKC5Rw098756@svn.freebsd.org> Author: jilles Date: Wed Aug 20 20:12:05 2014 New Revision: 270245 URL: http://svnweb.freebsd.org/changeset/base/270245 Log: MFC r262872: fts: Don't abort if an empty pathname is given. Make fts_open(3) treat an empty pathname like any other pathname that cannot be lstatted because of [ENOENT]. It is rather confusing if rm -rf file1 "" file2 does not remove file1 and file2. PR: 187264 Modified: stable/9/lib/libc/gen/fts.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/gen/fts.c ============================================================================== --- stable/9/lib/libc/gen/fts.c Wed Aug 20 19:39:07 2014 (r270244) +++ stable/9/lib/libc/gen/fts.c Wed Aug 20 20:12:05 2014 (r270245) @@ -160,11 +160,7 @@ fts_open(argv, options, compar) /* Allocate/initialize root(s). */ for (root = NULL, nitems = 0; *argv != NULL; ++argv, ++nitems) { - /* Don't allow zero-length paths. */ - if ((len = strlen(*argv)) == 0) { - errno = ENOENT; - goto mem3; - } + len = strlen(*argv); p = fts_alloc(sp, *argv, len); p->fts_level = FTS_ROOTLEVEL; From slm at FreeBSD.org Wed Aug 20 23:09:29 2014 From: slm at FreeBSD.org (Stephen McConnell) Date: Wed, 20 Aug 2014 23:09:28 +0000 (UTC) Subject: svn commit: r270250 - stable/10/sys/dev/mps Message-ID: <201408202309.s7KN9Sl5078454@svn.freebsd.org> Author: slm Date: Wed Aug 20 23:09:27 2014 New Revision: 270250 URL: http://svnweb.freebsd.org/changeset/base/270250 Log: MFC r269314 and r269316 r269314: Bring in LSI's phase16 - phase18 changes * Implements Start Stop Unit for SATA direct-attach devices in IR mode to avoid data corruption. * Use CAM_DEV_NOT_THERE instead of CAM_SEL_TIMEOUT and CAM_TID_INVALID r269316: Bring in LSI's phase19 changes * Removed unused mpssas_discovery_timeout function. * Don't alter mapping boundaries if not raid firmware. * Check free_busaddr instead of post_busaddr (diff minimisation really) Approved by: ken (co-mentor) and smh Modified: stable/10/sys/dev/mps/mps.c stable/10/sys/dev/mps/mps_mapping.c stable/10/sys/dev/mps/mps_sas.c stable/10/sys/dev/mps/mps_sas.h stable/10/sys/dev/mps/mps_sas_lsi.c stable/10/sys/dev/mps/mpsvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mps/mps.c ============================================================================== --- stable/10/sys/dev/mps/mps.c Wed Aug 20 22:58:12 2014 (r270249) +++ stable/10/sys/dev/mps/mps.c Wed Aug 20 23:09:27 2014 (r270250) @@ -140,6 +140,7 @@ mps_diag_reset(struct mps_softc *sc,int { uint32_t reg; int i, error, tries = 0; + uint8_t first_wait_done = FALSE; mps_dprint(sc, MPS_TRACE, "%s\n", __func__); @@ -182,15 +183,32 @@ mps_diag_reset(struct mps_softc *sc,int /* Wait up to 300 seconds in 50ms intervals */ error = ETIMEDOUT; - for (i = 0; i < 60000; i++) { - /* wait 50 msec */ - if (mtx_owned(&sc->mps_mtx) && sleep_flag == CAN_SLEEP) - msleep(&sc->msleep_fake_chan, &sc->mps_mtx, 0, - "mpsdiag", hz/20); - else if (sleep_flag == CAN_SLEEP) - pause("mpsdiag", hz/20); - else - DELAY(50 * 1000); + for (i = 0; i < 6000; i++) { + /* + * Wait 50 msec. If this is the first time through, wait 256 + * msec to satisfy Diag Reset timing requirements. + */ + if (first_wait_done) { + if (mtx_owned(&sc->mps_mtx) && sleep_flag == CAN_SLEEP) + msleep(&sc->msleep_fake_chan, &sc->mps_mtx, 0, + "mpsdiag", hz/20); + else if (sleep_flag == CAN_SLEEP) + pause("mpsdiag", hz/20); + else + DELAY(50 * 1000); + } else { + DELAY(256 * 1000); + first_wait_done = TRUE; + } + /* + * Check for the RESET_ADAPTER bit to be cleared first, then + * wait for the RESET state to be cleared, which takes a little + * longer. + */ + reg = mps_regread(sc, MPI2_HOST_DIAGNOSTIC_OFFSET); + if (reg & MPI2_DIAG_RESET_ADAPTER) { + continue; + } reg = mps_regread(sc, MPI2_DOORBELL_OFFSET); if ((reg & MPI2_IOC_STATE_MASK) != MPI2_IOC_STATE_RESET) { error = 0; @@ -236,7 +254,7 @@ mps_transition_ready(struct mps_softc *s sleep_flags = (sc->mps_flags & MPS_FLAGS_ATTACH_DONE) ? CAN_SLEEP:NO_SLEEP; error = 0; - while (tries++ < 5) { + while (tries++ < 1200) { reg = mps_regread(sc, MPI2_DOORBELL_OFFSET); mps_dprint(sc, MPS_INIT, "Doorbell= 0x%x\n", reg); @@ -592,7 +610,7 @@ mps_iocfacts_free(struct mps_softc *sc) mps_dprint(sc, MPS_TRACE, "%s\n", __func__); - if (sc->post_busaddr != 0) + if (sc->free_busaddr != 0) bus_dmamap_unload(sc->queues_dmat, sc->queues_map); if (sc->free_queue != NULL) bus_dmamem_free(sc->queues_dmat, sc->free_queue, @@ -656,6 +674,9 @@ int mps_reinit(struct mps_softc *sc) { int error; + struct mpssas_softc *sassc; + + sassc = sc->sassc; MPS_FUNCTRACE(sc); @@ -736,6 +757,8 @@ mps_reinit(struct mps_softc *sc) mps_dprint(sc, MPS_INFO, "%s finished sc %p post %u free %u\n", __func__, sc, sc->replypostindex, sc->replyfreeindex); + mpssas_release_simq_reinit(sassc); + return 0; } @@ -2510,6 +2533,7 @@ int mps_request_polled(struct mps_softc *sc, struct mps_command *cm) { int error, timeout = 0, rc; + struct timeval cur_time, start_time; error = 0; @@ -2517,22 +2541,33 @@ mps_request_polled(struct mps_softc *sc, cm->cm_complete = NULL; mps_map_command(sc, cm); + getmicrotime(&start_time); while ((cm->cm_flags & MPS_CM_FLAGS_COMPLETE) == 0) { mps_intr_locked(sc); - DELAY(50 * 1000); - if (timeout++ > 1000) { + if (mtx_owned(&sc->mps_mtx)) + msleep(&sc->msleep_fake_chan, &sc->mps_mtx, 0, + "mpspoll", hz/20); + else + pause("mpsdiag", hz/20); + + /* + * Check for real-time timeout and fail if more than 60 seconds. + */ + getmicrotime(&cur_time); + timeout = cur_time.tv_sec - start_time.tv_sec; + if (timeout > 60) { mps_dprint(sc, MPS_FAULT, "polling failed\n"); error = ETIMEDOUT; break; } } - + if (error) { mps_dprint(sc, MPS_FAULT, "Calling Reinit from %s\n", __func__); rc = mps_reinit(sc); - mps_dprint(sc, MPS_FAULT, "Reinit %s\n", - (rc == 0) ? "success" : "failed"); + mps_dprint(sc, MPS_FAULT, "Reinit %s\n", (rc == 0) ? "success" : + "failed"); } return (error); Modified: stable/10/sys/dev/mps/mps_mapping.c ============================================================================== --- stable/10/sys/dev/mps/mps_mapping.c Wed Aug 20 22:58:12 2014 (r270249) +++ stable/10/sys/dev/mps/mps_mapping.c Wed Aug 20 23:09:27 2014 (r270250) @@ -336,12 +336,13 @@ _mapping_get_high_missing_mt_idx(struct end_idx = sc->max_devices; if (ioc_pg8_flags & MPI2_IOCPAGE8_FLAGS_RESERVED_TARGETID_0) start_idx = 1; - if (sc->ir_firmware) + if (sc->ir_firmware) { _mapping_get_ir_maprange(sc, &start_idx_ir, &end_idx_ir); - if (start_idx == start_idx_ir) - start_idx = end_idx_ir + 1; - else - end_idx = start_idx_ir; + if (start_idx == start_idx_ir) + start_idx = end_idx_ir + 1; + else + end_idx = start_idx_ir; + } mt_entry = &sc->mapping_table[start_idx]; for (map_idx = start_idx; map_idx < end_idx; map_idx++, mt_entry++) { if (mt_entry->missing_count > high_missing_count) { Modified: stable/10/sys/dev/mps/mps_sas.c ============================================================================== --- stable/10/sys/dev/mps/mps_sas.c Wed Aug 20 22:58:12 2014 (r270249) +++ stable/10/sys/dev/mps/mps_sas.c Wed Aug 20 23:09:27 2014 (r270250) @@ -115,7 +115,6 @@ static uint8_t op_code_prot[256] = { MALLOC_DEFINE(M_MPSSAS, "MPSSAS", "MPS SAS memory"); -static void mpssas_discovery_timeout(void *data); static void mpssas_remove_device(struct mps_softc *, struct mps_command *); static void mpssas_remove_complete(struct mps_softc *, struct mps_command *); static void mpssas_action(struct cam_sim *sim, union ccb *ccb); @@ -191,6 +190,16 @@ mpssas_startup_increment(struct mpssas_s } void +mpssas_release_simq_reinit(struct mpssas_softc *sassc) +{ + if (sassc->flags & MPSSAS_QUEUE_FROZEN) { + sassc->flags &= ~MPSSAS_QUEUE_FROZEN; + xpt_release_simq(sassc->sim, 1); + mps_dprint(sassc->sc, MPS_INFO, "Unfreezing SIM queue\n"); + } +} + +void mpssas_startup_decrement(struct mpssas_softc *sassc) { MPS_FUNCTRACE(sassc->sc); @@ -902,46 +911,6 @@ mpssas_discovery_end(struct mpssas_softc } static void -mpssas_discovery_timeout(void *data) -{ - struct mpssas_softc *sassc = data; - struct mps_softc *sc; - - sc = sassc->sc; - MPS_FUNCTRACE(sc); - - mps_lock(sc); - mps_dprint(sc, MPS_INFO, - "Timeout waiting for discovery, interrupts may not be working!\n"); - sassc->flags &= ~MPSSAS_DISCOVERY_TIMEOUT_PENDING; - - /* Poll the hardware for events in case interrupts aren't working */ - mps_intr_locked(sc); - - mps_dprint(sassc->sc, MPS_INFO, - "Finished polling after discovery timeout at %d\n", ticks); - - if ((sassc->flags & MPSSAS_IN_DISCOVERY) == 0) { - mpssas_discovery_end(sassc); - } else { - if (sassc->discovery_timeouts < MPSSAS_MAX_DISCOVERY_TIMEOUTS) { - sassc->flags |= MPSSAS_DISCOVERY_TIMEOUT_PENDING; - callout_reset(&sassc->discovery_callout, - MPSSAS_DISCOVERY_TIMEOUT * hz, - mpssas_discovery_timeout, sassc); - sassc->discovery_timeouts++; - } else { - mps_dprint(sassc->sc, MPS_FAULT, - "Discovery timed out, continuing.\n"); - sassc->flags &= ~MPSSAS_IN_DISCOVERY; - mpssas_discovery_end(sassc); - } - } - - mps_unlock(sc); -} - -static void mpssas_action(struct cam_sim *sim, union ccb *ccb) { struct mpssas_softc *sassc; @@ -1005,7 +974,7 @@ mpssas_action(struct cam_sim *sim, union cts->ccb_h.target_id)); targ = &sassc->targets[cts->ccb_h.target_id]; if (targ->handle == 0x0) { - mpssas_set_ccbstatus(ccb, CAM_SEL_TIMEOUT); + mpssas_set_ccbstatus(ccb, CAM_DEV_NOT_THERE); break; } @@ -1122,6 +1091,14 @@ mpssas_complete_all_commands(struct mps_ wakeup(cm); completed = 1; } + + if (cm->cm_sc->io_cmds_active != 0) { + cm->cm_sc->io_cmds_active--; + } else { + mps_dprint(cm->cm_sc, MPS_INFO, "Warning: " + "io_cmds_active is out of sync - resynching to " + "0\n"); + } if ((completed == 0) && (cm->cm_state != MPS_CM_STATE_FREE)) { /* this should never happen, but if it does, log */ @@ -1649,14 +1626,14 @@ mpssas_action_scsiio(struct mpssas_softc if (targ->handle == 0x0) { mps_dprint(sc, MPS_ERROR, "%s NULL handle for target %u\n", __func__, csio->ccb_h.target_id); - mpssas_set_ccbstatus(ccb, CAM_SEL_TIMEOUT); + mpssas_set_ccbstatus(ccb, CAM_DEV_NOT_THERE); xpt_done(ccb); return; } if (targ->flags & MPS_TARGET_FLAGS_RAID_COMPONENT) { mps_dprint(sc, MPS_ERROR, "%s Raid component no SCSI IO " "supported %u\n", __func__, csio->ccb_h.target_id); - mpssas_set_ccbstatus(ccb, CAM_TID_INVALID); + mpssas_set_ccbstatus(ccb, CAM_DEV_NOT_THERE); xpt_done(ccb); return; } @@ -1687,13 +1664,16 @@ mpssas_action_scsiio(struct mpssas_softc if ((sc->mps_flags & MPS_FLAGS_SHUTDOWN) != 0) { mps_dprint(sc, MPS_INFO, "%s shutting down\n", __func__); - mpssas_set_ccbstatus(ccb, CAM_TID_INVALID); + mpssas_set_ccbstatus(ccb, CAM_DEV_NOT_THERE); xpt_done(ccb); return; } cm = mps_alloc_command(sc); - if (cm == NULL) { + if (cm == NULL || (sc->mps_flags & MPS_FLAGS_DIAGRESET)) { + if (cm != NULL) { + mps_free_command(sc, cm); + } if ((sassc->flags & MPSSAS_QUEUE_FROZEN) == 0) { xpt_freeze_simq(sassc->sim, 1); sassc->flags |= MPSSAS_QUEUE_FROZEN; @@ -2172,6 +2152,18 @@ mpssas_scsiio_complete(struct mps_softc } } + /* + * If this is a Start Stop Unit command and it was issued by the driver + * during shutdown, decrement the refcount to account for all of the + * commands that were sent. All SSU commands should be completed before + * shutdown completes, meaning SSU_refcount will be 0 after SSU_started + * is TRUE. + */ + if (sc->SSU_started && (csio->cdb_io.cdb_bytes[0] == START_STOP_UNIT)) { + mps_dprint(sc, MPS_INFO, "Decrementing SSU count.\n"); + sc->SSU_refcount--; + } + /* Take the fast path to completion */ if (cm->cm_reply == NULL) { if (mpssas_get_ccbstatus(ccb) == CAM_REQ_INPROG) { @@ -3001,7 +2993,7 @@ mpssas_action_smpio(struct mpssas_softc mps_dprint(sc, MPS_ERROR, "%s: handle %d does not have a valid " "parent handle!\n", __func__, targ->handle); - mpssas_set_ccbstatus(ccb, CAM_REQ_INVALID); + mpssas_set_ccbstatus(ccb, CAM_DEV_NOT_THERE); goto bailout; } #ifdef OLD_MPS_PROBE @@ -3012,7 +3004,7 @@ mpssas_action_smpio(struct mpssas_softc mps_dprint(sc, MPS_ERROR, "%s: handle %d does not have a valid " "parent target!\n", __func__, targ->handle); - mpssas_set_ccbstatus(ccb, CAM_REQ_INVALID); + mpssas_set_ccbstatus(ccb, CAM_DEV_NOT_THERE); goto bailout; } @@ -3022,7 +3014,7 @@ mpssas_action_smpio(struct mpssas_softc "%s: handle %d parent %d does not " "have an SMP target!\n", __func__, targ->handle, parent_target->handle); - mpssas_set_ccbstatus(ccb, CAM_REQ_INVALID); + mpssas_set_ccbstatus(ccb, CAM_DEV_NOT_THERE); goto bailout; } @@ -3035,7 +3027,7 @@ mpssas_action_smpio(struct mpssas_softc "%s: handle %d parent %d does not " "have an SMP target!\n", __func__, targ->handle, targ->parent_handle); - mpssas_set_ccbstatus(ccb, CAM_REQ_INVALID); + mpssas_set_ccbstatus(ccb, CAM_DEV_NOT_THERE); goto bailout; } @@ -3044,7 +3036,7 @@ mpssas_action_smpio(struct mpssas_softc "%s: handle %d parent handle %d does " "not have a valid SAS address!\n", __func__, targ->handle, targ->parent_handle); - mpssas_set_ccbstatus(ccb, CAM_REQ_INVALID); + mpssas_set_ccbstatus(ccb, CAM_DEV_NOT_THERE); goto bailout; } @@ -3057,7 +3049,7 @@ mpssas_action_smpio(struct mpssas_softc mps_dprint(sc, MPS_INFO, "%s: unable to find SAS address for handle %d\n", __func__, targ->handle); - mpssas_set_ccbstatus(ccb, CAM_REQ_INVALID); + mpssas_set_ccbstatus(ccb, CAM_DEV_NOT_THERE); goto bailout; } mpssas_send_smpcmd(sassc, ccb, sasaddr); @@ -3368,6 +3360,20 @@ mpssas_check_eedp(struct mps_softc *sc, } xpt_path_string(local_path, path_str, sizeof(path_str)); + + /* + * If this is a SATA direct-access end device, + * mark it so that a SCSI StartStopUnit command + * will be sent to it when the driver is being + * shutdown. + */ + if ((cgd.inq_data.device == T_DIRECT) && + (target->devinfo & MPI2_SAS_DEVICE_INFO_SATA_DEVICE) && + ((target->devinfo & MPI2_SAS_DEVICE_INFO_MASK_DEVICE_TYPE) == + MPI2_SAS_DEVICE_INFO_END_DEVICE)) { + lun->stop_at_shutdown = TRUE; + } + mps_dprint(sc, MPS_INFO, "Sending read cap: path %s handle %d\n", path_str, target->handle); Modified: stable/10/sys/dev/mps/mps_sas.h ============================================================================== --- stable/10/sys/dev/mps/mps_sas.h Wed Aug 20 22:58:12 2014 (r270249) +++ stable/10/sys/dev/mps/mps_sas.h Wed Aug 20 23:09:27 2014 (r270250) @@ -35,6 +35,7 @@ struct mpssas_lun { lun_id_t lun_id; uint8_t eedp_formatted; uint32_t eedp_block_size; + uint8_t stop_at_shutdown; }; struct mpssas_target { Modified: stable/10/sys/dev/mps/mps_sas_lsi.c ============================================================================== --- stable/10/sys/dev/mps/mps_sas_lsi.c Wed Aug 20 22:58:12 2014 (r270249) +++ stable/10/sys/dev/mps/mps_sas_lsi.c Wed Aug 20 23:09:27 2014 (r270250) @@ -120,6 +120,9 @@ int mpssas_get_sas_address_for_sata_disk u64 *sas_address, u16 handle, u32 device_info); static int mpssas_volume_add(struct mps_softc *sc, u16 handle); +static void mpssas_SSU_to_SATA_devices(struct mps_softc *sc); +static void mpssas_stop_unit_done(struct cam_periph *periph, + union ccb *done_ccb); void mpssas_evt_handler(struct mps_softc *sc, uintptr_t data, @@ -910,6 +913,138 @@ out: } /** + * mpssas_SSU_to_SATA_devices + * @sc: per adapter object + * + * Looks through the target list and issues a StartStopUnit SCSI command to each + * SATA direct-access device. This helps to ensure that data corruption is + * avoided when the system is being shut down. This must be called after the IR + * System Shutdown RAID Action is sent if in IR mode. + * + * Return nothing. + */ +static void +mpssas_SSU_to_SATA_devices(struct mps_softc *sc) +{ + struct mpssas_softc *sassc = sc->sassc; + union ccb *ccb; + path_id_t pathid = cam_sim_path(sassc->sim); + target_id_t targetid; + struct mpssas_target *target; + struct mpssas_lun *lun; + char path_str[64]; + struct timeval cur_time, start_time; + + /* + * For each LUN of each target, issue a StartStopUnit command to stop + * the device. + */ + sc->SSU_started = TRUE; + sc->SSU_refcount = 0; + for (targetid = 0; targetid < sc->facts->MaxTargets; targetid++) { + target = &sassc->targets[targetid]; + if (target->handle == 0x0) { + continue; + } + + SLIST_FOREACH(lun, &target->luns, lun_link) { + ccb = xpt_alloc_ccb_nowait(); + if (ccb == NULL) { + mps_dprint(sc, MPS_FAULT, "Unable to alloc CCB " + "to stop unit.\n"); + return; + } + + /* + * The stop_at_shutdown flag will be set if this LUN is + * a SATA direct-access end device. + */ + if (lun->stop_at_shutdown) { + if (xpt_create_path(&ccb->ccb_h.path, + xpt_periph, pathid, targetid, + lun->lun_id) != CAM_REQ_CMP) { + mps_dprint(sc, MPS_FAULT, "Unable to " + "create LUN path to stop unit.\n"); + xpt_free_ccb(ccb); + return; + } + xpt_path_string(ccb->ccb_h.path, path_str, + sizeof(path_str)); + + mps_dprint(sc, MPS_INFO, "Sending StopUnit: " + "path %s handle %d\n", path_str, + target->handle); + + /* + * Issue a START STOP UNIT command for the LUN. + * Increment the SSU counter to be used to + * count the number of required replies. + */ + mps_dprint(sc, MPS_INFO, "Incrementing SSU " + "count\n"); + sc->SSU_refcount++; + ccb->ccb_h.target_id = + xpt_path_target_id(ccb->ccb_h.path); + ccb->ccb_h.target_lun = lun->lun_id; + ccb->ccb_h.ppriv_ptr1 = sassc; + scsi_start_stop(&ccb->csio, + /*retries*/0, + mpssas_stop_unit_done, + MSG_SIMPLE_Q_TAG, + /*start*/FALSE, + /*load/eject*/0, + /*immediate*/FALSE, + MPS_SENSE_LEN, + /*timeout*/10000); + xpt_action(ccb); + } + } + } + + /* + * Wait until all of the SSU commands have completed or time has + * expired (60 seconds). pause for 100ms each time through. If any + * command times out, the target will be reset in the SCSI command + * timeout routine. + */ + getmicrotime(&start_time); + while (sc->SSU_refcount) { + pause("mpswait", hz/10); + + getmicrotime(&cur_time); + if ((cur_time.tv_sec - start_time.tv_sec) > 60) { + mps_dprint(sc, MPS_FAULT, "Time has expired waiting " + "for SSU commands to complete.\n"); + break; + } + } +} + +static void +mpssas_stop_unit_done(struct cam_periph *periph, union ccb *done_ccb) +{ + struct mpssas_softc *sassc; + char path_str[64]; + + sassc = (struct mpssas_softc *)done_ccb->ccb_h.ppriv_ptr1; + + xpt_path_string(done_ccb->ccb_h.path, path_str, sizeof(path_str)); + mps_dprint(sassc->sc, MPS_INFO, "Completing stop unit for %s\n", + path_str); + + if (done_ccb == NULL) + return; + + /* + * Nothing more to do except free the CCB and path. If the command + * timed out, an abort reset, then target reset will be issued during + * the SCSI Command process. + */ + xpt_free_path(done_ccb->ccb_h.path); + xpt_free_ccb(done_ccb); +} + +/** * mpssas_ir_shutdown - IR shutdown notification * @sc: per adapter object * @@ -933,7 +1068,7 @@ mpssas_ir_shutdown(struct mps_softc *sc) /* is IR firmware build loaded? */ if (!sc->ir_firmware) - return; + goto out; /* are there any volumes? Look at IR target IDs. */ // TODO-later, this should be looked up in the RAID config structure @@ -958,11 +1093,11 @@ mpssas_ir_shutdown(struct mps_softc *sc) } if (!found_volume) - return; + goto out; if ((cm = mps_alloc_command(sc)) == NULL) { printf("%s: command alloc failed\n", __func__); - return; + goto out; } action = (MPI2_RAID_ACTION_REQUEST *)cm->cm_req; @@ -978,4 +1113,7 @@ mpssas_ir_shutdown(struct mps_softc *sc) */ if (cm) mps_free_command(sc, cm); + +out: + mpssas_SSU_to_SATA_devices(sc); } Modified: stable/10/sys/dev/mps/mpsvar.h ============================================================================== --- stable/10/sys/dev/mps/mpsvar.h Wed Aug 20 22:58:12 2014 (r270249) +++ stable/10/sys/dev/mps/mpsvar.h Wed Aug 20 23:09:27 2014 (r270250) @@ -32,7 +32,7 @@ #ifndef _MPSVAR_H #define _MPSVAR_H -#define MPS_DRIVER_VERSION "16.00.00.00-fbsd" +#define MPS_DRIVER_VERSION "19.00.00.00-fbsd" #define MPS_DB_MAX_WAIT 2500 @@ -417,6 +417,10 @@ struct mps_softc { char exclude_ids[80]; struct timeval lastfail; + + /* StartStopUnit command handling at shutdown */ + uint32_t SSU_refcount; + uint8_t SSU_started; }; struct mps_config_params { @@ -759,6 +763,7 @@ struct mpssas_target * mpssas_find_targe void mpssas_realloc_targets(struct mps_softc *sc, int maxtargets); struct mps_command * mpssas_alloc_tm(struct mps_softc *sc); void mpssas_free_tm(struct mps_softc *sc, struct mps_command *tm); +void mpssas_release_simq_reinit(struct mpssas_softc *sassc); SYSCTL_DECL(_hw_mps); From luigi at FreeBSD.org Wed Aug 20 23:34:38 2014 From: luigi at FreeBSD.org (Luigi Rizzo) Date: Wed, 20 Aug 2014 23:34:36 +0000 (UTC) Subject: svn commit: r270252 - in stable/10: sys/conf sys/dev/e1000 sys/dev/ixgbe sys/dev/netmap tools/tools/netmap Message-ID: <201408202334.s7KNYaax091432@svn.freebsd.org> Author: luigi Date: Wed Aug 20 23:34:36 2014 New Revision: 270252 URL: http://svnweb.freebsd.org/changeset/base/270252 Log: MFC 270063: update of netmap code (vtnet and cxgbe not merged yet because we need some other mfc first) Added: stable/10/sys/dev/netmap/if_vtnet_netmap.h (contents, props changed) stable/10/sys/dev/netmap/netmap_monitor.c (contents, props changed) Modified: stable/10/sys/conf/files stable/10/sys/dev/e1000/if_em.c stable/10/sys/dev/e1000/if_igb.c stable/10/sys/dev/e1000/if_lem.c stable/10/sys/dev/ixgbe/ixgbe.c stable/10/sys/dev/netmap/if_em_netmap.h stable/10/sys/dev/netmap/if_igb_netmap.h stable/10/sys/dev/netmap/if_lem_netmap.h stable/10/sys/dev/netmap/if_re_netmap.h stable/10/sys/dev/netmap/ixgbe_netmap.h stable/10/sys/dev/netmap/netmap.c stable/10/sys/dev/netmap/netmap_freebsd.c stable/10/sys/dev/netmap/netmap_generic.c stable/10/sys/dev/netmap/netmap_kern.h stable/10/sys/dev/netmap/netmap_mbq.h stable/10/sys/dev/netmap/netmap_mem2.c stable/10/sys/dev/netmap/netmap_mem2.h stable/10/sys/dev/netmap/netmap_offloadings.c stable/10/sys/dev/netmap/netmap_pipe.c stable/10/sys/dev/netmap/netmap_vale.c stable/10/tools/tools/netmap/pkt-gen.c stable/10/tools/tools/netmap/vale-ctl.c Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Wed Aug 20 23:29:34 2014 (r270251) +++ stable/10/sys/conf/files Wed Aug 20 23:34:36 2014 (r270252) @@ -1933,6 +1933,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: stable/10/sys/dev/e1000/if_em.c ============================================================================== --- stable/10/sys/dev/e1000/if_em.c Wed Aug 20 23:29:34 2014 (r270251) +++ stable/10/sys/dev/e1000/if_em.c Wed Aug 20 23:34:36 2014 (r270252) @@ -3389,10 +3389,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 */ @@ -4131,8 +4131,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: stable/10/sys/dev/e1000/if_igb.c ============================================================================== --- stable/10/sys/dev/e1000/if_igb.c Wed Aug 20 23:29:34 2014 (r270251) +++ stable/10/sys/dev/e1000/if_igb.c Wed Aug 20 23:34:36 2014 (r270252) @@ -3531,7 +3531,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 */ @@ -4335,8 +4335,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: stable/10/sys/dev/e1000/if_lem.c ============================================================================== --- stable/10/sys/dev/e1000/if_lem.c Wed Aug 20 23:29:34 2014 (r270251) +++ stable/10/sys/dev/e1000/if_lem.c Wed Aug 20 23:34:36 2014 (r270252) @@ -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" @@ -289,6 +298,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; @@ -458,6 +471,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", @@ -515,6 +542,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); @@ -673,6 +743,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 != NULL) if_free(adapter->ifp); @@ -760,6 +835,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); @@ -869,6 +950,16 @@ lem_start_locked(struct ifnet *ifp) } if (adapter->num_tx_desc_avail <= EM_TX_OP_THRESHOLD) ifp->if_drv_flags |= IFF_DRV_OACTIVE; +#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; } @@ -1715,6 +1806,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); @@ -1995,6 +2117,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. @@ -2677,10 +2813,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; @@ -3055,6 +3191,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. @@ -3062,6 +3208,12 @@ lem_txeof(struct adapter *adapter) */ if (adapter->num_tx_desc_avail > EM_TX_CLEANUP_THRESHOLD) { ifp->if_drv_flags &= ~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; @@ -3247,8 +3399,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; @@ -3445,7 +3597,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, @@ -3458,19 +3626,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 && ifp->if_drv_flags & 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; /* @@ -3595,11 +3789,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); (*ifp->if_input)(ifp, m); @@ -3610,10 +3829,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: stable/10/sys/dev/ixgbe/ixgbe.c ============================================================================== --- stable/10/sys/dev/ixgbe/ixgbe.c Wed Aug 20 23:29:34 2014 (r270251) +++ stable/10/sys/dev/ixgbe/ixgbe.c Wed Aug 20 23:34:36 2014 (r270252) @@ -3079,7 +3079,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 */ @@ -4025,8 +4025,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: stable/10/sys/dev/netmap/if_em_netmap.h ============================================================================== --- stable/10/sys/dev/netmap/if_em_netmap.h Wed Aug 20 23:29:34 2014 (r270251) +++ stable/10/sys/dev/netmap/if_em_netmap.h Wed Aug 20 23:34:36 2014 (r270252) @@ -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: stable/10/sys/dev/netmap/if_igb_netmap.h ============================================================================== --- stable/10/sys/dev/netmap/if_igb_netmap.h Wed Aug 20 23:29:34 2014 (r270251) +++ stable/10/sys/dev/netmap/if_igb_netmap.h Wed Aug 20 23:34:36 2014 (r270252) @@ -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: stable/10/sys/dev/netmap/if_lem_netmap.h ============================================================================== --- stable/10/sys/dev/netmap/if_lem_netmap.h Wed Aug 20 23:29:34 2014 (r270251) +++ stable/10/sys/dev/netmap/if_lem_netmap.h Wed Aug 20 23:34:36 2014 (r270252) @@ -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 /* device-specific */ struct adapter *adapter = ifp->if_softc; +#ifdef NIC_PARAVIRT + struct paravirt_csb *csb = adapter->csb; + uint32_t csb_mode = csb && csb->guest_csb_on; + uint32_t do_host_rxkick = 0; +#endif /* NIC_PARAVIRT */ if (head > lim) return netmap_ring_reinit(kring); +#ifdef NIC_PARAVIRT + if (csb_mode) { + force_update = 1; + csb->guest_need_rxkick = 0; + } +#endif /* NIC_PARAVIRT */ /* XXX check sync modes */ bus_dmamap_sync(adapter->rxdma.dma_tag, adapter->rxdma.dma_map, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); @@ -212,11 +359,28 @@ lem_netmap_rxsync(struct netmap_adapter uint32_t staterr = le32toh(curr->status); int len; +#ifdef NIC_PARAVIRT + if (csb_mode) { + if ((staterr & E1000_RXD_STAT_DD) == 0) { + /* don't bother to retry if more than 1 pkt */ + if (n > 1) + break; + csb->guest_need_rxkick = 1; + wmb(); + staterr = le32toh(curr->status); + if ((staterr & E1000_RXD_STAT_DD) == 0) { + break; + } else { /* we are good */ + csb->guest_need_rxkick = 0; + } + } + } else +#endif /* NIC_PARAVIRT */ if ((staterr & E1000_RXD_STAT_DD) == 0) break; len = le16toh(curr->length) - 4; // CRC if (len < 0) { - D("bogus pkt size %d nic idx %d", len, nic_i); + RD(5, "bogus pkt (%d) size %d nic idx %d", n, len, nic_i); len = 0; } ring->slot[nm_i].len = len; @@ -228,6 +392,18 @@ lem_netmap_rxsync(struct netmap_adapter nic_i = nm_next(nic_i, lim); } if (n) { /* update the state variables */ +#ifdef NIC_PARAVIRT + if (csb_mode) { + if (n > 1) { + /* leave one spare buffer so we avoid rxkicks */ + nm_i = nm_prev(nm_i, lim); + nic_i = nm_prev(nic_i, lim); + n--; + } else { + csb->guest_need_rxkick = 1; + } + } +#endif /* NIC_PARAVIRT */ ND("%d new packets at nic %d nm %d tail %d", n, adapter->next_rx_desc_to_check, @@ -249,23 +425,27 @@ lem_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 = &adapter->rx_desc_base[nic_i]; struct em_buffer *rxbuf = &adapter->rx_buffer_area[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(adapter->rxtag, rxbuf->map, addr); + netmap_reload_map(na, adapter->rxtag, rxbuf->map, addr); slot->flags &= ~NS_BUF_CHANGED; } curr->status = 0; bus_dmamap_sync(adapter->rxtag, rxbuf->map, BUS_DMASYNC_PREREAD); +#ifdef NIC_PARAVIRT + if (csb_mode && csb->host_rxkick_at == nic_i) + do_host_rxkick = 1; +#endif /* NIC_PARAVIRT */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From np at FreeBSD.org Wed Aug 20 23:36:09 2014 From: np at FreeBSD.org (Navdeep Parhar) Date: Wed, 20 Aug 2014 16:36:06 -0700 Subject: svn commit: r270252 - in stable/10: sys/conf sys/dev/e1000 sys/dev/ixgbe sys/dev/netmap tools/tools/netmap In-Reply-To: <201408202334.s7KNYaax091432@svn.freebsd.org> References: <201408202334.s7KNYaax091432@svn.freebsd.org> Message-ID: <53F530E6.7000504@FreeBSD.org> On 08/20/14 16:34, Luigi Rizzo wrote: > Author: luigi > Date: Wed Aug 20 23:34:36 2014 > New Revision: 270252 > URL: http://svnweb.freebsd.org/changeset/base/270252 > > Log: > MFC 270063: update of netmap code > (vtnet and cxgbe not merged yet because we need some other mfc first) I'll take care of the cxgbe bits. There's a mega MFC coming soon.. Regards, Navdeep From bryanv at freebsd.org Wed Aug 20 23:48:30 2014 From: bryanv at freebsd.org (Bryan Venteicher) Date: Wed, 20 Aug 2014 18:47:58 -0500 Subject: svn commit: r270252 - in stable/10: sys/conf sys/dev/e1000 sys/dev/ixgbe sys/dev/netmap tools/tools/netmap In-Reply-To: <53F530E6.7000504@FreeBSD.org> References: <201408202334.s7KNYaax091432@svn.freebsd.org> <53F530E6.7000504@FreeBSD.org> Message-ID: On Wed, Aug 20, 2014 at 6:36 PM, Navdeep Parhar wrote: > On 08/20/14 16:34, Luigi Rizzo wrote: > >> Author: luigi >> Date: Wed Aug 20 23:34:36 2014 >> New Revision: 270252 >> URL: http://svnweb.freebsd.org/changeset/base/270252 >> >> Log: >> MFC 270063: update of netmap code >> (vtnet and cxgbe not merged yet because we need some other mfc first) >> > > I'll take care of the cxgbe bits. There's a mega MFC coming soon.. > > vtnet is on my todo list in the next day. I think there is two commits. > Regards, > Navdeep > > > From rmacklem at FreeBSD.org Thu Aug 21 01:07:28 2014 From: rmacklem at FreeBSD.org (Rick Macklem) Date: Thu, 21 Aug 2014 01:07:27 +0000 (UTC) Subject: svn commit: r270255 - stable/10/usr.sbin/mountd Message-ID: <201408210107.s7L17RES034450@svn.freebsd.org> Author: rmacklem Date: Thu Aug 21 01:07:27 2014 New Revision: 270255 URL: http://svnweb.freebsd.org/changeset/base/270255 Log: MFC: r270005 Try to clarify how file systems are exported for NFSv4. This is a content change. Modified: stable/10/usr.sbin/mountd/exports.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/mountd/exports.5 ============================================================================== --- stable/10/usr.sbin/mountd/exports.5 Thu Aug 21 00:57:32 2014 (r270254) +++ stable/10/usr.sbin/mountd/exports.5 Thu Aug 21 01:07:27 2014 (r270255) @@ -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 eadler at FreeBSD.org Thu Aug 21 04:26:17 2014 From: eadler at FreeBSD.org (Eitan Adler) Date: Thu, 21 Aug 2014 04:26:16 +0000 (UTC) Subject: svn commit: r270257 - stable/10/usr.bin/ssh-copy-id Message-ID: <201408210426.s7L4QGNE024502@svn.freebsd.org> Author: eadler Date: Thu Aug 21 04:26:16 2014 New Revision: 270257 URL: http://svnweb.freebsd.org/changeset/base/270257 Log: MFC r265256: Syntax fix Modified: stable/10/usr.bin/ssh-copy-id/ssh-copy-id.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/ssh-copy-id/ssh-copy-id.sh ============================================================================== --- stable/10/usr.bin/ssh-copy-id/ssh-copy-id.sh Thu Aug 21 02:40:33 2014 (r270256) +++ stable/10/usr.bin/ssh-copy-id/ssh-copy-id.sh Thu Aug 21 04:26:16 2014 (r270257) @@ -45,7 +45,7 @@ sendkey() { if ! grep -sqwF "$key" "$keyfile"; then \ printf "$alg $key $comment\n" >> "$keyfile" ; \ fi ; \ - done \ + done ; \ if [ -x /sbin/restorecon ]; then \ /sbin/restorecon -F "$HOME/.ssh/" "$keyfile" >/dev/null 2>&1 || true ; \ fi From peter at FreeBSD.org Thu Aug 21 04:31:49 2014 From: peter at FreeBSD.org (Peter Wemm) Date: Thu, 21 Aug 2014 04:31:48 +0000 (UTC) Subject: svn commit: r270258 - in stable/10: sbin/umount usr.bin/showmount Message-ID: <201408210431.s7L4Vmkj027897@svn.freebsd.org> Author: peter Date: Thu Aug 21 04:31:48 2014 New Revision: 270258 URL: http://svnweb.freebsd.org/changeset/base/270258 Log: MFC r270062: switch rpc mount protocol for showmount and umount from mountv1 to mountv3 - it breaks by default on the new netapp release with the legacy protocols removed. Modified: stable/10/sbin/umount/umount.c stable/10/usr.bin/showmount/showmount.8 stable/10/usr.bin/showmount/showmount.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/umount/umount.c ============================================================================== --- stable/10/sbin/umount/umount.c Thu Aug 21 04:26:16 2014 (r270257) +++ stable/10/sbin/umount/umount.c Thu Aug 21 04:31:48 2014 (r270258) @@ -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: stable/10/usr.bin/showmount/showmount.8 ============================================================================== --- stable/10/usr.bin/showmount/showmount.8 Thu Aug 21 04:26:16 2014 (r270257) +++ stable/10/usr.bin/showmount/showmount.8 Thu Aug 21 04:31:48 2014 (r270258) @@ -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: stable/10/usr.bin/showmount/showmount.c ============================================================================== --- stable/10/usr.bin/showmount/showmount.c Thu Aug 21 04:26:16 2014 (r270257) +++ stable/10/usr.bin/showmount/showmount.c Thu Aug 21 04:31:48 2014 (r270258) @@ -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 yaneurabeya at gmail.com Thu Aug 21 07:41:38 2014 From: yaneurabeya at gmail.com (yaneurabeya at gmail.com) Date: Thu, 21 Aug 2014 00:41:35 -0700 Subject: svn commit: r270159 - in stable/10: lib/libvmmapi sys/amd64/amd64 sys/amd64/include sys/amd64/vmm sys/amd64/vmm/intel sys/amd64/vmm/io sys/x86/include usr.sbin/bhyve usr.sbin/bhyvectl usr.sbin/bhyv... In-Reply-To: <201408190120.s7J1KP93011521@svn.freebsd.org> References: <201408190120.s7J1KP93011521@svn.freebsd.org> Message-ID: <5E940151-D3B4-4CE1-93F0-5A3992C47BA3@gmail.com> Hi Peter! On Aug 18, 2014, at 6:20 PM, Peter Grehan wrote: > Author: grehan > Date: Tue Aug 19 01:20:24 2014 > New Revision: 270159 > URL: http://svnweb.freebsd.org/changeset/base/270159 > > Log: > MFC r267921, r267934, r267949, r267959, r267966, r268202, r268276, > r268427, r268428, r268521, r268638, r268639, r268701, r268777, > r268889, r268922, r269008, r269042, r269043, r269080, r269094, > r269108, r269109, r269281, r269317, r269700, r269896, r269962, > r269989. > > Catch bhyve up to CURRENT. > > Lightly tested with FreeBSD i386/amd64, Linux i386/amd64, and > OpenBSD/amd64. Still resolving an issue with OpenBSD/i386. > > Many thanks to jhb@ for all the hard work on the prior MFCs ! ... > +#ifdef _SYS_PROC_H_ > +static int __inline Funny as it sounds, this breaks gcc with ?warning: ?inline? is not at beginning of declaration? :/. I?ve opened this bug to track the issue: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192880 . Thanks! -Garrett -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 496 bytes Desc: Message signed with OpenPGP using GPGMail URL: From dumbbell at FreeBSD.org Thu Aug 21 10:18:45 2014 From: dumbbell at FreeBSD.org (Jean-Sebastien Pedron) Date: Thu, 21 Aug 2014 10:18:43 +0000 (UTC) Subject: svn commit: r270262 - in stable/10/sys: arm/freescale/imx dev/vt/colors dev/vt/hw/efifb dev/vt/hw/fb dev/vt/hw/ofwfb Message-ID: <201408211018.s7LAIhXL082778@svn.freebsd.org> Author: dumbbell Date: Thu Aug 21 10:18:42 2014 New Revision: 270262 URL: http://svnweb.freebsd.org/changeset/base/270262 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. While here, tune the palette to better match console colors and improve the readability (especially the dark blue). This is an MFC of r269783 and r269791. Modified: stable/10/sys/arm/freescale/imx/imx51_ipuv3_fbd.c stable/10/sys/dev/vt/colors/vt_termcolors.c stable/10/sys/dev/vt/colors/vt_termcolors.h stable/10/sys/dev/vt/hw/efifb/efifb.c stable/10/sys/dev/vt/hw/fb/vt_early_fb.c stable/10/sys/dev/vt/hw/fb/vt_fb.c stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/freescale/imx/imx51_ipuv3_fbd.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx51_ipuv3_fbd.c Thu Aug 21 09:01:42 2014 (r270261) +++ stable/10/sys/arm/freescale/imx/imx51_ipuv3_fbd.c Thu Aug 21 10:18:42 2014 (r270262) @@ -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: stable/10/sys/dev/vt/colors/vt_termcolors.c ============================================================================== --- stable/10/sys/dev/vt/colors/vt_termcolors.c Thu Aug 21 09:01:42 2014 (r270261) +++ stable/10/sys/dev/vt/colors/vt_termcolors.c Thu Aug 21 10:18:42 2014 (r270262) @@ -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: stable/10/sys/dev/vt/colors/vt_termcolors.h ============================================================================== --- stable/10/sys/dev/vt/colors/vt_termcolors.h Thu Aug 21 09:01:42 2014 (r270261) +++ stable/10/sys/dev/vt/colors/vt_termcolors.h Thu Aug 21 10:18:42 2014 (r270262) @@ -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: stable/10/sys/dev/vt/hw/efifb/efifb.c ============================================================================== --- stable/10/sys/dev/vt/hw/efifb/efifb.c Thu Aug 21 09:01:42 2014 (r270261) +++ stable/10/sys/dev/vt/hw/efifb/efifb.c Thu Aug 21 10:18:42 2014 (r270262) @@ -126,7 +126,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: stable/10/sys/dev/vt/hw/fb/vt_early_fb.c ============================================================================== --- stable/10/sys/dev/vt/hw/fb/vt_early_fb.c Thu Aug 21 09:01:42 2014 (r270261) +++ stable/10/sys/dev/vt/hw/fb/vt_early_fb.c Thu Aug 21 10:18:42 2014 (r270262) @@ -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: stable/10/sys/dev/vt/hw/fb/vt_fb.c ============================================================================== --- stable/10/sys/dev/vt/hw/fb/vt_fb.c Thu Aug 21 09:01:42 2014 (r270261) +++ stable/10/sys/dev/vt/hw/fb/vt_fb.c Thu Aug 21 10:18:42 2014 (r270262) @@ -334,18 +334,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: stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c ============================================================================== --- stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Aug 21 09:01:42 2014 (r270261) +++ stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Aug 21 10:18:42 2014 (r270262) @@ -245,8 +245,8 @@ ofwfb_initialize(struct vt_device *vd) switch (sc->sc_depth) { case 8: - vt_generate_vga_palette(sc->sc_colormap, COLOR_FORMAT_RGB, 255, - 0, 255, 8, 255, 16); + vt_generate_cons_palette(sc->sc_colormap, COLOR_FORMAT_RGB, 255, + 16, 255, 8, 255, 0); for (i = 0; i < 16; i++) { OF_call_method("color!", ih, 4, 1, @@ -268,11 +268,11 @@ ofwfb_initialize(struct vt_device *vd) oldpix = bus_space_read_4(sc->sc_memt, sc->sc_addr, 0); bus_space_write_4(sc->sc_memt, sc->sc_addr, 0, 0xff000000); if (*(uint8_t *)(sc->sc_addr) == 0xff) - vt_generate_vga_palette(sc->sc_colormap, - COLOR_FORMAT_RGB, 255, 16, 255, 8, 255, 0); - else - vt_generate_vga_palette(sc->sc_colormap, + vt_generate_cons_palette(sc->sc_colormap, COLOR_FORMAT_RGB, 255, 0, 255, 8, 255, 16); + else + vt_generate_cons_palette(sc->sc_colormap, + COLOR_FORMAT_RGB, 255, 16, 255, 8, 255, 0); bus_space_write_4(sc->sc_memt, sc->sc_addr, 0, oldpix); break; From dumbbell at FreeBSD.org Thu Aug 21 10:25:37 2014 From: dumbbell at FreeBSD.org (Jean-Sebastien Pedron) Date: Thu, 21 Aug 2014 10:25:36 +0000 (UTC) Subject: svn commit: r270263 - in stable/9/sys/dev/vt: colors hw/fb hw/ofwfb Message-ID: <201408211025.s7LAPag8086982@svn.freebsd.org> Author: dumbbell Date: Thu Aug 21 10:25:35 2014 New Revision: 270263 URL: http://svnweb.freebsd.org/changeset/base/270263 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. While here, tune the palette to better match console colors and improve the readability (especially the dark blue). This is an MFC of r269783 and r269791. Modified: stable/9/sys/dev/vt/colors/vt_termcolors.c stable/9/sys/dev/vt/colors/vt_termcolors.h stable/9/sys/dev/vt/hw/fb/vt_early_fb.c stable/9/sys/dev/vt/hw/fb/vt_fb.c stable/9/sys/dev/vt/hw/ofwfb/ofwfb.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/vt/colors/vt_termcolors.c ============================================================================== --- stable/9/sys/dev/vt/colors/vt_termcolors.c Thu Aug 21 10:18:42 2014 (r270262) +++ stable/9/sys/dev/vt/colors/vt_termcolors.c Thu Aug 21 10:25:35 2014 (r270263) @@ -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: stable/9/sys/dev/vt/colors/vt_termcolors.h ============================================================================== --- stable/9/sys/dev/vt/colors/vt_termcolors.h Thu Aug 21 10:18:42 2014 (r270262) +++ stable/9/sys/dev/vt/colors/vt_termcolors.h Thu Aug 21 10:25:35 2014 (r270263) @@ -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: stable/9/sys/dev/vt/hw/fb/vt_early_fb.c ============================================================================== --- stable/9/sys/dev/vt/hw/fb/vt_early_fb.c Thu Aug 21 10:18:42 2014 (r270262) +++ stable/9/sys/dev/vt/hw/fb/vt_early_fb.c Thu Aug 21 10:25:35 2014 (r270263) @@ -88,25 +88,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: stable/9/sys/dev/vt/hw/fb/vt_fb.c ============================================================================== --- stable/9/sys/dev/vt/hw/fb/vt_fb.c Thu Aug 21 10:18:42 2014 (r270262) +++ stable/9/sys/dev/vt/hw/fb/vt_fb.c Thu Aug 21 10:25:35 2014 (r270263) @@ -268,18 +268,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: stable/9/sys/dev/vt/hw/ofwfb/ofwfb.c ============================================================================== --- stable/9/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Aug 21 10:18:42 2014 (r270262) +++ stable/9/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Aug 21 10:25:35 2014 (r270263) @@ -174,8 +174,8 @@ ofwfb_initialize(struct vt_device *vd) switch (sc->sc_depth) { case 8: - vt_generate_vga_palette(sc->sc_colormap, COLOR_FORMAT_RGB, 255, - 0, 255, 8, 255, 16); + vt_generate_cons_palette(sc->sc_colormap, COLOR_FORMAT_RGB, 255, + 16, 255, 8, 255, 0); for (i = 0; i < 16; i++) { OF_call_method("color!", ih, 4, 1, @@ -197,11 +197,11 @@ ofwfb_initialize(struct vt_device *vd) oldpix = bus_space_read_4(sc->sc_memt, sc->sc_addr, 0); bus_space_write_4(sc->sc_memt, sc->sc_addr, 0, 0xff000000); if (*(uint8_t *)(sc->sc_addr) == 0xff) - vt_generate_vga_palette(sc->sc_colormap, - COLOR_FORMAT_RGB, 255, 16, 255, 8, 255, 0); - else - vt_generate_vga_palette(sc->sc_colormap, + vt_generate_cons_palette(sc->sc_colormap, COLOR_FORMAT_RGB, 255, 0, 255, 8, 255, 16); + else + vt_generate_cons_palette(sc->sc_colormap, + COLOR_FORMAT_RGB, 255, 16, 255, 8, 255, 0); bus_space_write_4(sc->sc_memt, sc->sc_addr, 0, oldpix); break; From kib at FreeBSD.org Thu Aug 21 10:46:20 2014 From: kib at FreeBSD.org (Konstantin Belousov) Date: Thu, 21 Aug 2014 10:46:19 +0000 (UTC) Subject: svn commit: r270264 - in stable/10: bin/ps sys/kern sys/sys Message-ID: <201408211046.s7LAkJeE096320@svn.freebsd.org> Author: kib Date: Thu Aug 21 10:46:19 2014 New Revision: 270264 URL: http://svnweb.freebsd.org/changeset/base/270264 Log: MFC r269656: Implement and use proc_realparent(9). MFC r270024 (by markj): Correct the order of arguments passed to LIST_INSERT_AFTER(). For merge, the p_treeflag member of struct proc was moved to the end of the structure, to keep KBI intact. Modified: stable/10/bin/ps/ps.1 stable/10/sys/kern/kern_exit.c stable/10/sys/kern/kern_proc.c stable/10/sys/kern/sys_process.c stable/10/sys/sys/proc.h Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/ps/ps.1 ============================================================================== --- stable/10/bin/ps/ps.1 Thu Aug 21 10:25:35 2014 (r270263) +++ stable/10/bin/ps/ps.1 Thu Aug 21 10:46:19 2014 (r270264) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd June 6, 2014 +.Dd August 7, 2014 .Dt PS 1 .Os .Sh NAME @@ -332,7 +332,6 @@ the include file .It Dv "P_SINGLE_BOUNDARY" Ta No "0x400000" Ta "Threads should suspend at user boundary" .It Dv "P_HWPMC" Ta No "0x800000" Ta "Process is using HWPMCs" .It Dv "P_JAILED" Ta No "0x1000000" Ta "Process is in jail" -.It Dv "P_ORPHAN" Ta No "0x2000000" Ta "Orphaned by original parent, reparented to debugger" .It Dv "P_INEXEC" Ta No "0x4000000" Ta "Process is in execve()" .It Dv "P_STATCHILD" Ta No "0x8000000" Ta "Child process stopped or exited" .It Dv "P_INMEM" Ta No "0x10000000" Ta "Loaded into memory" Modified: stable/10/sys/kern/kern_exit.c ============================================================================== --- stable/10/sys/kern/kern_exit.c Thu Aug 21 10:25:35 2014 (r270263) +++ stable/10/sys/kern/kern_exit.c Thu Aug 21 10:46:19 2014 (r270264) @@ -99,16 +99,44 @@ SDT_PROBE_DEFINE1(proc, kernel, , exit, /* Hook for NFS teardown procedure. */ void (*nlminfo_release_p)(struct proc *p); +struct proc * +proc_realparent(struct proc *child) +{ + struct proc *p, *parent; + + sx_assert(&proctree_lock, SX_LOCKED); + if ((child->p_treeflag & P_TREE_ORPHANED) == 0) { + return (child->p_pptr->p_pid == child->p_oppid ? + child->p_pptr : initproc); + } + for (p = child; (p->p_treeflag & P_TREE_FIRST_ORPHAN) == 0;) { + /* Cannot use LIST_PREV(), since the list head is not known. */ + p = __containerof(p->p_orphan.le_prev, struct proc, + p_orphan.le_next); + KASSERT((p->p_treeflag & P_TREE_ORPHANED) != 0, + ("missing P_ORPHAN %p", p)); + } + parent = __containerof(p->p_orphan.le_prev, struct proc, + p_orphans.lh_first); + return (parent); +} + static void clear_orphan(struct proc *p) { + struct proc *p1; - PROC_LOCK_ASSERT(p, MA_OWNED); - - if (p->p_flag & P_ORPHAN) { - LIST_REMOVE(p, p_orphan); - p->p_flag &= ~P_ORPHAN; + sx_assert(&proctree_lock, SA_XLOCKED); + if ((p->p_treeflag & P_TREE_ORPHANED) == 0) + return; + if ((p->p_treeflag & P_TREE_FIRST_ORPHAN) != 0) { + p1 = LIST_NEXT(p, p_orphan); + if (p1 != NULL) + p1->p_treeflag |= P_TREE_FIRST_ORPHAN; + p->p_treeflag &= ~P_TREE_FIRST_ORPHAN; } + LIST_REMOVE(p, p_orphan); + p->p_treeflag &= ~P_TREE_ORPHANED; } /* @@ -778,7 +806,9 @@ proc_reap(struct thread *td, struct proc * If we got the child via a ptrace 'attach', we need to give it back * to the old parent. */ - if (p->p_oppid && (t = pfind(p->p_oppid)) != NULL) { + if (p->p_oppid != 0) { + t = proc_realparent(p); + PROC_LOCK(t); PROC_LOCK(p); proc_reparent(p, t); p->p_oppid = 0; @@ -1251,8 +1281,15 @@ proc_reparent(struct proc *child, struct clear_orphan(child); if (child->p_flag & P_TRACED) { - LIST_INSERT_HEAD(&child->p_pptr->p_orphans, child, p_orphan); - child->p_flag |= P_ORPHAN; + if (LIST_EMPTY(&child->p_pptr->p_orphans)) { + child->p_treeflag |= P_TREE_FIRST_ORPHAN; + LIST_INSERT_HEAD(&child->p_pptr->p_orphans, child, + p_orphan); + } else { + LIST_INSERT_AFTER(LIST_FIRST(&child->p_pptr->p_orphans), + child, p_orphan); + } + child->p_treeflag |= P_TREE_ORPHANED; } child->p_pptr = parent; Modified: stable/10/sys/kern/kern_proc.c ============================================================================== --- stable/10/sys/kern/kern_proc.c Thu Aug 21 10:25:35 2014 (r270263) +++ stable/10/sys/kern/kern_proc.c Thu Aug 21 10:46:19 2014 (r270264) @@ -264,14 +264,15 @@ proc_fini(void *mem, int size) * Is p an inferior of the current process? */ int -inferior(p) - register struct proc *p; +inferior(struct proc *p) { sx_assert(&proctree_lock, SX_LOCKED); - for (; p != curproc; p = p->p_pptr) + PROC_LOCK_ASSERT(p, MA_OWNED); + for (; p != curproc; p = proc_realparent(p)) { if (p->p_pid == 0) return (0); + } return (1); } Modified: stable/10/sys/kern/sys_process.c ============================================================================== --- stable/10/sys/kern/sys_process.c Thu Aug 21 10:25:35 2014 (r270263) +++ stable/10/sys/kern/sys_process.c Thu Aug 21 10:46:19 2014 (r270264) @@ -917,19 +917,11 @@ kern_ptrace(struct thread *td, int req, case PT_DETACH: /* reset process parent */ if (p->p_oppid != p->p_pptr->p_pid) { - struct proc *pp; - PROC_LOCK(p->p_pptr); sigqueue_take(p->p_ksi); PROC_UNLOCK(p->p_pptr); - PROC_UNLOCK(p); - pp = pfind(p->p_oppid); - if (pp == NULL) - pp = initproc; - else - PROC_UNLOCK(pp); - PROC_LOCK(p); + pp = proc_realparent(p); proc_reparent(p, pp); if (pp == initproc) p->p_sigparent = SIGCHLD; Modified: stable/10/sys/sys/proc.h ============================================================================== --- stable/10/sys/sys/proc.h Thu Aug 21 10:25:35 2014 (r270263) +++ stable/10/sys/sys/proc.h Thu Aug 21 10:46:19 2014 (r270264) @@ -591,6 +591,7 @@ struct proc { */ LIST_ENTRY(proc) p_orphan; /* (e) List of orphan processes. */ LIST_HEAD(, proc) p_orphans; /* (e) Pointer to list of orphans. */ + u_int p_treeflag; /* (e) P_TREE flags */ }; #define p_session p_pgrp->pg_session @@ -628,7 +629,7 @@ struct proc { #define P_SINGLE_BOUNDARY 0x400000 /* Threads should suspend at user boundary. */ #define P_HWPMC 0x800000 /* Process is using HWPMCs */ #define P_JAILED 0x1000000 /* Process is in jail. */ -#define P_ORPHAN 0x2000000 /* Orphaned. */ +#define P_UNUSED1 0x2000000 #define P_INEXEC 0x4000000 /* Process is in execve(). */ #define P_STATCHILD 0x8000000 /* Child process stopped or exited. */ #define P_INMEM 0x10000000 /* Loaded into memory. */ @@ -643,6 +644,11 @@ struct proc { /* These flags are kept in p_flag2. */ #define P2_INHERIT_PROTECTED 0x00000001 /* New children get P_PROTECTED. */ +/* Flags protected by proctree_lock, kept in p_treeflags. */ +#define P_TREE_ORPHANED 0x00000001 /* Reparented, on orphan list */ +#define P_TREE_FIRST_ORPHAN 0x00000002 /* First element of orphan + list */ + /* * These were process status values (p_stat), now they are only used in * legacy conversion code. @@ -883,6 +889,7 @@ int proc_getenvv(struct thread *td, stru void procinit(void); void proc_linkup0(struct proc *p, struct thread *td); void proc_linkup(struct proc *p, struct thread *td); +struct proc *proc_realparent(struct proc *child); void proc_reap(struct thread *td, struct proc *p, int *status, int options); void proc_reparent(struct proc *child, struct proc *newparent); struct pstats *pstats_alloc(void); From marck at FreeBSD.org Thu Aug 21 11:48:38 2014 From: marck at FreeBSD.org (Dmitry Morozovsky) Date: Thu, 21 Aug 2014 11:48:37 +0000 (UTC) Subject: svn commit: r270266 - stable/10/share/misc Message-ID: <201408211148.s7LBmbnK024652@svn.freebsd.org> Author: marck (doc committer) Date: Thu Aug 21 11:48:37 2014 New Revision: 270266 URL: http://svnweb.freebsd.org/changeset/base/270266 Log: MFC: Make BSD tree more contemporary-looking. This is actually batch of MFCs from the beginning of stable/10 branch. Modified: stable/10/share/misc/bsd-family-tree Directory Properties: stable/10/ (props changed) Modified: stable/10/share/misc/bsd-family-tree ============================================================================== --- stable/10/share/misc/bsd-family-tree Thu Aug 21 10:54:39 2014 (r270265) +++ stable/10/share/misc/bsd-family-tree Thu Aug 21 11:48:37 2014 (r270266) @@ -110,9 +110,11 @@ FreeBSD 2.1 | | | | | | | | NetBSD 1.3.2 | | | FreeBSD 2.2.7 | | | | | | | | | | | | | BSD/OS 4.0 - | v | | | | | | | FreeBSD 2.2.8 | | | | | | - | | | | | OpenBSD 2.4 | + | | | | | | | | + | v | | | | OpenBSD 2.4 | + | FreeBSD 2.2.9 | | | | | | + | | | | | | | FreeBSD 3.0 <--------* | | v | | | | | NetBSD 1.3.3 | | *---FreeBSD 3.1 | | | | @@ -276,18 +278,43 @@ FreeBSD 5.2 | | | | | | | | | OpenBSD 5.3 DragonFly 3.4.1 | | | | | | NetBSD | | | | | | | | 6.0.3 | | + | | | | | | | | | + | | | | | | NetBSD | | + | | | | | | 6.0.4 | | + | | | | | | | | | + | | | | | | NetBSD | | + | | | | | | 6.0.5 | | | | | | | | | | | | | | | |`-NetBSD 6.1 | | | | FreeBSD | | | | | | | 8.4 | | NetBSD 6.1.1 | | | | | | | | | | FreeBSD | | NetBSD 6.1.2 | | - | 9.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 + | FreeBSD | | | | + | 9.3 | | | | + | | | | | + | | | | | + | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | -FreeBSD 10 -current | NetBSD -current OpenBSD -current | +FreeBSD 11 -current | NetBSD -current OpenBSD -current DragonFly -current | | | | | v v v v v @@ -531,6 +558,7 @@ FreeBSD 6.0 2005-11-01 [FBD] NetBSD 2.1 2005-11-02 [NBD] NetBSD 3.0 2005-12-23 [NBD] DragonFly 1.4.0 2006-01-08 [DFB] +FreeBSD 2.2.9 2006-04-01 [FBD] OpenBSD 3.9 2006-05-01 [OBD] FreeBSD 6.1 2006-05-08 [FBD] FreeBSD 5.5 2006-05-25 [FBD] @@ -600,6 +628,19 @@ NetBSD 5.2.1 2013-09-29 [NBD] FreeBSD 9.2 2013-09-30 [FBD] NetBSD 6.0.3 2013-09-30 [NBD] NetBSD 6.1.2 2013-09-30 [NBD] +Mac OS X 10.9 2013-10-22 [APL] +OpenBSD 5.4 2013-11-01 [OBD] +DragonFly 3.6.0 2013-11-25 [DFB] +FreeBSD 10.0 2014-01-20 [FBD] +NetBSD 6.0.4 2014-01-27 [NBD] +NetBSD 6.1.3 2014-01-27 [NBD] +DragonFly 3.6.1 2014-02-22 [DFB] +DragonFly 3.6.2 2014-04-10 [DFB] +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 kib at FreeBSD.org Thu Aug 21 12:30:02 2014 From: kib at FreeBSD.org (Konstantin Belousov) Date: Thu, 21 Aug 2014 12:30:02 +0000 (UTC) Subject: svn commit: r270267 - stable/10/sys/kern Message-ID: <201408211230.s7LCU2iu043703@svn.freebsd.org> Author: kib Date: Thu Aug 21 12:30:01 2014 New Revision: 270267 URL: http://svnweb.freebsd.org/changeset/base/270267 Log: Commit forgotten chunk of r270264. Modified: stable/10/sys/kern/kern_fork.c Modified: stable/10/sys/kern/kern_fork.c ============================================================================== --- stable/10/sys/kern/kern_fork.c Thu Aug 21 11:48:37 2014 (r270266) +++ stable/10/sys/kern/kern_fork.c Thu Aug 21 12:30:01 2014 (r270267) @@ -404,6 +404,7 @@ do_fork(struct thread *td, int flags, st bzero(&p2->p_startzero, __rangeof(struct proc, p_startzero, p_endzero)); + p2->p_treeflag = 0; p2->p_ucred = crhold(td->td_ucred); From bryanv at FreeBSD.org Thu Aug 21 13:27:06 2014 From: bryanv at FreeBSD.org (Bryan Venteicher) Date: Thu, 21 Aug 2014 13:27:05 +0000 (UTC) Subject: svn commit: r270270 - stable/10/sys/dev/virtio Message-ID: <201408211327.s7LDR5NQ071698@svn.freebsd.org> Author: bryanv Date: Thu Aug 21 13:27:05 2014 New Revision: 270270 URL: http://svnweb.freebsd.org/changeset/base/270270 Log: MFC r268480: Add accessor to get the number of free descriptors in the virtqueue Modified: stable/10/sys/dev/virtio/virtqueue.c stable/10/sys/dev/virtio/virtqueue.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/virtio/virtqueue.c ============================================================================== --- stable/10/sys/dev/virtio/virtqueue.c Thu Aug 21 13:04:34 2014 (r270269) +++ stable/10/sys/dev/virtio/virtqueue.c Thu Aug 21 13:27:05 2014 (r270270) @@ -375,6 +375,13 @@ virtqueue_size(struct virtqueue *vq) } int +virtqueue_nfree(struct virtqueue *vq) +{ + + return (vq->vq_free_cnt); +} + +int virtqueue_empty(struct virtqueue *vq) { Modified: stable/10/sys/dev/virtio/virtqueue.h ============================================================================== --- stable/10/sys/dev/virtio/virtqueue.h Thu Aug 21 13:04:34 2014 (r270269) +++ stable/10/sys/dev/virtio/virtqueue.h Thu Aug 21 13:27:05 2014 (r270270) @@ -86,6 +86,7 @@ vm_paddr_t virtqueue_paddr(struct virtqu int virtqueue_full(struct virtqueue *vq); int virtqueue_empty(struct virtqueue *vq); int virtqueue_size(struct virtqueue *vq); +int virtqueue_nfree(struct virtqueue *vq); int virtqueue_nused(struct virtqueue *vq); void virtqueue_notify(struct virtqueue *vq); void virtqueue_dump(struct virtqueue *vq); From ian at FreeBSD.org Thu Aug 21 14:56:59 2014 From: ian at FreeBSD.org (Ian Lepore) Date: Thu, 21 Aug 2014 14:56:58 +0000 (UTC) Subject: svn commit: r270274 - in stable/10: . sys/conf sys/dev/aic7xxx/aicasm sys/modules/aic7xxx sys/modules/aic7xxx/ahc sys/modules/aic7xxx/ahd Message-ID: <201408211456.s7LEuwPo012891@svn.freebsd.org> Author: ian Date: Thu Aug 21 14:56:57 2014 New Revision: 270274 URL: http://svnweb.freebsd.org/changeset/base/270274 Log: MFC r257637, r257730, r257734, r257777, r257825, r257838, r257873: Changes to how the aicasm tool is built. This series of changes results in the aicasm tool being built as part of the tools stages of world and kernel builds. Most of these changes will ultimately be undone when r260401 is MFC'd, but it will leave in place the new kernel-build-tool machinery (KTMAKE stuff) in case a new special kernel tool ever comes along. Modified: stable/10/Makefile.inc1 stable/10/sys/conf/files stable/10/sys/dev/aic7xxx/aicasm/Makefile stable/10/sys/modules/aic7xxx/Makefile stable/10/sys/modules/aic7xxx/ahc/Makefile stable/10/sys/modules/aic7xxx/ahd/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Thu Aug 21 14:54:37 2014 (r270273) +++ stable/10/Makefile.inc1 Thu Aug 21 14:56:57 2014 (r270274) @@ -264,6 +264,21 @@ XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ -DWITHOUT_GDB -DNO_TESTS +# kernel-tools stage +KTMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ + PATH=${BPATH}:${PATH} \ + WORLDTMP=${WORLDTMP} \ + VERSION="${VERSION}" \ + COMPILER_TYPE=${COMPILER_TYPE} +KTMAKE= TOOLS_PREFIX=${WORLDTMP} MAKEOBJDIRPREFIX=${WORLDTMP} \ + ${KTMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \ + DESTDIR= \ + BOOTSTRAPPING=${OSRELDATE} \ + SSP_CFLAGS= \ + -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN \ + -DNO_PIC -DNO_PROFILE -DNO_SHARED \ + -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF -DEARLY_BUILD + # world stage WMAKEENV= ${CROSSENV} \ _SHLIBDIRPREFIX=${WORLDTMP} \ @@ -543,6 +558,7 @@ _cross-tools: @echo ">>> stage 3: cross tools" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${XMAKE} cross-tools + ${_+_}cd ${.CURDIR}; ${XMAKE} kernel-tools _includes: @echo @echo "--------------------------------------------------------------" @@ -1032,21 +1048,7 @@ buildkernel: @echo "--------------------------------------------------------------" @echo ">>> stage 2.3: build tools" @echo "--------------------------------------------------------------" - cd ${KRNLOBJDIR}/${_kernel}; \ - PATH=${BPATH}:${PATH} \ - MAKESRCPATH=${KERNSRCDIR}/dev/aic7xxx/aicasm \ - ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF \ - -DEARLY_BUILD -f ${KERNSRCDIR}/dev/aic7xxx/aicasm/Makefile -# XXX - Gratuitously builds aicasm in the ``makeoptions NO_MODULES'' case. -.if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KERNSRCDIR}/modules) -.for target in obj depend all - cd ${KERNSRCDIR}/modules/aic7xxx/aicasm; \ - PATH=${BPATH}:${PATH} \ - MAKEOBJDIRPREFIX=${KRNLOBJDIR}/${_kernel}/modules \ - ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF \ - -DEARLY_BUILD ${target} -.endfor -.endif + ${_+_}cd ${.CURDIR}; ${KTMAKE} kernel-tools .if !defined(NO_KERNELDEPEND) @echo @echo "--------------------------------------------------------------" @@ -1334,10 +1336,6 @@ bootstrap-tools: .MAKE # # build-tools: Build special purpose build tools # -.if defined(MODULES_WITH_WORLD) && exists(${KERNSRCDIR}/modules) -_aicasm= sys/modules/aic7xxx/aicasm -.endif - .if !defined(NO_SHARE) _share= share/syscons/scrnmaps .endif @@ -1359,7 +1357,6 @@ build-tools: .MAKE lib/ncurses/ncurses \ lib/ncurses/ncursesw \ ${_share} \ - ${_aicasm} \ usr.bin/awk \ lib/libmagic \ usr.bin/mkesdb_static \ @@ -1380,6 +1377,23 @@ build-tools: .MAKE .endfor # +# kernel-tools: Build kernel-building tools +# +kernel-tools: .MAKE + mkdir -p ${MAKEOBJDIRPREFIX}/usr + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ + -p ${MAKEOBJDIRPREFIX}/usr >/dev/null +.for _tool in \ + sys/dev/aic7xxx/aicasm + ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ + cd ${.CURDIR}/${_tool} && \ + ${MAKE} DIRPRFX=${_tool}/ obj && \ + ${MAKE} DIRPRFX=${_tool}/ depend && \ + ${MAKE} DIRPRFX=${_tool}/ all && \ + ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX} install +.endfor + +# # cross-tools: Build cross-building tools # .if !defined(TARGET_ARCH) && defined(XDEV_ARCH) Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Thu Aug 21 14:54:37 2014 (r270273) +++ stable/10/sys/conf/files Thu Aug 21 14:56:57 2014 (r270274) @@ -9,44 +9,39 @@ acpi_quirks.h optional acpi \ compile-with "${AWK} -f $S/tools/acpi_quirks2h.awk $S/dev/acpica/acpi_quirks" \ no-obj no-implicit-rule before-depend \ clean "acpi_quirks.h" -aicasm optional ahc | ahd \ - dependency "$S/dev/aic7xxx/aicasm/*.[chyl]" \ - compile-with "CC='${CC}' ${MAKE} -f $S/dev/aic7xxx/aicasm/Makefile MAKESRCPATH=$S/dev/aic7xxx/aicasm" \ - no-obj no-implicit-rule \ - clean "aicasm* y.tab.h" aic7xxx_seq.h optional ahc \ - compile-with "./aicasm ${INCLUDES} -I$S/cam/scsi -I$S/dev/aic7xxx -o aic7xxx_seq.h -r aic7xxx_reg.h -p aic7xxx_reg_print.c -i $S/dev/aic7xxx/aic7xxx_osm.h $S/dev/aic7xxx/aic7xxx.seq" \ + compile-with "aicasm ${INCLUDES} -I$S/cam/scsi -I$S/dev/aic7xxx -o aic7xxx_seq.h -r aic7xxx_reg.h -p aic7xxx_reg_print.c -i $S/dev/aic7xxx/aic7xxx_osm.h $S/dev/aic7xxx/aic7xxx.seq" \ no-obj no-implicit-rule before-depend local \ clean "aic7xxx_seq.h" \ - dependency "$S/dev/aic7xxx/aic7xxx.{reg,seq} $S/cam/scsi/scsi_message.h aicasm" + dependency "$S/dev/aic7xxx/aic7xxx.{reg,seq} $S/cam/scsi/scsi_message.h" aic7xxx_reg.h optional ahc \ - compile-with "./aicasm ${INCLUDES} -I$S/cam/scsi -I$S/dev/aic7xxx -o aic7xxx_seq.h -r aic7xxx_reg.h -p aic7xxx_reg_print.c -i $S/dev/aic7xxx/aic7xxx_osm.h $S/dev/aic7xxx/aic7xxx.seq" \ + compile-with "aicasm ${INCLUDES} -I$S/cam/scsi -I$S/dev/aic7xxx -o aic7xxx_seq.h -r aic7xxx_reg.h -p aic7xxx_reg_print.c -i $S/dev/aic7xxx/aic7xxx_osm.h $S/dev/aic7xxx/aic7xxx.seq" \ no-obj no-implicit-rule before-depend local \ clean "aic7xxx_reg.h" \ - dependency "$S/dev/aic7xxx/aic7xxx.{reg,seq} $S/cam/scsi/scsi_message.h aicasm" + dependency "$S/dev/aic7xxx/aic7xxx.{reg,seq} $S/cam/scsi/scsi_message.h" aic7xxx_reg_print.c optional ahc \ - compile-with "./aicasm ${INCLUDES} -I$S/cam/scsi -I$S/dev/aic7xxx -o aic7xxx_seq.h -r aic7xxx_reg.h -p aic7xxx_reg_print.c -i $S/dev/aic7xxx/aic7xxx_osm.h $S/dev/aic7xxx/aic7xxx.seq" \ + compile-with "aicasm ${INCLUDES} -I$S/cam/scsi -I$S/dev/aic7xxx -o aic7xxx_seq.h -r aic7xxx_reg.h -p aic7xxx_reg_print.c -i $S/dev/aic7xxx/aic7xxx_osm.h $S/dev/aic7xxx/aic7xxx.seq" \ no-obj no-implicit-rule local \ clean "aic7xxx_reg_print.c" \ - dependency "$S/dev/aic7xxx/aic7xxx.{reg,seq} $S/cam/scsi/scsi_message.h aicasm" + dependency "$S/dev/aic7xxx/aic7xxx.{reg,seq} $S/cam/scsi/scsi_message.h" aic7xxx_reg_print.o optional ahc ahc_reg_pretty_print \ compile-with "${NORMAL_C}" \ no-implicit-rule local aic79xx_seq.h optional ahd pci \ - compile-with "./aicasm ${INCLUDES} -I$S/cam/scsi -I$S/dev/aic7xxx -o aic79xx_seq.h -r aic79xx_reg.h -p aic79xx_reg_print.c -i $S/dev/aic7xxx/aic79xx_osm.h $S/dev/aic7xxx/aic79xx.seq" \ + compile-with "aicasm ${INCLUDES} -I$S/cam/scsi -I$S/dev/aic7xxx -o aic79xx_seq.h -r aic79xx_reg.h -p aic79xx_reg_print.c -i $S/dev/aic7xxx/aic79xx_osm.h $S/dev/aic7xxx/aic79xx.seq" \ no-obj no-implicit-rule before-depend local \ clean "aic79xx_seq.h" \ - dependency "$S/dev/aic7xxx/aic79xx.{reg,seq} $S/cam/scsi/scsi_message.h aicasm" + dependency "$S/dev/aic7xxx/aic79xx.{reg,seq} $S/cam/scsi/scsi_message.h" aic79xx_reg.h optional ahd pci \ - compile-with "./aicasm ${INCLUDES} -I$S/cam/scsi -I$S/dev/aic7xxx -o aic79xx_seq.h -r aic79xx_reg.h -p aic79xx_reg_print.c -i $S/dev/aic7xxx/aic79xx_osm.h $S/dev/aic7xxx/aic79xx.seq" \ + compile-with "aicasm ${INCLUDES} -I$S/cam/scsi -I$S/dev/aic7xxx -o aic79xx_seq.h -r aic79xx_reg.h -p aic79xx_reg_print.c -i $S/dev/aic7xxx/aic79xx_osm.h $S/dev/aic7xxx/aic79xx.seq" \ no-obj no-implicit-rule before-depend local \ clean "aic79xx_reg.h" \ - dependency "$S/dev/aic7xxx/aic79xx.{reg,seq} $S/cam/scsi/scsi_message.h aicasm" + dependency "$S/dev/aic7xxx/aic79xx.{reg,seq} $S/cam/scsi/scsi_message.h" aic79xx_reg_print.c optional ahd pci \ - compile-with "./aicasm ${INCLUDES} -I$S/cam/scsi -I$S/dev/aic7xxx -o aic79xx_seq.h -r aic79xx_reg.h -p aic79xx_reg_print.c -i $S/dev/aic7xxx/aic79xx_osm.h $S/dev/aic7xxx/aic79xx.seq" \ + compile-with "aicasm ${INCLUDES} -I$S/cam/scsi -I$S/dev/aic7xxx -o aic79xx_seq.h -r aic79xx_reg.h -p aic79xx_reg_print.c -i $S/dev/aic7xxx/aic79xx_osm.h $S/dev/aic7xxx/aic79xx.seq" \ no-obj no-implicit-rule local \ clean "aic79xx_reg_print.c" \ - dependency "$S/dev/aic7xxx/aic79xx.{reg,seq} $S/cam/scsi/scsi_message.h aicasm" + dependency "$S/dev/aic7xxx/aic79xx.{reg,seq} $S/cam/scsi/scsi_message.h" aic79xx_reg_print.o optional ahd pci ahd_reg_pretty_print \ compile-with "${NORMAL_C}" \ no-implicit-rule local Modified: stable/10/sys/dev/aic7xxx/aicasm/Makefile ============================================================================== --- stable/10/sys/dev/aic7xxx/aicasm/Makefile Thu Aug 21 14:54:37 2014 (r270273) +++ stable/10/sys/dev/aic7xxx/aicasm/Makefile Thu Aug 21 14:56:57 2014 (r270274) @@ -15,7 +15,7 @@ SRCS= ${GENHDRS} ${CSRCS} ${YSRCS} ${LSR CLEANFILES+= ${GENHDRS} ${YSRCS:R:C/(.*)/\1.output/g} DPADD= ${LIBL} LDADD= -ll -WARNS?= 5 +WARNS?= 0 # Correct path for kernel builds # Don't rely on the kernel's .depend file @@ -24,7 +24,7 @@ WARNS?= 5 DEPENDFILE= .depend_aicasm .endif -CFLAGS+= -I. +CFLAGS+= -I${.CURDIR} .ifdef MAKESRCPATH CFLAGS+= -I${MAKESRCPATH} .endif @@ -38,5 +38,9 @@ YFLAGS+= -t -v LFLAGS+= -d .endif +BINDIR=/usr/bin + +build-tools: ${PROG} + .include CFLAGS+= -Wno-missing-prototypes Modified: stable/10/sys/modules/aic7xxx/Makefile ============================================================================== --- stable/10/sys/modules/aic7xxx/Makefile Thu Aug 21 14:54:37 2014 (r270273) +++ stable/10/sys/modules/aic7xxx/Makefile Thu Aug 21 14:56:57 2014 (r270274) @@ -1,6 +1,6 @@ # $FreeBSD$ -SUBDIR= aicasm ahc ahd +SUBDIR= ahc ahd .include Modified: stable/10/sys/modules/aic7xxx/ahc/Makefile ============================================================================== --- stable/10/sys/modules/aic7xxx/ahc/Makefile Thu Aug 21 14:54:37 2014 (r270273) +++ stable/10/sys/modules/aic7xxx/ahc/Makefile Thu Aug 21 14:56:57 2014 (r270274) @@ -15,13 +15,10 @@ REG_PRINT_OPT= -p aic7xxx_reg_print.c .endif BEFORE_DEPEND = ${GENSRCS} -../aicasm/aicasm: ${.CURDIR}/../../../dev/aci7xxx/aicasm/*.[chyl] - ( cd ${.CURDIR}/../aicasm; ${MAKE} aicasm; ) - ${GENSRCS}: \ ${.CURDIR}/../../../dev/aic7xxx/aic7xxx.{reg,seq} \ - ${.CURDIR}/../../../cam/scsi/scsi_message.h ../aicasm/aicasm - ../aicasm/aicasm ${INCLUDES} -I${.CURDIR}/../../../cam/scsi \ + ${.CURDIR}/../../../cam/scsi/scsi_message.h + aicasm ${INCLUDES} -I${.CURDIR}/../../../cam/scsi \ -I${.CURDIR}/../../../dev/aic7xxx \ -o aic7xxx_seq.h -r aic7xxx_reg.h \ ${REG_PRINT_OPT} \ Modified: stable/10/sys/modules/aic7xxx/ahd/Makefile ============================================================================== --- stable/10/sys/modules/aic7xxx/ahd/Makefile Thu Aug 21 14:54:37 2014 (r270273) +++ stable/10/sys/modules/aic7xxx/ahd/Makefile Thu Aug 21 14:56:57 2014 (r270274) @@ -15,13 +15,10 @@ REG_PRINT_OPT= -p aic79xx_reg_print.c .endif BEFORE_DEPEND= ${GENSRCS} -../aicasm/aicasm: ${.CURDIR}/../../../dev/aic7xxx/aicasm/*.[chyl] - ( cd ${.CURDIR}/../aicasm; ${MAKE} aicasm; ) - ${GENSRCS}: \ ${.CURDIR}/../../../dev/aic7xxx/aic79xx.{reg,seq} \ - ${.CURDIR}/../../../cam/scsi/scsi_message.h ../aicasm/aicasm - ../aicasm/aicasm ${INCLUDES} -I${.CURDIR}/../../../cam/scsi \ + ${.CURDIR}/../../../cam/scsi/scsi_message.h + aicasm ${INCLUDES} -I${.CURDIR}/../../../cam/scsi \ -I${.CURDIR}/../../../dev/aic7xxx \ -o aic79xx_seq.h -r aic79xx_reg.h \ ${REG_PRINT_OPT} \ From grehan at freebsd.org Thu Aug 21 15:39:56 2014 From: grehan at freebsd.org (Peter Grehan) Date: Thu, 21 Aug 2014 08:39:52 -0700 Subject: svn commit: r270159 - in stable/10: lib/libvmmapi sys/amd64/amd64 sys/amd64/include sys/amd64/vmm sys/amd64/vmm/intel sys/amd64/vmm/io sys/x86/include usr.sbin/bhyve usr.sbin/bhyvectl usr.sbin/bhyv... In-Reply-To: <5E940151-D3B4-4CE1-93F0-5A3992C47BA3@gmail.com> References: <201408190120.s7J1KP93011521@svn.freebsd.org> <5E940151-D3B4-4CE1-93F0-5A3992C47BA3@gmail.com> Message-ID: <53F612C8.8060809@freebsd.org> Hi Garrett, > Funny as it sounds, this breaks gcc with ?warning: ?inline? is not at > beginning of declaration? :/. I?ve opened this bug to track the > issue: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192880 . Thanks: I'll fix this today. later, Peter. From ian at FreeBSD.org Thu Aug 21 17:18:22 2014 From: ian at FreeBSD.org (Ian Lepore) Date: Thu, 21 Aug 2014 17:18:22 +0000 (UTC) Subject: svn commit: r270284 - in stable/10: . sys/conf sys/dev/aic7xxx sys/modules/aic7xxx sys/modules/aic7xxx/ahc sys/modules/aic7xxx/ahc/ahc_eisa sys/modules/aic7xxx/ahc/ahc_isa sys/modules/aic7xxx/ahc/a... Message-ID: <201408211718.s7LHIMfa078631@svn.freebsd.org> Author: ian Date: Thu Aug 21 17:18:21 2014 New Revision: 270284 URL: http://svnweb.freebsd.org/changeset/base/270284 Log: MFC r260401 Remove aicasm as a build dependency. It made sense when the ahc and ahd drivers and their firmware were under active development, but those days have passed. The firmware now exists in pre-compiled form, no longer dependent on it's sources or on aicasm. If you wish to rebuild the firmware from source, the glue still exists under the 'make firmware' target in sys/modules/aic7xxx. This also fixes the problem introduced with r257777 et al with building kernels the old fashioned way in sys/$arch/compile/$CONFIG when the ahc/ahd drivers were included. Added: stable/10/sys/dev/aic7xxx/aic79xx_reg.h - copied unchanged from r260401, head/sys/dev/aic7xxx/aic79xx_reg.h stable/10/sys/dev/aic7xxx/aic79xx_reg_print.c - copied unchanged from r260401, head/sys/dev/aic7xxx/aic79xx_reg_print.c stable/10/sys/dev/aic7xxx/aic79xx_seq.h - copied unchanged from r260401, head/sys/dev/aic7xxx/aic79xx_seq.h stable/10/sys/dev/aic7xxx/aic7xxx_reg.h - copied unchanged from r260401, head/sys/dev/aic7xxx/aic7xxx_reg.h stable/10/sys/dev/aic7xxx/aic7xxx_reg_print.c - copied unchanged from r260401, head/sys/dev/aic7xxx/aic7xxx_reg_print.c stable/10/sys/dev/aic7xxx/aic7xxx_seq.h - copied unchanged from r260401, head/sys/dev/aic7xxx/aic7xxx_seq.h Modified: stable/10/Makefile.inc1 stable/10/sys/conf/files stable/10/sys/modules/aic7xxx/Makefile stable/10/sys/modules/aic7xxx/ahc/Makefile stable/10/sys/modules/aic7xxx/ahc/ahc_eisa/Makefile stable/10/sys/modules/aic7xxx/ahc/ahc_isa/Makefile stable/10/sys/modules/aic7xxx/ahc/ahc_pci/Makefile stable/10/sys/modules/aic7xxx/ahd/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Thu Aug 21 17:15:09 2014 (r270283) +++ stable/10/Makefile.inc1 Thu Aug 21 17:18:21 2014 (r270284) @@ -1383,15 +1383,6 @@ kernel-tools: .MAKE mkdir -p ${MAKEOBJDIRPREFIX}/usr mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ -p ${MAKEOBJDIRPREFIX}/usr >/dev/null -.for _tool in \ - sys/dev/aic7xxx/aicasm - ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ - cd ${.CURDIR}/${_tool} && \ - ${MAKE} DIRPRFX=${_tool}/ obj && \ - ${MAKE} DIRPRFX=${_tool}/ depend && \ - ${MAKE} DIRPRFX=${_tool}/ all && \ - ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX} install -.endfor # # cross-tools: Build cross-building tools Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Thu Aug 21 17:15:09 2014 (r270283) +++ stable/10/sys/conf/files Thu Aug 21 17:18:21 2014 (r270284) @@ -9,42 +9,6 @@ acpi_quirks.h optional acpi \ compile-with "${AWK} -f $S/tools/acpi_quirks2h.awk $S/dev/acpica/acpi_quirks" \ no-obj no-implicit-rule before-depend \ clean "acpi_quirks.h" -aic7xxx_seq.h optional ahc \ - compile-with "aicasm ${INCLUDES} -I$S/cam/scsi -I$S/dev/aic7xxx -o aic7xxx_seq.h -r aic7xxx_reg.h -p aic7xxx_reg_print.c -i $S/dev/aic7xxx/aic7xxx_osm.h $S/dev/aic7xxx/aic7xxx.seq" \ - no-obj no-implicit-rule before-depend local \ - clean "aic7xxx_seq.h" \ - dependency "$S/dev/aic7xxx/aic7xxx.{reg,seq} $S/cam/scsi/scsi_message.h" -aic7xxx_reg.h optional ahc \ - compile-with "aicasm ${INCLUDES} -I$S/cam/scsi -I$S/dev/aic7xxx -o aic7xxx_seq.h -r aic7xxx_reg.h -p aic7xxx_reg_print.c -i $S/dev/aic7xxx/aic7xxx_osm.h $S/dev/aic7xxx/aic7xxx.seq" \ - no-obj no-implicit-rule before-depend local \ - clean "aic7xxx_reg.h" \ - dependency "$S/dev/aic7xxx/aic7xxx.{reg,seq} $S/cam/scsi/scsi_message.h" -aic7xxx_reg_print.c optional ahc \ - compile-with "aicasm ${INCLUDES} -I$S/cam/scsi -I$S/dev/aic7xxx -o aic7xxx_seq.h -r aic7xxx_reg.h -p aic7xxx_reg_print.c -i $S/dev/aic7xxx/aic7xxx_osm.h $S/dev/aic7xxx/aic7xxx.seq" \ - no-obj no-implicit-rule local \ - clean "aic7xxx_reg_print.c" \ - dependency "$S/dev/aic7xxx/aic7xxx.{reg,seq} $S/cam/scsi/scsi_message.h" -aic7xxx_reg_print.o optional ahc ahc_reg_pretty_print \ - compile-with "${NORMAL_C}" \ - no-implicit-rule local -aic79xx_seq.h optional ahd pci \ - compile-with "aicasm ${INCLUDES} -I$S/cam/scsi -I$S/dev/aic7xxx -o aic79xx_seq.h -r aic79xx_reg.h -p aic79xx_reg_print.c -i $S/dev/aic7xxx/aic79xx_osm.h $S/dev/aic7xxx/aic79xx.seq" \ - no-obj no-implicit-rule before-depend local \ - clean "aic79xx_seq.h" \ - dependency "$S/dev/aic7xxx/aic79xx.{reg,seq} $S/cam/scsi/scsi_message.h" -aic79xx_reg.h optional ahd pci \ - compile-with "aicasm ${INCLUDES} -I$S/cam/scsi -I$S/dev/aic7xxx -o aic79xx_seq.h -r aic79xx_reg.h -p aic79xx_reg_print.c -i $S/dev/aic7xxx/aic79xx_osm.h $S/dev/aic7xxx/aic79xx.seq" \ - no-obj no-implicit-rule before-depend local \ - clean "aic79xx_reg.h" \ - dependency "$S/dev/aic7xxx/aic79xx.{reg,seq} $S/cam/scsi/scsi_message.h" -aic79xx_reg_print.c optional ahd pci \ - compile-with "aicasm ${INCLUDES} -I$S/cam/scsi -I$S/dev/aic7xxx -o aic79xx_seq.h -r aic79xx_reg.h -p aic79xx_reg_print.c -i $S/dev/aic7xxx/aic79xx_osm.h $S/dev/aic7xxx/aic79xx.seq" \ - no-obj no-implicit-rule local \ - clean "aic79xx_reg_print.c" \ - dependency "$S/dev/aic7xxx/aic79xx.{reg,seq} $S/cam/scsi/scsi_message.h" -aic79xx_reg_print.o optional ahd pci ahd_reg_pretty_print \ - compile-with "${NORMAL_C}" \ - no-implicit-rule local # # The 'fdt_dtb_file' target covers an actual DTB file name, which is derived # from the specified source (DTS) file: .dts -> .dtb @@ -670,10 +634,12 @@ dev/aic7xxx/aic7770.c optional ahc dev/aic7xxx/aic79xx.c optional ahd pci dev/aic7xxx/aic79xx_osm.c optional ahd pci dev/aic7xxx/aic79xx_pci.c optional ahd pci +dev/aic7xxx/aic79xx_reg_print.c optional ahd pci ahd_reg_pretty_print dev/aic7xxx/aic7xxx.c optional ahc dev/aic7xxx/aic7xxx_93cx6.c optional ahc dev/aic7xxx/aic7xxx_osm.c optional ahc dev/aic7xxx/aic7xxx_pci.c optional ahc pci +dev/aic7xxx/aic7xxx_reg_print.c optional ahc ahc_reg_pretty_print dev/alc/if_alc.c optional alc pci dev/ale/if_ale.c optional ale pci dev/altera/avgen/altera_avgen.c optional altera_avgen Copied: stable/10/sys/dev/aic7xxx/aic79xx_reg.h (from r260401, head/sys/dev/aic7xxx/aic79xx_reg.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/dev/aic7xxx/aic79xx_reg.h Thu Aug 21 17:18:21 2014 (r270284, copy of r260401, head/sys/dev/aic7xxx/aic79xx_reg.h) @@ -0,0 +1,3826 @@ +/* + * DO NOT EDIT - This file is automatically generated + * from the following source files: + * + * $Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#119 $ + * $Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#76 $ + * + * $FreeBSD$ + */ +typedef int (ahd_reg_print_t)(u_int, u_int *, u_int); +typedef struct ahd_reg_parse_entry { + char *name; + uint8_t value; + uint8_t mask; +} ahd_reg_parse_entry_t; + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_mode_ptr_print; +#else +#define ahd_mode_ptr_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "MODE_PTR", 0x00, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_intstat_print; +#else +#define ahd_intstat_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "INTSTAT", 0x01, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_seqintcode_print; +#else +#define ahd_seqintcode_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SEQINTCODE", 0x02, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_clrint_print; +#else +#define ahd_clrint_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "CLRINT", 0x03, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_error_print; +#else +#define ahd_error_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "ERROR", 0x04, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_clrerr_print; +#else +#define ahd_clrerr_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "CLRERR", 0x04, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_hcntrl_print; +#else +#define ahd_hcntrl_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "HCNTRL", 0x05, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_hnscb_qoff_print; +#else +#define ahd_hnscb_qoff_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "HNSCB_QOFF", 0x06, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_hescb_qoff_print; +#else +#define ahd_hescb_qoff_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "HESCB_QOFF", 0x08, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_hs_mailbox_print; +#else +#define ahd_hs_mailbox_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "HS_MAILBOX", 0x0b, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_seqintstat_print; +#else +#define ahd_seqintstat_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SEQINTSTAT", 0x0c, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_clrseqintstat_print; +#else +#define ahd_clrseqintstat_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "CLRSEQINTSTAT", 0x0c, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_swtimer_print; +#else +#define ahd_swtimer_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SWTIMER", 0x0e, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_snscb_qoff_print; +#else +#define ahd_snscb_qoff_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SNSCB_QOFF", 0x10, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_sescb_qoff_print; +#else +#define ahd_sescb_qoff_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SESCB_QOFF", 0x12, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_sdscb_qoff_print; +#else +#define ahd_sdscb_qoff_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SDSCB_QOFF", 0x14, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_qoff_ctlsta_print; +#else +#define ahd_qoff_ctlsta_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "QOFF_CTLSTA", 0x16, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_intctl_print; +#else +#define ahd_intctl_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "INTCTL", 0x18, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_dfcntrl_print; +#else +#define ahd_dfcntrl_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "DFCNTRL", 0x19, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_dscommand0_print; +#else +#define ahd_dscommand0_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "DSCOMMAND0", 0x19, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_dfstatus_print; +#else +#define ahd_dfstatus_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "DFSTATUS", 0x1a, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_sg_cache_shadow_print; +#else +#define ahd_sg_cache_shadow_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SG_CACHE_SHADOW", 0x1b, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_sg_cache_pre_print; +#else +#define ahd_sg_cache_pre_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SG_CACHE_PRE", 0x1b, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_arbctl_print; +#else +#define ahd_arbctl_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "ARBCTL", 0x1b, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_lqin_print; +#else +#define ahd_lqin_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "LQIN", 0x20, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_typeptr_print; +#else +#define ahd_typeptr_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "TYPEPTR", 0x20, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_tagptr_print; +#else +#define ahd_tagptr_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "TAGPTR", 0x21, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_lunptr_print; +#else +#define ahd_lunptr_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "LUNPTR", 0x22, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_datalenptr_print; +#else +#define ahd_datalenptr_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "DATALENPTR", 0x23, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_statlenptr_print; +#else +#define ahd_statlenptr_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "STATLENPTR", 0x24, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_cmdlenptr_print; +#else +#define ahd_cmdlenptr_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "CMDLENPTR", 0x25, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_attrptr_print; +#else +#define ahd_attrptr_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "ATTRPTR", 0x26, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_flagptr_print; +#else +#define ahd_flagptr_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "FLAGPTR", 0x27, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_cmdptr_print; +#else +#define ahd_cmdptr_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "CMDPTR", 0x28, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_qnextptr_print; +#else +#define ahd_qnextptr_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "QNEXTPTR", 0x29, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_idptr_print; +#else +#define ahd_idptr_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "IDPTR", 0x2a, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_abrtbyteptr_print; +#else +#define ahd_abrtbyteptr_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "ABRTBYTEPTR", 0x2b, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_abrtbitptr_print; +#else +#define ahd_abrtbitptr_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "ABRTBITPTR", 0x2c, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_maxcmdbytes_print; +#else +#define ahd_maxcmdbytes_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "MAXCMDBYTES", 0x2d, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_maxcmd2rcv_print; +#else +#define ahd_maxcmd2rcv_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "MAXCMD2RCV", 0x2e, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_shortthresh_print; +#else +#define ahd_shortthresh_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SHORTTHRESH", 0x2f, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_lunlen_print; +#else +#define ahd_lunlen_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "LUNLEN", 0x30, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_cdblimit_print; +#else +#define ahd_cdblimit_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "CDBLIMIT", 0x31, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_maxcmd_print; +#else +#define ahd_maxcmd_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "MAXCMD", 0x32, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_maxcmdcnt_print; +#else +#define ahd_maxcmdcnt_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "MAXCMDCNT", 0x33, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_lqrsvd01_print; +#else +#define ahd_lqrsvd01_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "LQRSVD01", 0x34, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_lqrsvd16_print; +#else +#define ahd_lqrsvd16_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "LQRSVD16", 0x35, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_lqrsvd17_print; +#else +#define ahd_lqrsvd17_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "LQRSVD17", 0x36, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_cmdrsvd0_print; +#else +#define ahd_cmdrsvd0_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "CMDRSVD0", 0x37, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_lqctl0_print; +#else +#define ahd_lqctl0_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "LQCTL0", 0x38, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_lqctl1_print; +#else +#define ahd_lqctl1_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "LQCTL1", 0x38, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_lqctl2_print; +#else +#define ahd_lqctl2_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "LQCTL2", 0x39, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_scsbist0_print; +#else +#define ahd_scsbist0_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SCSBIST0", 0x39, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_scsiseq0_print; +#else +#define ahd_scsiseq0_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SCSISEQ0", 0x3a, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_scsbist1_print; +#else +#define ahd_scsbist1_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SCSBIST1", 0x3a, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_scsiseq1_print; +#else +#define ahd_scsiseq1_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SCSISEQ1", 0x3b, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_businitid_print; +#else +#define ahd_businitid_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "BUSINITID", 0x3c, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_sxfrctl0_print; +#else +#define ahd_sxfrctl0_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SXFRCTL0", 0x3c, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_dlcount_print; +#else +#define ahd_dlcount_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "DLCOUNT", 0x3c, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_sxfrctl1_print; +#else +#define ahd_sxfrctl1_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SXFRCTL1", 0x3d, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_bustargid_print; +#else +#define ahd_bustargid_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "BUSTARGID", 0x3e, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_sxfrctl2_print; +#else +#define ahd_sxfrctl2_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SXFRCTL2", 0x3e, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_dffstat_print; +#else +#define ahd_dffstat_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "DFFSTAT", 0x3f, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_scsisigo_print; +#else +#define ahd_scsisigo_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SCSISIGO", 0x40, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_multargid_print; +#else +#define ahd_multargid_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "MULTARGID", 0x40, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_scsisigi_print; +#else +#define ahd_scsisigi_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SCSISIGI", 0x41, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_scsiphase_print; +#else +#define ahd_scsiphase_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SCSIPHASE", 0x42, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_scsidat0_img_print; +#else +#define ahd_scsidat0_img_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SCSIDAT0_IMG", 0x43, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_scsidat_print; +#else +#define ahd_scsidat_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SCSIDAT", 0x44, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_scsibus_print; +#else +#define ahd_scsibus_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SCSIBUS", 0x46, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_targidin_print; +#else +#define ahd_targidin_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "TARGIDIN", 0x48, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_selid_print; +#else +#define ahd_selid_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SELID", 0x49, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_optionmode_print; +#else +#define ahd_optionmode_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "OPTIONMODE", 0x4a, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_sblkctl_print; +#else +#define ahd_sblkctl_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SBLKCTL", 0x4a, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_simode0_print; +#else +#define ahd_simode0_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SIMODE0", 0x4b, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_sstat0_print; +#else +#define ahd_sstat0_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SSTAT0", 0x4b, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_clrsint0_print; +#else +#define ahd_clrsint0_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "CLRSINT0", 0x4b, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_sstat1_print; +#else +#define ahd_sstat1_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SSTAT1", 0x4c, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_clrsint1_print; +#else +#define ahd_clrsint1_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "CLRSINT1", 0x4c, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_sstat2_print; +#else +#define ahd_sstat2_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SSTAT2", 0x4d, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_clrsint2_print; +#else +#define ahd_clrsint2_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "CLRSINT2", 0x4d, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_simode2_print; +#else +#define ahd_simode2_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SIMODE2", 0x4d, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_perrdiag_print; +#else +#define ahd_perrdiag_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "PERRDIAG", 0x4e, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_lqistate_print; +#else +#define ahd_lqistate_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "LQISTATE", 0x4e, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_soffcnt_print; +#else +#define ahd_soffcnt_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SOFFCNT", 0x4f, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_lqostate_print; +#else +#define ahd_lqostate_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "LQOSTATE", 0x4f, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_lqistat0_print; +#else +#define ahd_lqistat0_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "LQISTAT0", 0x50, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_clrlqiint0_print; +#else +#define ahd_clrlqiint0_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "CLRLQIINT0", 0x50, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_lqimode0_print; +#else +#define ahd_lqimode0_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "LQIMODE0", 0x50, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_lqistat1_print; +#else +#define ahd_lqistat1_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "LQISTAT1", 0x51, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_clrlqiint1_print; +#else +#define ahd_clrlqiint1_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "CLRLQIINT1", 0x51, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_lqimode1_print; +#else +#define ahd_lqimode1_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "LQIMODE1", 0x51, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_lqistat2_print; +#else +#define ahd_lqistat2_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "LQISTAT2", 0x52, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_sstat3_print; +#else +#define ahd_sstat3_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SSTAT3", 0x53, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_clrsint3_print; +#else +#define ahd_clrsint3_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "CLRSINT3", 0x53, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_simode3_print; +#else +#define ahd_simode3_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SIMODE3", 0x53, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_lqomode0_print; +#else +#define ahd_lqomode0_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "LQOMODE0", 0x54, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_lqostat0_print; +#else +#define ahd_lqostat0_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "LQOSTAT0", 0x54, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_clrlqoint0_print; +#else +#define ahd_clrlqoint0_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "CLRLQOINT0", 0x54, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_lqomode1_print; +#else +#define ahd_lqomode1_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "LQOMODE1", 0x55, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_lqostat1_print; +#else +#define ahd_lqostat1_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "LQOSTAT1", 0x55, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_clrlqoint1_print; +#else +#define ahd_clrlqoint1_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "CLRLQOINT1", 0x55, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_os_space_cnt_print; +#else +#define ahd_os_space_cnt_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "OS_SPACE_CNT", 0x56, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_lqostat2_print; +#else +#define ahd_lqostat2_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "LQOSTAT2", 0x56, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_simode1_print; +#else +#define ahd_simode1_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SIMODE1", 0x57, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_gsfifo_print; +#else +#define ahd_gsfifo_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "GSFIFO", 0x58, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_dffsxfrctl_print; +#else +#define ahd_dffsxfrctl_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "DFFSXFRCTL", 0x5a, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_nextscb_print; +#else +#define ahd_nextscb_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "NEXTSCB", 0x5a, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_lqoscsctl_print; +#else +#define ahd_lqoscsctl_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "LQOSCSCTL", 0x5a, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_seqintsrc_print; +#else +#define ahd_seqintsrc_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SEQINTSRC", 0x5b, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_clrseqintsrc_print; +#else +#define ahd_clrseqintsrc_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "CLRSEQINTSRC", 0x5b, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_currscb_print; +#else +#define ahd_currscb_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "CURRSCB", 0x5c, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_seqimode_print; +#else +#define ahd_seqimode_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SEQIMODE", 0x5c, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_mdffstat_print; +#else +#define ahd_mdffstat_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "MDFFSTAT", 0x5d, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_crccontrol_print; +#else +#define ahd_crccontrol_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "CRCCONTROL", 0x5d, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_scsitest_print; +#else +#define ahd_scsitest_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SCSITEST", 0x5e, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_dfftag_print; +#else +#define ahd_dfftag_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "DFFTAG", 0x5e, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_lastscb_print; +#else +#define ahd_lastscb_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "LASTSCB", 0x5e, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_iopdnctl_print; +#else +#define ahd_iopdnctl_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "IOPDNCTL", 0x5f, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_negoaddr_print; +#else +#define ahd_negoaddr_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "NEGOADDR", 0x60, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_shaddr_print; +#else +#define ahd_shaddr_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SHADDR", 0x60, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_dgrpcrci_print; +#else +#define ahd_dgrpcrci_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "DGRPCRCI", 0x60, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_negperiod_print; +#else +#define ahd_negperiod_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "NEGPERIOD", 0x61, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_packcrci_print; +#else +#define ahd_packcrci_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "PACKCRCI", 0x62, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_negoffset_print; +#else +#define ahd_negoffset_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "NEGOFFSET", 0x62, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_negppropts_print; +#else +#define ahd_negppropts_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "NEGPPROPTS", 0x63, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_negconopts_print; +#else +#define ahd_negconopts_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "NEGCONOPTS", 0x64, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_annexcol_print; +#else +#define ahd_annexcol_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "ANNEXCOL", 0x65, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_annexdat_print; +#else +#define ahd_annexdat_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "ANNEXDAT", 0x66, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_scschkn_print; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From ngie at FreeBSD.org Thu Aug 21 17:32:39 2014 From: ngie at FreeBSD.org (Garrett Cooper) Date: Thu, 21 Aug 2014 17:32:39 +0000 (UTC) Subject: svn commit: r270285 - in stable/10: etc/mtree lib/libmp lib/libmp/tests tools/regression/lib/libmp Message-ID: <201408211732.s7LHWdcZ087221@svn.freebsd.org> Author: ngie Date: Thu Aug 21 17:32:38 2014 New Revision: 270285 URL: http://svnweb.freebsd.org/changeset/base/270285 Log: MFC r269534: Integrate lib/libmp into the build/kyua - Remove the .t wrapper - Fix -Wreturn-type warnings with clang This change has been tested on amd64/i386 Phabric: D530 Reviewed by: jmmv Approved by: jmmv (co--mentor) MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division MFC note: src.opts.mk in the original commit was changed to bsd.own.mk. Added: stable/10/lib/libmp/tests/ - copied from r269534, head/lib/libmp/tests/ Deleted: stable/10/tools/regression/lib/libmp/ Modified: stable/10/etc/mtree/BSD.tests.dist stable/10/lib/libmp/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Thu Aug 21 17:18:21 2014 (r270284) +++ stable/10/etc/mtree/BSD.tests.dist Thu Aug 21 17:32:38 2014 (r270285) @@ -85,6 +85,8 @@ .. libcrypt .. + libmp + .. .. libexec atf Modified: stable/10/lib/libmp/Makefile ============================================================================== --- stable/10/lib/libmp/Makefile Thu Aug 21 17:18:21 2014 (r270284) +++ stable/10/lib/libmp/Makefile Thu Aug 21 17:32:38 2014 (r270285) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + LIB= mp SHLIB_MAJOR= 7 DPADD= ${LIBCRYPTO} @@ -13,4 +15,8 @@ CFLAGS+= -I${.CURDIR}/../../crypto VERSION_DEF= ${.CURDIR}/../libc/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include From ngie at FreeBSD.org Thu Aug 21 17:36:43 2014 From: ngie at FreeBSD.org (Garrett Cooper) Date: Thu, 21 Aug 2014 17:36:42 +0000 (UTC) Subject: svn commit: r270286 - stable/10/lib/atf/libatf-c++ Message-ID: <201408211736.s7LHagXk087824@svn.freebsd.org> Author: ngie Date: Thu Aug 21 17:36:42 2014 New Revision: 270286 URL: http://svnweb.freebsd.org/changeset/base/270286 Log: MFC r270116: Fix typo in lib/atf/libatfc++/Makefile LIBATFC should be LIBATF_C; this was missed in the initial import (r241823) PR: 192731 MFC after: 3 days Phabric: D619 Approved by: rpaulo (mentor) Modified: stable/10/lib/atf/libatf-c++/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/atf/libatf-c++/Makefile ============================================================================== --- stable/10/lib/atf/libatf-c++/Makefile Thu Aug 21 17:32:38 2014 (r270285) +++ stable/10/lib/atf/libatf-c++/Makefile Thu Aug 21 17:36:42 2014 (r270286) @@ -31,7 +31,7 @@ LIB= atf-c++ SHLIB_MAJOR= 2 # libatf-c++ depends on the C version of the ATF library to build. -DPADD= ${LIBATFC} +DPADD= ${LIBATF_C} LDADD= -latf-c LDFLAGS+= -L${.OBJDIR}/../libatf-c From rodrigc at FreeBSD.org Thu Aug 21 18:32:43 2014 From: rodrigc at FreeBSD.org (Craig Rodrigues) Date: Thu, 21 Aug 2014 11:32:40 -0700 Subject: svn commit: r270258 - in stable/10: sbin/umount usr.bin/showmount In-Reply-To: <201408210431.s7L4Vmkj027897@svn.freebsd.org> References: <201408210431.s7L4Vmkj027897@svn.freebsd.org> Message-ID: On Wed, Aug 20, 2014 at 9:31 PM, Peter Wemm wrote: > Author: peter > Date: Thu Aug 21 04:31:48 2014 > New Revision: 270258 > URL: http://svnweb.freebsd.org/changeset/base/270258 > > Log: > MFC r270062: switch rpc mount protocol for showmount and umount from > mountv1 to mountv3 - it breaks by default on the new netapp release with > the legacy protocols removed. Next time when doing this type of commit, please set Relnotes: yes in the commit message. This type of commit is "Release Notes" worthy, and it makes writing release notes a bit easier for re at . -- Craig From emaste at FreeBSD.org Thu Aug 21 19:32:55 2014 From: emaste at FreeBSD.org (Ed Maste) Date: Thu, 21 Aug 2014 19:32:55 +0000 (UTC) Subject: svn commit: r270291 - stable/10/share/mk Message-ID: <201408211932.s7LJWtDx044112@svn.freebsd.org> Author: emaste Date: Thu Aug 21 19:32:54 2014 New Revision: 270291 URL: http://svnweb.freebsd.org/changeset/base/270291 Log: MFC r264927 by imp: NO_DEBUG_FILES -> MK_DEBUG_FILES=no in last remaining place. Modified: stable/10/share/mk/bsd.crunchgen.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.crunchgen.mk ============================================================================== --- stable/10/share/mk/bsd.crunchgen.mk Thu Aug 21 19:15:22 2014 (r270290) +++ stable/10/share/mk/bsd.crunchgen.mk Thu Aug 21 19:32:54 2014 (r270291) @@ -48,7 +48,7 @@ CRUNCH_GENERATE_LINKS?= yes CLEANFILES+= $(CONF) *.o *.lo *.c *.mk *.cache *.a *.h # Don't try to extract debug info from ${PROG}. -NO_DEBUG_FILES= +MK_DEBUG_FILES=no # Program names and their aliases contribute hardlinks to 'rescue' executable, # except for those that get suppressed. From np at FreeBSD.org Thu Aug 21 19:42:03 2014 From: np at FreeBSD.org (Navdeep Parhar) Date: Thu, 21 Aug 2014 19:42:03 +0000 (UTC) Subject: svn commit: r270292 - stable/10/sys/net Message-ID: <201408211942.s7LJg3u0049048@svn.freebsd.org> Author: np Date: Thu Aug 21 19:42:03 2014 New Revision: 270292 URL: http://svnweb.freebsd.org/changeset/base/270292 Log: Update a couple of header files that were missed in r270252. This is a direct commit to stable/10. Submitted by: luigi Modified: stable/10/sys/net/netmap.h stable/10/sys/net/netmap_user.h Modified: stable/10/sys/net/netmap.h ============================================================================== --- stable/10/sys/net/netmap.h Thu Aug 21 19:32:54 2014 (r270291) +++ stable/10/sys/net/netmap.h Thu Aug 21 19:42:03 2014 (r270292) @@ -445,6 +445,13 @@ struct netmap_if { * Set the virtio-net header length used by the client * of a VALE switch port. * + * NETMAP_BDG_NEWIF + * create a persistent VALE port with name nr_name. + * Used by vale-ctl -n ... + * + * NETMAP_BDG_DELIF + * delete a persistent VALE port. Used by vale-ctl -d ... + * * nr_arg1, nr_arg2, nr_arg3 (in/out) command specific * * @@ -478,11 +485,12 @@ struct nmreq { uint16_t nr_cmd; #define NETMAP_BDG_ATTACH 1 /* attach the NIC */ #define NETMAP_BDG_DETACH 2 /* detach the NIC */ -#define NETMAP_BDG_LOOKUP_REG 3 /* register lookup function */ +#define NETMAP_BDG_REGOPS 3 /* register bridge callbacks */ #define NETMAP_BDG_LIST 4 /* get bridge's info */ #define NETMAP_BDG_VNET_HDR 5 /* set the port virtio-net-hdr length */ #define NETMAP_BDG_OFFSET NETMAP_BDG_VNET_HDR /* deprecated alias */ - +#define NETMAP_BDG_NEWIF 6 /* create a virtual port */ +#define NETMAP_BDG_DELIF 7 /* destroy a virtual port */ uint16_t nr_arg1; /* reserve extra rings in NIOCREGIF */ #define NETMAP_BDG_HOST 1 /* attach the host stack on ATTACH */ @@ -517,6 +525,7 @@ enum { NR_REG_DEFAULT = 0, /* backward c #define NIOCREGIF _IOWR('i', 146, struct nmreq) /* interface register */ #define NIOCTXSYNC _IO('i', 148) /* sync tx queues */ #define NIOCRXSYNC _IO('i', 149) /* sync rx queues */ +#define NIOCCONFIG _IOWR('i',150, struct nm_ifreq) /* for ext. modules */ #endif /* !NIOCREGIF */ @@ -533,4 +542,15 @@ nm_ring_empty(struct netmap_ring *ring) return (ring->cur == ring->tail); } +/* + * Opaque structure that is passed to an external kernel + * module via ioctl(fd, NIOCCONFIG, req) for a user-owned + * bridge port (at this point ephemeral VALE interface). + */ +#define NM_IFRDATA_LEN 256 +struct nm_ifreq { + char nifr_name[IFNAMSIZ]; + char data[NM_IFRDATA_LEN]; +}; + #endif /* _NET_NETMAP_H_ */ Modified: stable/10/sys/net/netmap_user.h ============================================================================== --- stable/10/sys/net/netmap_user.h Thu Aug 21 19:32:54 2014 (r270291) +++ stable/10/sys/net/netmap_user.h Thu Aug 21 19:42:03 2014 (r270292) @@ -149,21 +149,21 @@ nm_ring_space(struct netmap_ring *ring) #define ND(_fmt, ...) do {} while(0) #define D(_fmt, ...) \ do { \ - struct timeval t0; \ - gettimeofday(&t0, NULL); \ + struct timeval _t0; \ + gettimeofday(&_t0, NULL); \ fprintf(stderr, "%03d.%06d %s [%d] " _fmt "\n", \ - (int)(t0.tv_sec % 1000), (int)t0.tv_usec, \ + (int)(_t0.tv_sec % 1000), (int)_t0.tv_usec, \ __FUNCTION__, __LINE__, ##__VA_ARGS__); \ } while (0) /* Rate limited version of "D", lps indicates how many per second */ #define RD(lps, format, ...) \ do { \ - static int t0, __cnt; \ + static int __t0, __cnt; \ struct timeval __xxts; \ gettimeofday(&__xxts, NULL); \ - if (t0 != __xxts.tv_sec) { \ - t0 = __xxts.tv_sec; \ + if (__t0 != __xxts.tv_sec) { \ + __t0 = __xxts.tv_sec; \ __cnt = 0; \ } \ if (__cnt++ < lps) { \ @@ -495,23 +495,23 @@ nm_open(const char *ifname, const struct (char *)d->mem + d->memsize; } - if (nr_flags == NR_REG_SW) { /* host stack */ + if (d->req.nr_flags == NR_REG_SW) { /* host stack */ d->first_tx_ring = d->last_tx_ring = d->req.nr_tx_rings; d->first_rx_ring = d->last_rx_ring = d->req.nr_rx_rings; - } else if (nr_flags == NR_REG_ALL_NIC) { /* only nic */ + } else if (d->req.nr_flags == NR_REG_ALL_NIC) { /* only nic */ d->first_tx_ring = 0; d->first_rx_ring = 0; d->last_tx_ring = d->req.nr_tx_rings - 1; d->last_rx_ring = d->req.nr_rx_rings - 1; - } else if (nr_flags == NR_REG_NIC_SW) { + } else if (d->req.nr_flags == NR_REG_NIC_SW) { d->first_tx_ring = 0; d->first_rx_ring = 0; d->last_tx_ring = d->req.nr_tx_rings; d->last_rx_ring = d->req.nr_rx_rings; - } else if (nr_flags == NR_REG_ONE_NIC) { + } else if (d->req.nr_flags == NR_REG_ONE_NIC) { /* XXX check validity */ d->first_tx_ring = d->last_tx_ring = - d->first_rx_ring = d->last_rx_ring = nr_ringid; + d->first_rx_ring = d->last_rx_ring = d->req.nr_ringid & NETMAP_RING_MASK; } else { /* pipes */ d->first_tx_ring = d->last_tx_ring = 0; d->first_rx_ring = d->last_rx_ring = 0; From markj at FreeBSD.org Thu Aug 21 19:45:52 2014 From: markj at FreeBSD.org (Mark Johnston) Date: Thu, 21 Aug 2014 19:45:52 +0000 (UTC) Subject: svn commit: r270294 - stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace Message-ID: <201408211945.s7LJjqST049739@svn.freebsd.org> Author: markj Date: Thu Aug 21 19:45:52 2014 New Revision: 270294 URL: http://svnweb.freebsd.org/changeset/base/270294 Log: MFC r269525: Return 0 for the PPID of threads in process 0, as process 0 doesn't have a parent process. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Thu Aug 21 19:42:24 2014 (r270293) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Thu Aug 21 19:45:52 2014 (r270294) @@ -3415,7 +3415,10 @@ dtrace_dif_variable(dtrace_mstate_t *mst */ return ((uint64_t)curthread->t_procp->p_ppid); #else - return ((uint64_t)curproc->p_pptr->p_pid); + if (curproc->p_pid == proc0.p_pid) + return (curproc->p_pid); + else + return (curproc->p_pptr->p_pid); #endif case DIF_VAR_TID: From markj at FreeBSD.org Thu Aug 21 19:45:55 2014 From: markj at FreeBSD.org (Mark Johnston) Date: Thu, 21 Aug 2014 19:45:54 +0000 (UTC) Subject: svn commit: r270295 - stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace Message-ID: <201408211945.s7LJjsxf049789@svn.freebsd.org> Author: markj Date: Thu Aug 21 19:45:54 2014 New Revision: 270295 URL: http://svnweb.freebsd.org/changeset/base/270295 Log: MFC r269525: Return 0 for the PPID of threads in process 0, as process 0 doesn't have a parent process. Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Directory Properties: stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Thu Aug 21 19:45:52 2014 (r270294) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Thu Aug 21 19:45:54 2014 (r270295) @@ -3107,7 +3107,10 @@ dtrace_dif_variable(dtrace_mstate_t *mst */ return ((uint64_t)curthread->t_procp->p_ppid); #else - return ((uint64_t)curproc->p_pptr->p_pid); + if (curproc->p_pid == proc0.p_pid) + return (curproc->p_pid); + else + return (curproc->p_pptr->p_pid); #endif case DIF_VAR_TID: From emaste at FreeBSD.org Thu Aug 21 19:51:10 2014 From: emaste at FreeBSD.org (Ed Maste) Date: Thu, 21 Aug 2014 19:51:08 +0000 (UTC) Subject: svn commit: r270296 - in stable/10/sys: ia64/acpica ia64/ia64 ia64/include sys Message-ID: <201408211951.s7LJp8uJ052951@svn.freebsd.org> Author: emaste Date: Thu Aug 21 19:51:07 2014 New Revision: 270296 URL: http://svnweb.freebsd.org/changeset/base/270296 Log: MFC r263815, r263872: Move ia64 efi.h to sys in preparation for amd64 UEFI support Prototypes specific to ia64 have been left in this file for now, under __ia64__, rather than moving them to a new header under sys/ia64. I anticipate that (some of) the corresponding functions will be shared by the amd64, arm64, i386, and ia64 architectures, and we can adjust this as EFI support on other than ia64 continues to develop. Fix missed efi.h header change in r263815 Sponsored by: The FreeBSD Foundation Added: stable/10/sys/sys/efi.h - copied unchanged from r263815, head/sys/sys/efi.h Deleted: stable/10/sys/ia64/include/efi.h Modified: stable/10/sys/ia64/acpica/OsdEnvironment.c stable/10/sys/ia64/ia64/clock.c stable/10/sys/ia64/ia64/dump_machdep.c stable/10/sys/ia64/ia64/efi.c stable/10/sys/ia64/ia64/iodev_machdep.c stable/10/sys/ia64/ia64/machdep.c stable/10/sys/ia64/ia64/mem.c stable/10/sys/ia64/ia64/nexus.c stable/10/sys/ia64/ia64/pmap.c stable/10/sys/ia64/ia64/sal.c stable/10/sys/ia64/ia64/trap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ia64/acpica/OsdEnvironment.c ============================================================================== --- stable/10/sys/ia64/acpica/OsdEnvironment.c Thu Aug 21 19:45:54 2014 (r270295) +++ stable/10/sys/ia64/acpica/OsdEnvironment.c Thu Aug 21 19:51:07 2014 (r270296) @@ -29,8 +29,8 @@ __FBSDID("$FreeBSD$"); #include +#include #include -#include #include Modified: stable/10/sys/ia64/ia64/clock.c ============================================================================== --- stable/10/sys/ia64/ia64/clock.c Thu Aug 21 19:45:54 2014 (r270295) +++ stable/10/sys/ia64/ia64/clock.c Thu Aug 21 19:51:07 2014 (r270296) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -41,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include Modified: stable/10/sys/ia64/ia64/dump_machdep.c ============================================================================== --- stable/10/sys/ia64/ia64/dump_machdep.c Thu Aug 21 19:45:54 2014 (r270295) +++ stable/10/sys/ia64/ia64/dump_machdep.c Thu Aug 21 19:51:07 2014 (r270296) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #ifdef SW_WATCHDOG @@ -41,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: stable/10/sys/ia64/ia64/efi.c ============================================================================== --- stable/10/sys/ia64/ia64/efi.c Thu Aug 21 19:45:54 2014 (r270295) +++ stable/10/sys/ia64/ia64/efi.c Thu Aug 21 19:51:07 2014 (r270296) @@ -29,9 +29,9 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include -#include #include #include #include Modified: stable/10/sys/ia64/ia64/iodev_machdep.c ============================================================================== --- stable/10/sys/ia64/ia64/iodev_machdep.c Thu Aug 21 19:45:54 2014 (r270295) +++ stable/10/sys/ia64/ia64/iodev_machdep.c Thu Aug 21 19:51:07 2014 (r270296) @@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -37,7 +38,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include static int iodev_efivar_getvar(struct iodev_efivar_req *req); Modified: stable/10/sys/ia64/ia64/machdep.c ============================================================================== --- stable/10/sys/ia64/ia64/machdep.c Thu Aug 21 19:45:54 2014 (r270295) +++ stable/10/sys/ia64/ia64/machdep.c Thu Aug 21 19:51:07 2014 (r270296) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -83,7 +84,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include Modified: stable/10/sys/ia64/ia64/mem.c ============================================================================== --- stable/10/sys/ia64/ia64/mem.c Thu Aug 21 19:45:54 2014 (r270295) +++ stable/10/sys/ia64/ia64/mem.c Thu Aug 21 19:51:07 2014 (r270296) @@ -45,13 +45,13 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include #include #include #include -#include #include #include Modified: stable/10/sys/ia64/ia64/nexus.c ============================================================================== --- stable/10/sys/ia64/ia64/nexus.c Thu Aug 21 19:45:54 2014 (r270295) +++ stable/10/sys/ia64/ia64/nexus.c Thu Aug 21 19:51:07 2014 (r270296) @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -55,7 +56,6 @@ #include #include -#include #include #include #include Modified: stable/10/sys/ia64/ia64/pmap.c ============================================================================== --- stable/10/sys/ia64/ia64/pmap.c Thu Aug 21 19:45:54 2014 (r270295) +++ stable/10/sys/ia64/ia64/pmap.c Thu Aug 21 19:51:07 2014 (r270296) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include "opt_pmap.h" #include +#include #include #include #include @@ -71,7 +72,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: stable/10/sys/ia64/ia64/sal.c ============================================================================== --- stable/10/sys/ia64/ia64/sal.c Thu Aug 21 19:45:54 2014 (r270295) +++ stable/10/sys/ia64/ia64/sal.c Thu Aug 21 19:51:07 2014 (r270296) @@ -30,11 +30,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include #include -#include #include #include #include Modified: stable/10/sys/ia64/ia64/trap.c ============================================================================== --- stable/10/sys/ia64/ia64/trap.c Thu Aug 21 19:45:54 2014 (r270295) +++ stable/10/sys/ia64/ia64/trap.c Thu Aug 21 19:51:07 2014 (r270296) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -60,7 +61,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #ifdef SMP #include Copied: stable/10/sys/sys/efi.h (from r263815, head/sys/sys/efi.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/sys/efi.h Thu Aug 21 19:51:07 2014 (r270296, copy of r263815, head/sys/sys/efi.h) @@ -0,0 +1,177 @@ +/*- + * Copyright (c) 2004 Marcel Moolenaar + * 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 ``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. + * + * $FreeBSD$ + */ + +#ifndef _SYS_EFI_H_ +#define _SYS_EFI_H_ + +#include + +#define EFI_PAGE_SHIFT 12 +#define EFI_PAGE_SIZE (1 << EFI_PAGE_SHIFT) +#define EFI_PAGE_MASK (EFI_PAGE_SIZE - 1) + +#define EFI_TABLE_ACPI20 \ + {0x8868e871,0xe4f1,0x11d3,0xbc,0x22,{0x00,0x80,0xc7,0x3c,0x88,0x81}} +#define EFI_TABLE_SAL \ + {0xeb9d2d32,0x2d88,0x11d3,0x9a,0x16,{0x00,0x90,0x27,0x3f,0xc1,0x4d}} + +enum efi_reset { + EFI_RESET_COLD, + EFI_RESET_WARM +}; + +typedef uint16_t efi_char; +typedef unsigned long efi_status; + +struct efi_cfgtbl { + struct uuid ct_uuid; + uint64_t ct_data; +}; + +struct efi_md { + uint32_t md_type; +#define EFI_MD_TYPE_NULL 0 +#define EFI_MD_TYPE_CODE 1 /* Loader text. */ +#define EFI_MD_TYPE_DATA 2 /* Loader data. */ +#define EFI_MD_TYPE_BS_CODE 3 /* Boot services text. */ +#define EFI_MD_TYPE_BS_DATA 4 /* Boot services data. */ +#define EFI_MD_TYPE_RT_CODE 5 /* Runtime services text. */ +#define EFI_MD_TYPE_RT_DATA 6 /* Runtime services data. */ +#define EFI_MD_TYPE_FREE 7 /* Unused/free memory. */ +#define EFI_MD_TYPE_BAD 8 /* Bad memory */ +#define EFI_MD_TYPE_RECLAIM 9 /* ACPI reclaimable memory. */ +#define EFI_MD_TYPE_FIRMWARE 10 /* ACPI NV memory */ +#define EFI_MD_TYPE_IOMEM 11 /* Memory-mapped I/O. */ +#define EFI_MD_TYPE_IOPORT 12 /* I/O port space. */ +#define EFI_MD_TYPE_PALCODE 13 /* PAL */ + uint32_t __pad; + uint64_t md_phys; + void *md_virt; + uint64_t md_pages; + uint64_t md_attr; +#define EFI_MD_ATTR_UC 0x0000000000000001UL +#define EFI_MD_ATTR_WC 0x0000000000000002UL +#define EFI_MD_ATTR_WT 0x0000000000000004UL +#define EFI_MD_ATTR_WB 0x0000000000000008UL +#define EFI_MD_ATTR_UCE 0x0000000000000010UL +#define EFI_MD_ATTR_WP 0x0000000000001000UL +#define EFI_MD_ATTR_RP 0x0000000000002000UL +#define EFI_MD_ATTR_XP 0x0000000000004000UL +#define EFI_MD_ATTR_RT 0x8000000000000000UL +}; + +struct efi_tm { + uint16_t tm_year; /* 1998 - 20XX */ + uint8_t tm_mon; /* 1 - 12 */ + uint8_t tm_mday; /* 1 - 31 */ + uint8_t tm_hour; /* 0 - 23 */ + uint8_t tm_min; /* 0 - 59 */ + uint8_t tm_sec; /* 0 - 59 */ + uint8_t __pad1; + uint32_t tm_nsec; /* 0 - 999,999,999 */ + int16_t tm_tz; /* -1440 to 1440 or 2047 */ + uint8_t tm_dst; + uint8_t __pad2; +}; + +struct efi_tmcap { + uint32_t tc_res; /* 1e-6 parts per million */ + uint32_t tc_prec; /* hertz */ + uint8_t tc_stz; /* Set clears sub-second time */ +}; + +struct efi_tblhdr { + uint64_t th_sig; + uint32_t th_rev; + uint32_t th_hdrsz; + uint32_t th_crc32; + uint32_t __res; +}; + +struct efi_rt { + struct efi_tblhdr rt_hdr; + efi_status (*rt_gettime)(struct efi_tm *, struct efi_tmcap *); + efi_status (*rt_settime)(struct efi_tm *); + efi_status (*rt_getwaketime)(uint8_t *, uint8_t *, + struct efi_tm *); + efi_status (*rt_setwaketime)(uint8_t, struct efi_tm *); + efi_status (*rt_setvirtual)(u_long, u_long, uint32_t, + struct efi_md *); + efi_status (*rt_cvtptr)(u_long, void **); + efi_status (*rt_getvar)(efi_char *, struct uuid *, uint32_t *, + u_long *, void *); + efi_status (*rt_scanvar)(u_long *, efi_char *, struct uuid *); + efi_status (*rt_setvar)(efi_char *, struct uuid *, uint32_t, + u_long, void *); + efi_status (*rt_gethicnt)(uint32_t *); + efi_status (*rt_reset)(enum efi_reset, efi_status, u_long, + efi_char *); +}; + +struct efi_systbl { + struct efi_tblhdr st_hdr; +#define EFI_SYSTBL_SIG 0x5453595320494249UL + efi_char *st_fwvendor; + uint32_t st_fwrev; + uint32_t __pad; + void *st_cin; + void *st_cinif; + void *st_cout; + void *st_coutif; + void *st_cerr; + void *st_cerrif; + uint64_t st_rt; + void *st_bs; + u_long st_entries; + uint64_t st_cfgtbl; +}; + +#if defined(_KERNEL) && defined(__ia64__) + +typedef u_long (*ia64_efi_f)(u_long, u_long, u_long, u_long); + +u_long ia64_efi_physical(ia64_efi_f, u_long, u_long, u_long, u_long); + +void efi_boot_finish(void); +int efi_boot_minimal(uint64_t); +void *efi_get_table(struct uuid *); +void efi_get_time(struct efi_tm *); +struct efi_md *efi_md_find(vm_paddr_t); +struct efi_md *efi_md_first(void); +struct efi_md *efi_md_last(void); +struct efi_md *efi_md_next(struct efi_md *); +struct efi_md *efi_md_prev(struct efi_md *); +void efi_reset_system(void); +int efi_set_time(struct efi_tm *); +int efi_var_get(efi_char *, struct uuid *, uint32_t *, size_t *, void *); +int efi_var_nextname(size_t *, efi_char *, struct uuid *); +int efi_var_set(efi_char *, struct uuid *, uint32_t, size_t, void *); + +#endif /* _KERNEL && __ia64__ */ + +#endif /* _SYS_EFI_H_ */ From np at FreeBSD.org Thu Aug 21 19:54:04 2014 From: np at FreeBSD.org (Navdeep Parhar) Date: Thu, 21 Aug 2014 19:54:03 +0000 (UTC) Subject: svn commit: r270297 - in stable/10/sys: conf dev/cxgbe dev/cxgbe/common dev/cxgbe/tom modules/cxgbe modules/cxgbe/if_cxgbe modules/cxgbe/iw_cxgbe modules/cxgbe/t4_firmware modules/cxgbe/t5_firmware... Message-ID: <201408211954.s7LJs321054331@svn.freebsd.org> Author: np Date: Thu Aug 21 19:54:02 2014 New Revision: 270297 URL: http://svnweb.freebsd.org/changeset/base/270297 Log: MFC r266571, r266757, r268536, r269076, r269364, r269366, r269411, r269413, r269428, r269440, r269537, r269644, r269731, and the cxgbe portion of r270063. r266571: cxgbe(4): Remove stray if_up from the code that creates the tracing ifnet. r266757: cxgbe(4): netmap support for Terminator 5 (T5) based 10G/40G cards. Netmap gets its own hardware-assisted virtual interface and won't take over or disrupt the "normal" interface in any way. You can use both simultaneously. For kernels with DEV_NETMAP, cxgbe(4) carves out an ncxl interface (note the 'n' prefix) in the hardware to accompany each cxl interface. These two ifnet's per port share the same wire but really are separate interfaces in the hardware and software. Each gets its own L2 MAC addresses (unicast and multicast), MTU, checksum caps, etc. You should run netmap on the 'n' interfaces only, that's what they are for. With this, pkt-gen is able to transmit > 45Mpps out of a single 40G port of a T580 card. 2 port tx is at ~56Mpps total (28M + 28M) as of now. Single port receive is at 33Mpps but this is very much a work in progress. I expect it to be closer to 40Mpps once done. In any case the current effort can already saturate multiple 10G ports of a T5 card at the smallest legal packet size. T4 gear is totally untested. trantor:~# ./pkt-gen -i ncxl0 -f tx -D 00:07:43:ab:cd:ef 881.952141 main [1621] interface is ncxl0 881.952250 extract_ip_range [275] range is 10.0.0.1:0 to 10.0.0.1:0 881.952253 extract_ip_range [275] range is 10.1.0.1:0 to 10.1.0.1:0 881.962540 main [1804] mapped 334980KB at 0x801dff000 Sending on netmap:ncxl0: 4 queues, 1 threads and 1 cpus. 10.0.0.1 -> 10.1.0.1 (00:00:00:00:00:00 -> 00:07:43:ab:cd:ef) 881.962562 main [1882] Sending 512 packets every 0.000000000 s 881.962563 main [1884] Wait 2 secs for phy reset 884.088516 main [1886] Ready... 884.088535 nm_open [457] overriding ifname ncxl0 ringid 0x0 flags 0x1 884.088607 sender_body [996] start 884.093246 sender_body [1064] drop copy 885.090435 main_thread [1418] 45206353 pps (45289533 pkts in 1001840 usec) 886.091600 main_thread [1418] 45322792 pps (45375593 pkts in 1001165 usec) 887.092435 main_thread [1418] 45313992 pps (45351784 pkts in 1000834 usec) 888.094434 main_thread [1418] 45315765 pps (45406397 pkts in 1002000 usec) 889.095434 main_thread [1418] 45333218 pps (45378551 pkts in 1001000 usec) 890.097434 main_thread [1418] 45315247 pps (45405877 pkts in 1002000 usec) 891.099434 main_thread [1418] 45326515 pps (45417168 pkts in 1002000 usec) 892.101434 main_thread [1418] 45333039 pps (45423705 pkts in 1002000 usec) 893.103434 main_thread [1418] 45324105 pps (45414708 pkts in 1001999 usec) 894.105434 main_thread [1418] 45318042 pps (45408723 pkts in 1002001 usec) 895.106434 main_thread [1418] 45332430 pps (45377762 pkts in 1001000 usec) 896.107434 main_thread [1418] 45338072 pps (45383410 pkts in 1001000 usec) ... r268536: cxgbe(4): Add an iSCSI softc to the adapter structure. r269076: Some hooks in cxgbe(4) for the offloaded iSCSI driver. r269364: Improve compliance with style.Makefile(5). r269366: List one file per line in the Makefiles. This makes it easier to read diffs when a file is added or removed. r269411: cxgbe(4): minor optimizations in ingress queue processing. Reorganize struct sge_iq. Make the iq entry size a compile time constant. While here, eliminate RX_FL_ESIZE and use EQ_ESIZE directly. r269413: cxgbe(4): Fix an off by one error when looking for the BAR2 doorbell address of an egress queue. r269428: cxgbe(4): some optimizations in freelist handling. r269440: cxgbe(4): Remove an unused version of t4_enable_vi. r269537: cxgbe(4): Do not run any sleepable code in the SIOCSIFFLAGS handler when IFF_PROMISC or IFF_ALLMULTI is being flipped. bpf(4) holds its global mutex around ifpromisc in at least the bpf_dtor path. r269644: cxgbe(4): Let caller specify whether it's ok to sleep in t4_sched_config and t4_sched_params. r269731: cxgbe(4): Do not poke T4-only registers on a T5 (and vice versa). Relnotes: Yes (native netmap support for Chelsio T4/T5 cards) Added: stable/10/sys/dev/cxgbe/t4_netmap.c - copied, changed from r266757, head/sys/dev/cxgbe/t4_netmap.c Modified: stable/10/sys/conf/files stable/10/sys/dev/cxgbe/adapter.h stable/10/sys/dev/cxgbe/common/common.h stable/10/sys/dev/cxgbe/common/t4_hw.c stable/10/sys/dev/cxgbe/offload.h stable/10/sys/dev/cxgbe/t4_main.c stable/10/sys/dev/cxgbe/t4_sge.c stable/10/sys/dev/cxgbe/t4_tracer.c stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c stable/10/sys/dev/cxgbe/tom/t4_ddp.c stable/10/sys/dev/cxgbe/tom/t4_tom.h stable/10/sys/modules/cxgbe/Makefile stable/10/sys/modules/cxgbe/if_cxgbe/Makefile stable/10/sys/modules/cxgbe/iw_cxgbe/Makefile stable/10/sys/modules/cxgbe/t4_firmware/Makefile stable/10/sys/modules/cxgbe/t5_firmware/Makefile stable/10/sys/modules/cxgbe/tom/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Thu Aug 21 19:51:07 2014 (r270296) +++ stable/10/sys/conf/files Thu Aug 21 19:54:02 2014 (r270297) @@ -1128,6 +1128,8 @@ dev/cxgb/cxgb_t3fw.c optional cxgb cxgb compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgbe/t4_main.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" +dev/cxgbe/t4_netmap.c optional cxgbe pci \ + compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_sge.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_l2t.c optional cxgbe pci \ Modified: stable/10/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/10/sys/dev/cxgbe/adapter.h Thu Aug 21 19:51:07 2014 (r270296) +++ stable/10/sys/dev/cxgbe/adapter.h Thu Aug 21 19:54:02 2014 (r270297) @@ -48,6 +48,7 @@ #include #include "offload.h" +#include "common/t4_msg.h" #include "firmware/t4fw_interface.h" MALLOC_DECLARE(M_CXGBE); @@ -118,15 +119,24 @@ struct adapter; typedef struct adapter adapter_t; enum { - FW_IQ_QSIZE = 256, - FW_IQ_ESIZE = 64, /* At least 64 mandated by the firmware spec */ + /* + * All ingress queues use this entry size. Note that the firmware event + * queue and any iq expecting CPL_RX_PKT in the descriptor needs this to + * be at least 64. + */ + IQ_ESIZE = 64, + /* Default queue sizes for all kinds of ingress queues */ + FW_IQ_QSIZE = 256, RX_IQ_QSIZE = 1024, - RX_IQ_ESIZE = 64, /* At least 64 so CPL_RX_PKT will fit */ - EQ_ESIZE = 64, /* All egress queues use this entry size */ + /* All egress queues use this entry size */ + EQ_ESIZE = 64, + + /* Default queue sizes for all kinds of egress queues */ + CTRL_EQ_QSIZE = 128, + TX_EQ_QSIZE = 1024, - RX_FL_ESIZE = EQ_ESIZE, /* 8 64bit addresses */ #if MJUMPAGESIZE != MCLBYTES SW_ZONE_SIZES = 4, /* cluster, jumbop, jumbo9k, jumbo16k */ #else @@ -134,9 +144,7 @@ enum { #endif CL_METADATA_SIZE = CACHE_LINE_SIZE, - CTRL_EQ_QSIZE = 128, - - TX_EQ_QSIZE = 1024, + SGE_MAX_WR_NDESC = SGE_MAX_WR_LEN / EQ_ESIZE, /* max WR size in desc */ TX_SGL_SEGS = 36, TX_WR_FLITS = SGE_MAX_WR_LEN / 8 }; @@ -149,6 +157,17 @@ enum { }; enum { + XGMAC_MTU = (1 << 0), + XGMAC_PROMISC = (1 << 1), + XGMAC_ALLMULTI = (1 << 2), + XGMAC_VLANEX = (1 << 3), + XGMAC_UCADDR = (1 << 4), + XGMAC_MCADDRS = (1 << 5), + + XGMAC_ALL = 0xffff +}; + +enum { /* flags understood by begin_synchronized_op */ HOLD_LOCK = (1 << 0), SLEEP_OK = (1 << 1), @@ -162,7 +181,7 @@ enum { /* adapter flags */ FULL_INIT_DONE = (1 << 0), FW_OK = (1 << 1), - INTR_DIRECT = (1 << 2), /* direct interrupts for everything */ + /* INTR_DIRECT = (1 << 2), No longer used. */ MASTER_PF = (1 << 3), ADAP_SYSCTL_CTX = (1 << 4), TOM_INIT_DONE = (1 << 5), @@ -175,6 +194,10 @@ enum { PORT_INIT_DONE = (1 << 1), PORT_SYSCTL_CTX = (1 << 2), HAS_TRACEQ = (1 << 3), + INTR_RXQ = (1 << 4), /* All NIC rxq's take interrupts */ + INTR_OFLD_RXQ = (1 << 5), /* All TOE rxq's take interrupts */ + INTR_NM_RXQ = (1 << 6), /* All netmap rxq's take interrupts */ + INTR_ALL = (INTR_RXQ | INTR_OFLD_RXQ | INTR_NM_RXQ), }; #define IS_DOOMED(pi) ((pi)->flags & DOOMED) @@ -219,6 +242,19 @@ struct port_info { int nofldrxq; /* # of offload rx queues */ int first_ofld_rxq; /* index of first offload rx queue */ #endif +#ifdef DEV_NETMAP + int nnmtxq; /* # of netmap tx queues */ + int first_nm_txq; /* index of first netmap tx queue */ + int nnmrxq; /* # of netmap rx queues */ + int first_nm_rxq; /* index of first netmap rx queue */ + + struct ifnet *nm_ifp; + struct ifmedia nm_media; + int nmif_flags; + uint16_t nm_viid; + int16_t nm_xact_addr_filt; + uint16_t nm_rss_size; /* size of netmap VI's RSS table slice */ +#endif int tmr_idx; int pktc_idx; int qsize_rxq; @@ -281,6 +317,16 @@ struct tx_sdesc { uint8_t credits; /* NIC txq: # of frames sent out in the WR */ }; + +#define IQ_PAD (IQ_ESIZE - sizeof(struct rsp_ctrl) - sizeof(struct rss_header)) +struct iq_desc { + struct rss_header rss; + uint8_t cpl[IQ_PAD]; + struct rsp_ctrl rsp; +}; +#undef IQ_PAD +CTASSERT(sizeof(struct iq_desc) == IQ_ESIZE); + enum { /* iq flags */ IQ_ALLOCATED = (1 << 0), /* firmware resources allocated */ @@ -298,27 +344,25 @@ enum { * Ingress Queue: T4 is producer, driver is consumer. */ struct sge_iq { - bus_dma_tag_t desc_tag; - bus_dmamap_t desc_map; - bus_addr_t ba; /* bus address of descriptor ring */ uint32_t flags; - uint16_t abs_id; /* absolute SGE id for the iq */ - int8_t intr_pktc_idx; /* packet count threshold index */ - int8_t pad0; - __be64 *desc; /* KVA of descriptor ring */ - volatile int state; struct adapter *adapter; - const __be64 *cdesc; /* current descriptor */ + struct iq_desc *desc; /* KVA of descriptor ring */ + int8_t intr_pktc_idx; /* packet count threshold index */ uint8_t gen; /* generation bit */ uint8_t intr_params; /* interrupt holdoff parameters */ uint8_t intr_next; /* XXX: holdoff for next interrupt */ - uint8_t esize; /* size (bytes) of each entry in the queue */ uint16_t qsize; /* size (# of entries) of the queue */ + uint16_t sidx; /* index of the entry with the status page */ uint16_t cidx; /* consumer index */ uint16_t cntxt_id; /* SGE context id for the iq */ + uint16_t abs_id; /* absolute SGE id for the iq */ STAILQ_ENTRY(sge_iq) link; + + bus_dma_tag_t desc_tag; + bus_dmamap_t desc_map; + bus_addr_t ba; /* bus address of descriptor ring */ }; enum { @@ -356,7 +400,7 @@ struct sge_eq { struct tx_desc *desc; /* KVA of descriptor ring */ bus_addr_t ba; /* bus address of descriptor ring */ struct sge_qstat *spg; /* status page, for convenience */ - int doorbells; + uint16_t doorbells; volatile uint32_t *udb; /* KVA of doorbell (lies within BAR2) */ u_int udb_qid; /* relative qid within the doorbell page */ uint16_t cap; /* max # of desc, for convenience */ @@ -394,43 +438,55 @@ enum { FL_STARVING = (1 << 0), /* on the adapter's list of starving fl's */ FL_DOOMED = (1 << 1), /* about to be destroyed */ FL_BUF_PACKING = (1 << 2), /* buffer packing enabled */ + FL_BUF_RESUME = (1 << 3), /* resume from the middle of the frame */ }; -#define FL_RUNNING_LOW(fl) (fl->cap - fl->needed <= fl->lowat) -#define FL_NOT_RUNNING_LOW(fl) (fl->cap - fl->needed >= 2 * fl->lowat) +#define FL_RUNNING_LOW(fl) \ + (IDXDIFF(fl->dbidx * 8, fl->cidx, fl->sidx * 8) <= fl->lowat) +#define FL_NOT_RUNNING_LOW(fl) \ + (IDXDIFF(fl->dbidx * 8, fl->cidx, fl->sidx * 8) >= 2 * fl->lowat) struct sge_fl { - bus_dma_tag_t desc_tag; - bus_dmamap_t desc_map; - struct cluster_layout cll_def; /* default refill zone, layout */ - struct cluster_layout cll_alt; /* alternate refill zone, layout */ struct mtx fl_lock; - char lockname[16]; - int flags; - __be64 *desc; /* KVA of descriptor ring, ptr to addresses */ - bus_addr_t ba; /* bus address of descriptor ring */ struct fl_sdesc *sdesc; /* KVA of software descriptor ring */ - uint32_t cap; /* max # of buffers, for convenience */ - uint16_t qsize; /* size (# of entries) of the queue */ - uint16_t cntxt_id; /* SGE context id for the freelist */ - uint32_t cidx; /* consumer idx (buffer idx, NOT hw desc idx) */ - uint32_t rx_offset; /* offset in fl buf (when buffer packing) */ - uint32_t pidx; /* producer idx (buffer idx, NOT hw desc idx) */ - uint32_t needed; /* # of buffers needed to fill up fl. */ - uint32_t lowat; /* # of buffers <= this means fl needs help */ - uint32_t pending; /* # of bufs allocated since last doorbell */ - TAILQ_ENTRY(sge_fl) link; /* All starving freelists */ + struct cluster_layout cll_def; /* default refill zone, layout */ + uint16_t lowat; /* # of buffers <= this means fl needs help */ + int flags; + uint16_t buf_boundary; - struct mbuf *m0; - struct mbuf **pnext; - u_int remaining; + /* The 16b idx all deal with hw descriptors */ + uint16_t dbidx; /* hw pidx after last doorbell */ + uint16_t sidx; /* index of status page */ + volatile uint16_t hw_cidx; + + /* The 32b idx are all buffer idx, not hardware descriptor idx */ + uint32_t cidx; /* consumer index */ + uint32_t pidx; /* producer index */ + + uint32_t dbval; + u_int rx_offset; /* offset in fl buf (when buffer packing) */ + volatile uint32_t *udb; uint64_t mbuf_allocated;/* # of mbuf allocated from zone_mbuf */ uint64_t mbuf_inlined; /* # of mbuf created within clusters */ uint64_t cl_allocated; /* # of clusters allocated */ uint64_t cl_recycled; /* # of clusters recycled */ uint64_t cl_fast_recycled; /* # of clusters recycled (fast) */ + + /* These 3 are valid when FL_BUF_RESUME is set, stale otherwise. */ + struct mbuf *m0; + struct mbuf **pnext; + u_int remaining; + + uint16_t qsize; /* # of hw descriptors (status page included) */ + uint16_t cntxt_id; /* SGE context id for the freelist */ + TAILQ_ENTRY(sge_fl) link; /* All starving freelists */ + bus_dma_tag_t desc_tag; + bus_dmamap_t desc_map; + char lockname[16]; + bus_addr_t ba; /* bus address of descriptor ring */ + struct cluster_layout cll_alt; /* alternate refill zone, layout */ }; /* txq: SGE egress queue + what's needed for Ethernet NIC */ @@ -532,6 +588,64 @@ struct sge_wrq { uint32_t no_desc; /* out of hardware descriptors */ } __aligned(CACHE_LINE_SIZE); + +#ifdef DEV_NETMAP +struct sge_nm_rxq { + struct port_info *pi; + + struct iq_desc *iq_desc; + uint16_t iq_abs_id; + uint16_t iq_cntxt_id; + uint16_t iq_cidx; + uint16_t iq_sidx; + uint8_t iq_gen; + + __be64 *fl_desc; + uint16_t fl_cntxt_id; + uint32_t fl_cidx; + uint32_t fl_pidx; + uint32_t fl_sidx; + uint32_t fl_db_val; + u_int fl_hwidx:4; + + u_int nid; /* netmap ring # for this queue */ + + /* infrequently used items after this */ + + bus_dma_tag_t iq_desc_tag; + bus_dmamap_t iq_desc_map; + bus_addr_t iq_ba; + int intr_idx; + + bus_dma_tag_t fl_desc_tag; + bus_dmamap_t fl_desc_map; + bus_addr_t fl_ba; +} __aligned(CACHE_LINE_SIZE); + +struct sge_nm_txq { + struct tx_desc *desc; + uint16_t cidx; + uint16_t pidx; + uint16_t sidx; + uint16_t equiqidx; /* EQUIQ last requested at this pidx */ + uint16_t equeqidx; /* EQUEQ last requested at this pidx */ + uint16_t dbidx; /* pidx of the most recent doorbell */ + uint16_t doorbells; + volatile uint32_t *udb; + u_int udb_qid; + u_int cntxt_id; + __be32 cpl_ctrl0; /* for convenience */ + u_int nid; /* netmap ring # for this queue */ + + /* infrequently used items after this */ + + bus_dma_tag_t desc_tag; + bus_dmamap_t desc_map; + bus_addr_t ba; + int iqidx; +} __aligned(CACHE_LINE_SIZE); +#endif + struct sge { int timer_val[SGE_NTIMERS]; int counter_val[SGE_NCOUNTERS]; @@ -546,6 +660,10 @@ struct sge { int nofldrxq; /* total # of TOE rx queues */ int nofldtxq; /* total # of TOE tx queues */ #endif +#ifdef DEV_NETMAP + int nnmrxq; /* total # of netmap rx queues */ + int nnmtxq; /* total # of netmap tx queues */ +#endif int niq; /* total # of ingress queues */ int neq; /* total # of egress queues */ @@ -558,6 +676,10 @@ struct sge { struct sge_wrq *ofld_txq; /* TOE tx queues */ struct sge_ofld_rxq *ofld_rxq; /* TOE rx queues */ #endif +#ifdef DEV_NETMAP + struct sge_nm_txq *nm_txq; /* netmap tx queues */ + struct sge_nm_rxq *nm_rxq; /* netmap rx queues */ +#endif uint16_t iq_start; int eq_start; @@ -619,11 +741,12 @@ struct adapter { void *tom_softc; /* (struct tom_data *) */ struct tom_tunables tt; void *iwarp_softc; /* (struct c4iw_dev *) */ + void *iscsi_softc; #endif struct l2t_data *l2t; /* L2 table */ struct tid_info tids; - int doorbells; + uint16_t doorbells; int open_device_map; #ifdef TCP_OFFLOAD int offload_map; @@ -724,6 +847,18 @@ struct adapter { #define for_each_ofld_rxq(pi, iter, q) \ for (q = &pi->adapter->sge.ofld_rxq[pi->first_ofld_rxq], iter = 0; \ iter < pi->nofldrxq; ++iter, ++q) +#define for_each_nm_txq(pi, iter, q) \ + for (q = &pi->adapter->sge.nm_txq[pi->first_nm_txq], iter = 0; \ + iter < pi->nnmtxq; ++iter, ++q) +#define for_each_nm_rxq(pi, iter, q) \ + for (q = &pi->adapter->sge.nm_rxq[pi->first_nm_rxq], iter = 0; \ + iter < pi->nnmrxq; ++iter, ++q) + +#define IDXINCR(idx, incr, wrap) do { \ + idx = wrap - idx > incr ? idx + incr : incr - (wrap - idx); \ +} while (0) +#define IDXDIFF(head, tail, wrap) \ + ((head) >= (tail) ? (head) - (tail) : (wrap) - (tail) + (head)) /* One for errors, one for firmware events */ #define T4_EXTRA_INTR 2 @@ -848,6 +983,18 @@ int t4_register_fw_msg_handler(struct ad int t4_filter_rpl(struct sge_iq *, const struct rss_header *, struct mbuf *); int begin_synchronized_op(struct adapter *, struct port_info *, int, char *); void end_synchronized_op(struct adapter *, int); +int update_mac_settings(struct ifnet *, int); +int adapter_full_init(struct adapter *); +int adapter_full_uninit(struct adapter *); +int port_full_init(struct port_info *); +int port_full_uninit(struct port_info *); + +#ifdef DEV_NETMAP +/* t4_netmap.c */ +int create_netmap_ifnet(struct port_info *); +int destroy_netmap_ifnet(struct port_info *); +void t4_nm_intr(void *); +#endif /* t4_sge.c */ void t4_sge_modload(void); Modified: stable/10/sys/dev/cxgbe/common/common.h ============================================================================== --- stable/10/sys/dev/cxgbe/common/common.h Thu Aug 21 19:51:07 2014 (r270296) +++ stable/10/sys/dev/cxgbe/common/common.h Thu Aug 21 19:54:02 2014 (r270297) @@ -561,11 +561,11 @@ int t4_cfg_pfvf(struct adapter *adap, un unsigned int exactf, unsigned int rcaps, unsigned int wxcaps); int t4_alloc_vi_func(struct adapter *adap, unsigned int mbox, unsigned int port, unsigned int pf, unsigned int vf, - unsigned int nmac, u8 *mac, unsigned int *rss_size, + unsigned int nmac, u8 *mac, u16 *rss_size, unsigned int portfunc, unsigned int idstype); int t4_alloc_vi(struct adapter *adap, unsigned int mbox, unsigned int port, unsigned int pf, unsigned int vf, unsigned int nmac, u8 *mac, - unsigned int *rss_size); + u16 *rss_size); int t4_free_vi(struct adapter *adap, unsigned int mbox, unsigned int pf, unsigned int vf, unsigned int viid); @@ -614,8 +614,10 @@ int t4_sge_ctxt_rd_bd(struct adapter *ad int t4_sge_ctxt_flush(struct adapter *adap, unsigned int mbox); int t4_handle_fw_rpl(struct adapter *adap, const __be64 *rpl); int t4_fwaddrspace_write(struct adapter *adap, unsigned int mbox, u32 addr, u32 val); -int t4_sched_config(struct adapter *adapter, int type, int minmaxen); +int t4_sched_config(struct adapter *adapter, int type, int minmaxen, + int sleep_ok); int t4_sched_params(struct adapter *adapter, int type, int level, int mode, int rateunit, int ratemode, int channel, int cl, - int minrate, int maxrate, int weight, int pktsize); + int minrate, int maxrate, int weight, int pktsize, + int sleep_ok); #endif /* __CHELSIO_COMMON_H */ Modified: stable/10/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/10/sys/dev/cxgbe/common/t4_hw.c Thu Aug 21 19:51:07 2014 (r270296) +++ stable/10/sys/dev/cxgbe/common/t4_hw.c Thu Aug 21 19:54:02 2014 (r270297) @@ -2074,15 +2074,18 @@ static void pcie_intr_handler(struct ada int fat; - fat = t4_handle_intr_status(adapter, - A_PCIE_CORE_UTL_SYSTEM_BUS_AGENT_STATUS, - sysbus_intr_info) + - t4_handle_intr_status(adapter, - A_PCIE_CORE_UTL_PCI_EXPRESS_PORT_STATUS, - pcie_port_intr_info) + - t4_handle_intr_status(adapter, A_PCIE_INT_CAUSE, - is_t4(adapter) ? - pcie_intr_info : t5_pcie_intr_info); + if (is_t4(adapter)) + fat = t4_handle_intr_status(adapter, + A_PCIE_CORE_UTL_SYSTEM_BUS_AGENT_STATUS, + sysbus_intr_info) + + t4_handle_intr_status(adapter, + A_PCIE_CORE_UTL_PCI_EXPRESS_PORT_STATUS, + pcie_port_intr_info) + + t4_handle_intr_status(adapter, A_PCIE_INT_CAUSE, + pcie_intr_info); + else + fat = t4_handle_intr_status(adapter, A_PCIE_INT_CAUSE, + t5_pcie_intr_info); if (fat) t4_fatal_err(adapter); } @@ -2463,9 +2466,15 @@ static void ma_intr_handler(struct adapt { u32 v, status = t4_read_reg(adapter, A_MA_INT_CAUSE); - if (status & F_MEM_PERR_INT_CAUSE) + if (status & F_MEM_PERR_INT_CAUSE) { CH_ALERT(adapter, "MA parity error, parity status %#x\n", - t4_read_reg(adapter, A_MA_PARITY_ERROR_STATUS)); + t4_read_reg(adapter, A_MA_PARITY_ERROR_STATUS1)); + if (is_t5(adapter)) + CH_ALERT(adapter, + "MA parity error, parity status %#x\n", + t4_read_reg(adapter, + A_MA_PARITY_ERROR_STATUS2)); + } if (status & F_MEM_WRAP_INT_CAUSE) { v = t4_read_reg(adapter, A_MA_INT_WRAP_STATUS); CH_ALERT(adapter, "MA address wrap-around error by client %u to" @@ -2682,10 +2691,8 @@ void t4_intr_clear(struct adapter *adapt { static const unsigned int cause_reg[] = { A_SGE_INT_CAUSE1, A_SGE_INT_CAUSE2, A_SGE_INT_CAUSE3, - A_PCIE_CORE_UTL_SYSTEM_BUS_AGENT_STATUS, - A_PCIE_CORE_UTL_PCI_EXPRESS_PORT_STATUS, A_PCIE_NONFAT_ERR, A_PCIE_INT_CAUSE, - A_MA_INT_WRAP_STATUS, A_MA_PARITY_ERROR_STATUS, A_MA_INT_CAUSE, + A_MA_INT_WRAP_STATUS, A_MA_PARITY_ERROR_STATUS1, A_MA_INT_CAUSE, A_EDC_INT_CAUSE, EDC_REG(A_EDC_INT_CAUSE, 1), A_CIM_HOST_INT_CAUSE, A_CIM_HOST_UPACC_INT_CAUSE, MYPF_REG(A_CIM_PF_HOST_INT_CAUSE), @@ -2707,6 +2714,14 @@ void t4_intr_clear(struct adapter *adapt t4_write_reg(adapter, is_t4(adapter) ? A_MC_INT_CAUSE : A_MC_P_INT_CAUSE, 0xffffffff); + if (is_t4(adapter)) { + t4_write_reg(adapter, A_PCIE_CORE_UTL_SYSTEM_BUS_AGENT_STATUS, + 0xffffffff); + t4_write_reg(adapter, A_PCIE_CORE_UTL_PCI_EXPRESS_PORT_STATUS, + 0xffffffff); + } else + t4_write_reg(adapter, A_MA_PARITY_ERROR_STATUS2, 0xffffffff); + t4_write_reg(adapter, A_PL_INT_CAUSE, GLBL_INTR_MASK); (void) t4_read_reg(adapter, A_PL_INT_CAUSE); /* flush */ } @@ -4874,7 +4889,7 @@ int t4_cfg_pfvf(struct adapter *adap, un */ int t4_alloc_vi_func(struct adapter *adap, unsigned int mbox, unsigned int port, unsigned int pf, unsigned int vf, - unsigned int nmac, u8 *mac, unsigned int *rss_size, + unsigned int nmac, u8 *mac, u16 *rss_size, unsigned int portfunc, unsigned int idstype) { int ret; @@ -4929,7 +4944,7 @@ int t4_alloc_vi_func(struct adapter *ada */ int t4_alloc_vi(struct adapter *adap, unsigned int mbox, unsigned int port, unsigned int pf, unsigned int vf, unsigned int nmac, u8 *mac, - unsigned int *rss_size) + u16 *rss_size) { return t4_alloc_vi_func(adap, mbox, port, pf, vf, nmac, mac, rss_size, FW_VI_FUNC_ETH, 0); @@ -5671,7 +5686,7 @@ int __devinit t4_port_init(struct port_i u8 addr[6]; int ret, i, j; struct fw_port_cmd c; - unsigned int rss_size; + u16 rss_size; adapter_t *adap = p->adapter; memset(&c, 0, sizeof(c)); @@ -5714,7 +5729,8 @@ int __devinit t4_port_init(struct port_i return 0; } -int t4_sched_config(struct adapter *adapter, int type, int minmaxen) +int t4_sched_config(struct adapter *adapter, int type, int minmaxen, + int sleep_ok) { struct fw_sched_cmd cmd; @@ -5729,12 +5745,13 @@ int t4_sched_config(struct adapter *adap cmd.u.config.minmaxen = minmaxen; return t4_wr_mbox_meat(adapter,adapter->mbox, &cmd, sizeof(cmd), - NULL, 1); + NULL, sleep_ok); } int t4_sched_params(struct adapter *adapter, int type, int level, int mode, int rateunit, int ratemode, int channel, int cl, - int minrate, int maxrate, int weight, int pktsize) + int minrate, int maxrate, int weight, int pktsize, + int sleep_ok) { struct fw_sched_cmd cmd; @@ -5758,5 +5775,5 @@ int t4_sched_params(struct adapter *adap cmd.u.params.pktsize = cpu_to_be16(pktsize); return t4_wr_mbox_meat(adapter,adapter->mbox, &cmd, sizeof(cmd), - NULL, 1); + NULL, sleep_ok); } Modified: stable/10/sys/dev/cxgbe/offload.h ============================================================================== --- stable/10/sys/dev/cxgbe/offload.h Thu Aug 21 19:51:07 2014 (r270296) +++ stable/10/sys/dev/cxgbe/offload.h Thu Aug 21 19:54:02 2014 (r270297) @@ -153,6 +153,6 @@ int t4_register_uld(struct uld_info *); int t4_unregister_uld(struct uld_info *); int t4_activate_uld(struct adapter *, int); int t4_deactivate_uld(struct adapter *, int); +void t4_iscsi_init(struct ifnet *, unsigned int, const unsigned int *); #endif - #endif Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Thu Aug 21 19:51:07 2014 (r270296) +++ stable/10/sys/dev/cxgbe/t4_main.c Thu Aug 21 19:54:02 2014 (r270297) @@ -218,6 +218,24 @@ static int t4_nofldrxq1g = -1; TUNABLE_INT("hw.cxgbe.nofldrxq1g", &t4_nofldrxq1g); #endif +#ifdef DEV_NETMAP +#define NNMTXQ_10G 2 +static int t4_nnmtxq10g = -1; +TUNABLE_INT("hw.cxgbe.nnmtxq10g", &t4_nnmtxq10g); + +#define NNMRXQ_10G 2 +static int t4_nnmrxq10g = -1; +TUNABLE_INT("hw.cxgbe.nnmrxq10g", &t4_nnmrxq10g); + +#define NNMTXQ_1G 1 +static int t4_nnmtxq1g = -1; +TUNABLE_INT("hw.cxgbe.nnmtxq1g", &t4_nnmtxq1g); + +#define NNMRXQ_1G 1 +static int t4_nnmrxq1g = -1; +TUNABLE_INT("hw.cxgbe.nnmrxq1g", &t4_nnmrxq1g); +#endif + /* * Holdoff parameters for 10G and 1G ports. */ @@ -295,19 +313,26 @@ static int t5_write_combine = 0; TUNABLE_INT("hw.cxl.write_combine", &t5_write_combine); struct intrs_and_queues { - int intr_type; /* INTx, MSI, or MSI-X */ - int nirq; /* Number of vectors */ - int intr_flags; - int ntxq10g; /* # of NIC txq's for each 10G port */ - int nrxq10g; /* # of NIC rxq's for each 10G port */ - int ntxq1g; /* # of NIC txq's for each 1G port */ - int nrxq1g; /* # of NIC rxq's for each 1G port */ - int rsrv_noflowq; /* Flag whether to reserve queue 0 */ + uint16_t intr_type; /* INTx, MSI, or MSI-X */ + uint16_t nirq; /* Total # of vectors */ + uint16_t intr_flags_10g;/* Interrupt flags for each 10G port */ + uint16_t intr_flags_1g; /* Interrupt flags for each 1G port */ + uint16_t ntxq10g; /* # of NIC txq's for each 10G port */ + uint16_t nrxq10g; /* # of NIC rxq's for each 10G port */ + uint16_t ntxq1g; /* # of NIC txq's for each 1G port */ + uint16_t nrxq1g; /* # of NIC rxq's for each 1G port */ + uint16_t rsrv_noflowq; /* Flag whether to reserve queue 0 */ #ifdef TCP_OFFLOAD - int nofldtxq10g; /* # of TOE txq's for each 10G port */ - int nofldrxq10g; /* # of TOE rxq's for each 10G port */ - int nofldtxq1g; /* # of TOE txq's for each 1G port */ - int nofldrxq1g; /* # of TOE rxq's for each 1G port */ + uint16_t nofldtxq10g; /* # of TOE txq's for each 10G port */ + uint16_t nofldrxq10g; /* # of TOE rxq's for each 10G port */ + uint16_t nofldtxq1g; /* # of TOE txq's for each 1G port */ + uint16_t nofldrxq1g; /* # of TOE rxq's for each 1G port */ +#endif +#ifdef DEV_NETMAP + uint16_t nnmtxq10g; /* # of netmap txq's for each 10G port */ + uint16_t nnmrxq10g; /* # of netmap rxq's for each 10G port */ + uint16_t nnmtxq1g; /* # of netmap txq's for each 1G port */ + uint16_t nnmrxq1g; /* # of netmap rxq's for each 1G port */ #endif }; @@ -321,17 +346,6 @@ struct filter_entry { struct t4_filter_specification fs; }; -enum { - XGMAC_MTU = (1 << 0), - XGMAC_PROMISC = (1 << 1), - XGMAC_ALLMULTI = (1 << 2), - XGMAC_VLANEX = (1 << 3), - XGMAC_UCADDR = (1 << 4), - XGMAC_MCADDRS = (1 << 5), - - XGMAC_ALL = 0xffff -}; - static int map_bars_0_and_4(struct adapter *); static int map_bar_2(struct adapter *); static void setup_memwin(struct adapter *); @@ -350,15 +364,10 @@ static int get_params__pre_init(struct a static int get_params__post_init(struct adapter *); static int set_params__post_init(struct adapter *); static void t4_set_desc(struct adapter *); -static void build_medialist(struct port_info *); -static int update_mac_settings(struct port_info *, int); +static void build_medialist(struct port_info *, struct ifmedia *); static int cxgbe_init_synchronized(struct port_info *); static int cxgbe_uninit_synchronized(struct port_info *); static int setup_intr_handlers(struct adapter *); -static int adapter_full_init(struct adapter *); -static int adapter_full_uninit(struct adapter *); -static int port_full_init(struct port_info *); -static int port_full_uninit(struct port_info *); static void quiesce_eq(struct adapter *, struct sge_eq *); static void quiesce_iq(struct adapter *, struct sge_iq *); static void quiesce_fl(struct adapter *, struct sge_fl *); @@ -556,6 +565,9 @@ t4_attach(device_t dev) #ifdef TCP_OFFLOAD int ofld_rqidx, ofld_tqidx; #endif +#ifdef DEV_NETMAP + int nm_rqidx, nm_tqidx; +#endif sc = device_get_softc(dev); sc->dev = dev; @@ -684,6 +696,13 @@ t4_attach(device_t dev) sc->port[i] = NULL; goto done; } + rc = -t4_link_start(sc, sc->mbox, pi->tx_chan, &pi->link_cfg); + if (rc != 0) { + device_printf(dev, "port %d l1cfg failed: %d\n", i, rc); + free(pi, M_CXGBE); + sc->port[i] = NULL; + goto done; + } snprintf(pi->lockname, sizeof(pi->lockname), "%sp%d", device_get_nameunit(dev), i); @@ -725,7 +744,6 @@ t4_attach(device_t dev) sc->intr_type = iaq.intr_type; sc->intr_count = iaq.nirq; - sc->flags |= iaq.intr_flags; s = &sc->sge; s->nrxq = n10g * iaq.nrxq10g + n1g * iaq.nrxq1g; @@ -733,10 +751,8 @@ t4_attach(device_t dev) s->neq = s->ntxq + s->nrxq; /* the free list in an rxq is an eq */ s->neq += sc->params.nports + 1;/* ctrl queues: 1 per port + 1 mgmt */ s->niq = s->nrxq + 1; /* 1 extra for firmware event queue */ - #ifdef TCP_OFFLOAD if (is_offload(sc)) { - s->nofldrxq = n10g * iaq.nofldrxq10g + n1g * iaq.nofldrxq1g; s->nofldtxq = n10g * iaq.nofldtxq10g + n1g * iaq.nofldtxq1g; s->neq += s->nofldtxq + s->nofldrxq; @@ -748,6 +764,17 @@ t4_attach(device_t dev) M_CXGBE, M_ZERO | M_WAITOK); } #endif +#ifdef DEV_NETMAP + s->nnmrxq = n10g * iaq.nnmrxq10g + n1g * iaq.nnmrxq1g; + s->nnmtxq = n10g * iaq.nnmtxq10g + n1g * iaq.nnmtxq1g; + s->neq += s->nnmtxq + s->nnmrxq; + s->niq += s->nnmrxq; + + s->nm_rxq = malloc(s->nnmrxq * sizeof(struct sge_nm_rxq), + M_CXGBE, M_ZERO | M_WAITOK); + s->nm_txq = malloc(s->nnmtxq * sizeof(struct sge_nm_txq), + M_CXGBE, M_ZERO | M_WAITOK); +#endif s->ctrlq = malloc(sc->params.nports * sizeof(struct sge_wrq), M_CXGBE, M_ZERO | M_WAITOK); @@ -773,6 +800,9 @@ t4_attach(device_t dev) #ifdef TCP_OFFLOAD ofld_rqidx = ofld_tqidx = 0; #endif +#ifdef DEV_NETMAP + nm_rqidx = nm_tqidx = 0; +#endif for_each_port(sc, i) { struct port_info *pi = sc->port[i]; @@ -782,9 +812,11 @@ t4_attach(device_t dev) pi->first_rxq = rqidx; pi->first_txq = tqidx; if (is_10G_port(pi) || is_40G_port(pi)) { + pi->flags |= iaq.intr_flags_10g; pi->nrxq = iaq.nrxq10g; pi->ntxq = iaq.ntxq10g; } else { + pi->flags |= iaq.intr_flags_1g; pi->nrxq = iaq.nrxq1g; pi->ntxq = iaq.ntxq1g; } @@ -796,7 +828,6 @@ t4_attach(device_t dev) rqidx += pi->nrxq; tqidx += pi->ntxq; - #ifdef TCP_OFFLOAD if (is_offload(sc)) { pi->first_ofld_rxq = ofld_rqidx; @@ -812,6 +843,19 @@ t4_attach(device_t dev) ofld_tqidx += pi->nofldtxq; } #endif +#ifdef DEV_NETMAP + pi->first_nm_rxq = nm_rqidx; + pi->first_nm_txq = nm_tqidx; + if (is_10G_port(pi) || is_40G_port(pi)) { + pi->nnmrxq = iaq.nnmrxq10g; + pi->nnmtxq = iaq.nnmtxq10g; + } else { + pi->nnmrxq = iaq.nnmrxq1g; + pi->nnmtxq = iaq.nnmtxq1g; + } + nm_rqidx += pi->nnmrxq; + nm_tqidx += pi->nnmtxq; +#endif } rc = setup_intr_handlers(sc); @@ -886,7 +930,7 @@ t4_detach(device_t dev) for (i = 0; i < MAX_NPORTS; i++) { pi = sc->port[i]; if (pi) { - t4_free_vi(pi->adapter, sc->mbox, sc->pf, 0, pi->viid); + t4_free_vi(sc, sc->mbox, sc->pf, 0, pi->viid); if (pi->dev) device_delete_child(dev, pi->dev); @@ -923,6 +967,10 @@ t4_detach(device_t dev) free(sc->sge.ofld_rxq, M_CXGBE); free(sc->sge.ofld_txq, M_CXGBE); #endif +#ifdef DEV_NETMAP + free(sc->sge.nm_rxq, M_CXGBE); + free(sc->sge.nm_txq, M_CXGBE); +#endif free(sc->irq, M_CXGBE); free(sc->sge.rxq, M_CXGBE); free(sc->sge.txq, M_CXGBE); @@ -950,7 +998,6 @@ t4_detach(device_t dev) return (0); } - static int cxgbe_probe(device_t dev) { @@ -973,6 +1020,8 @@ cxgbe_attach(device_t dev) { struct port_info *pi = device_get_softc(dev); struct ifnet *ifp; + char *s; + int n, o; /* Allocate an ifnet and set it up */ ifp = if_alloc(IFT_ETHER); @@ -1005,22 +1054,39 @@ cxgbe_attach(device_t dev) /* Initialize ifmedia for this port */ ifmedia_init(&pi->media, IFM_IMASK, cxgbe_media_change, cxgbe_media_status); - build_medialist(pi); + build_medialist(pi, &pi->media); pi->vlan_c = EVENTHANDLER_REGISTER(vlan_config, cxgbe_vlan_config, ifp, EVENTHANDLER_PRI_ANY); ether_ifattach(ifp, pi->hw_addr); + n = 128; + s = malloc(n, M_CXGBE, M_WAITOK); + o = snprintf(s, n, "%d txq, %d rxq (NIC)", pi->ntxq, pi->nrxq); + MPASS(n > o); #ifdef TCP_OFFLOAD if (is_offload(pi->adapter)) { - device_printf(dev, - "%d txq, %d rxq (NIC); %d txq, %d rxq (TOE)\n", - pi->ntxq, pi->nrxq, pi->nofldtxq, pi->nofldrxq); - } else + o += snprintf(s + o, n - o, "; %d txq, %d rxq (TOE)", + pi->nofldtxq, pi->nofldrxq); + MPASS(n > o); + } +#endif +#ifdef DEV_NETMAP + o += snprintf(s + o, n - o, "; %d txq, %d rxq (netmap)", pi->nnmtxq, + pi->nnmrxq); + MPASS(n > o); +#endif + device_printf(dev, "%s\n", s); + free(s, M_CXGBE); + +#ifdef DEV_NETMAP + /* nm_media handled here to keep implementation private to this file */ + ifmedia_init(&pi->nm_media, IFM_IMASK, cxgbe_media_change, + cxgbe_media_status); + build_medialist(pi, &pi->nm_media); + create_netmap_ifnet(pi); /* logs errors it something fails */ #endif - device_printf(dev, "%d txq, %d rxq\n", pi->ntxq, pi->nrxq); - cxgbe_sysctls(pi); return (0); @@ -1068,6 +1134,11 @@ cxgbe_detach(device_t dev) ether_ifdetach(pi->ifp); if_free(pi->ifp); +#ifdef DEV_NETMAP + /* XXXNM: equivalent of cxgbe_uninit_synchronized to ifdown nm_ifp */ + destroy_netmap_ifnet(pi); +#endif + ADAPTER_LOCK(sc); CLR_BUSY(sc); wakeup(&sc->flags); @@ -1091,7 +1162,7 @@ cxgbe_init(void *arg) static int cxgbe_ioctl(struct ifnet *ifp, unsigned long cmd, caddr_t data) { - int rc = 0, mtu, flags; + int rc = 0, mtu, flags, can_sleep; struct port_info *pi = ifp->if_softc; struct adapter *sc = pi->adapter; struct ifreq *ifr = (struct ifreq *)data; @@ -1110,13 +1181,16 @@ cxgbe_ioctl(struct ifnet *ifp, unsigned if (pi->flags & PORT_INIT_DONE) { t4_update_fl_bufsize(ifp); if (ifp->if_drv_flags & IFF_DRV_RUNNING) - rc = update_mac_settings(pi, XGMAC_MTU); + rc = update_mac_settings(ifp, XGMAC_MTU); } end_synchronized_op(sc, 0); break; case SIOCSIFFLAGS: - rc = begin_synchronized_op(sc, pi, SLEEP_OK | INTR_OK, "t4flg"); + can_sleep = 0; +redo_sifflags: + rc = begin_synchronized_op(sc, pi, + can_sleep ? (SLEEP_OK | INTR_OK) : HOLD_LOCK, "t4flg"); if (rc) return (rc); @@ -1125,24 +1199,41 @@ cxgbe_ioctl(struct ifnet *ifp, unsigned flags = pi->if_flags; if ((ifp->if_flags ^ flags) & (IFF_PROMISC | IFF_ALLMULTI)) { - rc = update_mac_settings(pi, + if (can_sleep == 1) { + end_synchronized_op(sc, 0); + can_sleep = 0; + goto redo_sifflags; + } + rc = update_mac_settings(ifp, XGMAC_PROMISC | XGMAC_ALLMULTI); } - } else + } else { + if (can_sleep == 0) { + end_synchronized_op(sc, LOCK_HELD); + can_sleep = 1; + goto redo_sifflags; + } rc = cxgbe_init_synchronized(pi); + } pi->if_flags = ifp->if_flags; - } else if (ifp->if_drv_flags & IFF_DRV_RUNNING) + } else if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + if (can_sleep == 0) { + end_synchronized_op(sc, LOCK_HELD); + can_sleep = 1; + goto redo_sifflags; + } rc = cxgbe_uninit_synchronized(pi); - end_synchronized_op(sc, 0); + } + end_synchronized_op(sc, can_sleep ? 0 : LOCK_HELD); break; - case SIOCADDMULTI: + case SIOCADDMULTI: case SIOCDELMULTI: /* these two are called with a mutex held :-( */ rc = begin_synchronized_op(sc, pi, HOLD_LOCK, "t4multi"); if (rc) return (rc); if (ifp->if_drv_flags & IFF_DRV_RUNNING) - rc = update_mac_settings(pi, XGMAC_MCADDRS); + rc = update_mac_settings(ifp, XGMAC_MCADDRS); end_synchronized_op(sc, LOCK_HELD); break; @@ -1231,7 +1322,7 @@ cxgbe_ioctl(struct ifnet *ifp, unsigned if (mask & IFCAP_VLAN_HWTAGGING) { ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; if (ifp->if_drv_flags & IFF_DRV_RUNNING) - rc = update_mac_settings(pi, XGMAC_VLANEX); + rc = update_mac_settings(ifp, XGMAC_VLANEX); } if (mask & IFCAP_VLAN_MTU) { ifp->if_capenable ^= IFCAP_VLAN_MTU; @@ -1366,13 +1457,23 @@ static void cxgbe_media_status(struct ifnet *ifp, struct ifmediareq *ifmr) { struct port_info *pi = ifp->if_softc; - struct ifmedia_entry *cur = pi->media.ifm_cur; + struct ifmedia *media = NULL; + struct ifmedia_entry *cur; int speed = pi->link_cfg.speed; int data = (pi->port_type << 8) | pi->mod_type; + if (ifp == pi->ifp) + media = &pi->media; +#ifdef DEV_NETMAP + else if (ifp == pi->nm_ifp) + media = &pi->nm_media; +#endif + MPASS(media != NULL); + + cur = media->ifm_cur; if (cur->ifm_data != data) { - build_medialist(pi); - cur = pi->media.ifm_cur; + build_medialist(pi, media); + cur = media->ifm_cur; } ifmr->ifm_status = IFM_AVALID; @@ -1725,6 +1826,7 @@ cfg_itype_and_nqueues(struct adapter *sc { int rc, itype, navail, nrxq10g, nrxq1g, n; int nofldrxq10g = 0, nofldrxq1g = 0; + int nnmrxq10g = 0, nnmrxq1g = 0; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From np at FreeBSD.org Thu Aug 21 19:58:47 2014 From: np at FreeBSD.org (Navdeep Parhar) Date: Thu, 21 Aug 2014 19:58:47 +0000 (UTC) Subject: svn commit: r270298 - stable/10/sys/dev/netmap Message-ID: <201408211958.s7LJwlwr055044@svn.freebsd.org> Author: np Date: Thu Aug 21 19:58:46 2014 New Revision: 270298 URL: http://svnweb.freebsd.org/changeset/base/270298 Log: MFC r270253: Change netmap's global lock to sx instead of a mutex. Modified: stable/10/sys/dev/netmap/netmap_kern.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/netmap/netmap_kern.h ============================================================================== --- stable/10/sys/dev/netmap/netmap_kern.h Thu Aug 21 19:54:02 2014 (r270297) +++ stable/10/sys/dev/netmap/netmap_kern.h Thu Aug 21 19:58:46 2014 (r270298) @@ -44,13 +44,13 @@ #define unlikely(x) __builtin_expect((long)!!(x), 0L) #define NM_LOCK_T struct mtx -#define NMG_LOCK_T struct mtx -#define NMG_LOCK_INIT() mtx_init(&netmap_global_lock, \ - "netmap global lock", NULL, MTX_DEF) -#define NMG_LOCK_DESTROY() mtx_destroy(&netmap_global_lock) -#define NMG_LOCK() mtx_lock(&netmap_global_lock) -#define NMG_UNLOCK() mtx_unlock(&netmap_global_lock) -#define NMG_LOCK_ASSERT() mtx_assert(&netmap_global_lock, MA_OWNED) +#define NMG_LOCK_T struct sx +#define NMG_LOCK_INIT() sx_init(&netmap_global_lock, \ + "netmap global lock") +#define NMG_LOCK_DESTROY() sx_destroy(&netmap_global_lock) +#define NMG_LOCK() sx_xlock(&netmap_global_lock) +#define NMG_UNLOCK() sx_xunlock(&netmap_global_lock) +#define NMG_LOCK_ASSERT() sx_assert(&netmap_global_lock, SA_XLOCKED) #define NM_SELINFO_T struct selinfo #define MBUF_LEN(m) ((m)->m_pkthdr.len) From ian at FreeBSD.org Thu Aug 21 21:36:07 2014 From: ian at FreeBSD.org (Ian Lepore) Date: Thu, 21 Aug 2014 21:36:07 +0000 (UTC) Subject: svn commit: r270306 - stable/10/sys/modules/aic7xxx/ahc/ahc_eisa Message-ID: <201408212136.s7LLa7cu001694@svn.freebsd.org> Author: ian Date: Thu Aug 21 21:36:06 2014 New Revision: 270306 URL: http://svnweb.freebsd.org/changeset/base/270306 Log: This module requires pci_if.h, add it to the SRCS list. We haven't noticed that it was missing because eisa has been disabled for a while in -current, but it became apparent when some parallel-build stuff was MFC'd to 10-stable and this module failed to build there. Modified: stable/10/sys/modules/aic7xxx/ahc/ahc_eisa/Makefile Modified: stable/10/sys/modules/aic7xxx/ahc/ahc_eisa/Makefile ============================================================================== --- stable/10/sys/modules/aic7xxx/ahc/ahc_eisa/Makefile Thu Aug 21 21:05:58 2014 (r270305) +++ stable/10/sys/modules/aic7xxx/ahc/ahc_eisa/Makefile Thu Aug 21 21:36:06 2014 (r270306) @@ -5,7 +5,7 @@ KMOD= ahc_eisa SRCS= ahc_eisa.c -SRCS+= device_if.h bus_if.h eisa_if.h +SRCS+= device_if.h bus_if.h eisa_if.h pci_if.h SRCS+= opt_scsi.h opt_cam.h opt_aic7xxx.h CFLAGS+= -I${.CURDIR}/../../../../dev/aic7xxx -I.. From se at FreeBSD.org Thu Aug 21 21:48:35 2014 From: se at FreeBSD.org (Stefan Esser) Date: Thu, 21 Aug 2014 21:48:34 +0000 (UTC) Subject: svn commit: r270307 - stable/10/share/syscons/keymaps Message-ID: <201408212148.s7LLmYwa006646@svn.freebsd.org> Author: se Date: Thu Aug 21 21:48:33 2014 New Revision: 270307 URL: http://svnweb.freebsd.org/changeset/base/270307 Log: MFC 270153, 270098: Apply a fixes to problems found while converting to NEWCONS. Modified: stable/10/share/syscons/keymaps/INDEX.keymaps stable/10/share/syscons/keymaps/be.iso.acc.kbd stable/10/share/syscons/keymaps/cs.latin2.qwertz.kbd stable/10/share/syscons/keymaps/uk.iso-ctrl.kbd stable/10/share/syscons/keymaps/uk.iso.kbd Modified: stable/10/share/syscons/keymaps/INDEX.keymaps ============================================================================== --- stable/10/share/syscons/keymaps/INDEX.keymaps Thu Aug 21 21:36:06 2014 (r270306) +++ stable/10/share/syscons/keymaps/INDEX.keymaps Thu Aug 21 21:48:33 2014 (r270307) @@ -4,7 +4,7 @@ # # Format :: # -# lang: ar bg cs da de el en es fi fr hr hu hy is it iw ja kk ko nl no pl +# lang: ar bg cs da de el en es fi fr he hr hu hy is it ja kk ko nl no pl # pt ro ru sh sk sl sv tr uk zh # lang: lang,lang # @@ -27,7 +27,7 @@ MENU:fr:Choisissez la nationalit? de vot MENU:pl:Wybierz uk?ad klawiatury MENU:pt:Escolha o layout do teclado MENU:es:Seleccione el idioma de su teclado -MENU:iw:??? ?????? ??? ?? ??? +MENU:he:??? ?????? ??? ?? ??? MENU:uk:B??????? ????????? ?????????? MENU:el:???????? ?? ???????????? ??? ???????? MENU:hy:?????? ?????????? ??????????????? @@ -36,7 +36,7 @@ FONT:en:cp437-8x16.fnt FONT:de,fr,da,no,sv,pt,es:iso-8x16.fnt FONT:ru:koi8-r-8x16.fnt FONT:pl:iso02-8x16.fnt -FONT:iw:iso08-8x16.fnt +FONT:he:iso08-8x16.fnt FONT:uk:koi8-u-8x16.fnt FONT:el:iso07-8x16.fnt FONT:hy:haik8-8x16.fnt @@ -52,8 +52,10 @@ be.iso.acc.kbd:fr:Belge ISO-8859-1 (avec be.iso.acc.kbd:pt:Belga ISO-8859-1 (com acentos) be.iso.acc.kbd:es:Belga ISO-8859-1 (con acentos) -bg.bds.ctrlcaps.kbd:bg:Bulgarian BDS -bg.phonetic.ctrlcaps.kbd:bg:Bulgarian Phonetic +bg.bds.ctrlcaps.kbd:en:Bulgarian (BDS) +bg.bds.ctrlcaps.kbd:de:Bulgarisch (BDS) +bg.phonetic.ctrlcaps.kbd:en:Bulgarian (Phonetic) +bg.phonetic.ctrlcaps.kbd:de:Bulgarisch (phonetisch) br275.iso.kbd:en:Brazilian 275 ISO-8859-1 br275.iso.kbd:de:Brasilianisch 275 ISO-8859-1 @@ -74,10 +76,13 @@ br275.cp850.kbd:pt:Brasileiro 275 Codepa br275.cp850.kbd:es:Brasile?o 275 Codepage 850 by.cp1131.kbd:en:Belarusian Codepage 1131 +by.cp1131.kbd:de:Wei?russisch Code page 1131 by.cp1131.kbd:fr:Bi?lorusse Code page 1131 +by.cp1251.kbd:de:Wei?russisch Codepage 1251 by.cp1251.kbd:en:Belarusian Codepage 1251 by.cp1251.kbd:fr:Bi?lorusse Code page 1251 by.iso5.kbd:en:Belarusian ISO-8859-5 +by.iso5.kbd:de:Wei?russisch ISO-8859-5 by.iso5.kbd:fr:Bi?lorusse ISO-8859-5 ce.iso2.kbd:en:Central European ISO-8859-2 @@ -88,6 +93,7 @@ ce.iso2.kbd:es:Centroeuropeo ISO-8859-2 colemak.iso15.acc.kbd:en:Colemak ergonomic alternative cs.latin2.qwertz.kbd:en:Czech ISO-8859-2 (QWERTZ, accent keys) +cs.latin2.qwertz.kbd:de:Tschechisch ISO-8859-2 (QWERTZ, mit Akzenten) cs.latin2.qwertz.kbd:fr:Tch?que ISO-8859-2 (QWERTZ, avec accents) cs.latin2.qwertz.kbd:es:Checo ISO-8859-2 (QWERTZ, con acentos) @@ -118,8 +124,14 @@ danish.cp865.kbd:pt:Dinamarqu?s Codepage danish.cp865.kbd:es:Dan?s Codepage 865 danish.iso.macbook.kbd:da:Danish ISO-8859-1 (macbook) +danish.iso.macbook.kbd:da:Dansk ISO-8859-1 (macbook) +danish.iso.macbook.kbd:de:D?nisch ISO-8859-1 (Macbook) +danish.iso.macbook.kbd:fr:Danois ISO-8859-1 (macbook) +danish.iso.macbook.kbd:pt:Dinamarqu?s ISO-8859-1 (macbook) +danish.iso.macbook.kbd:es:Dan?s ISO-8859-1 (macbook) dutch.iso.acc.kbd:en:Dutch ISO keymap (accent keys) +dutch.iso.acc.kbd:de:Holl?ndisch (mit Akzenten) eee_nordic.kbd:en:Nordic layout on Asus eeePC eee_nordic.kbd:fr:Norv?gien phon?tique sur Asus eeePC @@ -193,19 +205,19 @@ fr_CA.iso.acc.kbd:fr:Fran?ais Canadien I fr_CA.iso.acc.kbd:es:Francocanadiense ISO-8859-1 (con acentos) fr_CA.iso.acc.kbd:uk:??????????-????????? ISO-8859-1 (accent keys) -german.iso.kbd:en:German ISO-8859-1 -german.iso.kbd:de:Deutsch ISO-8859-1 -german.iso.kbd:fr:Allemand ISO-8859-1 -german.iso.kbd:pt:Alem?o ISO-8859-1 -german.iso.kbd:es:Alem?n ISO-8859-1 -german.iso.kbd:uk:???????? ISO-8859-1 - -german.iso.acc.kbd:en:German ISO-8859-1 (accent keys) -german.iso.acc.kbd:de:Deutsch ISO-8859-1 (mit Akzenten) -german.iso.acc.kbd:fr:Allemand ISO-8859-1 (avec accents) -german.iso.acc.kbd:pt:Alem?o ISO-8859-1 (com acentos) -german.iso.acc.kbd:es:Alem?n ISO-8859-1 (con acentos) -german.iso.acc.kbd:uk:???????? ISO-8859-1 (accent keys) +german.iso.kbd:en:German ISO-8859-15 +german.iso.kbd:de:Deutsch ISO-8859-15 +german.iso.kbd:fr:Allemand ISO-8859-15 +german.iso.kbd:pt:Alem?o ISO-8859-15 +german.iso.kbd:es:Alem?n ISO-8859-15 +german.iso.kbd:uk:???????? ISO-8859-15 + +german.iso.acc.kbd:en:German ISO-8859-15 (accent keys) +german.iso.acc.kbd:de:Deutsch ISO-8859-15 (mit Akzenten) +german.iso.acc.kbd:fr:Allemand ISO-8859-15 (avec accents) +german.iso.acc.kbd:pt:Alem?o ISO-8859-15 (com acentos) +german.iso.acc.kbd:es:Alem?n ISO-8859-15 (con acentos) +german.iso.acc.kbd:uk:???????? ISO-8859-15 (accent keys) german.cp850.kbd:en:German Codepage 850 german.cp850.kbd:de:Deutsch Codeseite 850 @@ -215,14 +227,17 @@ german.cp850.kbd:es:Alem?n Codepage 850 german.cp850.kbd:uk:???????? CP-850 gr.elot.acc.kbd:en:Greek ISO-8859-7 ELOT +gr.elot.acc.kbd:de:Grieschisch ISO-8859-7 ELOT gr.elot.acc.kbd:fr:Grec ISO-8859-7 ELOT gr.elot.acc.kbd:el:???????? ISO-8859-7 ???? gr.us101.acc.kbd:en:Greek ISO-8859-7 (101 keys) +gr.us101.acc.kbd:de:Grieschisch ISO-8859-7 (101 Tasten) gr.us101.acc.kbd:fr:Grec ISO-8859-7 (101 touches) gr.us101.acc.kbd:el:???????? ISO-8859-7 (101 ????????) iw.iso8.kbd:en:Hebrew ISO-8859-8 +iw.iso8.kbd:de:Hebr?isch ISO-8859-8 iw.iso8.kbd:fr:H?breu ISO-8859-8 iw.iso8.kbd:he:ISO-8859-8 ????? @@ -280,15 +295,25 @@ jp.106x.kbd:es:Japon?s 106x jp.106x.kbd:uk:???????? 106x jp.pc98.kbd:en:Japanese PC-98x1 +jp.pc98.kbd:de:Japanisch PC-98x1 jp.pc98.kbd:fr:Japonais PC-98x1 +jp.pc98.kbd:pt:Japon?s PC-98x1 +jp.pc98.kbd:es:Japon?s PC-98x1 +jp.pc98.kbd:uk:???????? PC-98x1 jp.pc98.iso.kbd:en:Japanese PC-98x1 (ISO) +jp.pc98.iso.kbd:de:Japanisch PC-98x1 (ISO) jp.pc98.iso.kbd:fr:Japonais PC-98x1 (ISO) +jp.pc98.iso.kbd:pt:Japon?s PC-98x1 (ISO) +jp.pc98.iso.kbd:es:Japon?s PC-98x1 (ISO) +jp.pc98.iso.kbd:uk:???????? PC-98x1 (ISO) kk.pt154.kst.kbd:en:Kazakh PT154 codepage +kk.pt154.kst.kbd:de:Kasachisch PT154 codepage kk.pt154.kst.kbd:fr:Kazakh PT154 code page -kk.pt154.io.kbd:en:Kazakh PT154 codepage -kk.pt154.io.kbd:fr:Kazakh PT154 code page +kk.pt154.io.kbd:en:Kazakh PT154 codepage (with IO) +kk.pt154.io.kbd:de:Kasachisch PT154 codepage (mit IO) +kk.pt154.io.kbd:fr:Kazakh PT154 code page (avec IO) latinamerican.kbd:en:Latin American latinamerican.kbd:de:Latein Amerikanisch @@ -301,6 +326,7 @@ latinamerican.iso.acc.kbd:fr:Am?rique la latinamerican.iso.acc.kbd:pt,es:Am?rica Latina (com acentos) lt.iso4.kbd:en:Lithuanian ISO-8859-4 +lt.iso4.kbd:de:Litauisch ISO-8859-4 lt.iso4.kbd:fr:Lithuanien ISO-8859-4 lt.iso4.kbd:es:Lituano ISO-8859-4 @@ -310,6 +336,7 @@ norwegian.iso.kbd:de:Norwegisch ISO-8859 norwegian.iso.kbd:fr:Norv?gien ISO-8859-1 norwegian.iso.kbd:pt:Noruegu?s ISO-8859-1 norwegian.iso.kbd:es:Noruego ISO-8859-1 + norwegian.dvorak.kbd:en:Norwegian dvorak norwegian.dvorak.kbd:no:Norsk dvorak norwegian.dvorak.kbd:de:Norwegisch dvorak @@ -352,8 +379,11 @@ ru.cp866.kbd:es:Ruso Codepage 866 (alter ru.cp866.kbd:uk:????????? CP-866 (?????????????) ru.iso5.kbd:en:Russian ISO-8859-5 +ru.iso5.kbd:de:Russisch ISO-8859-5 ru.iso5.kbd:fr:Russe ISO-8859-5 ru.iso5.kbd:ru:??????? ISO-8859-5 +ru.iso5.kbd:pt:Russo ISO-8859-5 +ru.iso5.kbd:es:Ruso ISO-8859-5 ru.iso5.kbd:uk:?????????? ISO-8859-5 ru.koi8-r.kbd:en:Russian koi8-r @@ -465,6 +495,7 @@ swissgerman.macbook.acc.kbd:pt:Sui?o-Ale swissgerman.macbook.acc.kbd:es:Germanosuizo Macbook/Macbook Pro (con acentos) tr.iso9.q.kbd:en:Turkish ISO-8859-9 +tr.iso9.q.kbd:de:T?rkisch ISO-8859-9 tr.iso9.q.kbd:fr:Turc ISO-8859-9 tr.iso9.q.kbd:uk:???????? ISO-8859-9 @@ -475,6 +506,10 @@ uk.iso.kbd:pt:Reino Unido ISO-8859-1 uk.iso.kbd:es:Brit?nico ISO-8859-1 uk.iso-ctrl.kbd:en:United Kingdom ISO-8859-1 (Caps Lock acts as Left Ctrl) +uk.iso-ctrl.kbd:de:Vereinigtes K?nigreich ISO-8859-1 (Caps Lock als linke Strg) +#uk.iso-ctrl.kbd:fr:Royaume Uni ISO-8859-1 (caps lock acts as Left Ctrl) +#uk.iso-ctrl.kbd:pt:Reino Unido ISO-8859-1 (caps lock acts as Left Ctrl) +#uk.iso-ctrl.kbd:es:Brit?nico ISO-8859-1 (caps lock acts as Left Ctrl) uk.cp850.kbd:en:United Kingdom Codepage 850 uk.cp850.kbd:de:Vereinigtes K?nigreich Codeseite 850 @@ -483,9 +518,13 @@ uk.cp850.kbd:pt:Reino Unido Codepage 850 uk.cp850.kbd:es:Brit?nico Codepage 850 uk.cp850-ctrl.kbd:en:United Kingdom Codepage 850 (Caps Lock acts as Left Ctrl) +uk.cp850.kbd:de:Vereinigtes K?nigreich ISO-8859-1 (Caps Lock als linke Strg) +#uk.cp850.kbd:fr:Royaume Uni ISO-8859-1 (caps lock acts as Left Ctrl) +#uk.cp850.kbd:pt:Reino Unido ISO-8859-1 (caps lock acts as Left Ctrl) +#uk.cp850.kbd:es:Brit?nico ISO-8859-1 (caps lock acts as Left Ctrl) uk.dvorak.kbd:en:United Kingdom Dvorak -uk.dvorak.kbd:de:Vereinigtes K\xf6nigreich Dvorak +uk.dvorak.kbd:de:Vereinigtes K?nigreich Dvorak uk.dvorak.kbd:fr:Royaume Uni Dvorak uk.dvorak.kbd:pt:Reino Unido Dvorak uk.dvorak.kbd:es:Brit?nico Dvorak @@ -521,6 +560,10 @@ us.dvorakl.kbd:pt:Estados Unidos da Am?r us.dvorakl.kbd:es:Estadounidense dvorak zurdo us.dvorakp.kbd:en:United States of America Programmer Dvorak +us.dvorakp.kbd:de:US-amerikanisch (Dvorak f?r Programmierer) +us.dvorakp.kbd:fr:?tats Unis d'Am?rique dvorakp +us.dvorakp.kbd:pt:Estados Unidos da Am?rica dvorakp +us.dvorakp.kbd:es:Estadounidense dvorakp us.dvorakx.kbd:en:United States of America dvorakx us.dvorakx.kbd:de:US-amerikanisch dvorakx @@ -543,14 +586,17 @@ us.unix.kbd:pt:Estados Unidos da Am?rica us.unix.kbd:es:Estadounidense Unix tradicional ua.iso5.kbd:en:Ukrainian ISO-8859-5 +ua.iso5.kbd:de:Ukrainisch ISO-8859-5 ua.iso5.kbd:fr:Ukrainien ISO-8859-5 ua.iso5.kbd:ru:?????????? ISO-8859-5 ua.iso5.kbd:uk:?????????? ISO-8859-5 ua.koi8-u.kbd:en:Ukrainian koi8-u +ua.koi8-u.kbd:de:Ukrainisch koi8-u ua.koi8-u.kbd:fr:Ukrainien koi8-u ua.koi8-u.kbd:uk:?????????? koi8-u ua.koi8-u.shift.alt.kbd:en:Ukrainian koi8-u with koi8-r (shift) +ua.koi8-u.shift.alt.kbd:de:Ukrainisch koi8-u mit koi8-r (shift) ua.koi8-u.shift.alt.kbd:fr:Ukrainien koi8-u avec koi8-r (shift) ua.koi8-u.shift.alt.kbd:uk:?????????? koi8-u ? koi8-r (shift) Modified: stable/10/share/syscons/keymaps/be.iso.acc.kbd ============================================================================== --- stable/10/share/syscons/keymaps/be.iso.acc.kbd Thu Aug 21 21:36:06 2014 (r270306) +++ stable/10/share/syscons/keymaps/be.iso.acc.kbd Thu Aug 21 21:48:33 2014 (r270307) @@ -42,7 +42,7 @@ 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 O + 039 'm' 'M' cr cr 'm' 'M' cr cr C 040 249 '%' nop nop dacu dacu nop nop O 041 178 179 nop nop 178 179 nop nop O 042 lshift lshift lshift lshift lshift lshift lshift lshift O @@ -53,7 +53,7 @@ 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 C + 050 ',' '?' nop nop ',' '?' nop nop O 051 ';' '.' nop nop ';' '.' nop nop O 052 ':' '/' nop nop ':' '/' nop nop O 053 '=' '+' nop nop dtil dtil nop nop O Modified: stable/10/share/syscons/keymaps/cs.latin2.qwertz.kbd ============================================================================== --- stable/10/share/syscons/keymaps/cs.latin2.qwertz.kbd Thu Aug 21 21:36:06 2014 (r270306) +++ stable/10/share/syscons/keymaps/cs.latin2.qwertz.kbd Thu Aug 21 21:48:33 2014 (r270307) @@ -1,5 +1,5 @@ # Czech Standard Typewriter QWERTZ Keyboard -# by Rudolf Cejka +# by Rudolf Cejka # # $FreeBSD$ # Modified: stable/10/share/syscons/keymaps/uk.iso-ctrl.kbd ============================================================================== --- stable/10/share/syscons/keymaps/uk.iso-ctrl.kbd Thu Aug 21 21:36:06 2014 (r270306) +++ stable/10/share/syscons/keymaps/uk.iso-ctrl.kbd Thu Aug 21 21:48:33 2014 (r270307) @@ -46,7 +46,7 @@ 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 + 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 Modified: stable/10/share/syscons/keymaps/uk.iso.kbd ============================================================================== --- stable/10/share/syscons/keymaps/uk.iso.kbd Thu Aug 21 21:36:06 2014 (r270306) +++ stable/10/share/syscons/keymaps/uk.iso.kbd Thu Aug 21 21:48:33 2014 (r270307) @@ -46,7 +46,7 @@ 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 + 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 From se at FreeBSD.org Thu Aug 21 21:53:44 2014 From: se at FreeBSD.org (Stefan Esser) Date: Thu, 21 Aug 2014 21:53:43 +0000 (UTC) Subject: svn commit: r270308 - stable/10/tools/tools/vt/keymaps Message-ID: <201408212153.s7LLrhk0010520@svn.freebsd.org> Author: se Date: Thu Aug 21 21:53:43 2014 New Revision: 270308 URL: http://svnweb.freebsd.org/changeset/base/270308 Log: MFC 270131, 270152, 270199, 270232: Add converter from SYSCONS keymap format to NEWCONS and configuration files. The convert-keymap.pl script can be used to convert private SYSCONS keymaps ro NEWCONS format. Added: stable/10/tools/tools/vt/keymaps/ - copied from r270131, head/tools/tools/vt/keymaps/ Modified: stable/10/tools/tools/vt/keymaps/KBDFILES.map stable/10/tools/tools/vt/keymaps/convert-keymap.pl stable/10/tools/tools/vt/keymaps/convert-keymaps.pl Modified: stable/10/tools/tools/vt/keymaps/KBDFILES.map ============================================================================== --- head/tools/tools/vt/keymaps/KBDFILES.map Mon Aug 18 09:40:19 2014 (r270131) +++ stable/10/tools/tools/vt/keymaps/KBDFILES.map Thu Aug 21 21:53:43 2014 (r270308) @@ -1,28 +1,36 @@ # $FreeBSD$ - -ISO8859-15 be.iso.kbd be.kbd -ISO8859-15 be.iso.acc.kbd be.acc.kbd +# +# The Files are converted by "convert-keymaps.pl" from the given encoding to UCS. +# +# An additional "+EURO" causes the translation of the generic currency symbol to +# an Euro symbol, even if the source locale does not support an Euro symbol. +# This conversion is only performed for the "E" key (not e.g. on Shift-4, which +# still generates the currency symbol). +# +# Encoding syscons file name newcons (vt) file name +ISO8859-1+EURO be.iso.kbd be.kbd +ISO8859-1+EURO be.iso.acc.kbd be.acc.kbd ISO8859-5 bg.bds.ctrlcaps.kbd bg.bds.kbd -ISO8859-5 bg.phonetic.ctrlcaps.kbd bg.bds.ctrlcaps.kbd +ISO8859-5 bg.phonetic.ctrlcaps.kbd bg.phonetic.kbd -ISO8859-1 br275.iso.kbd br.kbd -ISO8859-1 br275.iso.acc.kbd br.acc.kbd -CP850 br275.cp850.kbd br.kbd.from-cp850 +#ISO8859-1 br275.iso.kbd br.kbd.from-iso1 (only AltGr-Shift-6 differs from CP850) +ISO8859-1 br275.iso.acc.kbd br.kbd +CP850 br275.cp850.kbd br.noacc.kbd -CP1131 by.cp1131.kbd by.kbd.from-cp1131 -CP1251 by.cp1251.kbd by.kbd.from-cp1251 -ISO8859-5 by.iso5.kbd by.kbd.from-iso5 +#CP1131 by.cp1131.kbd by.kbd.from-cp1131 (Shift-3 not OK) +#CP1251 by.cp1251.kbd by.kbd.from-cp1251 (result identical to CP1251) +ISO8859-5 by.iso5.kbd by.kbd -ISO8859-2 ce.iso2.kbd centraleuropean.kbd +ISO8859-2 ce.iso2.kbd centraleuropean.qwerty.kbd -ISO8859-1 colemak.iso15.acc.kbd colemak.kbd +ISO8859-1 colemak.iso15.acc.kbd colemak.acc.kbd ISO8859-2 cs.latin2.qwertz.kbd cz.kbd -ISO8859-2 cz.iso2.kbd cz.kbd.from-ce +ISO8859-2 cz.iso2.kbd cz.qwerty.kbd.from-ce -ISO8859-15 danish.iso.kbd dk.kbd -ISO8859-15 danish.iso.acc.kbd dk.acc.kbd +ISO8859-1+EURO danish.iso.kbd dk.kbd +ISO8859-1+EURO danish.iso.acc.kbd dk.acc.kbd CP865 danish.cp865.kbd dk.kbd.from-cp865 ISO8859-1 danish.iso.macbook.kbd dk.macbook.kbd @@ -36,19 +44,19 @@ ISO8859-1 estonian.iso.kbd ee.kbd.from- ISO8859-15 estonian.iso15.kbd ee.kbd CP850 estonian.cp850.kbd ee.kbd.from-cp850 -ISO8859-15 finnish.iso.kbd fi.kbd +ISO8859-1+EURO finnish.iso.kbd fi.kbd CP850 finnish.cp850.kbd fi.kbd.from-cp850 -ISO8859-15 fr.iso.kbd fr.kbd -ISO8859-15 fr.iso.acc.kbd fr.acc.kbd -ISO8859-15 fr.macbook.acc.kbd fr.macbook.kbd -ISO8859-1 fr.dvorak.kbd fr.dvorak.kbd -ISO8859-15 fr.dvorak.acc.kbd fr.dvorak.acc.kbd +ISO8859-1+EURO fr.iso.kbd fr.kbd +ISO8859-1+EURO fr.iso.acc.kbd fr.acc.kbd +ISO8859-1+EURO fr.macbook.acc.kbd fr.macbook.kbd +ISO8859-1+EURO fr.dvorak.kbd fr.dvorak.kbd +ISO8859-1 fr.dvorak.acc.kbd fr.dvorak.acc.kbd -ISO8859-15 fr_CA.iso.acc.kbd ca-fr.kbd +ISO8859-1+EURO fr_CA.iso.acc.kbd ca-fr.kbd -ISO8859-15 german.iso.kbd de.kbd -ISO8859-15 german.iso.acc.kbd de.acc.kbd +ISO8859-1+EURO german.iso.kbd de.noacc.kbd +ISO8859-1+EURO german.iso.acc.kbd de.acc.kbd CP850 german.cp850.kbd de.kbd.from-cp850 ISO8859-7 gr.elot.acc.kbd gr.elot.acc.kbd @@ -66,12 +74,12 @@ ARMSCII-8 hy.armscii-8.kbd am.kbd ISO8859-1 icelandic.iso.kbd is.kbd ISO8859-1 icelandic.iso.acc.kbd is.acc.kbd -ISO8859-15 it.iso.kbd it.kbd +ISO8859-1+EURO it.iso.kbd it.kbd -ISO8859-1 jp.106.kbd jp.kbd -ISO8859-1 jp.106x.kbd jp.capsctrl.kbd -ISO8859-1 jp.pc98.kbd jp.pc98.kbd -ISO8859-1 jp.pc98.iso.kbd jp.pc98.iso.kbd +ISO8859-1+YEN jp.106.kbd jp.kbd +ISO8859-1+YEN jp.106x.kbd jp.capsctrl.kbd +ISO8859-1+YEN jp.pc98.kbd jp.pc98.kbd +ISO8859-1+YEN jp.pc98.iso.kbd jp.pc98.iso.kbd PT154 kk.pt154.kst.kbd kz.kst.kbd PT154 kk.pt154.io.kbd kz.io.kbd @@ -87,8 +95,8 @@ ISO8859-1 norwegian.dvorak.kbd no.dvora ISO8859-2 pl_PL.ISO8859-2.kbd pl.kbd ISO8859-2 pl_PL.dvorak.kbd pl.dvorak.kbd -ISO8859-15 pt.iso.kbd pt.kbd -ISO8859-15 pt.iso.acc.kbd pt.acc.kbd +ISO8859-1+EURO pt.iso.kbd pt.kbd +ISO8859-1+EURO pt.iso.acc.kbd pt.acc.kbd CP866 ru.cp866.kbd ru.kbd.from-cp866 ISO8859-5 ru.iso5.kbd ru.kbd.from-iso5 @@ -96,34 +104,34 @@ KOI8-R ru.koi8-r.kbd ru.kbd KOI8-R ru.koi8-r.shift.kbd ru.shift.kbd KOI8-R ru.koi8-r.win.kbd ru.win.kbd -ISO8859-15 spanish.dvorak.kbd es.dvorak.kbd -ISO8859-1 spanish.iso.kbd es.kbd.from-iso1 -ISO8859-1 spanish.iso.acc.kbd es.acc.kbd -ISO8859-15 spanish.iso15.acc.kbd es.kbd +ISO8859-1+EURO spanish.dvorak.kbd es.dvorak.kbd +ISO8859-1+EURO spanish.iso.kbd es.kbd.from-iso1 +ISO8859-1+EURO spanish.iso.acc.kbd es.acc.kbd +ISO8859-1+EURO spanish.iso15.acc.kbd es.kbd ISO8859-2 si.iso.kbd si.kbd ISO8859-2 sk.iso2.kbd sk.kbd -ISO8859-1 swedish.iso.kbd se.kbd +ISO8859-1+EURO swedish.iso.kbd se.kbd CP850 swedish.cp850.kbd se.kbd.from-cp850 -ISO8859-1 swissfrench.iso.kbd ch-fr.kbd -ISO8859-1 swissfrench.iso.acc.kbd ch-fr.acc.kbd +ISO8859-1+EURO swissfrench.iso.kbd ch-fr.kbd +ISO8859-1+EURO swissfrench.iso.acc.kbd ch-fr.acc.kbd CP850 swissfrench.cp850.kbd ch-fr.kbd.from-cp850 -ISO8859-1 swissgerman.iso.kbd ch.kbd -ISO8859-1 swissgerman.iso.acc.kbd ch.acc.kbd +ISO8859-1+EURO swissgerman.iso.kbd ch.kbd +ISO8859-1+EURO swissgerman.iso.acc.kbd ch.acc.kbd CP850 swissgerman.cp850.kbd ch.kbd.from-cp850 -ISO8859-1 swissgerman.macbook.acc.kbd ch.macbook.acc.kbd +ISO8859-1+EURO swissgerman.macbook.acc.kbd ch.macbook.acc.kbd ISO8859-9 tr.iso9.q.kbd tr.kbd -ISO8859-1 uk.iso.kbd uk.kbd -ISO8859-1 uk.iso-ctrl.kbd uk.capsctrl.kbd -CP850 uk.cp850.kbd uk.kbd.from-cp850 -CP850 uk.cp850-ctrl.kbd uk.capsctrl.kbd.from-cp850 -ISO8859-1 uk.dvorak.kbd uk.dvorak.kbd +ISO8859-1+EURO uk.iso.kbd uk.kbd +ISO8859-1+EURO uk.iso-ctrl.kbd uk.capsctrl.kbd +#CP850 uk.cp850.kbd uk.kbd.from-cp850 (no ? and different Alt/Alt-Shift encodings) +#CP850 uk.cp850-ctrl.kbd uk.capsctrl.kbd.from-cp850 (no ? and different Alt/Alt-Shift encodings) +ISO8859-15 uk.dvorak.kbd uk.dvorak.kbd ISO8859-1 us.iso.kbd us.kbd ISO8859-1 us.iso.acc.kbd us.acc.kbd Modified: stable/10/tools/tools/vt/keymaps/convert-keymap.pl ============================================================================== --- head/tools/tools/vt/keymaps/convert-keymap.pl Mon Aug 18 09:40:19 2014 (r270131) +++ stable/10/tools/tools/vt/keymaps/convert-keymap.pl Thu Aug 21 21:53:43 2014 (r270308) @@ -6,9 +6,26 @@ use Encode; use strict; use utf8; -die "Usage: $0 filename.kbd CHARSET" unless ($ARGV[1]); -my $converter = Text::Iconv->new($ARGV[1], "UTF-8"); +# command line parsing +die "Usage: $0 filename.kbd CHARSET [EURO]" + unless ($ARGV[1]); + +my $inputfile = shift; # first command argument +my $converter = Text::Iconv->new(shift, "UTF-8"); # second argument +my $use_euro; +my $use_yen; +my $current_char; +my $current_scancode; + +while (my $arg = shift) { + $use_euro = 1, next + if $arg eq "EURO"; + $use_yen = 1, next + if $arg eq "YEN"; + die "Unknown encoding option '$arg'\n"; +} +# converter functions sub local_to_UCS_string { my ($string) = @_; @@ -18,47 +35,75 @@ sub local_to_UCS_string sub prettyprint_token { - my ($code) = @_; + my ($ucs_char) = @_; - return "'" . chr($code) . "'" - if 32 <= $code and $code <= 126; # print as ASCII if possible -# return sprintf "%d", $code; # <---- temporary decimal - return sprintf "0x%02x", $code - if $code <= 255; # print as hex number, else - return sprintf "0x%04x", $code; + return "'" . chr($ucs_char) . "'" + if 32 <= $ucs_char and $ucs_char <= 126; # print as ASCII if possible +# return sprintf "%d", $ucs_char; # <---- temporary decimal + return sprintf "0x%02x", $ucs_char + if $ucs_char <= 255; # print as hex number, else + return sprintf "0x%04x", $ucs_char; } sub local_to_UCS_code { my ($char) = @_; - return prettyprint_token(ord(Encode::decode("UTF-8", local_to_UCS_string($char)))); + my $ucs_char = ord(Encode::decode("UTF-8", local_to_UCS_string($char))); + + $current_char = lc(chr($ucs_char)), print("SETCUR: $ucs_char\n") + if $current_char eq ""; + + $ucs_char = 0x20ac # replace with Euro character + if $ucs_char == 0xa4 and $use_euro and $current_char eq "e"; + + $ucs_char = 0xa5 # replace with Jap. Yen character on PC kbd + if $ucs_char == ord('\\') and $use_yen and $current_scancode == 125; + + $ucs_char = 0xa5 # replace with Jap. Yen character on PC98x1 kbd + if $ucs_char == ord('\\') and $use_yen and $current_scancode == 13; + + return prettyprint_token($ucs_char); } +sub malformed_to_UCS_code +{ + my ($char) = @_; + + return prettyprint_token(ord(Encode::decode("UTF-8", $char))); +} sub convert_token { my ($C) = @_; return $1 - if $C =~ m/^([a-z][a-z0-9]*)$/; # key token + if $C =~ m/^([a-z][a-z0-9]*)$/; # key token return local_to_UCS_code(chr($1)) - if $C =~ m/^(\d+)$/; # decimal number + if $C =~ m/^(\d+)$/; # decimal number return local_to_UCS_code(chr(hex($1))) - if $C =~ m/^0x([0-9a-f]+)$/i; # hex number - return local_to_UCS_code($1) - if $C =~ m/^'(.)'$/; # character - return ""; # uncovered case + if $C =~ m/^0x([0-9a-f]+)$/i; # hex number + return local_to_UCS_code(chr(ord($1))) + if $C =~ m/^'(.)'$/; # character + return malformed_to_UCS_code($1) + if $C =~ m/^'(.+)'$/; # character + return ""; # uncovered case } sub tokenize { # split on white space and parentheses (but not within token) my ($line) = @_; - $line =~ s/' '/ _spc_ /g; # prevent splitting of ' ' $line =~ s/'\('/ _lpar_ /g; # prevent splitting of '(' $line =~ s/'\)'/ _rpar_ /g; # prevent splitting of ')' + $line =~ s/'''/'_squote_'/g; # remove quoted single quotes from matches below $line =~ s/([()])/ $1 /g; # insert blanks around remaining parentheses + my $matches; + do { + $matches = ($line =~ s/^([^']*)'([^']+)'/$1_squoteL_$2_squoteR_/g); + } while $matches; + $line =~ s/_squoteL_ _squoteR_/ _spc_ /g; # prevent splitting of ' ' my @KEYTOKEN = split (" ", $line); + grep(s/_squote[LR]?_/'/g, @KEYTOKEN); grep(s/_spc_/' '/, @KEYTOKEN); grep(s/_lpar_/'('/, @KEYTOKEN); grep(s/_rpar_/')'/, @KEYTOKEN); @@ -66,7 +111,7 @@ sub tokenize { # split on white space an } # main program -open FH, "<$ARGV[0]"; +open FH, "<$inputfile"; while () { if (m/^#/) { print local_to_UCS_string($_); @@ -78,20 +123,24 @@ while () { my $C; foreach $C (@KEYTOKEN) { if ($at_bol) { + $current_char = ""; + $current_scancode = -1; if ($C =~ m/^\s*\d/) { # line begins with key code number + $current_scancode = $C; printf " %03d ", $C; } elsif ($C =~ m/^[a-z]/) { # line begins with accent name or paren printf " %-4s ", $C; # accent name starts accent definition } elsif ($C eq "(") { printf "%17s", "( "; # paren continues accent definition } else { - print "UNKNOWN DEFINITION: $_"; + print "Unknown input line format: $_"; } $at_bol = 0; } else { if ($C =~ m/^([BCNO])$/) { print " $1"; # special case: effect of Caps Lock/Num Lock } elsif ($C eq "(") { + $current_char = ""; print " ( "; } elsif ($C eq ")") { print " )"; Modified: stable/10/tools/tools/vt/keymaps/convert-keymaps.pl ============================================================================== --- head/tools/tools/vt/keymaps/convert-keymaps.pl Mon Aug 18 09:40:19 2014 (r270131) +++ stable/10/tools/tools/vt/keymaps/convert-keymaps.pl Thu Aug 21 21:53:43 2014 (r270308) @@ -83,17 +83,18 @@ my $kbdfile; foreach $kbdfile (glob("$dir_keymaps_syscons/*.kbd")) { my $basename; ($basename = $kbdfile) =~ s:.*/::; - my $encoding = $ENCODING{$basename}; + my ($encoding) = $ENCODING{$basename}; + $encoding =~ s/\+/ /g; # e.g. "ISO8859-1+EURO" -> "ISO8859-1 EURO" my $outfile = $FILE_NEW{$basename}; if ($encoding and $outfile) { if (-r $kbdfile) { - print "converting from '$basename' ($encoding) to '$outfile' (Unicode)\n"; - my $cmdline = "$dir_convtool/convert-keymap.pl $kbdfile $ENCODING{$basename} > $dir_keymaps_output/$outfile"; + print "converting from '$basename' ($encoding) to '$outfile' (UCS)\n"; + my $cmdline = "$dir_convtool/convert-keymap.pl $kbdfile $encoding > $dir_keymaps_output/$outfile"; system "$cmdline"; } else { print "$kbdfile not found\n"; } } else { - print "Unknown input file: $basename\n"; + print "Ignore '$basename': No encoding defined in KBDFILES.map\n"; } } From se at FreeBSD.org Thu Aug 21 21:57:19 2014 From: se at FreeBSD.org (Stefan Esser) Date: Thu, 21 Aug 2014 21:57:19 +0000 (UTC) Subject: svn commit: r270309 - stable/10/usr.sbin/kbdmap Message-ID: <201408212157.s7LLvJcX011048@svn.freebsd.org> Author: se Date: Thu Aug 21 21:57:18 2014 New Revision: 270309 URL: http://svnweb.freebsd.org/changeset/base/270309 Log: MFC 269976. Add support for NEWCONS to kbdmap and vidfont. Modified: stable/10/usr.sbin/kbdmap/kbdmap.c stable/10/usr.sbin/kbdmap/kbdmap.h Modified: stable/10/usr.sbin/kbdmap/kbdmap.c ============================================================================== --- stable/10/usr.sbin/kbdmap/kbdmap.c Thu Aug 21 21:53:43 2014 (r270308) +++ stable/10/usr.sbin/kbdmap/kbdmap.c Thu Aug 21 21:57:18 2014 (r270309) @@ -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: stable/10/usr.sbin/kbdmap/kbdmap.h ============================================================================== --- stable/10/usr.sbin/kbdmap/kbdmap.h Thu Aug 21 21:53:43 2014 (r270308) +++ stable/10/usr.sbin/kbdmap/kbdmap.h Thu Aug 21 21:57:18 2014 (r270309) @@ -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 se at FreeBSD.org Thu Aug 21 22:04:19 2014 From: se at FreeBSD.org (Stefan Esser) Date: Thu, 21 Aug 2014 22:04:17 +0000 (UTC) Subject: svn commit: r270310 - stable/10/share/vt/keymaps Message-ID: <201408212204.s7LM4HVu015249@svn.freebsd.org> Author: se Date: Thu Aug 21 22:04:17 2014 New Revision: 270310 URL: http://svnweb.freebsd.org/changeset/base/270310 Log: MFC: 269950, 269952, 269973, 270114, 270119, 270142, 270156, 270200, 270229 Add fonts converted from SYSCONS with help of tools/tools/vt/keymaps for use with NEWCONS. The mapping from SYSCONS name to NEWCONS name is documented in KBDFILES.map in the tools directory. A few of the files where modified by Ed Maste (ca.kbd, ca-fr.kbd). Added: stable/10/share/vt/keymaps/INDEX.keymaps - copied, changed from r270114, head/share/vt/keymaps/INDEX.keymaps stable/10/share/vt/keymaps/am.kbd - copied, changed from r270114, head/share/vt/keymaps/am.kbd stable/10/share/vt/keymaps/be.acc.kbd - copied, changed from r270114, head/share/vt/keymaps/be.acc.kbd stable/10/share/vt/keymaps/be.kbd (contents, props changed) - copied, changed from r269950, head/share/vt/keymaps/be.kbd stable/10/share/vt/keymaps/bg.bds.kbd - copied unchanged from r270114, head/share/vt/keymaps/bg.bds.kbd stable/10/share/vt/keymaps/bg.phonetic.kbd - copied unchanged from r270300, head/share/vt/keymaps/bg.phonetic.kbd stable/10/share/vt/keymaps/br.kbd - copied unchanged from r270156, head/share/vt/keymaps/br.kbd stable/10/share/vt/keymaps/br.noacc.kbd - copied unchanged from r270156, head/share/vt/keymaps/br.noacc.kbd stable/10/share/vt/keymaps/by.kbd - copied unchanged from r270156, head/share/vt/keymaps/by.kbd stable/10/share/vt/keymaps/ca-fr.kbd - copied, changed from r270119, head/share/vt/keymaps/ca-fr.kbd stable/10/share/vt/keymaps/ca.kbd - copied, changed from r270142, head/share/vt/keymaps/ca.kbd stable/10/share/vt/keymaps/centraleuropean.kbd - copied, changed from r270114, head/share/vt/keymaps/centraleuropean.kbd stable/10/share/vt/keymaps/centraleuropean.qwerty.kbd - copied unchanged from r270229, head/share/vt/keymaps/centraleuropean.qwerty.kbd stable/10/share/vt/keymaps/ch-fr.acc.kbd - copied, changed from r270114, head/share/vt/keymaps/ch-fr.acc.kbd stable/10/share/vt/keymaps/ch-fr.kbd - copied, changed from r270114, head/share/vt/keymaps/ch-fr.kbd stable/10/share/vt/keymaps/ch.acc.kbd - copied, changed from r270114, head/share/vt/keymaps/ch.acc.kbd stable/10/share/vt/keymaps/ch.kbd - copied, changed from r270114, head/share/vt/keymaps/ch.kbd stable/10/share/vt/keymaps/ch.macbook.acc.kbd - copied unchanged from r270114, head/share/vt/keymaps/ch.macbook.acc.kbd stable/10/share/vt/keymaps/colemak.acc.kbd - copied unchanged from r270300, head/share/vt/keymaps/colemak.acc.kbd stable/10/share/vt/keymaps/cz.kbd - copied, changed from r270114, head/share/vt/keymaps/cz.kbd stable/10/share/vt/keymaps/de.acc.kbd - copied, changed from r270114, head/share/vt/keymaps/de.acc.kbd stable/10/share/vt/keymaps/de.kbd - copied unchanged from r270229, head/share/vt/keymaps/de.kbd stable/10/share/vt/keymaps/de.noacc.kbd - copied unchanged from r270229, head/share/vt/keymaps/de.noacc.kbd stable/10/share/vt/keymaps/dk.acc.kbd - copied, changed from r270114, head/share/vt/keymaps/dk.acc.kbd stable/10/share/vt/keymaps/dk.kbd - copied, changed from r270114, head/share/vt/keymaps/dk.kbd stable/10/share/vt/keymaps/dk.macbook.kbd - copied, changed from r270114, head/share/vt/keymaps/dk.macbook.kbd stable/10/share/vt/keymaps/ee.kbd - copied unchanged from r270114, head/share/vt/keymaps/ee.kbd stable/10/share/vt/keymaps/es.acc.kbd - copied unchanged from r270114, head/share/vt/keymaps/es.acc.kbd stable/10/share/vt/keymaps/es.dvorak.kbd - copied, changed from r270114, head/share/vt/keymaps/es.dvorak.kbd stable/10/share/vt/keymaps/es.kbd - copied unchanged from r270114, head/share/vt/keymaps/es.kbd stable/10/share/vt/keymaps/fi.kbd - copied, changed from r270114, head/share/vt/keymaps/fi.kbd stable/10/share/vt/keymaps/fr.acc.kbd - copied, changed from r270114, head/share/vt/keymaps/fr.acc.kbd stable/10/share/vt/keymaps/fr.dvorak.acc.kbd - copied, changed from r270114, head/share/vt/keymaps/fr.dvorak.acc.kbd stable/10/share/vt/keymaps/fr.dvorak.kbd - copied, changed from r270114, head/share/vt/keymaps/fr.dvorak.kbd stable/10/share/vt/keymaps/fr.kbd (contents, props changed) - copied, changed from r269950, head/share/vt/keymaps/fr.kbd stable/10/share/vt/keymaps/fr.macbook.kbd - copied, changed from r270114, head/share/vt/keymaps/fr.macbook.kbd stable/10/share/vt/keymaps/gr.101.acc.kbd - copied unchanged from r270114, head/share/vt/keymaps/gr.101.acc.kbd stable/10/share/vt/keymaps/gr.elot.acc.kbd - copied unchanged from r270114, head/share/vt/keymaps/gr.elot.acc.kbd stable/10/share/vt/keymaps/gr.kbd - copied unchanged from r270114, head/share/vt/keymaps/gr.kbd stable/10/share/vt/keymaps/hr.kbd (contents, props changed) - copied, changed from r269950, head/share/vt/keymaps/hr.kbd stable/10/share/vt/keymaps/hu.101.kbd - copied unchanged from r270114, head/share/vt/keymaps/hu.101.kbd stable/10/share/vt/keymaps/hu.102.kbd - copied unchanged from r270114, head/share/vt/keymaps/hu.102.kbd stable/10/share/vt/keymaps/il.kbd - copied unchanged from r270114, head/share/vt/keymaps/il.kbd stable/10/share/vt/keymaps/is.acc.kbd - copied unchanged from r270114, head/share/vt/keymaps/is.acc.kbd stable/10/share/vt/keymaps/is.kbd - copied, changed from r270114, head/share/vt/keymaps/is.kbd stable/10/share/vt/keymaps/it.kbd (contents, props changed) - copied, changed from r269950, head/share/vt/keymaps/it.kbd stable/10/share/vt/keymaps/jp.capsctrl.kbd - copied, changed from r270114, head/share/vt/keymaps/jp.capsctrl.kbd stable/10/share/vt/keymaps/jp.kbd - copied, changed from r270114, head/share/vt/keymaps/jp.kbd stable/10/share/vt/keymaps/jp.pc98.iso.kbd - copied, changed from r270114, head/share/vt/keymaps/jp.pc98.iso.kbd stable/10/share/vt/keymaps/jp.pc98.kbd - copied, changed from r270114, head/share/vt/keymaps/jp.pc98.kbd stable/10/share/vt/keymaps/kz.io.kbd - copied unchanged from r270114, head/share/vt/keymaps/kz.io.kbd stable/10/share/vt/keymaps/kz.kst.kbd - copied unchanged from r270114, head/share/vt/keymaps/kz.kst.kbd stable/10/share/vt/keymaps/latinamerican.acc.kbd - copied unchanged from r270114, head/share/vt/keymaps/latinamerican.acc.kbd stable/10/share/vt/keymaps/latinamerican.kbd - copied unchanged from r270114, head/share/vt/keymaps/latinamerican.kbd stable/10/share/vt/keymaps/lt.kbd - copied unchanged from r270114, head/share/vt/keymaps/lt.kbd stable/10/share/vt/keymaps/nl.kbd - copied unchanged from r270114, head/share/vt/keymaps/nl.kbd stable/10/share/vt/keymaps/no.dvorak.kbd - copied, changed from r270114, head/share/vt/keymaps/no.dvorak.kbd stable/10/share/vt/keymaps/no.kbd - copied, changed from r270114, head/share/vt/keymaps/no.kbd stable/10/share/vt/keymaps/nordic.asus-eee.kbd - copied, changed from r270114, head/share/vt/keymaps/nordic.asus-eee.kbd stable/10/share/vt/keymaps/pl.dvorak.kbd - copied, changed from r270114, head/share/vt/keymaps/pl.dvorak.kbd stable/10/share/vt/keymaps/pt.acc.kbd - copied unchanged from r270114, head/share/vt/keymaps/pt.acc.kbd stable/10/share/vt/keymaps/pt.kbd (contents, props changed) - copied, changed from r269950, head/share/vt/keymaps/pt.kbd stable/10/share/vt/keymaps/ru.kbd - copied unchanged from r270114, head/share/vt/keymaps/ru.kbd stable/10/share/vt/keymaps/ru.shift.kbd - copied unchanged from r270114, head/share/vt/keymaps/ru.shift.kbd stable/10/share/vt/keymaps/ru.win.kbd - copied unchanged from r270114, head/share/vt/keymaps/ru.win.kbd stable/10/share/vt/keymaps/se.kbd - copied, changed from r270114, head/share/vt/keymaps/se.kbd stable/10/share/vt/keymaps/si.kbd (contents, props changed) - copied, changed from r269950, head/share/vt/keymaps/si.kbd stable/10/share/vt/keymaps/sk.kbd - copied unchanged from r270114, head/share/vt/keymaps/sk.kbd stable/10/share/vt/keymaps/tr.kbd - copied unchanged from r270114, head/share/vt/keymaps/tr.kbd stable/10/share/vt/keymaps/uk.capsctrl.kbd - copied, changed from r270114, head/share/vt/keymaps/uk.capsctrl.kbd stable/10/share/vt/keymaps/uk.dvorak.kbd - copied unchanged from r270114, head/share/vt/keymaps/uk.dvorak.kbd stable/10/share/vt/keymaps/uk.kbd (contents, props changed) - copied, changed from r269950, head/share/vt/keymaps/uk.kbd stable/10/share/vt/keymaps/us.acc.kbd - copied, changed from r270114, head/share/vt/keymaps/us.acc.kbd stable/10/share/vt/keymaps/us.ctrl.kbd - copied unchanged from r270114, head/share/vt/keymaps/us.ctrl.kbd stable/10/share/vt/keymaps/us.dvorak.kbd - copied unchanged from r270114, head/share/vt/keymaps/us.dvorak.kbd stable/10/share/vt/keymaps/us.dvorakl.kbd - copied unchanged from r270114, head/share/vt/keymaps/us.dvorakl.kbd stable/10/share/vt/keymaps/us.dvorakp.kbd - copied unchanged from r270114, head/share/vt/keymaps/us.dvorakp.kbd stable/10/share/vt/keymaps/us.dvorakr.kbd - copied unchanged from r270114, head/share/vt/keymaps/us.dvorakr.kbd stable/10/share/vt/keymaps/us.dvorakx.kbd - copied unchanged from r270114, head/share/vt/keymaps/us.dvorakx.kbd stable/10/share/vt/keymaps/us.emacs.kbd - copied unchanged from r270114, head/share/vt/keymaps/us.emacs.kbd - copied unchanged from r269950, head/share/vt/keymaps/us.kbd stable/10/share/vt/keymaps/us.unix.kbd - copied unchanged from r270114, head/share/vt/keymaps/us.unix.kbd Directory Properties: stable/10/share/vt/keymaps/us.kbd (props changed) Modified: stable/10/share/vt/keymaps/Makefile stable/10/share/vt/keymaps/pl.kbd (contents, props changed) stable/10/share/vt/keymaps/ua.kbd (contents, props changed) stable/10/share/vt/keymaps/ua.shift.alt.kbd (contents, props changed) Copied and modified: stable/10/share/vt/keymaps/INDEX.keymaps (from r270114, head/share/vt/keymaps/INDEX.keymaps) ============================================================================== --- head/share/vt/keymaps/INDEX.keymaps Sun Aug 17 19:54:21 2014 (r270114, copy source) +++ stable/10/share/vt/keymaps/INDEX.keymaps Thu Aug 21 22:04:17 2014 (r270310) @@ -53,45 +53,37 @@ be.acc.kbd:es:Belga (con acentos) bg.bds.kbd:en:Bulgarian (BDS) bg.bds.kbd:de:Bulgarisch (BDS) -bg.bds.ctrlcaps.kbd:en:Bulgarian (Phonetic) -bg.bds.ctrlcaps.kbd:de:Bulgarisch (phonetisch) -br.kbd:en:Brazilian -br.kbd:de:Brasilianisch -br.kbd:fr:Br??silien -br.kbd:pt:Brasileiro -br.kbd:es:Brasile??o - -br.acc.kbd:en:Brazilian (accent keys) -br.acc.kbd:de:Brasilianisch (mit Akzenten) -br.acc.kbd:fr:Br??silien (avec accents) -br.acc.kbd:pt:Brasileiro (com acentos) -br.acc.kbd:es:Brasile??o (con acentos) - -br.kbd.from-cp850:en:Brazilian -br.kbd.from-cp850:de:Brasilianisch -br.kbd.from-cp850:fr:Br??silien -br.kbd.from-cp850:pt:Brasileiro -br.kbd.from-cp850:es:Brasile??o - -by.kbd.from-cp1131:en:Belarusian -by.kbd.from-cp1131:de:Wei??russisch -by.kbd.from-cp1131:fr:Bi??lorusse - -by.kbd.from-cp1251:en:Belarusian -by.kbd.from-cp1251:de:Wei??russisch -by.kbd.from-cp1251:fr:Bi??lorusse - -by.kbd.from-iso5:en:Belarusian -by.kbd.from-iso5:de:Wei??russisch -by.kbd.from-iso5:fr:Bi??lorusse +bg.phonetic.kbd:en:Bulgarian (Phonetic) +bg.phonetic.kbd:de:Bulgarisch (phonetisch) + +br.kbd:en:Brazilian (accent keys) +br.kbd:de:Brasilianisch (mit Akzenten) +br.kbd:fr:Br??silien (avec accents) +br.kbd:pt:Brasileiro (com acentos) +br.kbd:es:Brasile??o (con acentos) + +br.noacc.kbd:en:Brazilian (without accent keys) +br.noacc.kbd:de:Brasilianisch (ohne Akzente) +br.noacc.kbd:fr:Br??silien (sans accents) +br.noacc.kbd:pt:Brasileiro (without accent keys) +br.noacc.kbd:es:Brasile??o (without accent keys) + +by.kbd:en:Belarusian +by.kbd:de:Wei??russisch +by.kbd:fr:Bi??lorusse centraleuropean.kbd:en:Central European centraleuropean.kbd:de:Zentral Europ??isch centraleuropean.kbd:fr:Centre europ??en centraleuropean.kbd:es:Centroeuropeo -colemak.kbd:en:Colemak ergonomic alternative +centraleuropean.qwerty.kbd:en:Central European (QWERTY) +centraleuropean.qwerty.kbd:de:Zentral Europ??isch (QWERTY) +centraleuropean.qwerty.kbd:fr:Centre europ??en (QWERTY) +centraleuropean.qwerty.kbd:es:Centroeuropeo (QWERTY) + +colemak.acc.kbd:en:Colemak ergonomic alternative cz.kbd:en:Czech (QWERTZ, accent keys) cz.kbd:de:Tschechisch (QWERTZ, mit Akzenten) @@ -103,6 +95,11 @@ cz.kbd.from-ce:de:Tschechisch cz.kbd.from-ce:fr:Tch??que cz.kbd.from-ce:es:Checo +cz.qwerty.kbd.from-ce:en:Czech (QWERTY) +cz.qwerty.kbd.from-ce:de:Tschechisch (QWERTY) +cz.qwerty.kbd.from-ce:fr:Tch??quey (QWERTY) +cz.qwerty.kbd.from-ce:es:Checo (QWERTY) + dk.kbd:en:Danish dk.kbd:da:Dansk dk.kbd:de:D??nisch @@ -200,11 +197,13 @@ fr.dvorak.acc.kbd:pt:Franc??s Dvorak (co fr.dvorak.acc.kbd:es:Franc??s Dvorak (con acentos) fr.dvorak.acc.kbd:uk:French Dvorak-like (accent keys) -ca.kbd:en:French Canadian (accent keys) -ca.kbd:de:Franz??sisch Kanada (mit Akzenten) -ca.kbd:fr:Fran??ais Canadien (avec accents) -ca.kbd:es:Francocanadiense (con acentos) -ca.kbd:uk:????????????????????-?????????????????? (accent keys) +ca.kbd:en:Canadian Bilingual + +ca-fr.kbd:en:French Canadian (accent keys) +ca-fr.kbd:de:Franz??sisch Kanada (mit Akzenten) +ca-fr.kbd:fr:Fran??ais Canadien (avec accents) +ca-fr.kbd:es:Francocanadiense (con acentos) +ca-fr.kbd:uk:????????????????????-?????????????????? (accent keys) de.kbd:en:German de.kbd:de:Deutsch @@ -220,6 +219,13 @@ de.acc.kbd:pt:Alem??o (com acentos) de.acc.kbd:es:Alem??n (con acentos) de.acc.kbd:uk:???????????????? (accent keys) +de.noacc.kbd:en:German (no accent keys) +de.noacc.kbd:de:Deutsch (ohne Akzente) +de.noacc.kbd:fr:Allemand (sans accents) +de.noacc.kbd:pt:Alem??o (no accent keys) +de.noacc.kbd:es:Alem??n (no accent keys) +de.noacc.kbd:uk:???????????????? (no accent keys) + de.kbd.from-cp850:en:German de.kbd.from-cp850:de:Deutsch de.kbd.from-cp850:fr:Allemand @@ -513,18 +519,6 @@ uk.capsctrl.kbd:de:Vereinigtes K??nigrei #uk.iso-ctrl.kbd:pt:Reino Unido (caps lock acts as Left Ctrl) #uk.iso-ctrl.kbd:es:Brit?nico (caps lock acts as Left Ctrl) -uk.kbd.from-cp850:en:United Kingdom -uk.kbd.from-cp850:de:Vereinigtes K??nigreich -uk.kbd.from-cp850:fr:Royaume Uni -uk.kbd.from-cp850:pt:Reino Unido -uk.kbd.from-cp850:es:Brit??nico - -uk.capsctrl.kbd.from-cp850:en:United Kingdom (Caps Lock acts as Left Ctrl) -uk.kbd.from-cp850:de:Vereinigtes K??nigreich (Caps Lock als linke Strg) -#uk.cp850.kbd:fr:Royaume Uni (caps lock acts as Left Ctrl) -#uk.cp850.kbd:pt:Reino Unido (caps lock acts as Left Ctrl) -#uk.cp850.kbd:es:Brit?nico (caps lock acts as Left Ctrl) - uk.dvorak.kbd:en:United Kingdom Dvorak uk.dvorak.kbd:de:Vereinigtes K??nigreich Dvorak uk.dvorak.kbd:fr:Royaume Uni Dvorak Modified: stable/10/share/vt/keymaps/Makefile ============================================================================== --- stable/10/share/vt/keymaps/Makefile Thu Aug 21 21:57:18 2014 (r270309) +++ stable/10/share/vt/keymaps/Makefile Thu Aug 21 22:04:17 2014 (r270310) @@ -1,6 +1,88 @@ # $FreeBSD$ -FILES= pl.kbd ua.kbd ua.shift.alt.kbd +FILES= INDEX.keymaps \ + am.kbd \ + be.acc.kbd \ + be.kbd \ + bg.bds.kbd \ + bg.phonetic.kbd \ + br.kbd \ + br.noacc.kbd \ + by.kbd \ + ca.kbd \ + ca-fr.kbd \ + centraleuropean.kbd \ + centraleuropean.qwerty.kbd \ + ch-fr.acc.kbd \ + ch-fr.kbd \ + ch.acc.kbd \ + ch.kbd \ + ch.macbook.acc.kbd \ + colemak.acc.kbd \ + cz.kbd \ + de.acc.kbd \ + de.noacc.kbd \ + de.kbd \ + dk.acc.kbd \ + dk.kbd \ + dk.macbook.kbd \ + ee.kbd \ + es.acc.kbd \ + es.dvorak.kbd \ + es.kbd \ + fi.kbd \ + fr.dvorak.acc.kbd \ + fr.dvorak.kbd \ + fr.macbook.kbd \ + gr.101.acc.kbd \ + gr.elot.acc.kbd \ + gr.kbd \ + hr.kbd \ + hu.101.kbd \ + hu.102.kbd \ + il.kbd \ + is.acc.kbd \ + is.kbd \ + it.kbd \ + jp.capsctrl.kbd \ + jp.kbd \ + jp.pc98.iso.kbd \ + jp.pc98.kbd \ + kz.io.kbd \ + kz.kst.kbd \ + latinamerican.acc.kbd \ + latinamerican.kbd \ + lt.kbd \ + nl.kbd \ + no.dvorak.kbd \ + no.kbd \ + nordic.asus-eee.kbd \ + pl.dvorak.kbd \ + pl.kbd \ + pt.acc.kbd \ + pt.kbd \ + ru.kbd \ + ru.shift.kbd \ + ru.win.kbd \ + se.kbd \ + si.kbd \ + sk.kbd \ + tr.kbd \ + ua.kbd \ + ua.shift.alt.kbd \ + uk.capsctrl.kbd \ + uk.dvorak.kbd \ + uk.kbd \ + us.acc.kbd \ + us.ctrl.kbd \ + us.dvorak.kbd \ + us.dvorakl.kbd \ + us.dvorakp.kbd \ + us.dvorakr.kbd \ + us.dvorakx.kbd \ + us.emacs.kbd \ + us.kbd \ + us.unix.kbd \ FILESDIR= ${SHAREDIR}/vt/keymaps Copied and modified: stable/10/share/vt/keymaps/am.kbd (from r270114, head/share/vt/keymaps/am.kbd) ============================================================================== --- head/share/vt/keymaps/am.kbd Sun Aug 17 19:54:21 2014 (r270114, copy source) +++ stable/10/share/vt/keymaps/am.kbd Thu Aug 21 22:04:17 2014 (r270310) @@ -10,58 +10,58 @@ # ------------------------------------------------------------------ 000 nop nop nop nop nop nop nop nop O 001 esc esc esc esc nop nop debug esc O - 002 '1' '!' nop nop 0 0 nop nop O - 003 '2' '@' nul nul 0 0 nul nul O - 004 '3' '#' nop nop 0 0 nop nop O - 005 '4' '$' nop nop 0 0 nop nop O - 006 '5' '%' nop nop 0 0 nop nop O - 007 '6' '^' rs rs 0 0 rs rs O - 008 '7' '&' nop nop 0 '%' nop nop O - 009 '8' '*' nop nop 0 0 nop nop O - 010 '9' '(' nop nop 0 0 nop nop O - 011 '0' ')' nop nop 0 0 nop nop O - 012 '-' '_' us us 0 0 us us O - 013 '=' '+' nop nop 0 0 nop nop O + 002 '1' '!' nop nop 0x0567 0x0537 nop nop O + 003 '2' '@' nul nul 0x0569 0x0539 nul nul O + 004 '3' '#' nop nop 0x0583 0x0553 nop nop O + 005 '4' '$' nop nop 0x0571 0x0541 nop nop O + 006 '5' '%' nop nop 0x057b 0x054b nop nop O + 007 '6' '^' rs rs ')' '(' rs rs O + 008 '7' '&' nop nop 0x0587 '%' nop nop O + 009 '8' '*' nop nop 0x057c 0x054c nop nop O + 010 '9' '(' nop nop 0x0579 0x0549 nop nop O + 011 '0' ')' nop nop 0x0573 0x0543 nop nop O + 012 '-' '_' us us 0x2014 '-' us us O + 013 '=' '+' nop nop 0x056a 0x053a 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 0 0 dc1 dc1 C - 017 'w' 'W' etb etb 0 0 etb etb C - 018 'e' 'E' enq enq 0 0 enq enq C - 019 'r' 'R' dc2 dc2 0 0 dc2 dc2 C - 020 't' 'T' dc4 dc4 0 0 dc4 dc4 C - 021 'y' 'Y' em em 0 0 em em C - 022 'u' 'U' nak nak 0 0 nak nak C - 023 'i' 'I' ht ht 0 0 ht ht C - 024 'o' 'O' si si 0 0 si si C - 025 'p' 'P' dle dle 0 0 dle dle C - 026 '[' '{' esc esc 0 0 esc esc O - 027 ']' '}' gs gs 0 0 gs gs O + 016 'q' 'Q' dc1 dc1 0x0584 0x0554 dc1 dc1 C + 017 'w' 'W' etb etb 0x0578 0x0548 etb etb C + 018 'e' 'E' enq enq 0x0565 0x0535 enq enq C + 019 'r' 'R' dc2 dc2 0x0580 0x0550 dc2 dc2 C + 020 't' 'T' dc4 dc4 0x057f 0x054f dc4 dc4 C + 021 'y' 'Y' em em 0x0568 0x0538 em em C + 022 'u' 'U' nak nak 0x0582 0x0552 nak nak C + 023 'i' 'I' ht ht 0x056b 0x053b ht ht C + 024 'o' 'O' si si 0x0585 0x0555 si si C + 025 'p' 'P' dle dle 0x057a 0x054a dle dle C + 026 '[' '{' esc esc 0x056d 0x053d esc esc O + 027 ']' '}' gs gs 0x056e 0x053e gs gs O 028 cr cr nl nl cr cr nl nl O 029 lctrl lctrl lctrl lctrl lctrl alock lctrl alock O - 030 'a' 'A' soh soh 0 0 soh soh C - 031 's' 'S' dc3 dc3 0 0 dc3 dc3 C - 032 'd' 'D' eot eot 0 0 eot eot C - 033 'f' 'F' ack ack 0 0 ack ack C - 034 'g' 'G' bel bel 0 0 bel bel C - 035 'h' 'H' bs bs 0 0 bs bs C - 036 'j' 'J' nl nl 0 0 nl nl C - 037 'k' 'K' vt vt 0 0 vt vt C - 038 'l' 'L' ff ff 0 0 ff ff C - 039 ';' ':' nop nop 0 0 nop nop O - 040 ''' '"' nop nop 0 0 nop nop O - 041 '`' '~' nop nop 0 0 nop nop O + 030 'a' 'A' soh soh 0x0561 0x0531 soh soh C + 031 's' 'S' dc3 dc3 0x057d 0x054d dc3 dc3 C + 032 'd' 'D' eot eot 0x0564 0x0534 eot eot C + 033 'f' 'F' ack ack 0x0586 0x0556 ack ack C + 034 'g' 'G' bel bel 0x0563 0x0533 bel bel C + 035 'h' 'H' bs bs 0x0570 0x0540 bs bs C + 036 'j' 'J' nl nl 0x0575 0x0545 nl nl C + 037 'k' 'K' vt vt 0x056f 0x053f vt vt C + 038 'l' 'L' ff ff 0x056c 0x053c ff ff C + 039 ';' ':' nop nop 0x0589 0x2026 nop nop O + 040 ''' '"' nop nop 0x055b 0x055a nop nop O + 041 '`' '~' nop nop 0x055d 0x055c nop nop O 042 lshift lshift lshift lshift lshift lshift alock alock O - 043 '\' '|' fs fs 0 0 fs fs O - 044 'z' 'Z' sub sub 0 0 sub sub C - 045 'x' 'X' can can 0 0 can can C - 046 'c' 'C' etx etx 0 0 etx etx C - 047 'v' 'V' syn syn 0 0 syn syn C - 048 'b' 'B' stx stx 0 0 stx stx C - 049 'n' 'N' so so 0 0 so so C - 050 'm' 'M' cr cr 0 0 cr cr C - 051 ',' '<' nop nop 0 0 nop nop O - 052 '.' '>' nop nop 0 0 nop nop O - 053 '/' '?' nop nop 0 0 nop nop O + 043 '\' '|' fs fs 0x0577 0x0547 fs fs O + 044 'z' 'Z' sub sub 0x0566 0x0536 sub sub C + 045 'x' 'X' can can 0x0572 0x0542 can can C + 046 'c' 'C' etx etx 0x0581 0x0551 etx etx C + 047 'v' 'V' syn syn 0x057e 0x054e syn syn C + 048 'b' 'B' stx stx 0x0562 0x0532 stx stx C + 049 'n' 'N' so so 0x0576 0x0546 so so C + 050 'm' 'M' cr cr 0x0574 0x0544 cr cr C + 051 ',' '<' nop nop ',' 0xab nop nop O + 052 '.' '>' nop nop '.' 0xbb nop nop O + 053 '/' '?' nop nop 0xe000 0x055e nop nop O 054 rshift rshift rshift rshift rshift rshift rshift rshift O 055 '*' '*' '*' '*' nop nop '*' '*' O 056 lalt lalt lalt alock lalt lalt lalt alock O @@ -138,58 +138,58 @@ 127 nop nop nop nop nop nop nop nop O 128 nop nop nop nop nop nop nop nop O 129 nop nop esc esc esc esc debug esc O - 130 0 0 nop nop '1' '!' nop nop O - 131 0 0 nul nul '2' '@' nul nul O - 132 0 0 nop nop '3' '#' nop nop O - 133 0 0 nop nop '4' '$' nop nop O - 134 0 0 nop nop '5' '%' nop nop O - 135 0 0 rs rs '6' '^' rs rs O - 136 0 '%' nop nop '7' '&' nop nop O - 137 0 0 nop nop '8' '*' nop nop O - 138 0 0 nop nop '9' '(' nop nop O - 139 0 0 nop nop '0' ')' nop nop O - 140 0 0 us us '-' '_' us us O - 141 0 0 nop nop '=' '+' nop nop O + 130 0x0567 0x0537 nop nop '1' '!' nop nop O + 131 0x0569 0x0539 nul nul '2' '@' nul nul O + 132 0x0583 0x0553 nop nop '3' '#' nop nop O + 133 0x0571 0x0541 nop nop '4' '$' nop nop O + 134 0x057b 0x054b nop nop '5' '%' nop nop O + 135 ')' '(' rs rs '6' '^' rs rs O + 136 0x0587 '%' nop nop '7' '&' nop nop O + 137 0x057c 0x054c nop nop '8' '*' nop nop O + 138 0x0579 0x0549 nop nop '9' '(' nop nop O + 139 0x0573 0x0543 nop nop '0' ')' nop nop O + 140 0x2014 '-' us us '-' '_' us us O + 141 0x056a 0x053a nop nop '=' '+' nop nop O 142 bs bs del del bs bs del del O 143 ht btab nop nop ht btab nop nop O - 144 0 0 dc1 dc1 'q' 'Q' dc1 dc1 C - 145 0 0 etb etb 'w' 'W' etb etb C - 146 0 0 enq enq 'e' 'E' enq enq C - 147 0 0 dc2 dc2 'r' 'R' dc2 dc2 C - 148 0 0 dc4 dc4 't' 'T' dc4 dc4 C - 149 0 0 em em 'y' 'Y' em em C - 150 0 0 nak nak 'u' 'U' nak nak C - 151 0 0 ht ht 'i' 'I' ht ht C - 152 0 0 si si 'o' 'O' si si C - 153 0 0 dle dle 'p' 'P' dle dle C - 154 0 0 esc esc '[' '{' esc esc O - 155 0 0 gs gs ']' '}' gs gs O + 144 0x0584 0x0554 dc1 dc1 'q' 'Q' dc1 dc1 C + 145 0x0578 0x0548 etb etb 'w' 'W' etb etb C + 146 0x0565 0x0535 enq enq 'e' 'E' enq enq C + 147 0x0580 0x0550 dc2 dc2 'r' 'R' dc2 dc2 C + 148 0x057f 0x054f dc4 dc4 't' 'T' dc4 dc4 C + 149 0x0568 0x0538 em em 'y' 'Y' em em C + 150 0x0582 0x0552 nak nak 'u' 'U' nak nak C + 151 0x056b 0x053b ht ht 'i' 'I' ht ht C + 152 0x0585 0x0555 si si 'o' 'O' si si C + 153 0x057a 0x054a dle dle 'p' 'P' dle dle C + 154 0x056d 0x053d esc esc '[' '{' esc esc O + 155 0x056e 0x053e gs gs ']' '}' gs gs O 156 cr cr nl nl cr cr nl nl O 157 lctrl lctrl lctrl lctrl lctrl alock lctrl alock O - 158 0 0 soh soh 'a' 'A' soh soh C - 159 0 0 dc3 dc3 's' 'S' dc3 dc3 C - 160 0 0 eot eot 'd' 'D' eot eot C - 161 0 0 ack ack 'f' 'F' ack ack C - 162 0 0 bel bel 'g' 'G' bel bel C - 163 0 0 bs bs 'h' 'H' bs bs C - 164 0 0 nl nl 'j' 'J' nl nl C - 165 0 0 vt vt 'k' 'K' vt vt C - 166 0 0 ff ff 'l' 'L' ff ff C - 167 0 0 nop nop ';' ':' nop nop O - 168 0 0 nop nop ''' '"' nop nop O - 169 0 0 nop nop '`' '~' nop nop O + 158 0x0561 0x0531 soh soh 'a' 'A' soh soh C + 159 0x057d 0x054d dc3 dc3 's' 'S' dc3 dc3 C + 160 0x0564 0x0534 eot eot 'd' 'D' eot eot C + 161 0x0586 0x0556 ack ack 'f' 'F' ack ack C + 162 0x0563 0x0533 bel bel 'g' 'G' bel bel C + 163 0x0570 0x0540 bs bs 'h' 'H' bs bs C + 164 0x0575 0x0545 nl nl 'j' 'J' nl nl C + 165 0x056f 0x053f vt vt 'k' 'K' vt vt C + 166 0x056c 0x053c ff ff 'l' 'L' ff ff C + 167 0x0589 0x2026 nop nop ';' ':' nop nop O + 168 0x055b 0x055a nop nop ''' '"' nop nop O + 169 0x055d 0x055c nop nop '`' '~' nop nop O 170 lshift lshift lshift lshift lshift lshift alock alock O - 171 0 0 fs fs '|' '|' fs fs O - 172 0 0 sub sub 'z' 'Z' sub sub C - 173 0 0 can can 'x' 'X' can can C - 174 0 0 etx etx 'c' 'C' etx etx C - 175 0 0 syn syn 'v' 'V' syn syn C - 176 0 0 stx stx 'b' 'B' stx stx C - 177 0 0 so so 'n' 'N' so so C - 178 0 0 cr cr 'm' 'M' cr cr C - 179 0 0 nop nop ',' '<' nop nop O - 180 0 0 nop nop '.' '>' nop nop O - 181 0 0 nop nop '/' '?' nop nop O + 171 0x0577 0x0547 fs fs '|' '|' fs fs O + 172 0x0566 0x0536 sub sub 'z' 'Z' sub sub C + 173 0x0572 0x0542 can can 'x' 'X' can can C + 174 0x0581 0x0551 etx etx 'c' 'C' etx etx C + 175 0x057e 0x054e syn syn 'v' 'V' syn syn C + 176 0x0562 0x0532 stx stx 'b' 'B' stx stx C + 177 0x0576 0x0546 so so 'n' 'N' so so C + 178 0x0574 0x0544 cr cr 'm' 'M' cr cr C + 179 ',' 0xab nop nop ',' '<' nop nop O + 180 '.' 0xbb nop nop '.' '>' nop nop O + 181 0xe000 0x055e nop nop '/' '?' nop nop O 182 rshift rshift rshift rshift rshift rshift rshift rshift O 183 nop nop '*' '*' '*' '*' '*' '*' O 184 lalt lalt lalt alock lalt lalt lalt alock O Copied and modified: stable/10/share/vt/keymaps/be.acc.kbd (from r270114, head/share/vt/keymaps/be.acc.kbd) ============================================================================== --- head/share/vt/keymaps/be.acc.kbd Sun Aug 17 19:54:21 2014 (r270114, copy source) +++ stable/10/share/vt/keymaps/be.acc.kbd Thu Aug 21 22:04:17 2014 (r270310) @@ -128,7 +128,7 @@ dtil '~' ( 'a' 0xe3 ) ( 'A' 0xc3 ) ( 'n' 0xf1 ) ( 'N' 0xd1 ) ( 'o' 0xf5 ) ( 'O' 0xd5 ) - duml 0x0161 ( 'a' 0xe4 ) ( 'A' 0xc4 ) ( 'e' 0xeb ) ( 'E' 0xcb ) + duml 0xa8 ( 'a' 0xe4 ) ( 'A' 0xc4 ) ( 'e' 0xeb ) ( 'E' 0xcb ) ( 'i' 0xef ) ( 'I' 0xcf ) ( 'o' 0xf6 ) ( 'O' 0xd6 ) ( 'u' 0xfc ) ( 'U' 0xdc ) ( 'y' 0xff ) Copied and modified: stable/10/share/vt/keymaps/be.kbd (from r269950, head/share/vt/keymaps/be.kbd) ============================================================================== --- head/share/vt/keymaps/be.kbd Wed Aug 13 19:06:29 2014 (r269950, copy source) +++ stable/10/share/vt/keymaps/be.kbd Thu Aug 21 22:04:17 2014 (r270310) @@ -6,22 +6,22 @@ 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 + 003 0xe9 '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 + 007 0xa7 '6' rs rs '^' '^' rs rs O + 008 0xe8 '7' nop nop 0xe8 '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 + 010 0xe7 '9' nop nop '{' '{' nop nop O + 011 0xe0 '0' nop nop '}' '}' nop nop O + 012 ')' 0xb0 nop nop ')' 0xb0 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 + 018 'e' 'E' enq enq 0x20ac '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 @@ -29,7 +29,7 @@ 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 + 026 '^' 0xa8 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 @@ -43,10 +43,10 @@ 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 + 040 0xf9 '%' nop nop ''' ''' nop nop O + 041 0xb2 0xb3 nop nop 0xb2 0xb3 nop nop O 042 lshift lshift lshift lshift lshift lshift lshift lshift O - 043 181 163 nop nop '`' '`' nop nop O + 043 0xb5 0xa3 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 @@ -106,7 +106,7 @@ 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 + 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 Copied: stable/10/share/vt/keymaps/bg.bds.kbd (from r270114, head/share/vt/keymaps/bg.bds.kbd) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/vt/keymaps/bg.bds.kbd Thu Aug 21 22:04:17 2014 (r270310, copy of r270114, head/share/vt/keymaps/bg.bds.kbd) @@ -0,0 +1,245 @@ +# $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 alock 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 + 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 + 109 nop nop nop nop nop nop nop nop O + 110 nop nop nop nop nop nop nop nop O + 111 nop nop nop nop nop nop nop nop O + 112 nop nop nop nop nop nop nop nop O + 113 nop nop nop nop nop nop nop nop O + 114 nop nop nop nop nop nop nop nop O + 115 nop nop nop nop nop nop nop nop O + 116 nop nop nop nop nop nop nop nop O + 117 nop nop nop nop nop nop nop nop O + 118 nop nop nop nop nop nop nop nop O + 119 nop nop nop nop nop nop nop nop O + 120 nop nop nop nop nop nop nop nop O + 121 nop nop nop nop nop nop nop nop O + 122 nop nop nop nop nop nop nop nop O + 123 nop nop nop nop nop nop nop nop O + 124 nop nop nop nop nop nop nop nop O + 125 nop nop nop nop nop nop nop nop O + 126 nop nop nop nop nop nop nop nop O + 127 nop nop nop nop nop nop nop nop O + 128 nop nop nop nop nop nop nop nop O + 129 esc esc esc esc esc esc debug esc O + 130 '1' '!' nop nop '1' '!' nop nop O + 131 '2' '?' nul nul '2' '@' nul nul O + 132 '3' '+' nop nop '3' '#' nop nop O + 133 '4' '"' nop nop '4' '$' nop nop O + 134 '5' '%' nop nop '5' '%' nop nop O + 135 '6' '=' rs rs '6' '^' rs rs O + 136 '7' ':' nop nop '7' '&' nop nop O + 137 '8' '/' nop nop '8' '*' nop nop O + 138 '9' '-' nop nop '9' '(' nop nop O + 139 '0' 0x0419 nop nop '0' ')' nop nop O + 140 '-' '-' us us '-' '_' us us O + 141 '.' 'V' nop nop '=' '+' nop nop O + 142 bs bs del del bs bs del del O + 143 ht btab nop nop ht btab nop nop O + 144 ',' 0x045b dc1 dc1 'q' 'Q' dc1 dc1 C + 145 0x0453 0x0433 etb etb 'w' 'W' etb etb C + 146 0x0445 0x0425 enq enq 'e' 'E' enq enq C + 147 0x0448 0x0428 dc2 dc2 'r' 'R' dc2 dc2 C + 148 0x0458 0x0438 dc4 dc4 't' 'T' dc4 dc4 C + 149 0x0459 0x0439 em em 'y' 'Y' em em C + 150 0x044a 0x042a nak nak 'u' 'U' nak nak C + 151 0x0451 0x0431 ht ht 'i' 'I' ht ht C + 152 0x0444 0x0424 si si 'o' 'O' si si C + 153 0x0447 0x0427 dle dle 'p' 'P' dle dle C + 154 0x0456 0x0436 esc esc '[' '{' esc esc C + 155 ';' 0x0407 gs gs ']' '}' gs gs C + 156 cr cr nl nl cr cr nl nl O + 157 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O + 158 0x045c 0x043c soh soh 'a' 'A' soh soh C + 159 0x045f 0x043f dc3 dc3 's' 'S' dc3 dc3 C + 160 0x0440 0x0420 eot eot 'd' 'D' eot eot C + 161 0x044e 0x042e ack ack 'f' 'F' ack ack C + 162 0x0446 0x0426 bel bel 'g' 'G' bel bel C + 163 0x0443 0x0423 bs bs 'h' 'H' bs bs C + 164 0x0452 0x0432 nl nl 'j' 'J' nl nl C + 165 0x044d 0x042d vt vt 'k' 'K' vt vt C + 166 0x0442 0x0422 ff ff 'l' 'L' ff ff C + 167 0x044c 0x042c nop nop ';' ':' nop nop C + 168 0x0457 0x0437 nop nop ''' '"' nop nop C + 169 '(' ')' nop nop '`' '~' nop nop C + 170 lshift lshift lshift lshift lshift lshift lshift lshift O + 171 '\' '|' fs fs '\' '|' fs fs O + 172 0x045e 0x043e sub sub 'z' 'Z' sub sub C + 173 0x0449 0x0429 can can 'x' 'X' can can C + 174 0x045a 0x043a etx etx 'c' 'C' etx etx C + 175 0x0447 0x0427 syn syn 'v' 'V' syn syn C + 176 0x0454 0x0434 stx stx 'b' 'B' stx stx C + 177 0x0455 0x0435 so so 'n' 'N' so so C + 178 0x044f 0x042f cr cr 'm' 'M' cr cr C + 179 0x2116 0x0430 nop nop ',' '<' nop nop C + 180 0x044b 0x042b nop nop '.' '>' nop nop C + 181 0x0441 0x0421 nop nop '/' '?' nop nop C + 182 rshift rshift rshift rshift rshift rshift rshift rshift O + 183 '*' '*' '*' '*' '*' '*' '*' '*' O + 184 lalt lalt lalt lalt lalt lalt lalt lalt O + 185 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O + 186 clock clock alock clock clock clock clock clock O + 187 fkey01 fkey13 fkey25 fkey37 scr01 scr11 scr01 scr11 O + 188 fkey02 fkey14 fkey26 fkey38 scr02 scr12 scr02 scr12 O + 189 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O + 190 fkey04 fkey16 fkey28 fkey40 scr04 scr14 scr04 scr14 O + 191 fkey05 fkey17 fkey29 fkey41 scr05 scr15 scr05 scr15 O + 192 fkey06 fkey18 fkey30 fkey42 scr06 scr16 scr06 scr16 O + 193 fkey07 fkey19 fkey31 fkey43 scr07 scr07 scr07 scr07 O + 194 fkey08 fkey20 fkey32 fkey44 scr08 scr08 scr08 scr08 O + 195 fkey09 fkey21 fkey33 fkey45 scr09 scr09 scr09 scr09 O + 196 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O + 197 nlock nlock nlock nlock nlock nlock nlock nlock O + 198 slock slock slock slock slock slock slock slock O + 199 fkey49 '7' '7' '7' '7' '7' '7' '7' N + 200 fkey50 '8' '8' '8' '8' '8' '8' '8' N + 201 fkey51 '9' '9' '9' '9' '9' '9' '9' N + 202 fkey52 '-' '-' '-' '-' '-' '-' '-' N + 203 fkey53 '4' '4' '4' '4' '4' '4' '4' N + 204 fkey54 '5' '5' '5' '5' '5' '5' '5' N + 205 fkey55 '6' '6' '6' '6' '6' '6' '6' N + 206 fkey56 '+' '+' '+' '+' '+' '+' '+' N + 207 fkey57 '1' '1' '1' '1' '1' '1' '1' N + 208 fkey58 '2' '2' '2' '2' '2' '2' '2' N + 209 fkey59 '3' '3' '3' '3' '3' '3' '3' N + 210 fkey60 '0' '0' '0' '0' '0' '0' '0' N + 211 del '.' '.' '.' '.' '.' boot boot N + 212 nop nop nop nop nop nop nop nop O + 213 nop nop nop nop nop nop nop nop O + 214 nop nop nop nop nop nop nop nop O + 215 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O + 216 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O + 217 cr cr nl nl cr cr nl nl O + 218 rctrl rctrl rctrl rctrl rctrl rctrl rctrl rctrl O + 219 '/' '/' '/' '/' '/' '/' '/' '/' N + 220 nscr pscr debug debug nop nop nop nop O + 221 ralt ralt ralt ralt ralt ralt ralt ralt O + 222 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 O + 223 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 O + 224 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 O + 225 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 O + 226 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 O + 227 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 O + 228 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 O + 229 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 O + 230 fkey60 paste fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 O + 231 fkey61 fkey61 fkey61 fkey61 fkey61 fkey61 boot fkey61 O + 232 slock saver slock saver susp nop susp nop O + 233 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 O + 234 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 O + 235 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O + 236 nop nop nop nop nop nop nop nop O + + + Copied: stable/10/share/vt/keymaps/bg.phonetic.kbd (from r270300, head/share/vt/keymaps/bg.phonetic.kbd) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/vt/keymaps/bg.phonetic.kbd Thu Aug 21 22:04:17 2014 (r270310, copy of r270300, head/share/vt/keymaps/bg.phonetic.kbd) @@ -0,0 +1,260 @@ +# $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 alock 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 + 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 + 109 nop nop nop nop nop nop nop nop O + 110 nop nop nop nop nop nop nop nop O + 111 nop nop nop nop nop nop nop nop O + 112 nop nop nop nop nop nop nop nop O + 113 nop nop nop nop nop nop nop nop O + 114 nop nop nop nop nop nop nop nop O + 115 nop nop nop nop nop nop nop nop O + 116 nop nop nop nop nop nop nop nop O + 117 nop nop nop nop nop nop nop nop O + 118 nop nop nop nop nop nop nop nop O + 119 nop nop nop nop nop nop nop nop O + 120 nop nop nop nop nop nop nop nop O + 121 nop nop nop nop nop nop nop nop O + 122 nop nop nop nop nop nop nop nop O + 123 nop nop nop nop nop nop nop nop O + 124 nop nop nop nop nop nop nop nop O + 125 nop nop nop nop nop nop nop nop O + 126 nop nop nop nop nop nop nop nop O + 127 nop nop nop nop nop nop nop nop O + 128 nop nop nop nop nop nop nop nop O + 129 esc esc esc esc esc esc debug esc O + 130 '1' '!' nop nop '1' '!' nop nop O + 131 '2' '@' nul nul '2' '@' nul nul O + 132 '3' '#' nop nop '3' '#' nop nop O + 133 '4' '$' nop nop '4' '$' nop nop O + 134 '5' '%' nop nop '5' '%' nop nop O + 135 '6' '^' rs rs '6' '^' rs rs O + 136 '7' '&' nop nop '7' '&' nop nop O + 137 '8' '*' nop nop '8' '*' nop nop O + 138 '9' '(' nop nop '9' '(' nop nop O + 139 '0' ')' nop nop '0' ')' nop nop O + 140 '-' '_' us us '-' '_' us us O + 141 '=' '+' nop nop '=' '+' nop nop O + 142 bs bs del del bs bs del del O + 143 ht btab nop nop ht btab nop nop O + 144 0x045f 0x043f dc1 dc1 'q' 'Q' dc1 dc1 C + 145 0x0442 0x0422 etb etb 'w' 'W' etb etb C + 146 0x0445 0x0425 enq enq 'e' 'E' enq enq C + 147 0x2116 0x0430 dc2 dc2 'r' 'R' dc2 dc2 C + 148 0x0452 0x0432 dc4 dc4 't' 'T' dc4 dc4 C + 149 0x045a 0x043a em em 'y' 'Y' em em C + 150 0x0453 0x0433 nak nak 'u' 'U' nak nak C + 151 0x0448 0x0428 ht ht 'i' 'I' ht ht C + 152 0x044e 0x042e si si 'o' 'O' si si C + 153 0x044f 0x042f dle dle 'p' 'P' dle dle C + 154 0x0458 0x0438 esc esc '[' '{' esc esc C + 155 0x0459 0x0439 gs gs ']' '}' gs gs C + 156 cr cr nl nl cr cr nl nl O + 157 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O + 158 0x0440 0x0420 soh soh 'a' 'A' soh soh C + 159 0x0451 0x0431 dc3 dc3 's' 'S' dc3 dc3 C + 160 0x0444 0x0424 eot eot 'd' 'D' eot eot C + 161 0x0454 0x0434 ack ack 'f' 'F' ack ack C + 162 0x0443 0x0423 bel bel 'g' 'G' bel bel C + 163 0x0455 0x0435 bs bs 'h' 'H' bs bs C + 164 0x0449 0x0429 nl nl 'j' 'J' nl nl C + 165 0x044a 0x042a vt vt 'k' 'K' vt vt C + 166 0x044b 0x042b ff ff 'l' 'L' ff ff C + 167 ';' ':' nop nop ';' ':' nop nop O + 168 ''' '"' nop nop ''' '"' nop nop O + 169 0x0457 0x0437 nop nop '`' '~' nop nop C + 170 lshift lshift lshift lshift lshift lshift lshift lshift O + 171 0x045e 0x043e fs fs '\' '|' fs fs C + 172 0x0447 0x0427 sub sub 'z' 'Z' sub sub C + 173 0x045c 0x043c can can 'x' 'X' can can C + 174 0x0456 0x0436 etx etx 'c' 'C' etx etx C + 175 0x0446 0x0426 syn syn 'v' 'V' syn syn C + 176 0x0441 0x0421 stx stx 'b' 'B' stx stx C + 177 0x044d 0x042d so so 'n' 'N' so so C + 178 0x044c 0x042c cr cr 'm' 'M' cr cr C + 179 ',' '<' nop nop ',' '<' nop nop O + 180 '.' '>' nop nop '.' '>' nop nop O + 181 '/' '?' nop nop '/' '?' nop nop O + 182 rshift rshift rshift rshift rshift rshift rshift rshift O + 183 '*' '*' '*' '*' '*' '*' '*' '*' O + 184 lalt lalt lalt lalt lalt lalt lalt lalt O + 185 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O + 186 clock clock alock clock clock clock clock clock O + 187 fkey01 fkey13 fkey25 fkey37 scr01 scr11 scr01 scr11 O + 188 fkey02 fkey14 fkey26 fkey38 scr02 scr12 scr02 scr12 O + 189 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O + 190 fkey04 fkey16 fkey28 fkey40 scr04 scr14 scr04 scr14 O + 191 fkey05 fkey17 fkey29 fkey41 scr05 scr15 scr05 scr15 O + 192 fkey06 fkey18 fkey30 fkey42 scr06 scr16 scr06 scr16 O + 193 fkey07 fkey19 fkey31 fkey43 scr07 scr07 scr07 scr07 O + 194 fkey08 fkey20 fkey32 fkey44 scr08 scr08 scr08 scr08 O + 195 fkey09 fkey21 fkey33 fkey45 scr09 scr09 scr09 scr09 O + 196 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O + 197 nlock nlock nlock nlock nlock nlock nlock nlock O + 198 slock slock slock slock slock slock slock slock O + 199 fkey49 '7' '7' '7' '7' '7' '7' '7' N + 200 fkey50 '8' '8' '8' '8' '8' '8' '8' N + 201 fkey51 '9' '9' '9' '9' '9' '9' '9' N + 202 fkey52 '-' '-' '-' '-' '-' '-' '-' N + 203 fkey53 '4' '4' '4' '4' '4' '4' '4' N + 204 fkey54 '5' '5' '5' '5' '5' '5' '5' N + 205 fkey55 '6' '6' '6' '6' '6' '6' '6' N + 206 fkey56 '+' '+' '+' '+' '+' '+' '+' N + 207 fkey57 '1' '1' '1' '1' '1' '1' '1' N + 208 fkey58 '2' '2' '2' '2' '2' '2' '2' N + 209 fkey59 '3' '3' '3' '3' '3' '3' '3' N + 210 fkey60 '0' '0' '0' '0' '0' '0' '0' N + 211 del '.' '.' '.' '.' '.' boot boot N + 212 nop nop nop nop nop nop nop nop O + 213 nop nop nop nop nop nop nop nop O + 214 nop nop nop nop nop nop nop nop O + 215 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O + 216 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O + 217 cr cr nl nl cr cr nl nl O + 218 rctrl rctrl rctrl rctrl rctrl rctrl rctrl rctrl O + 219 '/' '/' '/' '/' '/' '/' '/' '/' N + 220 nscr pscr debug debug nop nop nop nop O + 221 ralt ralt ralt ralt ralt ralt ralt ralt O + 222 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 O + 223 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 O + 224 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 O + 225 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 O + 226 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 O + 227 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 O *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From ian at FreeBSD.org Thu Aug 21 22:42:30 2014 From: ian at FreeBSD.org (Ian Lepore) Date: Thu, 21 Aug 2014 16:42:27 -0600 Subject: svn commit: r270306 - stable/10/sys/modules/aic7xxx/ahc/ahc_eisa In-Reply-To: <201408212136.s7LLa7cu001694@svn.freebsd.org> References: <201408212136.s7LLa7cu001694@svn.freebsd.org> Message-ID: <1408660947.1150.37.camel@revolution.hippie.lan> On Thu, 2014-08-21 at 21:36 +0000, Ian Lepore wrote: > Author: ian > Date: Thu Aug 21 21:36:06 2014 > New Revision: 270306 > URL: http://svnweb.freebsd.org/changeset/base/270306 > > Log: > This module requires pci_if.h, add it to the SRCS list. > > We haven't noticed that it was missing because eisa has been disabled for > a while in -current, but it became apparent when some parallel-build stuff > was MFC'd to 10-stable and this module failed to build there. > > Modified: > stable/10/sys/modules/aic7xxx/ahc/ahc_eisa/Makefile > > Modified: stable/10/sys/modules/aic7xxx/ahc/ahc_eisa/Makefile > ============================================================================== > --- stable/10/sys/modules/aic7xxx/ahc/ahc_eisa/Makefile Thu Aug 21 21:05:58 2014 (r270305) > +++ stable/10/sys/modules/aic7xxx/ahc/ahc_eisa/Makefile Thu Aug 21 21:36:06 2014 (r270306) > @@ -5,7 +5,7 @@ > KMOD= ahc_eisa > > SRCS= ahc_eisa.c > -SRCS+= device_if.h bus_if.h eisa_if.h > +SRCS+= device_if.h bus_if.h eisa_if.h pci_if.h > SRCS+= opt_scsi.h opt_cam.h opt_aic7xxx.h > > CFLAGS+= -I${.CURDIR}/../../../../dev/aic7xxx -I.. > I just discovered I committed this directly to 10-stable. I had intended to commit it to -current and then insta-mfc it (it fixes a problem that is masked on -current by the fact that eisa is disabled by default there). -- Ian From smh at FreeBSD.org Thu Aug 21 22:44:11 2014 From: smh at FreeBSD.org (Steven Hartland) Date: Thu, 21 Aug 2014 22:44:08 +0000 (UTC) Subject: svn commit: r270312 - in stable/10/sys/cddl: compat/opensolaris/sys contrib/opensolaris/uts/common/fs/zfs contrib/opensolaris/uts/common/fs/zfs/sys Message-ID: <201408212244.s7LMi8L4033507@svn.freebsd.org> Author: smh Date: Thu Aug 21 22:44:08 2014 New Revision: 270312 URL: http://svnweb.freebsd.org/changeset/base/270312 Log: MFC r265152 - Reintroduce priority for the TRIM ZIOs instead of using the "NOW" priority MFC r265321 - Fix double fault panic when returning EOPNOTSUPP MFC r269407 - Don't return ZIO_PIPELINE_CONTINUE from vdev_op_io_start methods Sponsored by: Multiplay Modified: stable/10/sys/cddl/compat/opensolaris/sys/dkio.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_impl.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_missing.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/compat/opensolaris/sys/dkio.h ============================================================================== --- stable/10/sys/cddl/compat/opensolaris/sys/dkio.h Thu Aug 21 22:42:02 2014 (r270311) +++ stable/10/sys/cddl/compat/opensolaris/sys/dkio.h Thu Aug 21 22:44:08 2014 (r270312) @@ -75,8 +75,6 @@ extern "C" { */ #define DKIOCFLUSHWRITECACHE (DKIOC|34) /* flush cache to phys medium */ -#define DKIOCTRIM (DKIOC|35) /* TRIM a block */ - struct dk_callback { void (*dkc_callback)(void *dkc_cookie, int error); void *dkc_cookie; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Thu Aug 21 22:42:02 2014 (r270311) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Thu Aug 21 22:44:08 2014 (r270312) @@ -146,9 +146,10 @@ typedef enum zio_priority { ZIO_PRIORITY_ASYNC_READ, /* prefetch */ ZIO_PRIORITY_ASYNC_WRITE, /* spa_sync() */ ZIO_PRIORITY_SCRUB, /* asynchronous scrub/resilver reads */ + ZIO_PRIORITY_TRIM, /* free requests used for TRIM */ ZIO_PRIORITY_NUM_QUEUEABLE, - ZIO_PRIORITY_NOW /* non-queued i/os (e.g. free) */ + ZIO_PRIORITY_NOW /* non-queued I/Os (e.g. ioctl) */ } zio_priority_t; #define ZIO_PIPELINE_CONTINUE 0x100 @@ -361,7 +362,7 @@ typedef struct zio_transform { struct zio_transform *zt_next; } zio_transform_t; -typedef int zio_pipe_stage_t(zio_t **ziop); +typedef int zio_pipe_stage_t(zio_t *zio); /* * The io_reexecute flags are distinct from io_flags because the child must @@ -520,7 +521,7 @@ extern zio_t *zio_claim(zio_t *pio, spa_ extern zio_t *zio_ioctl(zio_t *pio, spa_t *spa, vdev_t *vd, int cmd, uint64_t offset, uint64_t size, zio_done_func_t *done, void *priv, - enum zio_flag flags); + zio_priority_t priority, enum zio_flag flags); extern zio_t *zio_read_phys(zio_t *pio, vdev_t *vd, uint64_t offset, uint64_t size, void *data, int checksum, Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_impl.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_impl.h Thu Aug 21 22:42:02 2014 (r270311) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_impl.h Thu Aug 21 22:44:08 2014 (r270312) @@ -215,6 +215,10 @@ enum zio_stage { ZIO_STAGE_FREE_BP_INIT | \ ZIO_STAGE_DVA_FREE) +#define ZIO_FREE_PHYS_PIPELINE \ + (ZIO_INTERLOCK_STAGES | \ + ZIO_VDEV_IO_STAGES) + #define ZIO_DDT_FREE_PIPELINE \ (ZIO_INTERLOCK_STAGES | \ ZIO_STAGE_FREE_BP_INIT | \ Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Thu Aug 21 22:42:02 2014 (r270311) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Thu Aug 21 22:44:08 2014 (r270312) @@ -449,7 +449,7 @@ trim_map_vdev_commit(spa_t *spa, zio_t * { trim_map_t *tm = vd->vdev_trimmap; trim_seg_t *ts; - uint64_t size, txgtarget, txgsafe; + uint64_t size, offset, txgtarget, txgsafe; hrtime_t timelimit; ASSERT(vd->vdev_ops->vdev_op_leaf); @@ -477,9 +477,20 @@ trim_map_vdev_commit(spa_t *spa, zio_t * avl_remove(&tm->tm_queued_frees, ts); avl_add(&tm->tm_inflight_frees, ts); size = ts->ts_end - ts->ts_start; - zio_nowait(zio_trim(zio, spa, vd, ts->ts_start, size)); + offset = ts->ts_start; TRIM_MAP_SDEC(tm, size); TRIM_MAP_QDEC(tm); + /* + * We drop the lock while we call zio_nowait as the IO + * scheduler can result in a different IO being run e.g. + * a write which would result in a recursive lock. + */ + mutex_exit(&tm->tm_lock); + + zio_nowait(zio_trim(zio, spa, vd, offset, size)); + + mutex_enter(&tm->tm_lock); + ts = trim_map_first(tm, txgtarget, txgsafe, timelimit); } mutex_exit(&tm->tm_lock); } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c Thu Aug 21 22:42:02 2014 (r270311) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c Thu Aug 21 22:44:08 2014 (r270312) @@ -684,7 +684,7 @@ vdev_disk_io_intr(buf_t *bp) * Rather than teach the rest of the stack about other error * possibilities (EFAULT, etc), we normalize the error value here. */ - zio->io_error = (geterror(bp) != 0 ? EIO : 0); + zio->io_error = (geterror(bp) != 0 ? SET_ERROR(EIO) : 0); if (zio->io_error == 0 && bp->b_resid != 0) zio->io_error = SET_ERROR(EIO); @@ -730,15 +730,17 @@ vdev_disk_io_start(zio_t *zio) * Nothing to be done here but return failure. */ if (dvd == NULL || (dvd->vd_ldi_offline && dvd->vd_lh == NULL)) { - zio->io_error = ENXIO; - return (ZIO_PIPELINE_CONTINUE); + zio->io_error = SET_ERROR(ENXIO); + zio_interrupt(zio); + return (ZIO_PIPELINE_STOP); } if (zio->io_type == ZIO_TYPE_IOCTL) { /* XXPOLICY */ if (!vdev_readable(vd)) { zio->io_error = SET_ERROR(ENXIO); - return (ZIO_PIPELINE_CONTINUE); + zio_interrupt(zio); + return (ZIO_PIPELINE_STOP); } switch (zio->io_cmd) { @@ -790,7 +792,8 @@ vdev_disk_io_start(zio_t *zio) zio->io_error = SET_ERROR(ENOTSUP); } - return (ZIO_PIPELINE_CONTINUE); + zio_interrupt(zio); + return (ZIO_PIPELINE_STOP); } vb = kmem_alloc(sizeof (vdev_buf_t), KM_SLEEP); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c Thu Aug 21 22:42:02 2014 (r270311) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c Thu Aug 21 22:44:08 2014 (r270312) @@ -164,7 +164,8 @@ vdev_file_io_start(zio_t *zio) if (!vdev_readable(vd)) { zio->io_error = SET_ERROR(ENXIO); - return (ZIO_PIPELINE_CONTINUE); + zio_interrupt(zio); + return (ZIO_PIPELINE_STOP); } vf = vd->vdev_tsd; @@ -180,7 +181,8 @@ vdev_file_io_start(zio_t *zio) zio->io_error = SET_ERROR(ENOTSUP); } - return (ZIO_PIPELINE_CONTINUE); + zio_interrupt(zio); + return (ZIO_PIPELINE_STOP); } zio->io_error = vn_rdwr(zio->io_type == ZIO_TYPE_READ ? Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Thu Aug 21 22:42:02 2014 (r270311) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Thu Aug 21 22:44:08 2014 (r270312) @@ -716,7 +716,7 @@ vdev_geom_io_intr(struct bio *bp) vd = zio->io_vd; zio->io_error = bp->bio_error; if (zio->io_error == 0 && bp->bio_resid != 0) - zio->io_error = EIO; + zio->io_error = SET_ERROR(EIO); switch(zio->io_error) { case ENOTSUP: @@ -765,41 +765,43 @@ vdev_geom_io_start(zio_t *zio) vd = zio->io_vd; - if (zio->io_type == ZIO_TYPE_IOCTL) { + switch (zio->io_type) { + case ZIO_TYPE_IOCTL: /* XXPOLICY */ if (!vdev_readable(vd)) { - zio->io_error = ENXIO; - return (ZIO_PIPELINE_CONTINUE); + zio->io_error = SET_ERROR(ENXIO); + } else { + switch (zio->io_cmd) { + case DKIOCFLUSHWRITECACHE: + if (zfs_nocacheflush || vdev_geom_bio_flush_disable) + break; + if (vd->vdev_nowritecache) { + zio->io_error = SET_ERROR(ENOTSUP); + break; + } + goto sendreq; + default: + zio->io_error = SET_ERROR(ENOTSUP); + } } - switch (zio->io_cmd) { - case DKIOCFLUSHWRITECACHE: - if (zfs_nocacheflush || vdev_geom_bio_flush_disable) - break; - if (vd->vdev_nowritecache) { - zio->io_error = ENOTSUP; - break; - } + zio_interrupt(zio); + return (ZIO_PIPELINE_STOP); + case ZIO_TYPE_FREE: + if (vd->vdev_notrim) { + zio->io_error = SET_ERROR(ENOTSUP); + } else if (!vdev_geom_bio_delete_disable) { goto sendreq; - case DKIOCTRIM: - if (vdev_geom_bio_delete_disable) - break; - if (vd->vdev_notrim) { - zio->io_error = ENOTSUP; - break; - } - goto sendreq; - default: - zio->io_error = ENOTSUP; } - - return (ZIO_PIPELINE_CONTINUE); + zio_interrupt(zio); + return (ZIO_PIPELINE_STOP); } sendreq: cp = vd->vdev_tsd; if (cp == NULL) { - zio->io_error = ENXIO; - return (ZIO_PIPELINE_CONTINUE); + zio->io_error = SET_ERROR(ENXIO); + zio_interrupt(zio); + return (ZIO_PIPELINE_STOP); } bp = g_alloc_bio(); bp->bio_caller1 = zio; @@ -811,22 +813,18 @@ sendreq: bp->bio_offset = zio->io_offset; bp->bio_length = zio->io_size; break; + case ZIO_TYPE_FREE: + bp->bio_cmd = BIO_DELETE; + bp->bio_data = NULL; + bp->bio_offset = zio->io_offset; + bp->bio_length = zio->io_size; + break; case ZIO_TYPE_IOCTL: - switch (zio->io_cmd) { - case DKIOCFLUSHWRITECACHE: - bp->bio_cmd = BIO_FLUSH; - bp->bio_flags |= BIO_ORDERED; - bp->bio_data = NULL; - bp->bio_offset = cp->provider->mediasize; - bp->bio_length = 0; - break; - case DKIOCTRIM: - bp->bio_cmd = BIO_DELETE; - bp->bio_data = NULL; - bp->bio_offset = zio->io_offset; - bp->bio_length = zio->io_size; - break; - } + bp->bio_cmd = BIO_FLUSH; + bp->bio_flags |= BIO_ORDERED; + bp->bio_data = NULL; + bp->bio_offset = cp->provider->mediasize; + bp->bio_length = 0; break; } bp->bio_done = vdev_geom_io_intr; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c Thu Aug 21 22:42:02 2014 (r270311) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c Thu Aug 21 22:44:08 2014 (r270312) @@ -287,7 +287,8 @@ vdev_mirror_io_start(zio_t *zio) zio->io_type, zio->io_priority, 0, vdev_mirror_scrub_done, mc)); } - return (ZIO_PIPELINE_CONTINUE); + zio_interrupt(zio); + return (ZIO_PIPELINE_STOP); } /* * For normal reads just pick one child. @@ -314,7 +315,8 @@ vdev_mirror_io_start(zio_t *zio) c++; } - return (ZIO_PIPELINE_CONTINUE); + zio_interrupt(zio); + return (ZIO_PIPELINE_STOP); } static int Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_missing.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_missing.c Thu Aug 21 22:42:02 2014 (r270311) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_missing.c Thu Aug 21 22:44:08 2014 (r270312) @@ -71,7 +71,8 @@ static int vdev_missing_io_start(zio_t *zio) { zio->io_error = SET_ERROR(ENOTSUP); - return (ZIO_PIPELINE_CONTINUE); + zio_interrupt(zio); + return (ZIO_PIPELINE_STOP); } /* ARGSUSED */ Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Thu Aug 21 22:42:02 2014 (r270311) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Thu Aug 21 22:44:08 2014 (r270312) @@ -40,9 +40,9 @@ * * ZFS issues I/O operations to leaf vdevs to satisfy and complete zios. The * I/O scheduler determines when and in what order those operations are - * issued. The I/O scheduler divides operations into five I/O classes + * issued. The I/O scheduler divides operations into six I/O classes * prioritized in the following order: sync read, sync write, async read, - * async write, and scrub/resilver. Each queue defines the minimum and + * async write, scrub/resilver and trim. Each queue defines the minimum and * maximum number of concurrent operations that may be issued to the device. * In addition, the device has an aggregate maximum. Note that the sum of the * per-queue minimums must not exceed the aggregate maximum, and if the @@ -61,7 +61,7 @@ * done in the order specified above. No further operations are issued if the * aggregate maximum number of concurrent operations has been hit or if there * are no operations queued for an I/O class that has not hit its maximum. - * Every time an i/o is queued or an operation completes, the I/O scheduler + * Every time an I/O is queued or an operation completes, the I/O scheduler * looks for new operations to issue. * * All I/O classes have a fixed maximum number of outstanding operations @@ -70,7 +70,7 @@ * transaction groups (see txg.c). Transaction groups enter the syncing state * periodically so the number of queued async writes will quickly burst up and * then bleed down to zero. Rather than servicing them as quickly as possible, - * the I/O scheduler changes the maximum number of active async write i/os + * the I/O scheduler changes the maximum number of active async write I/Os * according to the amount of dirty data in the pool (see dsl_pool.c). Since * both throughput and latency typically increase with the number of * concurrent operations issued to physical devices, reducing the burstiness @@ -113,14 +113,14 @@ */ /* - * The maximum number of i/os active to each device. Ideally, this will be >= + * The maximum number of I/Os active to each device. Ideally, this will be >= * the sum of each queue's max_active. It must be at least the sum of each * queue's min_active. */ uint32_t zfs_vdev_max_active = 1000; /* - * Per-queue limits on the number of i/os active to each device. If the + * Per-queue limits on the number of I/Os active to each device. If the * sum of the queue's max_active is < zfs_vdev_max_active, then the * min_active comes into play. We will send min_active from each queue, * and then select from queues in the order defined by zio_priority_t. @@ -145,6 +145,14 @@ uint32_t zfs_vdev_async_write_min_active uint32_t zfs_vdev_async_write_max_active = 10; uint32_t zfs_vdev_scrub_min_active = 1; uint32_t zfs_vdev_scrub_max_active = 2; +uint32_t zfs_vdev_trim_min_active = 1; +/* + * TRIM max active is large in comparison to the other values due to the fact + * that TRIM IOs are coalesced at the device layer. This value is set such + * that a typical SSD can process the queued IOs in a single request. + */ +uint32_t zfs_vdev_trim_max_active = 64; + /* * When the pool has less than zfs_vdev_async_write_active_min_dirty_percent @@ -171,7 +179,7 @@ SYSCTL_DECL(_vfs_zfs_vdev); TUNABLE_INT("vfs.zfs.vdev.max_active", &zfs_vdev_max_active); SYSCTL_UINT(_vfs_zfs_vdev, OID_AUTO, max_active, CTLFLAG_RW, &zfs_vdev_max_active, 0, - "The maximum number of i/os of all types active for each device."); + "The maximum number of I/Os of all types active for each device."); #define ZFS_VDEV_QUEUE_KNOB_MIN(name) \ TUNABLE_INT("vfs.zfs.vdev." #name "_min_active", \ @@ -199,6 +207,8 @@ ZFS_VDEV_QUEUE_KNOB_MIN(async_write); ZFS_VDEV_QUEUE_KNOB_MAX(async_write); ZFS_VDEV_QUEUE_KNOB_MIN(scrub); ZFS_VDEV_QUEUE_KNOB_MAX(scrub); +ZFS_VDEV_QUEUE_KNOB_MIN(trim); +ZFS_VDEV_QUEUE_KNOB_MAX(trim); #undef ZFS_VDEV_QUEUE_KNOB @@ -297,6 +307,7 @@ static void vdev_queue_io_add(vdev_queue_t *vq, zio_t *zio) { spa_t *spa = zio->io_spa; + ASSERT(MUTEX_HELD(&vq->vq_lock)); ASSERT3U(zio->io_priority, <, ZIO_PRIORITY_NUM_QUEUEABLE); avl_add(&vq->vq_class[zio->io_priority].vqc_queued_tree, zio); @@ -313,6 +324,7 @@ static void vdev_queue_io_remove(vdev_queue_t *vq, zio_t *zio) { spa_t *spa = zio->io_spa; + ASSERT(MUTEX_HELD(&vq->vq_lock)); ASSERT3U(zio->io_priority, <, ZIO_PRIORITY_NUM_QUEUEABLE); avl_remove(&vq->vq_class[zio->io_priority].vqc_queued_tree, zio); @@ -401,6 +413,8 @@ vdev_queue_class_min_active(zio_priority return (zfs_vdev_async_write_min_active); case ZIO_PRIORITY_SCRUB: return (zfs_vdev_scrub_min_active); + case ZIO_PRIORITY_TRIM: + return (zfs_vdev_trim_min_active); default: panic("invalid priority %u", p); return (0); @@ -460,6 +474,8 @@ vdev_queue_class_max_active(spa_t *spa, return (vdev_queue_max_async_writes(spa)); case ZIO_PRIORITY_SCRUB: return (zfs_vdev_scrub_max_active); + case ZIO_PRIORITY_TRIM: + return (zfs_vdev_trim_max_active); default: panic("invalid priority %u", p); return (0); @@ -476,6 +492,8 @@ vdev_queue_class_to_issue(vdev_queue_t * spa_t *spa = vq->vq_vdev->vdev_spa; zio_priority_t p; + ASSERT(MUTEX_HELD(&vq->vq_lock)); + if (avl_numnodes(&vq->vq_active_tree) >= zfs_vdev_max_active) return (ZIO_PRIORITY_NUM_QUEUEABLE); @@ -517,10 +535,11 @@ vdev_queue_aggregate(vdev_queue_t *vq, z zio_t *first, *last, *aio, *dio, *mandatory, *nio; uint64_t maxgap = 0; uint64_t size; - boolean_t stretch = B_FALSE; - vdev_queue_class_t *vqc = &vq->vq_class[zio->io_priority]; - avl_tree_t *t = &vqc->vqc_queued_tree; - enum zio_flag flags = zio->io_flags & ZIO_FLAG_AGG_INHERIT; + boolean_t stretch; + avl_tree_t *t; + enum zio_flag flags; + + ASSERT(MUTEX_HELD(&vq->vq_lock)); if (zio->io_flags & ZIO_FLAG_DONT_AGGREGATE) return (NULL); @@ -558,6 +577,8 @@ vdev_queue_aggregate(vdev_queue_t *vq, z * Walk backwards through sufficiently contiguous I/Os * recording the last non-option I/O. */ + flags = zio->io_flags & ZIO_FLAG_AGG_INHERIT; + t = &vq->vq_class[zio->io_priority].vqc_queued_tree; while ((dio = AVL_PREV(t, first)) != NULL && (dio->io_flags & ZIO_FLAG_AGG_INHERIT) == flags && IO_SPAN(dio, last) <= zfs_vdev_aggregation_limit && @@ -597,6 +618,7 @@ vdev_queue_aggregate(vdev_queue_t *vq, z * non-optional I/O is close enough to make aggregation * worthwhile. */ + stretch = B_FALSE; if (zio->io_type == ZIO_TYPE_WRITE && mandatory != NULL) { zio_t *nio = last; while ((dio = AVL_NEXT(t, nio)) != NULL && @@ -737,11 +759,13 @@ vdev_queue_io(zio_t *zio) zio->io_priority != ZIO_PRIORITY_ASYNC_READ && zio->io_priority != ZIO_PRIORITY_SCRUB) zio->io_priority = ZIO_PRIORITY_ASYNC_READ; - } else { - ASSERT(zio->io_type == ZIO_TYPE_WRITE); + } else if (zio->io_type == ZIO_TYPE_WRITE) { if (zio->io_priority != ZIO_PRIORITY_SYNC_WRITE && zio->io_priority != ZIO_PRIORITY_ASYNC_WRITE) zio->io_priority = ZIO_PRIORITY_ASYNC_WRITE; + } else { + ASSERT(zio->io_type == ZIO_TYPE_FREE); + zio->io_priority = ZIO_PRIORITY_TRIM; } zio->io_flags |= ZIO_FLAG_DONT_CACHE | ZIO_FLAG_DONT_QUEUE; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c Thu Aug 21 22:42:02 2014 (r270311) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c Thu Aug 21 22:44:08 2014 (r270312) @@ -1755,7 +1755,9 @@ vdev_raidz_io_start(zio_t *zio) zio->io_type, zio->io_priority, 0, vdev_raidz_child_done, rc)); } - return (ZIO_PIPELINE_CONTINUE); + + zio_interrupt(zio); + return (ZIO_PIPELINE_STOP); } if (zio->io_type == ZIO_TYPE_WRITE) { @@ -1787,7 +1789,8 @@ vdev_raidz_io_start(zio_t *zio) ZIO_FLAG_NODATA | ZIO_FLAG_OPTIONAL, NULL, NULL)); } - return (ZIO_PIPELINE_CONTINUE); + zio_interrupt(zio); + return (ZIO_PIPELINE_STOP); } ASSERT(zio->io_type == ZIO_TYPE_READ); @@ -1827,7 +1830,8 @@ vdev_raidz_io_start(zio_t *zio) } } - return (ZIO_PIPELINE_CONTINUE); + zio_interrupt(zio); + return (ZIO_PIPELINE_STOP); } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Thu Aug 21 22:42:02 2014 (r270311) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Thu Aug 21 22:44:08 2014 (r270312) @@ -807,6 +807,8 @@ zio_free_sync(zio_t *pio, spa_t *spa, ui else if (BP_IS_GANG(bp) || BP_GET_DEDUP(bp)) stage |= ZIO_STAGE_ISSUE_ASYNC; + flags |= ZIO_FLAG_DONT_QUEUE; + zio = zio_create(pio, spa, txg, bp, NULL, size, NULL, NULL, ZIO_TYPE_FREE, ZIO_PRIORITY_NOW, flags, NULL, 0, NULL, ZIO_STAGE_OPEN, stage); @@ -851,14 +853,14 @@ zio_claim(zio_t *pio, spa_t *spa, uint64 zio_t * zio_ioctl(zio_t *pio, spa_t *spa, vdev_t *vd, int cmd, uint64_t offset, uint64_t size, zio_done_func_t *done, void *private, - enum zio_flag flags) + zio_priority_t priority, enum zio_flag flags) { zio_t *zio; int c; if (vd->vdev_children == 0) { zio = zio_create(pio, spa, 0, NULL, NULL, size, done, private, - ZIO_TYPE_IOCTL, ZIO_PRIORITY_NOW, flags, vd, offset, NULL, + ZIO_TYPE_IOCTL, priority, flags, vd, offset, NULL, ZIO_STAGE_OPEN, ZIO_IOCTL_PIPELINE); zio->io_cmd = cmd; @@ -867,7 +869,7 @@ zio_ioctl(zio_t *pio, spa_t *spa, vdev_t for (c = 0; c < vd->vdev_children; c++) zio_nowait(zio_ioctl(zio, spa, vd->vdev_child[c], cmd, - offset, size, done, private, flags)); + offset, size, done, private, priority, flags)); } return (zio); @@ -952,6 +954,10 @@ zio_vdev_child_io(zio_t *pio, blkptr_t * pio->io_pipeline &= ~ZIO_STAGE_CHECKSUM_VERIFY; } + /* Not all IO types require vdev io done stage e.g. free */ + if (!(pio->io_pipeline & ZIO_STAGE_VDEV_IO_DONE)) + pipeline &= ~ZIO_STAGE_VDEV_IO_DONE; + if (vd->vdev_children == 0) offset += VDEV_LABEL_START_SIZE; @@ -997,7 +1003,7 @@ void zio_flush(zio_t *zio, vdev_t *vd) { zio_nowait(zio_ioctl(zio, zio->io_spa, vd, DKIOCFLUSHWRITECACHE, 0, 0, - NULL, NULL, + NULL, NULL, ZIO_PRIORITY_NOW, ZIO_FLAG_CANFAIL | ZIO_FLAG_DONT_PROPAGATE | ZIO_FLAG_DONT_RETRY)); } @@ -1007,9 +1013,10 @@ zio_trim(zio_t *zio, spa_t *spa, vdev_t ASSERT(vd->vdev_ops->vdev_op_leaf); - return zio_ioctl(zio, spa, vd, DKIOCTRIM, offset, size, - NULL, NULL, - ZIO_FLAG_CANFAIL | ZIO_FLAG_DONT_PROPAGATE | ZIO_FLAG_DONT_RETRY); + return (zio_create(zio, spa, 0, NULL, NULL, size, NULL, NULL, + ZIO_TYPE_FREE, ZIO_PRIORITY_TRIM, ZIO_FLAG_DONT_AGGREGATE | + ZIO_FLAG_CANFAIL | ZIO_FLAG_DONT_PROPAGATE | ZIO_FLAG_DONT_RETRY, + vd, offset, NULL, ZIO_STAGE_OPEN, ZIO_FREE_PHYS_PIPELINE)); } void @@ -1036,9 +1043,8 @@ zio_shrink(zio_t *zio, uint64_t size) */ static int -zio_read_bp_init(zio_t **ziop) +zio_read_bp_init(zio_t *zio) { - zio_t *zio = *ziop; blkptr_t *bp = zio->io_bp; if (BP_GET_COMPRESS(bp) != ZIO_COMPRESS_OFF && @@ -1071,9 +1077,8 @@ zio_read_bp_init(zio_t **ziop) } static int -zio_write_bp_init(zio_t **ziop) +zio_write_bp_init(zio_t *zio) { - zio_t *zio = *ziop; spa_t *spa = zio->io_spa; zio_prop_t *zp = &zio->io_prop; enum zio_compress compress = zp->zp_compress; @@ -1253,9 +1258,8 @@ zio_write_bp_init(zio_t **ziop) } static int -zio_free_bp_init(zio_t **ziop) +zio_free_bp_init(zio_t *zio) { - zio_t *zio = *ziop; blkptr_t *bp = zio->io_bp; if (zio->io_child_type == ZIO_CHILD_LOGICAL) { @@ -1338,10 +1342,8 @@ zio_taskq_member(zio_t *zio, zio_taskq_t } static int -zio_issue_async(zio_t **ziop) +zio_issue_async(zio_t *zio) { - zio_t *zio = *ziop; - zio_taskq_dispatch(zio, ZIO_TASKQ_ISSUE, B_FALSE); return (ZIO_PIPELINE_STOP); @@ -1409,7 +1411,7 @@ zio_execute(zio_t *zio) } zio->io_stage = stage; - rv = zio_pipeline[highbit64(stage) - 1](&zio); + rv = zio_pipeline[highbit64(stage) - 1](zio); if (rv == ZIO_PIPELINE_STOP) return; @@ -1843,9 +1845,8 @@ zio_gang_tree_issue(zio_t *pio, zio_gang } static int -zio_gang_assemble(zio_t **ziop) +zio_gang_assemble(zio_t *zio) { - zio_t *zio = *ziop; blkptr_t *bp = zio->io_bp; ASSERT(BP_IS_GANG(bp) && zio->io_gang_leader == NULL); @@ -1859,9 +1860,8 @@ zio_gang_assemble(zio_t **ziop) } static int -zio_gang_issue(zio_t **ziop) +zio_gang_issue(zio_t *zio) { - zio_t *zio = *ziop; blkptr_t *bp = zio->io_bp; if (zio_wait_for_children(zio, ZIO_CHILD_GANG, ZIO_WAIT_DONE)) @@ -1995,9 +1995,8 @@ zio_write_gang_block(zio_t *pio) * writes) and as a result is mutually exclusive with dedup. */ static int -zio_nop_write(zio_t **ziop) +zio_nop_write(zio_t *zio) { - zio_t *zio = *ziop; blkptr_t *bp = zio->io_bp; blkptr_t *bp_orig = &zio->io_bp_orig; zio_prop_t *zp = &zio->io_prop; @@ -2068,9 +2067,8 @@ zio_ddt_child_read_done(zio_t *zio) } static int -zio_ddt_read_start(zio_t **ziop) +zio_ddt_read_start(zio_t *zio) { - zio_t *zio = *ziop; blkptr_t *bp = zio->io_bp; ASSERT(BP_GET_DEDUP(bp)); @@ -2112,9 +2110,8 @@ zio_ddt_read_start(zio_t **ziop) } static int -zio_ddt_read_done(zio_t **ziop) +zio_ddt_read_done(zio_t *zio) { - zio_t *zio = *ziop; blkptr_t *bp = zio->io_bp; if (zio_wait_for_children(zio, ZIO_CHILD_DDT, ZIO_WAIT_DONE)) @@ -2282,9 +2279,8 @@ zio_ddt_ditto_write_done(zio_t *zio) } static int -zio_ddt_write(zio_t **ziop) +zio_ddt_write(zio_t *zio) { - zio_t *zio = *ziop; spa_t *spa = zio->io_spa; blkptr_t *bp = zio->io_bp; uint64_t txg = zio->io_txg; @@ -2395,9 +2391,8 @@ zio_ddt_write(zio_t **ziop) ddt_entry_t *freedde; /* for debugging */ static int -zio_ddt_free(zio_t **ziop) +zio_ddt_free(zio_t *zio) { - zio_t *zio = *ziop; spa_t *spa = zio->io_spa; blkptr_t *bp = zio->io_bp; ddt_t *ddt = ddt_select(spa, bp); @@ -2422,9 +2417,8 @@ zio_ddt_free(zio_t **ziop) * ========================================================================== */ static int -zio_dva_allocate(zio_t **ziop) +zio_dva_allocate(zio_t *zio) { - zio_t *zio = *ziop; spa_t *spa = zio->io_spa; metaslab_class_t *mc = spa_normal_class(spa); blkptr_t *bp = zio->io_bp; @@ -2466,19 +2460,16 @@ zio_dva_allocate(zio_t **ziop) } static int -zio_dva_free(zio_t **ziop) +zio_dva_free(zio_t *zio) { - zio_t *zio = *ziop; - metaslab_free(zio->io_spa, zio->io_bp, zio->io_txg, B_FALSE); return (ZIO_PIPELINE_CONTINUE); } static int -zio_dva_claim(zio_t **ziop) +zio_dva_claim(zio_t *zio) { - zio_t *zio = *ziop; int error; error = metaslab_claim(zio->io_spa, zio->io_bp, zio->io_txg); @@ -2572,12 +2563,12 @@ zio_free_zil(spa_t *spa, uint64_t txg, b * ========================================================================== */ static int -zio_vdev_io_start(zio_t **ziop) +zio_vdev_io_start(zio_t *zio) { - zio_t *zio = *ziop; vdev_t *vd = zio->io_vd; uint64_t align; spa_t *spa = zio->io_spa; + int ret; ASSERT(zio->io_error == 0); ASSERT(zio->io_child_error[ZIO_CHILD_VDEV] == 0); @@ -2592,7 +2583,8 @@ zio_vdev_io_start(zio_t **ziop) return (vdev_mirror_ops.vdev_op_io_start(zio)); } - if (vd->vdev_ops->vdev_op_leaf && zio->io_type == ZIO_TYPE_FREE) { + if (vd->vdev_ops->vdev_op_leaf && zio->io_type == ZIO_TYPE_FREE && + zio->io_priority == ZIO_PRIORITY_NOW) { trim_map_free(vd, zio->io_offset, zio->io_size, zio->io_txg); return (ZIO_PIPELINE_CONTINUE); } @@ -2677,41 +2669,44 @@ zio_vdev_io_start(zio_t **ziop) return (ZIO_PIPELINE_CONTINUE); } - if (vd->vdev_ops->vdev_op_leaf && - (zio->io_type == ZIO_TYPE_READ || zio->io_type == ZIO_TYPE_WRITE)) { - - if (zio->io_type == ZIO_TYPE_READ && vdev_cache_read(zio)) - return (ZIO_PIPELINE_CONTINUE); + if (vd->vdev_ops->vdev_op_leaf) { + switch (zio->io_type) { + case ZIO_TYPE_READ: + if (vdev_cache_read(zio)) + return (ZIO_PIPELINE_CONTINUE); + /* FALLTHROUGH */ + case ZIO_TYPE_WRITE: + case ZIO_TYPE_FREE: + if ((zio = vdev_queue_io(zio)) == NULL) + return (ZIO_PIPELINE_STOP); - if ((zio = vdev_queue_io(zio)) == NULL) - return (ZIO_PIPELINE_STOP); - *ziop = zio; - - if (!vdev_accessible(vd, zio)) { - zio->io_error = SET_ERROR(ENXIO); - zio_interrupt(zio); - return (ZIO_PIPELINE_STOP); + if (!vdev_accessible(vd, zio)) { + zio->io_error = SET_ERROR(ENXIO); + zio_interrupt(zio); + return (ZIO_PIPELINE_STOP); + } + break; } - } - - /* - * Note that we ignore repair writes for TRIM because they can conflict - * with normal writes. This isn't an issue because, by definition, we - * only repair blocks that aren't freed. - */ - if (vd->vdev_ops->vdev_op_leaf && zio->io_type == ZIO_TYPE_WRITE && - !(zio->io_flags & ZIO_FLAG_IO_REPAIR)) { - if (!trim_map_write_start(zio)) + /* + * Note that we ignore repair writes for TRIM because they can + * conflict with normal writes. This isn't an issue because, by + * definition, we only repair blocks that aren't freed. + */ + if (zio->io_type == ZIO_TYPE_WRITE && + !(zio->io_flags & ZIO_FLAG_IO_REPAIR) && + !trim_map_write_start(zio)) return (ZIO_PIPELINE_STOP); } - return (vd->vdev_ops->vdev_op_io_start(zio)); + ret = vd->vdev_ops->vdev_op_io_start(zio); + ASSERT(ret == ZIO_PIPELINE_STOP); + + return (ret); } static int -zio_vdev_io_done(zio_t **ziop) +zio_vdev_io_done(zio_t *zio) { - zio_t *zio = *ziop; vdev_t *vd = zio->io_vd; vdev_ops_t *ops = vd ? vd->vdev_ops : &vdev_mirror_ops; boolean_t unexpected_error = B_FALSE; @@ -2723,7 +2718,8 @@ zio_vdev_io_done(zio_t **ziop) zio->io_type == ZIO_TYPE_WRITE || zio->io_type == ZIO_TYPE_FREE); if (vd != NULL && vd->vdev_ops->vdev_op_leaf && - (zio->io_type == ZIO_TYPE_READ || zio->io_type == ZIO_TYPE_WRITE)) { + (zio->io_type == ZIO_TYPE_READ || zio->io_type == ZIO_TYPE_WRITE || + zio->io_type == ZIO_TYPE_FREE)) { if (zio->io_type == ZIO_TYPE_WRITE && !(zio->io_flags & ZIO_FLAG_IO_REPAIR)) @@ -2785,9 +2781,8 @@ zio_vsd_default_cksum_report(zio_t *zio, } static int -zio_vdev_io_assess(zio_t **ziop) +zio_vdev_io_assess(zio_t *zio) { - zio_t *zio = *ziop; vdev_t *vd = zio->io_vd; if (zio_wait_for_children(zio, ZIO_CHILD_VDEV, ZIO_WAIT_DONE)) @@ -2804,7 +2799,8 @@ zio_vdev_io_assess(zio_t **ziop) if (zio_injection_enabled && zio->io_error == 0) zio->io_error = zio_handle_fault_injection(zio, EIO); - if (zio->io_type == ZIO_TYPE_IOCTL && zio->io_cmd == DKIOCTRIM) + if (zio->io_type == ZIO_TYPE_FREE && + zio->io_priority != ZIO_PRIORITY_NOW) { switch (zio->io_error) { case 0: ZIO_TRIM_STAT_INCR(bytes, zio->io_size); @@ -2817,6 +2813,7 @@ zio_vdev_io_assess(zio_t **ziop) ZIO_TRIM_STAT_BUMP(failed); break; } + } /* * If the I/O failed, determine whether we should attempt to retry it. @@ -2900,9 +2897,8 @@ zio_vdev_io_bypass(zio_t *zio) * ========================================================================== */ static int -zio_checksum_generate(zio_t **ziop) +zio_checksum_generate(zio_t *zio) { - zio_t *zio = *ziop; blkptr_t *bp = zio->io_bp; enum zio_checksum checksum; @@ -2932,9 +2928,8 @@ zio_checksum_generate(zio_t **ziop) } static int -zio_checksum_verify(zio_t **ziop) +zio_checksum_verify(zio_t *zio) { - zio_t *zio = *ziop; zio_bad_cksum_t info; blkptr_t *bp = zio->io_bp; int error; @@ -3005,9 +3000,8 @@ zio_worst_error(int e1, int e2) * ========================================================================== */ static int -zio_ready(zio_t **ziop) +zio_ready(zio_t *zio) { - zio_t *zio = *ziop; blkptr_t *bp = zio->io_bp; zio_t *pio, *pio_next; @@ -3064,9 +3058,8 @@ zio_ready(zio_t **ziop) } static int -zio_done(zio_t **ziop) +zio_done(zio_t *zio) { - zio_t *zio = *ziop; spa_t *spa = zio->io_spa; zio_t *lio = zio->io_logical; blkptr_t *bp = zio->io_bp; From smh at FreeBSD.org Thu Aug 21 22:47:04 2014 From: smh at FreeBSD.org (Steven Hartland) Date: Thu, 21 Aug 2014 22:47:03 +0000 (UTC) Subject: svn commit: r270313 - in stable/10/sys/cam: ata scsi Message-ID: <201408212247.s7LMl3JM033978@svn.freebsd.org> Author: smh Date: Thu Aug 21 22:47:03 2014 New Revision: 270313 URL: http://svnweb.freebsd.org/changeset/base/270313 Log: MFC r269974 - Added 4K quirks for Corsair Force GT and Samsung 840 SSDs Sponsored by: Multiplay Modified: stable/10/sys/cam/ata/ata_da.c stable/10/sys/cam/scsi/scsi_da.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ata/ata_da.c ============================================================================== --- stable/10/sys/cam/ata/ata_da.c Thu Aug 21 22:44:08 2014 (r270312) +++ stable/10/sys/cam/ata/ata_da.c Thu Aug 21 22:47:03 2014 (r270313) @@ -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: stable/10/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_da.c Thu Aug 21 22:44:08 2014 (r270312) +++ stable/10/sys/cam/scsi/scsi_da.c Thu Aug 21 22:47:03 2014 (r270313) @@ -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 ian at FreeBSD.org Thu Aug 21 22:49:42 2014 From: ian at FreeBSD.org (Ian Lepore) Date: Thu, 21 Aug 2014 22:49:42 +0000 (UTC) Subject: svn commit: r270314 - stable/10 Message-ID: <201408212249.s7LMngTL035791@svn.freebsd.org> Author: ian Date: Thu Aug 21 22:49:41 2014 New Revision: 270314 URL: http://svnweb.freebsd.org/changeset/base/270314 Log: Commit of mergeinfo only to record the fact that r270311 changes are in 10-stable (I did the commit to the wrong branch first). Modified: Directory Properties: stable/10/ (props changed) From gjb at FreeBSD.org Fri Aug 22 00:54:01 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Fri, 22 Aug 2014 00:54:00 +0000 (UTC) Subject: svn commit: r270316 - stable/10/etc Message-ID: <201408220054.s7M0s0As096576@svn.freebsd.org> Author: gjb Date: Fri Aug 22 00:54:00 2014 New Revision: 270316 URL: http://svnweb.freebsd.org/changeset/base/270316 Log: Use 'WITHOUT_TESTS=1' instead of 'MK_TESTS=no' in the 'distribute' target of etc/Makefile, because we do not allow command-line use of 'make MK_TESTS=no' in stable/10. This fixes a regression introduced in r270187 that causes the release build to fail, and a direct commit to stable/10. Sponsored by: The FreeBSD Foundation Modified: stable/10/etc/Makefile Modified: stable/10/etc/Makefile ============================================================================== --- stable/10/etc/Makefile Thu Aug 21 22:53:14 2014 (r270315) +++ stable/10/etc/Makefile Fri Aug 22 00:54:00 2014 (r270316) @@ -176,7 +176,7 @@ afterinstall: distribute: # Avoid installing tests here; "make distribution" will do this and # correctly place them in the right location. - ${_+_}cd ${.CURDIR} ; ${MAKE} MK_TESTS=no install \ + ${_+_}cd ${.CURDIR} ; ${MAKE} WITHOUT_TESTS=1 install \ DESTDIR=${DISTDIR}/${DISTRIBUTION} ${_+_}cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION} From julian at freebsd.org Fri Aug 22 02:46:08 2014 From: julian at freebsd.org (Julian Elischer) Date: Thu, 21 Aug 2014 19:46:00 -0700 Subject: svn commit: r270159 - in stable/10: lib/libvmmapi sys/amd64/amd64 sys/amd64/include sys/amd64/vmm sys/amd64/vmm/intel sys/amd64/vmm/io sys/x86/include usr.sbin/bhyve usr.sbin/bhyvectl usr.sbin/bhyv... In-Reply-To: <201408190120.s7J1KP93011521@svn.freebsd.org> References: <201408190120.s7J1KP93011521@svn.freebsd.org> Message-ID: <53F6AEE8.7010308@freebsd.org> On 8/18/14, 6:20 PM, Peter Grehan wrote: > Author: grehan > Date: Tue Aug 19 01:20:24 2014 > New Revision: 270159 > URL: http://svnweb.freebsd.org/changeset/base/270159 a couple of features I've wished for when using vbox and now bhyve.. maybe these are there but hidden.. I don't know.. 1/ ability to assign a serial port to a listenning TCP socket.. similar to the kernel debug option you have now (though worryingly a doc I said mentioned that that was going away, which I think is a pitty) 2/ the ability to run a script file when an internal ethernet port is brought up. like the ppp and mpd link-up/link-down scripts. to do things like add an address to the tap interface or add firewall rules etc. 3/ (and I may look at doing this myself).. add an option to connect to netgraph for networking. vbox did this at one stage.. not sure if they still do. WIll investigate. From kostikbel at gmail.com Fri Aug 22 06:22:14 2014 From: kostikbel at gmail.com (Konstantin Belousov) Date: Fri, 22 Aug 2014 09:22:07 +0300 Subject: svn commit: r270294 - stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace In-Reply-To: <201408211945.s7LJjqST049739@svn.freebsd.org> References: <201408211945.s7LJjqST049739@svn.freebsd.org> Message-ID: <20140822062207.GK2737@kib.kiev.ua> On Thu, Aug 21, 2014 at 07:45:52PM +0000, Mark Johnston wrote: > Author: markj > Date: Thu Aug 21 19:45:52 2014 > New Revision: 270294 > URL: http://svnweb.freebsd.org/changeset/base/270294 > > Log: > MFC r269525: > Return 0 for the PPID of threads in process 0, as process 0 doesn't have a > parent process. > > Modified: > stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c > Directory Properties: > stable/10/ (props changed) > > Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c > ============================================================================== > --- stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Thu Aug 21 19:42:24 2014 (r270293) > +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Thu Aug 21 19:45:52 2014 (r270294) > @@ -3415,7 +3415,10 @@ dtrace_dif_variable(dtrace_mstate_t *mst > */ > return ((uint64_t)curthread->t_procp->p_ppid); > #else > - return ((uint64_t)curproc->p_pptr->p_pid); > + if (curproc->p_pid == proc0.p_pid) > + return (curproc->p_pid); > + else > + return (curproc->p_pptr->p_pid); > #endif > > case DIF_VAR_TID: BTW, does the code look for the parent, or for the debugger of the current process ? I mean, should the snippet above use p_pptr or real_parent() ? -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From kib at FreeBSD.org Fri Aug 22 07:09:55 2014 From: kib at FreeBSD.org (Konstantin Belousov) Date: Fri, 22 Aug 2014 07:09:54 +0000 (UTC) Subject: svn commit: r270319 - stable/10/sys/fs/nullfs Message-ID: <201408220709.s7M79sKx063644@svn.freebsd.org> Author: kib Date: Fri Aug 22 07:09:54 2014 New Revision: 270319 URL: http://svnweb.freebsd.org/changeset/base/270319 Log: MFC r269708: Unlock ldvp and lock dvp to compensate for possible ldvp unlock in lower VOP_LOOKUP() and dvp reclamation. Use cached value of dvp->v_mount. Modified: stable/10/sys/fs/nullfs/null_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nullfs/null_vnops.c ============================================================================== --- stable/10/sys/fs/nullfs/null_vnops.c Fri Aug 22 05:03:30 2014 (r270318) +++ stable/10/sys/fs/nullfs/null_vnops.c Fri Aug 22 07:09:54 2014 (r270319) @@ -361,9 +361,11 @@ null_lookup(struct vop_lookup_args *ap) struct vnode *dvp = ap->a_dvp; int flags = cnp->cn_flags; struct vnode *vp, *ldvp, *lvp; + struct mount *mp; int error; - if ((flags & ISLASTCN) && (dvp->v_mount->mnt_flag & MNT_RDONLY) && + mp = dvp->v_mount; + if ((flags & ISLASTCN) != 0 && (mp->mnt_flag & MNT_RDONLY) != 0 && (cnp->cn_nameiop == DELETE || cnp->cn_nameiop == RENAME)) return (EROFS); /* @@ -376,9 +378,43 @@ null_lookup(struct vop_lookup_args *ap) ((dvp->v_vflag & VV_ROOT) != 0 && (flags & ISDOTDOT) == 0), ("ldvp %p fl %#x dvp %p fl %#x flags %#x", ldvp, ldvp->v_vflag, dvp, dvp->v_vflag, flags)); + + /* + * Hold ldvp. The reference on it, owned by dvp, is lost in + * case of dvp reclamation, and we need ldvp to move our lock + * from ldvp to dvp. + */ + vhold(ldvp); + error = VOP_LOOKUP(ldvp, &lvp, cnp); - if (error == EJUSTRETURN && (flags & ISLASTCN) && - (dvp->v_mount->mnt_flag & MNT_RDONLY) && + + /* + * VOP_LOOKUP() on lower vnode may unlock ldvp, which allows + * dvp to be reclaimed due to shared v_vnlock. Check for the + * doomed state and return error. + */ + if ((error == 0 || error == EJUSTRETURN) && + (dvp->v_iflag & VI_DOOMED) != 0) { + error = ENOENT; + if (lvp != NULL) + vput(lvp); + + /* + * If vgone() did reclaimed dvp before curthread + * relocked ldvp, the locks of dvp and ldpv are no + * longer shared. In this case, relock of ldvp in + * lower fs VOP_LOOKUP() does not restore the locking + * state of dvp. Compensate for this by unlocking + * ldvp and locking dvp, which is also correct if the + * locks are still shared. + */ + VOP_UNLOCK(ldvp, 0); + vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY); + } + vdrop(ldvp); + + if (error == EJUSTRETURN && (flags & ISLASTCN) != 0 && + (mp->mnt_flag & MNT_RDONLY) != 0 && (cnp->cn_nameiop == CREATE || cnp->cn_nameiop == RENAME)) error = EROFS; @@ -388,7 +424,7 @@ null_lookup(struct vop_lookup_args *ap) VREF(dvp); vrele(lvp); } else { - error = null_nodeget(dvp->v_mount, lvp, &vp); + error = null_nodeget(mp, lvp, &vp); if (error == 0) *ap->a_vpp = vp; } From glebius at FreeBSD.org Fri Aug 22 10:31:58 2014 From: glebius at FreeBSD.org (Gleb Smirnoff) Date: Fri, 22 Aug 2014 10:31:57 +0000 (UTC) Subject: svn commit: r270323 - stable/9/sys/modules/if_carp Message-ID: <201408221031.s7MAVvHD061157@svn.freebsd.org> Author: glebius Date: Fri Aug 22 10:31:57 2014 New Revision: 270323 URL: http://svnweb.freebsd.org/changeset/base/270323 Log: if_carp.ko depends on sha1.c. This is direct commit to stable/9, since modern carp is diverged a lot from it. Relevant commit to head was r228576. Submitted by: Damir Bikmuhametov Modified: stable/9/sys/modules/if_carp/Makefile Modified: stable/9/sys/modules/if_carp/Makefile ============================================================================== --- stable/9/sys/modules/if_carp/Makefile Fri Aug 22 08:22:40 2014 (r270322) +++ stable/9/sys/modules/if_carp/Makefile Fri Aug 22 10:31:57 2014 (r270323) @@ -1,11 +1,12 @@ # $FreeBSD$ .PATH: ${.CURDIR}/../../netinet +.PATH: ${.CURDIR}/../../crypto .include KMOD= if_carp -SRCS= ip_carp.c +SRCS= ip_carp.c sha1.c SRCS+= opt_carp.h opt_bpf.h opt_inet.h opt_inet6.h vnode_if.h .if !defined(KERNBUILDDIR) From marck at FreeBSD.org Fri Aug 22 11:50:35 2014 From: marck at FreeBSD.org (Dmitry Morozovsky) Date: Fri, 22 Aug 2014 11:50:34 +0000 (UTC) Subject: svn commit: r270325 - stable/9/share/misc Message-ID: <201408221150.s7MBoYZR096705@svn.freebsd.org> Author: marck (doc committer) Date: Fri Aug 22 11:50:34 2014 New Revision: 270325 URL: http://svnweb.freebsd.org/changeset/base/270325 Log: MFC bsd-family tree up to r269882 (from the stable/9 creation time), thus documenting many defferent releases up to date. Modified: stable/9/share/misc/bsd-family-tree Directory Properties: stable/9/share/misc/ (props changed) Modified: stable/9/share/misc/bsd-family-tree ============================================================================== --- stable/9/share/misc/bsd-family-tree Fri Aug 22 10:49:51 2014 (r270324) +++ stable/9/share/misc/bsd-family-tree Fri Aug 22 11:50:34 2014 (r270325) @@ -62,9 +62,9 @@ Tenth Edition | | | 4.4BSD | | | / | | | | 4.4BSD-Encumbered | | - | NetBSD 0.8 | BSD/386 1.0 - | | | | -FreeBSD 1.0 NetBSD 0.9 | BSD/386 1.1 + | -NetBSD 0.8 | BSD/386 1.0 + | / | | | +FreeBSD 1.0 <-----' NetBSD 0.9 | BSD/386 1.1 | | .----- 4.4BSD Lite | FreeBSD 1.1 | / / | \ | | | / / | \ | @@ -110,9 +110,11 @@ FreeBSD 2.1 | | | | | | | | NetBSD 1.3.2 | | | FreeBSD 2.2.7 | | | | | | | | | | | | | BSD/OS 4.0 - | v | | | | | | | FreeBSD 2.2.8 | | | | | | - | | | | | OpenBSD 2.4 | + | | | | | | | | + | v | | | | OpenBSD 2.4 | + | FreeBSD 2.2.9 | | | | | | + | | | | | | | FreeBSD 3.0 <--------* | | v | | | | | NetBSD 1.3.3 | | *---FreeBSD 3.1 | | | | @@ -216,39 +218,103 @@ FreeBSD 5.2 | | | | 10.5 | | | | | | | OpenBSD 4.2 | | | | NetBSD 4.0 | | - | FreeBSD 6.3 | | | | - | \ | | | | - *--FreeBSD | | | | DragonFly 1.12.0 - | 7.0 | | | | | - | | | | | OpenBSD 4.3 | - | | | | | | DragonFly 2.0.0 - | | FreeBSD | | OpenBSD 4.4 | + | FreeBSD 6.3 | | | | | + | \ | | | | | + *--FreeBSD | | | | | DragonFly 1.12.0 + | 7.0 | | | | | | + | | | | | | OpenBSD 4.3 | + | | | | | NetBSD | DragonFly 2.0.0 + | | FreeBSD | | 4.0.1 OpenBSD 4.4 | | | 6.4 | | | | | | | | | | | FreeBSD 7.1 | | | | | | | | | DragonFly 2.2.0 | FreeBSD 7.2 | NetBSD 5.0 OpenBSD 4.5 | - | \ | | | | | - | | Mac OS X | | | | - | | 10.6 | | | | - | | | | | | DragonFly 2.4.0 - | | | | | OpenBSD 4.6 | - | | | | | | | - *--FreeBSD | | | | | | - | 8.0 | | | | | | - | | FreeBSD | | | | | - | | 7.3 | | | | DragonFly 2.6.0 - | | | | | | OpenBSD 4.7 | - | FreeBSD | | | | | | - | 8.1 | | | | | | - | | | | | | | DragonFly 2.8.2 - | | | | | | OpenBSD 4.8 | - | | | | | NetBSD 5.1 | | - | FreeBSD FreeBSD | | | | - | 8.2 7.4 | | | DragonFly 2.10.1 - | v | | OpenBSD 4.9 | + | \ | | | \ | | + | | Mac OS X | | \ | | + | | 10.6 | | \ | | + | | | | | NetBSD | DragonFly 2.4.0 + | | | | | 5.0.1 OpenBSD 4.6 | + | | | | | | | | + *--FreeBSD | | | | | | | + | 8.0 | | | | | | | + | | FreeBSD | | | NetBSD | | + | | 7.3 | | | 5.0.2 | DragonFly 2.6.0 + | | | | | | OpenBSD 4.7 | + | FreeBSD | | | | | | + | 8.1 | | | | | | + | | | | | | | DragonFly 2.8.2 + | | | | | | OpenBSD 4.8 | + | | | | | *--NetBSD | | + | FreeBSD FreeBSD | | | 5.1 | | + | 8.2 7.4 | | | | | DragonFly 2.10.1 + | | | | | | OpenBSD 4.9 | + | `-----. Mac OS X | | | | | + | \ 10.7 | | | | | + | | | | | | OpenBSD 5.0 | + *--FreeBSD | | | | | | | + | 9.0 | | | | NetBSD | DragonFly 3.0.1 + | | FreeBSD | | | 5.1.2 | | + | | 8.3 | | | | | | + | | | | | | NetBSD | | + | | | | | | 5.1.3 | | + | | | | | | OpenBSD 5.1 | + | | | Mac OS X | `----. | | + | | | 10.8 | \ | | + | | | | NetBSD 6.0 | | | + | | | | | | | | OpenBSD 5.2 DragonFly 3.2.1 + | FreeBSD | | | | | NetBSD | | + | 9.1 | | | | | 5.2 | | + | | | | | | | | | | + | | | | | | | NetBSD | | + | | | | | | | 5.2.1 | | + | | | | | | | | | + | | | | | | \ | | + | | | | | | NetBSD | | + | | | | | | 6.0.1 | | + | | | | | | | | | + | | | | | | NetBSD | | + | | | | | | 6.0.2 | | + | | | | | | | OpenBSD 5.3 DragonFly 3.4.1 + | | | | | | NetBSD | | + | | | | | | 6.0.3 | | + | | | | | | | | | + | | | | | | NetBSD | | + | | | | | | 6.0.4 | | + | | | | | | | | | + | | | | | | NetBSD | | + | | | | | | 6.0.5 | | + | | | | | | | | + | | | | | |`-NetBSD 6.1 | | + | | FreeBSD | | | | | + | | 8.4 | | NetBSD 6.1.1 | | + | | | | | | | + | 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 + | FreeBSD | | | | + | 9.3 | | | | | | | | | -FreeBSD 9 -current | NetBSD -current OpenBSD -current | + | | | | | + | | | | | + | | | | | + | | | | | + | | | | | + | | | | | + | | | | | +FreeBSD 11 -current | NetBSD -current OpenBSD -current DragonFly -current | | | | | v v v v v @@ -492,6 +558,7 @@ FreeBSD 6.0 2005-11-01 [FBD] NetBSD 2.1 2005-11-02 [NBD] NetBSD 3.0 2005-12-23 [NBD] DragonFly 1.4.0 2006-01-08 [DFB] +FreeBSD 2.2.9 2006-04-01 [FBD] OpenBSD 3.9 2006-05-01 [OBD] FreeBSD 6.1 2006-05-08 [FBD] FreeBSD 5.5 2006-05-25 [FBD] @@ -520,9 +587,11 @@ NetBSD 5.0 2009-04-29 [NBD] OpenBSD 4.5 2009-05-01 [OBD] FreeBSD 7.2 2009-05-04 [FBD] Mac OS X 10.6 2009-06-08 [APL] +NetBSD 5.0.1 2009-08-02 [NBD] (security/critical release) DragonFly 2.4.0 2009-09-16 [DFB] OpenBSD 4.6 2009-10-18 [OBD] FreeBSD 8.0 2009-11-26 [FBD] +NetBSD 5.0.2 2010-02-12 [NBD] (security/critical release) FreeBSD 7.3 2010-03-23 [FBD] DragonFly 2.6.0 2010-03-28 [DFB] OpenBSD 4.7 2010-05-19 [OBD] @@ -534,6 +603,44 @@ FreeBSD 7.4 2011-02-24 [FBD] FreeBSD 8.2 2011-02-24 [FBD] DragonFly 2.10.1 2011-04-26 [DFB] OpenBSD 4.9 2011-05-01 [OBD] +Mac OS X 10.7 2011-07-20 [APL] +OpenBSD 5.0 2011-11-01 [OBD] +FreeBSD 9.0 2012-01-12 [FBD] +NetBSD 5.1.2 2012-02-02 [NBD] (security/critical release) +DragonFly 3.0.1 2012-02-21 [DFB] +FreeBSD 8.3 2012-04-18 [FBD] +OpenBSD 5.1 2012-05-01 [OBD] +Mac OS X 10.8 2012-07-25 [APL] +NetBSD 6.0 2012-10-17 [NBD] +OpenBSD 5.2 2012-11-01 [OBD] +DragonFly 3.2.1 2012-11-02 [DFB] +NetBSD 5.2 2012-12-03 [NBD] +NetBSD 6.0.1 2012-12-26 [NBD] (security/critical release) +FreeBSD 9.1 2012-12-30 [FBD] +DragonFly 3.4.1 2013-04-29 [DFB] +OpenBSD 5.3 2013-05-01 [OBD] +NetBSD 6.0.2 2013-05-18 [NBD] (security/critical release) +NetBSD 6.1 2013-05-18 [NBD] +FreeBSD 8.4 2013-06-07 [FBD] +NetBSD 6.1.1 2013-08-22 [NBD] +NetBSD 5.1.3 2013-09-29 [NBD] +NetBSD 5.2.1 2013-09-29 [NBD] +FreeBSD 9.2 2013-09-30 [FBD] +NetBSD 6.0.3 2013-09-30 [NBD] +NetBSD 6.1.2 2013-09-30 [NBD] +Mac OS X 10.9 2013-10-22 [APL] +OpenBSD 5.4 2013-11-01 [OBD] +DragonFly 3.6.0 2013-11-25 [DFB] +FreeBSD 10.0 2014-01-20 [FBD] +NetBSD 6.0.4 2014-01-27 [NBD] +NetBSD 6.1.3 2014-01-27 [NBD] +DragonFly 3.6.1 2014-02-22 [DFB] +DragonFly 3.6.2 2014-04-10 [DFB] +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 ------------------------ @@ -591,7 +698,7 @@ original BSD announcements from Usenet o Steven M. Schultz for providing 2.8BSD, 2.10BSD, 2.11BSD manual pages. -- -Copyright (c) 1997-2007 Wolfram Schneider -URL: http://cvsweb.freebsd.org/src/share/misc/bsd-family-tree +Copyright (c) 1997-2012 Wolfram Schneider +URL: http://svnweb.freebsd.org/base/head/share/misc/bsd-family-tree $FreeBSD$ From glebius at FreeBSD.org Fri Aug 22 13:39:57 2014 From: glebius at FreeBSD.org (Gleb Smirnoff) Date: Fri, 22 Aug 2014 13:39:56 +0000 (UTC) Subject: svn commit: r270328 - stable/10/sys/netpfil/pf Message-ID: <201408221339.s7MDduX4048562@svn.freebsd.org> Author: glebius Date: Fri Aug 22 13:39:56 2014 New Revision: 270328 URL: http://svnweb.freebsd.org/changeset/base/270328 Log: Merge r268492: On machines with strict alignment copy pfsync_state_key from packet on stack to avoid unaligned access. PR: 187381 Modified: stable/10/sys/netpfil/pf/if_pfsync.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netpfil/pf/if_pfsync.c ============================================================================== --- stable/10/sys/netpfil/pf/if_pfsync.c Fri Aug 22 13:15:59 2014 (r270327) +++ stable/10/sys/netpfil/pf/if_pfsync.c Fri Aug 22 13:39:56 2014 (r270328) @@ -400,6 +400,10 @@ static int pfsync_state_import(struct pfsync_state *sp, u_int8_t flags) { struct pfsync_softc *sc = V_pfsyncif; +#ifndef __NO_STRICT_ALIGNMENT + struct pfsync_state_key key[2]; +#endif + struct pfsync_state_key *kw, *ks; struct pf_state *st = NULL; struct pf_state_key *skw = NULL, *sks = NULL; struct pf_rule *r = NULL; @@ -449,12 +453,19 @@ pfsync_state_import(struct pfsync_state if ((skw = uma_zalloc(V_pf_state_key_z, M_NOWAIT)) == NULL) goto cleanup; - if (PF_ANEQ(&sp->key[PF_SK_WIRE].addr[0], - &sp->key[PF_SK_STACK].addr[0], sp->af) || - PF_ANEQ(&sp->key[PF_SK_WIRE].addr[1], - &sp->key[PF_SK_STACK].addr[1], sp->af) || - sp->key[PF_SK_WIRE].port[0] != sp->key[PF_SK_STACK].port[0] || - sp->key[PF_SK_WIRE].port[1] != sp->key[PF_SK_STACK].port[1]) { +#ifndef __NO_STRICT_ALIGNMENT + bcopy(&sp->key, key, sizeof(struct pfsync_state_key) * 2); + kw = &key[PF_SK_WIRE]; + ks = &key[PF_SK_STACK]; +#else + kw = &sp->key[PF_SK_WIRE]; + ks = &sp->key[PF_SK_STACK]; +#endif + + if (PF_ANEQ(&kw->addr[0], &ks->addr[0], sp->af) || + PF_ANEQ(&kw->addr[1], &ks->addr[1], sp->af) || + kw->port[0] != ks->port[0] || + kw->port[1] != ks->port[1]) { sks = uma_zalloc(V_pf_state_key_z, M_NOWAIT); if (sks == NULL) goto cleanup; @@ -466,18 +477,18 @@ pfsync_state_import(struct pfsync_state pfsync_alloc_scrub_memory(&sp->dst, &st->dst)) goto cleanup; - /* copy to state key(s) */ - skw->addr[0] = sp->key[PF_SK_WIRE].addr[0]; - skw->addr[1] = sp->key[PF_SK_WIRE].addr[1]; - skw->port[0] = sp->key[PF_SK_WIRE].port[0]; - skw->port[1] = sp->key[PF_SK_WIRE].port[1]; + /* Copy to state key(s). */ + skw->addr[0] = kw->addr[0]; + skw->addr[1] = kw->addr[1]; + skw->port[0] = kw->port[0]; + skw->port[1] = kw->port[1]; skw->proto = sp->proto; skw->af = sp->af; if (sks != skw) { - sks->addr[0] = sp->key[PF_SK_STACK].addr[0]; - sks->addr[1] = sp->key[PF_SK_STACK].addr[1]; - sks->port[0] = sp->key[PF_SK_STACK].port[0]; - sks->port[1] = sp->key[PF_SK_STACK].port[1]; + sks->addr[0] = ks->addr[0]; + sks->addr[1] = ks->addr[1]; + sks->port[0] = ks->port[0]; + sks->port[1] = ks->port[1]; sks->proto = sp->proto; sks->af = sp->af; } From markj at FreeBSD.org Fri Aug 22 15:00:48 2014 From: markj at FreeBSD.org (Mark Johnston) Date: Fri, 22 Aug 2014 10:59:28 -0400 Subject: svn commit: r270294 - stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace In-Reply-To: <20140822062207.GK2737@kib.kiev.ua> References: <201408211945.s7LJjqST049739@svn.freebsd.org> <20140822062207.GK2737@kib.kiev.ua> Message-ID: <20140822145928.GA75918@charmander.home> On Fri, Aug 22, 2014 at 09:22:07AM +0300, Konstantin Belousov wrote: > On Thu, Aug 21, 2014 at 07:45:52PM +0000, Mark Johnston wrote: > > Author: markj > > Date: Thu Aug 21 19:45:52 2014 > > New Revision: 270294 > > URL: http://svnweb.freebsd.org/changeset/base/270294 > > > > Log: > > MFC r269525: > > Return 0 for the PPID of threads in process 0, as process 0 doesn't have a > > parent process. > > > > Modified: > > stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c > > Directory Properties: > > stable/10/ (props changed) > > > > Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c > > ============================================================================== > > --- stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Thu Aug 21 19:42:24 2014 (r270293) > > +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Thu Aug 21 19:45:52 2014 (r270294) > > @@ -3415,7 +3415,10 @@ dtrace_dif_variable(dtrace_mstate_t *mst > > */ > > return ((uint64_t)curthread->t_procp->p_ppid); > > #else > > - return ((uint64_t)curproc->p_pptr->p_pid); > > + if (curproc->p_pid == proc0.p_pid) > > + return (curproc->p_pid); > > + else > > + return (curproc->p_pptr->p_pid); > > #endif > > > > case DIF_VAR_TID: > BTW, does the code look for the parent, or for the debugger of the current > process ? I mean, should the snippet above use p_pptr or real_parent() ? It should return the parent of the process; it's effectively an implementation of getppid() for DTrace scripts. proc_realparent() requires the proctree lock to be held though, so it can't really be used here. This code is in the DTrace probe handler, so it runs with interrupts disabled, and it also could be called from a context where the shared lock is already held. From bryanv at FreeBSD.org Fri Aug 22 15:12:21 2014 From: bryanv at FreeBSD.org (Bryan Venteicher) Date: Fri, 22 Aug 2014 15:12:20 +0000 (UTC) Subject: svn commit: r270334 - stable/10/sys/dev/virtio/network Message-ID: <201408221512.s7MFCKZO094630@svn.freebsd.org> Author: bryanv Date: Fri Aug 22 15:12:20 2014 New Revision: 270334 URL: http://svnweb.freebsd.org/changeset/base/270334 Log: MFC r268481: Rework when the Tx queue completion interrupt is enabled The Tx interrupt is now kept disabled in the common case, only enabled when the number of free descriptors in the queue falls below a threshold. Transmitted frames are cleared from the VQ before subsequent transmit, or in the watchdog timer. This was a very big performance improvement for an experimental Netmap bhyve backend. Modified: stable/10/sys/dev/virtio/network/if_vtnet.c stable/10/sys/dev/virtio/network/if_vtnetvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/virtio/network/if_vtnet.c ============================================================================== --- stable/10/sys/dev/virtio/network/if_vtnet.c Fri Aug 22 15:10:26 2014 (r270333) +++ stable/10/sys/dev/virtio/network/if_vtnet.c Fri Aug 22 15:12:20 2014 (r270334) @@ -126,6 +126,8 @@ static int vtnet_rxq_eof(struct vtnet_rx static void vtnet_rx_vq_intr(void *); static void vtnet_rxq_tq_intr(void *, int); +static int vtnet_txq_below_threshold(struct vtnet_txq *); +static int vtnet_txq_notify(struct vtnet_txq *); static void vtnet_txq_free_mbufs(struct vtnet_txq *); static int vtnet_txq_offload_ctx(struct vtnet_txq *, struct mbuf *, int *, int *, int *); @@ -147,7 +149,7 @@ static void vtnet_txq_tq_deferred(void * #endif static void vtnet_txq_start(struct vtnet_txq *); static void vtnet_txq_tq_intr(void *, int); -static void vtnet_txq_eof(struct vtnet_txq *); +static int vtnet_txq_eof(struct vtnet_txq *); static void vtnet_tx_vq_intr(void *); static void vtnet_tx_start_all(struct vtnet_softc *); @@ -204,6 +206,8 @@ static void vtnet_ifmedia_sts(struct ifn static void vtnet_get_hwaddr(struct vtnet_softc *); static void vtnet_set_hwaddr(struct vtnet_softc *); static void vtnet_vlan_tag_remove(struct mbuf *); +static void vtnet_set_rx_process_limit(struct vtnet_softc *); +static void vtnet_set_tx_intr_threshold(struct vtnet_softc *); static void vtnet_setup_rxq_sysctl(struct sysctl_ctx_list *, struct sysctl_oid_list *, struct vtnet_rxq *); @@ -239,19 +243,6 @@ TUNABLE_INT("hw.vtnet.mq_max_pairs", &vt static int vtnet_rx_process_limit = 512; TUNABLE_INT("hw.vtnet.rx_process_limit", &vtnet_rx_process_limit); -/* - * Reducing the number of transmit completed interrupts can improve - * performance. To do so, the define below keeps the Tx vq interrupt - * disabled and adds calls to vtnet_txeof() in the start and watchdog - * paths. The price to pay for this is the m_free'ing of transmitted - * mbufs may be delayed until the watchdog fires. - * - * BMV: Reintroduce this later as a run-time option, if it makes - * sense after the EVENT_IDX feature is supported. - * - * #define VTNET_TX_INTR_MODERATION - */ - static uma_zone_t vtnet_tx_header_zone; static struct virtio_feature_desc vtnet_feature_desc[] = { @@ -901,7 +892,6 @@ vtnet_setup_interface(struct vtnet_softc { device_t dev; struct ifnet *ifp; - int limit; dev = sc->vtnet_dev; @@ -1000,11 +990,8 @@ vtnet_setup_interface(struct vtnet_softc vtnet_unregister_vlan, sc, EVENTHANDLER_PRI_FIRST); } - limit = vtnet_tunable_int(sc, "rx_process_limit", - vtnet_rx_process_limit); - if (limit < 0) - limit = INT_MAX; - sc->vtnet_rx_process_limit = limit; + vtnet_set_rx_process_limit(sc); + vtnet_set_tx_intr_threshold(sc); return (0); } @@ -1895,6 +1882,44 @@ vtnet_rxq_tq_intr(void *xrxq, int pendin VTNET_RXQ_UNLOCK(rxq); } +static int +vtnet_txq_below_threshold(struct vtnet_txq *txq) +{ + struct vtnet_softc *sc; + struct virtqueue *vq; + + sc = txq->vtntx_sc; + vq = txq->vtntx_vq; + + return (virtqueue_nfree(vq) <= sc->vtnet_tx_intr_thresh); +} + +static int +vtnet_txq_notify(struct vtnet_txq *txq) +{ + struct virtqueue *vq; + + vq = txq->vtntx_vq; + + txq->vtntx_watchdog = VTNET_TX_TIMEOUT; + virtqueue_notify(vq); + + if (vtnet_txq_enable_intr(txq) == 0) + return (0); + + /* + * Drain frames that were completed since last checked. If this + * causes the queue to go above the threshold, the caller should + * continue transmitting. + */ + if (vtnet_txq_eof(txq) != 0 && vtnet_txq_below_threshold(txq) == 0) { + virtqueue_disable_intr(vq); + return (1); + } + + return (0); +} + static void vtnet_txq_free_mbufs(struct vtnet_txq *txq) { @@ -2169,11 +2194,11 @@ vtnet_start_locked(struct vtnet_txq *txq struct vtnet_softc *sc; struct virtqueue *vq; struct mbuf *m0; - int enq; + int tries, enq; sc = txq->vtntx_sc; vq = txq->vtntx_vq; - enq = 0; + tries = 0; VTNET_TXQ_LOCK_ASSERT(txq); @@ -2183,6 +2208,9 @@ vtnet_start_locked(struct vtnet_txq *txq vtnet_txq_eof(txq); +again: + enq = 0; + while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { if (virtqueue_full(vq)) break; @@ -2201,9 +2229,12 @@ vtnet_start_locked(struct vtnet_txq *txq ETHER_BPF_MTAP(ifp, m0); } - if (enq > 0) { - virtqueue_notify(vq); - txq->vtntx_watchdog = VTNET_TX_TIMEOUT; + if (enq > 0 && vtnet_txq_notify(txq) != 0) { + if (tries++ < VTNET_NOTIFY_RETRIES) + goto again; + + txq->vtntx_stats.vtxs_rescheduled++; + taskqueue_enqueue(txq->vtntx_tq, &txq->vtntx_intrtask); } } @@ -2230,13 +2261,13 @@ vtnet_txq_mq_start_locked(struct vtnet_t struct virtqueue *vq; struct buf_ring *br; struct ifnet *ifp; - int enq, error; + int enq, tries, error; sc = txq->vtntx_sc; vq = txq->vtntx_vq; br = txq->vtntx_br; ifp = sc->vtnet_ifp; - enq = 0; + tries = 0; error = 0; VTNET_TXQ_LOCK_ASSERT(txq); @@ -2256,14 +2287,16 @@ vtnet_txq_mq_start_locked(struct vtnet_t vtnet_txq_eof(txq); +again: + enq = 0; + while ((m = drbr_peek(ifp, br)) != NULL) { if (virtqueue_full(vq)) { drbr_putback(ifp, br, m); break; } - error = vtnet_txq_encap(txq, &m); - if (error) { + if (vtnet_txq_encap(txq, &m) != 0) { if (m != NULL) drbr_putback(ifp, br, m); else @@ -2276,9 +2309,12 @@ vtnet_txq_mq_start_locked(struct vtnet_t ETHER_BPF_MTAP(ifp, m); } - if (enq > 0) { - virtqueue_notify(vq); - txq->vtntx_watchdog = VTNET_TX_TIMEOUT; + if (enq > 0 && vtnet_txq_notify(txq) != 0) { + if (tries++ < VTNET_NOTIFY_RETRIES) + goto again; + + txq->vtntx_stats.vtxs_rescheduled++; + taskqueue_enqueue(txq->vtntx_tq, &txq->vtntx_intrtask); } return (0); @@ -2366,30 +2402,26 @@ vtnet_txq_tq_intr(void *xtxq, int pendin } vtnet_txq_eof(txq); - vtnet_txq_start(txq); - if (vtnet_txq_enable_intr(txq) != 0) { - vtnet_txq_disable_intr(txq); - txq->vtntx_stats.vtxs_rescheduled++; - taskqueue_enqueue(txq->vtntx_tq, &txq->vtntx_intrtask); - } - VTNET_TXQ_UNLOCK(txq); } -static void +static int vtnet_txq_eof(struct vtnet_txq *txq) { struct virtqueue *vq; struct vtnet_tx_header *txhdr; struct mbuf *m; + int deq; vq = txq->vtntx_vq; + deq = 0; VTNET_TXQ_LOCK_ASSERT(txq); while ((txhdr = virtqueue_dequeue(vq, NULL)) != NULL) { m = txhdr->vth_mbuf; + deq++; txq->vtntx_stats.vtxs_opackets++; txq->vtntx_stats.vtxs_obytes += m->m_pkthdr.len; @@ -2402,6 +2434,8 @@ vtnet_txq_eof(struct vtnet_txq *txq) if (virtqueue_empty(vq)) txq->vtntx_watchdog = 0; + + return (deq); } static void @@ -2410,12 +2444,10 @@ vtnet_tx_vq_intr(void *xtxq) struct vtnet_softc *sc; struct vtnet_txq *txq; struct ifnet *ifp; - int tries; txq = xtxq; sc = txq->vtntx_sc; ifp = sc->vtnet_ifp; - tries = 0; if (__predict_false(txq->vtntx_id >= sc->vtnet_act_vq_pairs)) { /* @@ -2430,30 +2462,15 @@ vtnet_tx_vq_intr(void *xtxq) VTNET_TXQ_LOCK(txq); -again: if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { VTNET_TXQ_UNLOCK(txq); return; } vtnet_txq_eof(txq); - vtnet_txq_start(txq); - if (vtnet_txq_enable_intr(txq) != 0) { - vtnet_txq_disable_intr(txq); - /* - * This is an occasional race, so retry a few times - * before scheduling the taskqueue. - */ - if (tries++ < VTNET_INTR_DISABLE_RETRIES) - goto again; - - VTNET_TXQ_UNLOCK(txq); - txq->vtntx_stats.vtxs_rescheduled++; - taskqueue_enqueue(txq->vtntx_tq, &txq->vtntx_intrtask); - } else - VTNET_TXQ_UNLOCK(txq); + VTNET_TXQ_UNLOCK(txq); } static void @@ -2500,21 +2517,31 @@ vtnet_qflush(struct ifnet *ifp) static int vtnet_watchdog(struct vtnet_txq *txq) { - struct vtnet_softc *sc; + struct ifnet *ifp; - sc = txq->vtntx_sc; + ifp = txq->vtntx_sc->vtnet_ifp; VTNET_TXQ_LOCK(txq); - if (sc->vtnet_flags & VTNET_FLAG_EVENT_IDX) - vtnet_txq_eof(txq); + if (txq->vtntx_watchdog == 1) { + /* + * Only drain completed frames if the watchdog is about to + * expire. If any frames were drained, there may be enough + * free descriptors now available to transmit queued frames. + * In that case, the timer will immediately be decremented + * below, but the timeout is generous enough that should not + * be a problem. + */ + if (vtnet_txq_eof(txq) != 0) + vtnet_txq_start(txq); + } + if (txq->vtntx_watchdog == 0 || --txq->vtntx_watchdog) { VTNET_TXQ_UNLOCK(txq); return (0); } VTNET_TXQ_UNLOCK(txq); - if_printf(sc->vtnet_ifp, "watchdog timeout on queue %d\n", - txq->vtntx_id); + if_printf(ifp, "watchdog timeout on queue %d\n", txq->vtntx_id); return (1); } @@ -3564,6 +3591,50 @@ vtnet_vlan_tag_remove(struct mbuf *m) } static void +vtnet_set_rx_process_limit(struct vtnet_softc *sc) +{ + int limit; + + limit = vtnet_tunable_int(sc, "rx_process_limit", + vtnet_rx_process_limit); + if (limit < 0) + limit = INT_MAX; + sc->vtnet_rx_process_limit = limit; +} + +static void +vtnet_set_tx_intr_threshold(struct vtnet_softc *sc) +{ + device_t dev; + int size, thresh; + + dev = sc->vtnet_dev; + size = virtqueue_size(sc->vtnet_txqs[0].vtntx_vq); + + /* + * The Tx interrupt is disabled until the queue free count falls + * below our threshold. Completed frames are drained from the Tx + * virtqueue before transmitting new frames and in the watchdog + * callout, so the frequency of Tx interrupts is greatly reduced, + * at the cost of not freeing mbufs as quickly as they otherwise + * would be. + * + * N.B. We assume all the Tx queues are the same size. + */ + thresh = size / 4; + + /* + * Without indirect descriptors, leave enough room for the most + * segments we handle. + */ + if (virtio_with_feature(dev, VIRTIO_RING_F_INDIRECT_DESC) == 0 && + thresh < sc->vtnet_tx_nsegs) + thresh = sc->vtnet_tx_nsegs; + + sc->vtnet_tx_intr_thresh = thresh; +} + +static void vtnet_setup_rxq_sysctl(struct sysctl_ctx_list *ctx, struct sysctl_oid_list *child, struct vtnet_rxq *rxq) { @@ -3758,8 +3829,18 @@ vtnet_rxq_disable_intr(struct vtnet_rxq static int vtnet_txq_enable_intr(struct vtnet_txq *txq) { + struct virtqueue *vq; + + vq = txq->vtntx_vq; + + if (vtnet_txq_below_threshold(txq) != 0) + return (virtqueue_postpone_intr(vq, VQ_POSTPONE_LONG)); - return (virtqueue_postpone_intr(txq->vtntx_vq, VQ_POSTPONE_LONG)); + /* + * The free count is above our threshold. Keep the Tx interrupt + * disabled until the queue is fuller. + */ + return (0); } static void Modified: stable/10/sys/dev/virtio/network/if_vtnetvar.h ============================================================================== --- stable/10/sys/dev/virtio/network/if_vtnetvar.h Fri Aug 22 15:10:26 2014 (r270333) +++ stable/10/sys/dev/virtio/network/if_vtnetvar.h Fri Aug 22 15:12:20 2014 (r270334) @@ -149,6 +149,7 @@ struct vtnet_softc { int vtnet_rx_nmbufs; int vtnet_rx_clsize; int vtnet_rx_new_clsize; + int vtnet_tx_intr_thresh; int vtnet_tx_nsegs; int vtnet_if_flags; int vtnet_act_vq_pairs; @@ -183,6 +184,14 @@ struct vtnet_softc { #define VTNET_INTR_DISABLE_RETRIES 4 /* + * Similarly, additional completed entries can appear in a virtqueue + * between when lasted checked and before notifying the host. Number + * of times to retry before scheduling the taskqueue to process the + * queue. + */ +#define VTNET_NOTIFY_RETRIES 4 + +/* * Fake the media type. The host does not provide us with any real media * information. */ From emaste at FreeBSD.org Fri Aug 22 18:09:07 2014 From: emaste at FreeBSD.org (Ed Maste) Date: Fri, 22 Aug 2014 18:09:06 +0000 (UTC) Subject: svn commit: r270344 - in stable/10/sys/amd64: amd64 include Message-ID: <201408221809.s7MI96Cc077094@svn.freebsd.org> Author: emaste Date: Fri Aug 22 18:09:06 2014 New Revision: 270344 URL: http://svnweb.freebsd.org/changeset/base/270344 Log: MFC r263822: amd64: Parse the EFI memory map if present With this change (and loader.efi from [HEAD]) we can now boot under qemu using the OVMF UEFI firmware image with the limitation that a serial console is required. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/amd64/amd64/machdep.c stable/10/sys/amd64/include/metadata.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/machdep.c ============================================================================== --- stable/10/sys/amd64/amd64/machdep.c Fri Aug 22 17:49:24 2014 (r270343) +++ stable/10/sys/amd64/amd64/machdep.c Fri Aug 22 18:09:06 2014 (r270344) @@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1424,6 +1425,100 @@ add_smap_entries(struct bios_smap *smapb } } +#define efi_next_descriptor(ptr, size) \ + ((struct efi_md *)(((uint8_t *) ptr) + size)) + +static void +add_efi_map_entries(struct efi_map_header *efihdr, vm_paddr_t *physmap, + int *physmap_idx) +{ + struct efi_md *map, *p; + const char *type; + size_t efisz; + int ndesc, i; + + static const char *types[] = { + "Reserved", + "LoaderCode", + "LoaderData", + "BootServicesCode", + "BootServicesData", + "RuntimeServicesCode", + "RuntimeServicesData", + "ConventionalMemory", + "UnusableMemory", + "ACPIReclaimMemory", + "ACPIMemoryNVS", + "MemoryMappedIO", + "MemoryMappedIOPortSpace", + "PalCode" + }; + + /* + * Memory map data provided by UEFI via the GetMemoryMap + * Boot Services API. + */ + efisz = (sizeof(struct efi_map_header) + 0xf) & ~0xf; + map = (struct efi_md *)((uint8_t *)efihdr + efisz); + + if (efihdr->descriptor_size == 0) + return; + ndesc = efihdr->memory_size / efihdr->descriptor_size; + + if (boothowto & RB_VERBOSE) + printf("%23s %12s %12s %8s %4s\n", + "Type", "Physical", "Virtual", "#Pages", "Attr"); + + for (i = 0, p = map; i < ndesc; i++, + p = efi_next_descriptor(p, efihdr->descriptor_size)) { + if (boothowto & RB_VERBOSE) { + if (p->md_type <= EFI_MD_TYPE_PALCODE) + type = types[p->md_type]; + else + type = ""; + printf("%23s %012lx %12p %08lx ", type, p->md_phys, + p->md_virt, p->md_pages); + if (p->md_attr & EFI_MD_ATTR_UC) + printf("UC "); + if (p->md_attr & EFI_MD_ATTR_WC) + printf("WC "); + if (p->md_attr & EFI_MD_ATTR_WT) + printf("WT "); + if (p->md_attr & EFI_MD_ATTR_WB) + printf("WB "); + if (p->md_attr & EFI_MD_ATTR_UCE) + printf("UCE "); + if (p->md_attr & EFI_MD_ATTR_WP) + printf("WP "); + if (p->md_attr & EFI_MD_ATTR_RP) + printf("RP "); + if (p->md_attr & EFI_MD_ATTR_XP) + printf("XP "); + if (p->md_attr & EFI_MD_ATTR_RT) + printf("RUNTIME"); + printf("\n"); + } + + switch (p->md_type) { + case EFI_MD_TYPE_CODE: + case EFI_MD_TYPE_DATA: + case EFI_MD_TYPE_BS_CODE: + case EFI_MD_TYPE_BS_DATA: + case EFI_MD_TYPE_FREE: + /* + * We're allowed to use any entry with these types. + */ + break; + default: + continue; + } + + if (!add_physmap_entry(p->md_phys, (p->md_pages * PAGE_SIZE), + physmap, physmap_idx)) + break; + } +} + /* * Populate the (physmap) array with base/bound pairs describing the * available physical memory in the system, then test this memory and @@ -1442,18 +1537,24 @@ getmemsize(caddr_t kmdp, u_int64_t first u_long physmem_start, physmem_tunable, memtest; pt_entry_t *pte; struct bios_smap *smapbase; + struct efi_map_header *efihdr; quad_t dcons_addr, dcons_size; bzero(physmap, sizeof(physmap)); basemem = 0; physmap_idx = 0; + efihdr = (struct efi_map_header *)preload_search_info(kmdp, + MODINFO_METADATA | MODINFOMD_EFI_MAP); smapbase = (struct bios_smap *)preload_search_info(kmdp, MODINFO_METADATA | MODINFOMD_SMAP); - if (smapbase == NULL) - panic("No BIOS smap info from loader!"); - add_smap_entries(smapbase, physmap, &physmap_idx); + if (efihdr != NULL) + add_efi_map_entries(efihdr, physmap, &physmap_idx); + else if (smapbase != NULL) + add_smap_entries(smapbase, physmap, &physmap_idx); + else + panic("No BIOS smap or EFI map info from loader!"); /* * Find the 'base memory' segment for SMP Modified: stable/10/sys/amd64/include/metadata.h ============================================================================== --- stable/10/sys/amd64/include/metadata.h Fri Aug 22 17:49:24 2014 (r270343) +++ stable/10/sys/amd64/include/metadata.h Fri Aug 22 18:09:06 2014 (r270344) @@ -32,5 +32,12 @@ #define MODINFOMD_SMAP 0x1001 #define MODINFOMD_SMAP_XATTR 0x1002 #define MODINFOMD_DTBP 0x1003 +#define MODINFOMD_EFI_MAP 0x1004 + +struct efi_map_header { + size_t memory_size; + size_t descriptor_size; + uint32_t descriptor_version; +}; #endif /* !_MACHINE_METADATA_H_ */ From tuexen at FreeBSD.org Fri Aug 22 19:37:52 2014 From: tuexen at FreeBSD.org (Michael Tuexen) Date: Fri, 22 Aug 2014 19:37:50 +0000 (UTC) Subject: svn commit: r270350 - stable/10/sys/netinet Message-ID: <201408221937.s7MJboa3020827@svn.freebsd.org> Author: tuexen Date: Fri Aug 22 19:37:50 2014 New Revision: 270350 URL: http://svnweb.freebsd.org/changeset/base/270350 Log: MFC r268526: Integrate upstream changes. Modified: stable/10/sys/netinet/sctp_input.c stable/10/sys/netinet/sctp_output.c stable/10/sys/netinet/sctp_pcb.c stable/10/sys/netinet/sctp_sysctl.c stable/10/sys/netinet/sctp_timer.c stable/10/sys/netinet/sctp_usrreq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_input.c ============================================================================== --- stable/10/sys/netinet/sctp_input.c Fri Aug 22 19:23:38 2014 (r270349) +++ stable/10/sys/netinet/sctp_input.c Fri Aug 22 19:37:50 2014 (r270350) @@ -47,7 +47,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#if defined(INET) || defined(INET6) #include +#endif #include @@ -5603,12 +5605,14 @@ sctp_common_input_processing(struct mbuf calc_check, check, (void *)m, length, iphlen); stcb = sctp_findassociation_addr(m, offset, src, dst, sh, ch, &inp, &net, vrf_id); +#if defined(INET) || defined(INET6) if ((net != NULL) && (port != 0)) { if (net->port == 0) { sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr)); } net->port = port; } +#endif if ((net != NULL) && (use_mflowid != 0)) { net->flowid = mflowid; #ifdef INVARIANTS @@ -5634,12 +5638,14 @@ sctp_common_input_processing(struct mbuf } stcb = sctp_findassociation_addr(m, offset, src, dst, sh, ch, &inp, &net, vrf_id); +#if defined(INET) || defined(INET6) if ((net != NULL) && (port != 0)) { if (net->port == 0) { sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr)); } net->port = port; } +#endif if ((net != NULL) && (use_mflowid != 0)) { net->flowid = mflowid; #ifdef INVARIANTS @@ -5748,12 +5754,14 @@ sctp_common_input_processing(struct mbuf * it changes our INP. */ inp = stcb->sctp_ep; +#if defined(INET) || defined(INET6) if ((net) && (port)) { if (net->port == 0) { sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr)); } net->port = port; } +#endif } } else { /* Modified: stable/10/sys/netinet/sctp_output.c ============================================================================== --- stable/10/sys/netinet/sctp_output.c Fri Aug 22 19:23:38 2014 (r270349) +++ stable/10/sys/netinet/sctp_output.c Fri Aug 22 19:37:50 2014 (r270350) @@ -50,7 +50,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#if defined(INET) || defined(INET6) #include +#endif #include #include @@ -10964,13 +10966,14 @@ sctp_send_resp_msg(struct sockaddr *src, struct mbuf *mout; struct sctphdr *shout; struct sctp_chunkhdr *ch; - struct udphdr *udp; - int len, cause_len, padding_len; #if defined(INET) || defined(INET6) + struct udphdr *udp; int ret; #endif + int len, cause_len, padding_len; + #ifdef INET struct sockaddr_in *src_sin, *dst_sin; struct ip *ip; @@ -11021,9 +11024,11 @@ sctp_send_resp_msg(struct sockaddr *src, default: break; } +#if defined(INET) || defined(INET6) if (port) { len += sizeof(struct udphdr); } +#endif mout = sctp_get_mbuf_for_msg(len + max_linkhdr, 1, M_NOWAIT, 1, MT_DATA); if (mout == NULL) { if (cause) { @@ -11094,6 +11099,7 @@ sctp_send_resp_msg(struct sockaddr *src, shout = mtod(mout, struct sctphdr *); break; } +#if defined(INET) || defined(INET6) if (port) { if (htons(SCTP_BASE_SYSCTL(sctp_udp_tunneling_port)) == 0) { sctp_m_freem(mout); @@ -11112,6 +11118,7 @@ sctp_send_resp_msg(struct sockaddr *src, } else { udp = NULL; } +#endif shout->src_port = sh->dest_port; shout->dest_port = sh->src_port; shout->checksum = 0; Modified: stable/10/sys/netinet/sctp_pcb.c ============================================================================== --- stable/10/sys/netinet/sctp_pcb.c Fri Aug 22 19:23:38 2014 (r270349) +++ stable/10/sys/netinet/sctp_pcb.c Fri Aug 22 19:37:50 2014 (r270350) @@ -46,7 +46,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#if defined(INET) || defined(INET6) #include +#endif #ifdef INET6 #include #endif @@ -4007,9 +4009,11 @@ sctp_add_remote_addr(struct sctp_tcb *st break; } } +#if defined(INET) || defined(INET6) if (net->port) { net->mtu -= (uint32_t) sizeof(struct udphdr); } +#endif if (from == SCTP_ALLOC_ASOC) { stcb->asoc.smallest_mtu = net->mtu; } Modified: stable/10/sys/netinet/sctp_sysctl.c ============================================================================== --- stable/10/sys/netinet/sctp_sysctl.c Fri Aug 22 19:23:38 2014 (r270349) +++ stable/10/sys/netinet/sctp_sysctl.c Fri Aug 22 19:37:50 2014 (r270350) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); void sctp_init_sysctls() { + printf("sctp_init_sysctls().\n"); SCTP_BASE_SYSCTL(sctp_sendspace) = SCTPCTL_MAXDGRAM_DEFAULT; SCTP_BASE_SYSCTL(sctp_recvspace) = SCTPCTL_RECVSPACE_DEFAULT; SCTP_BASE_SYSCTL(sctp_auto_asconf) = SCTPCTL_AUTOASCONF_DEFAULT; @@ -125,6 +126,7 @@ sctp_init_sysctls() SCTP_BASE_SYSCTL(sctp_inits_include_nat_friendly) = SCTPCTL_NAT_FRIENDLY_INITS_DEFAULT; #if defined(SCTP_DEBUG) SCTP_BASE_SYSCTL(sctp_debug_on) = SCTPCTL_DEBUG_DEFAULT; +printf("debug = %d.\n", SCTP_BASE_SYSCTL(sctp_debug_on)); #endif #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_BASE_SYSCTL(sctp_output_unlocked) = SCTPCTL_OUTPUT_UNLOCKED_DEFAULT; Modified: stable/10/sys/netinet/sctp_timer.c ============================================================================== --- stable/10/sys/netinet/sctp_timer.c Fri Aug 22 19:23:38 2014 (r270349) +++ stable/10/sys/netinet/sctp_timer.c Fri Aug 22 19:37:50 2014 (r270350) @@ -49,7 +49,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#if defined(INET) || defined(INET6) #include +#endif void @@ -1480,9 +1482,11 @@ sctp_pathmtu_timer(struct sctp_inpcb *in } if (net->ro._s_addr) { mtu = SCTP_GATHER_MTU_FROM_ROUTE(net->ro._s_addr, &net->ro._s_addr.sa, net->ro.ro_rt); +#if defined(INET) || defined(INET6) if (net->port) { mtu -= sizeof(struct udphdr); } +#endif if (mtu > next_mtu) { net->mtu = next_mtu; } Modified: stable/10/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/10/sys/netinet/sctp_usrreq.c Fri Aug 22 19:23:38 2014 (r270349) +++ stable/10/sys/netinet/sctp_usrreq.c Fri Aug 22 19:37:50 2014 (r270350) @@ -214,8 +214,6 @@ sctp_notify_mbuf(struct sctp_inpcb *inp, SCTP_TCB_UNLOCK(stcb); } -#endif - void sctp_notify(struct sctp_inpcb *inp, struct ip *ip, @@ -302,6 +300,8 @@ sctp_notify(struct sctp_inpcb *inp, } } +#endif + #ifdef INET void sctp_ctlinput(cmd, sa, vip) From tuexen at FreeBSD.org Fri Aug 22 19:40:30 2014 From: tuexen at FreeBSD.org (Michael Tuexen) Date: Fri, 22 Aug 2014 19:40:30 +0000 (UTC) Subject: svn commit: r270351 - stable/10/sys/netinet Message-ID: <201408221940.s7MJeU7f021434@svn.freebsd.org> Author: tuexen Date: Fri Aug 22 19:40:29 2014 New Revision: 270351 URL: http://svnweb.freebsd.org/changeset/base/270351 Log: MFC r268534: Bugfix: When a remote address was added to an endpoint, a source address was selected and cached, but it was not stored that is was cached. This resulted in selecting different source addresses for the INIT-ACK and COOKIE-ACK when possible. Thanks to Niu Zhixiong for reporting the issue. Modified: stable/10/sys/netinet/sctp_pcb.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_pcb.c ============================================================================== --- stable/10/sys/netinet/sctp_pcb.c Fri Aug 22 19:37:50 2014 (r270350) +++ stable/10/sys/netinet/sctp_pcb.c Fri Aug 22 19:40:29 2014 (r270351) @@ -3968,9 +3968,14 @@ sctp_add_remote_addr(struct sctp_tcb *st net, 0, stcb->asoc.vrf_id); - /* Now get the interface MTU */ - if (net->ro._s_addr && net->ro._s_addr->ifn_p) { - net->mtu = SCTP_GATHER_MTU_FROM_INTFC(net->ro._s_addr->ifn_p); + if (net->ro._s_addr != NULL) { + net->src_addr_selected = 1; + /* Now get the interface MTU */ + if (net->ro._s_addr->ifn_p != NULL) { + net->mtu = SCTP_GATHER_MTU_FROM_INTFC(net->ro._s_addr->ifn_p); + } + } else { + net->src_addr_selected = 0; } if (net->mtu > 0) { uint32_t rmtu; @@ -3992,6 +3997,8 @@ sctp_add_remote_addr(struct sctp_tcb *st net->mtu = rmtu; } } + } else { + net->src_addr_selected = 0; } if (net->mtu == 0) { switch (newaddr->sa_family) { @@ -4039,7 +4046,6 @@ sctp_add_remote_addr(struct sctp_tcb *st */ net->find_pseudo_cumack = 1; net->find_rtx_pseudo_cumack = 1; - net->src_addr_selected = 0; /* Choose an initial flowid. */ net->flowid = stcb->asoc.my_vtag ^ ntohs(stcb->rport) ^ From tuexen at FreeBSD.org Fri Aug 22 19:43:28 2014 From: tuexen at FreeBSD.org (Michael Tuexen) Date: Fri, 22 Aug 2014 19:43:27 +0000 (UTC) Subject: svn commit: r270352 - stable/10/sys/netinet Message-ID: <201408221943.s7MJhR4Q024979@svn.freebsd.org> Author: tuexen Date: Fri Aug 22 19:43:27 2014 New Revision: 270352 URL: http://svnweb.freebsd.org/changeset/base/270352 Log: MFC r268537: Whitespace changes. Modified: stable/10/sys/netinet/sctp_os_bsd.h stable/10/sys/netinet/sctp_var.h stable/10/sys/netinet/sctputil.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_os_bsd.h ============================================================================== --- stable/10/sys/netinet/sctp_os_bsd.h Fri Aug 22 19:40:29 2014 (r270351) +++ stable/10/sys/netinet/sctp_os_bsd.h Fri Aug 22 19:43:27 2014 (r270352) @@ -166,19 +166,19 @@ MALLOC_DECLARE(SCTP_M_MCORE); #if defined(SCTP_DEBUG) #define SCTPDBG(level, params...) \ { \ - do { \ - if (SCTP_BASE_SYSCTL(sctp_debug_on) & level ) { \ - SCTP_PRINTF(params); \ - } \ - } while (0); \ + do { \ + if (SCTP_BASE_SYSCTL(sctp_debug_on) & level ) { \ + SCTP_PRINTF(params); \ + } \ + } while (0); \ } #define SCTPDBG_ADDR(level, addr) \ { \ - do { \ + do { \ if (SCTP_BASE_SYSCTL(sctp_debug_on) & level ) { \ - sctp_print_address(addr); \ + sctp_print_address(addr); \ } \ - } while (0); \ + } while (0); \ } #else #define SCTPDBG(level, params...) @@ -194,11 +194,11 @@ MALLOC_DECLARE(SCTP_M_MCORE); #ifdef SCTP_LTRACE_ERRORS #define SCTP_LTRACE_ERR_RET_PKT(m, inp, stcb, net, file, err) \ if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LTRACE_ERROR_ENABLE) \ - SCTP_PRINTF("mbuf:%p inp:%p stcb:%p net:%p file:%x line:%d error:%d\n", \ + SCTP_PRINTF("mbuf:%p inp:%p stcb:%p net:%p file:%x line:%d error:%d\n", \ m, inp, stcb, net, file, __LINE__, err); #define SCTP_LTRACE_ERR_RET(inp, stcb, net, file, err) \ if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LTRACE_ERROR_ENABLE) \ - SCTP_PRINTF("inp:%p stcb:%p net:%p file:%x line:%d error:%d\n", \ + SCTP_PRINTF("inp:%p stcb:%p net:%p file:%x line:%d error:%d\n", \ inp, stcb, net, file, __LINE__, err); #else #define SCTP_LTRACE_ERR_RET_PKT(m, inp, stcb, net, file, err) @@ -232,16 +232,16 @@ MALLOC_DECLARE(SCTP_M_MCORE); * general memory allocation */ #define SCTP_MALLOC(var, type, size, name) \ - do { \ - var = (type)malloc(size, name, M_NOWAIT); \ - } while (0) + do { \ + var = (type)malloc(size, name, M_NOWAIT); \ + } while (0) #define SCTP_FREE(var, type) free(var, type) #define SCTP_MALLOC_SONAME(var, type, size) \ - do { \ - var = (type)malloc(size, M_SONAME, M_WAITOK | M_ZERO); \ - } while (0) + do { \ + var = (type)malloc(size, M_SONAME, M_WAITOK | M_ZERO); \ + } while (0) #define SCTP_FREE_SONAME(var) free(var, M_SONAME) Modified: stable/10/sys/netinet/sctp_var.h ============================================================================== --- stable/10/sys/netinet/sctp_var.h Fri Aug 22 19:40:29 2014 (r270351) +++ stable/10/sys/netinet/sctp_var.h Fri Aug 22 19:43:27 2014 (r270352) @@ -72,7 +72,7 @@ extern struct pr_usrreqs sctp_usrreqs; ((stcb->asoc.sctp_features & feature) == 0)) || \ ((stcb == NULL) && (inp != NULL) && \ ((inp->sctp_features & feature) == 0)) || \ - ((stcb == NULL) && (inp == NULL))) + ((stcb == NULL) && (inp == NULL))) /* managing mobility_feature in inpcb (by micchie) */ #define sctp_mobility_feature_on(inp, feature) (inp->sctp_mobility_features |= feature) @@ -106,7 +106,7 @@ extern struct pr_usrreqs sctp_usrreqs; #define sctp_alloc_a_readq(_stcb, _readq) { \ (_readq) = SCTP_ZONE_GET(SCTP_BASE_INFO(ipi_zone_readq), struct sctp_queued_to_read); \ if ((_readq)) { \ - SCTP_INCR_READQ_COUNT(); \ + SCTP_INCR_READQ_COUNT(); \ } \ } @@ -121,11 +121,11 @@ extern struct pr_usrreqs sctp_usrreqs; #define sctp_alloc_a_strmoq(_stcb, _strmoq) { \ (_strmoq) = SCTP_ZONE_GET(SCTP_BASE_INFO(ipi_zone_strmoq), struct sctp_stream_queue_pending); \ - if ((_strmoq)) { \ + if ((_strmoq)) { \ memset(_strmoq, 0, sizeof(struct sctp_stream_queue_pending)); \ SCTP_INCR_STRMOQ_COUNT(); \ (_strmoq)->holds_key_ref = 0; \ - } \ + } \ } #define sctp_free_a_chunk(_stcb, _chk, _so_locked) { \ @@ -133,22 +133,22 @@ extern struct pr_usrreqs sctp_usrreqs; sctp_auth_key_release((_stcb), (_chk)->auth_keyid, _so_locked); \ (_chk)->holds_key_ref = 0; \ } \ - if (_stcb) { \ - SCTP_TCB_LOCK_ASSERT((_stcb)); \ - if ((_chk)->whoTo) { \ - sctp_free_remote_addr((_chk)->whoTo); \ - (_chk)->whoTo = NULL; \ - } \ - if (((_stcb)->asoc.free_chunk_cnt > SCTP_BASE_SYSCTL(sctp_asoc_free_resc_limit)) || \ - (SCTP_BASE_INFO(ipi_free_chunks) > SCTP_BASE_SYSCTL(sctp_system_free_resc_limit))) { \ - SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_chunk), (_chk)); \ - SCTP_DECR_CHK_COUNT(); \ - } else { \ - TAILQ_INSERT_TAIL(&(_stcb)->asoc.free_chunks, (_chk), sctp_next); \ - (_stcb)->asoc.free_chunk_cnt++; \ - atomic_add_int(&SCTP_BASE_INFO(ipi_free_chunks), 1); \ - } \ - } else { \ + if (_stcb) { \ + SCTP_TCB_LOCK_ASSERT((_stcb)); \ + if ((_chk)->whoTo) { \ + sctp_free_remote_addr((_chk)->whoTo); \ + (_chk)->whoTo = NULL; \ + } \ + if (((_stcb)->asoc.free_chunk_cnt > SCTP_BASE_SYSCTL(sctp_asoc_free_resc_limit)) || \ + (SCTP_BASE_INFO(ipi_free_chunks) > SCTP_BASE_SYSCTL(sctp_system_free_resc_limit))) { \ + SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_chunk), (_chk)); \ + SCTP_DECR_CHK_COUNT(); \ + } else { \ + TAILQ_INSERT_TAIL(&(_stcb)->asoc.free_chunks, (_chk), sctp_next); \ + (_stcb)->asoc.free_chunk_cnt++; \ + atomic_add_int(&SCTP_BASE_INFO(ipi_free_chunks), 1); \ + } \ + } else { \ SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_chunk), (_chk)); \ SCTP_DECR_CHK_COUNT(); \ } \ @@ -159,7 +159,7 @@ extern struct pr_usrreqs sctp_usrreqs; (_chk) = SCTP_ZONE_GET(SCTP_BASE_INFO(ipi_zone_chunk), struct sctp_tmit_chunk); \ if ((_chk)) { \ SCTP_INCR_CHK_COUNT(); \ - (_chk)->whoTo = NULL; \ + (_chk)->whoTo = NULL; \ (_chk)->holds_key_ref = 0; \ } \ } else { \ @@ -167,7 +167,7 @@ extern struct pr_usrreqs sctp_usrreqs; TAILQ_REMOVE(&(_stcb)->asoc.free_chunks, (_chk), sctp_next); \ atomic_subtract_int(&SCTP_BASE_INFO(ipi_free_chunks), 1); \ (_chk)->holds_key_ref = 0; \ - SCTP_STAT_INCR(sctps_cached_chk); \ + SCTP_STAT_INCR(sctps_cached_chk); \ (_stcb)->asoc.free_chunk_cnt--; \ } \ } @@ -178,15 +178,15 @@ extern struct pr_usrreqs sctp_usrreqs; if (SCTP_DECREMENT_AND_CHECK_REFCOUNT(&(__net)->ref_count)) { \ (void)SCTP_OS_TIMER_STOP(&(__net)->rxt_timer.timer); \ (void)SCTP_OS_TIMER_STOP(&(__net)->pmtu_timer.timer); \ - if ((__net)->ro.ro_rt) { \ + if ((__net)->ro.ro_rt) { \ RTFREE((__net)->ro.ro_rt); \ (__net)->ro.ro_rt = NULL; \ - } \ + } \ if ((__net)->src_addr_selected) { \ sctp_free_ifa((__net)->ro._s_addr); \ (__net)->ro._s_addr = NULL; \ } \ - (__net)->src_addr_selected = 0; \ + (__net)->src_addr_selected = 0; \ (__net)->dest_state &= ~SCTP_ADDR_REACHABLE; \ SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_net), (__net)); \ SCTP_DECR_RADDR_COUNT(); \ @@ -250,12 +250,12 @@ extern struct pr_usrreqs sctp_usrreqs; } while (0) #define sctp_flight_size_increase(tp1) do { \ - (tp1)->whoTo->flight_size += (tp1)->book_size; \ + (tp1)->whoTo->flight_size += (tp1)->book_size; \ } while (0) #ifdef SCTP_FS_SPEC_LOG #define sctp_total_flight_decrease(stcb, tp1) do { \ - if (stcb->asoc.fs_index > SCTP_FS_SPEC_LOG_SIZE) \ + if (stcb->asoc.fs_index > SCTP_FS_SPEC_LOG_SIZE) \ stcb->asoc.fs_index = 0;\ stcb->asoc.fslog[stcb->asoc.fs_index].total_flight = stcb->asoc.total_flight; \ stcb->asoc.fslog[stcb->asoc.fs_index].tsn = tp1->rec.data.TSN_seq; \ @@ -264,7 +264,7 @@ extern struct pr_usrreqs sctp_usrreqs; stcb->asoc.fslog[stcb->asoc.fs_index].incr = 0; \ stcb->asoc.fslog[stcb->asoc.fs_index].decr = 1; \ stcb->asoc.fs_index++; \ - tp1->window_probe = 0; \ + tp1->window_probe = 0; \ if (stcb->asoc.total_flight >= tp1->book_size) { \ stcb->asoc.total_flight -= tp1->book_size; \ if (stcb->asoc.total_flight_count > 0) \ @@ -276,7 +276,7 @@ extern struct pr_usrreqs sctp_usrreqs; } while (0) #define sctp_total_flight_increase(stcb, tp1) do { \ - if (stcb->asoc.fs_index > SCTP_FS_SPEC_LOG_SIZE) \ + if (stcb->asoc.fs_index > SCTP_FS_SPEC_LOG_SIZE) \ stcb->asoc.fs_index = 0;\ stcb->asoc.fslog[stcb->asoc.fs_index].total_flight = stcb->asoc.total_flight; \ stcb->asoc.fslog[stcb->asoc.fs_index].tsn = tp1->rec.data.TSN_seq; \ @@ -285,14 +285,14 @@ extern struct pr_usrreqs sctp_usrreqs; stcb->asoc.fslog[stcb->asoc.fs_index].incr = 1; \ stcb->asoc.fslog[stcb->asoc.fs_index].decr = 0; \ stcb->asoc.fs_index++; \ - (stcb)->asoc.total_flight_count++; \ - (stcb)->asoc.total_flight += (tp1)->book_size; \ + (stcb)->asoc.total_flight_count++; \ + (stcb)->asoc.total_flight += (tp1)->book_size; \ } while (0) #else #define sctp_total_flight_decrease(stcb, tp1) do { \ - tp1->window_probe = 0; \ + tp1->window_probe = 0; \ if (stcb->asoc.total_flight >= tp1->book_size) { \ stcb->asoc.total_flight -= tp1->book_size; \ if (stcb->asoc.total_flight_count > 0) \ @@ -304,8 +304,8 @@ extern struct pr_usrreqs sctp_usrreqs; } while (0) #define sctp_total_flight_increase(stcb, tp1) do { \ - (stcb)->asoc.total_flight_count++; \ - (stcb)->asoc.total_flight += (tp1)->book_size; \ + (stcb)->asoc.total_flight_count++; \ + (stcb)->asoc.total_flight += (tp1)->book_size; \ } while (0) #endif Modified: stable/10/sys/netinet/sctputil.h ============================================================================== --- stable/10/sys/netinet/sctputil.h Fri Aug 22 19:40:29 2014 (r270351) +++ stable/10/sys/netinet/sctputil.h Fri Aug 22 19:43:27 2014 (r270352) @@ -276,42 +276,42 @@ sctp_free_bufspace(struct sctp_tcb *, st #define sctp_free_bufspace(stcb, asoc, tp1, chk_cnt) \ do { \ if (tp1->data != NULL) { \ - atomic_subtract_int(&((asoc)->chunks_on_out_queue), chk_cnt); \ + atomic_subtract_int(&((asoc)->chunks_on_out_queue), chk_cnt); \ if ((asoc)->total_output_queue_size >= tp1->book_size) { \ atomic_subtract_int(&((asoc)->total_output_queue_size), tp1->book_size); \ } else { \ (asoc)->total_output_queue_size = 0; \ } \ - if (stcb->sctp_socket && ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || \ - (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL))) { \ + if (stcb->sctp_socket && ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || \ + (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL))) { \ if (stcb->sctp_socket->so_snd.sb_cc >= tp1->book_size) { \ atomic_subtract_int(&((stcb)->sctp_socket->so_snd.sb_cc), tp1->book_size); \ } else { \ stcb->sctp_socket->so_snd.sb_cc = 0; \ } \ } \ - } \ + } \ } while (0) #endif #define sctp_free_spbufspace(stcb, asoc, sp) \ do { \ - if (sp->data != NULL) { \ + if (sp->data != NULL) { \ if ((asoc)->total_output_queue_size >= sp->length) { \ atomic_subtract_int(&(asoc)->total_output_queue_size, sp->length); \ } else { \ (asoc)->total_output_queue_size = 0; \ } \ - if (stcb->sctp_socket && ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || \ - (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL))) { \ + if (stcb->sctp_socket && ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || \ + (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL))) { \ if (stcb->sctp_socket->so_snd.sb_cc >= sp->length) { \ atomic_subtract_int(&stcb->sctp_socket->so_snd.sb_cc,sp->length); \ } else { \ stcb->sctp_socket->so_snd.sb_cc = 0; \ } \ } \ - } \ + } \ } while (0) #define sctp_snd_sb_alloc(stcb, sz) \ From tuexen at FreeBSD.org Fri Aug 22 19:46:23 2014 From: tuexen at FreeBSD.org (Michael Tuexen) Date: Fri, 22 Aug 2014 19:46:23 +0000 (UTC) Subject: svn commit: r270353 - stable/10/sys/netinet Message-ID: <201408221946.s7MJkNVY025463@svn.freebsd.org> Author: tuexen Date: Fri Aug 22 19:46:22 2014 New Revision: 270353 URL: http://svnweb.freebsd.org/changeset/base/270353 Log: MFC r269075: Initialize notification structures. This was missed in an earlier commit Modified: stable/10/sys/netinet/sctputil.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctputil.c ============================================================================== --- stable/10/sys/netinet/sctputil.c Fri Aug 22 19:43:27 2014 (r270352) +++ stable/10/sys/netinet/sctputil.c Fri Aug 22 19:46:22 2014 (r270353) @@ -2746,6 +2746,7 @@ sctp_notify_peer_addr_change(struct sctp return; SCTP_BUF_LEN(m_notify) = 0; spc = mtod(m_notify, struct sctp_paddr_change *); + memset(spc, 0, sizeof(struct sctp_paddr_change)); spc->spc_type = SCTP_PEER_ADDR_CHANGE; spc->spc_flags = 0; spc->spc_length = sizeof(struct sctp_paddr_change); @@ -3488,6 +3489,7 @@ sctp_notify_remote_error(struct sctp_tcb } SCTP_BUF_NEXT(m_notify) = NULL; sre = mtod(m_notify, struct sctp_remote_error *); + memset(sre, 0, notif_len); sre->sre_type = SCTP_REMOTE_ERROR; sre->sre_flags = 0; sre->sre_length = sizeof(struct sctp_remote_error); From tuexen at FreeBSD.org Fri Aug 22 19:49:45 2014 From: tuexen at FreeBSD.org (Michael Tuexen) Date: Fri, 22 Aug 2014 19:49:43 +0000 (UTC) Subject: svn commit: r270354 - stable/10/sys/netinet Message-ID: <201408221949.s7MJnhhd025925@svn.freebsd.org> Author: tuexen Date: Fri Aug 22 19:49:43 2014 New Revision: 270354 URL: http://svnweb.freebsd.org/changeset/base/270354 Log: MFC r269376: Cleanup sctp_send_initiate() and sctp_send_initiate_ack() to be in sync as much as possible. This simplifies upcoming changes. Modified: stable/10/sys/netinet/sctp_header.h stable/10/sys/netinet/sctp_indata.c stable/10/sys/netinet/sctp_input.c stable/10/sys/netinet/sctp_output.c stable/10/sys/netinet/sctputil.c stable/10/sys/netinet/sctputil.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_header.h ============================================================================== --- stable/10/sys/netinet/sctp_header.h Fri Aug 22 19:46:22 2014 (r270353) +++ stable/10/sys/netinet/sctp_header.h Fri Aug 22 19:49:43 2014 (r270354) @@ -82,12 +82,6 @@ struct sctp_supported_addr_param { uint16_t addr_type[2]; /* array of supported address types */ } SCTP_PACKED; -/* ECN parameter */ -struct sctp_ecn_supported_param { - struct sctp_paramhdr ph;/* type=SCTP_ECN_CAPABLE */ -} SCTP_PACKED; - - /* heartbeat info parameter */ struct sctp_heartbeat_info_param { struct sctp_paramhdr ph; Modified: stable/10/sys/netinet/sctp_indata.c ============================================================================== --- stable/10/sys/netinet/sctp_indata.c Fri Aug 22 19:46:22 2014 (r270353) +++ stable/10/sys/netinet/sctp_indata.c Fri Aug 22 19:49:43 2014 (r270354) @@ -2505,7 +2505,7 @@ sctp_process_data(struct mbuf **mm, int SCTP_BUF_LEN(merr) = sizeof(*phd); SCTP_BUF_NEXT(merr) = SCTP_M_COPYM(m, *offset, chk_length, M_NOWAIT); if (SCTP_BUF_NEXT(merr)) { - if (sctp_pad_lastmbuf(SCTP_BUF_NEXT(merr), SCTP_SIZE32(chk_length) - chk_length, NULL)) { + if (sctp_pad_lastmbuf(SCTP_BUF_NEXT(merr), SCTP_SIZE32(chk_length) - chk_length, NULL) == NULL) { sctp_m_freem(merr); } else { sctp_queue_op_err(stcb, merr); Modified: stable/10/sys/netinet/sctp_input.c ============================================================================== --- stable/10/sys/netinet/sctp_input.c Fri Aug 22 19:46:22 2014 (r270353) +++ stable/10/sys/netinet/sctp_input.c Fri Aug 22 19:49:43 2014 (r270354) @@ -5484,7 +5484,7 @@ process_control_chunks: SCTP_BUF_LEN(mm) = sizeof(*phd); SCTP_BUF_NEXT(mm) = SCTP_M_COPYM(m, *offset, chk_length, M_NOWAIT); if (SCTP_BUF_NEXT(mm)) { - if (sctp_pad_lastmbuf(SCTP_BUF_NEXT(mm), SCTP_SIZE32(chk_length) - chk_length, NULL)) { + if (sctp_pad_lastmbuf(SCTP_BUF_NEXT(mm), SCTP_SIZE32(chk_length) - chk_length, NULL) == NULL) { sctp_m_freem(mm); } else { #ifdef SCTP_MBUF_LOGGING Modified: stable/10/sys/netinet/sctp_output.c ============================================================================== --- stable/10/sys/netinet/sctp_output.c Fri Aug 22 19:46:22 2014 (r270353) +++ stable/10/sys/netinet/sctp_output.c Fri Aug 22 19:49:43 2014 (r270354) @@ -4700,7 +4700,7 @@ sctp_send_initiate(struct sctp_inpcb *in #endif ) { - struct mbuf *m; + struct mbuf *m, *m_last; struct sctp_nets *net; struct sctp_init_chunk *init; struct sctp_supported_addr_param *sup_addr; @@ -4775,80 +4775,17 @@ sctp_send_initiate(struct sctp_inpcb *in init->init.num_inbound_streams = htons(stcb->asoc.max_inbound_streams); init->init.initial_tsn = htonl(stcb->asoc.init_seq_number); - if (stcb->asoc.scope.ipv4_addr_legal || stcb->asoc.scope.ipv6_addr_legal) { - uint8_t i; - - parameter_len = (uint16_t) sizeof(struct sctp_paramhdr); - if (stcb->asoc.scope.ipv4_addr_legal) { - parameter_len += (uint16_t) sizeof(uint16_t); - } - if (stcb->asoc.scope.ipv6_addr_legal) { - parameter_len += (uint16_t) sizeof(uint16_t); - } - sup_addr = (struct sctp_supported_addr_param *)(mtod(m, caddr_t)+chunk_len); - sup_addr->ph.param_type = htons(SCTP_SUPPORTED_ADDRTYPE); - sup_addr->ph.param_length = htons(parameter_len); - i = 0; - if (stcb->asoc.scope.ipv4_addr_legal) { - sup_addr->addr_type[i++] = htons(SCTP_IPV4_ADDRESS); - } - if (stcb->asoc.scope.ipv6_addr_legal) { - sup_addr->addr_type[i++] = htons(SCTP_IPV6_ADDRESS); - } - padding_len = 4 - 2 * i; - chunk_len += parameter_len; - } /* Adaptation layer indication parameter */ if (inp->sctp_ep.adaptation_layer_indicator_provided) { - if (padding_len > 0) { - memset(mtod(m, caddr_t)+chunk_len, 0, padding_len); - chunk_len += padding_len; - padding_len = 0; - } parameter_len = (uint16_t) sizeof(struct sctp_adaptation_layer_indication); ali = (struct sctp_adaptation_layer_indication *)(mtod(m, caddr_t)+chunk_len); ali->ph.param_type = htons(SCTP_ULP_ADAPTATION); ali->ph.param_length = htons(parameter_len); - ali->indication = ntohl(inp->sctp_ep.adaptation_layer_indicator); - chunk_len += parameter_len; - } - if (SCTP_BASE_SYSCTL(sctp_inits_include_nat_friendly)) { - /* Add NAT friendly parameter. */ - if (padding_len > 0) { - memset(mtod(m, caddr_t)+chunk_len, 0, padding_len); - chunk_len += padding_len; - padding_len = 0; - } - parameter_len = (uint16_t) sizeof(struct sctp_paramhdr); - ph = (struct sctp_paramhdr *)(mtod(m, caddr_t)+chunk_len); - ph->param_type = htons(SCTP_HAS_NAT_SUPPORT); - ph->param_length = htons(parameter_len); - chunk_len += parameter_len; - } - /* now any cookie time extensions */ - if (stcb->asoc.cookie_preserve_req) { - struct sctp_cookie_perserve_param *cookie_preserve; - - if (padding_len > 0) { - memset(mtod(m, caddr_t)+chunk_len, 0, padding_len); - chunk_len += padding_len; - padding_len = 0; - } - parameter_len = (uint16_t) sizeof(struct sctp_cookie_perserve_param); - cookie_preserve = (struct sctp_cookie_perserve_param *)(mtod(m, caddr_t)+chunk_len); - cookie_preserve->ph.param_type = htons(SCTP_COOKIE_PRESERVE); - cookie_preserve->ph.param_length = htons(parameter_len); - cookie_preserve->time = htonl(stcb->asoc.cookie_preserve_req); - stcb->asoc.cookie_preserve_req = 0; + ali->indication = htonl(inp->sctp_ep.adaptation_layer_indicator); chunk_len += parameter_len; } /* ECN parameter */ if (stcb->asoc.ecn_allowed == 1) { - if (padding_len > 0) { - memset(mtod(m, caddr_t)+chunk_len, 0, padding_len); - chunk_len += padding_len; - padding_len = 0; - } parameter_len = (uint16_t) sizeof(struct sctp_paramhdr); ph = (struct sctp_paramhdr *)(mtod(m, caddr_t)+chunk_len); ph->param_type = htons(SCTP_ECN_CAPABLE); @@ -4856,21 +4793,24 @@ sctp_send_initiate(struct sctp_inpcb *in chunk_len += parameter_len; } /* And now tell the peer we do support PR-SCTP. */ - if (padding_len > 0) { - memset(mtod(m, caddr_t)+chunk_len, 0, padding_len); - chunk_len += padding_len; - padding_len = 0; - } parameter_len = (uint16_t) sizeof(struct sctp_paramhdr); ph = (struct sctp_paramhdr *)(mtod(m, caddr_t)+chunk_len); ph->param_type = htons(SCTP_PRSCTP_SUPPORTED); ph->param_length = htons(parameter_len); chunk_len += parameter_len; - /* And now tell the peer we do all the extensions */ + /* Add NAT friendly parameter. */ + if (SCTP_BASE_SYSCTL(sctp_inits_include_nat_friendly)) { + parameter_len = (uint16_t) sizeof(struct sctp_paramhdr); + ph = (struct sctp_paramhdr *)(mtod(m, caddr_t)+chunk_len); + ph->param_type = htons(SCTP_HAS_NAT_SUPPORT); + ph->param_length = htons(parameter_len); + chunk_len += parameter_len; + } + /* 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); - num_ext = 0; pr_supported->chunk_types[num_ext++] = SCTP_ASCONF; pr_supported->chunk_types[num_ext++] = SCTP_ASCONF_ACK; pr_supported->chunk_types[num_ext++] = SCTP_FORWARD_CUM_TSN; @@ -4943,8 +4883,52 @@ sctp_send_initiate(struct sctp_inpcb *in chunk_len += parameter_len; } } - SCTP_BUF_LEN(m) = chunk_len; + /* now any cookie time extensions */ + if (stcb->asoc.cookie_preserve_req) { + struct sctp_cookie_perserve_param *cookie_preserve; + if (padding_len > 0) { + memset(mtod(m, caddr_t)+chunk_len, 0, padding_len); + chunk_len += padding_len; + padding_len = 0; + } + parameter_len = (uint16_t) sizeof(struct sctp_cookie_perserve_param); + cookie_preserve = (struct sctp_cookie_perserve_param *)(mtod(m, caddr_t)+chunk_len); + cookie_preserve->ph.param_type = htons(SCTP_COOKIE_PRESERVE); + cookie_preserve->ph.param_length = htons(parameter_len); + cookie_preserve->time = htonl(stcb->asoc.cookie_preserve_req); + stcb->asoc.cookie_preserve_req = 0; + chunk_len += parameter_len; + } + if (stcb->asoc.scope.ipv4_addr_legal || stcb->asoc.scope.ipv6_addr_legal) { + uint8_t i; + + if (padding_len > 0) { + memset(mtod(m, caddr_t)+chunk_len, 0, padding_len); + chunk_len += padding_len; + padding_len = 0; + } + parameter_len = (uint16_t) sizeof(struct sctp_paramhdr); + if (stcb->asoc.scope.ipv4_addr_legal) { + parameter_len += (uint16_t) sizeof(uint16_t); + } + if (stcb->asoc.scope.ipv6_addr_legal) { + parameter_len += (uint16_t) sizeof(uint16_t); + } + sup_addr = (struct sctp_supported_addr_param *)(mtod(m, caddr_t)+chunk_len); + sup_addr->ph.param_type = htons(SCTP_SUPPORTED_ADDRTYPE); + sup_addr->ph.param_length = htons(parameter_len); + i = 0; + if (stcb->asoc.scope.ipv4_addr_legal) { + sup_addr->addr_type[i++] = htons(SCTP_IPV4_ADDRESS); + } + if (stcb->asoc.scope.ipv6_addr_legal) { + sup_addr->addr_type[i++] = htons(SCTP_IPV6_ADDRESS); + } + padding_len = 4 - 2 * i; + chunk_len += parameter_len; + } + SCTP_BUF_LEN(m) = chunk_len; /* now the addresses */ /* * To optimize this we could put the scoping stuff into a structure @@ -4952,18 +4936,13 @@ sctp_send_initiate(struct sctp_inpcb *in * we could just sifa in the address within the stcb. But for now * this is a quick hack to get the address stuff teased apart. */ - sctp_add_addresses_to_i_ia(inp, stcb, &stcb->asoc.scope, m, cnt_inits_to, &padding_len, &chunk_len); + m_last = sctp_add_addresses_to_i_ia(inp, stcb, &stcb->asoc.scope, + m, cnt_inits_to, + &padding_len, &chunk_len); init->ch.chunk_length = htons(chunk_len); if (padding_len > 0) { - struct mbuf *m_at, *mp_last; - - mp_last = NULL; - for (m_at = m; m_at; m_at = SCTP_BUF_NEXT(m_at)) { - if (SCTP_BUF_NEXT(m_at) == NULL) - mp_last = m_at; - } - if ((mp_last == NULL) || sctp_add_pad_tombuf(mp_last, padding_len)) { + if (sctp_add_pad_tombuf(m_last, padding_len) == NULL) { sctp_m_freem(m); return; } @@ -5100,7 +5079,6 @@ sctp_arethere_unrecognized_parameters(st *nat_friendly = 1; /* fall through */ case SCTP_PRSCTP_SUPPORTED: - if (padded_size != sizeof(struct sctp_paramhdr)) { SCTPDBG(SCTP_DEBUG_OUTPUT1, "Invalid size - error prsctp/nat support %d\n", plen); goto invalid_size; @@ -5108,7 +5086,7 @@ sctp_arethere_unrecognized_parameters(st at += padded_size; break; case SCTP_ECN_CAPABLE: - if (padded_size != sizeof(struct sctp_ecn_supported_param)) { + if (padded_size != sizeof(struct sctp_paramhdr)) { SCTPDBG(SCTP_DEBUG_OUTPUT1, "Invalid size - error ecn %d\n", plen); goto invalid_size; } @@ -5493,13 +5471,13 @@ sctp_send_initiate_ack(struct sctp_inpcb uint32_t vrf_id, uint16_t port, int hold_inp_lock) { struct sctp_association *asoc; - struct mbuf *m, *m_at, *m_tmp, *m_cookie, *op_err, *mp_last; + struct mbuf *m, *m_tmp, *m_last, *m_cookie, *op_err; struct sctp_init_ack_chunk *initack; struct sctp_adaptation_layer_indication *ali; - struct sctp_ecn_supported_param *ecn; - struct sctp_prsctp_supported_param *prsctp; struct sctp_supported_chunk_types_param *pr_supported; + struct sctp_paramhdr *ph; union sctp_sockstore *over_addr; + struct sctp_scoping scp; #ifdef INET struct sockaddr_in *dst4 = (struct sockaddr_in *)dst; @@ -5519,18 +5497,16 @@ sctp_send_initiate_ack(struct sctp_inpcb uint8_t *signature = NULL; int cnt_inits_to = 0; uint16_t his_limit, i_want; - int abort_flag, padval; - int num_ext; - int p_len; + int abort_flag; int nat_friendly = 0; struct socket *so; + uint16_t num_ext, chunk_len, padding_len, parameter_len; if (stcb) { asoc = &stcb->asoc; } else { asoc = NULL; } - mp_last = NULL; if ((asoc != NULL) && (SCTP_GET_STATE(asoc) != SCTP_STATE_COOKIE_WAIT) && (sctp_are_there_new_addresses(asoc, init_pkt, offset, src))) { @@ -5573,7 +5549,8 @@ do_a_abort: sctp_m_freem(op_err); return; } - SCTP_BUF_LEN(m) = sizeof(struct sctp_init_chunk); + chunk_len = (uint16_t) sizeof(struct sctp_init_ack_chunk); + padding_len = 0; /* * We might not overwrite the identification[] completely and on @@ -5897,161 +5874,156 @@ do_a_abort: /* adaptation layer indication parameter */ if (inp->sctp_ep.adaptation_layer_indicator_provided) { - ali = (struct sctp_adaptation_layer_indication *)((caddr_t)initack + sizeof(*initack)); + parameter_len = (uint16_t) sizeof(struct sctp_adaptation_layer_indication); + ali = (struct sctp_adaptation_layer_indication *)(mtod(m, caddr_t)+chunk_len); ali->ph.param_type = htons(SCTP_ULP_ADAPTATION); - ali->ph.param_length = htons(sizeof(*ali)); - ali->indication = ntohl(inp->sctp_ep.adaptation_layer_indicator); - SCTP_BUF_LEN(m) += sizeof(*ali); - ecn = (struct sctp_ecn_supported_param *)((caddr_t)ali + sizeof(*ali)); - } else { - ecn = (struct sctp_ecn_supported_param *)((caddr_t)initack + sizeof(*initack)); + ali->ph.param_length = htons(parameter_len); + ali->indication = htonl(inp->sctp_ep.adaptation_layer_indicator); + chunk_len += parameter_len; } - /* ECN parameter */ if (((asoc != NULL) && (asoc->ecn_allowed == 1)) || - (inp->sctp_ecn_enable == 1)) { - ecn->ph.param_type = htons(SCTP_ECN_CAPABLE); - ecn->ph.param_length = htons(sizeof(*ecn)); - SCTP_BUF_LEN(m) += sizeof(*ecn); - - prsctp = (struct sctp_prsctp_supported_param *)((caddr_t)ecn + - sizeof(*ecn)); - } else { - prsctp = (struct sctp_prsctp_supported_param *)((caddr_t)ecn); - } - /* And now tell the peer we do pr-sctp */ - prsctp->ph.param_type = htons(SCTP_PRSCTP_SUPPORTED); - prsctp->ph.param_length = htons(sizeof(*prsctp)); - SCTP_BUF_LEN(m) += sizeof(*prsctp); - if (nat_friendly) { - /* Add NAT friendly parameter */ - struct sctp_paramhdr *ph; + ((asoc == NULL) && (inp->sctp_ecn_enable == 1))) { + parameter_len = (uint16_t) sizeof(struct sctp_paramhdr); + ph = (struct sctp_paramhdr *)(mtod(m, caddr_t)+chunk_len); + ph->param_type = htons(SCTP_ECN_CAPABLE); + ph->param_length = htons(parameter_len); + chunk_len += parameter_len; + } + /* And now tell the peer we do pr-sctp */ + parameter_len = (uint16_t) sizeof(struct sctp_paramhdr); + ph = (struct sctp_paramhdr *)(mtod(m, caddr_t)+chunk_len); + ph->param_type = htons(SCTP_PRSCTP_SUPPORTED); + ph->param_length = htons(parameter_len); + chunk_len += parameter_len; - ph = (struct sctp_paramhdr *)(mtod(m, caddr_t)+SCTP_BUF_LEN(m)); + /* Add NAT friendly parameter */ + if (nat_friendly) { + parameter_len = (uint16_t) sizeof(struct sctp_paramhdr); + ph = (struct sctp_paramhdr *)(mtod(m, caddr_t)+chunk_len); ph->param_type = htons(SCTP_HAS_NAT_SUPPORT); ph->param_length = htons(sizeof(struct sctp_paramhdr)); - SCTP_BUF_LEN(m) += sizeof(struct sctp_paramhdr); + chunk_len += sizeof(struct sctp_paramhdr); } - /* And now tell the peer we do all the extensions */ - pr_supported = (struct sctp_supported_chunk_types_param *)(mtod(m, caddr_t)+SCTP_BUF_LEN(m)); - pr_supported->ph.param_type = htons(SCTP_SUPPORTED_CHUNK_EXT); + /* 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; pr_supported->chunk_types[num_ext++] = SCTP_FORWARD_CUM_TSN; pr_supported->chunk_types[num_ext++] = SCTP_PACKET_DROPPED; pr_supported->chunk_types[num_ext++] = SCTP_STREAM_RESET; - if (!SCTP_BASE_SYSCTL(sctp_auth_disable)) + if (!SCTP_BASE_SYSCTL(sctp_auth_disable)) { pr_supported->chunk_types[num_ext++] = SCTP_AUTHENTICATION; - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off)) + } + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off)) { pr_supported->chunk_types[num_ext++] = SCTP_NR_SELECTIVE_ACK; - p_len = sizeof(*pr_supported) + num_ext; - pr_supported->ph.param_length = htons(p_len); - bzero((caddr_t)pr_supported + p_len, SCTP_SIZE32(p_len) - p_len); - SCTP_BUF_LEN(m) += SCTP_SIZE32(p_len); + } + 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; /* add authentication parameters */ if (!SCTP_BASE_SYSCTL(sctp_auth_disable)) { struct sctp_auth_random *randp; struct sctp_auth_hmac_algo *hmacs; struct sctp_auth_chunk_list *chunks; - uint16_t random_len; + if (padding_len > 0) { + memset(mtod(m, caddr_t)+chunk_len, 0, padding_len); + chunk_len += padding_len; + padding_len = 0; + } /* generate and add RANDOM parameter */ - random_len = SCTP_AUTH_RANDOM_SIZE_DEFAULT; - randp = (struct sctp_auth_random *)(mtod(m, caddr_t)+SCTP_BUF_LEN(m)); + randp = (struct sctp_auth_random *)(mtod(m, caddr_t)+chunk_len); + parameter_len = (uint16_t) sizeof(struct sctp_auth_random) + + SCTP_AUTH_RANDOM_SIZE_DEFAULT; randp->ph.param_type = htons(SCTP_RANDOM); - p_len = sizeof(*randp) + random_len; - randp->ph.param_length = htons(p_len); - SCTP_READ_RANDOM(randp->random_data, random_len); - /* zero out any padding required */ - bzero((caddr_t)randp + p_len, SCTP_SIZE32(p_len) - p_len); - SCTP_BUF_LEN(m) += SCTP_SIZE32(p_len); + randp->ph.param_length = htons(parameter_len); + SCTP_READ_RANDOM(randp->random_data, SCTP_AUTH_RANDOM_SIZE_DEFAULT); + padding_len = SCTP_SIZE32(parameter_len) - parameter_len; + chunk_len += parameter_len; + if (padding_len > 0) { + memset(mtod(m, caddr_t)+chunk_len, 0, padding_len); + chunk_len += padding_len; + padding_len = 0; + } /* add HMAC_ALGO parameter */ - hmacs = (struct sctp_auth_hmac_algo *)(mtod(m, caddr_t)+SCTP_BUF_LEN(m)); - p_len = sctp_serialize_hmaclist(inp->sctp_ep.local_hmacs, + hmacs = (struct sctp_auth_hmac_algo *)(mtod(m, caddr_t)+chunk_len); + parameter_len = (uint16_t) sizeof(struct sctp_auth_hmac_algo) + + sctp_serialize_hmaclist(inp->sctp_ep.local_hmacs, (uint8_t *) hmacs->hmac_ids); - if (p_len > 0) { - p_len += sizeof(*hmacs); - hmacs->ph.param_type = htons(SCTP_HMAC_LIST); - hmacs->ph.param_length = htons(p_len); - /* zero out any padding required */ - bzero((caddr_t)hmacs + p_len, SCTP_SIZE32(p_len) - p_len); - SCTP_BUF_LEN(m) += SCTP_SIZE32(p_len); + hmacs->ph.param_type = htons(SCTP_HMAC_LIST); + hmacs->ph.param_length = htons(parameter_len); + padding_len = SCTP_SIZE32(parameter_len) - parameter_len; + chunk_len += parameter_len; + + if (padding_len > 0) { + memset(mtod(m, caddr_t)+chunk_len, 0, padding_len); + chunk_len += padding_len; + padding_len = 0; } /* add CHUNKS parameter */ - chunks = (struct sctp_auth_chunk_list *)(mtod(m, caddr_t)+SCTP_BUF_LEN(m)); - p_len = sctp_serialize_auth_chunks(inp->sctp_ep.local_auth_chunks, + chunks = (struct sctp_auth_chunk_list *)(mtod(m, caddr_t)+chunk_len); + parameter_len = (uint16_t) sizeof(struct sctp_auth_chunk_list) + + sctp_serialize_auth_chunks(inp->sctp_ep.local_auth_chunks, chunks->chunk_types); - if (p_len > 0) { - p_len += sizeof(*chunks); - chunks->ph.param_type = htons(SCTP_CHUNK_LIST); - chunks->ph.param_length = htons(p_len); - /* zero out any padding required */ - bzero((caddr_t)chunks + p_len, SCTP_SIZE32(p_len) - p_len); - SCTP_BUF_LEN(m) += SCTP_SIZE32(p_len); - } + chunks->ph.param_type = htons(SCTP_CHUNK_LIST); + chunks->ph.param_length = htons(parameter_len); + padding_len = SCTP_SIZE32(parameter_len) - parameter_len; + chunk_len += parameter_len; } - m_at = m; + SCTP_BUF_LEN(m) = chunk_len; + m_last = m; /* now the addresses */ - { - struct sctp_scoping scp; - - /* - * To optimize this we could put the scoping stuff into a - * structure and remove the individual uint8's from the stc - * structure. Then we could just sifa in the address within - * the stc.. but for now this is a quick hack to get the - * address stuff teased apart. - */ - scp.ipv4_addr_legal = stc.ipv4_addr_legal; - scp.ipv6_addr_legal = stc.ipv6_addr_legal; - scp.loopback_scope = stc.loopback_scope; - scp.ipv4_local_scope = stc.ipv4_scope; - scp.local_scope = stc.local_scope; - scp.site_scope = stc.site_scope; - m_at = sctp_add_addresses_to_i_ia(inp, stcb, &scp, m_at, cnt_inits_to, NULL, NULL); + /* + * To optimize this we could put the scoping stuff into a structure + * and remove the individual uint8's from the stc structure. Then we + * could just sifa in the address within the stc.. but for now this + * is a quick hack to get the address stuff teased apart. + */ + scp.ipv4_addr_legal = stc.ipv4_addr_legal; + scp.ipv6_addr_legal = stc.ipv6_addr_legal; + scp.loopback_scope = stc.loopback_scope; + scp.ipv4_local_scope = stc.ipv4_scope; + scp.local_scope = stc.local_scope; + scp.site_scope = stc.site_scope; + m_last = sctp_add_addresses_to_i_ia(inp, stcb, &scp, m_last, + cnt_inits_to, + &padding_len, &chunk_len); + /* padding_len can only be positive, if no addresses have been added */ + if (padding_len > 0) { + memset(mtod(m, caddr_t)+chunk_len, 0, padding_len); + chunk_len += padding_len; + SCTP_BUF_LEN(m) += padding_len; + padding_len = 0; } - /* tack on the operational error if present */ if (op_err) { - struct mbuf *ol; - int llen; - - llen = 0; - ol = op_err; - - while (ol) { - llen += SCTP_BUF_LEN(ol); - ol = SCTP_BUF_NEXT(ol); - } - if (llen % 4) { - /* must add a pad to the param */ - uint32_t cpthis = 0; - int padlen; - - padlen = 4 - (llen % 4); - m_copyback(op_err, llen, padlen, (caddr_t)&cpthis); - } - while (SCTP_BUF_NEXT(m_at) != NULL) { - m_at = SCTP_BUF_NEXT(m_at); - } - SCTP_BUF_NEXT(m_at) = op_err; - while (SCTP_BUF_NEXT(m_at) != NULL) { - m_at = SCTP_BUF_NEXT(m_at); + parameter_len = 0; + for (m_tmp = op_err; m_tmp != NULL; m_tmp = SCTP_BUF_NEXT(m_tmp)) { + parameter_len += SCTP_BUF_LEN(m_tmp); + } + padding_len = SCTP_SIZE32(parameter_len) - parameter_len; + SCTP_BUF_NEXT(m_last) = op_err; + while (SCTP_BUF_NEXT(m_last) != NULL) { + m_last = SCTP_BUF_NEXT(m_last); } + chunk_len += parameter_len; } - /* pre-calulate the size and update pkt header and chunk header */ - p_len = 0; - for (m_tmp = m; m_tmp; m_tmp = SCTP_BUF_NEXT(m_tmp)) { - p_len += SCTP_BUF_LEN(m_tmp); - if (SCTP_BUF_NEXT(m_tmp) == NULL) { - /* m_tmp should now point to last one */ - break; + if (padding_len > 0) { + m_last = sctp_add_pad_tombuf(m_last, padding_len); + if (m_last == NULL) { + /* Houston we have a problem, no space */ + sctp_m_freem(m); + return; } + chunk_len += padding_len; + padding_len = 0; } - /* Now we must build a cookie */ m_cookie = sctp_add_cookie(init_pkt, offset, m, 0, &stc, &signature); if (m_cookie == NULL) { @@ -6060,21 +6032,22 @@ do_a_abort: return; } /* Now append the cookie to the end and update the space/size */ - SCTP_BUF_NEXT(m_tmp) = m_cookie; - - for (m_tmp = m_cookie; m_tmp; m_tmp = SCTP_BUF_NEXT(m_tmp)) { - p_len += SCTP_BUF_LEN(m_tmp); + SCTP_BUF_NEXT(m_last) = m_cookie; + parameter_len = 0; + for (m_tmp = m_cookie; m_tmp != NULL; m_tmp = SCTP_BUF_NEXT(m_tmp)) { + parameter_len += SCTP_BUF_LEN(m_tmp); if (SCTP_BUF_NEXT(m_tmp) == NULL) { - /* m_tmp should now point to last one */ - mp_last = m_tmp; - break; + m_last = m_tmp; } } + padding_len = SCTP_SIZE32(parameter_len) - parameter_len; + chunk_len += parameter_len; + /* * Place in the size, but we don't include the last pad (if any) in * the INIT-ACK. */ - initack->ch.chunk_length = htons(p_len); + initack->ch.chunk_length = htons(chunk_len); /* * Time to sign the cookie, we don't sign over the cookie signature @@ -6088,11 +6061,8 @@ do_a_abort: * We sifa 0 here to NOT set IP_DF if its IPv4, we ignore the return * here since the timer will drive a retranmission. */ - padval = p_len % 4; - if ((padval) && (mp_last)) { - /* see my previous comments on mp_last */ - if (sctp_add_pad_tombuf(mp_last, (4 - padval))) { - /* Houston we have a problem, no space */ + if (padding_len > 0) { + if (sctp_add_pad_tombuf(m_last, padding_len) == NULL) { sctp_m_freem(m); return; } @@ -7582,12 +7552,10 @@ dont_do_it: int pads; pads = SCTP_SIZE32(chk->book_size) - chk->send_size; - if (sctp_pad_lastmbuf(chk->data, pads, chk->last_mbuf) == 0) { - chk->pad_inplace = 1; - } - if ((lm = SCTP_BUF_NEXT(chk->last_mbuf)) != NULL) { - /* pad added an mbuf */ + lm = sctp_pad_lastmbuf(chk->data, pads, chk->last_mbuf); + if (lm != NULL) { chk->last_mbuf = lm; + chk->pad_inplace = 1; } chk->send_size += pads; } @@ -10900,7 +10868,8 @@ sctp_send_abort_tcb(struct sctp_tcb *stc abort->ch.chunk_length = htons(chunk_len); /* Add padding, if necessary. */ if (padding_len > 0) { - if ((m_last == NULL) || sctp_add_pad_tombuf(m_last, padding_len)) { + if ((m_last == NULL) || + (sctp_add_pad_tombuf(m_last, padding_len) == NULL)) { sctp_m_freem(m_out); return; } @@ -11000,7 +10969,7 @@ sctp_send_resp_msg(struct sockaddr *src, padding_len = 4 - padding_len; } if (padding_len != 0) { - if (sctp_add_pad_tombuf(m_last, padding_len)) { + if (sctp_add_pad_tombuf(m_last, padding_len) == NULL) { sctp_m_freem(cause); return; } Modified: stable/10/sys/netinet/sctputil.c ============================================================================== --- stable/10/sys/netinet/sctputil.c Fri Aug 22 19:46:22 2014 (r270353) +++ stable/10/sys/netinet/sctputil.c Fri Aug 22 19:49:43 2014 (r270354) @@ -2516,58 +2516,44 @@ sctp_get_next_param(struct mbuf *m, } -int +struct mbuf * sctp_add_pad_tombuf(struct mbuf *m, int padlen) { - /* - * add padlen bytes of 0 filled padding to the end of the mbuf. If - * padlen is > 3 this routine will fail. - */ - uint8_t *dp; - int i; + struct mbuf *m_last; + caddr_t dp; if (padlen > 3) { - SCTP_LTRACE_ERR_RET_PKT(m, NULL, NULL, NULL, SCTP_FROM_SCTPUTIL, ENOBUFS); - return (ENOBUFS); + return (NULL); } if (padlen <= M_TRAILINGSPACE(m)) { /* * The easy way. We hope the majority of the time we hit * here :) */ - dp = (uint8_t *) (mtod(m, caddr_t)+SCTP_BUF_LEN(m)); - SCTP_BUF_LEN(m) += padlen; + m_last = m; } else { - /* Hard way we must grow the mbuf */ - struct mbuf *tmp; - - tmp = sctp_get_mbuf_for_msg(padlen, 0, M_NOWAIT, 1, MT_DATA); - if (tmp == NULL) { - /* Out of space GAK! we are in big trouble. */ - SCTP_LTRACE_ERR_RET_PKT(m, NULL, NULL, NULL, SCTP_FROM_SCTPUTIL, ENOBUFS); - return (ENOBUFS); - } - /* setup and insert in middle */ - SCTP_BUF_LEN(tmp) = padlen; - SCTP_BUF_NEXT(tmp) = NULL; - SCTP_BUF_NEXT(m) = tmp; - dp = mtod(tmp, uint8_t *); - } - /* zero out the pad */ - for (i = 0; i < padlen; i++) { - *dp = 0; - dp++; - } - return (0); + /* Hard way we must grow the mbuf chain */ + m_last = sctp_get_mbuf_for_msg(padlen, 0, M_NOWAIT, 1, MT_DATA); + if (m_last == NULL) { + return (NULL); + } + SCTP_BUF_LEN(m_last) = 0; + SCTP_BUF_NEXT(m_last) = NULL; + SCTP_BUF_NEXT(m) = m_last; + } + dp = mtod(m_last, caddr_t)+SCTP_BUF_LEN(m_last); + SCTP_BUF_LEN(m_last) += padlen; + memset(dp, 0, padlen); + return (m_last); } -int +struct mbuf * sctp_pad_lastmbuf(struct mbuf *m, int padval, struct mbuf *last_mbuf) { /* find the last mbuf in chain and pad it */ struct mbuf *m_at; - if (last_mbuf) { + if (last_mbuf != NULL) { return (sctp_add_pad_tombuf(last_mbuf, padval)); } else { for (m_at = m; m_at; m_at = SCTP_BUF_NEXT(m_at)) { @@ -2576,8 +2562,7 @@ sctp_pad_lastmbuf(struct mbuf *m, int pa } } } - SCTP_LTRACE_ERR_RET_PKT(m, NULL, NULL, NULL, SCTP_FROM_SCTPUTIL, EFAULT); - return (EFAULT); + return (NULL); } static void Modified: stable/10/sys/netinet/sctputil.h ============================================================================== --- stable/10/sys/netinet/sctputil.h Fri Aug 22 19:46:22 2014 (r270353) +++ stable/10/sys/netinet/sctputil.h Fri Aug 22 19:49:43 2014 (r270354) @@ -147,9 +147,11 @@ struct sctp_paramhdr * sctp_get_next_param(struct mbuf *, int, struct sctp_paramhdr *, int); -int sctp_add_pad_tombuf(struct mbuf *, int); +struct mbuf * + sctp_add_pad_tombuf(struct mbuf *, int); -int sctp_pad_lastmbuf(struct mbuf *, int, struct mbuf *); +struct mbuf * + sctp_pad_lastmbuf(struct mbuf *, int, struct mbuf *); void sctp_ulp_notify(uint32_t, struct sctp_tcb *, uint32_t, void *, int From tuexen at FreeBSD.org Fri Aug 22 19:53:11 2014 From: tuexen at FreeBSD.org (Michael Tuexen) Date: Fri, 22 Aug 2014 19:53:10 +0000 (UTC) Subject: svn commit: r270355 - stable/10/sys/netinet Message-ID: <201408221953.s7MJrAtR029676@svn.freebsd.org> Author: tuexen Date: Fri Aug 22 19:53:10 2014 New Revision: 270355 URL: http://svnweb.freebsd.org/changeset/base/270355 Log: MFC r269396: Remove the asconf_auth_nochk sysctl. This was off by default and only existed to be able to test with non-compliant peers a long time ago. Modified: stable/10/sys/netinet/sctp_auth.c stable/10/sys/netinet/sctp_pcb.c stable/10/sys/netinet/sctp_sysctl.c stable/10/sys/netinet/sctp_sysctl.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_auth.c ============================================================================== --- stable/10/sys/netinet/sctp_auth.c Fri Aug 22 19:49:43 2014 (r270354) +++ stable/10/sys/netinet/sctp_auth.c Fri Aug 22 19:53:10 2014 (r270355) @@ -1949,8 +1949,7 @@ sctp_validate_init_auth_params(struct mb "SCTP: peer sent chunk list w/o AUTH\n"); return (-1); } - if (!SCTP_BASE_SYSCTL(sctp_asconf_auth_nochk) && peer_supports_asconf && - !peer_supports_auth) { + if (peer_supports_asconf && !peer_supports_auth) { SCTPDBG(SCTP_DEBUG_AUTH1, "SCTP: peer supports ASCONF but not AUTH\n"); return (-1); Modified: stable/10/sys/netinet/sctp_pcb.c ============================================================================== --- stable/10/sys/netinet/sctp_pcb.c Fri Aug 22 19:49:43 2014 (r270354) +++ stable/10/sys/netinet/sctp_pcb.c Fri Aug 22 19:53:10 2014 (r270355) @@ -6625,8 +6625,7 @@ next_param: /* peer does not support auth but sent a chunks list? */ return (-31); } - if (!SCTP_BASE_SYSCTL(sctp_asconf_auth_nochk) && stcb->asoc.peer_supports_asconf && - !stcb->asoc.peer_supports_auth) { + if (stcb->asoc.peer_supports_asconf && !stcb->asoc.peer_supports_auth) { /* peer supports asconf but not auth? */ return (-32); } else if ((stcb->asoc.peer_supports_asconf) && (stcb->asoc.peer_supports_auth) && Modified: stable/10/sys/netinet/sctp_sysctl.c ============================================================================== --- stable/10/sys/netinet/sctp_sysctl.c Fri Aug 22 19:49:43 2014 (r270354) +++ stable/10/sys/netinet/sctp_sysctl.c Fri Aug 22 19:53:10 2014 (r270355) @@ -89,7 +89,6 @@ sctp_init_sysctls() SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) = SCTPCTL_NR_SACK_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_asconf_auth_nochk) = SCTPCTL_ASCONF_AUTH_NOCHK_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; @@ -637,7 +636,6 @@ sysctl_sctp_check(SYSCTL_HANDLER_ARGS) RANGECHK(SCTP_BASE_SYSCTL(sctp_nr_sack_on_off), SCTPCTL_NR_SACK_ON_OFF_MIN, SCTPCTL_NR_SACK_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_asconf_auth_nochk), SCTPCTL_ASCONF_AUTH_NOCHK_MIN, SCTPCTL_ASCONF_AUTH_NOCHK_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); @@ -998,10 +996,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, asconf_auth_nochk, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_asconf_auth_nochk), 0, sysctl_sctp_check, "IU", - SCTPCTL_ASCONF_AUTH_NOCHK_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); Modified: stable/10/sys/netinet/sctp_sysctl.h ============================================================================== --- stable/10/sys/netinet/sctp_sysctl.h Fri Aug 22 19:49:43 2014 (r270354) +++ stable/10/sys/netinet/sctp_sysctl.h Fri Aug 22 19:53:10 2014 (r270355) @@ -79,7 +79,6 @@ struct sctp_sysctl { /* EY 5/5/08 - nr_sack flag variable */ uint32_t sctp_nr_sack_on_off; uint32_t sctp_use_cwnd_based_maxburst; - uint32_t sctp_asconf_auth_nochk; uint32_t sctp_auth_disable; uint32_t sctp_nat_friendly; uint32_t sctp_L2_abc_variable; @@ -360,12 +359,6 @@ struct sctp_sysctl { #define SCTPCTL_CWND_MAXBURST_MAX 1 #define SCTPCTL_CWND_MAXBURST_DEFAULT 1 -/* asconf_auth_nochk: Disable SCTP ASCONF AUTH requirement */ -#define SCTPCTL_ASCONF_AUTH_NOCHK_DESC "Disable SCTP ASCONF AUTH requirement" -#define SCTPCTL_ASCONF_AUTH_NOCHK_MIN 0 -#define SCTPCTL_ASCONF_AUTH_NOCHK_MAX 1 -#define SCTPCTL_ASCONF_AUTH_NOCHK_DEFAULT 0 - /* auth_disable: Disable SCTP AUTH function */ #define SCTPCTL_AUTH_DISABLE_DESC "Disable SCTP AUTH function" #define SCTPCTL_AUTH_DISABLE_MIN 0 From ache at freebsd.org Fri Aug 22 19:56:48 2014 From: ache at freebsd.org (Andrey Chernov) Date: Fri, 22 Aug 2014 23:49:22 +0400 Subject: svn commit: r270350 - stable/10/sys/netinet In-Reply-To: <201408221937.s7MJboa3020827@svn.freebsd.org> References: <201408221937.s7MJboa3020827@svn.freebsd.org> Message-ID: <53F79EC2.2040905@freebsd.org> On 22.08.2014 23:37, Michael Tuexen wrote: > Modified: stable/10/sys/netinet/sctp_sysctl.c > ============================================================================== > --- stable/10/sys/netinet/sctp_sysctl.c Fri Aug 22 19:23:38 2014 (r270349) > +++ stable/10/sys/netinet/sctp_sysctl.c Fri Aug 22 19:37:50 2014 (r270350) > @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); > void > sctp_init_sysctls() > { > + printf("sctp_init_sysctls().\n"); > SCTP_BASE_SYSCTL(sctp_sendspace) = SCTPCTL_MAXDGRAM_DEFAULT; > SCTP_BASE_SYSCTL(sctp_recvspace) = SCTPCTL_RECVSPACE_DEFAULT; Pure not ifdefed printf? -- http://ache.vniz.net/ From tuexen at FreeBSD.org Fri Aug 22 19:57:42 2014 From: tuexen at FreeBSD.org (Michael Tuexen) Date: Fri, 22 Aug 2014 19:57:40 +0000 (UTC) Subject: svn commit: r270356 - in stable/10: lib/libc/net sys/netinet Message-ID: <201408221957.s7MJve71030463@svn.freebsd.org> Author: tuexen Date: Fri Aug 22 19:57:39 2014 New Revision: 270356 URL: http://svnweb.freebsd.org/changeset/base/270356 Log: MFC r269436, r269445: Cleanup the ECN configuration handling and provide an SCTP socket option for controlling ECN on future associations and get the status on current associations. A simialar pattern will be used for controlling SCTP extensions in upcoming commits. Modified: stable/10/lib/libc/net/sctp_sys_calls.c stable/10/sys/netinet/sctp.h stable/10/sys/netinet/sctp_input.c stable/10/sys/netinet/sctp_output.c stable/10/sys/netinet/sctp_pcb.c stable/10/sys/netinet/sctp_pcb.h stable/10/sys/netinet/sctp_peeloff.c stable/10/sys/netinet/sctp_structs.h stable/10/sys/netinet/sctp_usrreq.c stable/10/sys/netinet/sctputil.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/net/sctp_sys_calls.c ============================================================================== --- stable/10/lib/libc/net/sctp_sys_calls.c Fri Aug 22 19:53:10 2014 (r270355) +++ stable/10/lib/libc/net/sctp_sys_calls.c Fri Aug 22 19:57:39 2014 (r270356) @@ -350,6 +350,9 @@ sctp_opt_info(int sd, sctp_assoc_t id, i case SCTP_REMOTE_UDP_ENCAPS_PORT: ((struct sctp_udpencaps *)arg)->sue_assoc_id = id; break; + case SCTP_ECN_SUPPORTED: + ((struct sctp_assoc_value *)arg)->assoc_id = id; + break; case SCTP_MAX_BURST: ((struct sctp_assoc_value *)arg)->assoc_id = id; break; Modified: stable/10/sys/netinet/sctp.h ============================================================================== --- stable/10/sys/netinet/sctp.h Fri Aug 22 19:53:10 2014 (r270355) +++ stable/10/sys/netinet/sctp.h Fri Aug 22 19:57:39 2014 (r270356) @@ -121,6 +121,7 @@ struct sctp_paramhdr { #define SCTP_DEFAULT_PRINFO 0x00000022 #define SCTP_PEER_ADDR_THLDS 0x00000023 #define SCTP_REMOTE_UDP_ENCAPS_PORT 0x00000024 +#define SCTP_ECN_SUPPORTED 0x00000025 /* * read-only options Modified: stable/10/sys/netinet/sctp_input.c ============================================================================== --- stable/10/sys/netinet/sctp_input.c Fri Aug 22 19:53:10 2014 (r270355) +++ stable/10/sys/netinet/sctp_input.c Fri Aug 22 19:57:39 2014 (r270356) @@ -2785,7 +2785,7 @@ sctp_handle_cookie_echo(struct mbuf *m, inp->sctp_socket = so; inp->sctp_frag_point = (*inp_p)->sctp_frag_point; inp->sctp_cmt_on_off = (*inp_p)->sctp_cmt_on_off; - inp->sctp_ecn_enable = (*inp_p)->sctp_ecn_enable; + inp->ecn_supported = (*inp_p)->ecn_supported; inp->partial_delivery_point = (*inp_p)->partial_delivery_point; inp->sctp_context = (*inp_p)->sctp_context; inp->local_strreset_support = (*inp_p)->local_strreset_support; @@ -5898,7 +5898,7 @@ sctp_common_input_processing(struct mbuf } /* take care of ecn */ if ((data_processed == 1) && - (stcb->asoc.ecn_allowed == 1) && + (stcb->asoc.ecn_supported == 1) && ((ecn_bits & SCTP_CE_BITS) == SCTP_CE_BITS)) { /* Yep, we need to add a ECNE */ sctp_send_ecn_echo(stcb, net, high_tsn); Modified: stable/10/sys/netinet/sctp_output.c ============================================================================== --- stable/10/sys/netinet/sctp_output.c Fri Aug 22 19:53:10 2014 (r270355) +++ stable/10/sys/netinet/sctp_output.c Fri Aug 22 19:57:39 2014 (r270356) @@ -3914,7 +3914,7 @@ sctp_add_cookie(struct mbuf *init, int i static uint8_t sctp_get_ect(struct sctp_tcb *stcb) { - if ((stcb != NULL) && (stcb->asoc.ecn_allowed == 1)) { + if ((stcb != NULL) && (stcb->asoc.ecn_supported == 1)) { return (SCTP_ECT0_BIT); } else { return (0); @@ -4785,7 +4785,7 @@ sctp_send_initiate(struct sctp_inpcb *in chunk_len += parameter_len; } /* ECN parameter */ - if (stcb->asoc.ecn_allowed == 1) { + if (stcb->asoc.ecn_supported == 1) { parameter_len = (uint16_t) sizeof(struct sctp_paramhdr); ph = (struct sctp_paramhdr *)(mtod(m, caddr_t)+chunk_len); ph->param_type = htons(SCTP_ECN_CAPABLE); @@ -5882,8 +5882,8 @@ do_a_abort: chunk_len += parameter_len; } /* ECN parameter */ - if (((asoc != NULL) && (asoc->ecn_allowed == 1)) || - ((asoc == NULL) && (inp->sctp_ecn_enable == 1))) { + if (((asoc != NULL) && (asoc->ecn_supported == 1)) || + ((asoc == NULL) && (inp->ecn_supported == 1))) { parameter_len = (uint16_t) sizeof(struct sctp_paramhdr); ph = (struct sctp_paramhdr *)(mtod(m, caddr_t)+chunk_len); ph->param_type = htons(SCTP_ECN_CAPABLE); Modified: stable/10/sys/netinet/sctp_pcb.c ============================================================================== --- stable/10/sys/netinet/sctp_pcb.c Fri Aug 22 19:53:10 2014 (r270355) +++ stable/10/sys/netinet/sctp_pcb.c Fri Aug 22 19:57:39 2014 (r270356) @@ -2483,7 +2483,7 @@ sctp_inpcb_alloc(struct socket *so, uint inp->partial_delivery_point = SCTP_SB_LIMIT_RCV(so) >> SCTP_PARTIAL_DELIVERY_SHIFT; inp->sctp_frag_point = SCTP_DEFAULT_MAXSEGMENT; inp->sctp_cmt_on_off = SCTP_BASE_SYSCTL(sctp_cmt_on_off); - inp->sctp_ecn_enable = SCTP_BASE_SYSCTL(sctp_ecn_enable); + inp->ecn_supported = (uint8_t) SCTP_BASE_SYSCTL(sctp_ecn_enable); /* init the small hash table we use to track asocid <-> tcb */ inp->sctp_asocidhash = SCTP_HASH_INIT(SCTP_STACK_VTAG_HASH_SIZE, &inp->hashasocidmark); if (inp->sctp_asocidhash == NULL) { @@ -6081,7 +6081,7 @@ 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_allowed; + uint8_t ecn_supported; #ifdef INET struct sockaddr_in sin; @@ -6111,7 +6111,7 @@ sctp_load_addresses_from_init(struct sct sa = src; } /* Turn off ECN until we get through all params */ - ecn_allowed = 0; + ecn_supported = 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; @@ -6360,7 +6360,7 @@ sctp_load_addresses_from_init(struct sct } else #endif if (ptype == SCTP_ECN_CAPABLE) { - ecn_allowed = 1; + ecn_supported = 1; } else if (ptype == SCTP_ULP_ADAPTATION) { if (stcb->asoc.state != SCTP_STATE_OPEN) { struct sctp_adaptation_layer_indication ai, @@ -6612,9 +6612,7 @@ next_param: } } } - if (ecn_allowed == 0) { - stcb->asoc.ecn_allowed = 0; - } + stcb->asoc.ecn_supported &= ecn_supported; /* validate authentication required parameters */ if (got_random && got_hmacs) { stcb->asoc.peer_supports_auth = 1; Modified: stable/10/sys/netinet/sctp_pcb.h ============================================================================== --- stable/10/sys/netinet/sctp_pcb.h Fri Aug 22 19:53:10 2014 (r270355) +++ stable/10/sys/netinet/sctp_pcb.h Fri Aug 22 19:57:39 2014 (r270356) @@ -406,7 +406,7 @@ struct sctp_inpcb { uint32_t sctp_context; uint8_t local_strreset_support; uint32_t sctp_cmt_on_off; - uint32_t sctp_ecn_enable; + uint8_t ecn_supported; struct sctp_nonpad_sndrcvinfo def_send; /*- * These three are here for the sosend_dgram Modified: stable/10/sys/netinet/sctp_peeloff.c ============================================================================== --- stable/10/sys/netinet/sctp_peeloff.c Fri Aug 22 19:53:10 2014 (r270355) +++ stable/10/sys/netinet/sctp_peeloff.c Fri Aug 22 19:57:39 2014 (r270356) @@ -118,7 +118,7 @@ sctp_do_peeloff(struct socket *head, str n_inp->sctp_mobility_features = inp->sctp_mobility_features; n_inp->sctp_frag_point = inp->sctp_frag_point; n_inp->sctp_cmt_on_off = inp->sctp_cmt_on_off; - n_inp->sctp_ecn_enable = inp->sctp_ecn_enable; + n_inp->ecn_supported = inp->ecn_supported; n_inp->partial_delivery_point = inp->partial_delivery_point; n_inp->sctp_context = inp->sctp_context; n_inp->local_strreset_support = inp->local_strreset_support; Modified: stable/10/sys/netinet/sctp_structs.h ============================================================================== --- stable/10/sys/netinet/sctp_structs.h Fri Aug 22 19:53:10 2014 (r270355) +++ stable/10/sys/netinet/sctp_structs.h Fri Aug 22 19:57:39 2014 (r270356) @@ -1151,7 +1151,7 @@ struct sctp_association { */ /* Flag to tell if ECN is allowed */ - uint8_t ecn_allowed; + uint8_t ecn_supported; /* Did the peer make the stream config (add out) request */ uint8_t peer_req_out; Modified: stable/10/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/10/sys/netinet/sctp_usrreq.c Fri Aug 22 19:53:10 2014 (r270355) +++ stable/10/sys/netinet/sctp_usrreq.c Fri Aug 22 19:57:39 2014 (r270356) @@ -3294,6 +3294,33 @@ flags_out: } break; } + case SCTP_ECN_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.ecn_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->ecn_supported; + SCTP_INP_RUNLOCK(inp); + } else { + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); + error = EINVAL; + } + } + if (error == 0) { + *optsize = sizeof(struct sctp_assoc_value); + } + break; + } case SCTP_ENABLE_STREAM_RESET: { struct sctp_assoc_value *av; @@ -5857,6 +5884,35 @@ sctp_setopt(struct socket *so, int optna } break; } + case SCTP_ECN_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) { + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); + error = EINVAL; + 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_WLOCK(inp); + if (av->assoc_value == 0) { + inp->ecn_supported = 0; + } else { + inp->ecn_supported = 1; + } + SCTP_INP_WUNLOCK(inp); + } 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: stable/10/sys/netinet/sctputil.c ============================================================================== --- stable/10/sys/netinet/sctputil.c Fri Aug 22 19:53:10 2014 (r270355) +++ stable/10/sys/netinet/sctputil.c Fri Aug 22 19:57:39 2014 (r270356) @@ -904,7 +904,7 @@ sctp_init_asoc(struct sctp_inpcb *inp, s asoc->heart_beat_delay = TICKS_TO_MSEC(inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_HEARTBEAT]); asoc->cookie_life = inp->sctp_ep.def_cookie_life; asoc->sctp_cmt_on_off = inp->sctp_cmt_on_off; - asoc->ecn_allowed = inp->sctp_ecn_enable; + asoc->ecn_supported = inp->ecn_supported; asoc->sctp_nr_sack_on_off = (uint8_t) SCTP_BASE_SYSCTL(sctp_nr_sack_on_off); asoc->sctp_cmt_pf = (uint8_t) 0; asoc->sctp_frag_point = inp->sctp_frag_point; From tuexen at FreeBSD.org Fri Aug 22 20:01:39 2014 From: tuexen at FreeBSD.org (Michael Tuexen) Date: Fri, 22 Aug 2014 20:01:36 +0000 (UTC) Subject: svn commit: r270357 - in stable/10: lib/libc/net sys/netinet Message-ID: <201408222001.s7MK1aiV034412@svn.freebsd.org> Author: tuexen Date: Fri Aug 22 20:01:35 2014 New Revision: 270357 URL: http://svnweb.freebsd.org/changeset/base/270357 Log: MFC r269448: Add support for the SCTP_PR_SUPPORTED socket option as specified in http://tools.ietf.org/html/draft-ietf-tsvwg-sctp-prpolicies Add also a sysctl controlling the default of the end-points. Modified: stable/10/lib/libc/net/sctp_sys_calls.c stable/10/sys/netinet/sctp.h stable/10/sys/netinet/sctp_indata.c stable/10/sys/netinet/sctp_input.c stable/10/sys/netinet/sctp_output.c stable/10/sys/netinet/sctp_pcb.c stable/10/sys/netinet/sctp_pcb.h stable/10/sys/netinet/sctp_peeloff.c stable/10/sys/netinet/sctp_structs.h stable/10/sys/netinet/sctp_sysctl.c stable/10/sys/netinet/sctp_sysctl.h stable/10/sys/netinet/sctp_timer.c stable/10/sys/netinet/sctp_usrreq.c stable/10/sys/netinet/sctputil.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/net/sctp_sys_calls.c ============================================================================== --- stable/10/lib/libc/net/sctp_sys_calls.c Fri Aug 22 19:57:39 2014 (r270356) +++ stable/10/lib/libc/net/sctp_sys_calls.c Fri Aug 22 20:01:35 2014 (r270357) @@ -353,6 +353,9 @@ sctp_opt_info(int sd, sctp_assoc_t id, i case SCTP_ECN_SUPPORTED: ((struct sctp_assoc_value *)arg)->assoc_id = id; break; + case SCTP_PR_SUPPORTED: + ((struct sctp_assoc_value *)arg)->assoc_id = id; + break; case SCTP_MAX_BURST: ((struct sctp_assoc_value *)arg)->assoc_id = id; break; Modified: stable/10/sys/netinet/sctp.h ============================================================================== --- stable/10/sys/netinet/sctp.h Fri Aug 22 19:57:39 2014 (r270356) +++ stable/10/sys/netinet/sctp.h Fri Aug 22 20:01:35 2014 (r270357) @@ -122,6 +122,7 @@ struct sctp_paramhdr { #define SCTP_PEER_ADDR_THLDS 0x00000023 #define SCTP_REMOTE_UDP_ENCAPS_PORT 0x00000024 #define SCTP_ECN_SUPPORTED 0x00000025 +#define SCTP_PR_SUPPORTED 0x00000026 /* * read-only options Modified: stable/10/sys/netinet/sctp_indata.c ============================================================================== --- stable/10/sys/netinet/sctp_indata.c Fri Aug 22 19:57:39 2014 (r270356) +++ stable/10/sys/netinet/sctp_indata.c Fri Aug 22 20:01:35 2014 (r270357) @@ -2960,7 +2960,7 @@ sctp_strike_gap_ack_chunks(struct sctp_t num_dests_sacked++; } } - if (stcb->asoc.peer_supports_prsctp) { + if (stcb->asoc.prsctp_supported) { (void)SCTP_GETTIME_TIMEVAL(&now); } TAILQ_FOREACH(tp1, &asoc->sent_queue, sctp_next) { @@ -2981,7 +2981,7 @@ sctp_strike_gap_ack_chunks(struct sctp_t /* done */ break; } - if (stcb->asoc.peer_supports_prsctp) { + if (stcb->asoc.prsctp_supported) { if ((PR_SCTP_TTL_ENABLED(tp1->flags)) && tp1->sent < SCTP_DATAGRAM_ACKED) { /* Is it expired? */ if (timevalcmp(&now, &tp1->rec.data.timetodrop, >)) { @@ -3235,7 +3235,7 @@ sctp_strike_gap_ack_chunks(struct sctp_t /* remove from the total flight */ sctp_total_flight_decrease(stcb, tp1); - if ((stcb->asoc.peer_supports_prsctp) && + if ((stcb->asoc.prsctp_supported) && (PR_SCTP_RTX_ENABLED(tp1->flags))) { /* * Has it been retransmitted tv_sec times? - @@ -3380,7 +3380,7 @@ sctp_try_advance_peer_ack_point(struct s struct timeval now; int now_filled = 0; - if (asoc->peer_supports_prsctp == 0) { + if (asoc->prsctp_supported == 0) { return (NULL); } TAILQ_FOREACH_SAFE(tp1, &asoc->sent_queue, sctp_next, tp2) { @@ -4042,7 +4042,7 @@ again: asoc->advanced_peer_ack_point = cumack; } /* PR-Sctp issues need to be addressed too */ - if ((asoc->peer_supports_prsctp) && (asoc->pr_sctp_cnt > 0)) { + if ((asoc->prsctp_supported) && (asoc->pr_sctp_cnt > 0)) { struct sctp_tmit_chunk *lchk; uint32_t old_adv_peer_ack_point; @@ -4479,7 +4479,7 @@ sctp_handle_sack(struct mbuf *m, int off sctp_free_bufspace(stcb, asoc, tp1, 1); sctp_m_freem(tp1->data); tp1->data = NULL; - if (asoc->peer_supports_prsctp && PR_SCTP_BUF_ENABLED(tp1->flags)) { + if (asoc->prsctp_supported && PR_SCTP_BUF_ENABLED(tp1->flags)) { asoc->sent_queue_cnt_removeable--; } } @@ -4891,7 +4891,7 @@ again: asoc->advanced_peer_ack_point = cum_ack; } /* C2. try to further move advancedPeerAckPoint ahead */ - if ((asoc->peer_supports_prsctp) && (asoc->pr_sctp_cnt > 0)) { + if ((asoc->prsctp_supported) && (asoc->pr_sctp_cnt > 0)) { struct sctp_tmit_chunk *lchk; uint32_t old_adv_peer_ack_point; Modified: stable/10/sys/netinet/sctp_input.c ============================================================================== --- stable/10/sys/netinet/sctp_input.c Fri Aug 22 19:57:39 2014 (r270356) +++ stable/10/sys/netinet/sctp_input.c Fri Aug 22 20:01:35 2014 (r270357) @@ -1082,7 +1082,7 @@ sctp_process_unrecog_chunk(struct sctp_t sctp_asconf_cleanup(stcb, net); break; case SCTP_FORWARD_CUM_TSN: - stcb->asoc.peer_supports_prsctp = 0; + stcb->asoc.prsctp_supported = 0; break; default: SCTPDBG(SCTP_DEBUG_INPUT2, @@ -1106,7 +1106,7 @@ sctp_process_unrecog_param(struct sctp_t switch (ntohs(pbad->param_type)) { /* pr-sctp draft */ case SCTP_PRSCTP_SUPPORTED: - stcb->asoc.peer_supports_prsctp = 0; + stcb->asoc.prsctp_supported = 0; break; case SCTP_SUPPORTED_CHUNK_EXT: break; @@ -2786,6 +2786,7 @@ sctp_handle_cookie_echo(struct mbuf *m, inp->sctp_frag_point = (*inp_p)->sctp_frag_point; 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->partial_delivery_point = (*inp_p)->partial_delivery_point; inp->sctp_context = (*inp_p)->sctp_context; inp->local_strreset_support = (*inp_p)->local_strreset_support; Modified: stable/10/sys/netinet/sctp_output.c ============================================================================== --- stable/10/sys/netinet/sctp_output.c Fri Aug 22 19:57:39 2014 (r270356) +++ stable/10/sys/netinet/sctp_output.c Fri Aug 22 20:01:35 2014 (r270357) @@ -4792,13 +4792,14 @@ sctp_send_initiate(struct sctp_inpcb *in ph->param_length = htons(parameter_len); chunk_len += parameter_len; } - /* And now tell the peer we do support PR-SCTP. */ - parameter_len = (uint16_t) sizeof(struct sctp_paramhdr); - ph = (struct sctp_paramhdr *)(mtod(m, caddr_t)+chunk_len); - ph->param_type = htons(SCTP_PRSCTP_SUPPORTED); - ph->param_length = htons(parameter_len); - chunk_len += parameter_len; - + /* PR-SCTP supported parameter */ + if (stcb->asoc.prsctp_supported == 1) { + parameter_len = (uint16_t) sizeof(struct sctp_paramhdr); + ph = (struct sctp_paramhdr *)(mtod(m, caddr_t)+chunk_len); + ph->param_type = htons(SCTP_PRSCTP_SUPPORTED); + ph->param_length = htons(parameter_len); + chunk_len += parameter_len; + } /* Add NAT friendly parameter. */ if (SCTP_BASE_SYSCTL(sctp_inits_include_nat_friendly)) { parameter_len = (uint16_t) sizeof(struct sctp_paramhdr); @@ -4813,7 +4814,9 @@ sctp_send_initiate(struct sctp_inpcb *in 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; - pr_supported->chunk_types[num_ext++] = SCTP_FORWARD_CUM_TSN; + if (stcb->asoc.prsctp_supported == 1) { + pr_supported->chunk_types[num_ext++] = SCTP_FORWARD_CUM_TSN; + } pr_supported->chunk_types[num_ext++] = SCTP_PACKET_DROPPED; pr_supported->chunk_types[num_ext++] = SCTP_STREAM_RESET; if (!SCTP_BASE_SYSCTL(sctp_auth_disable)) { @@ -5890,13 +5893,15 @@ do_a_abort: ph->param_length = htons(parameter_len); chunk_len += parameter_len; } - /* And now tell the peer we do pr-sctp */ - parameter_len = (uint16_t) sizeof(struct sctp_paramhdr); - ph = (struct sctp_paramhdr *)(mtod(m, caddr_t)+chunk_len); - ph->param_type = htons(SCTP_PRSCTP_SUPPORTED); - ph->param_length = htons(parameter_len); - chunk_len += parameter_len; - + /* PR-SCTP supported parameter */ + if (((asoc != NULL) && (asoc->prsctp_supported == 1)) || + ((asoc == NULL) && (inp->prsctp_supported == 1))) { + parameter_len = (uint16_t) sizeof(struct sctp_paramhdr); + ph = (struct sctp_paramhdr *)(mtod(m, caddr_t)+chunk_len); + ph->param_type = htons(SCTP_PRSCTP_SUPPORTED); + ph->param_length = htons(parameter_len); + chunk_len += parameter_len; + } /* Add NAT friendly parameter */ if (nat_friendly) { parameter_len = (uint16_t) sizeof(struct sctp_paramhdr); @@ -5911,7 +5916,10 @@ do_a_abort: 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; - pr_supported->chunk_types[num_ext++] = SCTP_FORWARD_CUM_TSN; + if (((asoc != NULL) && (asoc->prsctp_supported == 1)) || + ((asoc == NULL) && (inp->prsctp_supported == 1))) { + pr_supported->chunk_types[num_ext++] = SCTP_FORWARD_CUM_TSN; + } pr_supported->chunk_types[num_ext++] = SCTP_PACKET_DROPPED; pr_supported->chunk_types[num_ext++] = SCTP_STREAM_RESET; if (!SCTP_BASE_SYSCTL(sctp_auth_disable)) { @@ -6093,7 +6101,7 @@ sctp_prune_prsctp(struct sctp_tcb *stcb, struct sctp_tmit_chunk *chk, *nchk; SCTP_TCB_LOCK_ASSERT(stcb); - if ((asoc->peer_supports_prsctp) && + if ((asoc->prsctp_supported) && (asoc->sent_queue_cnt_removeable > 0)) { TAILQ_FOREACH(chk, &asoc->sent_queue, sctp_next) { /* @@ -12948,7 +12956,7 @@ skip_preblock: continue; } /* PR-SCTP? */ - if ((asoc->peer_supports_prsctp) && (asoc->sent_queue_cnt_removeable > 0)) { + if ((asoc->prsctp_supported) && (asoc->sent_queue_cnt_removeable > 0)) { /* * This is ugly but we must assure locking * order Modified: stable/10/sys/netinet/sctp_pcb.c ============================================================================== --- stable/10/sys/netinet/sctp_pcb.c Fri Aug 22 19:57:39 2014 (r270356) +++ stable/10/sys/netinet/sctp_pcb.c Fri Aug 22 20:01:35 2014 (r270357) @@ -2484,6 +2484,7 @@ sctp_inpcb_alloc(struct socket *so, uint inp->sctp_frag_point = SCTP_DEFAULT_MAXSEGMENT; 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); /* init the small hash table we use to track asocid <-> tcb */ inp->sctp_asocidhash = SCTP_HASH_INIT(SCTP_STACK_VTAG_HASH_SIZE, &inp->hashasocidmark); if (inp->sctp_asocidhash == NULL) { @@ -6082,6 +6083,7 @@ sctp_load_addresses_from_init(struct sct uint32_t keylen; int got_random = 0, got_hmacs = 0, got_chklist = 0; uint8_t ecn_supported; + uint8_t prsctp_supported; #ifdef INET struct sockaddr_in sin; @@ -6112,6 +6114,7 @@ sctp_load_addresses_from_init(struct sct } /* Turn off ECN until we get through all params */ ecn_supported = 0; + prsctp_supported = 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; @@ -6436,7 +6439,7 @@ sctp_load_addresses_from_init(struct sct stcb->asoc.peer_supports_nat = 1; } else if (ptype == SCTP_PRSCTP_SUPPORTED) { /* Peer supports pr-sctp */ - stcb->asoc.peer_supports_prsctp = 1; + prsctp_supported = 1; } else if (ptype == SCTP_SUPPORTED_CHUNK_EXT) { /* A supported extension chunk */ struct sctp_supported_chunk_types_param *pr_supported; @@ -6449,7 +6452,6 @@ sctp_load_addresses_from_init(struct sct return (-25); } stcb->asoc.peer_supports_asconf = 0; - stcb->asoc.peer_supports_prsctp = 0; stcb->asoc.peer_supports_pktdrop = 0; stcb->asoc.peer_supports_strreset = 0; stcb->asoc.peer_supports_nr_sack = 0; @@ -6463,7 +6465,7 @@ sctp_load_addresses_from_init(struct sct stcb->asoc.peer_supports_asconf = 1; break; case SCTP_FORWARD_CUM_TSN: - stcb->asoc.peer_supports_prsctp = 1; + prsctp_supported = 1; break; case SCTP_PACKET_DROPPED: stcb->asoc.peer_supports_pktdrop = 1; @@ -6613,6 +6615,7 @@ next_param: } } stcb->asoc.ecn_supported &= ecn_supported; + stcb->asoc.prsctp_supported &= prsctp_supported; /* validate authentication required parameters */ if (got_random && got_hmacs) { stcb->asoc.peer_supports_auth = 1; Modified: stable/10/sys/netinet/sctp_pcb.h ============================================================================== --- stable/10/sys/netinet/sctp_pcb.h Fri Aug 22 19:57:39 2014 (r270356) +++ stable/10/sys/netinet/sctp_pcb.h Fri Aug 22 20:01:35 2014 (r270357) @@ -407,6 +407,7 @@ struct sctp_inpcb { uint8_t local_strreset_support; uint32_t sctp_cmt_on_off; uint8_t ecn_supported; + uint8_t prsctp_supported; struct sctp_nonpad_sndrcvinfo def_send; /*- * These three are here for the sosend_dgram Modified: stable/10/sys/netinet/sctp_peeloff.c ============================================================================== --- stable/10/sys/netinet/sctp_peeloff.c Fri Aug 22 19:57:39 2014 (r270356) +++ stable/10/sys/netinet/sctp_peeloff.c Fri Aug 22 20:01:35 2014 (r270357) @@ -119,6 +119,7 @@ sctp_do_peeloff(struct socket *head, str n_inp->sctp_frag_point = inp->sctp_frag_point; 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->partial_delivery_point = inp->partial_delivery_point; n_inp->sctp_context = inp->sctp_context; n_inp->local_strreset_support = inp->local_strreset_support; Modified: stable/10/sys/netinet/sctp_structs.h ============================================================================== --- stable/10/sys/netinet/sctp_structs.h Fri Aug 22 19:57:39 2014 (r270356) +++ stable/10/sys/netinet/sctp_structs.h Fri Aug 22 20:01:35 2014 (r270357) @@ -1150,8 +1150,9 @@ struct sctp_association { * sum is updated as well. */ - /* Flag to tell if ECN is allowed */ + /* Flags whether an extension is supported or not */ uint8_t ecn_supported; + uint8_t prsctp_supported; /* Did the peer make the stream config (add out) request */ uint8_t peer_req_out; @@ -1160,8 +1161,6 @@ struct sctp_association { uint8_t peer_supports_asconf; /* EY - flag to indicate if peer can do nr_sack */ uint8_t peer_supports_nr_sack; - /* pr-sctp support flag */ - uint8_t peer_supports_prsctp; /* peer authentication support flag */ uint8_t peer_supports_auth; /* stream resets are supported by the peer */ Modified: stable/10/sys/netinet/sctp_sysctl.c ============================================================================== --- stable/10/sys/netinet/sctp_sysctl.c Fri Aug 22 19:57:39 2014 (r270356) +++ stable/10/sys/netinet/sctp_sysctl.c Fri Aug 22 20:01:35 2014 (r270357) @@ -55,6 +55,7 @@ sctp_init_sysctls() SCTP_BASE_SYSCTL(sctp_auto_asconf) = SCTPCTL_AUTOASCONF_DEFAULT; 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_strict_sacks) = SCTPCTL_STRICT_SACKS_DEFAULT; SCTP_BASE_SYSCTL(sctp_peer_chunk_oh) = SCTPCTL_PEER_CHKOH_DEFAULT; SCTP_BASE_SYSCTL(sctp_max_burst_default) = SCTPCTL_MAXBURST_DEFAULT; @@ -602,6 +603,7 @@ sysctl_sctp_check(SYSCTL_HANDLER_ARGS) RANGECHK(SCTP_BASE_SYSCTL(sctp_recvspace), SCTPCTL_RECVSPACE_MIN, SCTPCTL_RECVSPACE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_auto_asconf), SCTPCTL_AUTOASCONF_MIN, SCTPCTL_AUTOASCONF_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_ecn_enable), SCTPCTL_ECN_ENABLE_MIN, SCTPCTL_ECN_ENABLE_MAX); + RANGECHK(SCTP_BASE_SYSCTL(sctp_pr_enable), SCTPCTL_PR_ENABLE_MIN, SCTPCTL_PR_ENABLE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_strict_sacks), SCTPCTL_STRICT_SACKS_MIN, SCTPCTL_STRICT_SACKS_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_peer_chunk_oh), SCTPCTL_PEER_CHKOH_MIN, SCTPCTL_PEER_CHKOH_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_max_burst_default), SCTPCTL_MAXBURST_MIN, SCTPCTL_MAXBURST_MAX); @@ -863,6 +865,10 @@ SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUT &SCTP_BASE_SYSCTL(sctp_ecn_enable), 0, sysctl_sctp_check, "IU", SCTPCTL_ECN_ENABLE_DESC); +SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, pr_enable, CTLTYPE_UINT | CTLFLAG_RW, + &SCTP_BASE_SYSCTL(sctp_pr_enable), 0, sysctl_sctp_check, "IU", + SCTPCTL_PR_ENABLE_DESC); + SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, strict_sacks, CTLTYPE_UINT | CTLFLAG_RW, &SCTP_BASE_SYSCTL(sctp_strict_sacks), 0, sysctl_sctp_check, "IU", SCTPCTL_STRICT_SACKS_DESC); Modified: stable/10/sys/netinet/sctp_sysctl.h ============================================================================== --- stable/10/sys/netinet/sctp_sysctl.h Fri Aug 22 19:57:39 2014 (r270356) +++ stable/10/sys/netinet/sctp_sysctl.h Fri Aug 22 20:01:35 2014 (r270357) @@ -45,6 +45,7 @@ struct sctp_sysctl { uint32_t sctp_auto_asconf; uint32_t sctp_multiple_asconfs; uint32_t sctp_ecn_enable; + uint32_t sctp_pr_enable; uint32_t sctp_fr_max_burst_default; uint32_t sctp_strict_sacks; uint32_t sctp_peer_chunk_oh; @@ -154,6 +155,12 @@ struct sctp_sysctl { #define SCTPCTL_ECN_ENABLE_MAX 1 #define SCTPCTL_ECN_ENABLE_DEFAULT 1 +/* pr_enable: Enable PR-SCTP */ +#define SCTPCTL_PR_ENABLE_DESC "Enable PR-SCTP" +#define SCTPCTL_PR_ENABLE_MIN 0 +#define SCTPCTL_PR_ENABLE_MAX 1 +#define SCTPCTL_PR_ENABLE_DEFAULT 1 + /* strict_sacks: Enable SCTP Strict SACK checking */ #define SCTPCTL_STRICT_SACKS_DESC "Enable SCTP Strict SACK checking" #define SCTPCTL_STRICT_SACKS_MIN 0 Modified: stable/10/sys/netinet/sctp_timer.c ============================================================================== --- stable/10/sys/netinet/sctp_timer.c Fri Aug 22 19:57:39 2014 (r270356) +++ stable/10/sys/netinet/sctp_timer.c Fri Aug 22 20:01:35 2014 (r270357) @@ -445,7 +445,7 @@ sctp_recover_sent_list(struct sctp_tcb * sctp_free_bufspace(stcb, asoc, chk, 1); sctp_m_freem(chk->data); chk->data = NULL; - if (asoc->peer_supports_prsctp && PR_SCTP_BUF_ENABLED(chk->flags)) { + if (asoc->prsctp_supported && PR_SCTP_BUF_ENABLED(chk->flags)) { asoc->sent_queue_cnt_removeable--; } } @@ -600,7 +600,7 @@ start_again: continue; } } - if (stcb->asoc.peer_supports_prsctp && PR_SCTP_TTL_ENABLED(chk->flags)) { + if (stcb->asoc.prsctp_supported && PR_SCTP_TTL_ENABLED(chk->flags)) { /* Is it expired? */ if (timevalcmp(&now, &chk->rec.data.timetodrop, >)) { /* Yes so drop it */ @@ -614,7 +614,7 @@ start_again: continue; } } - if (stcb->asoc.peer_supports_prsctp && PR_SCTP_RTX_ENABLED(chk->flags)) { + if (stcb->asoc.prsctp_supported && PR_SCTP_RTX_ENABLED(chk->flags)) { /* Has it been retransmitted tv_sec times? */ if (chk->snd_count > chk->rec.data.timetodrop.tv_sec) { if (chk->data) { @@ -957,7 +957,7 @@ sctp_t3rxt_timer(struct sctp_inpcb *inp, sctp_timer_start(SCTP_TIMER_TYPE_SEND, inp, stcb, net); return (0); } - if (stcb->asoc.peer_supports_prsctp) { + if (stcb->asoc.prsctp_supported) { struct sctp_tmit_chunk *lchk; lchk = sctp_try_advance_peer_ack_point(stcb, &stcb->asoc); Modified: stable/10/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/10/sys/netinet/sctp_usrreq.c Fri Aug 22 19:57:39 2014 (r270356) +++ stable/10/sys/netinet/sctp_usrreq.c Fri Aug 22 20:01:35 2014 (r270357) @@ -3321,6 +3321,33 @@ flags_out: } break; } + case SCTP_PR_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.prsctp_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->prsctp_supported; + SCTP_INP_RUNLOCK(inp); + } else { + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); + error = EINVAL; + } + } + if (error == 0) { + *optsize = sizeof(struct sctp_assoc_value); + } + break; + } case SCTP_ENABLE_STREAM_RESET: { struct sctp_assoc_value *av; @@ -5913,6 +5940,35 @@ sctp_setopt(struct socket *so, int optna } break; } + case SCTP_PR_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) { + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); + error = EINVAL; + 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_WLOCK(inp); + if (av->assoc_value == 0) { + inp->prsctp_supported = 0; + } else { + inp->prsctp_supported = 1; + } + SCTP_INP_WUNLOCK(inp); + } 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: stable/10/sys/netinet/sctputil.c ============================================================================== --- stable/10/sys/netinet/sctputil.c Fri Aug 22 19:57:39 2014 (r270356) +++ stable/10/sys/netinet/sctputil.c Fri Aug 22 20:01:35 2014 (r270357) @@ -905,6 +905,7 @@ sctp_init_asoc(struct sctp_inpcb *inp, s asoc->cookie_life = inp->sctp_ep.def_cookie_life; asoc->sctp_cmt_on_off = inp->sctp_cmt_on_off; asoc->ecn_supported = inp->ecn_supported; + asoc->prsctp_supported = inp->prsctp_supported; asoc->sctp_nr_sack_on_off = (uint8_t) SCTP_BASE_SYSCTL(sctp_nr_sack_on_off); asoc->sctp_cmt_pf = (uint8_t) 0; asoc->sctp_frag_point = inp->sctp_frag_point; @@ -2620,7 +2621,7 @@ sctp_notify_assoc_change(uint16_t state, if (notif_len > sizeof(struct sctp_assoc_change)) { if ((state == SCTP_COMM_UP) || (state == SCTP_RESTART)) { i = 0; - if (stcb->asoc.peer_supports_prsctp) { + if (stcb->asoc.prsctp_supported) { sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_PR; } if (stcb->asoc.peer_supports_auth) { From tuexen at FreeBSD.org Fri Aug 22 20:05:12 2014 From: tuexen at FreeBSD.org (Michael Tuexen) Date: Fri, 22 Aug 2014 20:05:09 +0000 (UTC) Subject: svn commit: r270359 - in stable/10: lib/libc/net sys/netinet Message-ID: <201408222005.s7MK59xA035172@svn.freebsd.org> Author: tuexen Date: Fri Aug 22 20:05:09 2014 New Revision: 270359 URL: http://svnweb.freebsd.org/changeset/base/270359 Log: MFC r269475: Add SCTP socket option SCTP_NRSACK_SUPPORTED to control the NRSACK extension. The default will still be off, since it it not an RFC (yet). Changing the sysctl name will be in a separate commit. Modified: stable/10/lib/libc/net/sctp_sys_calls.c stable/10/sys/netinet/sctp.h stable/10/sys/netinet/sctp_input.c stable/10/sys/netinet/sctp_output.c stable/10/sys/netinet/sctp_pcb.c stable/10/sys/netinet/sctp_pcb.h stable/10/sys/netinet/sctp_peeloff.c stable/10/sys/netinet/sctp_structs.h stable/10/sys/netinet/sctp_sysctl.c stable/10/sys/netinet/sctp_sysctl.h stable/10/sys/netinet/sctp_usrreq.c stable/10/sys/netinet/sctputil.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/net/sctp_sys_calls.c ============================================================================== --- stable/10/lib/libc/net/sctp_sys_calls.c Fri Aug 22 20:04:51 2014 (r270358) +++ stable/10/lib/libc/net/sctp_sys_calls.c Fri Aug 22 20:05:09 2014 (r270359) @@ -356,6 +356,9 @@ 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_NRSACK_SUPPORTED: + ((struct sctp_assoc_value *)arg)->assoc_id = id; + break; case SCTP_MAX_BURST: ((struct sctp_assoc_value *)arg)->assoc_id = id; break; Modified: stable/10/sys/netinet/sctp.h ============================================================================== --- stable/10/sys/netinet/sctp.h Fri Aug 22 20:04:51 2014 (r270358) +++ stable/10/sys/netinet/sctp.h Fri Aug 22 20:05:09 2014 (r270359) @@ -123,6 +123,7 @@ 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 /* * read-only options Modified: stable/10/sys/netinet/sctp_input.c ============================================================================== --- stable/10/sys/netinet/sctp_input.c Fri Aug 22 20:04:51 2014 (r270358) +++ stable/10/sys/netinet/sctp_input.c Fri Aug 22 20:05:09 2014 (r270359) @@ -2787,6 +2787,7 @@ 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->nrsack_supported = (*inp_p)->nrsack_supported; inp->partial_delivery_point = (*inp_p)->partial_delivery_point; inp->sctp_context = (*inp_p)->sctp_context; inp->local_strreset_support = (*inp_p)->local_strreset_support; @@ -4911,8 +4912,7 @@ process_control_chunks: SCTPDBG(SCTP_DEBUG_INDATA1, "No stcb when processing NR-SACK chunk\n"); break; } - if ((stcb->asoc.sctp_nr_sack_on_off == 0) || - (stcb->asoc.peer_supports_nr_sack == 0)) { + if (stcb->asoc.nrsack_supported == 0) { goto unknown_chunk; } if (chk_length < sizeof(struct sctp_nr_sack_chunk)) { Modified: stable/10/sys/netinet/sctp_output.c ============================================================================== --- stable/10/sys/netinet/sctp_output.c Fri Aug 22 20:04:51 2014 (r270358) +++ stable/10/sys/netinet/sctp_output.c Fri Aug 22 20:05:09 2014 (r270359) @@ -4822,7 +4822,7 @@ sctp_send_initiate(struct sctp_inpcb *in if (!SCTP_BASE_SYSCTL(sctp_auth_disable)) { pr_supported->chunk_types[num_ext++] = SCTP_AUTHENTICATION; } - if (stcb->asoc.sctp_nr_sack_on_off == 1) { + 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; @@ -5925,7 +5925,8 @@ do_a_abort: if (!SCTP_BASE_SYSCTL(sctp_auth_disable)) { pr_supported->chunk_types[num_ext++] = SCTP_AUTHENTICATION; } - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off)) { + 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; @@ -10419,8 +10420,7 @@ sctp_send_sack(struct sctp_tcb *stcb, in uint8_t type; uint8_t tsn_map; - if ((stcb->asoc.sctp_nr_sack_on_off == 1) && - (stcb->asoc.peer_supports_nr_sack == 1)) { + if (stcb->asoc.nrsack_supported == 1) { type = SCTP_NR_SELECTIVE_ACK; } else { type = SCTP_SELECTIVE_ACK; Modified: stable/10/sys/netinet/sctp_pcb.c ============================================================================== --- stable/10/sys/netinet/sctp_pcb.c Fri Aug 22 20:04:51 2014 (r270358) +++ stable/10/sys/netinet/sctp_pcb.c Fri Aug 22 20:05:09 2014 (r270359) @@ -2485,6 +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); + inp->nrsack_supported = (uint8_t) SCTP_BASE_SYSCTL(sctp_nrsack_enable); /* init the small hash table we use to track asocid <-> tcb */ inp->sctp_asocidhash = SCTP_HASH_INIT(SCTP_STACK_VTAG_HASH_SIZE, &inp->hashasocidmark); if (inp->sctp_asocidhash == NULL) { @@ -6084,6 +6085,7 @@ sctp_load_addresses_from_init(struct sct int got_random = 0, got_hmacs = 0, got_chklist = 0; uint8_t ecn_supported; uint8_t prsctp_supported; + uint8_t nrsack_supported; #ifdef INET struct sockaddr_in sin; @@ -6115,6 +6117,7 @@ sctp_load_addresses_from_init(struct sct /* Turn off ECN until we get through all params */ ecn_supported = 0; prsctp_supported = 0; + nrsack_supported = 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; @@ -6454,7 +6457,6 @@ sctp_load_addresses_from_init(struct sct stcb->asoc.peer_supports_asconf = 0; stcb->asoc.peer_supports_pktdrop = 0; stcb->asoc.peer_supports_strreset = 0; - stcb->asoc.peer_supports_nr_sack = 0; stcb->asoc.peer_supports_auth = 0; pr_supported = (struct sctp_supported_chunk_types_param *)phdr; num_ent = plen - sizeof(struct sctp_paramhdr); @@ -6471,7 +6473,7 @@ sctp_load_addresses_from_init(struct sct stcb->asoc.peer_supports_pktdrop = 1; break; case SCTP_NR_SELECTIVE_ACK: - stcb->asoc.peer_supports_nr_sack = 1; + nrsack_supported = 1; break; case SCTP_STREAM_RESET: stcb->asoc.peer_supports_strreset = 1; @@ -6616,6 +6618,7 @@ next_param: } stcb->asoc.ecn_supported &= ecn_supported; stcb->asoc.prsctp_supported &= prsctp_supported; + stcb->asoc.nrsack_supported &= nrsack_supported; /* validate authentication required parameters */ if (got_random && got_hmacs) { stcb->asoc.peer_supports_auth = 1; Modified: stable/10/sys/netinet/sctp_pcb.h ============================================================================== --- stable/10/sys/netinet/sctp_pcb.h Fri Aug 22 20:04:51 2014 (r270358) +++ stable/10/sys/netinet/sctp_pcb.h Fri Aug 22 20:05:09 2014 (r270359) @@ -408,6 +408,7 @@ struct sctp_inpcb { uint32_t sctp_cmt_on_off; uint8_t ecn_supported; uint8_t prsctp_supported; + uint8_t nrsack_supported; struct sctp_nonpad_sndrcvinfo def_send; /*- * These three are here for the sosend_dgram Modified: stable/10/sys/netinet/sctp_peeloff.c ============================================================================== --- stable/10/sys/netinet/sctp_peeloff.c Fri Aug 22 20:04:51 2014 (r270358) +++ stable/10/sys/netinet/sctp_peeloff.c Fri Aug 22 20:05:09 2014 (r270359) @@ -120,6 +120,7 @@ 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->nrsack_supported = inp->nrsack_supported; n_inp->partial_delivery_point = inp->partial_delivery_point; n_inp->sctp_context = inp->sctp_context; n_inp->local_strreset_support = inp->local_strreset_support; Modified: stable/10/sys/netinet/sctp_structs.h ============================================================================== --- stable/10/sys/netinet/sctp_structs.h Fri Aug 22 20:04:51 2014 (r270358) +++ stable/10/sys/netinet/sctp_structs.h Fri Aug 22 20:05:09 2014 (r270359) @@ -1153,14 +1153,13 @@ struct sctp_association { /* Flags whether an extension is supported or not */ uint8_t ecn_supported; uint8_t prsctp_supported; + uint8_t nrsack_supported; /* 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; - /* EY - flag to indicate if peer can do nr_sack */ - uint8_t peer_supports_nr_sack; /* peer authentication support flag */ uint8_t peer_supports_auth; /* stream resets are supported by the peer */ @@ -1197,8 +1196,6 @@ struct sctp_association { uint8_t sctp_cmt_on_off; uint8_t iam_blocking; uint8_t cookie_how[8]; - /* EY 05/05/08 - NR_SACK variable */ - uint8_t sctp_nr_sack_on_off; /* JRS 5/21/07 - CMT PF variable */ uint8_t sctp_cmt_pf; uint8_t use_precise_time; Modified: stable/10/sys/netinet/sctp_sysctl.c ============================================================================== --- stable/10/sys/netinet/sctp_sysctl.c Fri Aug 22 20:04:51 2014 (r270358) +++ stable/10/sys/netinet/sctp_sysctl.c Fri Aug 22 20:05:09 2014 (r270359) @@ -56,6 +56,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_nrsack_enable) = SCTPCTL_NRSACK_ENABLE_DEFAULT; SCTP_BASE_SYSCTL(sctp_strict_sacks) = SCTPCTL_STRICT_SACKS_DEFAULT; SCTP_BASE_SYSCTL(sctp_peer_chunk_oh) = SCTPCTL_PEER_CHKOH_DEFAULT; SCTP_BASE_SYSCTL(sctp_max_burst_default) = SCTPCTL_MAXBURST_DEFAULT; @@ -86,8 +87,6 @@ sctp_init_sysctls() SCTP_BASE_SYSCTL(sctp_nr_incoming_streams_default) = SCTPCTL_INCOMING_STREAMS_DEFAULT; SCTP_BASE_SYSCTL(sctp_nr_outgoing_streams_default) = SCTPCTL_OUTGOING_STREAMS_DEFAULT; SCTP_BASE_SYSCTL(sctp_cmt_on_off) = SCTPCTL_CMT_ON_OFF_DEFAULT; - /* EY */ - SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) = SCTPCTL_NR_SACK_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; @@ -604,6 +603,7 @@ sysctl_sctp_check(SYSCTL_HANDLER_ARGS) RANGECHK(SCTP_BASE_SYSCTL(sctp_auto_asconf), SCTPCTL_AUTOASCONF_MIN, SCTPCTL_AUTOASCONF_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_ecn_enable), SCTPCTL_ECN_ENABLE_MIN, SCTPCTL_ECN_ENABLE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_pr_enable), SCTPCTL_PR_ENABLE_MIN, SCTPCTL_PR_ENABLE_MAX); + RANGECHK(SCTP_BASE_SYSCTL(sctp_nrsack_enable), SCTPCTL_NRSACK_ENABLE_MIN, SCTPCTL_NRSACK_ENABLE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_strict_sacks), SCTPCTL_STRICT_SACKS_MIN, SCTPCTL_STRICT_SACKS_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_peer_chunk_oh), SCTPCTL_PEER_CHKOH_MIN, SCTPCTL_PEER_CHKOH_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_max_burst_default), SCTPCTL_MAXBURST_MIN, SCTPCTL_MAXBURST_MAX); @@ -634,8 +634,6 @@ sysctl_sctp_check(SYSCTL_HANDLER_ARGS) RANGECHK(SCTP_BASE_SYSCTL(sctp_nr_incoming_streams_default), SCTPCTL_INCOMING_STREAMS_MIN, SCTPCTL_INCOMING_STREAMS_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_nr_outgoing_streams_default), SCTPCTL_OUTGOING_STREAMS_MIN, SCTPCTL_OUTGOING_STREAMS_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_cmt_on_off), SCTPCTL_CMT_ON_OFF_MIN, SCTPCTL_CMT_ON_OFF_MAX); - /* EY */ - RANGECHK(SCTP_BASE_SYSCTL(sctp_nr_sack_on_off), SCTPCTL_NR_SACK_ON_OFF_MIN, SCTPCTL_NR_SACK_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); @@ -869,6 +867,10 @@ 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, nr_sack_on_off, CTLTYPE_UINT | CTLFLAG_RW, + &SCTP_BASE_SYSCTL(sctp_nrsack_enable), 0, sysctl_sctp_check, "IU", + SCTPCTL_NRSACK_ENABLE_DESC); + SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, strict_sacks, CTLTYPE_UINT | CTLFLAG_RW, &SCTP_BASE_SYSCTL(sctp_strict_sacks), 0, sysctl_sctp_check, "IU", SCTPCTL_STRICT_SACKS_DESC); @@ -990,10 +992,6 @@ SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUT &SCTP_BASE_SYSCTL(sctp_cmt_on_off), 0, sysctl_sctp_check, "IU", SCTPCTL_CMT_ON_OFF_DESC); -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, nr_sack_on_off, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_nr_sack_on_off), 0, sysctl_sctp_check, "IU", - SCTPCTL_NR_SACK_ON_OFF_DESC); - SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, cmt_use_dac, CTLTYPE_UINT | CTLFLAG_RW, &SCTP_BASE_SYSCTL(sctp_cmt_use_dac), 0, sysctl_sctp_check, "IU", SCTPCTL_CMT_USE_DAC_DESC); Modified: stable/10/sys/netinet/sctp_sysctl.h ============================================================================== --- stable/10/sys/netinet/sctp_sysctl.h Fri Aug 22 20:04:51 2014 (r270358) +++ stable/10/sys/netinet/sctp_sysctl.h Fri Aug 22 20:05:09 2014 (r270359) @@ -46,6 +46,7 @@ struct sctp_sysctl { uint32_t sctp_multiple_asconfs; uint32_t sctp_ecn_enable; uint32_t sctp_pr_enable; + uint32_t sctp_nrsack_enable; uint32_t sctp_fr_max_burst_default; uint32_t sctp_strict_sacks; uint32_t sctp_peer_chunk_oh; @@ -77,8 +78,6 @@ struct sctp_sysctl { uint32_t sctp_nr_outgoing_streams_default; uint32_t sctp_cmt_on_off; uint32_t sctp_cmt_use_dac; - /* EY 5/5/08 - nr_sack flag variable */ - uint32_t sctp_nr_sack_on_off; uint32_t sctp_use_cwnd_based_maxburst; uint32_t sctp_auth_disable; uint32_t sctp_nat_friendly; @@ -161,6 +160,13 @@ struct sctp_sysctl { #define SCTPCTL_PR_ENABLE_MAX 1 #define SCTPCTL_PR_ENABLE_DEFAULT 1 +/* nrsack_enable: Enable NR_SACK */ +#define SCTPCTL_NRSACK_ENABLE_DESC "Enable NR_SACK" +#define SCTPCTL_NRSACK_ENABLE_MIN 0 +#define SCTPCTL_NRSACK_ENABLE_MAX 1 +#define SCTPCTL_NRSACK_ENABLE_DEFAULT 0 + + /* strict_sacks: Enable SCTP Strict SACK checking */ #define SCTPCTL_STRICT_SACKS_DESC "Enable SCTP Strict SACK checking" #define SCTPCTL_STRICT_SACKS_MIN 0 @@ -348,12 +354,6 @@ struct sctp_sysctl { #define SCTPCTL_CMT_ON_OFF_MAX SCTP_CMT_MAX #define SCTPCTL_CMT_ON_OFF_DEFAULT SCTP_CMT_OFF -/* EY - nr_sack_on_off: NR_SACK on/off flag */ -#define SCTPCTL_NR_SACK_ON_OFF_DESC "NR_SACK on/off flag" -#define SCTPCTL_NR_SACK_ON_OFF_MIN 0 -#define SCTPCTL_NR_SACK_ON_OFF_MAX 1 -#define SCTPCTL_NR_SACK_ON_OFF_DEFAULT 0 - /* cmt_use_dac: CMT DAC on/off flag */ #define SCTPCTL_CMT_USE_DAC_DESC "CMT DAC on/off flag" #define SCTPCTL_CMT_USE_DAC_MIN 0 Modified: stable/10/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/10/sys/netinet/sctp_usrreq.c Fri Aug 22 20:04:51 2014 (r270358) +++ stable/10/sys/netinet/sctp_usrreq.c Fri Aug 22 20:05:09 2014 (r270359) @@ -3348,6 +3348,33 @@ flags_out: } break; } + case SCTP_NRSACK_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.nrsack_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->nrsack_supported; + SCTP_INP_RUNLOCK(inp); + } else { + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); + error = EINVAL; + } + } + if (error == 0) { + *optsize = sizeof(struct sctp_assoc_value); + } + break; + } case SCTP_ENABLE_STREAM_RESET: { struct sctp_assoc_value *av; @@ -5969,6 +5996,35 @@ sctp_setopt(struct socket *so, int optna } break; } + case SCTP_NRSACK_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) { + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); + error = EINVAL; + 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_WLOCK(inp); + if (av->assoc_value == 0) { + inp->nrsack_supported = 0; + } else { + inp->nrsack_supported = 1; + } + SCTP_INP_WUNLOCK(inp); + } 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: stable/10/sys/netinet/sctputil.c ============================================================================== --- stable/10/sys/netinet/sctputil.c Fri Aug 22 20:04:51 2014 (r270358) +++ stable/10/sys/netinet/sctputil.c Fri Aug 22 20:05:09 2014 (r270359) @@ -906,7 +906,7 @@ sctp_init_asoc(struct sctp_inpcb *inp, s asoc->sctp_cmt_on_off = inp->sctp_cmt_on_off; asoc->ecn_supported = inp->ecn_supported; asoc->prsctp_supported = inp->prsctp_supported; - asoc->sctp_nr_sack_on_off = (uint8_t) SCTP_BASE_SYSCTL(sctp_nr_sack_on_off); + asoc->nrsack_supported = inp->nrsack_supported; asoc->sctp_cmt_pf = (uint8_t) 0; asoc->sctp_frag_point = inp->sctp_frag_point; asoc->sctp_features = inp->sctp_features; From tuexen at FreeBSD.org Fri Aug 22 20:08:53 2014 From: tuexen at FreeBSD.org (Michael Tuexen) Date: Fri, 22 Aug 2014 20:08:50 +0000 (UTC) Subject: svn commit: r270360 - in stable/10: lib/libc/net sys/netinet Message-ID: <201408222008.s7MK8opJ035700@svn.freebsd.org> Author: tuexen Date: Fri Aug 22 20:08:50 2014 New Revision: 270360 URL: http://svnweb.freebsd.org/changeset/base/270360 Log: MFC r269481: Add support for the SCTP_PKTDROP_SUPPORTED socket option and the corresponding sysctl variable. The default is off, since the specification is not an RFC yet. Modified: stable/10/lib/libc/net/sctp_sys_calls.c stable/10/sys/netinet/sctp.h stable/10/sys/netinet/sctp_input.c stable/10/sys/netinet/sctp_output.c stable/10/sys/netinet/sctp_pcb.c stable/10/sys/netinet/sctp_pcb.h stable/10/sys/netinet/sctp_peeloff.c stable/10/sys/netinet/sctp_structs.h stable/10/sys/netinet/sctp_sysctl.c stable/10/sys/netinet/sctp_sysctl.h stable/10/sys/netinet/sctp_usrreq.c stable/10/sys/netinet/sctputil.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/net/sctp_sys_calls.c ============================================================================== --- stable/10/lib/libc/net/sctp_sys_calls.c Fri Aug 22 20:05:09 2014 (r270359) +++ stable/10/lib/libc/net/sctp_sys_calls.c Fri Aug 22 20:08:50 2014 (r270360) @@ -359,6 +359,9 @@ sctp_opt_info(int sd, sctp_assoc_t id, i case SCTP_NRSACK_SUPPORTED: ((struct sctp_assoc_value *)arg)->assoc_id = id; break; + case SCTP_PKTDROP_SUPPORTED: + ((struct sctp_assoc_value *)arg)->assoc_id = id; + break; case SCTP_MAX_BURST: ((struct sctp_assoc_value *)arg)->assoc_id = id; break; Modified: stable/10/sys/netinet/sctp.h ============================================================================== --- stable/10/sys/netinet/sctp.h Fri Aug 22 20:05:09 2014 (r270359) +++ stable/10/sys/netinet/sctp.h Fri Aug 22 20:08:50 2014 (r270360) @@ -124,6 +124,7 @@ struct sctp_paramhdr { #define SCTP_ECN_SUPPORTED 0x00000025 #define SCTP_PR_SUPPORTED 0x00000026 #define SCTP_NRSACK_SUPPORTED 0x00000027 +#define SCTP_PKTDROP_SUPPORTED 0x00000028 /* * read-only options Modified: stable/10/sys/netinet/sctp_input.c ============================================================================== --- stable/10/sys/netinet/sctp_input.c Fri Aug 22 20:05:09 2014 (r270359) +++ stable/10/sys/netinet/sctp_input.c Fri Aug 22 20:08:50 2014 (r270360) @@ -2788,6 +2788,7 @@ sctp_handle_cookie_echo(struct mbuf *m, inp->ecn_supported = (*inp_p)->ecn_supported; inp->prsctp_supported = (*inp_p)->prsctp_supported; inp->nrsack_supported = (*inp_p)->nrsack_supported; + inp->pktdrop_supported = (*inp_p)->pktdrop_supported; inp->partial_delivery_point = (*inp_p)->partial_delivery_point; inp->sctp_context = (*inp_p)->sctp_context; inp->local_strreset_support = (*inp_p)->local_strreset_support; Modified: stable/10/sys/netinet/sctp_output.c ============================================================================== --- stable/10/sys/netinet/sctp_output.c Fri Aug 22 20:05:09 2014 (r270359) +++ stable/10/sys/netinet/sctp_output.c Fri Aug 22 20:08:50 2014 (r270360) @@ -4817,7 +4817,9 @@ sctp_send_initiate(struct sctp_inpcb *in if (stcb->asoc.prsctp_supported == 1) { pr_supported->chunk_types[num_ext++] = SCTP_FORWARD_CUM_TSN; } - pr_supported->chunk_types[num_ext++] = SCTP_PACKET_DROPPED; + if (stcb->asoc.pktdrop_supported == 1) { + pr_supported->chunk_types[num_ext++] = SCTP_PACKET_DROPPED; + } pr_supported->chunk_types[num_ext++] = SCTP_STREAM_RESET; if (!SCTP_BASE_SYSCTL(sctp_auth_disable)) { pr_supported->chunk_types[num_ext++] = SCTP_AUTHENTICATION; @@ -5920,7 +5922,10 @@ do_a_abort: ((asoc == NULL) && (inp->prsctp_supported == 1))) { pr_supported->chunk_types[num_ext++] = SCTP_FORWARD_CUM_TSN; } - pr_supported->chunk_types[num_ext++] = SCTP_PACKET_DROPPED; + if (((asoc != NULL) && (asoc->pktdrop_supported == 1)) || + ((asoc == NULL) && (inp->pktdrop_supported == 1))) { + pr_supported->chunk_types[num_ext++] = SCTP_PACKET_DROPPED; + } pr_supported->chunk_types[num_ext++] = SCTP_STREAM_RESET; if (!SCTP_BASE_SYSCTL(sctp_auth_disable)) { pr_supported->chunk_types[num_ext++] = SCTP_AUTHENTICATION; @@ -11399,7 +11404,7 @@ sctp_send_packet_dropped(struct sctp_tcb } asoc = &stcb->asoc; SCTP_TCB_LOCK_ASSERT(stcb); - if (asoc->peer_supports_pktdrop == 0) { + if (asoc->pktdrop_supported == 0) { /*- * peer must declare support before I send one. */ Modified: stable/10/sys/netinet/sctp_pcb.c ============================================================================== --- stable/10/sys/netinet/sctp_pcb.c Fri Aug 22 20:05:09 2014 (r270359) +++ stable/10/sys/netinet/sctp_pcb.c Fri Aug 22 20:08:50 2014 (r270360) @@ -2486,6 +2486,7 @@ sctp_inpcb_alloc(struct socket *so, uint inp->ecn_supported = (uint8_t) SCTP_BASE_SYSCTL(sctp_ecn_enable); inp->prsctp_supported = (uint8_t) SCTP_BASE_SYSCTL(sctp_pr_enable); inp->nrsack_supported = (uint8_t) SCTP_BASE_SYSCTL(sctp_nrsack_enable); + inp->pktdrop_supported = (uint8_t) SCTP_BASE_SYSCTL(sctp_pktdrop_enable); /* init the small hash table we use to track asocid <-> tcb */ inp->sctp_asocidhash = SCTP_HASH_INIT(SCTP_STACK_VTAG_HASH_SIZE, &inp->hashasocidmark); if (inp->sctp_asocidhash == NULL) { @@ -6086,6 +6087,7 @@ sctp_load_addresses_from_init(struct sct uint8_t ecn_supported; uint8_t prsctp_supported; uint8_t nrsack_supported; + uint8_t pktdrop_supported; #ifdef INET struct sockaddr_in sin; @@ -6118,6 +6120,7 @@ sctp_load_addresses_from_init(struct sct ecn_supported = 0; prsctp_supported = 0; nrsack_supported = 0; + pktdrop_supported = 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; @@ -6455,7 +6458,6 @@ sctp_load_addresses_from_init(struct sct return (-25); } stcb->asoc.peer_supports_asconf = 0; - stcb->asoc.peer_supports_pktdrop = 0; stcb->asoc.peer_supports_strreset = 0; stcb->asoc.peer_supports_auth = 0; pr_supported = (struct sctp_supported_chunk_types_param *)phdr; @@ -6470,7 +6472,7 @@ sctp_load_addresses_from_init(struct sct prsctp_supported = 1; break; case SCTP_PACKET_DROPPED: - stcb->asoc.peer_supports_pktdrop = 1; + pktdrop_supported = 1; break; case SCTP_NR_SELECTIVE_ACK: nrsack_supported = 1; @@ -6619,6 +6621,7 @@ next_param: stcb->asoc.ecn_supported &= ecn_supported; stcb->asoc.prsctp_supported &= prsctp_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; Modified: stable/10/sys/netinet/sctp_pcb.h ============================================================================== --- stable/10/sys/netinet/sctp_pcb.h Fri Aug 22 20:05:09 2014 (r270359) +++ stable/10/sys/netinet/sctp_pcb.h Fri Aug 22 20:08:50 2014 (r270360) @@ -409,6 +409,7 @@ struct sctp_inpcb { uint8_t ecn_supported; uint8_t prsctp_supported; uint8_t nrsack_supported; + uint8_t pktdrop_supported; struct sctp_nonpad_sndrcvinfo def_send; /*- * These three are here for the sosend_dgram Modified: stable/10/sys/netinet/sctp_peeloff.c ============================================================================== --- stable/10/sys/netinet/sctp_peeloff.c Fri Aug 22 20:05:09 2014 (r270359) +++ stable/10/sys/netinet/sctp_peeloff.c Fri Aug 22 20:08:50 2014 (r270360) @@ -121,6 +121,7 @@ sctp_do_peeloff(struct socket *head, str n_inp->ecn_supported = inp->ecn_supported; n_inp->prsctp_supported = inp->prsctp_supported; n_inp->nrsack_supported = inp->nrsack_supported; + n_inp->pktdrop_supported = inp->pktdrop_supported; n_inp->partial_delivery_point = inp->partial_delivery_point; n_inp->sctp_context = inp->sctp_context; n_inp->local_strreset_support = inp->local_strreset_support; Modified: stable/10/sys/netinet/sctp_structs.h ============================================================================== --- stable/10/sys/netinet/sctp_structs.h Fri Aug 22 20:05:09 2014 (r270359) +++ stable/10/sys/netinet/sctp_structs.h Fri Aug 22 20:08:50 2014 (r270360) @@ -1154,6 +1154,7 @@ struct sctp_association { uint8_t ecn_supported; uint8_t prsctp_supported; uint8_t nrsack_supported; + uint8_t pktdrop_supported; /* Did the peer make the stream config (add out) request */ uint8_t peer_req_out; @@ -1167,11 +1168,6 @@ struct sctp_association { uint8_t local_strreset_support; uint8_t peer_supports_nat; - /* - * packet drop's are supported by the peer, we don't really care - * about this but we bookkeep it anyway. - */ - uint8_t peer_supports_pktdrop; struct sctp_scoping scope; /* flags to handle send alternate net tracking */ Modified: stable/10/sys/netinet/sctp_sysctl.c ============================================================================== --- stable/10/sys/netinet/sctp_sysctl.c Fri Aug 22 20:05:09 2014 (r270359) +++ stable/10/sys/netinet/sctp_sysctl.c Fri Aug 22 20:08:50 2014 (r270360) @@ -57,6 +57,7 @@ sctp_init_sysctls() SCTP_BASE_SYSCTL(sctp_ecn_enable) = SCTPCTL_ECN_ENABLE_DEFAULT; SCTP_BASE_SYSCTL(sctp_pr_enable) = SCTPCTL_PR_ENABLE_DEFAULT; SCTP_BASE_SYSCTL(sctp_nrsack_enable) = SCTPCTL_NRSACK_ENABLE_DEFAULT; + SCTP_BASE_SYSCTL(sctp_pktdrop_enable) = SCTPCTL_PKTDROP_ENABLE_DEFAULT; SCTP_BASE_SYSCTL(sctp_strict_sacks) = SCTPCTL_STRICT_SACKS_DEFAULT; SCTP_BASE_SYSCTL(sctp_peer_chunk_oh) = SCTPCTL_PEER_CHKOH_DEFAULT; SCTP_BASE_SYSCTL(sctp_max_burst_default) = SCTPCTL_MAXBURST_DEFAULT; @@ -604,6 +605,7 @@ sysctl_sctp_check(SYSCTL_HANDLER_ARGS) RANGECHK(SCTP_BASE_SYSCTL(sctp_ecn_enable), SCTPCTL_ECN_ENABLE_MIN, SCTPCTL_ECN_ENABLE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_pr_enable), SCTPCTL_PR_ENABLE_MIN, SCTPCTL_PR_ENABLE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_nrsack_enable), SCTPCTL_NRSACK_ENABLE_MIN, SCTPCTL_NRSACK_ENABLE_MAX); + RANGECHK(SCTP_BASE_SYSCTL(sctp_pktdrop_enable), SCTPCTL_PKTDROP_ENABLE_MIN, SCTPCTL_PKTDROP_ENABLE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_strict_sacks), SCTPCTL_STRICT_SACKS_MIN, SCTPCTL_STRICT_SACKS_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_peer_chunk_oh), SCTPCTL_PEER_CHKOH_MIN, SCTPCTL_PEER_CHKOH_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_max_burst_default), SCTPCTL_MAXBURST_MIN, SCTPCTL_MAXBURST_MAX); @@ -871,6 +873,10 @@ SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUT &SCTP_BASE_SYSCTL(sctp_nrsack_enable), 0, sysctl_sctp_check, "IU", SCTPCTL_NRSACK_ENABLE_DESC); +SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, pktdrop_enable, CTLTYPE_UINT | CTLFLAG_RW, + &SCTP_BASE_SYSCTL(sctp_pktdrop_enable), 0, sysctl_sctp_check, "IU", + SCTPCTL_PKTDROP_ENABLE_DESC); + SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, strict_sacks, CTLTYPE_UINT | CTLFLAG_RW, &SCTP_BASE_SYSCTL(sctp_strict_sacks), 0, sysctl_sctp_check, "IU", SCTPCTL_STRICT_SACKS_DESC); Modified: stable/10/sys/netinet/sctp_sysctl.h ============================================================================== --- stable/10/sys/netinet/sctp_sysctl.h Fri Aug 22 20:05:09 2014 (r270359) +++ stable/10/sys/netinet/sctp_sysctl.h Fri Aug 22 20:08:50 2014 (r270360) @@ -47,6 +47,7 @@ struct sctp_sysctl { uint32_t sctp_ecn_enable; uint32_t sctp_pr_enable; uint32_t sctp_nrsack_enable; + uint32_t sctp_pktdrop_enable; uint32_t sctp_fr_max_burst_default; uint32_t sctp_strict_sacks; uint32_t sctp_peer_chunk_oh; @@ -166,6 +167,11 @@ struct sctp_sysctl { #define SCTPCTL_NRSACK_ENABLE_MAX 1 #define SCTPCTL_NRSACK_ENABLE_DEFAULT 0 +/* pktdrop_enable: Enable SCTP Packet Drop Reports */ +#define SCTPCTL_PKTDROP_ENABLE_DESC "Enable SCTP PKTDROP" +#define SCTPCTL_PKTDROP_ENABLE_MIN 0 +#define SCTPCTL_PKTDROP_ENABLE_MAX 1 +#define SCTPCTL_PKTDROP_ENABLE_DEFAULT 0 /* strict_sacks: Enable SCTP Strict SACK checking */ #define SCTPCTL_STRICT_SACKS_DESC "Enable SCTP Strict SACK checking" Modified: stable/10/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/10/sys/netinet/sctp_usrreq.c Fri Aug 22 20:05:09 2014 (r270359) +++ stable/10/sys/netinet/sctp_usrreq.c Fri Aug 22 20:08:50 2014 (r270360) @@ -3375,6 +3375,33 @@ flags_out: } break; } + case SCTP_PKTDROP_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.pktdrop_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->pktdrop_supported; + SCTP_INP_RUNLOCK(inp); + } else { + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); + error = EINVAL; + } + } + if (error == 0) { + *optsize = sizeof(struct sctp_assoc_value); + } + break; + } case SCTP_ENABLE_STREAM_RESET: { struct sctp_assoc_value *av; @@ -6025,6 +6052,35 @@ sctp_setopt(struct socket *so, int optna } break; } + case SCTP_PKTDROP_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) { + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); + error = EINVAL; + 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_WLOCK(inp); + if (av->assoc_value == 0) { + inp->pktdrop_supported = 0; + } else { + inp->pktdrop_supported = 1; + } + SCTP_INP_WUNLOCK(inp); + } 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: stable/10/sys/netinet/sctputil.c ============================================================================== --- stable/10/sys/netinet/sctputil.c Fri Aug 22 20:05:09 2014 (r270359) +++ stable/10/sys/netinet/sctputil.c Fri Aug 22 20:08:50 2014 (r270360) @@ -907,6 +907,7 @@ sctp_init_asoc(struct sctp_inpcb *inp, s asoc->ecn_supported = inp->ecn_supported; asoc->prsctp_supported = inp->prsctp_supported; asoc->nrsack_supported = inp->nrsack_supported; + asoc->pktdrop_supported = inp->pktdrop_supported; asoc->sctp_cmt_pf = (uint8_t) 0; asoc->sctp_frag_point = inp->sctp_frag_point; asoc->sctp_features = inp->sctp_features; @@ -952,7 +953,6 @@ sctp_init_asoc(struct sctp_inpcb *inp, s sctp_select_initial_TSN(&inp->sctp_ep); asoc->asconf_seq_out_acked = asoc->asconf_seq_out - 1; /* we are optimisitic here */ - asoc->peer_supports_pktdrop = 1; asoc->peer_supports_nat = 0; asoc->sent_queue_retran_cnt = 0; From tuexen at FreeBSD.org Fri Aug 22 20:16:29 2014 From: tuexen at FreeBSD.org (Michael Tuexen) Date: Fri, 22 Aug 2014 20:16:26 +0000 (UTC) Subject: svn commit: r270361 - in stable/10: lib/libc/net sys/netinet Message-ID: <201408222016.s7MKGQhW040217@svn.freebsd.org> Author: tuexen Date: Fri Aug 22 20:16:26 2014 New Revision: 270361 URL: http://svnweb.freebsd.org/changeset/base/270361 Log: MFC r269527: Add support for the SCTP_RECONFIG_SUPPORTED and the corresponding sysctl controlling the negotiation of the RE-CONFIG extension. Modified: stable/10/lib/libc/net/sctp_sys_calls.c stable/10/sys/netinet/sctp.h stable/10/sys/netinet/sctp_input.c stable/10/sys/netinet/sctp_output.c stable/10/sys/netinet/sctp_pcb.c stable/10/sys/netinet/sctp_pcb.h stable/10/sys/netinet/sctp_peeloff.c stable/10/sys/netinet/sctp_structs.h stable/10/sys/netinet/sctp_sysctl.c stable/10/sys/netinet/sctp_sysctl.h stable/10/sys/netinet/sctp_usrreq.c stable/10/sys/netinet/sctputil.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/net/sctp_sys_calls.c ============================================================================== --- stable/10/lib/libc/net/sctp_sys_calls.c Fri Aug 22 20:08:50 2014 (r270360) +++ stable/10/lib/libc/net/sctp_sys_calls.c Fri Aug 22 20:16:26 2014 (r270361) @@ -356,6 +356,9 @@ 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_RECONFIG_SUPPORTED: + ((struct sctp_assoc_value *)arg)->assoc_id = id; + break; case SCTP_NRSACK_SUPPORTED: ((struct sctp_assoc_value *)arg)->assoc_id = id; break; Modified: stable/10/sys/netinet/sctp.h ============================================================================== --- stable/10/sys/netinet/sctp.h Fri Aug 22 20:08:50 2014 (r270360) +++ stable/10/sys/netinet/sctp.h Fri Aug 22 20:16:26 2014 (r270361) @@ -125,6 +125,7 @@ struct sctp_paramhdr { #define SCTP_PR_SUPPORTED 0x00000026 #define SCTP_NRSACK_SUPPORTED 0x00000027 #define SCTP_PKTDROP_SUPPORTED 0x00000028 +#define SCTP_RECONFIG_SUPPORTED 0x00000029 /* * read-only options Modified: stable/10/sys/netinet/sctp_input.c ============================================================================== --- stable/10/sys/netinet/sctp_input.c Fri Aug 22 20:08:50 2014 (r270360) +++ stable/10/sys/netinet/sctp_input.c Fri Aug 22 20:16:26 2014 (r270361) @@ -2787,6 +2787,7 @@ 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->reconfig_supported = (*inp_p)->reconfig_supported; inp->nrsack_supported = (*inp_p)->nrsack_supported; inp->pktdrop_supported = (*inp_p)->pktdrop_supported; inp->partial_delivery_point = (*inp_p)->partial_delivery_point; @@ -5389,13 +5390,13 @@ process_control_chunks: *offset = length; return (NULL); } - if (stcb->asoc.peer_supports_strreset == 0) { + 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.peer_supports_strreset = 1; + stcb->asoc.reconfig_supported = 1; } if (sctp_handle_stream_reset(stcb, m, *offset, ch)) { /* stop processing */ Modified: stable/10/sys/netinet/sctp_output.c ============================================================================== --- stable/10/sys/netinet/sctp_output.c Fri Aug 22 20:08:50 2014 (r270360) +++ stable/10/sys/netinet/sctp_output.c Fri Aug 22 20:16:26 2014 (r270361) @@ -4820,7 +4820,9 @@ sctp_send_initiate(struct sctp_inpcb *in if (stcb->asoc.pktdrop_supported == 1) { pr_supported->chunk_types[num_ext++] = SCTP_PACKET_DROPPED; } - pr_supported->chunk_types[num_ext++] = SCTP_STREAM_RESET; + 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; } @@ -5926,7 +5928,10 @@ do_a_abort: ((asoc == NULL) && (inp->pktdrop_supported == 1))) { pr_supported->chunk_types[num_ext++] = SCTP_PACKET_DROPPED; } - pr_supported->chunk_types[num_ext++] = SCTP_STREAM_RESET; + 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; } Modified: stable/10/sys/netinet/sctp_pcb.c ============================================================================== --- stable/10/sys/netinet/sctp_pcb.c Fri Aug 22 20:08:50 2014 (r270360) +++ stable/10/sys/netinet/sctp_pcb.c Fri Aug 22 20:16:26 2014 (r270361) @@ -2485,6 +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); + 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); /* init the small hash table we use to track asocid <-> tcb */ @@ -6086,6 +6087,7 @@ sctp_load_addresses_from_init(struct sct 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; @@ -6116,9 +6118,9 @@ sctp_load_addresses_from_init(struct sct } else { sa = src; } - /* Turn off ECN until we get through all params */ ecn_supported = 0; prsctp_supported = 0; + reconfig_supported = 0; nrsack_supported = 0; pktdrop_supported = 0; TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { @@ -6458,7 +6460,6 @@ sctp_load_addresses_from_init(struct sct return (-25); } stcb->asoc.peer_supports_asconf = 0; - stcb->asoc.peer_supports_strreset = 0; stcb->asoc.peer_supports_auth = 0; pr_supported = (struct sctp_supported_chunk_types_param *)phdr; num_ent = plen - sizeof(struct sctp_paramhdr); @@ -6478,7 +6479,7 @@ sctp_load_addresses_from_init(struct sct nrsack_supported = 1; break; case SCTP_STREAM_RESET: - stcb->asoc.peer_supports_strreset = 1; + reconfig_supported = 1; break; case SCTP_AUTHENTICATION: stcb->asoc.peer_supports_auth = 1; @@ -6620,6 +6621,7 @@ 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 */ Modified: stable/10/sys/netinet/sctp_pcb.h ============================================================================== --- stable/10/sys/netinet/sctp_pcb.h Fri Aug 22 20:08:50 2014 (r270360) +++ stable/10/sys/netinet/sctp_pcb.h Fri Aug 22 20:16:26 2014 (r270361) @@ -408,6 +408,7 @@ struct sctp_inpcb { uint32_t sctp_cmt_on_off; uint8_t ecn_supported; uint8_t prsctp_supported; + uint8_t reconfig_supported; uint8_t nrsack_supported; uint8_t pktdrop_supported; struct sctp_nonpad_sndrcvinfo def_send; Modified: stable/10/sys/netinet/sctp_peeloff.c ============================================================================== --- stable/10/sys/netinet/sctp_peeloff.c Fri Aug 22 20:08:50 2014 (r270360) +++ stable/10/sys/netinet/sctp_peeloff.c Fri Aug 22 20:16:26 2014 (r270361) @@ -120,6 +120,7 @@ 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->reconfig_supported = inp->reconfig_supported; n_inp->nrsack_supported = inp->nrsack_supported; n_inp->pktdrop_supported = inp->pktdrop_supported; n_inp->partial_delivery_point = inp->partial_delivery_point; Modified: stable/10/sys/netinet/sctp_structs.h ============================================================================== --- stable/10/sys/netinet/sctp_structs.h Fri Aug 22 20:08:50 2014 (r270360) +++ stable/10/sys/netinet/sctp_structs.h Fri Aug 22 20:16:26 2014 (r270361) @@ -1153,6 +1153,7 @@ struct sctp_association { /* Flags whether an extension is supported or not */ uint8_t ecn_supported; uint8_t prsctp_supported; + uint8_t reconfig_supported; uint8_t nrsack_supported; uint8_t pktdrop_supported; @@ -1163,8 +1164,6 @@ struct sctp_association { uint8_t peer_supports_asconf; /* peer authentication support flag */ uint8_t peer_supports_auth; - /* stream resets are supported by the peer */ - uint8_t peer_supports_strreset; uint8_t local_strreset_support; uint8_t peer_supports_nat; Modified: stable/10/sys/netinet/sctp_sysctl.c ============================================================================== --- stable/10/sys/netinet/sctp_sysctl.c Fri Aug 22 20:08:50 2014 (r270360) +++ stable/10/sys/netinet/sctp_sysctl.c Fri Aug 22 20:16:26 2014 (r270361) @@ -56,6 +56,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_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; SCTP_BASE_SYSCTL(sctp_strict_sacks) = SCTPCTL_STRICT_SACKS_DEFAULT; @@ -604,6 +605,7 @@ sysctl_sctp_check(SYSCTL_HANDLER_ARGS) RANGECHK(SCTP_BASE_SYSCTL(sctp_auto_asconf), SCTPCTL_AUTOASCONF_MIN, SCTPCTL_AUTOASCONF_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_ecn_enable), SCTPCTL_ECN_ENABLE_MIN, SCTPCTL_ECN_ENABLE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_pr_enable), SCTPCTL_PR_ENABLE_MIN, SCTPCTL_PR_ENABLE_MAX); + RANGECHK(SCTP_BASE_SYSCTL(sctp_reconfig_enable), SCTPCTL_RECONFIG_ENABLE_MIN, SCTPCTL_RECONFIG_ENABLE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_nrsack_enable), SCTPCTL_NRSACK_ENABLE_MIN, SCTPCTL_NRSACK_ENABLE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_pktdrop_enable), SCTPCTL_PKTDROP_ENABLE_MIN, SCTPCTL_PKTDROP_ENABLE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_strict_sacks), SCTPCTL_STRICT_SACKS_MIN, SCTPCTL_STRICT_SACKS_MAX); @@ -869,6 +871,10 @@ 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, reconfig_enable, CTLTYPE_UINT | CTLFLAG_RW, + &SCTP_BASE_SYSCTL(sctp_reconfig_enable), 0, sysctl_sctp_check, "IU", + SCTPCTL_RECONFIG_ENABLE_DESC); + SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, nr_sack_on_off, CTLTYPE_UINT | CTLFLAG_RW, &SCTP_BASE_SYSCTL(sctp_nrsack_enable), 0, sysctl_sctp_check, "IU", SCTPCTL_NRSACK_ENABLE_DESC); Modified: stable/10/sys/netinet/sctp_sysctl.h ============================================================================== --- stable/10/sys/netinet/sctp_sysctl.h Fri Aug 22 20:08:50 2014 (r270360) +++ stable/10/sys/netinet/sctp_sysctl.h Fri Aug 22 20:16:26 2014 (r270361) @@ -46,6 +46,7 @@ struct sctp_sysctl { uint32_t sctp_multiple_asconfs; uint32_t sctp_ecn_enable; uint32_t sctp_pr_enable; + uint32_t sctp_reconfig_enable; uint32_t sctp_nrsack_enable; uint32_t sctp_pktdrop_enable; uint32_t sctp_fr_max_burst_default; @@ -161,8 +162,14 @@ struct sctp_sysctl { #define SCTPCTL_PR_ENABLE_MAX 1 #define SCTPCTL_PR_ENABLE_DEFAULT 1 +/* reconfig_enable: Enable SCTP RE-CONFIG */ +#define SCTPCTL_RECONFIG_ENABLE_DESC "Enable SCTP RE-CONFIG" +#define SCTPCTL_RECONFIG_ENABLE_MIN 0 +#define SCTPCTL_RECONFIG_ENABLE_MAX 1 +#define SCTPCTL_RECONFIG_ENABLE_DEFAULT 1 + /* nrsack_enable: Enable NR_SACK */ -#define SCTPCTL_NRSACK_ENABLE_DESC "Enable NR_SACK" +#define SCTPCTL_NRSACK_ENABLE_DESC "Enable SCTP NR-SACK" #define SCTPCTL_NRSACK_ENABLE_MIN 0 #define SCTPCTL_NRSACK_ENABLE_MAX 1 #define SCTPCTL_NRSACK_ENABLE_DEFAULT 0 Modified: stable/10/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/10/sys/netinet/sctp_usrreq.c Fri Aug 22 20:08:50 2014 (r270360) +++ stable/10/sys/netinet/sctp_usrreq.c Fri Aug 22 20:16:26 2014 (r270361) @@ -3348,6 +3348,33 @@ flags_out: } break; } + case SCTP_RECONFIG_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.reconfig_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->reconfig_supported; + SCTP_INP_RUNLOCK(inp); + } else { + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); + error = EINVAL; + } + } + if (error == 0) { + *optsize = sizeof(struct sctp_assoc_value); + } + break; + } case SCTP_NRSACK_SUPPORTED: { struct sctp_assoc_value *av; @@ -4274,7 +4301,7 @@ sctp_setopt(struct socket *so, int optna error = ENOENT; break; } - if (stcb->asoc.peer_supports_strreset == 0) { + if (stcb->asoc.reconfig_supported == 0) { /* * Peer does not support the chunk type. */ @@ -4341,7 +4368,7 @@ sctp_setopt(struct socket *so, int optna error = ENOENT; break; } - if (stcb->asoc.peer_supports_strreset == 0) { + if (stcb->asoc.reconfig_supported == 0) { /* * Peer does not support the chunk type. */ @@ -4410,7 +4437,7 @@ sctp_setopt(struct socket *so, int optna error = ENOENT; break; } - if (stcb->asoc.peer_supports_strreset == 0) { + if (stcb->asoc.reconfig_supported == 0) { /* * Peer does not support the chunk type. */ @@ -6023,6 +6050,35 @@ sctp_setopt(struct socket *so, int optna } break; } + case SCTP_RECONFIG_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) { + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); + error = EINVAL; + 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_WLOCK(inp); + if (av->assoc_value == 0) { + inp->reconfig_supported = 0; + } else { + inp->reconfig_supported = 1; + } + SCTP_INP_WUNLOCK(inp); + } else { + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); + error = EINVAL; + } + } + break; + } case SCTP_NRSACK_SUPPORTED: { struct sctp_assoc_value *av; Modified: stable/10/sys/netinet/sctputil.c ============================================================================== --- stable/10/sys/netinet/sctputil.c Fri Aug 22 20:08:50 2014 (r270360) +++ stable/10/sys/netinet/sctputil.c Fri Aug 22 20:16:26 2014 (r270361) @@ -906,6 +906,7 @@ sctp_init_asoc(struct sctp_inpcb *inp, s asoc->sctp_cmt_on_off = inp->sctp_cmt_on_off; asoc->ecn_supported = inp->ecn_supported; asoc->prsctp_supported = inp->prsctp_supported; + asoc->reconfig_supported = inp->reconfig_supported; asoc->nrsack_supported = inp->nrsack_supported; asoc->pktdrop_supported = inp->pktdrop_supported; asoc->sctp_cmt_pf = (uint8_t) 0; @@ -2631,7 +2632,7 @@ sctp_notify_assoc_change(uint16_t state, sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_ASCONF; } sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_MULTIBUF; - if (stcb->asoc.peer_supports_strreset) { + if (stcb->asoc.reconfig_supported) { sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_RE_CONFIG; } sac->sac_length += i; From tuexen at FreeBSD.org Fri Aug 22 20:22:16 2014 From: tuexen at FreeBSD.org (Michael Tuexen) Date: Fri, 22 Aug 2014 20:22:13 +0000 (UTC) Subject: svn commit: r270362 - in stable/10: lib/libc/net sys/netinet Message-ID: <201408222022.s7MKMDik044252@svn.freebsd.org> Author: tuexen Date: Fri Aug 22 20:22:12 2014 New Revision: 270362 URL: http://svnweb.freebsd.org/changeset/base/270362 Log: MFC r269858: Add support for the SCTP_AUTH_SUPPORTED and SCTP_ASCONF_SUPPORTED socket options. Add also a sysctl to control the support of ASCONF. Modified: stable/10/lib/libc/net/sctp_sys_calls.c stable/10/sys/netinet/sctp.h stable/10/sys/netinet/sctp_asconf.c stable/10/sys/netinet/sctp_auth.c stable/10/sys/netinet/sctp_auth.h stable/10/sys/netinet/sctp_input.c stable/10/sys/netinet/sctp_output.c stable/10/sys/netinet/sctp_pcb.c stable/10/sys/netinet/sctp_pcb.h stable/10/sys/netinet/sctp_peeloff.c stable/10/sys/netinet/sctp_structs.h stable/10/sys/netinet/sctp_sysctl.c stable/10/sys/netinet/sctp_sysctl.h stable/10/sys/netinet/sctp_usrreq.c stable/10/sys/netinet/sctputil.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/net/sctp_sys_calls.c ============================================================================== --- stable/10/lib/libc/net/sctp_sys_calls.c Fri Aug 22 20:16:26 2014 (r270361) +++ stable/10/lib/libc/net/sctp_sys_calls.c Fri Aug 22 20:22:12 2014 (r270362) @@ -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: stable/10/sys/netinet/sctp.h ============================================================================== --- stable/10/sys/netinet/sctp.h Fri Aug 22 20:16:26 2014 (r270361) +++ stable/10/sys/netinet/sctp.h Fri Aug 22 20:22:12 2014 (r270362) @@ -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: stable/10/sys/netinet/sctp_asconf.c ============================================================================== --- stable/10/sys/netinet/sctp_asconf.c Fri Aug 22 20:16:26 2014 (r270361) +++ stable/10/sys/netinet/sctp_asconf.c Fri Aug 22 20:22:12 2014 (r270362) @@ -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: stable/10/sys/netinet/sctp_auth.c ============================================================================== --- stable/10/sys/netinet/sctp_auth.c Fri Aug 22 20:16:26 2014 (r270361) +++ stable/10/sys/netinet/sctp_auth.c Fri Aug 22 20:22:12 2014 (r270362) @@ -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: stable/10/sys/netinet/sctp_auth.h ============================================================================== --- stable/10/sys/netinet/sctp_auth.h Fri Aug 22 20:16:26 2014 (r270361) +++ stable/10/sys/netinet/sctp_auth.h Fri Aug 22 20:22:12 2014 (r270362) @@ -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: stable/10/sys/netinet/sctp_input.c ============================================================================== --- stable/10/sys/netinet/sctp_input.c Fri Aug 22 20:16:26 2014 (r270361) +++ stable/10/sys/netinet/sctp_input.c Fri Aug 22 20:22:12 2014 (r270362) @@ -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: stable/10/sys/netinet/sctp_output.c ============================================================================== --- stable/10/sys/netinet/sctp_output.c Fri Aug 22 20:16:26 2014 (r270361) +++ stable/10/sys/netinet/sctp_output.c Fri Aug 22 20:22:12 2014 (r270362) @@ -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: stable/10/sys/netinet/sctp_pcb.c ============================================================================== --- stable/10/sys/netinet/sctp_pcb.c Fri Aug 22 20:16:26 2014 (r270361) +++ stable/10/sys/netinet/sctp_pcb.c Fri Aug 22 20:22:12 2014 (r270362) @@ -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: stable/10/sys/netinet/sctp_pcb.h ============================================================================== --- stable/10/sys/netinet/sctp_pcb.h Fri Aug 22 20:16:26 2014 (r270361) +++ stable/10/sys/netinet/sctp_pcb.h Fri Aug 22 20:22:12 2014 (r270362) @@ -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: stable/10/sys/netinet/sctp_peeloff.c ============================================================================== --- stable/10/sys/netinet/sctp_peeloff.c Fri Aug 22 20:16:26 2014 (r270361) +++ stable/10/sys/netinet/sctp_peeloff.c Fri Aug 22 20:22:12 2014 (r270362) @@ -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: stable/10/sys/netinet/sctp_structs.h ============================================================================== --- stable/10/sys/netinet/sctp_structs.h Fri Aug 22 20:16:26 2014 (r270361) +++ stable/10/sys/netinet/sctp_structs.h Fri Aug 22 20:22:12 2014 (r270362) @@ -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: stable/10/sys/netinet/sctp_sysctl.c ============================================================================== --- stable/10/sys/netinet/sctp_sysctl.c Fri Aug 22 20:16:26 2014 (r270361) +++ stable/10/sys/netinet/sctp_sysctl.c Fri Aug 22 20:22:12 2014 (r270362) @@ -56,6 +56,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; @@ -91,7 +93,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; @@ -640,7 +641,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); @@ -679,6 +679,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) @@ -871,6 +921,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); @@ -1012,10 +1070,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: stable/10/sys/netinet/sctp_sysctl.h ============================================================================== --- stable/10/sys/netinet/sctp_sysctl.h Fri Aug 22 20:16:26 2014 (r270361) +++ stable/10/sys/netinet/sctp_sysctl.h Fri Aug 22 20:22:12 2014 (r270362) @@ -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: stable/10/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/10/sys/netinet/sctp_usrreq.c Fri Aug 22 20:16:26 2014 (r270361) +++ stable/10/sys/netinet/sctp_usrreq.c Fri Aug 22 20:22:12 2014 (r270362) @@ -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 tuexen at FreeBSD.org Fri Aug 22 20:26:23 2014 From: tuexen at FreeBSD.org (Michael Tuexen) Date: Fri, 22 Aug 2014 20:26:21 +0000 (UTC) Subject: svn commit: r270363 - in stable/10: lib/libc/net sys/conf sys/netinet Message-ID: <201408222026.s7MKQLWb044832@svn.freebsd.org> Author: tuexen Date: Fri Aug 22 20:26:20 2014 New Revision: 270363 URL: http://svnweb.freebsd.org/changeset/base/270363 Log: MFC r269945: 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. Modified: stable/10/lib/libc/net/sctp_sys_calls.c stable/10/sys/conf/options stable/10/sys/netinet/sctp.h stable/10/sys/netinet/sctp_input.c stable/10/sys/netinet/sctp_output.c stable/10/sys/netinet/sctp_structs.h stable/10/sys/netinet/sctp_uio.h stable/10/sys/netinet/sctp_usrreq.c stable/10/sys/netinet/sctputil.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/net/sctp_sys_calls.c ============================================================================== --- stable/10/lib/libc/net/sctp_sys_calls.c Fri Aug 22 20:22:12 2014 (r270362) +++ stable/10/lib/libc/net/sctp_sys_calls.c Fri Aug 22 20:26:20 2014 (r270363) @@ -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: stable/10/sys/conf/options ============================================================================== --- stable/10/sys/conf/options Fri Aug 22 20:22:12 2014 (r270362) +++ stable/10/sys/conf/options Fri Aug 22 20:26:20 2014 (r270363) @@ -459,6 +459,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: stable/10/sys/netinet/sctp.h ============================================================================== --- stable/10/sys/netinet/sctp.h Fri Aug 22 20:22:12 2014 (r270362) +++ stable/10/sys/netinet/sctp.h Fri Aug 22 20:26:20 2014 (r270363) @@ -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: stable/10/sys/netinet/sctp_input.c ============================================================================== --- stable/10/sys/netinet/sctp_input.c Fri Aug 22 20:22:12 2014 (r270362) +++ stable/10/sys/netinet/sctp_input.c Fri Aug 22 20:26:20 2014 (r270363) @@ -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: stable/10/sys/netinet/sctp_output.c ============================================================================== --- stable/10/sys/netinet/sctp_output.c Fri Aug 22 20:22:12 2014 (r270362) +++ stable/10/sys/netinet/sctp_output.c Fri Aug 22 20:26:20 2014 (r270363) @@ -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: stable/10/sys/netinet/sctp_structs.h ============================================================================== --- stable/10/sys/netinet/sctp_structs.h Fri Aug 22 20:22:12 2014 (r270362) +++ stable/10/sys/netinet/sctp_structs.h Fri Aug 22 20:26:20 2014 (r270363) @@ -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: stable/10/sys/netinet/sctp_uio.h ============================================================================== --- stable/10/sys/netinet/sctp_uio.h Fri Aug 22 20:22:12 2014 (r270362) +++ stable/10/sys/netinet/sctp_uio.h Fri Aug 22 20:26:20 2014 (r270363) @@ -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; @@ -720,6 +725,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: stable/10/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/10/sys/netinet/sctp_usrreq.c Fri Aug 22 20:22:12 2014 (r270362) +++ stable/10/sys/netinet/sctp_usrreq.c Fri Aug 22 20:26:20 2014 (r270363) @@ -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: stable/10/sys/netinet/sctputil.c ============================================================================== --- stable/10/sys/netinet/sctputil.c Fri Aug 22 20:22:12 2014 (r270362) +++ stable/10/sys/netinet/sctputil.c Fri Aug 22 20:26:20 2014 (r270363) @@ -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 gjb at FreeBSD.org Fri Aug 22 20:32:04 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Fri, 22 Aug 2014 20:32:04 +0000 (UTC) Subject: svn commit: r270364 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408222032.s7MKW4Oc048997@svn.freebsd.org> Author: gjb Date: Fri Aug 22 20:32:03 2014 New Revision: 270364 URL: http://svnweb.freebsd.org/changeset/base/270364 Log: Document r259328, geom_label is resize-aware. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Aug 22 20:26:20 2014 (r270363) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Aug 22 20:32:03 2014 (r270364) @@ -217,6 +217,14 @@ Disks and Storage + The &man.geom.8; label class + is now aware of resized partitions. This corrects an issue + where geom resize would resize the + partition, but the label provider in /dev/gptid/ would not be + resized. + Support for the disklabel64 partitioning scheme has been added to &man.gpart.8;. From gjb at FreeBSD.org Fri Aug 22 20:32:06 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Fri, 22 Aug 2014 20:32:06 +0000 (UTC) Subject: svn commit: r270365 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408222032.s7MKW6Lu049044@svn.freebsd.org> Author: gjb Date: Fri Aug 22 20:32:05 2014 New Revision: 270365 URL: http://svnweb.freebsd.org/changeset/base/270365 Log: Document r259355, WANDBOARD kernel configuration added. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Aug 22 20:32:03 2014 (r270364) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Aug 22 20:32:05 2014 (r270365) @@ -176,7 +176,8 @@ ARM support -   + The WANDBOARD + kernel configuration file has been added. From gjb at FreeBSD.org Fri Aug 22 20:32:08 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Fri, 22 Aug 2014 20:32:08 +0000 (UTC) Subject: svn commit: r270366 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408222032.s7MKW8vd049090@svn.freebsd.org> Author: gjb Date: Fri Aug 22 20:32:07 2014 New Revision: 270366 URL: http://svnweb.freebsd.org/changeset/base/270366 Log: Document r259450, Hyper-V support on i386. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Aug 22 20:32:05 2014 (r270365) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Aug 22 20:32:07 2014 (r270366) @@ -169,8 +169,10 @@ Virtualization support -   - + Support for µsoft; Hyper-V + has been added to &os;/i386 as loadable modules, however + not available in the GENERIC kernel + configuration. From gjb at FreeBSD.org Fri Aug 22 20:32:14 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Fri, 22 Aug 2014 20:32:14 +0000 (UTC) Subject: svn commit: r270369 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408222032.s7MKWE08049237@svn.freebsd.org> Author: gjb Date: Fri Aug 22 20:32:13 2014 New Revision: 270369 URL: http://svnweb.freebsd.org/changeset/base/270369 Log: Document r260178, fsck_ffs '-R' flag. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Aug 22 20:32:11 2014 (r270368) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Aug 22 20:32:13 2014 (r270369) @@ -239,8 +239,11 @@ File Systems -   - + A new flag, -R, + has been added to the &man.fsck.ffs.8; utility. When used, + &man.fsck.ffs.8; will restart itself when too many critical + errors have been detected. From gjb at FreeBSD.org Fri Aug 22 20:32:10 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Fri, 22 Aug 2014 20:32:10 +0000 (UTC) Subject: svn commit: r270367 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408222032.s7MKWAbS049138@svn.freebsd.org> Author: gjb Date: Fri Aug 22 20:32:09 2014 New Revision: 270367 URL: http://svnweb.freebsd.org/changeset/base/270367 Log: Document r259453, RT5370/RT5372 support. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Aug 22 20:32:07 2014 (r270366) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Aug 22 20:32:09 2014 (r270367) @@ -205,8 +205,8 @@ Network Interface Support -   - + Support for Ralink RT5370 and + RT5372 chipsets has been added. From gjb at FreeBSD.org Fri Aug 22 20:32:16 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Fri, 22 Aug 2014 20:32:16 +0000 (UTC) Subject: svn commit: r270370 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408222032.s7MKWGnB049277@svn.freebsd.org> Author: gjb Date: Fri Aug 22 20:32:15 2014 New Revision: 270370 URL: http://svnweb.freebsd.org/changeset/base/270370 Log: Document r260502, gmirror 'resize' command. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Aug 22 20:32:13 2014 (r270369) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Aug 22 20:32:15 2014 (r270370) @@ -231,6 +231,11 @@ class="directory">/dev/gptid/ would not be resized. + The &man.gmirror.8; + utility now has a resize command, making + it easier to resize the size of a mirror when all of its + components have been replaced. + Support for the disklabel64 partitioning scheme has been added to &man.gpart.8;. From gjb at FreeBSD.org Fri Aug 22 20:32:12 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Fri, 22 Aug 2014 20:32:12 +0000 (UTC) Subject: svn commit: r270368 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408222032.s7MKWCi5049182@svn.freebsd.org> Author: gjb Date: Fri Aug 22 20:32:11 2014 New Revision: 270368 URL: http://svnweb.freebsd.org/changeset/base/270368 Log: Document r260120, run(4) firmware update to 0.33. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Aug 22 20:32:09 2014 (r270367) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Aug 22 20:32:11 2014 (r270368) @@ -207,6 +207,9 @@ Support for Ralink RT5370 and RT5372 chipsets has been added. + + Firmware for the &man.run.4; driver + has been updated to version 0.33. From gjb at FreeBSD.org Fri Aug 22 20:32:24 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Fri, 22 Aug 2014 20:32:23 +0000 (UTC) Subject: svn commit: r270374 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408222032.s7MKWNOW049463@svn.freebsd.org> Author: gjb Date: Fri Aug 22 20:32:23 2014 New Revision: 270374 URL: http://svnweb.freebsd.org/changeset/base/270374 Log: Document r261972, nve(4) deprecation. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Aug 22 20:32:21 2014 (r270373) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Aug 22 20:32:23 2014 (r270374) @@ -223,6 +223,10 @@ Support for the Ralink RT3593 chipset has been added. + + The &man.nve.4; driver is now + deprecated, and the &man.nfe.4; driver should be used + instead. From gjb at FreeBSD.org Fri Aug 22 20:32:22 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Fri, 22 Aug 2014 20:32:21 +0000 (UTC) Subject: svn commit: r270373 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408222032.s7MKWLFl049410@svn.freebsd.org> Author: gjb Date: Fri Aug 22 20:32:21 2014 New Revision: 270373 URL: http://svnweb.freebsd.org/changeset/base/270373 Log: Document r261868, Ralink RT3593 support. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Aug 22 20:32:19 2014 (r270372) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Aug 22 20:32:21 2014 (r270373) @@ -220,6 +220,9 @@ Firmware for the &man.run.4; driver has been updated to version 0.33. + + Support for the Ralink RT3593 + chipset has been added. From gjb at FreeBSD.org Fri Aug 22 20:32:29 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Fri, 22 Aug 2014 20:32:29 +0000 (UTC) Subject: svn commit: r270377 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408222032.s7MKWTuN049617@svn.freebsd.org> Author: gjb Date: Fri Aug 22 20:32:29 2014 New Revision: 270377 URL: http://svnweb.freebsd.org/changeset/base/270377 Log: Specify the driver for notes about r259453 and r261868 Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Aug 22 20:32:27 2014 (r270376) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Aug 22 20:32:29 2014 (r270377) @@ -216,13 +216,14 @@ Network Interface Support Support for Ralink RT5370 and - RT5372 chipsets has been added. + RT5372 chipsets has been added to the &man.run.4; + driver. Firmware for the &man.run.4; driver has been updated to version 0.33. Support for the Ralink RT3593 - chipset has been added. + chipset has been added to the &man.run.4; driver. The &man.nve.4; driver is now deprecated, and the &man.nfe.4; driver should be used From gjb at FreeBSD.org Fri Aug 22 20:32:20 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Fri, 22 Aug 2014 20:32:19 +0000 (UTC) Subject: svn commit: r270372 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408222032.s7MKWJrQ049368@svn.freebsd.org> Author: gjb Date: Fri Aug 22 20:32:19 2014 New Revision: 270372 URL: http://svnweb.freebsd.org/changeset/base/270372 Log: Document r261090, bhyve APCI S5 poweroff. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Aug 22 20:32:17 2014 (r270371) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Aug 22 20:32:19 2014 (r270372) @@ -179,6 +179,10 @@ has been added to &os;/i386 as loadable modules, however not available in the GENERIC kernel configuration. + + The &man.bhyve.4; hypervisor now + supports soft power-off functionality via the ACPI S5 + state. From gjb at FreeBSD.org Fri Aug 22 20:32:35 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Fri, 22 Aug 2014 20:32:35 +0000 (UTC) Subject: svn commit: r270380 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408222032.s7MKWZ9r049754@svn.freebsd.org> Author: gjb Date: Fri Aug 22 20:32:34 2014 New Revision: 270380 URL: http://svnweb.freebsd.org/changeset/base/270380 Log: Document r262701, kernel selection menu in loader(8). Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Aug 22 20:32:32 2014 (r270379) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Aug 22 20:32:34 2014 (r270380) @@ -196,8 +196,13 @@ Boot Loader Changes -   - + A kernel selection menu has been added + to &man.loader.8;. If the beastie menu is + enabled, the kernel to boot may be selected from the kernel + selection menu. Additional kernels may be listed in + &man.loader.conf.5; as a comma- or space-separated list. By + default, kernel and + kernel.old are listed. From gjb at FreeBSD.org Fri Aug 22 20:32:26 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Fri, 22 Aug 2014 20:32:25 +0000 (UTC) Subject: svn commit: r270375 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408222032.s7MKWP2e049528@svn.freebsd.org> Author: gjb Date: Fri Aug 22 20:32:25 2014 New Revision: 270375 URL: http://svnweb.freebsd.org/changeset/base/270375 Log: Document r262075, newsyslog(8) rotation by file size, instead of blocks consumed by the target file. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Aug 22 20:32:23 2014 (r270374) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Aug 22 20:32:25 2014 (r270375) @@ -277,6 +277,11 @@ -b, which outputs the existing buses and their parents. + The &man.newsyslog.8; utility has been + updated to rotate files based on the actual file size instead + of the blocks on disk. This matches the behavior documented in + &man.newsyslog.conf.5;. + The &man.ps.1; utility has been updated to include the -J flag, used to filter output by matching &man.jail.8; IDs and names. From gjb at FreeBSD.org Fri Aug 22 20:32:18 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Fri, 22 Aug 2014 20:32:17 +0000 (UTC) Subject: svn commit: r270371 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408222032.s7MKWHEo049323@svn.freebsd.org> Author: gjb Date: Fri Aug 22 20:32:17 2014 New Revision: 270371 URL: http://svnweb.freebsd.org/changeset/base/270371 Log: Document r260857 and r260858: unmapped IO support in virtio_blk(4) and virtio_scsi(4). Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Aug 22 20:32:15 2014 (r270370) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Aug 22 20:32:17 2014 (r270371) @@ -139,6 +139,12 @@ which allows controlling how long the system will wait after &man.panic.9; before rebooting. + The &man.virtio_blk.4; driver has been + updated to support unmapped I/O. + + The &man.virtio_scsi.4; driver has been + updated to support unmapped I/O. + The &man.mpr.4; device has been added, providing support for LSI Fusion-MPT 3 12Gb SCSI/SATA From gjb at FreeBSD.org Fri Aug 22 20:32:27 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Fri, 22 Aug 2014 20:32:27 +0000 (UTC) Subject: svn commit: r270376 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408222032.s7MKWRZ2049569@svn.freebsd.org> Author: gjb Date: Fri Aug 22 20:32:27 2014 New Revision: 270376 URL: http://svnweb.freebsd.org/changeset/base/270376 Log: Document r262137, axge(4) addition. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Aug 22 20:32:25 2014 (r270375) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Aug 22 20:32:27 2014 (r270376) @@ -227,6 +227,11 @@ The &man.nve.4; driver is now deprecated, and the &man.nfe.4; driver should be used instead. + + Support for the &man.axge.4; driver + has been added. This driver supports the ASIX AX88178A and + AX88179 USB ethernet adapters. The AX88178A supports USB + 2.0, and the AX88179 supports USB 2.0 and 3.0. From gjb at FreeBSD.org Fri Aug 22 20:32:31 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Fri, 22 Aug 2014 20:32:31 +0000 (UTC) Subject: svn commit: r270378 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408222032.s7MKWVbB049662@svn.freebsd.org> Author: gjb Date: Fri Aug 22 20:32:30 2014 New Revision: 270378 URL: http://svnweb.freebsd.org/changeset/base/270378 Log: Document r262363, urndis(4) import. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Aug 22 20:32:29 2014 (r270377) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Aug 22 20:32:30 2014 (r270378) @@ -233,6 +233,9 @@ has been added. This driver supports the ASIX AX88178A and AX88179 USB ethernet adapters. The AX88178A supports USB 2.0, and the AX88179 supports USB 2.0 and 3.0. + + The &man.urndis.4; driver has been + imported from OpenBSD. From gjb at FreeBSD.org Fri Aug 22 20:32:33 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Fri, 22 Aug 2014 20:32:33 +0000 (UTC) Subject: svn commit: r270379 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408222032.s7MKWX6N049709@svn.freebsd.org> Author: gjb Date: Fri Aug 22 20:32:32 2014 New Revision: 270379 URL: http://svnweb.freebsd.org/changeset/base/270379 Log: Document r262384, rctl_rules="" in rc.conf(5). Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Aug 22 20:32:30 2014 (r270378) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Aug 22 20:32:32 2014 (r270379) @@ -291,6 +291,11 @@ of the blocks on disk. This matches the behavior documented in &man.newsyslog.conf.5;. + The location of the &man.rctl.8; + configuration file can now be overridden in &man.rc.conf.5;. + To use a non-default location, set rctl_rules + in &man.rc.conf.5; to the location of the file. + The &man.ps.1; utility has been updated to include the -J flag, used to filter output by matching &man.jail.8; IDs and names. From tuexen at FreeBSD.org Fri Aug 22 20:36:45 2014 From: tuexen at FreeBSD.org (Michael Tuexen) Date: Fri, 22 Aug 2014 20:36:45 +0000 (UTC) Subject: svn commit: r270381 - stable/10/sys/netinet Message-ID: <201408222036.s7MKajXv050483@svn.freebsd.org> Author: tuexen Date: Fri Aug 22 20:36:45 2014 New Revision: 270381 URL: http://svnweb.freebsd.org/changeset/base/270381 Log: Remove debug output which was comitted by accident. This is a direct commit to stable/10. Modified: stable/10/sys/netinet/sctp_sysctl.c Modified: stable/10/sys/netinet/sctp_sysctl.c ============================================================================== --- stable/10/sys/netinet/sctp_sysctl.c Fri Aug 22 20:32:34 2014 (r270380) +++ stable/10/sys/netinet/sctp_sysctl.c Fri Aug 22 20:36:45 2014 (r270381) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); void sctp_init_sysctls() { - printf("sctp_init_sysctls().\n"); SCTP_BASE_SYSCTL(sctp_sendspace) = SCTPCTL_MAXDGRAM_DEFAULT; SCTP_BASE_SYSCTL(sctp_recvspace) = SCTPCTL_RECVSPACE_DEFAULT; SCTP_BASE_SYSCTL(sctp_auto_asconf) = SCTPCTL_AUTOASCONF_DEFAULT; From tuexen at freebsd.org Fri Aug 22 20:38:04 2014 From: tuexen at freebsd.org (Michael Tuexen) Date: Fri, 22 Aug 2014 22:37:59 +0200 Subject: svn commit: r270350 - stable/10/sys/netinet In-Reply-To: <53F79EC2.2040905@freebsd.org> References: <201408221937.s7MJboa3020827@svn.freebsd.org> <53F79EC2.2040905@freebsd.org> Message-ID: On 22 Aug 2014, at 21:49, Andrey Chernov wrote: > On 22.08.2014 23:37, Michael Tuexen wrote: >> Modified: stable/10/sys/netinet/sctp_sysctl.c >> ============================================================================== >> --- stable/10/sys/netinet/sctp_sysctl.c Fri Aug 22 19:23:38 2014 (r270349) >> +++ stable/10/sys/netinet/sctp_sysctl.c Fri Aug 22 19:37:50 2014 (r270350) >> @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); >> void >> sctp_init_sysctls() >> { >> + printf("sctp_init_sysctls().\n"); >> SCTP_BASE_SYSCTL(sctp_sendspace) = SCTPCTL_MAXDGRAM_DEFAULT; >> SCTP_BASE_SYSCTL(sctp_recvspace) = SCTPCTL_RECVSPACE_DEFAULT; > > Pure not ifdefed printf? Upps. That was debug output which was not intended to be committed. I took it out in http://svnweb.freebsd.org/changeset/base/270381 Thanks for pointing out! Best regards Michael > > -- > http://ache.vniz.net/ > > From ngie at FreeBSD.org Sat Aug 23 02:20:50 2014 From: ngie at FreeBSD.org (Garrett Cooper) Date: Sat, 23 Aug 2014 02:20:49 +0000 (UTC) Subject: svn commit: r270385 - stable/10/sbin/dhclient/tests Message-ID: <201408230220.s7N2KnfJ008912@svn.freebsd.org> Author: ngie Date: Sat Aug 23 02:20:49 2014 New Revision: 270385 URL: http://svnweb.freebsd.org/changeset/base/270385 Log: MFC r270118: Add LIBUTIL to DPADD This will fix "make checkdpadd" PR: 192759 Approved by: rpaulo (mentor) Phabric: D623 Modified: stable/10/sbin/dhclient/tests/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/dhclient/tests/Makefile ============================================================================== --- stable/10/sbin/dhclient/tests/Makefile Sat Aug 23 01:52:43 2014 (r270384) +++ stable/10/sbin/dhclient/tests/Makefile Sat Aug 23 02:20:49 2014 (r270385) @@ -8,6 +8,7 @@ PLAIN_TESTS_C= option-domain-search_t SRCS.option-domain-search_test= alloc.c convert.c hash.c options.c \ tables.c fake.c option-domain-search.c CFLAGS.option-domain-search_test+= -I${.CURDIR}/.. +DPADD.option-domain-search_test= ${LIBUTIL} LDADD.option-domain-search_test= -lutil WARNS?= 2 From ngie at FreeBSD.org Sat Aug 23 02:24:48 2014 From: ngie at FreeBSD.org (Garrett Cooper) Date: Sat, 23 Aug 2014 02:24:48 +0000 (UTC) Subject: svn commit: r270386 - stable/10/lib/libcrypt/tests Message-ID: <201408230224.s7N2Omwd010893@svn.freebsd.org> Author: ngie Date: Sat Aug 23 02:24:47 2014 New Revision: 270386 URL: http://svnweb.freebsd.org/changeset/base/270386 Log: MFC r270144: Add LIBCRYPT to DPADD, remove LDFLAGS from LDADD, and sort the Makefile variables This fixes "make checkdpadd" Phabric: D620 Approved by: jmmv (mentor) PR: 192729 Modified: stable/10/lib/libcrypt/tests/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libcrypt/tests/Makefile ============================================================================== --- stable/10/lib/libcrypt/tests/Makefile Sat Aug 23 02:20:49 2014 (r270385) +++ stable/10/lib/libcrypt/tests/Makefile Sat Aug 23 02:24:47 2014 (r270386) @@ -7,6 +7,7 @@ TESTSDIR= ${TESTSBASE}/lib/libcrypt ATF_TESTS_C= crypt_tests CFLAGS+= -I${.CURDIR:H} -LDADD+= -L${.OBJDIR:H} -lcrypt +DPADD+= ${LIBCRYPT} +LDADD+= -lcrypt .include From mav at FreeBSD.org Sat Aug 23 07:03:05 2014 From: mav at FreeBSD.org (Alexander Motin) Date: Sat, 23 Aug 2014 07:03:05 +0000 (UTC) Subject: svn commit: r270389 - stable/10/sys/cam/ctl Message-ID: <201408230703.s7N7355K037670@svn.freebsd.org> Author: mav Date: Sat Aug 23 07:03:04 2014 New Revision: 270389 URL: http://svnweb.freebsd.org/changeset/base/270389 Log: MFC r270176: Fix lock recursion on LUN shutdown, introduced on r269497. Modified: stable/10/sys/cam/ctl/ctl_tpc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_tpc.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_tpc.c Sat Aug 23 07:02:57 2014 (r270388) +++ stable/10/sys/cam/ctl/ctl_tpc.c Sat Aug 23 07:03:04 2014 (r270389) @@ -228,7 +228,7 @@ ctl_tpc_lun_shutdown(struct ctl_lun *lun } /* Free ROD tokens for this LUN. */ - mtx_lock(&control_softc->ctl_lock); + mtx_assert(&control_softc->ctl_lock, MA_OWNED); TAILQ_FOREACH_SAFE(token, &control_softc->tpc_tokens, links, ttoken) { if (token->lun != lun->lun || token->active) continue; @@ -236,7 +236,6 @@ ctl_tpc_lun_shutdown(struct ctl_lun *lun free(token->params, M_CTL); free(token, M_CTL); } - mtx_unlock(&control_softc->ctl_lock); } int From dim at FreeBSD.org Sat Aug 23 10:58:18 2014 From: dim at FreeBSD.org (Dimitry Andric) Date: Sat, 23 Aug 2014 10:58:17 +0000 (UTC) Subject: svn commit: r270393 - in stable/8: contrib/binutils/binutils contrib/gcc contrib/gcc/config contrib/gcc/config/arm contrib/gcc/config/i386 contrib/gcc/config/rs6000 contrib/gcc/cp contrib/gcc/doc c... Message-ID: <201408231058.s7NAwHYC041565@svn.freebsd.org> Author: dim Date: Sat Aug 23 10:58:16 2014 New Revision: 270393 URL: http://svnweb.freebsd.org/changeset/base/270393 Log: Bring in a collection of gcc and libstdc++ fixes and updates from head, most of which are already in stable/10 and stable/9 for some time. Requested by: danfe Tested by: danfe and make universe MFC r228328: Make it possible to use the debug versions of std::map and std::multimap with clang, by removing two unneeded using declarations. Otherwise, you would get errors similar to: /usr/include/c++/4.2/debug/map.h:77:20: error: dependent using declaration resolved to type without 'typename' using _Base::value_compare; ^ N.B.: Take care when you actually use the debug versions of any libstdc++ header. They are more likely to contain problems, because they are exercised far less often, and since the standard library complexity guarantees don't always apply anymore, compile times can drastically increase. MFC r228474 (by ed): Add support for __COUNTER__. __COUNTER__ allows one to obtain incrementing (read: unique) numbers from the C preprocesor. This is useful when implementing things like a robust implementation of CTASSERT(), which currently fails when using it more than once on a single line of code. Probably not likely to cause any breakage, but still. __COUNTER__ was also added to GCC 4.3, but since that implementation is GPLv3 licensed, I took the liberty of implementing it without looking at any upstream sources. Therefore, this version is licensed under the same license as the rest of the code; GPLv2. MFC r231336 (by kientzle): Implement -print-file-name=include (which is undocumented but used by some Linux boot loaders). This option prints out the directory holding the include files needed by a freestanding program. The default implementation of this doesn't work on FreeBSD because of the different include file layout. But it's easy to implement: just return /usr/include (or the cross-compiling equivalent). Reviewed by: kan MFC r233193: Add explicit braces to avoid dangling else in stl_tree.h. This silences the following warning produced by clang trunk: In file included from /usr/src/sbin/devd/devd.cc:91: In file included from /usr/obj/usr/src/tmp/usr/include/c++/4.2/map:64: /usr/obj/usr/src/tmp/usr/include/c++/4.2/bits/stl_tree.h:987:2: error: add explicit braces to avoid dangling else [-Werror,-Wdangling-else] else ^ MFC r241957: Fix several clang warnings in libstdc++, which were exposed by the recent atf import. These changes are purely cosmetic, no functional change. MFC r244776 (by pfg): gcc: avoid generating negative values to DW_AT_byte_size. There is a bug in gcc (GCC/35998) where dwarf reports sizes of unsigned -1 (0xffffffff). On NetBSD this generated a faulty CTF entry which then caused a segfault in ctfmerge. The issue was worked around in NetBSD's Dtrace but since the issue originated in gcc, it seems reasonable to fix it here. Upstream gcc has been slow to react to this issue and the author that submitted the patch is not interested in licensing the change to us, so I did an independent workaround for the issue. MFC r251212 (by pfg): GCC: bring back experimental support for amdfam10/barcelona CPUs. Initial support for the AMD amdfam10 chipsets has been available in the gcc43 branch under GPLv2. AMD and some linux distributions (OpenSUSE) did a backport of the amdfam10 support and made it available. This is a revised subset of the support initially brought in in r236962 and later reverted. The collateral efects seem to have disappeared but it is still recommended to set the CPUTYPE with caution. Reviewed by: jkim (ages ago) MFC r258017 (by pfg): cxxfilt: small changes from Apple's developer tools From Apple's Developer Tools 4.0 [1]: demangle.patch 2007-05-05 Geoffrey Keating (d_name): Detect local-source-name. (d_prefix): Likewise. (d_unqualified_name): Implement local-source-name. libiberty-printf.patch [1] http://opensource.apple.com/source/cxxfilt/cxxfilt-9/patches/ MFC r258429 (by pfg): libstdc++: merge non-abi changes from Apple's developer tools Take some changes from Apple's Developer Tools 4.0 [1]: block.patch emergency-buffer-reduction.patch test_cleanup.patch vector_copy_no_alloc.patch problem/6473222 copy-constructing a std::vector from an empty std::vector calls malloc 2008-10-27 Howard Hinnant stl_tree_system_header.patch Added #pragma GCC system_header to stl_tree.h. copy_doc.patch Corrected documentation concerning copy in stl_algobase.h. string_compare.patch Fixed basic_string.h, basic_string.tcc, incorrect 64bit to 32bit narrowing. Reference: [1] http://opensource.apple.com/source/libstdcxx/libstdcxx-39/patches-4.2.1/ Obtained from: Apple MFC r258501 (by pfg): gcc: Bring updates from Google's enhanced gcc-4.2.1. Google released and enhanced version of gcc-4.2.1 plus their local patches for Android[1]. The patches are owned by Google and the license hasn't been changed from the original GPLv2. We are only bringing a subset of the available patches that may be helpful in FreeBSD. Changes specific to android are not included. From the README.google file[1]. Patches applied to google_vendor_src_branch/gcc/gcc-4.2.1: gcc/Makefile.in gcc/c-common.c gcc/c-common.h gcc/c-opts.c gcc/c-typeck.c gcc/cp/typeck.c gcc/doc/invoke.texi gcc/flags.h gcc/opts.c gcc/tree-flow.h gcc/tree-ssa-alias-warnings.c gcc/tree-ssa-alias.c Backport of -Wstrict-aliasing from mainline. Silvius Rus gcc/coverage.c: Patch coverage_checksum_string for PR 25351. Seongbae Park Not yet submitted to FSF. gcc/c-opts.c gcc/c-ppoutput.c gcc/c.opt gcc/doc/cppopts.texi libcpp/Makefile.in libcpp/directives-only.c libcpp/directives.c libcpp/files.c libcpp/include/cpplib.h libcpp/init.c libcpp/internal.h libcpp/macro.c Support for -fdirectives-only. Ollie Wild . Submitted to FSF but not yet approved. libstdc++-v3/include/ext/hashtable.h http://b/742065 http://b/629994 Reduce min size of hashtable for hash_map, hash_set from 53 to 5 libstdc++-v3/include/ext/hashtable.h http://b/629994 Do not iterate over buckets if hashtable is empty. gcc/common.opt gcc/doc/invoke.texi gcc/flags.h gcc/gimplify.c gcc/opts.c Add Saito's patch for -finstrument-functions-exclude-* options. gcc/common.opt gcc/doc/invoke.texi gcc/final.c gcc/flags.h gcc/opts.c gcc/testsuite/gcc.dg/Wframe-larger-than.c Add a new flag -Wframe-larger-than- which enables a new warning when a frame size of a function is larger than specified. This patch hasn't been integrated into gcc mainline yet. gcc/tree-vrp.c Add a hack to avoid using ivopts information for pointers starting at constant values. Reference: [1] https://android.googlesource.com/toolchain/gcc/+/master/gcc-4.2.1/ Obtained from: Google Inc. MFC r258507 (by pfg): gcc: Missing makefile changes for r258501. pointyhat: me MFC r258530 (by pfg): libcpp: Keep a record of changes from upstream GCC (pre-43). This makes it easier to track the changes in the rare event of the code being distributed without access to version control. MFC r258651 (by pfg): gcc: Altivec register adjustments from Apple. Obtained from: gcc pre-4.3 (rev. 124763; GPLv2) MFC r258658 (by mdf): Fix a segfault / internal compiler error. Among other causes, when gcc throws a warning before parsing any tokens, the cur_token pointer is at the beginning of malloc'd memory. Dereferencing cur_token[-1] can cause a segfault. Code taken from OpenBSD http://www.openbsd.org/cgi-bin/cvsweb/src/gnu/gcc/libcpp/errors.c which was a more complete fix than the one I originally coded. MFC r258731 (by pfg): gcc: Make use of TREE_OVERFLOW_P. While it was brought in r258179 only to fix a build issue, bringing the rest of the change has the advantage of fixing GCC/19978. Obtained from: gcc 4.3 (rev. 120505; GPLv2) MFC r258748 (by pfg): gcc: upstream alignment cleanups. This solves GCC/32617 and contributes to reduce differences with Apple's gcc42. Complete some references in the ChangeLog while here. Obtained from: gcc 4.3 (rev. 126529, 126588; GPLv2) MFC r258817 (by pfg): libiberty: upstream updates. There is a new ChangeLog.gcc43 file but most notable: * floatformat.c (get_field): Fix segfault with little-endian word order on 64-bit hosts. (put_field): Likewise. (min): Move definition. gcc/cp/ChangeLog 2007-05-04 Geoffrey Keating PR 31775 * mangle.c (write_mangled_name): Mangle static variable names. (write_unqualified_name): Use local-source-name for namespace-scope static variables. (Completes FreeBSD's r258017 ) Obtained from: gcc 4.3 (rev. 118552, 120097, 20698, 120702, 121364, 122972, 126588; GPLv2) MFC r258826 (by pfg): libcpp: Merge fixes from upstream GCC preprocessor/29966: * macro.c (lex_expansion_token): Save and restore cpp_reader's cur_token. (_cpp_create_definition): Don't restore cur_token here. * lex.c (_cpp_lex_token): Added assertion. GCC preprocessor/28709: * macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs. GCC c/31924 * expr.c (interpret_float_suffix): Check for invalid suffix. GCC preprocessor/14331 * lex.c (_cpp_get_fresh_line): Don't warn if no newline at EOF. Fixup whitespacing Obtained from: gcc per-4.3 (rev. 121340, 124356, 124358, 124730, 125212, 125255 ; GPLv2) MFC r258943 (by pfg): gcc: On rs6000 update sp_offset depending only on size. This fixes a nasty bug introduced in r258651. Reported and tested by: Justin Hibbits Obtained from: gcc pre-4.3 (rev. 125116; GPLv2) MFC r259005 (by pfg): gcc: Add -flax-vector-conversions Obtained from: gcc 4.3 (rev. 120572, 120688; GPLv2) MFC r259022 (by pfg): gcc: Include types in error message for build_binary_op. Mostly cosmetic change, again to reduce differences with Apple's gcc. Obtained from: gcc 4.3 (rev. 125239; GPLv2) MFC r259092 (by pfg): gcc: new fvisibility-ms-compat option Obtained from: gcc 4.3 (rev. 126088; GPLv2) MFC r259111: Use correct casts in gcc's emmintrin.h for the first arguments of the following builtin functions: * __builtin_ia32_pslldi128() takes __v4si instead of __v8hi * __builtin_ia32_psllqi128() takes __v2di instead of __v8hi * __builtin_ia32_psradi128() takes __v4si instead of __v8hi This should fix the following errors when building the LINT kernel with gcc: sys/crypto/aesni/aesni_wrap.c:191: error: incompatible type for argument 1 of '__builtin_ia32_psradi128' sys/crypto/aesni/aesni_wrap.c:195: error: incompatible type for argument 1 of '__builtin_ia32_pslldi128' MFC r259525 (by pfg): gcc: fix ICE in rs600 when using -fno-trapping-math. Solves GCC-PR target/30485 Obtained from: gcc 4.3 (rev. 120902; GPLv2) MFC r259529 (by pfg): gcc: small merges from upstream Solves GCC issues: PR middle-end/32602 PR middle-end/32603 Updates the to documentation and processing improvement. Obtained from: gcc 4.3 (rev. 119427, 126278, 126422; GPLv2) MFC r259555 (by pfg): gcc: add Apple compatible -Wnewline-eof GCC 4.2 and previous have always warned about "No newline at end of file". Upstream GCC removed the warning completely but Apple made it an optional warning. Adopt it for compatibility with older GCC and clang. While here, add comment to complement r258712. Obtained from: Apple Inc. (Apple GCC 4.2 - 5531) MFC r259558 (by pfg): gcc: add Apple compatible -Wnewline-eof Fix document: "Apple compatible" suits better the origin. MFC r259649 (by pfg): gcc: more diff reductions against Apple GCC. Mostly cosmetical changes to aid further merges. Obtained from: gcc 4.3 (rev. 120611, 124839; GPLv2) MFC r259655 (by pfg): gcc: merge upstream fix and new feature. Fix for PR c++/29928 Add support for Rvalue references as described here: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2118.html Obtained from: gcc 4.3 (rev. 124724, 125211; GPLv2) MFC r259660 (by pfg): gcc: revert Rvalue references. They are very useful but at this time I prefer not to figure out some minor conflicts with the bigger Apple's blocks support patch that is being worked on for current. MFC r259841 (by pfg): gcc: Add ability to generate DWARF pubtypes section if DEBUG_PUBTYPES_SECTION is defined. Obtained from: gcc 4.3 (rev. 118826; GPLv2) MFC r259873 (by pfg): gcc: small enhancements for the arm support. Very small updates: fixes GCC-PR target/31152 Tested by building the cross-compiler. Obtained from: gcc 4.3 (rev. r118461, 125973: GPLv2) MFC r259944 (by pfg): gcc: merge small upstream change. Backport from mainline: 2007-04-24 Hui-May Chang * reload1.c (merge_assigned_reloads) : Do not merge a RELOAD_OTHER instruction with a RELOAD_FOR_OPERAND_ADDRESS instruction. Obtained from: gcc 4.3 (rev. r124115: GPLv2) MFC r260014 (by pfg): gcc: Add support for label attributes and "unavailable" attribute. Apple GCC has extensions to support for both label attributes and an "unavailable" attribute. These are critical for objc but are also useful in regular C/C++. Apparently at least the label attributes might have found their way to upstream GCC but the code doesn't seem available on the GPLv2 tree so we are taking the code directly from Apple. To make this clearer we are preserving the annoying "APPLE LOCAL" tags and the ChangeLogs when they are available. Obtained from: Apple GCC 4.2 - 5531 MFC r260099 (by pfg): gcc: Fix issue with "unavailable" attribute. While here, point where we dropped the support for objc from r260014. MFC r260310 (by pfg): libcpp: misc fixes from Apple's GCC. Fixes some bugs detected by Apple: #error with unmatched quotes pragma mark Obtained from: Apple GCC 4.2 - 5553 MFC r263775: Avoid "cc1: warning: is shorter than expected" when using GNU cpp in combination with dtrace scripts, which have "#!/usr/sbin/dtrace -Cs" shebang lines. This is because dtrace positions the file pointer after the shebang line, before passing the file to GNU cpp. To fix the warning, adjust the size downwards by the current position, after a bit of sanity checking. Suggested by: avg MFC r269948: 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 Added: stable/8/contrib/gcc/ChangeLog.apple - copied unchanged from r260014, head/contrib/gcc/ChangeLog.apple stable/8/contrib/gcc/config/i386/ammintrin.h - copied unchanged from r251212, head/contrib/gcc/config/i386/ammintrin.h stable/8/contrib/gcc/cp/ChangeLog.apple - copied unchanged from r260014, head/contrib/gcc/cp/ChangeLog.apple stable/8/contrib/gcc/tree-ssa-alias-warnings.c - copied unchanged from r258501, head/contrib/gcc/tree-ssa-alias-warnings.c stable/8/contrib/gcclibs/libcpp/ChangeLog.apple - copied, changed from r259555, head/contrib/gcclibs/libcpp/ChangeLog.apple stable/8/contrib/gcclibs/libcpp/ChangeLog.gcc43 - copied, changed from r258530, head/contrib/gcclibs/libcpp/ChangeLog.gcc43 stable/8/contrib/gcclibs/libcpp/directives-only.c - copied unchanged from r258501, head/contrib/gcclibs/libcpp/directives-only.c stable/8/contrib/gcclibs/libiberty/ChangeLog.gcc43 - copied unchanged from r258817, head/contrib/gcclibs/libiberty/ChangeLog.gcc43 Modified: stable/8/contrib/binutils/binutils/cxxfilt.c stable/8/contrib/gcc/ChangeLog.gcc43 stable/8/contrib/gcc/builtins.c stable/8/contrib/gcc/c-common.c stable/8/contrib/gcc/c-common.h stable/8/contrib/gcc/c-decl.c stable/8/contrib/gcc/c-opts.c stable/8/contrib/gcc/c-parser.c stable/8/contrib/gcc/c-ppoutput.c stable/8/contrib/gcc/c-tree.h stable/8/contrib/gcc/c-typeck.c stable/8/contrib/gcc/c.opt stable/8/contrib/gcc/calls.c stable/8/contrib/gcc/common.opt stable/8/contrib/gcc/config.gcc stable/8/contrib/gcc/config/arm/arm.c stable/8/contrib/gcc/config/arm/arm.md stable/8/contrib/gcc/config/darwin.c stable/8/contrib/gcc/config/darwin.h stable/8/contrib/gcc/config/i386/athlon.md stable/8/contrib/gcc/config/i386/driver-i386.c stable/8/contrib/gcc/config/i386/emmintrin.h stable/8/contrib/gcc/config/i386/i386.c stable/8/contrib/gcc/config/i386/i386.h stable/8/contrib/gcc/config/i386/i386.md stable/8/contrib/gcc/config/i386/i386.opt stable/8/contrib/gcc/config/i386/pmmintrin.h stable/8/contrib/gcc/config/i386/sse.md stable/8/contrib/gcc/config/i386/tmmintrin.h stable/8/contrib/gcc/config/rs6000/altivec.h stable/8/contrib/gcc/config/rs6000/rs6000-c.c stable/8/contrib/gcc/config/rs6000/rs6000.c stable/8/contrib/gcc/coverage.c stable/8/contrib/gcc/cp/Make-lang.in stable/8/contrib/gcc/cp/call.c stable/8/contrib/gcc/cp/cp-gimplify.c stable/8/contrib/gcc/cp/cp-tree.def stable/8/contrib/gcc/cp/cp-tree.h stable/8/contrib/gcc/cp/decl.c stable/8/contrib/gcc/cp/decl2.c stable/8/contrib/gcc/cp/dump.c stable/8/contrib/gcc/cp/init.c stable/8/contrib/gcc/cp/mangle.c stable/8/contrib/gcc/cp/method.c stable/8/contrib/gcc/cp/parser.c stable/8/contrib/gcc/cp/pt.c stable/8/contrib/gcc/cp/rtti.c stable/8/contrib/gcc/cp/semantics.c stable/8/contrib/gcc/cp/typeck.c stable/8/contrib/gcc/doc/cppopts.texi stable/8/contrib/gcc/doc/extend.texi stable/8/contrib/gcc/doc/invoke.texi stable/8/contrib/gcc/doc/tm.texi stable/8/contrib/gcc/dwarf2out.c stable/8/contrib/gcc/emit-rtl.c stable/8/contrib/gcc/final.c stable/8/contrib/gcc/flags.h stable/8/contrib/gcc/gcc.c stable/8/contrib/gcc/gimplify.c stable/8/contrib/gcc/opts.c stable/8/contrib/gcc/print-rtl.c stable/8/contrib/gcc/print-tree.c stable/8/contrib/gcc/reload1.c stable/8/contrib/gcc/rtl.def stable/8/contrib/gcc/rtl.h stable/8/contrib/gcc/sched-vis.c stable/8/contrib/gcc/stmt.c stable/8/contrib/gcc/target-def.h stable/8/contrib/gcc/target.h stable/8/contrib/gcc/toplev.c stable/8/contrib/gcc/toplev.h stable/8/contrib/gcc/tree-cfg.c stable/8/contrib/gcc/tree-dump.c stable/8/contrib/gcc/tree-flow.h stable/8/contrib/gcc/tree-ssa-alias.c stable/8/contrib/gcc/tree-vrp.c stable/8/contrib/gcc/tree.c stable/8/contrib/gcc/tree.h stable/8/contrib/gcc/varasm.c stable/8/contrib/gcclibs/libcpp/Makefile.in stable/8/contrib/gcclibs/libcpp/charset.c stable/8/contrib/gcclibs/libcpp/directives.c stable/8/contrib/gcclibs/libcpp/errors.c stable/8/contrib/gcclibs/libcpp/expr.c stable/8/contrib/gcclibs/libcpp/files.c stable/8/contrib/gcclibs/libcpp/include/cpplib.h stable/8/contrib/gcclibs/libcpp/init.c stable/8/contrib/gcclibs/libcpp/internal.h stable/8/contrib/gcclibs/libcpp/lex.c stable/8/contrib/gcclibs/libcpp/macro.c stable/8/contrib/gcclibs/libcpp/pch.c stable/8/contrib/gcclibs/libiberty/choose-temp.c stable/8/contrib/gcclibs/libiberty/cp-demangle.c stable/8/contrib/gcclibs/libiberty/cp-demangle.h stable/8/contrib/gcclibs/libiberty/floatformat.c stable/8/contrib/gcclibs/libiberty/functions.texi stable/8/contrib/gcclibs/libiberty/pex-unix.c stable/8/contrib/gcclibs/libiberty/strsignal.c stable/8/contrib/gcclibs/libiberty/testsuite/demangle-expected stable/8/contrib/gcclibs/libiberty/testsuite/test-demangle.c stable/8/contrib/libstdc++/config/os/bsd/freebsd/ctype_base.h stable/8/contrib/libstdc++/include/bits/basic_string.h stable/8/contrib/libstdc++/include/bits/basic_string.tcc stable/8/contrib/libstdc++/include/bits/fstream.tcc stable/8/contrib/libstdc++/include/bits/locale_facets.h stable/8/contrib/libstdc++/include/bits/locale_facets.tcc stable/8/contrib/libstdc++/include/bits/stl_algobase.h stable/8/contrib/libstdc++/include/bits/stl_tree.h stable/8/contrib/libstdc++/include/bits/stl_vector.h stable/8/contrib/libstdc++/include/bits/streambuf_iterator.h stable/8/contrib/libstdc++/include/debug/map.h stable/8/contrib/libstdc++/include/debug/multimap.h stable/8/contrib/libstdc++/include/ext/hashtable.h stable/8/contrib/libstdc++/include/ext/mt_allocator.h stable/8/contrib/libstdc++/include/ext/throw_allocator.h stable/8/contrib/libstdc++/include/std/std_sstream.h stable/8/contrib/libstdc++/libsupc++/eh_alloc.cc stable/8/contrib/libstdc++/src/mt_allocator.cc stable/8/gnu/usr.bin/cc/cc_int/Makefile stable/8/gnu/usr.bin/cc/libcpp/Makefile Directory Properties: stable/8/contrib/ (props changed) stable/8/contrib/binutils/ (props changed) stable/8/contrib/gcc/ (props changed) stable/8/contrib/gcclibs/ (props changed) stable/8/contrib/libstdc++/ (props changed) stable/8/gnu/usr.bin/ (props changed) Modified: stable/8/contrib/binutils/binutils/cxxfilt.c ============================================================================== --- stable/8/contrib/binutils/binutils/cxxfilt.c Sat Aug 23 10:51:37 2014 (r270392) +++ stable/8/contrib/binutils/binutils/cxxfilt.c Sat Aug 23 10:58:16 2014 (r270393) @@ -44,12 +44,12 @@ demangle_it (char *mangled_name) /* For command line args, also try to demangle type encodings. */ result = cplus_demangle (mangled_name, flags | DMGL_TYPES); if (result == NULL) - { - printf ("%s\n", mangled_name); - } + printf ("%s",mangled_name); else { - printf ("%s\n", result); + if (mangled_name[0] == '.') + putchar ('.'); + printf ("%s",result); free (result); } } Copied: stable/8/contrib/gcc/ChangeLog.apple (from r260014, head/contrib/gcc/ChangeLog.apple) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/contrib/gcc/ChangeLog.apple Sat Aug 23 10:58:16 2014 (r270393, copy of r260014, head/contrib/gcc/ChangeLog.apple) @@ -0,0 +1,51 @@ +006-02-15 Fariborz Jahanian + + Radar 4445586 + * c-common.def (DO_STMT): Takes an extra argument. + +/* APPLE LOCAL merge marger */ +/* Stuff under is in fsf mainline, but not in the 4.2 branch */ + +2007-08-02 Geoffrey Keating + + Radar 3274130, 5295549 + * c-parser.c (c_parser_while_statement): Handle attributes. + (c_parser_do_statement): Handle attributes. + (c_parser_for_statement): Handle attributes. + * c-common.c (handle_unused_attribute): Warn if a statement + is marked as unused. + * c-tree.h (c_finish_loop): Add extra parameter. + * c-typeck.c (c_finish_loop): Handle attributes. + * doc/extend.texi (Attribute Syntax): Document statement attributes. + (Label Attributes): Explain how they apply to statements. + * tree-cfg.c (cleanup_dead_labels): Preserve labels with + user-specified alignment or attributes. + * stmt.c (expand_label): Update and correct documentation. + + * c-common.c (handle_aligned_attribute): Handle LABEL_DECL. + * rtl.def (CODE_LABEL): Add 8th operand. + * rtl.h (LABEL_ALIGN_LOG): New. + (LABEL_MAX_SKIP): New. + (SET_LABEL_ALIGN): New. + * emit-rtl.c (gen_label_rtx): Adjust. + * print-rtl.c (print_rtx): Print LABEL_ALIGN_LOG. + * stmt.c (label_rtx): Set CODE_LABEL's alignment from DECL_ALIGN. + (expand_label): Update documentation. + * final.c (struct label_alignment): Delete. + (label_align): Delete. + (min_labelno): Delete. + (max_labelno): Delete. + (LABEL_TO_ALIGNMENT): Delete. + (LABEL_TO_MAX_SKIP): Delete. + (label_to_alignment): Adjust for LABEL_ALIGN_LOG. + (align_fuzz): Likewise. + (compute_alignments): Likewise. + (shorten_branches): Remove code to set up label_align. + Adjust for LABEL_ALIGN_LOG. + (final_scan_insn): Adjust for LABEL_ALIGN_LOG. + * doc/extend.texi (C Extensions): Add 'Label Attributes' to menu. + (Attribute Syntax): Move label content to Label Attributes. + (Function Attributes): Mention label attributes. + (Variable Attributes): Mention label attributes. + (Type Attributes): Mention label attributes. + (Label Attributes): New. Modified: stable/8/contrib/gcc/ChangeLog.gcc43 ============================================================================== --- stable/8/contrib/gcc/ChangeLog.gcc43 Sat Aug 23 10:51:37 2014 (r270392) +++ stable/8/contrib/gcc/ChangeLog.gcc43 Sat Aug 23 10:58:16 2014 (r270393) @@ -1,9 +1,137 @@ +2007-07-12 Geoffrey Keating (r126588) + + * builtins.c (get_pointer_alignment): Honor DECL_ALIGN on a + FUNCTION_DECL. + * tree.c (build_decl_stat): Move code from here... + (make_node_stat): ... to here. Don't uselessly clear DECL_USER_ALIGN. + (expr_align): Honor DECL_ALIGN on a FUNCTION_DECL. Add comment + about using DECL_ALIGN of LABEL_DECL and CONST_DECL. + * tree.h (DECL_USER_ALIGN): Fix misplaced comment. + * varasm.c (assemble_start_function): Use DECL_ALIGN instead of + FUNCTION_BOUNDARY. + +2007-07-09 Geoffrey Keating (r126529) + + PR 32617 + * c-common.c (c_alignof_expr): Look at DECL_ALIGN of + FUNCTION_DECLs. + (handle_aligned_attribute): Allow use on FUNCTION_DECLs. + * varasm.c (assemble_start_function): Honor DECL_ALIGN + for FUNCTION_DECLs. Don't use align_functions_log if + DECL_USER_ALIGN. + * print-tree.c (print_node): Print DECL_ALIGN and DECL_USER_ALIGN + even for FUNCTION_DECLs. + * c-decl.c (merge_decls): Propagate DECL_ALIGN even for + FUNCTION_DECLs. + * tree.h (DECL_ALIGN): Update for new location of 'align'. + (DECL_FUNCTION_CODE): Update for new location and name of + 'function_code'. + (DECL_OFFSET_ALIGN): Update for new location of 'off_align'. + (struct tree_decl_common): Move 'align' and 'off_align' out + of union, ensure they're still on a 32-bit boundary. Remove + other fields in union 'u1'. + (struct tree_function_decl): Add field 'function_code' replacing + 'u1.f' in tree_decl_common. + * tree.c (build_decl_stat): Set initial value of DECL_ALIGN. + * doc/extend.texi (Function Attributes): Add 'aligned' attribute. + (Variable Attributes): Cross-reference 'aligned' attribute + to Function Attributes. + * flags.h (force_align_functions_log): Delete. + * toplev.c (force_align_functions_log): Delete. + +2007-07-06 Josh Conner (r126422) + + PR middle-end/32602 + PR middle-end/32603 + * calls.c (store_one_arg): Handle arguments which are partially + on the stack when detecting argument overlap. + +2007-07-03 Eric Christopher (r126278) + + * doc/cppopts.texi: Add conflicting option note to -dM. + * doc/invoke.texi: Add note about possible conflicts with + -E for -dCHARS and note that -dM will not produce + any results if there is no machine dependent reorg. + +2007-06-28 Geoffrey Keating (r126088) + + * doc/invoke.texi (C++ Dialect Options): Document + fvisibility-ms-compat. + * c.opt (fvisibility-ms-compat): New. + +2007-06-23 Richard Earnshaw (r125973) + + PR target/31152 + * arm.md (negscc): Match the correct operand for optimized LT0 test. + Remove optimization for GT. + 2007-06-05 Joerg Wunsch (r125346) PR preprocessor/23479 * doc/extend.texi: Document the 0b-prefixed binary integer constant extension. +2007-05-31 Eric Christopher (r125246) + + * expr.c (convert_move): Assert that we don't have a BLKmode + operand. + (store_expr): Handle BLKmode moves by calling emit_block_move. + +2007-05-31 Daniel Berlin (r125239) + + * c-typeck.c (build_indirect_ref): Include type in error message. + (build_binary_op): Pass types to binary_op_error. + * c-common.c (binary_op_error): Take two type arguments, print out + types with error. + * c-common.h (binary_op_error): Update prototype. + +2007-05-27 Eric Christopher (r125116) + + * config/rs6000/rs6000.c (rs6000_emit_prologue): Update + sp_offset depending on stack size. Save r12 depending + on registers we're saving later. + (rs6000_emit_epilogue): Update sp_offset depending only + on stack size. + +2007-05-24 Richard Sandiford (r125037) + + * postreload-gcse.c (reg_changed_after_insn_p): New function. + (oprs_unchanged_p): Use it to check all registers in a REG. + (record_opr_changes): Look for clobbers in CALL_INSN_FUNCTION_USAGE. + (reg_set_between_after_reload_p): Delete. + (reg_used_between_after_reload_p): Likewise. + (reg_set_or_used_since_bb_start): Likewise. + (eliminate_partially_redundant_load): Use reg_changed_after_insn_p + and reg_used_between_p instead of reg_set_or_used_since_bb_start. + Use reg_set_between_p instead of reg_set_between_after_reload_p. + * rtlanal.c (reg_set_p): Check whether REG overlaps + regs_invalidated_by_call, rather than just checking the + membership of REGNO (REG). + +2007-05-18 Geoffrey Keating (r124839) + + * dwarf2out.c (print_die): Use '%ld' not '%lu' to print a 'long'. + (output_die): Use 'unsigned long' with %x. + * sched-vis.c (print_value): Use 'unsigned HOST_WIDE_INT' and + HOST_WIDE_INT_PRINT_HEX to print HOST_WIDE_INT. + * tree-dump.c (dump_pointer): Use 'unsigned long' for %lx. + +2007-05-16 Eric Christopher (r124763) + + * config/rs6000/rs6000.c (rs6000_emit_prologue): Move altivec register + saving after stack push. Set sp_offset whenever we push. + (rs6000_emit_epilogue): Move altivec register restore before stack push. + +2007-05-03 Ian Lance Taylor (r124381) + + * config/rs6000/rs6000.c (rs6000_override_options): Don't set + MASK_PPC_GFXOPT for 8540 or 8548. + +2007-05-01 Dwarakanath Rajagopal (r124341) + + * doc/invoke.texi: Fix typo, 'AMD Family 10h core' instead of + 'AMD Family 10 core'. + 2007-05-01 Dwarakanath Rajagopal (r124339) * config/i386/i386.c (override_options): Accept k8-sse3, opteron-sse3 @@ -11,7 +139,18 @@ with SSE3 instruction set support. * doc/invoke.texi: Likewise. -2007-04-16 Lawrence Crowl +2007-05-01 Dwarakanath Rajagopal (r124330) + + * config/i386/i386.c (override_options): Tuning 32-byte loop + alignment for amdfam10 architecture. Increasing the max loop + alignment to 24 bytes. + +2007-04-24 Hui-May Chang (r124115) + + * reload1.c (merge_assigned_reloads) : Do not merge a RELOAD_OTHER + instruction with a RELOAD_FOR_OPERAND_ADDRESS instruction. + +2007-04-16 Lawrence Crowl (r123909) * doc/invoke.texi (Debugging Options): Add documentation for the -femit-struct-debug options -femit-struct-debug-baseonly, @@ -78,6 +217,30 @@ * config/i386/i386.c (ix86_handle_option): Handle SSSE3. +2007-03-28 Dwarakanath Rajagopal (r123313) + + * config.gcc: Accept barcelona as a variant of amdfam10. + * config/i386/i386.c (override_options): Likewise. + * doc/invoke.texi: Likewise. + +2007-03-12 Seongbae Park (r122851) + + * c-decl.c (warn_variable_length_array): New function. + Refactored from grokdeclarator to handle warn_vla + and handle unnamed array case. + (grokdeclarator): Refactored VLA warning case. + * c.opt (Wvla): New flag. + +2007-03-11 Ian Lance Taylor (r122831 - partial) + + * tree-vrp.c (vrp_int_const_binop): Handle PLUS_EXPR and + the *_DIV_EXPR codes correctly with overflow infinities. + +2007-02-09 Dwarakanath Rajagopal (r121763) + + * config/i386/driver-i386.c: Turn on -mtune=native for AMDFAM10. + (bit_SSE4a): New. + 2007-02-08 Harsha Jagasia (r121726) * config/i386/xmmintrin.h: Make inclusion of emmintrin.h @@ -95,10 +258,226 @@ * config/i386/i386.c (override_options): Set PTA_SSSE3 for core2. +2007-02-05 Harsha Jagasia (r121625) + + * config/i386/athlon.md (athlon_fldxf_k8, athlon_fld_k8, + athlon_fstxf_k8, athlon_fst_k8, athlon_fist, athlon_fmov, + athlon_fadd_load, athlon_fadd_load_k8, athlon_fadd, athlon_fmul, + athlon_fmul_load, athlon_fmul_load_k8, athlon_fsgn, + athlon_fdiv_load, athlon_fdiv_load_k8, athlon_fdiv_k8, + athlon_fpspc_load, athlon_fpspc, athlon_fcmov_load, + athlon_fcmov_load_k8, athlon_fcmov_k8, athlon_fcomi_load_k8, + athlon_fcomi, athlon_fcom_load_k8, athlon_fcom): Added amdfam10. + +2007-02-05 Harsha Jagasia (r121625) + + * config/i386/i386.md (x86_sahf_1, cmpfp_i_mixed, cmpfp_i_sse, + cmpfp_i_i387, cmpfp_iu_mixed, cmpfp_iu_sse, cmpfp_iu_387, + swapsi, swaphi_1, swapqi_1, swapdi_rex64, fix_truncsfdi_sse, + fix_truncdfdi_sse, fix_truncsfsi_sse, fix_truncdfsi_sse, + x86_fldcw_1, floatsisf2_mixed, floatsisf2_sse, floatdisf2_mixed, + floatdisf2_sse, floatsidf2_mixed, floatsidf2_sse, + floatdidf2_mixed, floatdidf2_sse, muldi3_1_rex64, mulsi3_1, + mulsi3_1_zext, mulhi3_1, mulqi3_1, umulqihi3_1, mulqihi3_insn, + umulditi3_insn, umulsidi3_insn, mulditi3_insn, mulsidi3_insn, + umuldi3_highpart_rex64, umulsi3_highpart_insn, + umulsi3_highpart_zext, smuldi3_highpart_rex64, + smulsi3_highpart_insn, smulsi3_highpart_zext, x86_64_shld, + x86_shld_1, x86_64_shrd, sqrtsf2_mixed, sqrtsf2_sse, + sqrtsf2_i387, sqrtdf2_mixed, sqrtdf2_sse, sqrtdf2_i387, + sqrtextendsfdf2_i387, sqrtxf2, sqrtextendsfxf2_i387, + sqrtextenddfxf2_i387): Added amdfam10_decode. + + * config/i386/athlon.md (athlon_idirect_amdfam10, + athlon_ivector_amdfam10, athlon_idirect_load_amdfam10, + athlon_ivector_load_amdfam10, athlon_idirect_both_amdfam10, + athlon_ivector_both_amdfam10, athlon_idirect_store_amdfam10, + athlon_ivector_store_amdfam10): New define_insn_reservation. + (athlon_idirect_loadmov, athlon_idirect_movstore): Added + amdfam10. + +2007-02-05 Harsha Jagasia (r121625) + + * config/i386/athlon.md (athlon_call_amdfam10, + athlon_pop_amdfam10, athlon_lea_amdfam10): New + define_insn_reservation. + (athlon_branch, athlon_push, athlon_leave_k8, athlon_imul_k8, + athlon_imul_k8_DI, athlon_imul_mem_k8, athlon_imul_mem_k8_DI, + athlon_idiv, athlon_idiv_mem, athlon_str): Added amdfam10. + +2007-02-05 Harsha Jagasia (r121625) + + * config/i386/athlon.md (athlon_sseld_amdfam10, + athlon_mmxld_amdfam10, athlon_ssest_amdfam10, + athlon_mmxssest_short_amdfam10): New define_insn_reservation. + +2007-02-05 Harsha Jagasia (r121625) + + * config/i386/athlon.md (athlon_sseins_amdfam10): New + define_insn_reservation. + * config/i386/i386.md (sseins): Added sseins to define_attr type + and define_attr unit. + * config/i386/sse.md: Set type attribute to sseins for insertq + and insertqi. + +2007-02-05 Harsha Jagasia (r121625) + + * config/i386/athlon.md (sselog_load_amdfam10, sselog_amdfam10, + ssecmpvector_load_amdfam10, ssecmpvector_amdfam10, + ssecomi_load_amdfam10, ssecomi_amdfam10, + sseaddvector_load_amdfam10, sseaddvector_amdfam10): New + define_insn_reservation. + (ssecmp_load_k8, ssecmp, sseadd_load_k8, seadd): Added amdfam10. + +2007-02-05 Harsha Jagasia (r121625) + + * config/i386/athlon.md (cvtss2sd_load_amdfam10, + cvtss2sd_amdfam10, cvtps2pd_load_amdfam10, cvtps2pd_amdfam10, + cvtsi2sd_load_amdfam10, cvtsi2ss_load_amdfam10, + cvtsi2sd_amdfam10, cvtsi2ss_amdfam10, cvtsd2ss_load_amdfam10, + cvtsd2ss_amdfam10, cvtpd2ps_load_amdfam10, cvtpd2ps_amdfam10, + cvtsX2si_load_amdfam10, cvtsX2si_amdfam10): New + define_insn_reservation. + + * config/i386/sse.md (cvtsi2ss, cvtsi2ssq, cvtss2si, + cvtss2siq, cvttss2si, cvttss2siq, cvtsi2sd, cvtsi2sdq, + cvtsd2si, cvtsd2siq, cvttsd2si, cvttsd2siq, + cvtpd2dq, cvttpd2dq, cvtsd2ss, cvtss2sd, + cvtpd2ps, cvtps2pd): Added amdfam10_decode attribute. + +2007-02-05 Harsha Jagasia (r121625) + + * config/i386/athlon.md (athlon_ssedivvector_amdfam10, + athlon_ssedivvector_load_amdfam10, athlon_ssemulvector_amdfam10, + athlon_ssemulvector_load_amdfam10): New define_insn_reservation. + (athlon_ssediv, athlon_ssediv_load_k8, athlon_ssemul, + athlon_ssemul_load_k8): Added amdfam10. + +2007-02-05 Harsha Jagasia (r121625) + + * config/i386/i386.h (TARGET_SSE_UNALIGNED_MOVE_OPTIMAL): New macro. + (x86_sse_unaligned_move_optimal): New variable. + + * config/i386/i386.c (x86_sse_unaligned_move_optimal): Enable for + m_AMDFAM10. + (ix86_expand_vector_move_misalign): Add code to generate movupd/movups + for unaligned vector SSE double/single precision loads for AMDFAM10. + +2007-02-05 Harsha Jagasia (r121625) + + * config/i386/i386.h (TARGET_AMDFAM10): New macro. + (TARGET_CPU_CPP_BUILTINS): Add code for amdfam10. + Define TARGET_CPU_DEFAULT_amdfam10. + (TARGET_CPU_DEFAULT_NAMES): Add amdfam10. + (processor_type): Add PROCESSOR_AMDFAM10. + + * config/i386/i386.md: Add amdfam10 as a new cpu attribute to match + processor_type in config/i386/i386.h. + Enable imul peepholes for TARGET_AMDFAM10. + + * config.gcc: Add support for --with-cpu option for amdfam10. + + * config/i386/i386.c (amdfam10_cost): New variable. + (m_AMDFAM10): New macro. + (m_ATHLON_K8_AMDFAM10): New macro. + (x86_use_leave, x86_push_memory, x86_movx, x86_unroll_strlen, + x86_cmove, x86_3dnow_a, x86_deep_branch, x86_use_simode_fiop, + x86_promote_QImode, x86_integer_DFmode_moves, + x86_partial_reg_dependency, x86_memory_mismatch_stall, + x86_accumulate_outgoing_args, x86_arch_always_fancy_math_387, + x86_sse_partial_reg_dependency, x86_sse_typeless_stores, + x86_use_ffreep, x86_use_incdec, x86_four_jump_limit, + x86_schedule, x86_use_bt, x86_cmpxchg16b, x86_pad_returns): + Enable/disable for amdfam10. + (override_options): Add amdfam10_cost to processor_target_table. + Set up PROCESSOR_AMDFAM10 for amdfam10 entry in + processor_alias_table. + (ix86_issue_rate): Add PROCESSOR_AMDFAM10. + (ix86_adjust_cost): Add code for amdfam10. + +2007-02-05 Harsha Jagasia (r121625) + + * config/i386/i386.opt: Add new Advanced Bit Manipulation (-mabm) + instruction set feature flag. Add new (-mpopcnt) flag for popcnt + instruction. Add new SSE4A (-msse4a) instruction set feature flag. + * config/i386/i386.h: Add builtin definition for SSE4A. + * config/i386/i386.md: Add support for ABM instructions + (popcnt and lzcnt). + * config/i386/sse.md: Add support for SSE4A instructions + (movntss, movntsd, extrq, insertq). + * config/i386/i386.c: Add support for ABM and SSE4A builtins. + Add -march=amdfam10 flag. + * config/i386/ammintrin.h: Add support for SSE4A intrinsics. + * doc/invoke.texi: Add documentation on flags for sse4a, abm, popcnt + and amdfam10. + * doc/extend.texi: Add documentation for SSE4A builtins. + +2007-01-24 Jakub Jelinek (r121140) + + * config/i386/i386.h (x86_cmpxchg16b): Remove const. + (TARGET_CMPXCHG16B): Define to x86_cmpxchg16b. + * config/i386/i386.c (x86_cmpxchg16b): Remove const. + (override_options): Add PTA_CX16 flag. Set x86_cmpxchg16b + for CPUs that have PTA_CX16 set. + +2007-01-18 Josh Conner (r120902) + + PR target/30485 + * config/rs6000/rs6000.c (rs6000_emit_vector_compare): Add + support for UNLE, UNLT, UNGE, and UNGT. + 2007-01-17 Eric Christopher (r120846) * config.gcc: Support core2 processor. +2007-01-11 Joseph Myers (r120688) + + * c-common.c (vector_types_convertible_p): Treat opaque types as + always convertible if they have the same size, but not otherwise. + +2007-01-08 Geoffrey Keating (r120611) + + * target.h (struct gcc_target): New field library_rtti_comdat. + * target-def.h (TARGET_CXX_LIBRARY_RTTI_COMDAT): New. + (TARGET_CXX): Add TARGET_CXX_LIBRARY_RTTI_COMDAT. + * doc/tm.texi (C++ ABI): Document TARGET_CXX_LIBRARY_RTTI_COMDAT. + * config/darwin.h (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define. + +2007-01-08 Mark Shinwell (r120572) + + * c.opt: Add -flax-vector-conversions. + * c-typeck.c (convert_for_assignment): Pass flag to + vector_types_convertible_p to allow emission of note. + (digest_init): Likewise. + * c-opts.c: Handle -flax-vector-conversions. + * c-common.c (flag_lax_vector_conversions): New. + (vector_types_convertible_p): Unless -flax-vector conversions + has been passed, disallow conversions between vectors with + differing numbers of subparts and/or element types. If such + a conversion is disallowed, possibly emit a note on the first + occasion only to inform the user of -flax-vector-conversions. + The new last argument specifies this. + * c-common.h (flag_lax_vector_conversions): New. + (vector_types_convertible_p): Add extra argument. + * config/i386/i386.c (ix86_init_mmx_sse_builtins): Use + char_type_node for V*QI type vectors. + * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): + Update to satisfy new typechecking rules. + * config/rs6000/altivec.h (vec_cmple): Use vec_cmpge, for both + C and C++ variants. + * doc/invoke.texi (C Dialect Options): Document + -flax-vector-conversions. + +2007-01-05 Manuel Lopez-Ibanez (r120505) + + PR c/19978 + * tree.h (TREE_OVERFLOW_P): New. + * c-typeck.c (parser_build_unary_op): Warn only if result + overflowed and operands did not. + (parser_build_binary_op): Likewise. + (convert_for_assignment): Remove redundant overflow_warning. + * c-common.c (overflow_warning): Don't check or set TREE_OVERFLOW. + 2006-12-13 Ian Lance Taylor (r119855) PR c++/19564 @@ -115,6 +494,11 @@ PR target/30040 * config/i386/driver-i386.c (bit_SSSE3): New. +2006-11-27 Uros Bizjak (r119260) + + * config/i386/i386.c (x86_ext_80387_constants): Add m_K8, m_CORE2 + and m_GENERIC64. + 2006-11-18 Vladimir Makarov (r118973) * doc/invoke.texi (core2): Add item. @@ -143,6 +527,69 @@ (override_options): Add entries for Core2. (ix86_issue_rate): Add case for Core2. +2006-11-14 Caroline Tice (r118826) + + * dwarf2out.c (debug_pubtypes_section): New static global variable. + (pubname_entry): Add DEF_VEC_O and DEF_VEC_ALLOC_O statements for + this type. + (pubname_table): Redefine as a vector. + (pubtype_table): New static global variable, defined as a vector. + (pubname_table_allocated): Remove static global variable. + (pubname_table_in_use): Remove static global variable. + (PUBNAME_TABLE_INCREMENT): Remove constant. + (size_of_pubnames): Add parameter to deal with either pubnames or + pubtypes, and change code to deal with table being a vector. + (add_pubname): Change to deal with table being a vector. + (add_pubtype): New function. + (output_pubnames): Add parameter to deal with either pubnames or + pubtypes, and change code to deal with table being a vector. + (gen_array_type_die): Add call to add_pubtype. + (gen_enumeration_type_die): Add call to add_pubtype. + (gen_struct_or_union_type_die): Add call to add_pubtype. + (gen_subroutine_type_die): Add call to add_pubtype. + (gen_typedef_die): Add call to add_pubtype. + (dwarf2out_init): Add code to initialize pubname_table and + pubtype_table vectors; also initialize debug_pubtypes_section. + (prune_unused_types): Change to deal with pubnames being a vector. + (dwarf2out_finish): Change to deal with pubnames being a vector; add + pubnames table to call to output_pubnames; Add code to output pubtypes + table if DEBUG_PUBTYPES_SECTION is defined. + * config/darwin.c (darwin_file_start): Add DEBUG_PUBTYPES_SECTION to + debugnames. + * config/darwin.h (DEBUG_PUBTYPES_SECTION): Define new global variable. + +2006-11-07 Eric Christopher (r118576) + + * libgcc2.c (__bswapdi2): Rename from bswapDI2. + (__bswapsi2): Ditto. + * libgcc2.h: Remove transformation of bswap routines. + * config/i386/i386.md (bswapsi2): New. + (bswapdi2): Ditto. + +2006-11-03 Paul Brook (r118461) + + gcc/ + * config/arm/arm.c (arm_file_start): New function. + (TARGET_ASM_FILE_START): Define. + (arm_default_cpu): New variable. + (arm_override_options): Set arm_default_cpu. + +2006-10-31 Geoffrey Keating (r118360) + + * coverage.c (coverage_checksum_string): Update comment. + * dwarf2out.c (switch_to_eh_frame_section): Update for removal + of get_file_function_name. + * cgraphunit.c (cgraph_build_static_cdtor): Update for rename + of get_file_function_name_long. + * tree.c (get_file_function_name): Rename from + get_file_function_name_long; improve comment; handle 'I' and 'D' + specially when the target has ctor/dtor support; remove special + handling for 'F'. + (get_file_function_name): Remove. + * tree.h (get_file_function_name): Rename from + get_file_function_name_long. + (get_file_function_name): Remove prototype. + 2006-10-31 Geoffrey Keating (r118356) * c-decl.c (grokdeclarator): Don't set DECL_EXTERNAL on @@ -279,7 +726,7 @@ * doc/invoke.texi: Document -mssse3/-mno-ssse3 switches. -2006-10-22 H.J. Lu +2006-10-22 H.J. Lu (r117959) * config/i386/tmmintrin.h: Remove the duplicated content. Modified: stable/8/contrib/gcc/builtins.c ============================================================================== --- stable/8/contrib/gcc/builtins.c Sat Aug 23 10:51:37 2014 (r270392) +++ stable/8/contrib/gcc/builtins.c Sat Aug 23 10:58:16 2014 (r270393) @@ -315,9 +315,7 @@ get_pointer_alignment (tree exp, unsigne else if (offset) inner = MIN (inner, BITS_PER_UNIT); } - if (TREE_CODE (exp) == FUNCTION_DECL) - align = FUNCTION_BOUNDARY; - else if (DECL_P (exp)) + if (DECL_P (exp)) align = MIN (inner, DECL_ALIGN (exp)); #ifdef CONSTANT_ALIGNMENT else if (CONSTANT_CLASS_P (exp)) Modified: stable/8/contrib/gcc/c-common.c ============================================================================== --- stable/8/contrib/gcc/c-common.c Sat Aug 23 10:51:37 2014 (r270392) +++ stable/8/contrib/gcc/c-common.c Sat Aug 23 10:58:16 2014 (r270393) @@ -254,6 +254,10 @@ int flag_short_double; int flag_short_wchar; +/* Nonzero means allow implicit conversions between vectors with + differing numbers of subparts and/or differing element types. */ +int flag_lax_vector_conversions; + /* Nonzero means allow Microsoft extensions without warnings or errors. */ int flag_ms_extensions; @@ -537,6 +541,9 @@ static tree handle_pure_attribute (tree static tree handle_novops_attribute (tree *, tree, tree, int, bool *); static tree handle_deprecated_attribute (tree *, tree, tree, int, bool *); +/* APPLE LOCAL begin "unavailable" attribute (Radar 2809697) --ilr */ +static tree handle_unavailable_attribute (tree *, tree, tree, int, bool *); +/* APPLE LOCAL end "unavailable" attribute --ilr */ static tree handle_vector_size_attribute (tree *, tree, tree, int, bool *); static tree handle_nonnull_attribute (tree *, tree, tree, int, bool *); @@ -622,6 +629,10 @@ const struct attribute_spec c_common_att handle_novops_attribute }, { "deprecated", 0, 0, false, false, false, handle_deprecated_attribute }, + /* APPLE LOCAL begin "unavailable" attribute (Radar 2809697) --ilr */ + { "unavailable", 0, 0, false, false, false, + handle_unavailable_attribute }, + /* APPLE LOCAL end "unavailable" attribute --ilr */ { "vector_size", 1, 1, false, true, false, handle_vector_size_attribute }, { "visibility", 1, 1, false, false, false, @@ -916,39 +927,45 @@ constant_expression_warning (tree value) pedwarn ("overflow in constant expression"); } -/* Print a warning if an expression had overflow in folding. +/* Print a warning if an expression had overflow in folding and its + operands hadn't. + Invoke this function on every expression that (1) appears in the source code, and - (2) might be a constant expression that overflowed, and + (2) is a constant expression that overflowed, and (3) is not already checked by convert_and_check; - however, do not invoke this function on operands of explicit casts. */ + however, do not invoke this function on operands of explicit casts + or when the expression is the result of an operator and any operand + already overflowed. */ void overflow_warning (tree value) { - if ((TREE_CODE (value) == INTEGER_CST - || (TREE_CODE (value) == COMPLEX_CST - && TREE_CODE (TREE_REALPART (value)) == INTEGER_CST)) - && TREE_OVERFLOW (value)) - { - TREE_OVERFLOW (value) = 0; - if (skip_evaluation == 0) - warning (OPT_Woverflow, "integer overflow in expression"); - } - else if ((TREE_CODE (value) == REAL_CST - || (TREE_CODE (value) == COMPLEX_CST - && TREE_CODE (TREE_REALPART (value)) == REAL_CST)) - && TREE_OVERFLOW (value)) - { - TREE_OVERFLOW (value) = 0; - if (skip_evaluation == 0) - warning (OPT_Woverflow, "floating point overflow in expression"); - } - else if (TREE_CODE (value) == VECTOR_CST && TREE_OVERFLOW (value)) - { - TREE_OVERFLOW (value) = 0; - if (skip_evaluation == 0) - warning (OPT_Woverflow, "vector overflow in expression"); + if (skip_evaluation) return; + + switch (TREE_CODE (value)) + { + case INTEGER_CST: + warning (OPT_Woverflow, "integer overflow in expression"); + break; + + case REAL_CST: + warning (OPT_Woverflow, "floating point overflow in expression"); + break; + + case VECTOR_CST: + warning (OPT_Woverflow, "vector overflow in expression"); + break; + + case COMPLEX_CST: + if (TREE_CODE (TREE_REALPART (value)) == INTEGER_CST) + warning (OPT_Woverflow, "complex integer overflow in expression"); + else if (TREE_CODE (TREE_REALPART (value)) == REAL_CST) + warning (OPT_Woverflow, "complex floating point overflow in expression"); + break; + + default: + break; } } @@ -983,35 +1000,67 @@ unsigned_conversion_warning (tree result strict aliasing mode is in effect. OTYPE is the original TREE_TYPE of EXPR, and TYPE the type we're casting to. */ -void +bool strict_aliasing_warning (tree otype, tree type, tree expr) { - if (flag_strict_aliasing && warn_strict_aliasing - && POINTER_TYPE_P (type) && POINTER_TYPE_P (otype) - && TREE_CODE (expr) == ADDR_EXPR + if (!(flag_strict_aliasing && POINTER_TYPE_P (type) + && POINTER_TYPE_P (otype) && !VOID_TYPE_P (TREE_TYPE (type)))) + return false; + + if ((warn_strict_aliasing > 1) && TREE_CODE (expr) == ADDR_EXPR && (DECL_P (TREE_OPERAND (expr, 0)) - || handled_component_p (TREE_OPERAND (expr, 0))) - && !VOID_TYPE_P (TREE_TYPE (type))) + || handled_component_p (TREE_OPERAND (expr, 0)))) { /* Casting the address of an object to non void pointer. Warn if the cast breaks type based aliasing. */ - if (!COMPLETE_TYPE_P (TREE_TYPE (type))) - warning (OPT_Wstrict_aliasing, "type-punning to incomplete type " - "might break strict-aliasing rules"); + if (!COMPLETE_TYPE_P (TREE_TYPE (type)) && warn_strict_aliasing == 2) + { + warning (OPT_Wstrict_aliasing, "type-punning to incomplete type " + "might break strict-aliasing rules"); + return true; + } else { - HOST_WIDE_INT set1 = get_alias_set (TREE_TYPE (TREE_OPERAND (expr, 0))); + /* warn_strict_aliasing >= 3. This includes the default (3). + Only warn if the cast is dereferenced immediately. */ + HOST_WIDE_INT set1 = + get_alias_set (TREE_TYPE (TREE_OPERAND (expr, 0))); HOST_WIDE_INT set2 = get_alias_set (TREE_TYPE (type)); if (!alias_sets_conflict_p (set1, set2)) - warning (OPT_Wstrict_aliasing, "dereferencing type-punned " - "pointer will break strict-aliasing rules"); - else if (warn_strict_aliasing > 1 - && !alias_sets_might_conflict_p (set1, set2)) - warning (OPT_Wstrict_aliasing, "dereferencing type-punned " - "pointer might break strict-aliasing rules"); + { + warning (OPT_Wstrict_aliasing, "dereferencing type-punned " + "pointer will break strict-aliasing rules"); + return true; + } + else if (warn_strict_aliasing == 2 + && !alias_sets_might_conflict_p (set1, set2)) + { + warning (OPT_Wstrict_aliasing, "dereferencing type-punned " + "pointer might break strict-aliasing rules"); + return true; + } } } + else + if ((warn_strict_aliasing == 1) && !VOID_TYPE_P (TREE_TYPE (otype))) + { + /* At this level, warn for any conversions, even if an address is + not taken in the same statement. This will likely produce many + false positives, but could be useful to pinpoint problems that + are not revealed at higher levels. */ + HOST_WIDE_INT set1 = get_alias_set (TREE_TYPE (otype)); + HOST_WIDE_INT set2 = get_alias_set (TREE_TYPE (type)); + if (!COMPLETE_TYPE_P(type) + || !alias_sets_might_conflict_p (set1, set2)) + { + warning (OPT_Wstrict_aliasing, "dereferencing type-punned " + "pointer might break strict-aliasing rules"); + return true; + } + } + + return false; } @@ -1057,18 +1106,45 @@ constant_fits_type_p (tree c, tree type) return !TREE_OVERFLOW (c); } -/* Nonzero if vector types T1 and T2 can be converted to each other - without an explicit cast. */ -int -vector_types_convertible_p (tree t1, tree t2) + +/* True if vector types T1 and T2 can be converted to each other + without an explicit cast. If EMIT_LAX_NOTE is true, and T1 and T2 + can only be converted with -flax-vector-conversions yet that is not + in effect, emit a note telling the user about that option if such + a note has not previously been emitted. */ +bool +vector_types_convertible_p (tree t1, tree t2, bool emit_lax_note) { - return targetm.vector_opaque_p (t1) - || targetm.vector_opaque_p (t2) - || (tree_int_cst_equal (TYPE_SIZE (t1), TYPE_SIZE (t2)) - && (TREE_CODE (TREE_TYPE (t1)) != REAL_TYPE || - TYPE_PRECISION (t1) == TYPE_PRECISION (t2)) - && INTEGRAL_TYPE_P (TREE_TYPE (t1)) - == INTEGRAL_TYPE_P (TREE_TYPE (t2))); + static bool emitted_lax_note = false; + bool convertible_lax; + + if ((targetm.vector_opaque_p (t1) || targetm.vector_opaque_p (t2)) + && tree_int_cst_equal (TYPE_SIZE (t1), TYPE_SIZE (t2))) + return true; + + convertible_lax = + (tree_int_cst_equal (TYPE_SIZE (t1), TYPE_SIZE (t2)) + && (TREE_CODE (TREE_TYPE (t1)) != REAL_TYPE || + TYPE_PRECISION (t1) == TYPE_PRECISION (t2)) + && (INTEGRAL_TYPE_P (TREE_TYPE (t1)) + == INTEGRAL_TYPE_P (TREE_TYPE (t2)))); + + if (!convertible_lax || flag_lax_vector_conversions) + return convertible_lax; + + if (TYPE_VECTOR_SUBPARTS (t1) == TYPE_VECTOR_SUBPARTS (t2) + && comptypes (TREE_TYPE (t1), TREE_TYPE (t2))) + return true; + + if (emit_lax_note && !emitted_lax_note) + { + emitted_lax_note = true; + inform ("use -flax-vector-conversions to permit " + "conversions between vectors with differing " + "element types or numbers of subparts"); + } + + return false; } /* Convert EXPR to TYPE, warning about conversion problems with constants. @@ -1950,10 +2026,10 @@ min_precision (tree value, int unsignedp } /* Print an error message for invalid operands to arith operation - CODE. */ + CODE with TYPE0 for operand 0, and TYPE1 for operand 1. */ void -binary_op_error (enum tree_code code) +binary_op_error (enum tree_code code, tree type0, tree type1) { const char *opname; @@ -2004,7 +2080,8 @@ binary_op_error (enum tree_code code) default: gcc_unreachable (); } - error ("invalid operands to binary %s", opname); + error ("invalid operands to binary %s (have %qT and %qT)", opname, + type0, type1); } /* Subroutine of build_binary_op, used for comparison operations. @@ -2957,16 +3034,16 @@ c_sizeof_or_alignof_type (tree type, boo } /* Implement the __alignof keyword: Return the minimum required - alignment of EXPR, measured in bytes. For VAR_DECL's and - FIELD_DECL's return DECL_ALIGN (which can be set from an - "aligned" __attribute__ specification). */ + alignment of EXPR, measured in bytes. For VAR_DECLs, + FUNCTION_DECLs and FIELD_DECLs return DECL_ALIGN (which can be set + from an "aligned" __attribute__ specification). */ tree c_alignof_expr (tree expr) { tree t; - if (TREE_CODE (expr) == VAR_DECL) + if (VAR_OR_FUNCTION_DECL_P (expr)) t = size_int (DECL_ALIGN_UNIT (expr)); else if (TREE_CODE (expr) == COMPONENT_REF @@ -3108,6 +3185,85 @@ def_fn_type (builtin_type def, builtin_t builtin_types[def] = t; } +/* Build builtin functions common to both C and C++ language + frontends. */ + +static void +c_define_builtins (tree va_list_ref_type_node, tree va_list_arg_type_node) +{ +#define DEF_PRIMITIVE_TYPE(ENUM, VALUE) \ + builtin_types[ENUM] = VALUE; +#define DEF_FUNCTION_TYPE_0(ENUM, RETURN) \ + def_fn_type (ENUM, RETURN, 0, 0); +#define DEF_FUNCTION_TYPE_1(ENUM, RETURN, ARG1) \ + def_fn_type (ENUM, RETURN, 0, 1, ARG1); +#define DEF_FUNCTION_TYPE_2(ENUM, RETURN, ARG1, ARG2) \ + def_fn_type (ENUM, RETURN, 0, 2, ARG1, ARG2); +#define DEF_FUNCTION_TYPE_3(ENUM, RETURN, ARG1, ARG2, ARG3) \ + def_fn_type (ENUM, RETURN, 0, 3, ARG1, ARG2, ARG3); +#define DEF_FUNCTION_TYPE_4(ENUM, RETURN, ARG1, ARG2, ARG3, ARG4) \ + def_fn_type (ENUM, RETURN, 0, 4, ARG1, ARG2, ARG3, ARG4); +#define DEF_FUNCTION_TYPE_5(ENUM, RETURN, ARG1, ARG2, ARG3, ARG4, ARG5) \ + def_fn_type (ENUM, RETURN, 0, 5, ARG1, ARG2, ARG3, ARG4, ARG5); +#define DEF_FUNCTION_TYPE_6(ENUM, RETURN, ARG1, ARG2, ARG3, ARG4, ARG5, \ + ARG6) \ + def_fn_type (ENUM, RETURN, 0, 6, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6); +#define DEF_FUNCTION_TYPE_7(ENUM, RETURN, ARG1, ARG2, ARG3, ARG4, ARG5, \ + ARG6, ARG7) \ + def_fn_type (ENUM, RETURN, 0, 7, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7); +#define DEF_FUNCTION_TYPE_VAR_0(ENUM, RETURN) \ + def_fn_type (ENUM, RETURN, 1, 0); +#define DEF_FUNCTION_TYPE_VAR_1(ENUM, RETURN, ARG1) \ + def_fn_type (ENUM, RETURN, 1, 1, ARG1); +#define DEF_FUNCTION_TYPE_VAR_2(ENUM, RETURN, ARG1, ARG2) \ + def_fn_type (ENUM, RETURN, 1, 2, ARG1, ARG2); +#define DEF_FUNCTION_TYPE_VAR_3(ENUM, RETURN, ARG1, ARG2, ARG3) \ + def_fn_type (ENUM, RETURN, 1, 3, ARG1, ARG2, ARG3); +#define DEF_FUNCTION_TYPE_VAR_4(ENUM, RETURN, ARG1, ARG2, ARG3, ARG4) \ + def_fn_type (ENUM, RETURN, 1, 4, ARG1, ARG2, ARG3, ARG4); +#define DEF_FUNCTION_TYPE_VAR_5(ENUM, RETURN, ARG1, ARG2, ARG3, ARG4, ARG5) \ + def_fn_type (ENUM, RETURN, 1, 5, ARG1, ARG2, ARG3, ARG4, ARG5); +#define DEF_POINTER_TYPE(ENUM, TYPE) \ + builtin_types[(int) ENUM] = build_pointer_type (builtin_types[(int) TYPE]); + +#include "builtin-types.def" + +#undef DEF_PRIMITIVE_TYPE +#undef DEF_FUNCTION_TYPE_1 +#undef DEF_FUNCTION_TYPE_2 +#undef DEF_FUNCTION_TYPE_3 +#undef DEF_FUNCTION_TYPE_4 +#undef DEF_FUNCTION_TYPE_5 +#undef DEF_FUNCTION_TYPE_6 +#undef DEF_FUNCTION_TYPE_VAR_0 +#undef DEF_FUNCTION_TYPE_VAR_1 +#undef DEF_FUNCTION_TYPE_VAR_2 +#undef DEF_FUNCTION_TYPE_VAR_3 +#undef DEF_FUNCTION_TYPE_VAR_4 +#undef DEF_FUNCTION_TYPE_VAR_5 +#undef DEF_POINTER_TYPE + builtin_types[(int) BT_LAST] = NULL_TREE; + + c_init_attributes (); + +#define DEF_BUILTIN(ENUM, NAME, CLASS, TYPE, LIBTYPE, BOTH_P, FALLBACK_P, \ + NONANSI_P, ATTRS, IMPLICIT, COND) \ + if (NAME && COND) \ + def_builtin_1 (ENUM, NAME, CLASS, \ + builtin_types[(int) TYPE], \ + builtin_types[(int) LIBTYPE], \ + BOTH_P, FALLBACK_P, NONANSI_P, \ + built_in_attributes[(int) ATTRS], IMPLICIT); +#include "builtins.def" +#undef DEF_BUILTIN + + build_common_builtin_nodes (); + + targetm.init_builtins (); + if (flag_mudflap) + mudflap_init (); +} + /* Build tree nodes and builtin functions common to both C and C++ language frontends. */ @@ -3320,77 +3476,8 @@ c_common_nodes_and_builtins (void) va_list_ref_type_node = build_reference_type (va_list_type_node); } -#define DEF_PRIMITIVE_TYPE(ENUM, VALUE) \ - builtin_types[ENUM] = VALUE; -#define DEF_FUNCTION_TYPE_0(ENUM, RETURN) \ - def_fn_type (ENUM, RETURN, 0, 0); -#define DEF_FUNCTION_TYPE_1(ENUM, RETURN, ARG1) \ - def_fn_type (ENUM, RETURN, 0, 1, ARG1); -#define DEF_FUNCTION_TYPE_2(ENUM, RETURN, ARG1, ARG2) \ - def_fn_type (ENUM, RETURN, 0, 2, ARG1, ARG2); -#define DEF_FUNCTION_TYPE_3(ENUM, RETURN, ARG1, ARG2, ARG3) \ - def_fn_type (ENUM, RETURN, 0, 3, ARG1, ARG2, ARG3); -#define DEF_FUNCTION_TYPE_4(ENUM, RETURN, ARG1, ARG2, ARG3, ARG4) \ - def_fn_type (ENUM, RETURN, 0, 4, ARG1, ARG2, ARG3, ARG4); -#define DEF_FUNCTION_TYPE_5(ENUM, RETURN, ARG1, ARG2, ARG3, ARG4, ARG5) \ - def_fn_type (ENUM, RETURN, 0, 5, ARG1, ARG2, ARG3, ARG4, ARG5); -#define DEF_FUNCTION_TYPE_6(ENUM, RETURN, ARG1, ARG2, ARG3, ARG4, ARG5, \ - ARG6) \ - def_fn_type (ENUM, RETURN, 0, 6, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6); -#define DEF_FUNCTION_TYPE_7(ENUM, RETURN, ARG1, ARG2, ARG3, ARG4, ARG5, \ - ARG6, ARG7) \ - def_fn_type (ENUM, RETURN, 0, 7, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7); -#define DEF_FUNCTION_TYPE_VAR_0(ENUM, RETURN) \ - def_fn_type (ENUM, RETURN, 1, 0); -#define DEF_FUNCTION_TYPE_VAR_1(ENUM, RETURN, ARG1) \ - def_fn_type (ENUM, RETURN, 1, 1, ARG1); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From des at FreeBSD.org Sat Aug 23 11:32:44 2014 From: des at FreeBSD.org (Dag-Erling Smørgrav) Date: Sat, 23 Aug 2014 11:32:43 +0000 (UTC) Subject: svn commit: r270395 - stable/10/usr.sbin/bsdinstall/scripts Message-ID: <201408231132.s7NBWhPF059059@svn.freebsd.org> Author: des Date: Sat Aug 23 11:32:43 2014 New Revision: 270395 URL: http://svnweb.freebsd.org/changeset/base/270395 Log: MFH (r269074): strip patch level from release name Modified: stable/10/usr.sbin/bsdinstall/scripts/mirrorselect Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/mirrorselect ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/mirrorselect Sat Aug 23 11:27:49 2014 (r270394) +++ stable/10/usr.sbin/bsdinstall/scripts/mirrorselect Sat Aug 23 11:32:43 2014 (r270395) @@ -158,6 +158,7 @@ MIRROR_BUTTON=$? exec 3>&- _UNAME_R=`uname -r` +_UNAME_R=${_UNAME_R%-p*} case ${_UNAME_R} in *-CURRENT|*-STABLE|*-PRERELEASE) From des at FreeBSD.org Sat Aug 23 11:32:48 2014 From: des at FreeBSD.org (Dag-Erling Smørgrav) Date: Sat, 23 Aug 2014 11:32:48 +0000 (UTC) Subject: svn commit: r270396 - stable/9/usr.sbin/bsdinstall/scripts Message-ID: <201408231132.s7NBWmdc059120@svn.freebsd.org> Author: des Date: Sat Aug 23 11:32:48 2014 New Revision: 270396 URL: http://svnweb.freebsd.org/changeset/base/270396 Log: MFH (r269074): strip patch level from release name Modified: stable/9/usr.sbin/bsdinstall/scripts/mirrorselect Directory Properties: stable/9/usr.sbin/bsdinstall/ (props changed) stable/9/usr.sbin/bsdinstall/scripts/ (props changed) Modified: stable/9/usr.sbin/bsdinstall/scripts/mirrorselect ============================================================================== --- stable/9/usr.sbin/bsdinstall/scripts/mirrorselect Sat Aug 23 11:32:43 2014 (r270395) +++ stable/9/usr.sbin/bsdinstall/scripts/mirrorselect Sat Aug 23 11:32:48 2014 (r270396) @@ -159,6 +159,7 @@ MIRROR_BUTTON=$? exec 3>&- _UNAME_R=`uname -r` +_UNAME_R=${_UNAME_R%-p*} case ${_UNAME_R} in *-CURRENT|*-STABLE|*-PRERELEASE) From des at FreeBSD.org Sat Aug 23 11:34:56 2014 From: des at FreeBSD.org (Dag-Erling Smørgrav) Date: Sat, 23 Aug 2014 11:34:56 +0000 (UTC) Subject: svn commit: r270398 - stable/10/lib/libpam/modules/pam_lastlog Message-ID: <201408231134.s7NBYufC059939@svn.freebsd.org> Author: des Date: Sat Aug 23 11:34:56 2014 New Revision: 270398 URL: http://svnweb.freebsd.org/changeset/base/270398 Log: MFH (r269115): remove useless getpwnam() call Modified: stable/10/lib/libpam/modules/pam_lastlog/pam_lastlog.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libpam/modules/pam_lastlog/pam_lastlog.c ============================================================================== --- stable/10/lib/libpam/modules/pam_lastlog/pam_lastlog.c Sat Aug 23 11:34:55 2014 (r270397) +++ stable/10/lib/libpam/modules/pam_lastlog/pam_lastlog.c Sat Aug 23 11:34:56 2014 (r270398) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -68,7 +67,6 @@ PAM_EXTERN int pam_sm_open_session(pam_handle_t *pamh, int flags, int argc __unused, const char *argv[] __unused) { - struct passwd *pwd; struct utmpx *utx, utl; time_t t; const char *user; @@ -79,7 +77,7 @@ pam_sm_open_session(pam_handle_t *pamh, pam_err = pam_get_user(pamh, &user, NULL); if (pam_err != PAM_SUCCESS) return (pam_err); - if (user == NULL || (pwd = getpwnam(user)) == NULL) + if (user == NULL) return (PAM_SERVICE_ERR); PAM_LOG("Got user: %s", user); From des at FreeBSD.org Sat Aug 23 11:34:56 2014 From: des at FreeBSD.org (Dag-Erling Smørgrav) Date: Sat, 23 Aug 2014 11:34:55 +0000 (UTC) Subject: svn commit: r270397 - stable/9/lib/libpam/modules/pam_lastlog Message-ID: <201408231134.s7NBYtMV059898@svn.freebsd.org> Author: des Date: Sat Aug 23 11:34:55 2014 New Revision: 270397 URL: http://svnweb.freebsd.org/changeset/base/270397 Log: MFH (r269115): remove useless getpwnam() call Modified: stable/9/lib/libpam/modules/pam_lastlog/pam_lastlog.c Directory Properties: stable/9/lib/libpam/ (props changed) Modified: stable/9/lib/libpam/modules/pam_lastlog/pam_lastlog.c ============================================================================== --- stable/9/lib/libpam/modules/pam_lastlog/pam_lastlog.c Sat Aug 23 11:32:48 2014 (r270396) +++ stable/9/lib/libpam/modules/pam_lastlog/pam_lastlog.c Sat Aug 23 11:34:55 2014 (r270397) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -68,7 +67,6 @@ PAM_EXTERN int pam_sm_open_session(pam_handle_t *pamh, int flags, int argc __unused, const char *argv[] __unused) { - struct passwd *pwd; struct utmpx *utx, utl; time_t t; const char *user; @@ -79,7 +77,7 @@ pam_sm_open_session(pam_handle_t *pamh, pam_err = pam_get_user(pamh, &user, NULL); if (pam_err != PAM_SUCCESS) return (pam_err); - if (user == NULL || (pwd = getpwnam(user)) == NULL) + if (user == NULL) return (PAM_SERVICE_ERR); PAM_LOG("Got user: %s", user); From des at FreeBSD.org Sat Aug 23 11:40:19 2014 From: des at FreeBSD.org (Dag-Erling Smørgrav) Date: Sat, 23 Aug 2014 11:40:18 +0000 (UTC) Subject: svn commit: r270400 - stable/9/lib/libpam/modules/pam_group Message-ID: <201408231140.s7NBeI4h061646@svn.freebsd.org> Author: des Date: Sat Aug 23 11:40:18 2014 New Revision: 270400 URL: http://svnweb.freebsd.org/changeset/base/270400 Log: MFH (r268888): fix false negative for empty groups PR: 109416 MFH (r268890): add support for "account" facility PR: 115164 Modified: stable/9/lib/libpam/modules/pam_group/pam_group.8 stable/9/lib/libpam/modules/pam_group/pam_group.c Directory Properties: stable/9/lib/libpam/ (props changed) Modified: stable/9/lib/libpam/modules/pam_group/pam_group.8 ============================================================================== --- stable/9/lib/libpam/modules/pam_group/pam_group.8 Sat Aug 23 11:38:31 2014 (r270399) +++ stable/9/lib/libpam/modules/pam_group/pam_group.8 Sat Aug 23 11:40:18 2014 (r270400) @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 9, 2011 +.Dd July 19, 2014 .Dt PAM_GROUP 8 .Os .Sh NAME @@ -48,6 +48,11 @@ .Sh DESCRIPTION The group service module for PAM accepts or rejects users based on their membership in a particular file group. +.Nm pam_group +provides functionality for two PAM categories: authentication and +account management. +In terms of the module-type parameter, they are the ``auth'' and +``account'' features. .Pp The following options may be passed to the .Nm Modified: stable/9/lib/libpam/modules/pam_group/pam_group.c ============================================================================== --- stable/9/lib/libpam/modules/pam_group/pam_group.c Sat Aug 23 11:38:31 2014 (r270399) +++ stable/9/lib/libpam/modules/pam_group/pam_group.c Sat Aug 23 11:40:18 2014 (r270400) @@ -47,15 +47,14 @@ __FBSDID("$FreeBSD$"); #include #define PAM_SM_AUTH +#define PAM_SM_ACCOUNT #include #include #include - -PAM_EXTERN int -pam_sm_authenticate(pam_handle_t *pamh, int flags __unused, - int argc __unused, const char *argv[] __unused) +static int +pam_group(pam_handle_t *pamh) { int local, remote; const char *group, *user; @@ -96,14 +95,12 @@ pam_sm_authenticate(pam_handle_t *pamh, if ((grp = getgrnam(group)) == NULL || grp->gr_mem == NULL) goto failed; - /* check if the group is empty */ - if (*grp->gr_mem == NULL) - goto failed; - - /* check membership */ + /* check if user's own primary group */ if (pwd->pw_gid == grp->gr_gid) goto found; - for (list = grp->gr_mem; *list != NULL; ++list) + + /* iterate over members */ + for (list = grp->gr_mem; list != NULL && *list != NULL; ++list) if (strcmp(*list, pwd->pw_name) == 0) goto found; @@ -123,6 +120,14 @@ pam_sm_authenticate(pam_handle_t *pamh, } PAM_EXTERN int +pam_sm_authenticate(pam_handle_t *pamh, int flags __unused, + int argc __unused, const char *argv[] __unused) +{ + + return (pam_group(pamh)); +} + +PAM_EXTERN int pam_sm_setcred(pam_handle_t * pamh __unused, int flags __unused, int argc __unused, const char *argv[] __unused) { @@ -130,4 +135,12 @@ pam_sm_setcred(pam_handle_t * pamh __unu return (PAM_SUCCESS); } +PAM_EXTERN int +pam_sm_acct_mgmt(pam_handle_t *pamh, int flags __unused, + int argc __unused, const char *argv[] __unused) +{ + + return (pam_group(pamh)); +} + PAM_MODULE_ENTRY("pam_group"); From des at FreeBSD.org Sat Aug 23 11:40:41 2014 From: des at FreeBSD.org (Dag-Erling Smørgrav) Date: Sat, 23 Aug 2014 11:40:41 +0000 (UTC) Subject: svn commit: r270401 - stable/10/lib/libpam/modules/pam_group Message-ID: <201408231140.s7NBef8H061800@svn.freebsd.org> Author: des Date: Sat Aug 23 11:40:40 2014 New Revision: 270401 URL: http://svnweb.freebsd.org/changeset/base/270401 Log: MFH (r268888): fix false negative for empty groups PR: 109416 MFH (r268890): add support for "account" facility PR: 115164 Modified: stable/10/lib/libpam/modules/pam_group/pam_group.8 stable/10/lib/libpam/modules/pam_group/pam_group.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libpam/modules/pam_group/pam_group.8 ============================================================================== --- stable/10/lib/libpam/modules/pam_group/pam_group.8 Sat Aug 23 11:40:18 2014 (r270400) +++ stable/10/lib/libpam/modules/pam_group/pam_group.8 Sat Aug 23 11:40:40 2014 (r270401) @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 9, 2011 +.Dd July 19, 2014 .Dt PAM_GROUP 8 .Os .Sh NAME @@ -48,6 +48,11 @@ .Sh DESCRIPTION The group service module for PAM accepts or rejects users based on their membership in a particular file group. +.Nm pam_group +provides functionality for two PAM categories: authentication and +account management. +In terms of the module-type parameter, they are the ``auth'' and +``account'' features. .Pp The following options may be passed to the .Nm Modified: stable/10/lib/libpam/modules/pam_group/pam_group.c ============================================================================== --- stable/10/lib/libpam/modules/pam_group/pam_group.c Sat Aug 23 11:40:18 2014 (r270400) +++ stable/10/lib/libpam/modules/pam_group/pam_group.c Sat Aug 23 11:40:40 2014 (r270401) @@ -47,15 +47,14 @@ __FBSDID("$FreeBSD$"); #include #define PAM_SM_AUTH +#define PAM_SM_ACCOUNT #include #include #include - -PAM_EXTERN int -pam_sm_authenticate(pam_handle_t *pamh, int flags __unused, - int argc __unused, const char *argv[] __unused) +static int +pam_group(pam_handle_t *pamh) { int local, remote; const char *group, *user; @@ -96,14 +95,12 @@ pam_sm_authenticate(pam_handle_t *pamh, if ((grp = getgrnam(group)) == NULL || grp->gr_mem == NULL) goto failed; - /* check if the group is empty */ - if (*grp->gr_mem == NULL) - goto failed; - - /* check membership */ + /* check if user's own primary group */ if (pwd->pw_gid == grp->gr_gid) goto found; - for (list = grp->gr_mem; *list != NULL; ++list) + + /* iterate over members */ + for (list = grp->gr_mem; list != NULL && *list != NULL; ++list) if (strcmp(*list, pwd->pw_name) == 0) goto found; @@ -123,6 +120,14 @@ pam_sm_authenticate(pam_handle_t *pamh, } PAM_EXTERN int +pam_sm_authenticate(pam_handle_t *pamh, int flags __unused, + int argc __unused, const char *argv[] __unused) +{ + + return (pam_group(pamh)); +} + +PAM_EXTERN int pam_sm_setcred(pam_handle_t * pamh __unused, int flags __unused, int argc __unused, const char *argv[] __unused) { @@ -130,4 +135,12 @@ pam_sm_setcred(pam_handle_t * pamh __unu return (PAM_SUCCESS); } +PAM_EXTERN int +pam_sm_acct_mgmt(pam_handle_t *pamh, int flags __unused, + int argc __unused, const char *argv[] __unused) +{ + + return (pam_group(pamh)); +} + PAM_MODULE_ENTRY("pam_group"); From des at FreeBSD.org Sat Aug 23 11:46:27 2014 From: des at FreeBSD.org (Dag-Erling Smørgrav) Date: Sat, 23 Aug 2014 11:46:27 +0000 (UTC) Subject: svn commit: r270403 - stable/10 Message-ID: <201408231146.s7NBkRXY066599@svn.freebsd.org> Author: des Date: Sat Aug 23 11:46:26 2014 New Revision: 270403 URL: http://svnweb.freebsd.org/changeset/base/270403 Log: MFH (r268864): document local_unbound changes (forgotten in r269257) Modified: stable/10/UPDATING Directory Properties: stable/10/ (props changed) Modified: stable/10/UPDATING ============================================================================== --- stable/10/UPDATING Sat Aug 23 11:45:14 2014 (r270402) +++ stable/10/UPDATING Sat Aug 23 11:46:26 2014 (r270403) @@ -26,6 +26,14 @@ older version of current is a bit fragil function call interfaces used between the NFS and krpc modules. As such, __FreeBSD_version was bumped. +20140729: + The default unbound configuration has been modified to address + issues with reverse lookups on networks that use private + address ranges. If you use the local_unbound service, run + "service local_unbound setup" as root to regenerate your + configuration, then "service local_unbound reload" to load the + new configuration. + 20140717: It is no longer necessary to include the dwarf version in your DEBUG options in your kernel config file. The bug that required it to be From des at FreeBSD.org Sat Aug 23 14:42:50 2014 From: des at FreeBSD.org (Dag-Erling Smørgrav) Date: Sat, 23 Aug 2014 14:42:50 +0000 (UTC) Subject: svn commit: r270408 - stable/10/share/mk Message-ID: <201408231442.s7NEgou7054711@svn.freebsd.org> Author: des Date: Sat Aug 23 14:42:49 2014 New Revision: 270408 URL: http://svnweb.freebsd.org/changeset/base/270408 Log: MFH (r268877, r268921): use -o instead of a redirect. Modified: stable/10/share/mk/bsd.dep.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.dep.mk ============================================================================== --- stable/10/share/mk/bsd.dep.mk Sat Aug 23 12:41:39 2014 (r270407) +++ stable/10/share/mk/bsd.dep.mk Sat Aug 23 14:42:49 2014 (r270408) @@ -82,7 +82,7 @@ ${_S:R}.o: ${_S} .for _LSRC in ${SRCS:M*.l:N*/*} .for _LC in ${_LSRC:R}.c ${_LC}: ${_LSRC} - ${LEX} -t ${LFLAGS} ${.ALLSRC} > ${.TARGET} + ${LEX} ${LFLAGS} -o${.TARGET} ${.ALLSRC} .if !exists(${.OBJDIR}/${DEPENDFILE}) ${_LC:R}.o: ${_LC} .endif From des at FreeBSD.org Sat Aug 23 14:42:53 2014 From: des at FreeBSD.org (Dag-Erling Smørgrav) Date: Sat, 23 Aug 2014 14:42:53 +0000 (UTC) Subject: svn commit: r270409 - stable/9/share/mk Message-ID: <201408231442.s7NEgrm0054764@svn.freebsd.org> Author: des Date: Sat Aug 23 14:42:53 2014 New Revision: 270409 URL: http://svnweb.freebsd.org/changeset/base/270409 Log: MFH (r268877, r268921): use -o instead of a redirect. Modified: stable/9/share/mk/bsd.dep.mk Directory Properties: stable/9/share/mk/ (props changed) Modified: stable/9/share/mk/bsd.dep.mk ============================================================================== --- stable/9/share/mk/bsd.dep.mk Sat Aug 23 14:42:49 2014 (r270408) +++ stable/9/share/mk/bsd.dep.mk Sat Aug 23 14:42:53 2014 (r270409) @@ -81,7 +81,7 @@ ${_S:R}.o: ${_S} .for _LSRC in ${SRCS:M*.l:N*/*} .for _LC in ${_LSRC:R}.c ${_LC}: ${_LSRC} - ${LEX} -t ${LFLAGS} ${.ALLSRC} > ${.TARGET} + ${LEX} ${LFLAGS} -o${.TARGET} ${.ALLSRC} .if !exists(${.OBJDIR}/${DEPENDFILE}) ${_LC:R}.o: ${_LC} .endif From des at FreeBSD.org Sat Aug 23 15:07:03 2014 From: des at FreeBSD.org (Dag-Erling Smørgrav) Date: Sat, 23 Aug 2014 15:07:02 +0000 (UTC) Subject: svn commit: r270414 - in stable/9: . contrib/lukemftpd libexec/lukemftpd Message-ID: <201408231507.s7NF72fB065606@svn.freebsd.org> Author: des Date: Sat Aug 23 15:07:02 2014 New Revision: 270414 URL: http://svnweb.freebsd.org/changeset/base/270414 Log: MFH (r263160): remove lukemftpd Deleted: stable/9/contrib/lukemftpd/ stable/9/libexec/lukemftpd/ Modified: stable/9/MAINTAINERS (contents, props changed) Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) Modified: stable/9/MAINTAINERS ============================================================================== --- stable/9/MAINTAINERS Sat Aug 23 15:05:11 2014 (r270413) +++ stable/9/MAINTAINERS Sat Aug 23 15:07:02 2014 (r270414) @@ -84,7 +84,6 @@ binutils obrien Insists on BU blocked fr file obrien Insists to keep file blocked from other's unapproved commits contrib/bzip2 obrien Pre-commit review required. -lukemftpd obrien Pre-commit review required. geom_concat pjd Pre-commit review preferred. geom_eli pjd Pre-commit review preferred. geom_gate pjd Pre-commit review preferred. From des at FreeBSD.org Sat Aug 23 15:07:09 2014 From: des at FreeBSD.org (Dag-Erling Smørgrav) Date: Sat, 23 Aug 2014 15:07:09 +0000 (UTC) Subject: svn commit: r270415 - in stable/10: . contrib/lukemftpd libexec/lukemftpd Message-ID: <201408231507.s7NF792i065678@svn.freebsd.org> Author: des Date: Sat Aug 23 15:07:09 2014 New Revision: 270415 URL: http://svnweb.freebsd.org/changeset/base/270415 Log: MFH (r263160): remove lukemftpd Deleted: stable/10/contrib/lukemftpd/ stable/10/libexec/lukemftpd/ Modified: stable/10/MAINTAINERS Directory Properties: stable/10/ (props changed) Modified: stable/10/MAINTAINERS ============================================================================== --- stable/10/MAINTAINERS Sat Aug 23 15:07:02 2014 (r270414) +++ stable/10/MAINTAINERS Sat Aug 23 15:07:09 2014 (r270415) @@ -82,7 +82,6 @@ binutils obrien Insists on BU blocked fr file obrien Insists to keep file blocked from other's unapproved commits contrib/bzip2 obrien Pre-commit review required. -lukemftpd obrien Pre-commit review required. geom_concat pjd Pre-commit review preferred. geom_eli pjd Pre-commit review preferred. geom_gate pjd Pre-commit review preferred. From rmacklem at FreeBSD.org Sat Aug 23 22:03:16 2014 From: rmacklem at FreeBSD.org (Rick Macklem) Date: Sat, 23 Aug 2014 22:03:16 +0000 (UTC) Subject: svn commit: r270435 - stable/9/sys/fs/nfsserver Message-ID: <201408232203.s7NM3G3E076049@svn.freebsd.org> Author: rmacklem Date: Sat Aug 23 22:03:15 2014 New Revision: 270435 URL: http://svnweb.freebsd.org/changeset/base/270435 Log: MFC: r268273 The new NFSv3 server did not generate directory postop attributes for the reply to ReaddirPlus when the server failed within the loop that calls VFS_VGET(). This failure is most likely an error return from VFS_VGET() caused by a bogus d_fileno that was truncated to 32bits. This patch fixes the server so that it will return directory postop attributes for the failure. It does not fix the underlying issue caused by d_fileno being uint32_t when a file system like ZFS generates a fileno that is greater than 32bits. Modified: stable/9/sys/fs/nfsserver/nfs_nfsdport.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/9/sys/fs/nfsserver/nfs_nfsdport.c Sat Aug 23 21:16:26 2014 (r270434) +++ stable/9/sys/fs/nfsserver/nfs_nfsdport.c Sat Aug 23 22:03:15 2014 (r270435) @@ -2265,9 +2265,11 @@ again: if (dirlen > cnt || nd->nd_repstat) { if (!nd->nd_repstat && entrycnt == 0) nd->nd_repstat = NFSERR_TOOSMALL; - if (nd->nd_repstat) + if (nd->nd_repstat) { newnfs_trimtrailing(nd, mb0, bpos0); - else + if (nd->nd_flag & ND_NFSV3) + nfsrv_postopattr(nd, getret, &at); + } else newnfs_trimtrailing(nd, mb1, bpos1); eofflag = 0; } else if (cpos < cend) From kib at FreeBSD.org Sun Aug 24 07:53:17 2014 From: kib at FreeBSD.org (Konstantin Belousov) Date: Sun, 24 Aug 2014 07:53:15 +0000 (UTC) Subject: svn commit: r270439 - in stable/10/sys: amd64/amd64 arm/arm i386/i386 i386/xen ia64/ia64 mips/mips powerpc/aim powerpc/booke powerpc/include powerpc/powerpc sparc64/sparc64 vm Message-ID: <201408240753.s7O7rFxL051819@svn.freebsd.org> Author: kib Date: Sun Aug 24 07:53:15 2014 New Revision: 270439 URL: http://svnweb.freebsd.org/changeset/base/270439 Log: Merge the changes to pmap_enter(9) for sleep-less operation (requested by flag). The ia64 pmap.c changes are direct commit, since ia64 is removed on head. MFC r269368 (by alc): Retire PVO_EXECUTABLE. MFC r269728: Change pmap_enter(9) interface to take flags parameter and superpage mapping size (currently unused). MFC r269759 (by alc): Update the text of a KASSERT() to reflect the changes in r269728. MFC r269822 (by alc): 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. MFC r270151 (by alc): Replace KASSERT that no PV list locks are held with a conditional unlock. Reviewed by: alc Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/amd64/amd64/pmap.c stable/10/sys/arm/arm/pmap-v6.c stable/10/sys/arm/arm/pmap.c stable/10/sys/i386/i386/pmap.c stable/10/sys/i386/xen/pmap.c stable/10/sys/ia64/ia64/pmap.c stable/10/sys/mips/mips/pmap.c stable/10/sys/powerpc/aim/mmu_oea.c stable/10/sys/powerpc/aim/mmu_oea64.c stable/10/sys/powerpc/booke/pmap.c stable/10/sys/powerpc/include/pmap.h stable/10/sys/powerpc/powerpc/mmu_if.m stable/10/sys/powerpc/powerpc/pmap_dispatch.c stable/10/sys/sparc64/sparc64/pmap.c stable/10/sys/vm/pmap.h stable/10/sys/vm/vm_fault.c stable/10/sys/vm/vm_kern.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/pmap.c ============================================================================== --- stable/10/sys/amd64/amd64/pmap.c Sun Aug 24 02:07:34 2014 (r270438) +++ stable/10/sys/amd64/amd64/pmap.c Sun Aug 24 07:53:15 2014 (r270439) @@ -4116,9 +4116,9 @@ setpte: * or lose information. That is, this routine must actually * insert this page into the given map NOW. */ -void -pmap_enter(pmap_t pmap, vm_offset_t va, vm_prot_t access, vm_page_t m, - vm_prot_t prot, boolean_t wired) +int +pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, + u_int flags, int8_t psind __unused) { struct rwlock *lock; pd_entry_t *pde; @@ -4127,6 +4127,7 @@ 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 nosleep; PG_A = pmap_accessed_bit(pmap); PG_G = pmap_global_bit(pmap); @@ -4143,18 +4144,18 @@ pmap_enter(pmap_t pmap, vm_offset_t va, va >= kmi.clean_eva, ("pmap_enter: managed mapping within the clean submap")); if ((m->oflags & VPO_UNMANAGED) == 0 && !vm_page_xbusied(m)) - VM_OBJECT_ASSERT_WLOCKED(m->object); + VM_OBJECT_ASSERT_LOCKED(m->object); pa = VM_PAGE_TO_PHYS(m); newpte = (pt_entry_t)(pa | PG_A | PG_V); - if ((access & VM_PROT_WRITE) != 0) + if ((flags & VM_PROT_WRITE) != 0) newpte |= PG_M; if ((prot & VM_PROT_WRITE) != 0) newpte |= PG_RW; KASSERT((newpte & (PG_M | PG_RW)) != PG_M, - ("pmap_enter: access includes VM_PROT_WRITE but prot doesn't")); + ("pmap_enter: flags includes VM_PROT_WRITE but prot doesn't")); if ((prot & VM_PROT_EXECUTE) == 0) newpte |= pg_nx; - if (wired) + if ((flags & PMAP_ENTER_WIRED) != 0) newpte |= PG_W; if (va < VM_MAXUSER_ADDRESS) newpte |= PG_U; @@ -4196,7 +4197,16 @@ retry: * Here if the pte page isn't mapped, or if it has been * deallocated. */ - mpte = _pmap_allocpte(pmap, pmap_pde_pindex(va), &lock); + nosleep = (flags & PMAP_ENTER_NOSLEEP) != 0; + mpte = _pmap_allocpte(pmap, pmap_pde_pindex(va), + nosleep ? NULL : &lock); + if (mpte == NULL && nosleep) { + if (lock != NULL) + rw_wunlock(lock); + rw_runlock(&pvh_global_lock); + PMAP_UNLOCK(pmap); + return (KERN_RESOURCE_SHORTAGE); + } goto retry; } else panic("pmap_enter: invalid page directory va=%#lx", va); @@ -4328,6 +4338,7 @@ unchanged: rw_wunlock(lock); rw_runlock(&pvh_global_lock); PMAP_UNLOCK(pmap); + return (KERN_SUCCESS); } /* Modified: stable/10/sys/arm/arm/pmap-v6.c ============================================================================== --- stable/10/sys/arm/arm/pmap-v6.c Sun Aug 24 02:07:34 2014 (r270438) +++ stable/10/sys/arm/arm/pmap-v6.c Sun Aug 24 07:53:15 2014 (r270439) @@ -231,8 +231,8 @@ static boolean_t pmap_pv_insert_section( static struct pv_entry *pmap_remove_pv(struct vm_page *, pmap_t, vm_offset_t); static int pmap_pvh_wired_mappings(struct md_page *, int); -static void pmap_enter_locked(pmap_t, vm_offset_t, vm_prot_t, - vm_page_t, vm_prot_t, boolean_t, int); +static int pmap_enter_locked(pmap_t, vm_offset_t, vm_page_t, + vm_prot_t, u_int); static vm_paddr_t pmap_extract_locked(pmap_t pmap, vm_offset_t va); static void pmap_alloc_l1(pmap_t); static void pmap_free_l1(pmap_t); @@ -2944,35 +2944,38 @@ pmap_protect(pmap_t pmap, vm_offset_t sv * insert this page into the given map NOW. */ -void -pmap_enter(pmap_t pmap, vm_offset_t va, vm_prot_t access, vm_page_t m, - vm_prot_t prot, boolean_t wired) +int +pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, + u_int flags, int8_t psind __unused) { struct l2_bucket *l2b; + int rv; rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); - pmap_enter_locked(pmap, va, access, m, prot, wired, M_WAITOK); - /* - * If both the l2b_occupancy and the reservation are fully - * populated, then attempt promotion. - */ - l2b = pmap_get_l2_bucket(pmap, va); - if ((l2b != NULL) && (l2b->l2b_occupancy == L2_PTE_NUM_TOTAL) && - sp_enabled && (m->flags & PG_FICTITIOUS) == 0 && - vm_reserv_level_iffullpop(m) == 0) - pmap_promote_section(pmap, va); - + rv = pmap_enter_locked(pmap, va, m, prot, flags); + if (rv == KERN_SUCCESS) { + /* + * If both the l2b_occupancy and the reservation are fully + * populated, then attempt promotion. + */ + l2b = pmap_get_l2_bucket(pmap, va); + if (l2b != NULL && l2b->l2b_occupancy == L2_PTE_NUM_TOTAL && + sp_enabled && (m->flags & PG_FICTITIOUS) == 0 && + vm_reserv_level_iffullpop(m) == 0) + pmap_promote_section(pmap, va); + } PMAP_UNLOCK(pmap); rw_wunlock(&pvh_global_lock); + return (rv); } /* * The pvh global and pmap locks must be held. */ -static void -pmap_enter_locked(pmap_t pmap, vm_offset_t va, vm_prot_t access, vm_page_t m, - vm_prot_t prot, boolean_t wired, int flags) +static int +pmap_enter_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, + u_int flags) { struct l2_bucket *l2b = NULL; struct vm_page *om; @@ -2990,9 +2993,8 @@ pmap_enter_locked(pmap_t pmap, vm_offset pa = systempage.pv_pa; m = NULL; } else { - KASSERT((m->oflags & VPO_UNMANAGED) != 0 || - vm_page_xbusied(m) || (flags & M_NOWAIT) != 0, - ("pmap_enter_locked: page %p is not busy", m)); + if ((m->oflags & VPO_UNMANAGED) == 0 && !vm_page_xbusied(m)) + VM_OBJECT_ASSERT_LOCKED(m->object); pa = VM_PAGE_TO_PHYS(m); } @@ -3013,12 +3015,12 @@ pmap_enter_locked(pmap_t pmap, vm_offset if (prot & VM_PROT_WRITE) nflags |= PVF_WRITE; - if (wired) + if ((flags & PMAP_ENTER_WIRED) != 0) nflags |= PVF_WIRED; PDEBUG(1, printf("pmap_enter: pmap = %08x, va = %08x, m = %08x, " - "prot = %x, wired = %x\n", (uint32_t) pmap, va, (uint32_t) m, - prot, wired)); + "prot = %x, flags = %x\n", (uint32_t) pmap, va, (uint32_t) m, + prot, flags)); if (pmap == pmap_kernel()) { l2b = pmap_get_l2_bucket(pmap, va); @@ -3028,7 +3030,7 @@ pmap_enter_locked(pmap_t pmap, vm_offset do_l2b_alloc: l2b = pmap_alloc_l2_bucket(pmap, va); if (l2b == NULL) { - if (flags & M_WAITOK) { + if ((flags & PMAP_ENTER_NOSLEEP) == 0) { PMAP_UNLOCK(pmap); rw_wunlock(&pvh_global_lock); VM_WAIT; @@ -3036,7 +3038,7 @@ do_l2b_alloc: PMAP_LOCK(pmap); goto do_l2b_alloc; } - return; + return (KERN_RESOURCE_SHORTAGE); } } @@ -3195,6 +3197,7 @@ validate: if ((pmap != pmap_kernel()) && (pmap == &curproc->p_vmspace->vm_pmap)) cpu_icache_sync_range(va, PAGE_SIZE); + return (KERN_SUCCESS); } /* @@ -3216,13 +3219,12 @@ pmap_enter_object(pmap_t pmap, vm_offset vm_offset_t va; vm_page_t m; vm_pindex_t diff, psize; - vm_prot_t access; VM_OBJECT_ASSERT_LOCKED(m_start->object); psize = atop(end - start); m = m_start; - access = prot = prot & (VM_PROT_READ | VM_PROT_EXECUTE); + prot &= VM_PROT_READ | VM_PROT_EXECUTE; rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); while (m != NULL && (diff = m->pindex - m_start->pindex) < psize) { @@ -3232,8 +3234,8 @@ pmap_enter_object(pmap_t pmap, vm_offset pmap_enter_section(pmap, va, m, prot)) m = &m[L1_S_SIZE / PAGE_SIZE - 1]; else - pmap_enter_locked(pmap, va, access, m, prot, - FALSE, M_NOWAIT); + pmap_enter_locked(pmap, va, m, prot, + PMAP_ENTER_NOSLEEP); m = TAILQ_NEXT(m, listq); } PMAP_UNLOCK(pmap); @@ -3252,12 +3254,11 @@ pmap_enter_object(pmap_t pmap, vm_offset void pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot) { - vm_prot_t access; - access = prot = prot & (VM_PROT_READ | VM_PROT_EXECUTE); + prot &= VM_PROT_READ | VM_PROT_EXECUTE; rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); - pmap_enter_locked(pmap, va, access, m, prot, FALSE, M_NOWAIT); + pmap_enter_locked(pmap, va, m, prot, PMAP_ENTER_NOSLEEP); PMAP_UNLOCK(pmap); rw_wunlock(&pvh_global_lock); } @@ -3488,8 +3489,8 @@ pmap_pinit(pmap_t pmap) pmap->pm_stats.resident_count = 1; if (vector_page < KERNBASE) { pmap_enter(pmap, vector_page, - VM_PROT_READ, PHYS_TO_VM_PAGE(systempage.pv_pa), - VM_PROT_READ, 1); + PHYS_TO_VM_PAGE(systempage.pv_pa), VM_PROT_READ, + PMAP_ENTER_WIRED, 0); } return (1); } Modified: stable/10/sys/arm/arm/pmap.c ============================================================================== --- stable/10/sys/arm/arm/pmap.c Sun Aug 24 02:07:34 2014 (r270438) +++ stable/10/sys/arm/arm/pmap.c Sun Aug 24 07:53:15 2014 (r270439) @@ -199,8 +199,8 @@ extern int last_fault_code; static void pmap_free_pv_entry (pv_entry_t); static pv_entry_t pmap_get_pv_entry(void); -static void pmap_enter_locked(pmap_t, vm_offset_t, vm_page_t, - vm_prot_t, boolean_t, int); +static int pmap_enter_locked(pmap_t, vm_offset_t, vm_page_t, + vm_prot_t, u_int); static vm_paddr_t pmap_extract_locked(pmap_t pmap, vm_offset_t va); static void pmap_fix_cache(struct vm_page *, pmap_t, vm_offset_t); static void pmap_alloc_l1(pmap_t); @@ -3204,24 +3204,26 @@ pmap_protect(pmap_t pm, vm_offset_t sva, * insert this page into the given map NOW. */ -void -pmap_enter(pmap_t pmap, vm_offset_t va, vm_prot_t access, vm_page_t m, - vm_prot_t prot, boolean_t wired) +int +pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, + u_int flags, int8_t psind __unused) { + int rv; rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); - pmap_enter_locked(pmap, va, m, prot, wired, M_WAITOK); + rv = pmap_enter_locked(pmap, va, m, prot, flags); rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); + return (rv); } /* * The pvh global and pmap locks must be held. */ -static void +static int pmap_enter_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, - boolean_t wired, int flags) + u_int flags) { struct l2_bucket *l2b = NULL; struct vm_page *opg; @@ -3237,9 +3239,8 @@ pmap_enter_locked(pmap_t pmap, vm_offset pa = systempage.pv_pa; m = NULL; } else { - KASSERT((m->oflags & VPO_UNMANAGED) != 0 || - vm_page_xbusied(m) || (flags & M_NOWAIT) != 0, - ("pmap_enter_locked: page %p is not busy", m)); + if ((m->oflags & VPO_UNMANAGED) == 0 && !vm_page_xbusied(m)) + VM_OBJECT_ASSERT_LOCKED(m->object); pa = VM_PAGE_TO_PHYS(m); } nflags = 0; @@ -3247,10 +3248,10 @@ pmap_enter_locked(pmap_t pmap, vm_offset nflags |= PVF_WRITE; if (prot & VM_PROT_EXECUTE) nflags |= PVF_EXEC; - if (wired) + if ((flags & PMAP_ENTER_WIRED) != 0) nflags |= PVF_WIRED; PDEBUG(1, printf("pmap_enter: pmap = %08x, va = %08x, m = %08x, prot = %x, " - "wired = %x\n", (uint32_t) pmap, va, (uint32_t) m, prot, wired)); + "flags = %x\n", (uint32_t) pmap, va, (uint32_t) m, prot, flags)); if (pmap == pmap_kernel()) { l2b = pmap_get_l2_bucket(pmap, va); @@ -3260,7 +3261,7 @@ pmap_enter_locked(pmap_t pmap, vm_offset do_l2b_alloc: l2b = pmap_alloc_l2_bucket(pmap, va); if (l2b == NULL) { - if (flags & M_WAITOK) { + if ((flags & PMAP_ENTER_NOSLEEP) == 0) { PMAP_UNLOCK(pmap); rw_wunlock(&pvh_global_lock); VM_WAIT; @@ -3268,7 +3269,7 @@ do_l2b_alloc: PMAP_LOCK(pmap); goto do_l2b_alloc; } - return; + return (KERN_RESOURCE_SHORTAGE); } } @@ -3482,6 +3483,7 @@ do_l2b_alloc: if (m) pmap_fix_cache(m, pmap, va); } + return (KERN_SUCCESS); } /* @@ -3511,7 +3513,7 @@ pmap_enter_object(pmap_t pmap, vm_offset PMAP_LOCK(pmap); while (m != NULL && (diff = m->pindex - m_start->pindex) < psize) { pmap_enter_locked(pmap, start + ptoa(diff), m, prot & - (VM_PROT_READ | VM_PROT_EXECUTE), FALSE, M_NOWAIT); + (VM_PROT_READ | VM_PROT_EXECUTE), PMAP_ENTER_NOSLEEP); m = TAILQ_NEXT(m, listq); } rw_wunlock(&pvh_global_lock); @@ -3534,7 +3536,7 @@ pmap_enter_quick(pmap_t pmap, vm_offset_ rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); pmap_enter_locked(pmap, va, m, prot & (VM_PROT_READ | VM_PROT_EXECUTE), - FALSE, M_NOWAIT); + PMAP_ENTER_NOSLEEP); rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } @@ -3746,9 +3748,8 @@ pmap_pinit(pmap_t pmap) bzero(&pmap->pm_stats, sizeof pmap->pm_stats); pmap->pm_stats.resident_count = 1; if (vector_page < KERNBASE) { - pmap_enter(pmap, vector_page, - VM_PROT_READ, PHYS_TO_VM_PAGE(systempage.pv_pa), - VM_PROT_READ, 1); + pmap_enter(pmap, vector_page, PHYS_TO_VM_PAGE(systempage.pv_pa), + VM_PROT_READ, PMAP_ENTER_WIRED | VM_PROT_READ, 0); } return (1); } Modified: stable/10/sys/i386/i386/pmap.c ============================================================================== --- stable/10/sys/i386/i386/pmap.c Sun Aug 24 02:07:34 2014 (r270438) +++ stable/10/sys/i386/i386/pmap.c Sun Aug 24 07:53:15 2014 (r270439) @@ -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); @@ -3458,9 +3450,9 @@ setpte: * or lose information. That is, this routine must actually * insert this page into the given map NOW. */ -void -pmap_enter(pmap_t pmap, vm_offset_t va, vm_prot_t access, vm_page_t m, - vm_prot_t prot, boolean_t wired) +int +pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, + u_int flags, int8_t psind) { pd_entry_t *pde; pt_entry_t *pte; @@ -3468,17 +3460,18 @@ 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; + boolean_t invlva, wired; va = trunc_page(va); + mpte = NULL; + wired = (flags & PMAP_ENTER_WIRED) != 0; + KASSERT(va <= VM_MAX_KERNEL_ADDRESS, ("pmap_enter: toobig")); KASSERT(va < UPT_MIN_ADDRESS || va >= UPT_MAX_ADDRESS, ("pmap_enter: invalid to pmap_enter page table pages (va: 0x%x)", va)); if ((m->oflags & VPO_UNMANAGED) == 0 && !vm_page_xbusied(m)) - VM_OBJECT_ASSERT_WLOCKED(m->object); - - mpte = NULL; + VM_OBJECT_ASSERT_LOCKED(m->object); rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); @@ -3489,7 +3482,15 @@ 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, M_WAITOK); + mpte = pmap_allocpte(pmap, va, flags); + if (mpte == NULL) { + KASSERT((flags & PMAP_ENTER_NOSLEEP) != 0, + ("pmap_allocpte failed with sleep allowed")); + sched_unpin(); + rw_wunlock(&pvh_global_lock); + PMAP_UNLOCK(pmap); + return (KERN_RESOURCE_SHORTAGE); + } } pde = pmap_pde(pmap, va); @@ -3607,7 +3608,7 @@ validate: */ if ((origpte & ~(PG_M|PG_A)) != newpte) { newpte |= PG_A; - if ((access & VM_PROT_WRITE) != 0) + if ((flags & VM_PROT_WRITE) != 0) newpte |= PG_M; if (origpte & PG_V) { invlva = FALSE; @@ -3652,6 +3653,7 @@ validate: sched_unpin(); rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); + return (KERN_SUCCESS); } /* @@ -3817,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); } @@ -4102,7 +4104,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); Modified: stable/10/sys/i386/xen/pmap.c ============================================================================== --- stable/10/sys/i386/xen/pmap.c Sun Aug 24 02:07:34 2014 (r270438) +++ stable/10/sys/i386/xen/pmap.c Sun Aug 24 07:53:15 2014 (r270439) @@ -298,9 +298,9 @@ static void pmap_remove_entry(struct pma static boolean_t pmap_try_insert_pv_entry(pmap_t pmap, vm_offset_t va, vm_page_t m); -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, vm_page_t *free); static pt_entry_t *pmap_pte_quick(pmap_t pmap, vm_offset_t va); static void pmap_pte_release(pt_entry_t *pte); @@ -1546,21 +1546,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 ptema; 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; @@ -1595,16 +1591,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 ptema; 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 */ @@ -1644,7 +1636,7 @@ retry: CTR3(KTR_PMAP, "pmap_allocpte: pmap=%p va=0x%08x flags=0x%x", pmap, va, flags); m = _pmap_allocpte(pmap, ptepindex, flags); - if (m == NULL && (flags & M_WAITOK)) + if (m == NULL && (flags & PMAP_ENTER_NOSLEEP) == 0) goto retry; KASSERT(pmap->pm_pdir[ptepindex], ("ptepindex=%d did not get mapped", ptepindex)); @@ -2643,9 +2635,9 @@ retry: * or lose information. That is, this routine must actually * insert this page into the given map NOW. */ -void -pmap_enter(pmap_t pmap, vm_offset_t va, vm_prot_t access, vm_page_t m, - vm_prot_t prot, boolean_t wired) +int +pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, + u_int flags, int8_t psind __unused) { pd_entry_t *pde; pt_entry_t *pte; @@ -2653,19 +2645,21 @@ 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; + boolean_t invlva, wired; - CTR6(KTR_PMAP, "pmap_enter: pmap=%08p va=0x%08x access=0x%x ma=0x%08x prot=0x%x wired=%d", - pmap, va, access, VM_PAGE_TO_MACH(m), prot, wired); + CTR5(KTR_PMAP, + "pmap_enter: pmap=%08p va=0x%08x ma=0x%08x prot=0x%x flags=0x%x", + pmap, va, VM_PAGE_TO_MACH(m), prot, flags); va = trunc_page(va); KASSERT(va <= VM_MAX_KERNEL_ADDRESS, ("pmap_enter: toobig")); KASSERT(va < UPT_MIN_ADDRESS || va >= UPT_MAX_ADDRESS, ("pmap_enter: invalid to pmap_enter page table pages (va: 0x%x)", va)); if ((m->oflags & VPO_UNMANAGED) == 0 && !vm_page_xbusied(m)) - VM_OBJECT_ASSERT_WLOCKED(m->object); + VM_OBJECT_ASSERT_LOCKED(m->object); mpte = NULL; + wired = (flags & PMAP_ENTER_WIRED) != 0; rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); @@ -2676,7 +2670,15 @@ 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, M_WAITOK); + mpte = pmap_allocpte(pmap, va, flags); + if (mpte == NULL) { + KASSERT((flags & PMAP_ENTER_NOSLEEP) != 0, + ("pmap_allocpte failed with sleep allowed")); + sched_unpin(); + rw_wunlock(&pvh_global_lock); + PMAP_UNLOCK(pmap); + return (KERN_RESOURCE_SHORTAGE); + } } pde = pmap_pde(pmap, va); @@ -2842,6 +2844,7 @@ validate: sched_unpin(); rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); + return (KERN_SUCCESS); } /* @@ -2996,7 +2999,7 @@ pmap_enter_quick_locked(multicall_entry_ mpte->wire_count++; } else { mpte = _pmap_allocpte(pmap, ptepindex, - M_NOWAIT); + PMAP_ENTER_NOSLEEP); if (mpte == NULL) return (mpte); } @@ -3287,7 +3290,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); Modified: stable/10/sys/ia64/ia64/pmap.c ============================================================================== --- stable/10/sys/ia64/ia64/pmap.c Sun Aug 24 02:07:34 2014 (r270438) +++ stable/10/sys/ia64/ia64/pmap.c Sun Aug 24 07:53:15 2014 (r270439) @@ -1692,20 +1692,21 @@ pmap_protect(pmap_t pmap, vm_offset_t sv * or lose information. That is, this routine must actually * insert this page into the given map NOW. */ -void -pmap_enter(pmap_t pmap, vm_offset_t va, vm_prot_t access, vm_page_t m, - vm_prot_t prot, boolean_t wired) +int +pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, + u_int flags, int8_t psind __unused) { pmap_t oldpmap; vm_offset_t pa; vm_offset_t opa; struct ia64_lpte origpte; struct ia64_lpte *pte; - boolean_t icache_inval, managed; + boolean_t icache_inval, managed, wired; - CTR6(KTR_PMAP, "pmap_enter(pm=%p, va=%#lx, acc=%#x, m=%p, prot=%#x, " - "wired=%u)", pmap, va, access, m, prot, wired); + CTR5(KTR_PMAP, "pmap_enter(pm=%p, va=%#lx, m=%p, prot=%#x, " + "flags=%u)", pmap, va, m, prot, flags); + wired = (flags & PMAP_ENTER_WIRED) != 0; rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); oldpmap = pmap_switch(pmap); @@ -1722,6 +1723,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, pmap_switch(oldpmap); PMAP_UNLOCK(pmap); rw_wunlock(&pvh_global_lock); + if ((flags & PMAP_ENTER_NOSLEEP) != 0) + return (KERN_RESOURCE_SHORTAGE); VM_WAIT; rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); @@ -1815,6 +1818,7 @@ validate: rw_wunlock(&pvh_global_lock); pmap_switch(oldpmap); PMAP_UNLOCK(pmap); + return (KERN_SUCCESS); } /* Modified: stable/10/sys/mips/mips/pmap.c ============================================================================== --- stable/10/sys/mips/mips/pmap.c Sun Aug 24 02:07:34 2014 (r270438) +++ stable/10/sys/mips/mips/pmap.c Sun Aug 24 07:53:15 2014 (r270439) @@ -177,8 +177,8 @@ static void pmap_invalidate_all(pmap_t p static void pmap_invalidate_page(pmap_t pmap, vm_offset_t va); static void _pmap_unwire_ptp(pmap_t pmap, vm_offset_t va, vm_page_t m); -static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_t va, int flags); -static vm_page_t _pmap_allocpte(pmap_t pmap, unsigned ptepindex, 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, unsigned ptepindex, u_int flags); static int pmap_unuse_pt(pmap_t, vm_offset_t, pd_entry_t); static pt_entry_t init_pte_prot(vm_page_t m, vm_prot_t access, vm_prot_t prot); @@ -1094,20 +1094,16 @@ pmap_pinit(pmap_t pmap) * mapped correctly. */ static vm_page_t -_pmap_allocpte(pmap_t pmap, unsigned ptepindex, int flags) +_pmap_allocpte(pmap_t pmap, unsigned ptepindex, u_int flags) { vm_offset_t pageva; 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")); - /* * Find or fabricate a new pagetable page */ if ((m = pmap_alloc_direct_page(ptepindex, VM_ALLOC_NORMAL)) == NULL) { - if (flags & M_WAITOK) { + if ((flags & PMAP_ENTER_NOSLEEP) == 0) { PMAP_UNLOCK(pmap); rw_wunlock(&pvh_global_lock); pmap_grow_direct_page_cache(); @@ -1164,16 +1160,12 @@ _pmap_allocpte(pmap_t pmap, unsigned pte } 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) { unsigned ptepindex; pd_entry_t *pde; 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 */ @@ -1197,7 +1189,7 @@ retry: * 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); @@ -1994,9 +1986,9 @@ pmap_protect(pmap_t pmap, vm_offset_t sv * or lose information. That is, this routine must actually * insert this page into the given map NOW. */ -void -pmap_enter(pmap_t pmap, vm_offset_t va, vm_prot_t access, vm_page_t m, - vm_prot_t prot, boolean_t wired) +int +pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, + u_int flags, int8_t psind __unused) { vm_paddr_t pa, opa; pt_entry_t *pte; @@ -2009,11 +2001,11 @@ pmap_enter(pmap_t pmap, vm_offset_t va, KASSERT((m->oflags & VPO_UNMANAGED) != 0 || va < kmi.clean_sva || va >= kmi.clean_eva, ("pmap_enter: managed mapping within the clean submap")); - KASSERT((m->oflags & VPO_UNMANAGED) != 0 || vm_page_xbusied(m), - ("pmap_enter: page %p is not busy", m)); + if ((m->oflags & VPO_UNMANAGED) == 0 && !vm_page_xbusied(m)) + VM_OBJECT_ASSERT_LOCKED(m->object); pa = VM_PAGE_TO_PHYS(m); - newpte = TLBLO_PA_TO_PFN(pa) | init_pte_prot(m, access, prot); - if (wired) + newpte = TLBLO_PA_TO_PFN(pa) | init_pte_prot(m, flags, prot); + if ((flags & PMAP_ENTER_WIRED) != 0) newpte |= PTE_W; if (is_kernel_pmap(pmap)) newpte |= PTE_G; @@ -2032,7 +2024,14 @@ pmap_enter(pmap_t pmap, vm_offset_t va, * creating it here. */ if (va < VM_MAXUSER_ADDRESS) { - mpte = pmap_allocpte(pmap, va, M_WAITOK); + mpte = pmap_allocpte(pmap, va, flags); + if (mpte == NULL) { + KASSERT((flags & PMAP_ENTER_NOSLEEP) != 0, + ("pmap_allocpte failed with sleep allowed")); + rw_wunlock(&pvh_global_lock); + PMAP_UNLOCK(pmap); + return (KERN_RESOURCE_SHORTAGE); + } } pte = pmap_pte(pmap, va); @@ -2057,9 +2056,10 @@ pmap_enter(pmap_t pmap, vm_offset_t va, * are valid mappings in them. Hence, if a user page is * wired, the PT page will be also. */ - if (wired && !pte_test(&origpte, PTE_W)) + if (pte_test(&newpte, PTE_W) && !pte_test(&origpte, PTE_W)) pmap->pm_stats.wired_count++; - else if (!wired && pte_test(&origpte, PTE_W)) + else if (!pte_test(&newpte, PTE_W) && pte_test(&origpte, + PTE_W)) pmap->pm_stats.wired_count--; KASSERT(!pte_test(&origpte, PTE_D | PTE_RO), @@ -2123,7 +2123,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, /* * Increment counters */ - if (wired) + if (pte_test(&newpte, PTE_W)) pmap->pm_stats.wired_count++; validate: @@ -2170,6 +2170,7 @@ validate: } rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); + return (KERN_SUCCESS); } /* @@ -2235,7 +2236,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); } Modified: stable/10/sys/powerpc/aim/mmu_oea.c ============================================================================== --- stable/10/sys/powerpc/aim/mmu_oea.c Sun Aug 24 02:07:34 2014 (r270438) +++ stable/10/sys/powerpc/aim/mmu_oea.c Sun Aug 24 07:53:15 2014 (r270439) @@ -258,8 +258,8 @@ static struct pte *moea_pvo_to_pte(const /* * Utility routines. */ -static void moea_enter_locked(pmap_t, vm_offset_t, vm_page_t, - vm_prot_t, boolean_t); +static int moea_enter_locked(pmap_t, vm_offset_t, vm_page_t, + vm_prot_t, u_int, int8_t); static void moea_syncicache(vm_offset_t, vm_size_t); static boolean_t moea_query_bit(vm_page_t, int); static u_int moea_clear_bit(vm_page_t, int); @@ -274,7 +274,8 @@ void moea_clear_modify(mmu_t, vm_page_t) void moea_copy_page(mmu_t, vm_page_t, vm_page_t); void moea_copy_pages(mmu_t mmu, vm_page_t *ma, vm_offset_t a_offset, vm_page_t *mb, vm_offset_t b_offset, int xfersize); -void moea_enter(mmu_t, pmap_t, vm_offset_t, vm_page_t, vm_prot_t, boolean_t); +int moea_enter(mmu_t, pmap_t, vm_offset_t, vm_page_t, vm_prot_t, u_int, + int8_t); void moea_enter_object(mmu_t, pmap_t, vm_offset_t, vm_offset_t, vm_page_t, vm_prot_t); void moea_enter_quick(mmu_t, pmap_t, vm_offset_t, vm_page_t, vm_prot_t); @@ -1104,16 +1105,25 @@ moea_zero_page_idle(mmu_t mmu, vm_page_t * target pmap with the protection requested. If specified the page * will be wired down. */ -void +int moea_enter(mmu_t mmu, pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, - boolean_t wired) + u_int flags, int8_t psind) { + int error; - rw_wlock(&pvh_global_lock); - PMAP_LOCK(pmap); - moea_enter_locked(pmap, va, m, prot, wired); - rw_wunlock(&pvh_global_lock); - PMAP_UNLOCK(pmap); + for (;;) { + rw_wlock(&pvh_global_lock); + PMAP_LOCK(pmap); + error = moea_enter_locked(pmap, va, m, prot, flags, psind); + rw_wunlock(&pvh_global_lock); + PMAP_UNLOCK(pmap); + if (error != ENOMEM) + return (KERN_SUCCESS); + if ((flags & PMAP_ENTER_NOSLEEP) != 0) + return (KERN_RESOURCE_SHORTAGE); + VM_OBJECT_ASSERT_UNLOCKED(m->object); + VM_WAIT; + } } /* @@ -1123,9 +1133,9 @@ moea_enter(mmu_t mmu, pmap_t pmap, vm_of * * The page queues and pmap must be locked. */ -static void +static int moea_enter_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, - boolean_t wired) + u_int flags, int8_t psind __unused) { struct pvo_head *pvo_head; uma_zone_t zone; @@ -1167,10 +1177,7 @@ moea_enter_locked(pmap_t pmap, vm_offset } else pte_lo |= PTE_BR; - if (prot & VM_PROT_EXECUTE) - pvo_flags |= PVO_EXECUTABLE; - - if (wired) + if ((flags & PMAP_ENTER_WIRED) != 0) pvo_flags |= PVO_WIRED; error = moea_pvo_enter(pmap, zone, pvo_head, va, VM_PAGE_TO_PHYS(m), @@ -1185,6 +1192,8 @@ moea_enter_locked(pmap_t pmap, vm_offset if (pmap != kernel_pmap && error == ENOENT && (pte_lo & (PTE_I | PTE_G)) == 0) moea_syncicache(VM_PAGE_TO_PHYS(m), PAGE_SIZE); + + return (error); } /* @@ -1214,7 +1223,7 @@ moea_enter_object(mmu_t mmu, pmap_t pm, PMAP_LOCK(pm); while (m != NULL && (diff = m->pindex - m_start->pindex) < psize) { moea_enter_locked(pm, start + ptoa(diff), m, prot & - (VM_PROT_READ | VM_PROT_EXECUTE), FALSE); + (VM_PROT_READ | VM_PROT_EXECUTE), 0, 0); m = TAILQ_NEXT(m, listq); } rw_wunlock(&pvh_global_lock); @@ -1229,7 +1238,7 @@ moea_enter_quick(mmu_t mmu, pmap_t pm, v rw_wlock(&pvh_global_lock); PMAP_LOCK(pm); moea_enter_locked(pm, va, m, prot & (VM_PROT_READ | VM_PROT_EXECUTE), - FALSE); + 0, 0); rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pm); } @@ -1725,8 +1734,6 @@ moea_protect(mmu_t mmu, pmap_t pm, vm_of for (pvo = RB_NFIND(pvo_tree, &pm->pmap_pvo, &key); pvo != NULL && PVO_VADDR(pvo) < eva; pvo = tpvo) { tpvo = RB_NEXT(pvo_tree, &pm->pmap_pvo, pvo); - if ((prot & VM_PROT_EXECUTE) == 0) - pvo->pvo_vaddr &= ~PVO_EXECUTABLE; /* * Grab the PTE pointer before we diddle with the cached PTE @@ -1968,8 +1975,6 @@ moea_pvo_enter(pmap_t pm, uma_zone_t zon pvo->pvo_pmap = pm; LIST_INSERT_HEAD(&moea_pvo_table[ptegidx], pvo, pvo_olink); pvo->pvo_vaddr &= ~ADDR_POFF; - if (flags & VM_PROT_EXECUTE) - pvo->pvo_vaddr |= PVO_EXECUTABLE; if (flags & PVO_WIRED) pvo->pvo_vaddr |= PVO_WIRED; if (pvo_head != &moea_pvo_kunmanaged) Modified: stable/10/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- stable/10/sys/powerpc/aim/mmu_oea64.c Sun Aug 24 02:07:34 2014 (r270438) +++ stable/10/sys/powerpc/aim/mmu_oea64.c Sun Aug 24 07:53:15 2014 (r270439) @@ -267,7 +267,7 @@ int moea64_large_page_shift = 0; * PVO calls. */ static int moea64_pvo_enter(mmu_t, pmap_t, uma_zone_t, struct pvo_head *, - vm_offset_t, vm_offset_t, uint64_t, int); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From kib at FreeBSD.org Sun Aug 24 07:57:51 2014 From: kib at FreeBSD.org (Konstantin Belousov) Date: Sun, 24 Aug 2014 07:57:50 +0000 (UTC) Subject: svn commit: r270440 - stable/10/sys/vm Message-ID: <201408240757.s7O7vo48052488@svn.freebsd.org> Author: kib Date: Sun Aug 24 07:57:50 2014 New Revision: 270440 URL: http://svnweb.freebsd.org/changeset/base/270440 Log: MFC r269746: Adapt vm_page_aflag_set(PGA_WRITEABLE) to the locking of pmap_enter(PMAP_ENTER_NOSLEEP). Modified: stable/10/sys/vm/vm_page.c stable/10/sys/vm/vm_page.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_page.c ============================================================================== --- stable/10/sys/vm/vm_page.c Sun Aug 24 07:53:15 2014 (r270439) +++ stable/10/sys/vm/vm_page.c Sun Aug 24 07:57:50 2014 (r270440) @@ -3145,6 +3145,24 @@ vm_page_object_lock_assert(vm_page_t m) if (m->object != NULL && !vm_page_xbusied(m)) VM_OBJECT_ASSERT_WLOCKED(m->object); } + +void +vm_page_assert_pga_writeable(vm_page_t m, uint8_t bits) +{ + + if ((bits & PGA_WRITEABLE) == 0) + return; + + /* + * The PGA_WRITEABLE flag can only be set if the page is + * managed, is exclusively busied or the object is locked. + * Currently, this flag is only set by pmap_enter(). + */ + KASSERT((m->oflags & VPO_UNMANAGED) == 0, + ("PGA_WRITEABLE on unmanaged page")); + if (!vm_page_xbusied(m)) + VM_OBJECT_ASSERT_LOCKED(m->object); +} #endif #include "opt_ddb.h" Modified: stable/10/sys/vm/vm_page.h ============================================================================== --- stable/10/sys/vm/vm_page.h Sun Aug 24 07:53:15 2014 (r270439) +++ stable/10/sys/vm/vm_page.h Sun Aug 24 07:57:50 2014 (r270440) @@ -305,10 +305,10 @@ extern struct mtx_padalign pa_lock[]; * both the MI and MD VM layers. However, kernel loadable modules should not * directly set this flag. They should call vm_page_reference() instead. * - * PGA_WRITEABLE is set exclusively on managed pages by pmap_enter(). When it - * does so, the page must be exclusive busied. The MI VM layer must never - * access this flag directly. Instead, it should call - * pmap_page_is_write_mapped(). + * PGA_WRITEABLE is set exclusively on managed pages by pmap_enter(). + * When it does so, the object must be locked, or the page must be + * exclusive busied. The MI VM layer must never access this flag + * directly. Instead, it should call pmap_page_is_write_mapped(). * * PGA_EXECUTABLE may be set by pmap routines, and indicates that a page has * at least one executable mapping. It is not consumed by the MI VM layer. @@ -536,8 +536,12 @@ void vm_page_lock_assert_KBI(vm_page_t m #ifdef INVARIANTS void vm_page_object_lock_assert(vm_page_t m); #define VM_PAGE_OBJECT_LOCK_ASSERT(m) vm_page_object_lock_assert(m) +void vm_page_assert_pga_writeable(vm_page_t m, uint8_t bits); +#define VM_PAGE_ASSERT_PGA_WRITEABLE(m, bits) \ + vm_page_assert_pga_writeable(m, bits) #else #define VM_PAGE_OBJECT_LOCK_ASSERT(m) (void)0 +#define VM_PAGE_ASSERT_PGA_WRITEABLE(m, bits) (void)0 #endif /* @@ -585,13 +589,7 @@ vm_page_aflag_set(vm_page_t m, uint8_t b { uint32_t *addr, val; - /* - * The PGA_WRITEABLE flag can only be set if the page is managed and - * exclusive busied. Currently, this flag is only set by pmap_enter(). - */ - KASSERT((bits & PGA_WRITEABLE) == 0 || - ((m->oflags & VPO_UNMANAGED) == 0 && vm_page_xbusied(m)), - ("vm_page_aflag_set: PGA_WRITEABLE and not exclusive busy")); + VM_PAGE_ASSERT_PGA_WRITEABLE(m, bits); /* * Access the whole 32-bit word containing the aflags field with an From kib at FreeBSD.org Sun Aug 24 07:59:02 2014 From: kib at FreeBSD.org (Konstantin Belousov) Date: Sun, 24 Aug 2014 07:59:01 +0000 (UTC) Subject: svn commit: r270441 - in stable/10/sys: i386/i386 i386/xen sparc64/sparc64 Message-ID: <201408240759.s7O7x1Kh052813@svn.freebsd.org> Author: kib Date: Sun Aug 24 07:59:01 2014 New Revision: 270441 URL: http://svnweb.freebsd.org/changeset/base/270441 Log: MFC r270038: Complete r254667, do not destroy pmap lock if KVA allocation failed. Modified: stable/10/sys/i386/i386/pmap.c stable/10/sys/i386/xen/pmap.c stable/10/sys/sparc64/sparc64/pmap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/i386/i386/pmap.c ============================================================================== --- stable/10/sys/i386/i386/pmap.c Sun Aug 24 07:57:50 2014 (r270440) +++ stable/10/sys/i386/i386/pmap.c Sun Aug 24 07:59:01 2014 (r270441) @@ -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: stable/10/sys/i386/xen/pmap.c ============================================================================== --- stable/10/sys/i386/xen/pmap.c Sun Aug 24 07:57:50 2014 (r270440) +++ stable/10/sys/i386/xen/pmap.c Sun Aug 24 07:59:01 2014 (r270441) @@ -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: stable/10/sys/sparc64/sparc64/pmap.c ============================================================================== --- stable/10/sys/sparc64/sparc64/pmap.c Sun Aug 24 07:57:50 2014 (r270440) +++ stable/10/sys/sparc64/sparc64/pmap.c Sun Aug 24 07:59:01 2014 (r270441) @@ -1209,11 +1209,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 ngie at FreeBSD.org Sun Aug 24 08:04:00 2014 From: ngie at FreeBSD.org (Garrett Cooper) Date: Sun, 24 Aug 2014 08:04:00 +0000 (UTC) Subject: svn commit: r270442 - stable/10/usr.sbin/nmtree Message-ID: <201408240804.s7O840sW056842@svn.freebsd.org> Author: ngie Date: Sun Aug 24 08:03:59 2014 New Revision: 270442 URL: http://svnweb.freebsd.org/changeset/base/270442 Log: MFC r270180: Add LIBMD and LIBUTIL to DPADD to fix "make checkdpadd" Approved by: jmmv (mentor) Phabric: D633 PR: 192763 Modified: stable/10/usr.sbin/nmtree/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/nmtree/Makefile ============================================================================== --- stable/10/usr.sbin/nmtree/Makefile Sun Aug 24 07:59:01 2014 (r270441) +++ stable/10/usr.sbin/nmtree/Makefile Sun Aug 24 08:03:59 2014 (r270442) @@ -8,6 +8,7 @@ PROG= nmtree MAN= nmtree.8 SRCS= compare.c crc.c create.c excludes.c getid.c misc.c mtree.c \ only.c spec.c specspec.c verify.c +DPADD+= ${LIBMD} ${LIBUTIL} LDADD+= -lmd -lutil CFLAGS+= -I${.CURDIR}/../../contrib/mknod From rmacklem at FreeBSD.org Sun Aug 24 13:03:52 2014 From: rmacklem at FreeBSD.org (Rick Macklem) Date: Sun, 24 Aug 2014 13:03:51 +0000 (UTC) Subject: svn commit: r270458 - stable/9/sys/dev/e1000 Message-ID: <201408241303.s7OD3p3c097302@svn.freebsd.org> Author: rmacklem Date: Sun Aug 24 13:03:51 2014 New Revision: 270458 URL: http://svnweb.freebsd.org/changeset/base/270458 Log: MFC: r268726 Move the "retry:" label so that the calls to m_pullup() are not done after the call to m_defrag(). This fixes a problem where m_pullup() would prepend an mbuf to the list created by m_defrag() making the chain greater than 32 again. Modified: stable/9/sys/dev/e1000/if_em.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) Modified: stable/9/sys/dev/e1000/if_em.c ============================================================================== --- stable/9/sys/dev/e1000/if_em.c Sun Aug 24 12:51:34 2014 (r270457) +++ stable/9/sys/dev/e1000/if_em.c Sun Aug 24 13:03:51 2014 (r270458) @@ -1830,7 +1830,6 @@ em_xmit(struct tx_ring *txr, struct mbuf int nsegs, i, j, first, last = 0; int error, do_tso, tso_desc = 0, remap = 1; -retry: m_head = *m_headp; txd_upper = txd_lower = txd_used = txd_saved = 0; do_tso = ((m_head->m_pkthdr.csum_flags & CSUM_TSO) != 0); @@ -1956,6 +1955,7 @@ retry: tx_buffer_mapped = tx_buffer; map = tx_buffer->map; +retry: error = bus_dmamap_load_mbuf_sg(txr->txtag, map, *m_headp, segs, &nsegs, BUS_DMA_NOWAIT); From des at FreeBSD.org Sun Aug 24 14:00:45 2014 From: des at FreeBSD.org (Dag-Erling Smørgrav) Date: Sun, 24 Aug 2014 14:00:44 +0000 (UTC) Subject: svn commit: r270459 - stable/9/usr.bin/kdump Message-ID: <201408241400.s7OE0icC024892@svn.freebsd.org> Author: des Date: Sun Aug 24 14:00:44 2014 New Revision: 270459 URL: http://svnweb.freebsd.org/changeset/base/270459 Log: MFH (r270458): print numeric file mode unless -r was specified Modified: stable/9/usr.bin/kdump/kdump.c Directory Properties: stable/9/usr.bin/kdump/ (props changed) Modified: stable/9/usr.bin/kdump/kdump.c ============================================================================== --- stable/9/usr.bin/kdump/kdump.c Sun Aug 24 13:03:51 2014 (r270458) +++ stable/9/usr.bin/kdump/kdump.c Sun Aug 24 14:00:44 2014 (r270459) @@ -1522,10 +1522,15 @@ ktrstat(struct stat *statp) * buffer exactly sizeof(struct stat) bytes long. */ printf("struct stat {"); - strmode(statp->st_mode, mode); - printf("dev=%ju, ino=%ju, mode=%s, nlink=%ju, ", - (uintmax_t)statp->st_dev, (uintmax_t)statp->st_ino, mode, - (uintmax_t)statp->st_nlink); + printf("dev=%ju, ino=%ju, ", + (uintmax_t)statp->st_dev, (uintmax_t)statp->st_ino); + if (resolv == 0) + printf("mode=0%jo, ", (uintmax_t)statp->st_mode); + else { + strmode(statp->st_mode, mode); + printf("mode=%s, ", mode); + } + printf("nlink=%ju, ", (uintmax_t)statp->st_nlink); if (resolv == 0 || (pwd = getpwuid(statp->st_uid)) == NULL) printf("uid=%ju, ", (uintmax_t)statp->st_uid); else From des at FreeBSD.org Sun Aug 24 14:04:21 2014 From: des at FreeBSD.org (Dag-Erling Smørgrav) Date: Sun, 24 Aug 2014 14:04:20 +0000 (UTC) Subject: svn commit: r270460 - stable/10/lib/libfetch Message-ID: <201408241404.s7OE4K20026253@svn.freebsd.org> Author: des Date: Sun Aug 24 14:04:20 2014 New Revision: 270460 URL: http://svnweb.freebsd.org/changeset/base/270460 Log: MFH (r267127): don't send User-Agent if HTTP_USER_AGENT is empty Modified: stable/10/lib/libfetch/fetch.3 stable/10/lib/libfetch/http.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libfetch/fetch.3 ============================================================================== --- stable/10/lib/libfetch/fetch.3 Sun Aug 24 14:00:44 2014 (r270459) +++ stable/10/lib/libfetch/fetch.3 Sun Aug 24 14:04:20 2014 (r270460) @@ -627,6 +627,7 @@ the document URL will be used as referre Specifies the User-Agent string to use for HTTP requests. This can be useful when working with HTTP origin or proxy servers that differentiate between user agents. +If defined but empty, no User-Agent header is sent. .It Ev NETRC Specifies a file to use instead of .Pa ~/.netrc Modified: stable/10/lib/libfetch/http.c ============================================================================== --- stable/10/lib/libfetch/http.c Sun Aug 24 14:00:44 2014 (r270459) +++ stable/10/lib/libfetch/http.c Sun Aug 24 14:04:20 2014 (r270460) @@ -1693,10 +1693,15 @@ http_request_body(struct url *URL, const else http_cmd(conn, "Referer: %s", p); } - if ((p = getenv("HTTP_USER_AGENT")) != NULL && *p != '\0') - http_cmd(conn, "User-Agent: %s", p); - else - http_cmd(conn, "User-Agent: %s " _LIBFETCH_VER, getprogname()); + if ((p = getenv("HTTP_USER_AGENT")) != NULL) { + /* no User-Agent if defined but empty */ + if (*p != '\0') + http_cmd(conn, "User-Agent: %s", p); + } else { + /* default User-Agent */ + http_cmd(conn, "User-Agent: %s " _LIBFETCH_VER, + getprogname()); + } if (url->offset > 0) http_cmd(conn, "Range: bytes=%lld-", (long long)url->offset); http_cmd(conn, "Connection: close"); From des at FreeBSD.org Sun Aug 24 14:04:25 2014 From: des at FreeBSD.org (Dag-Erling Smørgrav) Date: Sun, 24 Aug 2014 14:04:24 +0000 (UTC) Subject: svn commit: r270461 - stable/9/lib/libfetch Message-ID: <201408241404.s7OE4ORp026306@svn.freebsd.org> Author: des Date: Sun Aug 24 14:04:23 2014 New Revision: 270461 URL: http://svnweb.freebsd.org/changeset/base/270461 Log: MFH (r267127): don't send User-Agent if HTTP_USER_AGENT is empty Modified: stable/9/lib/libfetch/fetch.3 stable/9/lib/libfetch/http.c Directory Properties: stable/9/lib/libfetch/ (props changed) Modified: stable/9/lib/libfetch/fetch.3 ============================================================================== --- stable/9/lib/libfetch/fetch.3 Sun Aug 24 14:04:20 2014 (r270460) +++ stable/9/lib/libfetch/fetch.3 Sun Aug 24 14:04:23 2014 (r270461) @@ -627,6 +627,7 @@ the document URL will be used as referre Specifies the User-Agent string to use for HTTP requests. This can be useful when working with HTTP origin or proxy servers that differentiate between user agents. +If defined but empty, no User-Agent header is sent. .It Ev NETRC Specifies a file to use instead of .Pa ~/.netrc Modified: stable/9/lib/libfetch/http.c ============================================================================== --- stable/9/lib/libfetch/http.c Sun Aug 24 14:04:20 2014 (r270460) +++ stable/9/lib/libfetch/http.c Sun Aug 24 14:04:23 2014 (r270461) @@ -1693,10 +1693,15 @@ http_request_body(struct url *URL, const else http_cmd(conn, "Referer: %s", p); } - if ((p = getenv("HTTP_USER_AGENT")) != NULL && *p != '\0') - http_cmd(conn, "User-Agent: %s", p); - else - http_cmd(conn, "User-Agent: %s " _LIBFETCH_VER, getprogname()); + if ((p = getenv("HTTP_USER_AGENT")) != NULL) { + /* no User-Agent if defined but empty */ + if (*p != '\0') + http_cmd(conn, "User-Agent: %s", p); + } else { + /* default User-Agent */ + http_cmd(conn, "User-Agent: %s " _LIBFETCH_VER, + getprogname()); + } if (url->offset > 0) http_cmd(conn, "Range: bytes=%lld-", (long long)url->offset); http_cmd(conn, "Connection: close"); From gjb at FreeBSD.org Sun Aug 24 14:21:08 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 14:21:08 +0000 (UTC) Subject: svn commit: r270462 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241421.s7OEL8Ow034663@svn.freebsd.org> Author: gjb Date: Sun Aug 24 14:21:08 2014 New Revision: 270462 URL: http://svnweb.freebsd.org/changeset/base/270462 Log: Document r262855, ATF updated to 0.20. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:04:23 2014 (r270461) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:08 2014 (r270462) @@ -301,6 +301,9 @@ To use a non-default location, set rctl_rules in &man.rc.conf.5; to the location of the file. + The ATF test + suite has been updated to version 0.20. + The &man.ps.1; utility has been updated to include the -J flag, used to filter output by matching &man.jail.8; IDs and names. From gjb at FreeBSD.org Sun Aug 24 14:21:12 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 14:21:12 +0000 (UTC) Subject: svn commit: r270464 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241421.s7OELC8L034757@svn.freebsd.org> Author: gjb Date: Sun Aug 24 14:21:11 2014 New Revision: 270464 URL: http://svnweb.freebsd.org/changeset/base/270464 Log: Document r262967, MegaRAID Fury support in mfi(4). Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:10 2014 (r270463) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:11 2014 (r270464) @@ -151,6 +151,9 @@ during boot, or add kern.vty=vt to &man.loader.conf.5; and reboot the system. + Support for MegaRAID Fury cards has been + added to the &man.mfi.4; driver. + The &man.mpr.4; device has been added, providing support for LSI Fusion-MPT 3 12Gb SCSI/SATA From gjb at FreeBSD.org Sun Aug 24 14:21:10 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 14:21:10 +0000 (UTC) Subject: svn commit: r270463 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241421.s7OELA17034708@svn.freebsd.org> Author: gjb Date: Sun Aug 24 14:21:10 2014 New Revision: 270463 URL: http://svnweb.freebsd.org/changeset/base/270463 Log: Document r262861, vt(4) merged from head/. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:08 2014 (r270462) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:10 2014 (r270463) @@ -145,6 +145,12 @@ The &man.virtio_scsi.4; driver has been updated to support unmapped I/O. + The &man.vt.4; driver has been merged + from &os;-CURRENT. To enable &man.vt.4;, enter + set kern.vty=vt at the &man.loader.8; prompt + during boot, or add kern.vty=vt to + &man.loader.conf.5; and reboot the system. + The &man.mpr.4; device has been added, providing support for LSI Fusion-MPT 3 12Gb SCSI/SATA From gjb at FreeBSD.org Sun Aug 24 14:21:16 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 14:21:16 +0000 (UTC) Subject: svn commit: r270466 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241421.s7OELGsG034844@svn.freebsd.org> Author: gjb Date: Sun Aug 24 14:21:15 2014 New Revision: 270466 URL: http://svnweb.freebsd.org/changeset/base/270466 Log: Document r263020, pkg(7) synced with head/. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:13 2014 (r270465) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:15 2014 (r270466) @@ -317,6 +317,9 @@ (Unified Configuration Library) has been merged from &os;-CURRENT. + The &man.pkg.7; bootstrapping utility has + been synced with the version in &os;-CURRENT. + The &man.ps.1; utility has been updated to include the -J flag, used to filter output by matching &man.jail.8; IDs and names. From gjb at FreeBSD.org Sun Aug 24 14:21:14 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 14:21:14 +0000 (UTC) Subject: svn commit: r270465 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241421.s7OELEx3034799@svn.freebsd.org> Author: gjb Date: Sun Aug 24 14:21:13 2014 New Revision: 270465 URL: http://svnweb.freebsd.org/changeset/base/270465 Log: Document r263019, libucl merged from head/. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:11 2014 (r270464) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:13 2014 (r270465) @@ -313,6 +313,10 @@ The ATF test suite has been updated to version 0.20. + The libucl library + (Unified Configuration Library) has been merged from + &os;-CURRENT. + The &man.ps.1; utility has been updated to include the -J flag, used to filter output by matching &man.jail.8; IDs and names. From gjb at FreeBSD.org Sun Aug 24 14:21:18 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 14:21:17 +0000 (UTC) Subject: svn commit: r270467 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241421.s7OELHnZ034892@svn.freebsd.org> Author: gjb Date: Sun Aug 24 14:21:17 2014 New Revision: 270467 URL: http://svnweb.freebsd.org/changeset/base/270467 Log: Document r263024, aacraid updated to version 3.2.5. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:15 2014 (r270466) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:17 2014 (r270467) @@ -154,6 +154,9 @@ Support for MegaRAID Fury cards has been added to the &man.mfi.4; driver. + The &man.aacraid.4; driver has been + updated to version 3.2.5. + The &man.mpr.4; device has been added, providing support for LSI Fusion-MPT 3 12Gb SCSI/SATA From gjb at FreeBSD.org Sun Aug 24 14:21:20 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 14:21:19 +0000 (UTC) Subject: svn commit: r270468 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241421.s7OELJso034935@svn.freebsd.org> Author: gjb Date: Sun Aug 24 14:21:19 2014 New Revision: 270468 URL: http://svnweb.freebsd.org/changeset/base/270468 Log: Document r263028, endianness-awareness in services_mkdb(8). Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:17 2014 (r270467) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:19 2014 (r270468) @@ -385,8 +385,11 @@ Release Engineering and Integration -   - + The &man.services.mkdb.8; utility has + been updated to include endianness awareness, allowing the + services.db database to be created as + part of the release build, regardless of native- or + cross-built releases. From gjb at FreeBSD.org Sun Aug 24 14:21:22 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 14:21:21 +0000 (UTC) Subject: svn commit: r270469 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241421.s7OELLS1034979@svn.freebsd.org> Author: gjb Date: Sun Aug 24 14:21:21 2014 New Revision: 270469 URL: http://svnweb.freebsd.org/changeset/base/270469 Log: Document r263046, tzdata2014a. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:19 2014 (r270468) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:21 2014 (r270469) @@ -323,6 +323,9 @@ The &man.pkg.7; bootstrapping utility has been synced with the version in &os;-CURRENT. + The timezone database has been updated to + version tzdata2014a. + The &man.ps.1; utility has been updated to include the -J flag, used to filter output by matching &man.jail.8; IDs and names. From gjb at FreeBSD.org Sun Aug 24 14:21:23 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 14:21:23 +0000 (UTC) Subject: svn commit: r270470 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241421.s7OELNFe035120@svn.freebsd.org> Author: gjb Date: Sun Aug 24 14:21:23 2014 New Revision: 270470 URL: http://svnweb.freebsd.org/changeset/base/270470 Log: Document r263122, hwpmc(4) support for PowerPC 970-class processors. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:21 2014 (r270469) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:23 2014 (r270470) @@ -157,6 +157,9 @@ The &man.aacraid.4; driver has been updated to version 3.2.5. + Support for &man.hwpmc.4; has been added + for &powerpc; 970 class processors. + The &man.mpr.4; device has been added, providing support for LSI Fusion-MPT 3 12Gb SCSI/SATA From gjb at FreeBSD.org Sun Aug 24 14:21:38 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 14:21:38 +0000 (UTC) Subject: svn commit: r270478 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241421.s7OELcn6035737@svn.freebsd.org> Author: gjb Date: Sun Aug 24 14:21:38 2014 New Revision: 270478 URL: http://svnweb.freebsd.org/changeset/base/270478 Log: Update lldb(1) version to reflect r263369. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:36 2014 (r270477) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:38 2014 (r270478) @@ -382,9 +382,9 @@ The &man.xz.1; utility has been updated to a post-5.0.5 snapshot. - The &man.lldb.1; debugging library has - been updated to the r196259 snapshot. + been updated to the r196322 snapshot. OpenSSH has been updated to version 6.6p1. From gjb at FreeBSD.org Sun Aug 24 14:21:25 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 14:21:25 +0000 (UTC) Subject: svn commit: r270471 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241421.s7OELP5S035211@svn.freebsd.org> Author: gjb Date: Sun Aug 24 14:21:25 2014 New Revision: 270471 URL: http://svnweb.freebsd.org/changeset/base/270471 Log: Document r263197, iicbus support for ADT7460/ADT7467 fan controllers. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:23 2014 (r270470) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:25 2014 (r270471) @@ -160,6 +160,11 @@ Support for &man.hwpmc.4; has been added for &powerpc; 970 class processors. + Support for ADT7460 and ADT7467 fan + controllers found in newer PowerBooks ™ and + iBooks ™ has been added to the &man.iicbus.4; + driver. + The &man.mpr.4; device has been added, providing support for LSI Fusion-MPT 3 12Gb SCSI/SATA From gjb at FreeBSD.org Sun Aug 24 14:21:37 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 14:21:36 +0000 (UTC) Subject: svn commit: r270477 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241421.s7OELaef035486@svn.freebsd.org> Author: gjb Date: Sun Aug 24 14:21:36 2014 New Revision: 270477 URL: http://svnweb.freebsd.org/changeset/base/270477 Log: Update lldb(1) version to reflect r263367. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:34 2014 (r270476) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:36 2014 (r270477) @@ -382,9 +382,9 @@ The &man.xz.1; utility has been updated to a post-5.0.5 snapshot. - The &man.lldb.1; debugging library has - been updated to the r194122 snapshot. + been updated to the r196259 snapshot. OpenSSH has been updated to version 6.6p1. From gjb at FreeBSD.org Sun Aug 24 14:21:42 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 14:21:42 +0000 (UTC) Subject: svn commit: r270480 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241421.s7OELgJ8036192@svn.freebsd.org> Author: gjb Date: Sun Aug 24 14:21:41 2014 New Revision: 270480 URL: http://svnweb.freebsd.org/changeset/base/270480 Log: Document r263405, 'zfs list' '-p' flag. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:40 2014 (r270479) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:41 2014 (r270480) @@ -342,6 +342,11 @@ which allows use of zfs list -t snap and zfs snap. + The &man.zfs.8; userland utility has been + updated to include a new flag to zfs list, + -p, which when specified, prints the output + in a parsable format. + The &man.ps.1; utility has been updated to include the -J flag, used to filter output by matching &man.jail.8; IDs and names. From gjb at FreeBSD.org Sun Aug 24 14:21:33 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 14:21:33 +0000 (UTC) Subject: svn commit: r270475 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241421.s7OELXqS035396@svn.freebsd.org> Author: gjb Date: Sun Aug 24 14:21:32 2014 New Revision: 270475 URL: http://svnweb.freebsd.org/changeset/base/270475 Log: Add sponsor attribution for r263363. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:30 2014 (r270474) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:32 2014 (r270475) @@ -382,7 +382,8 @@ The &man.xz.1; utility has been updated to a post-5.0.5 snapshot. - The &man.lldb.1; debugging library has + The &man.lldb.1; debugging library has been updated to the r194122 snapshot. OpenSSH has From gjb at FreeBSD.org Sun Aug 24 14:21:27 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 14:21:27 +0000 (UTC) Subject: svn commit: r270472 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241421.s7OELRgb035262@svn.freebsd.org> Author: gjb Date: Sun Aug 24 14:21:27 2014 New Revision: 270472 URL: http://svnweb.freebsd.org/changeset/base/270472 Log: Document r263256, fixed panic on urtwn(4) removal. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:25 2014 (r270471) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:27 2014 (r270472) @@ -165,6 +165,9 @@ iBooks ™ has been added to the &man.iicbus.4; driver. + A panic triggered by removing + a &man.urtwn.4; device has been fixed. + The &man.mpr.4; device has been added, providing support for LSI Fusion-MPT 3 12Gb SCSI/SATA From gjb at FreeBSD.org Sun Aug 24 14:21:46 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 14:21:46 +0000 (UTC) Subject: svn commit: r270482 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241421.s7OELkhf036290@svn.freebsd.org> Author: gjb Date: Sun Aug 24 14:21:45 2014 New Revision: 270482 URL: http://svnweb.freebsd.org/changeset/base/270482 Log: Document r263407, zfs bookmarks. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:43 2014 (r270481) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:45 2014 (r270482) @@ -303,6 +303,10 @@ has been added to the &man.fsck.ffs.8; utility. When used, &man.fsck.ffs.8; will restart itself when too many critical errors have been detected. + + The &man.zfs.8; filesystem has been + updated to implement bookmarks. See + &man.zfs.8; for further details. From gjb at FreeBSD.org Sun Aug 24 14:21:44 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 14:21:44 +0000 (UTC) Subject: svn commit: r270481 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241421.s7OELi8T036244@svn.freebsd.org> Author: gjb Date: Sun Aug 24 14:21:43 2014 New Revision: 270481 URL: http://svnweb.freebsd.org/changeset/base/270481 Log: Move timezone database update to 'contrib'. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:41 2014 (r270480) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:43 2014 (r270481) @@ -334,9 +334,6 @@ The &man.pkg.7; bootstrapping utility has been synced with the version in &os;-CURRENT. - The timezone database has been updated to - version tzdata2014a. - The &man.zfs.8; userland utility has been updated to include aliases for snapshot, which allows use of zfs list -t snap and @@ -389,6 +386,9 @@ Contributed Software + The timezone database has been updated to + version tzdata2014a. + The &man.xz.1; utility has been updated to a post-5.0.5 snapshot. From gjb at FreeBSD.org Sun Aug 24 14:21:29 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 14:21:29 +0000 (UTC) Subject: svn commit: r270473 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241421.s7OELTv4035310@svn.freebsd.org> Author: gjb Date: Sun Aug 24 14:21:28 2014 New Revision: 270473 URL: http://svnweb.freebsd.org/changeset/base/270473 Log: Document r263285, xz(1) update. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:27 2014 (r270472) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:28 2014 (r270473) @@ -379,6 +379,9 @@ Contributed Software + The &man.xz.1; utility has been updated + to a post-5.0.5 snapshot. + OpenSSH has been updated to version 6.6p1. From gjb at FreeBSD.org Sun Aug 24 14:21:48 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 14:21:47 +0000 (UTC) Subject: svn commit: r270483 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241421.s7OELloU036335@svn.freebsd.org> Author: gjb Date: Sun Aug 24 14:21:47 2014 New Revision: 270483 URL: http://svnweb.freebsd.org/changeset/base/270483 Log: Document r263508, clang/llvm update to 3.4. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:45 2014 (r270482) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:47 2014 (r270483) @@ -348,6 +348,9 @@ -p, which when specified, prints the output in a parsable format. + The &man.clang.1;/llvm suite has been + updated to version 3.4. + The &man.ps.1; utility has been updated to include the -J flag, used to filter output by matching &man.jail.8; IDs and names. From gjb at FreeBSD.org Sun Aug 24 14:21:31 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 14:21:31 +0000 (UTC) Subject: svn commit: r270474 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241421.s7OELVnT035354@svn.freebsd.org> Author: gjb Date: Sun Aug 24 14:21:30 2014 New Revision: 270474 URL: http://svnweb.freebsd.org/changeset/base/270474 Log: Document r263363, lldb update. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:28 2014 (r270473) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:30 2014 (r270474) @@ -382,6 +382,9 @@ The &man.xz.1; utility has been updated to a post-5.0.5 snapshot. + The &man.lldb.1; debugging library has + been updated to the r194122 snapshot. + OpenSSH has been updated to version 6.6p1. From gjb at FreeBSD.org Sun Aug 24 14:21:35 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 14:21:34 +0000 (UTC) Subject: svn commit: r270476 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241421.s7OELYMD035444@svn.freebsd.org> Author: gjb Date: Sun Aug 24 14:21:34 2014 New Revision: 270476 URL: http://svnweb.freebsd.org/changeset/base/270476 Log: Remove space between product and trademark. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:32 2014 (r270475) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:34 2014 (r270476) @@ -161,8 +161,8 @@ for &powerpc; 970 class processors. Support for ADT7460 and ADT7467 fan - controllers found in newer PowerBooks ™ and - iBooks ™ has been added to the &man.iicbus.4; + controllers found in newer PowerBooks™ and + iBooks™ has been added to the &man.iicbus.4; driver. A panic triggered by removing From gjb at FreeBSD.org Sun Aug 24 14:21:40 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 14:21:40 +0000 (UTC) Subject: svn commit: r270479 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241421.s7OELeIk036130@svn.freebsd.org> Author: gjb Date: Sun Aug 24 14:21:40 2014 New Revision: 270479 URL: http://svnweb.freebsd.org/changeset/base/270479 Log: Document r263403, alises for 'zfs snap' and 'zfs list -t snap' Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:38 2014 (r270478) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:21:40 2014 (r270479) @@ -337,6 +337,11 @@ The timezone database has been updated to version tzdata2014a. + The &man.zfs.8; userland utility has been + updated to include aliases for snapshot, + which allows use of zfs list -t snap and + zfs snap. + The &man.ps.1; utility has been updated to include the -J flag, used to filter output by matching &man.jail.8; IDs and names. From des at FreeBSD.org Sun Aug 24 14:25:45 2014 From: des at FreeBSD.org (Dag-Erling Smørgrav) Date: Sun, 24 Aug 2014 14:25:44 +0000 (UTC) Subject: svn commit: r270484 - in stable/10: gnu/lib/libgcc share/mk Message-ID: <201408241425.s7OEPiqN037544@svn.freebsd.org> Author: des Date: Sun Aug 24 14:25:44 2014 New Revision: 270484 URL: http://svnweb.freebsd.org/changeset/base/270484 Log: MFH (r264367): add RANLIBFLAGS and set timestamps in static libraries to 0 Modified: stable/10/gnu/lib/libgcc/Makefile stable/10/share/mk/bsd.lib.mk stable/10/share/mk/sys.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/gnu/lib/libgcc/Makefile ============================================================================== --- stable/10/gnu/lib/libgcc/Makefile Sun Aug 24 14:21:47 2014 (r270483) +++ stable/10/gnu/lib/libgcc/Makefile Sun Aug 24 14:25:44 2014 (r270484) @@ -352,7 +352,7 @@ libgcc_eh.a: ${EH_OBJS_T} @${ECHO} building static gcc_eh library @rm -f ${.TARGET} @${AR} ${ARFLAGS} ${.TARGET} `lorder ${EH_OBJS_T} | tsort -q` - ${RANLIB} ${.TARGET} + ${RANLIB} ${RANLIBFLAGS} ${.TARGET} all: libgcc_eh.a @@ -361,7 +361,7 @@ libgcc_eh_p.a: ${EH_OBJS_P} @${ECHO} building profiled gcc_eh library @rm -f ${.TARGET} @${AR} ${ARFLAGS} ${.TARGET} `lorder ${EH_OBJS_P} | tsort -q` - ${RANLIB} ${.TARGET} + ${RANLIB} ${RANLIBFLAGS} ${.TARGET} all: libgcc_eh_p.a .endif Modified: stable/10/share/mk/bsd.lib.mk ============================================================================== --- stable/10/share/mk/bsd.lib.mk Sun Aug 24 14:21:47 2014 (r270483) +++ stable/10/share/mk/bsd.lib.mk Sun Aug 24 14:25:44 2014 (r270484) @@ -173,7 +173,7 @@ lib${LIB}.a: ${OBJS} ${STATICOBJS} .else @${AR} ${ARFLAGS} ${.TARGET} `NM='${NM}' lorder ${OBJS} ${STATICOBJS} | tsort -q` ${ARADD} .endif - ${RANLIB} ${.TARGET} + ${RANLIB} ${RANLIBFLAGS} ${.TARGET} .endif .if !defined(INTERNALLIB) @@ -190,7 +190,7 @@ lib${LIB}_p.a: ${POBJS} .else @${AR} ${ARFLAGS} ${.TARGET} `NM='${NM}' lorder ${POBJS} | tsort -q` ${ARADD} .endif - ${RANLIB} ${.TARGET} + ${RANLIB} ${RANLIBFLAGS} ${.TARGET} .endif .if defined(SHLIB_NAME) || \ @@ -247,7 +247,7 @@ lib${LIB}_pic.a: ${SOBJS} @${ECHO} building special pic ${LIB} library @rm -f ${.TARGET} @${AR} ${ARFLAGS} ${.TARGET} ${SOBJS} ${ARADD} - ${RANLIB} ${.TARGET} + ${RANLIB} ${RANLIBFLAGS} ${.TARGET} .endif .if defined(WANT_LINT) && !defined(NO_LINT) && defined(LIB) && !empty(LIB) Modified: stable/10/share/mk/sys.mk ============================================================================== --- stable/10/share/mk/sys.mk Sun Aug 24 14:21:47 2014 (r270483) +++ stable/10/share/mk/sys.mk Sun Aug 24 14:25:44 2014 (r270484) @@ -39,9 +39,12 @@ AR ?= ar .if defined(%POSIX) ARFLAGS ?= -rv .else -ARFLAGS ?= cru +ARFLAGS ?= -crD .endif RANLIB ?= ranlib +.if !defined(%POSIX) +RANLIBFLAGS ?= -D +.endif AS ?= as AFLAGS ?= From gjb at FreeBSD.org Sun Aug 24 15:04:46 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 15:04:46 +0000 (UTC) Subject: svn commit: r270486 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241504.s7OF4kUp056699@svn.freebsd.org> Author: gjb Date: Sun Aug 24 15:04:46 2014 New Revision: 270486 URL: http://svnweb.freebsd.org/changeset/base/270486 Log: Document r263783, support for $2b$ format in the Blowfish password format. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 14:39:33 2014 (r270485) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 15:04:46 2014 (r270486) @@ -351,6 +351,11 @@ The &man.clang.1;/llvm suite has been updated to version 3.4. + The Blowfish password format + implementation updated. Support for $2b$ has + been added, allowing use of passwords greater than 256 + characters long. + The &man.ps.1; utility has been updated to include the -J flag, used to filter output by matching &man.jail.8; IDs and names. From gjb at FreeBSD.org Sun Aug 24 15:04:48 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 15:04:48 +0000 (UTC) Subject: svn commit: r270487 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241504.s7OF4mF1056744@svn.freebsd.org> Author: gjb Date: Sun Aug 24 15:04:48 2014 New Revision: 270487 URL: http://svnweb.freebsd.org/changeset/base/270487 Log: Document r263799, deadlock fix in usb(4). Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 15:04:46 2014 (r270486) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 15:04:48 2014 (r270487) @@ -168,6 +168,10 @@ A panic triggered by removing a &man.urtwn.4; device has been fixed. + A potential deadlock in the &man.usb.4; + stack triggered by detaching USB devices that create character + devices has been fixed. + The &man.mpr.4; device has been added, providing support for LSI Fusion-MPT 3 12Gb SCSI/SATA From gjb at FreeBSD.org Sun Aug 24 15:04:50 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 15:04:50 +0000 (UTC) Subject: svn commit: r270488 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241504.s7OF4oJl056789@svn.freebsd.org> Author: gjb Date: Sun Aug 24 15:04:49 2014 New Revision: 270488 URL: http://svnweb.freebsd.org/changeset/base/270488 Log: Document r263869, amdtemp(4) support for AMD Family 16h sensor devices. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 15:04:48 2014 (r270487) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 15:04:49 2014 (r270488) @@ -172,6 +172,9 @@ stack triggered by detaching USB devices that create character devices has been fixed. + Support for &amd; Family 16h sensor + devices has been added to &man.amdtemp.4;. + The &man.mpr.4; device has been added, providing support for LSI Fusion-MPT 3 12Gb SCSI/SATA From gjb at FreeBSD.org Sun Aug 24 15:04:54 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 15:04:54 +0000 (UTC) Subject: svn commit: r270490 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241504.s7OF4sX6056875@svn.freebsd.org> Author: gjb Date: Sun Aug 24 15:04:53 2014 New Revision: 270490 URL: http://svnweb.freebsd.org/changeset/base/270490 Log: Document r264438, looser ifconfig_IF_aliasN definition requirements. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 15:04:51 2014 (r270489) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 15:04:53 2014 (r270490) @@ -397,8 +397,14 @@ <filename>/etc/rc.d</filename> Scripts -   - + The network.subr + &man.rc.8; script has been updated to loosen the requirement + of listing network aliases in numeric order. Previously, + a network alias of + _alias2 + would not be created if + _alias1 was + not defined. From gjb at FreeBSD.org Sun Aug 24 15:04:58 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 15:04:57 +0000 (UTC) Subject: svn commit: r270492 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241504.s7OF4vYd056967@svn.freebsd.org> Author: gjb Date: Sun Aug 24 15:04:57 2014 New Revision: 270492 URL: http://svnweb.freebsd.org/changeset/base/270492 Log: Document r264522, LUN-based changer support removed from cd(4). Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 15:04:55 2014 (r270491) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 15:04:57 2014 (r270492) @@ -175,6 +175,9 @@ Support for &amd; Family 16h sensor devices has been added to &man.amdtemp.4;. + Support for LUN-based CD changers has been + removed from the &man.cd.4; driver. + The &man.mpr.4; device has been added, providing support for LSI Fusion-MPT 3 12Gb SCSI/SATA From gjb at FreeBSD.org Sun Aug 24 15:04:52 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 15:04:52 +0000 (UTC) Subject: svn commit: r270489 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241504.s7OF4qAc056831@svn.freebsd.org> Author: gjb Date: Sun Aug 24 15:04:51 2014 New Revision: 270489 URL: http://svnweb.freebsd.org/changeset/base/270489 Log: Document r263906, tzdata2014b. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 15:04:49 2014 (r270488) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 15:04:51 2014 (r270489) @@ -405,9 +405,6 @@ Contributed Software - The timezone database has been updated to - version tzdata2014a. - The &man.xz.1; utility has been updated to a post-5.0.5 snapshot. @@ -415,6 +412,9 @@ sponsor="&darpa_afrl;">The &man.lldb.1; debugging library has been updated to the r196322 snapshot. + The timezone database has been updated to + version tzdata2014b. + OpenSSH has been updated to version 6.6p1. From gjb at FreeBSD.org Sun Aug 24 15:04:56 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 15:04:56 +0000 (UTC) Subject: svn commit: r270491 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241504.s7OF4uEb056920@svn.freebsd.org> Author: gjb Date: Sun Aug 24 15:04:55 2014 New Revision: 270491 URL: http://svnweb.freebsd.org/changeset/base/270491 Log: Document r264497, iconv(3) update. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 15:04:53 2014 (r270490) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 15:04:55 2014 (r270491) @@ -363,6 +363,9 @@ been added, allowing use of passwords greater than 256 characters long. + The &man.iconv.3; library has been + updated to match NetBSD, providing several bug fixes. + The &man.ps.1; utility has been updated to include the -J flag, used to filter output by matching &man.jail.8; IDs and names. From gjb at FreeBSD.org Sun Aug 24 15:59:34 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 15:59:34 +0000 (UTC) Subject: svn commit: r270493 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241559.s7OFxYld081389@svn.freebsd.org> Author: gjb Date: Sun Aug 24 15:59:33 2014 New Revision: 270493 URL: http://svnweb.freebsd.org/changeset/base/270493 Log: Document r264734, 9th gen HP HBA support in ciss(4). Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 15:04:57 2014 (r270492) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 15:59:33 2014 (r270493) @@ -178,6 +178,9 @@ Support for LUN-based CD changers has been removed from the &man.cd.4; driver. + Support for 9th generation HP host bus + adapter cards has been added to &man.ciss.4;. + The &man.mpr.4; device has been added, providing support for LSI Fusion-MPT 3 12Gb SCSI/SATA From gjb at FreeBSD.org Sun Aug 24 15:59:38 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 15:59:37 +0000 (UTC) Subject: svn commit: r270495 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241559.s7OFxbHj081483@svn.freebsd.org> Author: gjb Date: Sun Aug 24 15:59:37 2014 New Revision: 270495 URL: http://svnweb.freebsd.org/changeset/base/270495 Log: Document r264911, nc(1) update. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 15:59:35 2014 (r270494) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 15:59:37 2014 (r270495) @@ -443,6 +443,9 @@ OpenSSH has been updated to version 6.6p1. + The &man.nc.1; utility has been updated + to match the version in OpenBSD 5.5. + Sendmail has been updated to 8.14.9. From gjb at FreeBSD.org Sun Aug 24 15:59:40 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 15:59:39 +0000 (UTC) Subject: svn commit: r270496 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241559.s7OFxdPr081528@svn.freebsd.org> Author: gjb Date: Sun Aug 24 15:59:39 2014 New Revision: 270496 URL: http://svnweb.freebsd.org/changeset/base/270496 Log: Document r265067, loaderdev= u-boot env variable. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 15:59:37 2014 (r270495) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 15:59:39 2014 (r270496) @@ -227,6 +227,12 @@ The WANDBOARD kernel configuration file has been added. + Boot devices may now be specified by + setting a u-boot environment variable. If a boot device is + not specified, the probe mechanism will be used. To specify + the boot device, set the + loaderdev=device + u-boot environment variable. From gjb at FreeBSD.org Sun Aug 24 15:59:36 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 15:59:35 +0000 (UTC) Subject: svn commit: r270494 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241559.s7OFxZmS081436@svn.freebsd.org> Author: gjb Date: Sun Aug 24 15:59:35 2014 New Revision: 270494 URL: http://svnweb.freebsd.org/changeset/base/270494 Log: Document r264866, tx/rx multi-queue support in vmx(4). Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 15:59:33 2014 (r270493) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 15:59:35 2014 (r270494) @@ -277,6 +277,16 @@ The &man.urndis.4; driver has been imported from OpenBSD. + + Support for multiple + transmitter/receiver queues has been added to the + &man.vmx.4; driver. + + + The &os; guest operating system must have + MSIX enabled as a prerequisite for + multiple queues. + From gjb at FreeBSD.org Sun Aug 24 16:26:04 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 16:26:03 +0000 (UTC) Subject: svn commit: r270497 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241626.s7OGQ323095927@svn.freebsd.org> Author: gjb Date: Sun Aug 24 16:26:03 2014 New Revision: 270497 URL: http://svnweb.freebsd.org/changeset/base/270497 Log: Document r265265, date(1) -R flag. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 15:59:39 2014 (r270496) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 16:26:03 2014 (r270497) @@ -388,6 +388,10 @@ The &man.iconv.3; library has been updated to match NetBSD, providing several bug fixes. + The &man.date.1; utility has been updated + to include a new flag, -R, which prints the + date and time output as specified in RFC 2822. + The &man.ps.1; utility has been updated to include the -J flag, used to filter output by matching &man.jail.8; IDs and names. From gjb at FreeBSD.org Sun Aug 24 16:26:07 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 16:26:07 +0000 (UTC) Subject: svn commit: r270499 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241626.s7OGQ7tQ096020@svn.freebsd.org> Author: gjb Date: Sun Aug 24 16:26:07 2014 New Revision: 270499 URL: http://svnweb.freebsd.org/changeset/base/270499 Log: Document r265533, bc(1) update. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 16:26:05 2014 (r270498) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 16:26:07 2014 (r270499) @@ -396,6 +396,9 @@ to include a new flag, -R, which prints the date and time output as specified in RFC 2822. + The &man.bc.1; utility has been updated to + version 1.1, in sync with the version in OpenBSD. + The &man.ps.1; utility has been updated to include the -J flag, used to filter output by matching &man.jail.8; IDs and names. From gjb at FreeBSD.org Sun Aug 24 16:26:05 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 16:26:05 +0000 (UTC) Subject: svn commit: r270498 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241626.s7OGQ5Ct095976@svn.freebsd.org> Author: gjb Date: Sun Aug 24 16:26:05 2014 New Revision: 270498 URL: http://svnweb.freebsd.org/changeset/base/270498 Log: Document r265345, Asus USB-N10 NANO support in urtwn(4). Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 16:26:03 2014 (r270497) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 16:26:05 2014 (r270498) @@ -293,6 +293,10 @@ MSIX enabled as a prerequisite for multiple queues. + + Support for the ASUS USB-N10 Nano + wireless card has been added to the &man.urtwn.4; + driver. From gjb at FreeBSD.org Sun Aug 24 16:26:09 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 16:26:09 +0000 (UTC) Subject: svn commit: r270500 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241626.s7OGQ91d096065@svn.freebsd.org> Author: gjb Date: Sun Aug 24 16:26:08 2014 New Revision: 270500 URL: http://svnweb.freebsd.org/changeset/base/270500 Log: Document r265536, GEOM_VINUM can be built both as a module or directly into the kernel. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 16:26:07 2014 (r270499) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 16:26:08 2014 (r270500) @@ -186,6 +186,10 @@ providing support for LSI Fusion-MPT 3 12Gb SCSI/SATA controllers. + The GEOM_VINUM option + is now able to be built both directly into the kernel or as + a &man.kldload.8; loadable module. + The &man.mrsas.4; driver has been added, providing support for LSI MegaRAID SAS controllers. The From gjb at FreeBSD.org Sun Aug 24 16:26:11 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 16:26:11 +0000 (UTC) Subject: svn commit: r270501 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241626.s7OGQBGF096110@svn.freebsd.org> Author: gjb Date: Sun Aug 24 16:26:10 2014 New Revision: 270501 URL: http://svnweb.freebsd.org/changeset/base/270501 Log: Document r265604, pmcstat(8) '-a' flag. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 16:26:08 2014 (r270500) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 16:26:10 2014 (r270501) @@ -403,6 +403,11 @@ The &man.bc.1; utility has been updated to version 1.1, in sync with the version in OpenBSD. + The &man.pmcstat.8; utility has been + updated to include a new flag, -a, which when + specified, produces a full stack track on the sampled + points. + The &man.ps.1; utility has been updated to include the -J flag, used to filter output by matching &man.jail.8; IDs and names. From gjb at FreeBSD.org Sun Aug 24 16:26:15 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 16:26:14 +0000 (UTC) Subject: svn commit: r270503 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241626.s7OGQEit096205@svn.freebsd.org> Author: gjb Date: Sun Aug 24 16:26:14 2014 New Revision: 270503 URL: http://svnweb.freebsd.org/changeset/base/270503 Log: Document r265610, uslcom(4) update. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 16:26:12 2014 (r270502) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 16:26:14 2014 (r270503) @@ -190,6 +190,9 @@ is now able to be built both directly into the kernel or as a &man.kldload.8; loadable module. + The &man.uslcom.4; driver has been updated + to support 26 new devices. + The &man.mrsas.4; driver has been added, providing support for LSI MegaRAID SAS controllers. The From gjb at FreeBSD.org Sun Aug 24 16:26:13 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Sun, 24 Aug 2014 16:26:13 +0000 (UTC) Subject: svn commit: r270502 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408241626.s7OGQD8e096160@svn.freebsd.org> Author: gjb Date: Sun Aug 24 16:26:12 2014 New Revision: 270502 URL: http://svnweb.freebsd.org/changeset/base/270502 Log: Set vendor attribution for r265604. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 16:26:10 2014 (r270501) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Aug 24 16:26:12 2014 (r270502) @@ -403,7 +403,8 @@ The &man.bc.1; utility has been updated to version 1.1, in sync with the version in OpenBSD. - The &man.pmcstat.8; utility has been + The &man.pmcstat.8; utility has been updated to include a new flag, -a, which when specified, produces a full stack track on the sampled points. From bryanv at FreeBSD.org Sun Aug 24 19:31:27 2014 From: bryanv at FreeBSD.org (Bryan Venteicher) Date: Sun, 24 Aug 2014 19:31:26 +0000 (UTC) Subject: svn commit: r270509 - stable/10/sys/dev/virtio/network Message-ID: <201408241931.s7OJVQve089373@svn.freebsd.org> Author: bryanv Date: Sun Aug 24 19:31:26 2014 New Revision: 270509 URL: http://svnweb.freebsd.org/changeset/base/270509 Log: MFC r270063 (vtnet) The vtnet changes were not originally merged in r270252 since r268480 and r268481 had not been MFC'ed. Modified: stable/10/sys/dev/virtio/network/if_vtnet.c Modified: stable/10/sys/dev/virtio/network/if_vtnet.c ============================================================================== --- stable/10/sys/dev/virtio/network/if_vtnet.c Sun Aug 24 17:10:47 2014 (r270508) +++ stable/10/sys/dev/virtio/network/if_vtnet.c Sun Aug 24 19:31:26 2014 (r270509) @@ -287,6 +287,10 @@ static device_method_t vtnet_methods[] = DEVMETHOD_END }; +#ifdef DEV_NETMAP +#include +#endif /* DEV_NETMAP */ + static driver_t vtnet_driver = { "vtnet", vtnet_methods, @@ -393,6 +397,10 @@ vtnet_attach(device_t dev) goto fail; } +#ifdef DEV_NETMAP + vtnet_netmap_attach(sc); +#endif /* DEV_NETMAP */ + vtnet_start_taskqueues(sc); fail: @@ -422,6 +430,10 @@ vtnet_detach(device_t dev) ether_ifdetach(ifp); } +#ifdef DEV_NETMAP + netmap_detach(ifp); +#endif /* DEV_NETMAP */ + vtnet_free_taskqueues(sc); if (sc->vtnet_vlan_attach != NULL) { @@ -1733,6 +1745,12 @@ vtnet_rxq_eof(struct vtnet_rxq *rxq) VTNET_RXQ_LOCK_ASSERT(rxq); +#ifdef DEV_NETMAP + if (netmap_rx_irq(ifp, 0, &deq)) { + return (FALSE); + } +#endif /* DEV_NETMAP */ + while (count-- > 0) { m = virtqueue_dequeue(vq, &len); if (m == NULL) @@ -2419,6 +2437,13 @@ vtnet_txq_eof(struct vtnet_txq *txq) deq = 0; VTNET_TXQ_LOCK_ASSERT(txq); +#ifdef DEV_NETMAP + if (netmap_tx_irq(txq->vtntx_sc->vtnet_ifp, txq->vtntx_id)) { + virtqueue_disable_intr(vq); // XXX luigi + return 0; // XXX or 1 ? + } +#endif /* DEV_NETMAP */ + while ((txhdr = virtqueue_dequeue(vq, NULL)) != NULL) { m = txhdr->vth_mbuf; deq++; @@ -2893,6 +2918,11 @@ vtnet_init_rx_queues(struct vtnet_softc ("%s: too many rx mbufs %d for %d segments", __func__, sc->vtnet_rx_nmbufs, sc->vtnet_rx_nsegs)); +#ifdef DEV_NETMAP + if (vtnet_netmap_init_rx_buffers(sc)) + return 0; +#endif /* DEV_NETMAP */ + for (i = 0; i < sc->vtnet_act_vq_pairs; i++) { rxq = &sc->vtnet_rxqs[i]; @@ -3045,6 +3075,13 @@ vtnet_init(void *xsc) sc = xsc; +#ifdef DEV_NETMAP + if (!NA(sc->vtnet_ifp)) { + D("try to attach again"); + vtnet_netmap_attach(sc); + } +#endif /* DEV_NETMAP */ + VTNET_CORE_LOCK(sc); vtnet_init_locked(sc); VTNET_CORE_UNLOCK(sc); From kevlo at FreeBSD.org Mon Aug 25 03:00:00 2014 From: kevlo at FreeBSD.org (Kevin Lo) Date: Mon, 25 Aug 2014 02:59:59 +0000 (UTC) Subject: svn commit: r270514 - in stable/10: share/man/man4 sys/dev/usb sys/dev/usb/wlan Message-ID: <201408250259.s7P2xxn0099758@svn.freebsd.org> Author: kevlo Date: Mon Aug 25 02:59:58 2014 New Revision: 270514 URL: http://svnweb.freebsd.org/changeset/base/270514 Log: MFC r270165,r270191: - Sort ASUS section and add USB device ID of ASUS USB-AC51. - Add the D-Link DWA-125 rev D1. Modified: stable/10/share/man/man4/urtwn.4 stable/10/sys/dev/usb/usbdevs stable/10/sys/dev/usb/wlan/if_urtwn.c Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/urtwn.4 ============================================================================== --- stable/10/share/man/man4/urtwn.4 Mon Aug 25 01:36:56 2014 (r270513) +++ stable/10/share/man/man4/urtwn.4 Mon Aug 25 02:59:58 2014 (r270514) @@ -88,6 +88,7 @@ IEEE 802.11b/g/n wireless network adapte .Bl -tag -width Ds -offset indent -compact .It ASUS USB-N10 NANO .It Belkin F7D1102 Surf Wireless Micro +.It D-Link DWA-125 rev D1 .It D-Link DWA-131 .It Edimax EW-7811Un .It Netgear WNA1000M Modified: stable/10/sys/dev/usb/usbdevs ============================================================================== --- stable/10/sys/dev/usb/usbdevs Mon Aug 25 01:36:56 2014 (r270513) +++ stable/10/sys/dev/usb/usbdevs Mon Aug 25 02:59:58 2014 (r270514) @@ -1173,6 +1173,7 @@ product ASIX AX88772B_1 0x7e2b AX88772B /* ASUS products */ product ASUS2 USBN11 0x0b05 USB-N11 +product ASUS RT2570 0x1706 RT2500USB Wireless Adapter product ASUS WL167G 0x1707 WL-167g Wireless Adapter product ASUS WL159G 0x170c WL-159g product ASUS A9T_WIFI 0x171b A9T wireless @@ -1186,17 +1187,17 @@ product ASUS RT2870_3 0x1742 RT2870 product ASUS RT2870_4 0x1760 RT2870 product ASUS RT2870_5 0x1761 RT2870 product ASUS USBN13 0x1784 USB-N13 -product ASUS RT3070_1 0x1790 RT3070 product ASUS USBN10 0x1786 USB-N10 +product ASUS RT3070_1 0x1790 RT3070 +product ASUS RTL8192SU 0x1791 RTL8192SU +product ASUS USB_N53 0x179d ASUS Black Diamond Dual Band USB-N53 product ASUS RTL8192CU 0x17ab RTL8192CU product ASUS USBN66 0x17ad USB-N66 product ASUS USBN10NANO 0x17ba USB-N10 Nano -product ASUS RTL8192SU 0x1791 RTL8192SU +product ASUS USBAC51 0x17d1 USB-AC51 product ASUS A730W 0x4202 ASUS MyPal A730W product ASUS P535 0x420f ASUS P535 PDA -product ASUS GMSC 0x422f ASUS Generic Mass Storage -product ASUS RT2570 0x1706 RT2500USB Wireless Adapter -product ASUS USB_N53 0x179d ASUS Black Diamond Dual Band USB-N53 +product ASUS GMSC 0x422f ASUS Generic Mass Storage /* ATen products */ product ATEN UC1284 0x2001 Parallel printer @@ -1591,6 +1592,7 @@ product DLINK DUBE100 0x1a00 10/100 Eth product DLINK DUBE100C1 0x1a02 DUB-E100 rev C1 product DLINK DSB650TX4 0x200c 10/100 Ethernet product DLINK DWL120E 0x3200 DWL-120 rev E +product DLINK DWA125D1 0x330f DWA-125 rev D1 product DLINK DWL122 0x3700 DWL-122 product DLINK DWLG120 0x3701 DWL-G120 product DLINK DWL120F 0x3702 DWL-120 rev F Modified: stable/10/sys/dev/usb/wlan/if_urtwn.c ============================================================================== --- stable/10/sys/dev/usb/wlan/if_urtwn.c Mon Aug 25 01:36:56 2014 (r270513) +++ stable/10/sys/dev/usb/wlan/if_urtwn.c Mon Aug 25 02:59:58 2014 (r270514) @@ -151,6 +151,7 @@ static const STRUCT_USB_HOST_ID urtwn_de URTWN_DEV(TRENDNET, RTL8192CU), URTWN_DEV(ZYXEL, RTL8192CU), /* URTWN_RTL8188E */ + URTWN_RTL8188E_DEV(DLINK, DWA125D1), URTWN_RTL8188E_DEV(REALTEK, RTL8188ETV), URTWN_RTL8188E_DEV(REALTEK, RTL8188EU), #undef URTWN_RTL8188E_DEV From kevlo at FreeBSD.org Mon Aug 25 03:02:39 2014 From: kevlo at FreeBSD.org (Kevin Lo) Date: Mon, 25 Aug 2014 03:02:38 +0000 (UTC) Subject: svn commit: r270515 - stable/10/sys/dev/usb/wlan Message-ID: <201408250302.s7P32cAr004656@svn.freebsd.org> Author: kevlo Date: Mon Aug 25 03:02:38 2014 New Revision: 270515 URL: http://svnweb.freebsd.org/changeset/base/270515 Log: MFC r270192: If eapol packets are sent at the lowest rate, key negotiation will become more reliable. Submitted by: Akinori Furukoshi Modified: stable/10/sys/dev/usb/wlan/if_run.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/10/sys/dev/usb/wlan/if_run.c Mon Aug 25 02:59:58 2014 (r270514) +++ stable/10/sys/dev/usb/wlan/if_run.c Mon Aug 25 03:02:38 2014 (r270515) @@ -3253,13 +3253,13 @@ run_set_tx_desc(struct run_softc *sc, st txwi = (struct rt2860_txwi *)(txd + 1); txwi->len = htole16(m->m_pkthdr.len - pad); if (rt2860_rates[ridx].phy == IEEE80211_T_DS) { - txwi->phy = htole16(RT2860_PHY_CCK); + mcs |= RT2860_PHY_CCK; if (ridx != RT2860_RIDX_CCK1 && (ic->ic_flags & IEEE80211_F_SHPREAMBLE)) mcs |= RT2860_PHY_SHPRE; } else - txwi->phy = htole16(RT2860_PHY_OFDM); - txwi->phy |= htole16(mcs); + mcs |= RT2860_PHY_OFDM; + txwi->phy = htole16(mcs); /* check if RTS/CTS or CTS-to-self protection is required */ if (!IEEE80211_IS_MULTICAST(wh->i_addr1) && @@ -3336,7 +3336,7 @@ run_tx(struct run_softc *sc, struct mbuf /* pickup a rate index */ if (IEEE80211_IS_MULTICAST(wh->i_addr1) || - type != IEEE80211_FC0_TYPE_DATA) { + type != IEEE80211_FC0_TYPE_DATA || m->m_flags & M_EAPOL) { ridx = (ic->ic_curmode == IEEE80211_MODE_11A) ? RT2860_RIDX_OFDM6 : RT2860_RIDX_CCK1; ctl_ridx = rt2860_rates[ridx].ctl_ridx; @@ -4996,7 +4996,7 @@ run_updateprot_cb(void *arg) tmp = RT2860_RTSTH_EN | RT2860_PROT_NAV_SHORT | RT2860_TXOP_ALLOW_ALL; /* setup protection frame rate (MCS code) */ tmp |= (ic->ic_curmode == IEEE80211_MODE_11A) ? - rt2860_rates[RT2860_RIDX_OFDM6].mcs : + rt2860_rates[RT2860_RIDX_OFDM6].mcs | RT2860_PHY_OFDM : rt2860_rates[RT2860_RIDX_CCK11].mcs; /* CCK frames don't require protection */ From gjb at FreeBSD.org Mon Aug 25 09:06:42 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 09:06:42 +0000 (UTC) Subject: svn commit: r270523 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408250906.s7P96gwp067257@svn.freebsd.org> Author: gjb Date: Mon Aug 25 09:06:42 2014 New Revision: 270523 URL: http://svnweb.freebsd.org/changeset/base/270523 Log: Document r265701, route(8) and netstat(8) '-4' and '-6' shorthand flags. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 08:40:36 2014 (r270522) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 09:06:42 2014 (r270523) @@ -412,6 +412,12 @@ specified, produces a full stack track on the sampled points. + The &man.netstat.8; and &man.route.8; + utilities have been updated to include a shorthand equivalent + to the -f inet and -f + inet6 address specifiers, -4 and + -6, respectively. + The &man.ps.1; utility has been updated to include the -J flag, used to filter output by matching &man.jail.8; IDs and names. From gjb at FreeBSD.org Mon Aug 25 09:06:44 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 09:06:44 +0000 (UTC) Subject: svn commit: r270524 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408250906.s7P96iBV067299@svn.freebsd.org> Author: gjb Date: Mon Aug 25 09:06:44 2014 New Revision: 270524 URL: http://svnweb.freebsd.org/changeset/base/270524 Log: Capitalize titles where needed. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 09:06:42 2014 (r270523) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 09:06:44 2014 (r270524) @@ -216,7 +216,7 @@ Boost ™ enabled has been fixed. - Virtualization support + Virtualization Support Support for µsoft; Hyper-V has been added to &os;/i386 as loadable modules, however @@ -229,7 +229,7 @@ - ARM support + ARM Support The WANDBOARD kernel configuration file has been added. From gjb at FreeBSD.org Mon Aug 25 09:06:50 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 09:06:50 +0000 (UTC) Subject: svn commit: r270527 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408250906.s7P96of2067432@svn.freebsd.org> Author: gjb Date: Mon Aug 25 09:06:49 2014 New Revision: 270527 URL: http://svnweb.freebsd.org/changeset/base/270527 Log: Document r265879, crypt(3) defaults to sha512. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 09:06:47 2014 (r270526) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 09:06:49 2014 (r270527) @@ -430,6 +430,9 @@ inet6 address specifiers, -4 and -6, respectively. + The &man.crypt.3; library now defaults + to SHA512 for password hashing. + The &man.ps.1; utility has been updated to include the -J flag, used to filter output by matching &man.jail.8; IDs and names. From gjb at FreeBSD.org Mon Aug 25 09:06:48 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 09:06:48 +0000 (UTC) Subject: svn commit: r270526 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408250906.s7P96m31067383@svn.freebsd.org> Author: gjb Date: Mon Aug 25 09:06:47 2014 New Revision: 270526 URL: http://svnweb.freebsd.org/changeset/base/270526 Log: Re-indent the and following blocks to conform to FDP style conventions. Wrap resulting long lines. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 09:06:45 2014 (r270525) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 09:06:47 2014 (r270526) @@ -11,533 +11,542 @@
- - &os; &release.current; Release Notes + + &os; &release.current; Release Notes - - The &os; Project - - - $FreeBSD$ - - - 2000 - 2001 - 2002 - 2003 - 2004 - 2005 - 2006 - 2007 - 2008 - 2009 - 2010 - 2011 - 2012 - 2013 - 2014 - The &os; Documentation - Project - - - - &tm-attrib.freebsd; - &tm-attrib.ibm; - &tm-attrib.ieee; - &tm-attrib.intel; - &tm-attrib.sparc; - &tm-attrib.general; - - - - The release notes for &os; &release.current; contain - a summary of the changes made to the &os; base system on the - &release.branch; development line. This document lists - applicable security advisories that were issued since the last - release, as well as significant changes to the &os; kernel and - userland. Some brief remarks on upgrading are also - presented. - - - - - Introduction - - This document contains the release notes for &os; - &release.current;. It describes recently added, changed, or - deleted features of &os;. It also provides some notes on - upgrading from previous versions of &os;. - - The &release.type; distribution to which - these release notes apply represents the latest point along the - &release.branch; development branch since &release.branch; was - created. Information regarding pre-built, binary &release.type; - distributions along this branch can be found at &release.url;. - - The &release.type; distribution to - which these release notes apply represents a point along the - &release.branch; development branch between &release.prev; and the - future &release.next;. Information regarding pre-built, binary - &release.type; distributions along this branch can be found at - &release.url;. - - This distribution of &os; - &release.current; is a &release.type; distribution. It can be - found at &release.url; or - any of its mirrors. More information on obtaining this (or other) - &release.type; distributions of &os; can be found in the Obtaining - &os; appendix to the &os; Handbook. - - All users are encouraged to consult the release errata before - installing &os;. The errata document is updated with - late-breaking information discovered late in the - release cycle or after the release. Typically, it contains - information on known bugs, security advisories, and corrections to - documentation. An up-to-date copy of the errata for &os; - &release.current; can be found on the &os; Web site. - - - - What's New - - This section describes the most user-visible new or changed - features in &os; since &release.prev;. - - Typical release note items document recent security advisories - issued after &release.prev;, new drivers or hardware support, new - commands or options, major bug fixes, or contributed software - upgrades. They may also list changes to major ports/packages or - release engineering practices. Clearly the release notes cannot - list every single change made to &os; between releases; this - document focuses primarily on security advisories, user-visible - changes, and major architectural improvements. - - - Security Advisories - -   - - - - - Kernel Changes - - The vfs.zfs.zio.use_uma - &man.sysctl.8; has been re-enabled. On multi-CPU machines with - enough RAM, this can easily double &man.zfs.8; performance or - reduce CPU usage in half. It was originally disabled due to - memory and KVA exhaustion problem reports, - which should be resolved due to several change in the VM - subsystem. - - The - &man.geom.4; RAID driver has been - updated to support unmapped I/O. - - A new &man.sysctl.8;, - kern.panic_reboot_wait_time, has been added, - which allows controlling how long the system will wait after - &man.panic.9; before rebooting. - - The &man.virtio_blk.4; driver has been - updated to support unmapped I/O. - - The &man.virtio_scsi.4; driver has been - updated to support unmapped I/O. - - The &man.vt.4; driver has been merged - from &os;-CURRENT. To enable &man.vt.4;, enter - set kern.vty=vt at the &man.loader.8; prompt - during boot, or add kern.vty=vt to - &man.loader.conf.5; and reboot the system. - - Support for MegaRAID Fury cards has been - added to the &man.mfi.4; driver. - - The &man.aacraid.4; driver has been - updated to version 3.2.5. - - Support for &man.hwpmc.4; has been added - for &powerpc; 970 class processors. - - Support for ADT7460 and ADT7467 fan - controllers found in newer PowerBooks™ and - iBooks™ has been added to the &man.iicbus.4; - driver. - - A panic triggered by removing - a &man.urtwn.4; device has been fixed. - - A potential deadlock in the &man.usb.4; - stack triggered by detaching USB devices that create character - devices has been fixed. - - Support for &amd; Family 16h sensor - devices has been added to &man.amdtemp.4;. - - Support for LUN-based CD changers has been - removed from the &man.cd.4; driver. - - Support for 9th generation HP host bus - adapter cards has been added to &man.ciss.4;. - - The - &man.mpr.4; device has been added, - providing support for LSI Fusion-MPT 3 12Gb SCSI/SATA - controllers. - - The GEOM_VINUM option - is now able to be built both directly into the kernel or as - a &man.kldload.8; loadable module. - - The &man.uslcom.4; driver has been updated - to support 26 new devices. - - The - &man.mrsas.4; driver has been added, - providing support for LSI MegaRAID SAS controllers. The - &man.mfi.4; driver will attach to the controller, by default. - To enable &man.mrsas.4; add - hw.mfi.mrsas_enable=1 to - /boot/loader.conf, which turns off - &man.mfi.4; device probing. - - - At this time, the &man.mfiutil.8; utility and - the &os; version of - MegaCLI and - StorCli do not work with - &man.mrsas.4;. - - - A kernel bug that inhibited proper - functionality of the dev.cpu.0.freq - &man.sysctl.8; on &intel; processors with Turbo - Boost ™ enabled has been fixed. - - - Virtualization Support - - Support for µsoft; Hyper-V - has been added to &os;/i386 as loadable modules, however - not available in the GENERIC kernel - configuration. - - The &man.bhyve.4; hypervisor now - supports soft power-off functionality via the ACPI S5 - state. - - - - ARM Support - - The WANDBOARD - kernel configuration file has been added. - - Boot devices may now be specified by - setting a u-boot environment variable. If a boot device is - not specified, the probe mechanism will be used. To specify - the boot device, set the - loaderdev=device - u-boot environment variable. - - - - Boot Loader Changes - - A kernel selection menu has been added - to &man.loader.8;. If the beastie menu is - enabled, the kernel to boot may be selected from the kernel - selection menu. Additional kernels may be listed in - &man.loader.conf.5; as a comma- or space-separated list. By - default, kernel and - kernel.old are listed. - + + The &os; Project + + + $FreeBSD$ + + + 2000 + 2001 + 2002 + 2003 + 2004 + 2005 + 2006 + 2007 + 2008 + 2009 + 2010 + 2011 + 2012 + 2013 + 2014 + The &os; Documentation + Project + + + + &tm-attrib.freebsd; + &tm-attrib.ibm; + &tm-attrib.ieee; + &tm-attrib.intel; + &tm-attrib.sparc; + &tm-attrib.general; + + + + The release notes for &os; &release.current; contain + a summary of the changes made to the &os; base system on the + &release.branch; development line. This document lists + applicable security advisories that were issued since the last + release, as well as significant changes to the &os; kernel and + userland. Some brief remarks on upgrading are also + presented. + + + + + Introduction + + This document contains the release notes for &os; + &release.current;. It describes recently added, changed, or + deleted features of &os;. It also provides some notes on + upgrading from previous versions of &os;. + + The &release.type; distribution to + which these release notes apply represents the latest point + along the &release.branch; development branch since + &release.branch; was created. Information regarding pre-built, + binary &release.type; distributions along this branch can be + found at &release.url;. + + The &release.type; distribution to + which these release notes apply represents a point along the + &release.branch; development branch between &release.prev; and + the future &release.next;. Information regarding pre-built, + binary &release.type; distributions along this branch can be + found at &release.url;. + + This distribution of &os; + &release.current; is a &release.type; distribution. It can be + found at &release.url; or + any of its mirrors. More information on obtaining this (or + other) &release.type; distributions of &os; can be found in the + Obtaining + &os; appendix to the &os; + Handbook. + + All users are encouraged to consult the release errata + before installing &os;. The errata document is updated with + late-breaking information discovered late in the + release cycle or after the release. Typically, it contains + information on known bugs, security advisories, and corrections + to documentation. An up-to-date copy of the errata for &os; + &release.current; can be found on the &os; Web site. + + + + What's New + + This section describes the most user-visible new or changed + features in &os; since &release.prev;. + + Typical release note items document recent security + advisories issued after &release.prev;, new drivers or hardware + support, new commands or options, major bug fixes, or + contributed software upgrades. They may also list changes to + major ports/packages or release engineering practices. Clearly + the release notes cannot list every single change made to &os; + between releases; this document focuses primarily on security + advisories, user-visible changes, and major architectural + improvements. - - Hardware Support + + Security Advisories   - - Multimedia Support + + + + Kernel Changes + + The + vfs.zfs.zio.use_uma &man.sysctl.8; has been + re-enabled. On multi-CPU machines with enough RAM, this can + easily double &man.zfs.8; performance or reduce CPU usage in + half. It was originally disabled due to memory and + KVA exhaustion problem reports, which + should be resolved due to several change in the VM + subsystem. + + The + &man.geom.4; RAID driver has been + updated to support unmapped I/O. + + A new &man.sysctl.8;, + kern.panic_reboot_wait_time, has been + added, which allows controlling how long the system will wait + after &man.panic.9; before rebooting. + + The &man.virtio_blk.4; driver has been + updated to support unmapped I/O. + + The &man.virtio_scsi.4; driver has been + updated to support unmapped I/O. + + The &man.vt.4; driver has been merged + from &os;-CURRENT. To enable &man.vt.4;, enter + set kern.vty=vt at the &man.loader.8; + prompt during boot, or add kern.vty=vt to + &man.loader.conf.5; and reboot the system. + + Support for MegaRAID Fury cards has been + added to the &man.mfi.4; driver. + + The &man.aacraid.4; driver has been + updated to version 3.2.5. + + Support for &man.hwpmc.4; has been added + for &powerpc; 970 class processors. + + Support for ADT7460 and ADT7467 fan + controllers found in newer PowerBooks™ and + iBooks™ has been added to the &man.iicbus.4; + driver. + + A panic triggered by removing + a &man.urtwn.4; device has been fixed. + + A potential deadlock in the &man.usb.4; + stack triggered by detaching USB devices that create character + devices has been fixed. + + Support for &amd; Family 16h sensor + devices has been added to &man.amdtemp.4;. + + Support for LUN-based CD changers has + been removed from the &man.cd.4; driver. + + Support for 9th generation HP host bus + adapter cards has been added to &man.ciss.4;. + + The + &man.mpr.4; device has been added, + providing support for LSI Fusion-MPT 3 12Gb SCSI/SATA + controllers. + + The GEOM_VINUM option + is now able to be built both directly into the kernel or as + a &man.kldload.8; loadable module. + + The &man.uslcom.4; driver has been + updated to support 26 new devices. + + The + &man.mrsas.4; driver has been added, + providing support for LSI MegaRAID SAS controllers. The + &man.mfi.4; driver will attach to the controller, by default. + To enable &man.mrsas.4; add + hw.mfi.mrsas_enable=1 to + /boot/loader.conf, which turns off + &man.mfi.4; device probing. + + + At this time, the &man.mfiutil.8; utility and + the &os; version of + MegaCLI and + StorCli do not work with + &man.mrsas.4;. + + + A kernel bug that inhibited proper + functionality of the dev.cpu.0.freq + &man.sysctl.8; on &intel; processors with Turbo + Boost ™ enabled has been fixed. + + + Virtualization Support + + Support for µsoft; Hyper-V + has been added to &os;/i386 as loadable modules, however + not available in the GENERIC kernel + configuration. + + The &man.bhyve.4; hypervisor now + supports soft power-off functionality via the ACPI S5 + state. + + + + ARM Support + + The WANDBOARD + kernel configuration file has been added. + + Boot devices may now be specified by + setting a u-boot environment variable. If a boot device is + not specified, the probe mechanism will be used. To specify + the boot device, set the + loaderdev=device + u-boot environment variable. + + + + Boot Loader Changes + + A kernel selection menu has been added + to &man.loader.8;. If the beastie menu is + enabled, the kernel to boot may be selected from the kernel + selection menu. Additional kernels may be listed in + &man.loader.conf.5; as a comma- or space-separated list. By + default, kernel and + kernel.old are listed. + + + + Hardware Support   - + + Multimedia Support + +   + + + + + Network Interface Support + + Support for Ralink RT5370 and + RT5372 chipsets has been added to the &man.run.4; + driver. + + Firmware for the &man.run.4; driver + has been updated to version 0.33. + + Support for the Ralink RT3593 + chipset has been added to the &man.run.4; driver. + + The &man.nve.4; driver is now + deprecated, and the &man.nfe.4; driver should be used + instead. + + Support for the &man.axge.4; driver + has been added. This driver supports the ASIX AX88178A + and AX88179 USB ethernet adapters. The AX88178A supports + USB 2.0, and the AX88179 supports USB 2.0 and 3.0. + + The &man.urndis.4; driver has been + imported from OpenBSD. + + Support for multiple + transmitter/receiver queues has been added to the + &man.vmx.4; driver. + + + The &os; guest operating system must have + MSIX enabled as a prerequisite for + multiple queues. + + + Support for the ASUS USB-N10 Nano + wireless card has been added to the &man.urtwn.4; + driver. + + + + + Network Protocols + +   + + + + + Disks and Storage + + The + &man.geom.8; label class is now aware of + resized partitions. This corrects an issue where + geom resize would resize the partition, + but the label provider in /dev/gptid/ would not be + resized. + + The &man.gmirror.8; + utility now has a resize command, making + it easier to resize the size of a mirror when all of its + components have been replaced. + + Support for the + disklabel64 partitioning scheme has been + added to &man.gpart.8;. + + + + File Systems + + A new flag, -R, + has been added to the &man.fsck.ffs.8; utility. When used, + &man.fsck.ffs.8; will restart itself when too many critical + errors have been detected. + + The &man.zfs.8; filesystem has been + updated to implement bookmarks. See + &man.zfs.8; for further details. + + + + + Userland Changes + + A new flag is added to &man.camcontrol.8;, + -b, which outputs the existing buses and + their parents. + + The &man.newsyslog.8; utility has been + updated to rotate files based on the actual file size instead + of the blocks on disk. This matches the behavior documented + in &man.newsyslog.conf.5;. + + The location of the &man.rctl.8; + configuration file can now be overridden in &man.rc.conf.5;. + To use a non-default location, set + rctl_rules in &man.rc.conf.5; to the + location of the file. + + The ATF test + suite has been updated to version 0.20. + + The libucl library + (Unified Configuration Library) has been merged from + &os;-CURRENT. + + The &man.pkg.7; bootstrapping utility + has been synced with the version in &os;-CURRENT. + + The &man.zfs.8; userland utility has + been updated to include aliases for + snapshot, which allows use of zfs + list -t snap and zfs + snap. + + The &man.zfs.8; userland utility has + been updated to include a new flag to zfs + list, -p, which when specified, + prints the output in a parsable format. + + The &man.clang.1;/llvm suite has been + updated to version 3.4. + + The Blowfish password format + implementation updated. Support for $2b$ has + been added, allowing use of passwords greater than 256 + characters long. + + The &man.iconv.3; library has been + updated to match NetBSD, providing several bug fixes. + + The &man.date.1; utility has been + updated to include a new flag, -R, which + prints the date and time output as specified in RFC + 2822. + + The &man.bc.1; utility has been updated + to version 1.1, in sync with the version in OpenBSD. + + The &man.pmcstat.8; utility has been + updated to include a new flag, -a, which + when specified, produces a full stack track on the sampled + points. + + The &man.netstat.8; and &man.route.8; + utilities have been updated to include a shorthand equivalent + to the -f inet and -f + inet6 address specifiers, -4 + and -6, respectively. + + The &man.ps.1; utility has been + updated to include the -J flag, used to + filter output by matching &man.jail.8; IDs and names. + Additionally, argument 0 can be used to + -J to only list processes running on the + host system. + + The &man.top.1; utility has been updated + to filter by &man.jail.8; ID or name, in followup to the + &man.ps.1; change in r265229. + + The &man.pmcstat.8; utility has been + updated to include a new flag, -l, which + ends event collection after the specified number of + seconds. + + The default &man.newsyslog.conf.5; now + includes files in the + /etc/newsyslog.conf.d/ and + /usr/local/etc/newsyslog.conf.d/ + directories by default for &man.newsyslog.8;. + + A new flag, onifconsole + has been added to /etc/ttys. This allows + the system to provide a login prompt via serial console if the + device is an active kernel console, otherwise it is equivalent + to off. + + The &man.mkimg.1; utility has been + merged from &os;-CURRENT. + + + <filename>/etc/rc.d</filename> Scripts + + The network.subr + &man.rc.8; script has been updated to loosen the requirement + of listing network aliases in numeric order. Previously, + a network alias of + _alias2 + would not be created if + _alias1 was + not defined. + + + + + Contributed Software + + The &man.xz.1; utility has been updated + to a post-5.0.5 snapshot. + + The &man.lldb.1; debugging library has + been updated to the r196322 snapshot. + + The timezone database has been updated + to version tzdata2014b. + + OpenSSH has + been updated to version 6.6p1. + + The &man.nc.1; utility has been updated + to match the version in OpenBSD 5.5. + + Sendmail + has been updated to 8.14.9. + + OpenSSL has + been updated to version 1.0.1h. + + + + Ports/Packages Collection Infrastructure + +   + + - - Network Interface Support + + Release Engineering and Integration - Support for Ralink RT5370 and - RT5372 chipsets has been added to the &man.run.4; - driver. - - Firmware for the &man.run.4; driver - has been updated to version 0.33. - - Support for the Ralink RT3593 - chipset has been added to the &man.run.4; driver. - - The &man.nve.4; driver is now - deprecated, and the &man.nfe.4; driver should be used - instead. - - Support for the &man.axge.4; driver - has been added. This driver supports the ASIX AX88178A and - AX88179 USB ethernet adapters. The AX88178A supports USB - 2.0, and the AX88179 supports USB 2.0 and 3.0. - - The &man.urndis.4; driver has been - imported from OpenBSD. - - Support for multiple - transmitter/receiver queues has been added to the - &man.vmx.4; driver. - - - The &os; guest operating system must have - MSIX enabled as a prerequisite for - multiple queues. - - - Support for the ASUS USB-N10 Nano - wireless card has been added to the &man.urtwn.4; - driver. - - + The &man.services.mkdb.8; utility has + been updated to include endianness awareness, allowing the + services.db database to be created as + part of the release build, regardless of native- or + cross-built releases. + - - Network Protocols + + Documentation   - + + - - Disks and Storage + + Upgrading from Previous Releases of &os; - The &man.geom.8; label class - is now aware of resized partitions. This corrects an issue - where geom resize would resize the - partition, but the label provider in /dev/gptid/ would not be - resized. - - The &man.gmirror.8; - utility now has a resize command, making - it easier to resize the size of a mirror when all of its - components have been replaced. - - Support for the - disklabel64 partitioning scheme has been - added to &man.gpart.8;. - - - - File Systems - - A new flag, -R, - has been added to the &man.fsck.ffs.8; utility. When used, - &man.fsck.ffs.8; will restart itself when too many critical - errors have been detected. - - The &man.zfs.8; filesystem has been - updated to implement bookmarks. See - &man.zfs.8; for further details. - - - - - Userland Changes - - A new flag is added to &man.camcontrol.8;, - -b, which outputs the existing buses and - their parents. - - The &man.newsyslog.8; utility has been - updated to rotate files based on the actual file size instead - of the blocks on disk. This matches the behavior documented in - &man.newsyslog.conf.5;. - - The location of the &man.rctl.8; - configuration file can now be overridden in &man.rc.conf.5;. - To use a non-default location, set rctl_rules - in &man.rc.conf.5; to the location of the file. - - The ATF test - suite has been updated to version 0.20. - - The libucl library - (Unified Configuration Library) has been merged from - &os;-CURRENT. - - The &man.pkg.7; bootstrapping utility has - been synced with the version in &os;-CURRENT. - - The &man.zfs.8; userland utility has been - updated to include aliases for snapshot, - which allows use of zfs list -t snap and - zfs snap. - - The &man.zfs.8; userland utility has been - updated to include a new flag to zfs list, - -p, which when specified, prints the output - in a parsable format. - - The &man.clang.1;/llvm suite has been - updated to version 3.4. - - The Blowfish password format - implementation updated. Support for $2b$ has - been added, allowing use of passwords greater than 256 - characters long. - - The &man.iconv.3; library has been - updated to match NetBSD, providing several bug fixes. - - The &man.date.1; utility has been updated - to include a new flag, -R, which prints the - date and time output as specified in RFC 2822. - - The &man.bc.1; utility has been updated to - version 1.1, in sync with the version in OpenBSD. - - The &man.pmcstat.8; utility has been - updated to include a new flag, -a, which when - specified, produces a full stack track on the sampled - points. - - The &man.netstat.8; and &man.route.8; - utilities have been updated to include a shorthand equivalent - to the -f inet and -f - inet6 address specifiers, -4 and - -6, respectively. - - The &man.ps.1; utility has been - updated to include the -J flag, used to - filter output by matching &man.jail.8; IDs and names. - Additionally, argument 0 can be used to - -J to only list processes running on the - host system. - - The &man.top.1; utility has been updated - to filter by &man.jail.8; ID or name, in followup to the - &man.ps.1; change in r265229. - - The &man.pmcstat.8; utility has been - updated to include a new flag, -l, which - ends event collection after the specified number of - seconds. - - The default &man.newsyslog.conf.5; now - includes files in the - /etc/newsyslog.conf.d/ and - /usr/local/etc/newsyslog.conf.d/ - directories by default for &man.newsyslog.8;. - - A new flag, onifconsole has - been added to /etc/ttys. This allows the - system to provide a login prompt via serial console if the - device is an active kernel console, otherwise it is equivalent - to off. - - The &man.mkimg.1; utility has been merged - from &os;-CURRENT. - - - <filename>/etc/rc.d</filename> Scripts - - The network.subr - &man.rc.8; script has been updated to loosen the requirement - of listing network aliases in numeric order. Previously, - a network alias of - _alias2 - would not be created if - _alias1 was - not defined. - - - - - Contributed Software - - The &man.xz.1; utility has been updated - to a post-5.0.5 snapshot. - - The &man.lldb.1; debugging library has - been updated to the r196322 snapshot. - - The timezone database has been updated to - version tzdata2014b. - - OpenSSH has - been updated to version 6.6p1. - - The &man.nc.1; utility has been updated - to match the version in OpenBSD 5.5. - - Sendmail - has been updated to 8.14.9. - - OpenSSL has - been updated to version 1.0.1h. - - - - Ports/Packages Collection Infrastructure - -   - - - - - Release Engineering and Integration - - The &man.services.mkdb.8; utility has *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From gjb at FreeBSD.org Mon Aug 25 09:06:46 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 09:06:46 +0000 (UTC) Subject: svn commit: r270525 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408250906.s7P96kK4067344@svn.freebsd.org> Author: gjb Date: Mon Aug 25 09:06:45 2014 New Revision: 270525 URL: http://svnweb.freebsd.org/changeset/base/270525 Log: Wrap a few long lines. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 09:06:44 2014 (r270524) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 09:06:45 2014 (r270525) @@ -8,7 +8,9 @@ %vendor; ]> -
+
+ &os; &release.current; Release Notes @@ -34,7 +36,8 @@ 2012 2013 2014 - The &os; Documentation Project + The &os; Documentation + Project From gjb at FreeBSD.org Mon Aug 25 09:06:52 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 09:06:51 +0000 (UTC) Subject: svn commit: r270528 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408250906.s7P96pUq067491@svn.freebsd.org> Author: gjb Date: Mon Aug 25 09:06:51 2014 New Revision: 270528 URL: http://svnweb.freebsd.org/changeset/base/270528 Log: Remove a non-breaking space between a trademark symbol. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 09:06:49 2014 (r270527) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 09:06:51 2014 (r270528) @@ -222,7 +222,7 @@ A kernel bug that inhibited proper functionality of the dev.cpu.0.freq &man.sysctl.8; on &intel; processors with Turbo - Boost ™ enabled has been fixed. + Boost™ enabled has been fixed. Virtualization Support From gjb at FreeBSD.org Mon Aug 25 09:06:57 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 09:06:57 +0000 (UTC) Subject: svn commit: r270531 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408250906.s7P96vkI067626@svn.freebsd.org> Author: gjb Date: Mon Aug 25 09:06:57 2014 New Revision: 270531 URL: http://svnweb.freebsd.org/changeset/base/270531 Log: Document r265983, tzdata2014c. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 09:06:55 2014 (r270530) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 09:06:57 2014 (r270531) @@ -496,15 +496,15 @@ sponsor="&darpa_afrl;">The &man.lldb.1; debugging library has been updated to the r196322 snapshot. - The timezone database has been updated - to version tzdata2014b. - OpenSSH has been updated to version 6.6p1. The &man.nc.1; utility has been updated to match the version in OpenBSD 5.5. + The timezone database has been updated + to version tzdata2014c. + Sendmail has been updated to 8.14.9. From gjb at FreeBSD.org Mon Aug 25 09:06:54 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 09:06:53 +0000 (UTC) Subject: svn commit: r270529 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408250906.s7P96rHS067533@svn.freebsd.org> Author: gjb Date: Mon Aug 25 09:06:53 2014 New Revision: 270529 URL: http://svnweb.freebsd.org/changeset/base/270529 Log: Document r265912, auto-resize in GEOM_PART. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 09:06:51 2014 (r270528) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 09:06:53 2014 (r270529) @@ -339,6 +339,13 @@ it easier to resize the size of a mirror when all of its components have been replaced. + The &man.geom.8; + GEOM_PART class has been updated to + support automatic partition resizing. Changes to the + partition size are not saved to disk until + gpart commit is run, and prior to saving, + can be reverted with gpart undo. + Support for the disklabel64 partitioning scheme has been added to &man.gpart.8;. From gjb at FreeBSD.org Mon Aug 25 09:06:59 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 09:06:59 +0000 (UTC) Subject: svn commit: r270532 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408250906.s7P96xfF067673@svn.freebsd.org> Author: gjb Date: Mon Aug 25 09:06:59 2014 New Revision: 270532 URL: http://svnweb.freebsd.org/changeset/base/270532 Log: Document r266000, nexus(4) supports FDT for ARM and MIPS, replacing fdtbus(4). Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 09:06:57 2014 (r270531) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 09:06:59 2014 (r270532) @@ -249,6 +249,11 @@ the boot device, set the loaderdev=device u-boot environment variable. + + The nexus(4) driver + has been updated to include Flattened Device + Tree support, replacing the &man.fdtbus.4; driver + in most cases. From gjb at FreeBSD.org Mon Aug 25 09:06:56 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 09:06:55 +0000 (UTC) Subject: svn commit: r270530 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408250906.s7P96tcl067581@svn.freebsd.org> Author: gjb Date: Mon Aug 25 09:06:55 2014 New Revision: 270530 URL: http://svnweb.freebsd.org/changeset/base/270530 Log: Document r265946, UDP-Lite support. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 09:06:53 2014 (r270529) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 09:06:55 2014 (r270530) @@ -319,8 +319,9 @@ Network Protocols -   - + Support for the UDP-Lite protocol + (RFC 3828) has been added to the IPv4 and IPv6 + stacks. From gjb at FreeBSD.org Mon Aug 25 10:43:50 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 10:43:49 +0000 (UTC) Subject: svn commit: r270533 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251043.s7PAhnJF014437@svn.freebsd.org> Author: gjb Date: Mon Aug 25 10:43:49 2014 New Revision: 270533 URL: http://svnweb.freebsd.org/changeset/base/270533 Log: Document r266014, gvinum(8) '-f' flag changes. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 09:06:59 2014 (r270532) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 10:43:49 2014 (r270533) @@ -446,6 +446,12 @@ The &man.crypt.3; library now defaults to SHA512 for password hashing. + The &man.gvinum.8; utility has been + updated to allow forceful configuration reset with the + -f flag. Additionally, a bug that would + prevent -f from properly creating + a &man.gvinum.8; configuration has been fixed. + The &man.ps.1; utility has been updated to include the -J flag, used to filter output by matching &man.jail.8; IDs and names. From gjb at FreeBSD.org Mon Aug 25 10:43:52 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 10:43:51 +0000 (UTC) Subject: svn commit: r270534 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251043.s7PAhpph014479@svn.freebsd.org> Author: gjb Date: Mon Aug 25 10:43:51 2014 New Revision: 270534 URL: http://svnweb.freebsd.org/changeset/base/270534 Log: Document r266029, login.conf(5) precedence over dot-shell files. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 10:43:49 2014 (r270533) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 10:43:51 2014 (r270534) @@ -452,6 +452,15 @@ prevent -f from properly creating a &man.gvinum.8; configuration has been fixed. + The &man.login.conf.5; file now takes + precedence over the shell-specific environment files. In + particular, the PATH, + BLOCKSIZE variables are commented from + /usr/share/skel/dot.profile, and the + path, BLOCKSIZE, and + umask variables have been commented from + /usr/share/skel/dot.cshrc. + The &man.ps.1; utility has been updated to include the -J flag, used to filter output by matching &man.jail.8; IDs and names. From gjb at FreeBSD.org Mon Aug 25 10:43:54 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 10:43:53 +0000 (UTC) Subject: svn commit: r270535 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251043.s7PAhroZ014522@svn.freebsd.org> Author: gjb Date: Mon Aug 25 10:43:53 2014 New Revision: 270535 URL: http://svnweb.freebsd.org/changeset/base/270535 Log: Document r266105, gpioiic(4) and gpiobus(4) merged from head/. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 10:43:51 2014 (r270534) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 10:43:53 2014 (r270535) @@ -254,6 +254,9 @@ has been updated to include Flattened Device Tree support, replacing the &man.fdtbus.4; driver in most cases. + + The &man.gpioiic.4; and + &man.gpioled.4; have been merged from &os;-CURRENT. From gjb at FreeBSD.org Mon Aug 25 10:43:59 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 10:43:59 +0000 (UTC) Subject: svn commit: r270538 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251043.s7PAhxTf014656@svn.freebsd.org> Author: gjb Date: Mon Aug 25 10:43:58 2014 New Revision: 270538 URL: http://svnweb.freebsd.org/changeset/base/270538 Log: Document r266220, geom_uncompress(4) built by default. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 10:43:56 2014 (r270537) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 10:43:58 2014 (r270538) @@ -257,6 +257,11 @@ The &man.gpioiic.4; and &man.gpioled.4; have been merged from &os;-CURRENT. + + The &man.geom.uncompress.4; module is + built by default which, similar to &man.geom.uzip.4;, + provides support for compressed, read-only disk + images. From gjb at FreeBSD.org Mon Aug 25 10:44:01 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 10:44:01 +0000 (UTC) Subject: svn commit: r270539 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251044.s7PAi1xP014737@svn.freebsd.org> Author: gjb Date: Mon Aug 25 10:44:00 2014 New Revision: 270539 URL: http://svnweb.freebsd.org/changeset/base/270539 Log: Document r266272, binmiscctl(8) merged from head/. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 10:43:58 2014 (r270538) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 10:44:00 2014 (r270539) @@ -483,6 +483,10 @@ umask variables have been commented from /usr/share/skel/dot.cshrc. + The &man.binmiscctl.8; userland utility + and related image activator features have been merged from + &os;-CURRENT. + The &man.ps.1; utility has been updated to include the -J flag, used to filter output by matching &man.jail.8; IDs and names. From gjb at FreeBSD.org Mon Aug 25 10:44:03 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 10:44:02 +0000 (UTC) Subject: svn commit: r270540 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251044.s7PAi2bQ014792@svn.freebsd.org> Author: gjb Date: Mon Aug 25 10:44:02 2014 New Revision: 270540 URL: http://svnweb.freebsd.org/changeset/base/270540 Log: Move note about geom_uncompress(4), which is not ARM-specific. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 10:44:00 2014 (r270539) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 10:44:02 2014 (r270540) @@ -224,6 +224,11 @@ &man.sysctl.8; on &intel; processors with Turbo Boost™ enabled has been fixed. + The &man.geom.uncompress.4; module is + built by default which, similar to &man.geom.uzip.4;, + provides support for compressed, read-only disk + images. + Virtualization Support @@ -257,11 +262,6 @@ The &man.gpioiic.4; and &man.gpioled.4; have been merged from &os;-CURRENT. - - The &man.geom.uncompress.4; module is - built by default which, similar to &man.geom.uzip.4;, - provides support for compressed, read-only disk - images. From gjb at FreeBSD.org Mon Aug 25 10:43:57 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 10:43:57 +0000 (UTC) Subject: svn commit: r270537 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251043.s7PAhvR0014611@svn.freebsd.org> Author: gjb Date: Mon Aug 25 10:43:56 2014 New Revision: 270537 URL: http://svnweb.freebsd.org/changeset/base/270537 Log: Document r266212, RTL8168C/RTL8168CP TX checksum offloading disabled. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 10:43:55 2014 (r270536) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 10:43:56 2014 (r270537) @@ -321,6 +321,12 @@ Support for the ASUS USB-N10 Nano wireless card has been added to the &man.urtwn.4; driver. + + Transmission checksum offloading has + been disabled for the RTL8168C and RTL8168CP chipsets in + the &man.re.4; driver for TCP and UDP frames. This is + due to a report of UDP datagrams with IP options + generating corrupt frames. From gjb at FreeBSD.org Mon Aug 25 10:43:55 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 10:43:55 +0000 (UTC) Subject: svn commit: r270536 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251043.s7PAhtmi014569@svn.freebsd.org> Author: gjb Date: Mon Aug 25 10:43:55 2014 New Revision: 270536 URL: http://svnweb.freebsd.org/changeset/base/270536 Log: Document r266122, vfs.zfs.min_auto_ashift Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 10:43:53 2014 (r270535) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 10:43:55 2014 (r270536) @@ -372,6 +372,14 @@ The &man.zfs.8; filesystem has been updated to implement bookmarks. See &man.zfs.8; for further details. + + The &man.zfs.8; filesystem has been + updated to allow tuning the minimum ashift + value when creating new top-level virtual devices (vdevs). + To set the minimum ashift value, for example when creating + a &man.zpool.8; on Advanced Format drives, + set the vfs.zfs.min_auto_ashift + &man.sysctl.8; accordingly. From gjb at FreeBSD.org Mon Aug 25 11:46:28 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 11:46:28 +0000 (UTC) Subject: svn commit: r270541 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251146.s7PBkS3S044454@svn.freebsd.org> Author: gjb Date: Mon Aug 25 11:46:27 2014 New Revision: 270541 URL: http://svnweb.freebsd.org/changeset/base/270541 Log: Document r266379, ZEDBOARD SMP support. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 10:44:02 2014 (r270540) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 11:46:27 2014 (r270541) @@ -262,6 +262,10 @@ The &man.gpioiic.4; and &man.gpioled.4; have been merged from &os;-CURRENT. + + The ZEDBOARD kernel + configuration file has been updated to include + SMP support. From gjb at FreeBSD.org Mon Aug 25 11:46:30 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 11:46:29 +0000 (UTC) Subject: svn commit: r270542 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251146.s7PBkTRg044504@svn.freebsd.org> Author: gjb Date: Mon Aug 25 11:46:29 2014 New Revision: 270542 URL: http://svnweb.freebsd.org/changeset/base/270542 Log: Document r266436, Intel Lynx Point KT UART AMT support. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 11:46:27 2014 (r270541) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 11:46:29 2014 (r270542) @@ -229,6 +229,10 @@ provides support for compressed, read-only disk images. + The &man.uart.4; driver has been + updated to include support for the &intel; Lynx Point + KT AMT serial port. + Virtualization Support From gjb at FreeBSD.org Mon Aug 25 11:46:35 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 11:46:35 +0000 (UTC) Subject: svn commit: r270545 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251146.s7PBkZWS044636@svn.freebsd.org> Author: gjb Date: Mon Aug 25 11:46:35 2014 New Revision: 270545 URL: http://svnweb.freebsd.org/changeset/base/270545 Log: Document r266610, gstat(8) '-o' flag. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 11:46:33 2014 (r270544) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 11:46:35 2014 (r270545) @@ -515,6 +515,11 @@ to filter by &man.jail.8; ID or name, in followup to the &man.ps.1; change in r265229. + The &man.gstat.8; utility has been + updated to include a new flag, -o. When + set, &man.gstat.8; will display statistics for operations + such as BIO_FLUSH. + The &man.pmcstat.8; utility has been updated to include a new flag, -l, which ends event collection after the specified number of From gjb at FreeBSD.org Mon Aug 25 11:46:41 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 11:46:41 +0000 (UTC) Subject: svn commit: r270548 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251146.s7PBkf8o044772@svn.freebsd.org> Author: gjb Date: Mon Aug 25 11:46:40 2014 New Revision: 270548 URL: http://svnweb.freebsd.org/changeset/base/270548 Log: Document r266715, clang/llvm 3.4.1. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 11:46:38 2014 (r270547) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 11:46:40 2014 (r270548) @@ -457,9 +457,6 @@ list, -p, which when specified, prints the output in a parsable format. - The &man.clang.1;/llvm suite has been - updated to version 3.4. - The Blowfish password format implementation updated. Support for $2b$ has been added, allowing use of passwords greater than 256 @@ -532,6 +529,9 @@ before /etc/ssl/. + The &man.clang.1;/llvm suite has been + updated to version 3.4.1. + The &man.pmcstat.8; utility has been updated to include a new flag, -l, which ends event collection after the specified number of From gjb at FreeBSD.org Mon Aug 25 11:46:32 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 11:46:31 +0000 (UTC) Subject: svn commit: r270543 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251146.s7PBkV4D044549@svn.freebsd.org> Author: gjb Date: Mon Aug 25 11:46:31 2014 New Revision: 270543 URL: http://svnweb.freebsd.org/changeset/base/270543 Log: Document r266578, Realtek RTL8188EUS and RTL8188ETV support in urtwn(4). Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 11:46:29 2014 (r270542) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 11:46:31 2014 (r270543) @@ -340,6 +340,10 @@ the &man.re.4; driver for TCP and UDP frames. This is due to a report of UDP datagrams with IP options generating corrupt frames. + + Preliminary support has been added + to the &man.urtwn.4; driver for the Realtek RTL8188EUS and + RTL8188ETV chipsets. From gjb at FreeBSD.org Mon Aug 25 11:46:34 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 11:46:33 +0000 (UTC) Subject: svn commit: r270544 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251146.s7PBkXGj044594@svn.freebsd.org> Author: gjb Date: Mon Aug 25 11:46:33 2014 New Revision: 270544 URL: http://svnweb.freebsd.org/changeset/base/270544 Log: Document r266594, 32-bit ioctl(2) support in radeonkms. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 11:46:31 2014 (r270543) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 11:46:33 2014 (r270544) @@ -381,6 +381,11 @@ Support for the disklabel64 partitioning scheme has been added to &man.gpart.8;. + + The radeonkms(4) + driver has been updated to include 32-bit &man.ioctl.2; + support, allowing 32-bit applications to run on a 64-bit + system. From gjb at FreeBSD.org Mon Aug 25 11:46:37 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 11:46:37 +0000 (UTC) Subject: svn commit: r270546 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251146.s7PBkbvY044681@svn.freebsd.org> Author: gjb Date: Mon Aug 25 11:46:37 2014 New Revision: 270546 URL: http://svnweb.freebsd.org/changeset/base/270546 Log: Document r266612, libzfs pool threading. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 11:46:35 2014 (r270545) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 11:46:37 2014 (r270546) @@ -408,6 +408,12 @@ a &man.zpool.8; on Advanced Format drives, set the vfs.zfs.min_auto_ashift &man.sysctl.8; accordingly. + + The libzfs thread + pool API has been imported from + OpenSolaris, and adapted for &os;. This change allows + parallel disk scanning, which can reduce &man.zpool.8; + overall import time in some workloads. From gjb at FreeBSD.org Mon Aug 25 11:46:39 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 11:46:39 +0000 (UTC) Subject: svn commit: r270547 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251146.s7PBkdAt044732@svn.freebsd.org> Author: gjb Date: Mon Aug 25 11:46:38 2014 New Revision: 270547 URL: http://svnweb.freebsd.org/changeset/base/270547 Log: Document r266632, fetch(3) looks in /usr/local/etc/ssl/ before /etc/ssl/ for the root CA. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 11:46:37 2014 (r270546) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 11:46:38 2014 (r270547) @@ -526,6 +526,12 @@ set, &man.gstat.8; will display statistics for operations such as BIO_FLUSH. + The &man.fetch.3; library has been + updated to look for root SSL certificates + in /usr/local/etc/ssl/ + before /etc/ssl/. + The &man.pmcstat.8; utility has been updated to include a new flag, -l, which ends event collection after the specified number of From gjb at FreeBSD.org Mon Aug 25 11:46:43 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 11:46:43 +0000 (UTC) Subject: svn commit: r270549 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251146.s7PBkhfp044817@svn.freebsd.org> Author: gjb Date: Mon Aug 25 11:46:42 2014 New Revision: 270549 URL: http://svnweb.freebsd.org/changeset/base/270549 Log: Document r266718, jail(8) source address selection fix when using raw_sockets. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 11:46:40 2014 (r270548) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 11:46:42 2014 (r270549) @@ -233,6 +233,12 @@ updated to include support for the &intel; Lynx Point KT AMT serial port. + A bug that would prevent + a &man.jail.8; from setting the correct IPv4 source address + with some operations that required + security.jail.allow_raw_sockets has been + fixed. + Virtualization Support From gjb at FreeBSD.org Mon Aug 25 11:46:45 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 11:46:44 +0000 (UTC) Subject: svn commit: r270550 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251146.s7PBkidJ044870@svn.freebsd.org> Author: gjb Date: Mon Aug 25 11:46:44 2014 New Revision: 270550 URL: http://svnweb.freebsd.org/changeset/base/270550 Log: Document r266816, $2b$ crypt format used by default. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 11:46:42 2014 (r270549) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 11:46:44 2014 (r270550) @@ -538,6 +538,9 @@ The &man.clang.1;/llvm suite has been updated to version 3.4.1. + The Blowfish password format + has been changed to $2b$ by default. + The &man.pmcstat.8; utility has been updated to include a new flag, -l, which ends event collection after the specified number of From gjb at FreeBSD.org Mon Aug 25 11:46:47 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 11:46:46 +0000 (UTC) Subject: svn commit: r270551 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251146.s7PBkka4044935@svn.freebsd.org> Author: gjb Date: Mon Aug 25 11:46:46 2014 New Revision: 270551 URL: http://svnweb.freebsd.org/changeset/base/270551 Log: Document r266888, amount of data collected for hwpmc(4) increased. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 11:46:44 2014 (r270550) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 11:46:46 2014 (r270551) @@ -541,6 +541,10 @@ The Blowfish password format has been changed to $2b$ by default. + The amount of data collected for + &man.hwpmc.4; has been updated to work with modern processors + and larger amounts of available memory. + The &man.pmcstat.8; utility has been updated to include a new flag, -l, which ends event collection after the specified number of From ae at FreeBSD.org Mon Aug 25 12:49:11 2014 From: ae at FreeBSD.org (Andrey V. Elsukov) Date: Mon, 25 Aug 2014 12:49:10 +0000 (UTC) Subject: svn commit: r270552 - in stable/10: sbin/geom/class/part sys/geom/part Message-ID: <201408251249.s7PCnAih076888@svn.freebsd.org> Author: ae Date: Mon Aug 25 12:49:10 2014 New Revision: 270552 URL: http://svnweb.freebsd.org/changeset/base/270552 Log: MFC r268407 (by gjb): Fix non-version text after .Fx macro usage. MFC r269487 (by issyl0): Add generic list, status, load and unload docs to gpart(8) - In the style of gmirror(8). PR: docs/191534 MFC r269852: 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. Modified: stable/10/sbin/geom/class/part/gpart.8 stable/10/sys/geom/part/g_part_mbr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/geom/class/part/gpart.8 ============================================================================== --- stable/10/sbin/geom/class/part/gpart.8 Mon Aug 25 11:46:46 2014 (r270551) +++ stable/10/sbin/geom/class/part/gpart.8 Mon Aug 25 12:49:10 2014 (r270552) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 1, 2014 +.Dd August 12, 2014 .Dt GPART 8 .Os .Sh NAME @@ -129,6 +129,14 @@ .Op Fl f Ar flags .Ar geom .\" +.Nm +.Cm list +.Nm +.Cm status +.Nm +.Cm load +.Nm +.Cm unload .Sh DESCRIPTION The .Nm @@ -467,6 +475,18 @@ See the section entitled below for a discussion about its use. .El +.It Cm list +See +.Xr geom 8 . +.It Cm status +See +.Xr geom 8 . +.It Cm load +See +.Xr geom 8 . +.It Cm unload +See +.Xr geom 8 . .El .Sh PARTITIONING SCHEMES Several partitioning schemes are supported by the @@ -551,7 +571,8 @@ The utility also allows the user to specify scheme-specific partition types for partition types that do not have symbolic names. Symbolic names currently understood and used by -.Fx are: +.Fx +are: .Bl -tag -width ".Cm dragonfly-disklabel64" .It Cm bios-boot The system partition dedicated to second stage of the boot loader program. @@ -1144,6 +1165,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: stable/10/sys/geom/part/g_part_mbr.c ============================================================================== --- stable/10/sys/geom/part/g_part_mbr.c Mon Aug 25 11:46:46 2014 (r270551) +++ stable/10/sys/geom/part/g_part_mbr.c Mon Aug 25 12:49:10 2014 (r270552) @@ -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 gjb at FreeBSD.org Mon Aug 25 13:15:20 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 13:15:19 +0000 (UTC) Subject: svn commit: r270555 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251315.s7PDFJoJ091762@svn.freebsd.org> Author: gjb Date: Mon Aug 25 13:15:19 2014 New Revision: 270555 URL: http://svnweb.freebsd.org/changeset/base/270555 Log: Document r267056, bsdinstall(8) enhancements. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 13:15:17 2014 (r270554) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 13:15:19 2014 (r270555) @@ -559,6 +559,13 @@ /var/tmp/temproot disappeared if there is nothing to compare. + The &os; installer, &man.bsdinstall.8;, + has been updated to include optional + &man.geli.8;-encrypted or &man.gmirror.8;-mirrored swap + devices when installing onto a full &man.zfs.8; filesystem. + Additionally, the parent &man.zfs.8; dataset is now configured + with lz4 compression enabled. + The default &man.newsyslog.conf.5; now includes files in the /etc/newsyslog.conf.d/ and From gjb at FreeBSD.org Mon Aug 25 13:15:18 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 13:15:17 +0000 (UTC) Subject: svn commit: r270554 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251315.s7PDFHAe091718@svn.freebsd.org> Author: gjb Date: Mon Aug 25 13:15:17 2014 New Revision: 270554 URL: http://svnweb.freebsd.org/changeset/base/270554 Log: Document r266953, silence error message if there is nothing to compare. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 13:15:14 2014 (r270553) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 13:15:17 2014 (r270554) @@ -554,6 +554,11 @@ ends event collection after the specified number of seconds. + The &man.mergemaster.8; utility has + been updated to avoid printing + /var/tmp/temproot + disappeared if there is nothing to compare. + The default &man.newsyslog.conf.5; now includes files in the /etc/newsyslog.conf.d/ and From gjb at FreeBSD.org Mon Aug 25 13:15:36 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 13:15:36 +0000 (UTC) Subject: svn commit: r270562 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251315.s7PDFaTu092131@svn.freebsd.org> Author: gjb Date: Mon Aug 25 13:15:35 2014 New Revision: 270562 URL: http://svnweb.freebsd.org/changeset/base/270562 Log: Document r267427, bhyve guest XSAVE support. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 13:15:33 2014 (r270561) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 13:15:35 2014 (r270562) @@ -260,6 +260,13 @@ Support for &os;/i386 guests has been added to &man.bhyve.4;. + + Support for virtualized + XSAVE has been added to &man.bhyve.4;, + allowing guest operating systems to use + XSAVE and + XSAVE-enabled features, such as + AVX. From gjb at FreeBSD.org Mon Aug 25 13:15:32 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 13:15:31 +0000 (UTC) Subject: svn commit: r270560 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251315.s7PDFVAr092006@svn.freebsd.org> Author: gjb Date: Mon Aug 25 13:15:31 2014 New Revision: 270560 URL: http://svnweb.freebsd.org/changeset/base/270560 Log: Fix indentation levels that are wrong, caused from a copy/paste mistake. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 13:15:29 2014 (r270559) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 13:15:31 2014 (r270560) @@ -224,27 +224,27 @@ &man.sysctl.8; on &intel; processors with Turbo Boost™ enabled has been fixed. - The &man.geom.uncompress.4; module is - built by default which, similar to &man.geom.uzip.4;, - provides support for compressed, read-only disk - images. - - The &man.uart.4; driver has been - updated to include support for the &intel; Lynx Point - KT AMT serial port. - - A bug that would prevent - a &man.jail.8; from setting the correct IPv4 source address - with some operations that required - security.jail.allow_raw_sockets has been - fixed. - - The &man.hwpmc.4; driver has been - updated to support core events from the Atom™ - Silvermont architecture. + The &man.geom.uncompress.4; module is + built by default which, similar to &man.geom.uzip.4;, + provides support for compressed, read-only disk + images. + + The &man.uart.4; driver has been + updated to include support for the &intel; Lynx Point + KT AMT serial port. + + A bug that would prevent + a &man.jail.8; from setting the correct IPv4 source address + with some operations that required + security.jail.allow_raw_sockets has been + fixed. + + The &man.hwpmc.4; driver has been + updated to support core events from the Atom™ + Silvermont architecture. - The &man.mfi.4; driver has been - updated to include support for unmapped I/O. + The &man.mfi.4; driver has been + updated to include support for unmapped I/O. Support for &os;/i386 guests has been added to &man.bhyve.4;. From gjb at FreeBSD.org Mon Aug 25 13:15:15 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 13:15:15 +0000 (UTC) Subject: svn commit: r270553 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251315.s7PDFFKm091669@svn.freebsd.org> Author: gjb Date: Mon Aug 25 13:15:14 2014 New Revision: 270553 URL: http://svnweb.freebsd.org/changeset/base/270553 Log: Document r266911, Atom Silvermont microarchitecture support in hwpmc(4). Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 12:49:10 2014 (r270552) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 13:15:14 2014 (r270553) @@ -239,6 +239,10 @@ security.jail.allow_raw_sockets has been fixed. + The &man.hwpmc.4; driver has been + updated to support core events from the Atom™ + Silvermont architecture. + Virtualization Support From gjb at FreeBSD.org Mon Aug 25 13:15:25 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 13:15:24 +0000 (UTC) Subject: svn commit: r270557 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251315.s7PDFOqm091854@svn.freebsd.org> Author: gjb Date: Mon Aug 25 13:15:24 2014 New Revision: 270557 URL: http://svnweb.freebsd.org/changeset/base/270557 Log: Document r267161, realpath(1): fail on non-directory containing '.' or '..' Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 13:15:21 2014 (r270556) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 13:15:24 2014 (r270557) @@ -575,6 +575,13 @@ /usr/local/etc/newsyslog.conf.d/ directories by default for &man.newsyslog.8;. + The &man.realpath.1; utility has been + updated to return ENOTDIR on paths + components . and .. that are + not directories, such as /dev/null/. or /dev/null/... + A new flag, onifconsole has been added to /etc/ttys. This allows the system to provide a login prompt via serial console if the From gjb at FreeBSD.org Mon Aug 25 13:15:34 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 13:15:34 +0000 (UTC) Subject: svn commit: r270561 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251315.s7PDFYKS092066@svn.freebsd.org> Author: gjb Date: Mon Aug 25 13:15:33 2014 New Revision: 270561 URL: http://svnweb.freebsd.org/changeset/base/270561 Log: Move r267399 note to the virtualization subsection. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 13:15:31 2014 (r270560) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 13:15:33 2014 (r270561) @@ -246,9 +246,6 @@ The &man.mfi.4; driver has been updated to include support for unmapped I/O. - Support for &os;/i386 guests has been - added to &man.bhyve.4;. - Virtualization Support @@ -260,6 +257,9 @@ The &man.bhyve.4; hypervisor now supports soft power-off functionality via the ACPI S5 state. + + Support for &os;/i386 guests has been + added to &man.bhyve.4;. From gjb at FreeBSD.org Mon Aug 25 13:15:38 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 13:15:38 +0000 (UTC) Subject: svn commit: r270563 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251315.s7PDFcPh092175@svn.freebsd.org> Author: gjb Date: Mon Aug 25 13:15:37 2014 New Revision: 270563 URL: http://svnweb.freebsd.org/changeset/base/270563 Log: Document r267450, bhyve(8) SMBIOS support and -U flag. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 13:15:35 2014 (r270562) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 13:15:37 2014 (r270563) @@ -602,6 +602,11 @@ PCI devices has been removed from &man.bhyve.8;. + The &man.bhyve.8; userland utility + has been updated to include SMBIOS support. A new flag has + been added, -U, which allows specifying the + UUID of the guest in the System Information structure. + The &man.mkimg.1; utility has been merged from &os;-CURRENT. From gjb at FreeBSD.org Mon Aug 25 13:15:22 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 13:15:22 +0000 (UTC) Subject: svn commit: r270556 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251315.s7PDFMHM091806@svn.freebsd.org> Author: gjb Date: Mon Aug 25 13:15:21 2014 New Revision: 270556 URL: http://svnweb.freebsd.org/changeset/base/270556 Log: Document r267084, unmapped I/O added to mfi(4). Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 13:15:19 2014 (r270555) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 13:15:21 2014 (r270556) @@ -243,6 +243,9 @@ updated to support core events from the Atom™ Silvermont architecture. + The &man.mfi.4; driver has been + updated to include support for unmapped I/O. + Virtualization Support From gjb at FreeBSD.org Mon Aug 25 13:15:27 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 13:15:27 +0000 (UTC) Subject: svn commit: r270558 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251315.s7PDFR9o091904@svn.freebsd.org> Author: gjb Date: Mon Aug 25 13:15:26 2014 New Revision: 270558 URL: http://svnweb.freebsd.org/changeset/base/270558 Log: Document r267341, legacy PCI support removed from bhyve(8). Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 13:15:24 2014 (r270557) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 13:15:26 2014 (r270558) @@ -588,6 +588,10 @@ device is an active kernel console, otherwise it is equivalent to off. + Support for legacy + PCI devices has been removed from + &man.bhyve.8;. + The &man.mkimg.1; utility has been merged from &os;-CURRENT. From gjb at FreeBSD.org Mon Aug 25 13:15:29 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 13:15:29 +0000 (UTC) Subject: svn commit: r270559 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251315.s7PDFTIh091955@svn.freebsd.org> Author: gjb Date: Mon Aug 25 13:15:29 2014 New Revision: 270559 URL: http://svnweb.freebsd.org/changeset/base/270559 Log: Document r267399, FreeBSD/i386 bhyve guest support. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 13:15:26 2014 (r270558) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 13:15:29 2014 (r270559) @@ -246,6 +246,9 @@ The &man.mfi.4; driver has been updated to include support for unmapped I/O. + Support for &os;/i386 guests has been + added to &man.bhyve.4;. + Virtualization Support From gjb at FreeBSD.org Mon Aug 25 13:15:42 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 13:15:42 +0000 (UTC) Subject: svn commit: r270565 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251315.s7PDFgUY092272@svn.freebsd.org> Author: gjb Date: Mon Aug 25 13:15:42 2014 New Revision: 270565 URL: http://svnweb.freebsd.org/changeset/base/270565 Log: Document r267477, tzdata2014e. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 13:15:40 2014 (r270564) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 13:15:42 2014 (r270565) @@ -643,14 +643,14 @@ The &man.nc.1; utility has been updated to match the version in OpenBSD 5.5. - The timezone database has been updated - to version tzdata2014c. - Sendmail has been updated to 8.14.9. OpenSSL has been updated to version 1.0.1h. + + The timezone database has been updated + to version tzdata2014e. From gjb at FreeBSD.org Mon Aug 25 13:15:40 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 13:15:40 +0000 (UTC) Subject: svn commit: r270564 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251315.s7PDFeJd092223@svn.freebsd.org> Author: gjb Date: Mon Aug 25 13:15:40 2014 New Revision: 270564 URL: http://svnweb.freebsd.org/changeset/base/270564 Log: Document r267457, hpt27xx(4) vendor (bug fix) update. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 13:15:37 2014 (r270563) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 13:15:40 2014 (r270564) @@ -246,6 +246,9 @@ The &man.mfi.4; driver has been updated to include support for unmapped I/O. + The &man.hpt27xx.4; driver has been + updated with various vendor-supplied bug fixes. + Virtualization Support From gjb at FreeBSD.org Mon Aug 25 14:13:23 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 14:13:23 +0000 (UTC) Subject: svn commit: r270566 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251413.s7PEDNg1022881@svn.freebsd.org> Author: gjb Date: Mon Aug 25 14:13:22 2014 New Revision: 270566 URL: http://svnweb.freebsd.org/changeset/base/270566 Log: Document r267694, cxgbe(4) rx buffer recycling fix. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 13:15:42 2014 (r270565) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 14:13:22 2014 (r270566) @@ -370,6 +370,10 @@ Preliminary support has been added to the &man.urtwn.4; driver for the Realtek RTL8188EUS and RTL8188ETV chipsets. + + A bug in the fast receiver buffer + recycle path has been fixed in the &man.cxgbe.4; + driver. From gjb at FreeBSD.org Mon Aug 25 14:13:25 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 14:13:25 +0000 (UTC) Subject: svn commit: r270567 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251413.s7PEDPZE022925@svn.freebsd.org> Author: gjb Date: Mon Aug 25 14:13:24 2014 New Revision: 270567 URL: http://svnweb.freebsd.org/changeset/base/270567 Log: Document r267734, send-pr(1) replaced with stub pointing to bugzilla. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 14:13:22 2014 (r270566) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 14:13:24 2014 (r270567) @@ -617,6 +617,13 @@ The &man.mkimg.1; utility has been merged from &os;-CURRENT. + The &os; Project has migrated + from the GNATS bug tracking system + to Bugzilla. The &man.send-pr.1; + utility used for submitting problem reports has been replaced + with a stub shell script that instructs to use the Bugzilla + web interface. + <filename>/etc/rc.d</filename> Scripts From gjb at FreeBSD.org Mon Aug 25 14:13:27 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 14:13:26 +0000 (UTC) Subject: svn commit: r270568 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251413.s7PEDQnw022972@svn.freebsd.org> Author: gjb Date: Mon Aug 25 14:13:26 2014 New Revision: 270568 URL: http://svnweb.freebsd.org/changeset/base/270568 Log: Document r267747, patch(1) --dry-run alias. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 14:13:24 2014 (r270567) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 14:13:26 2014 (r270568) @@ -624,6 +624,11 @@ with a stub shell script that instructs to use the Bugzilla web interface. + The &man.patch.1; utility has been + updated to include a --dry-run flag, which + is equivalent to --check and + -C. + <filename>/etc/rc.d</filename> Scripts From gjb at FreeBSD.org Mon Aug 25 14:13:29 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 14:13:28 +0000 (UTC) Subject: svn commit: r270569 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251413.s7PEDSJN023070@svn.freebsd.org> Author: gjb Date: Mon Aug 25 14:13:28 2014 New Revision: 270569 URL: http://svnweb.freebsd.org/changeset/base/270569 Log: Document r267771, sctp binding bug. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 14:13:26 2014 (r270568) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 14:13:28 2014 (r270569) @@ -383,6 +383,10 @@ Support for the UDP-Lite protocol (RFC 3828) has been added to the IPv4 and IPv6 stacks. + + A bug in &man.sctp.4; that would allow + two listening sockets bound to the same port has been + fixed. From gjb at FreeBSD.org Mon Aug 25 14:17:15 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 14:17:15 +0000 (UTC) Subject: svn commit: r270570 - in stable/10/release/doc: en_US.ISO8859-1/relnotes share/xml Message-ID: <201408251417.s7PEHFCd023852@svn.freebsd.org> Author: gjb Date: Mon Aug 25 14:17:14 2014 New Revision: 270570 URL: http://svnweb.freebsd.org/changeset/base/270570 Log: Document r267849, cxgbe(4) T4 and T5 firmwares update. Add Chelsio vendor.ent entry. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml stable/10/release/doc/share/xml/vendor.ent Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 14:13:28 2014 (r270569) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 14:17:14 2014 (r270570) @@ -374,6 +374,11 @@ A bug in the fast receiver buffer recycle path has been fixed in the &man.cxgbe.4; driver. + + The bundled &man.cxgbe.4; firmware for + T4 and T5 cards has been updated to version + 1.11.27.0. Modified: stable/10/release/doc/share/xml/vendor.ent ============================================================================== --- stable/10/release/doc/share/xml/vendor.ent Mon Aug 25 14:13:28 2014 (r270569) +++ stable/10/release/doc/share/xml/vendor.ent Mon Aug 25 14:17:14 2014 (r270570) @@ -7,3 +7,5 @@ Please keep the entity list sorted alphabetically. --> + + From marcel at FreeBSD.org Mon Aug 25 15:15:59 2014 From: marcel at FreeBSD.org (Marcel Moolenaar) Date: Mon, 25 Aug 2014 15:15:59 +0000 (UTC) Subject: svn commit: r270573 - stable/10/sys/ia64/ia64 Message-ID: <201408251515.s7PFFxPO054376@svn.freebsd.org> Author: marcel Date: Mon Aug 25 15:15:59 2014 New Revision: 270573 URL: http://svnweb.freebsd.org/changeset/base/270573 Log: Make sure the psr field in the trapframe (which holds the value of cr.ipsr) is properly synthesized for the EPC syscall. Properly synthesized in this case means that the bank number (BN bitfield) is set to 1. This is needed because the move-from-PSR instruction does copy all bits! In this case the BN bitfield was not copied. While normally this is not a problem, because when we leave the kernel via the EPC syscall path again, we don't actually care about the BN bitfield. We restore PSR with a move-to-PSR instruction, which also doesn't cover the BN bitfield. There is however a scenario where we enter the kernel via the EPC syscall path and leave the kernel via the exception/interrupt path. That path uses the RFI (Return-From-Interrupt) instruction and it restores all bits. What happens in that case is that we don't properly switch to register bank 1 and any exception/interrupt that happens while running in bank 0 clobbers the process' (or kernel's) banked registers. This is because the CPU switches to bank 0 on an exception/interrupt so that there are 16 general registers available for constructing a trapframe and saving the context. Consequently: normal code should always use register bank 1. This bug has been present since 2003 (11 years) and has been the cause for many "unexplained" kernel panics. It says something about how often we hit this problem on the one hand and how tricky it was to find it. Many thanks to: clusteradm@ for enabling me to track this down! Modified: stable/10/sys/ia64/ia64/syscall.S Modified: stable/10/sys/ia64/ia64/syscall.S ============================================================================== --- stable/10/sys/ia64/ia64/syscall.S Mon Aug 25 14:58:36 2014 (r270572) +++ stable/10/sys/ia64/ia64/syscall.S Mon Aug 25 15:15:59 2014 (r270573) @@ -296,7 +296,7 @@ ENTRY_NOPROFILE(epc_syscall, 8) { .mmi st8 [r30]=r19,16 // rnat st8 [r31]=r0,16 // __spare - nop 0 + dep r11=-1,r11,44,1 // Set psr.bn=1 ;; } { .mmi From glebius at FreeBSD.org Mon Aug 25 15:40:39 2014 From: glebius at FreeBSD.org (Gleb Smirnoff) Date: Mon, 25 Aug 2014 15:40:38 +0000 (UTC) Subject: svn commit: r270574 - in stable/10/sys: net netpfil/pf Message-ID: <201408251540.s7PFec3t066282@svn.freebsd.org> Author: glebius Date: Mon Aug 25 15:40:37 2014 New Revision: 270574 URL: http://svnweb.freebsd.org/changeset/base/270574 Log: Merge r269998 from head: - 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: stable/10/sys/net/pfvar.h stable/10/sys/netpfil/pf/pf.c stable/10/sys/netpfil/pf/pf.h stable/10/sys/netpfil/pf/pf_ioctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/pfvar.h ============================================================================== --- stable/10/sys/net/pfvar.h Mon Aug 25 15:15:59 2014 (r270573) +++ stable/10/sys/net/pfvar.h Mon Aug 25 15:40:37 2014 (r270574) @@ -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 { @@ -1706,8 +1673,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: stable/10/sys/netpfil/pf/pf.c ============================================================================== --- stable/10/sys/netpfil/pf/pf.c Mon Aug 25 15:15:59 2014 (r270573) +++ stable/10/sys/netpfil/pf/pf.c Mon Aug 25 15:40:37 2014 (r270574) @@ -109,7 +109,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); @@ -470,13 +470,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++; } @@ -524,7 +524,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); @@ -560,7 +560,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)) { @@ -610,7 +611,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); @@ -646,7 +647,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); @@ -665,12 +667,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); } } @@ -689,8 +691,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 @@ -1206,7 +1207,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); @@ -1223,7 +1224,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) % (V_pf_hashmask + 1))]; @@ -1250,7 +1251,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)]; @@ -1294,7 +1295,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)]; @@ -1522,6 +1523,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 @@ -1616,7 +1619,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); } /* @@ -3457,7 +3460,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: stable/10/sys/netpfil/pf/pf.h ============================================================================== --- stable/10/sys/netpfil/pf/pf.h Mon Aug 25 15:15:59 2014 (r270573) +++ stable/10/sys/netpfil/pf/pf.h Mon Aug 25 15:40:37 2014 (r270574) @@ -146,7 +146,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: stable/10/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- stable/10/sys/netpfil/pf/pf_ioctl.c Mon Aug 25 15:15:59 2014 (r270573) +++ stable/10/sys/netpfil/pf/pf_ioctl.c Mon Aug 25 15:40:37 2014 (r270574) @@ -261,6 +261,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. */ @@ -1781,8 +1790,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; @@ -1803,9 +1836,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); @@ -3151,7 +3187,6 @@ DIOCCHANGEADDR_error: pf_clear_srcnodes(NULL); pf_purge_expired_src_nodes(); - V_pf_status.src_nodes = 0; break; } @@ -3449,6 +3484,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 glebius at FreeBSD.org Mon Aug 25 15:48:28 2014 From: glebius at FreeBSD.org (Gleb Smirnoff) Date: Mon, 25 Aug 2014 15:48:28 +0000 (UTC) Subject: svn commit: r270575 - stable/10/sys/netpfil/pf Message-ID: <201408251548.s7PFmSUj069872@svn.freebsd.org> Author: glebius Date: Mon Aug 25 15:48:28 2014 New Revision: 270575 URL: http://svnweb.freebsd.org/changeset/base/270575 Log: Merge 270010 from head: 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: stable/10/sys/netpfil/pf/pf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netpfil/pf/pf.c ============================================================================== --- stable/10/sys/netpfil/pf/pf.c Mon Aug 25 15:40:37 2014 (r270574) +++ stable/10/sys/netpfil/pf/pf.c Mon Aug 25 15:48:28 2014 (r270575) @@ -6069,6 +6069,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 glebius at FreeBSD.org Mon Aug 25 15:49:42 2014 From: glebius at FreeBSD.org (Gleb Smirnoff) Date: Mon, 25 Aug 2014 15:49:41 +0000 (UTC) Subject: svn commit: r270576 - stable/10/sys/netpfil/pf Message-ID: <201408251549.s7PFnfv0070144@svn.freebsd.org> Author: glebius Date: Mon Aug 25 15:49:41 2014 New Revision: 270576 URL: http://svnweb.freebsd.org/changeset/base/270576 Log: Merge r270022 from head: 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: stable/10/sys/netpfil/pf/pf.c stable/10/sys/netpfil/pf/pf.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netpfil/pf/pf.c ============================================================================== --- stable/10/sys/netpfil/pf/pf.c Mon Aug 25 15:48:28 2014 (r270575) +++ stable/10/sys/netpfil/pf/pf.c Mon Aug 25 15:49:41 2014 (r270576) @@ -265,8 +265,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 *, @@ -2960,31 +2958,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) { @@ -3547,6 +3520,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; @@ -3612,7 +3598,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: stable/10/sys/netpfil/pf/pf.h ============================================================================== --- stable/10/sys/netpfil/pf/pf.h Mon Aug 25 15:48:28 2014 (r270575) +++ stable/10/sys/netpfil/pf/pf.h Mon Aug 25 15:49:41 2014 (r270576) @@ -125,7 +125,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", \ @@ -143,6 +144,7 @@ enum { PF_ADDR_ADDRMASK, PF_ADDR_NOROUTE "state-limit", \ "src-limit", \ "synproxy", \ + "map-failed", \ NULL \ } From glebius at FreeBSD.org Mon Aug 25 15:51:08 2014 From: glebius at FreeBSD.org (Gleb Smirnoff) Date: Mon, 25 Aug 2014 15:51:08 +0000 (UTC) Subject: svn commit: r270577 - stable/10/sys/netpfil/pf Message-ID: <201408251551.s7PFp8Bp073288@svn.freebsd.org> Author: glebius Date: Mon Aug 25 15:51:07 2014 New Revision: 270577 URL: http://svnweb.freebsd.org/changeset/base/270577 Log: Merge r270023 from head: Do not lookup source node twice when pf_map_addr() is used. PR: 184003 Submitted by: Kajetan Staszkiewicz Sponsored by: InnoGames GmbH Modified: stable/10/sys/netpfil/pf/pf.c stable/10/sys/netpfil/pf/pf_lb.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netpfil/pf/pf.c ============================================================================== --- stable/10/sys/netpfil/pf/pf.c Mon Aug 25 15:49:41 2014 (r270576) +++ stable/10/sys/netpfil/pf/pf.c Mon Aug 25 15:51:07 2014 (r270577) @@ -3521,8 +3521,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: stable/10/sys/netpfil/pf/pf_lb.c ============================================================================== --- stable/10/sys/netpfil/pf/pf_lb.c Mon Aug 25 15:49:41 2014 (r270576) +++ stable/10/sys/netpfil/pf/pf_lb.c Mon Aug 25 15:51:07 2014 (r270577) @@ -307,22 +307,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 gjb at FreeBSD.org Mon Aug 25 16:25:03 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 16:25:02 +0000 (UTC) Subject: svn commit: r270578 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251625.s7PGP2Fa089421@svn.freebsd.org> Author: gjb Date: Mon Aug 25 16:25:02 2014 New Revision: 270578 URL: http://svnweb.freebsd.org/changeset/base/270578 Log: Document r267878, bsdgrep(1) pattern matching bug. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 15:51:07 2014 (r270577) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 16:25:02 2014 (r270578) @@ -638,6 +638,10 @@ is equivalent to --check and -C. + A bug in &man.bsdgrep.1; that would + prevent patterns from being matched under certain conditions + has been fixed. + <filename>/etc/rc.d</filename> Scripts From gjb at FreeBSD.org Mon Aug 25 16:25:05 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 16:25:04 +0000 (UTC) Subject: svn commit: r270579 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251625.s7PGP4c9089465@svn.freebsd.org> Author: gjb Date: Mon Aug 25 16:25:04 2014 New Revision: 270579 URL: http://svnweb.freebsd.org/changeset/base/270579 Log: Document r267979, procstat(1) '-r' and '-H' flags. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 16:25:02 2014 (r270578) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 16:25:04 2014 (r270579) @@ -642,6 +642,20 @@ prevent patterns from being matched under certain conditions has been fixed. + The &man.procstat.1; utility has been + updated to include two new flags, -r and + -H. When -r is + specified, &man.procstat.1; will print current resource usage + about the process(es). When -H is + specified, &man.procstat.1; will print information about + threads rather than the process(es). + + + The -H flag is currently only used + with -r to display resource usage for + individual threads, rather than the entire process. + + <filename>/etc/rc.d</filename> Scripts From gjb at FreeBSD.org Mon Aug 25 16:25:13 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 16:25:12 +0000 (UTC) Subject: svn commit: r270583 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251625.s7PGPCMH089662@svn.freebsd.org> Author: gjb Date: Mon Aug 25 16:25:12 2014 New Revision: 270583 URL: http://svnweb.freebsd.org/changeset/base/270583 Log: Fix revision sorting for r268161. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 16:25:10 2014 (r270582) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 16:25:12 2014 (r270583) @@ -627,9 +627,6 @@ been added, -U, which allows specifying the UUID of the guest in the System Information structure. - The &man.mkimg.1; utility has been - merged from &os;-CURRENT. - The &os; Project has migrated from the GNATS bug tracking system to Bugzilla. The &man.send-pr.1; @@ -664,6 +661,9 @@ updated to include a new flag, -u, which enables unbuffered output when specified. + The &man.mkimg.1; utility has been + merged from &os;-CURRENT. + <filename>/etc/rc.d</filename> Scripts From gjb at FreeBSD.org Mon Aug 25 16:25:07 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 16:25:06 +0000 (UTC) Subject: svn commit: r270580 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251625.s7PGP62e089514@svn.freebsd.org> Author: gjb Date: Mon Aug 25 16:25:06 2014 New Revision: 270580 URL: http://svnweb.freebsd.org/changeset/base/270580 Log: Document r268019, sed(1) '-u' flag. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 16:25:04 2014 (r270579) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 16:25:06 2014 (r270580) @@ -656,6 +656,10 @@ individual threads, rather than the entire process. + The &man.sed.1; utility has been + updated to include a new flag, -u, which + enables unbuffered output when specified. + <filename>/etc/rc.d</filename> Scripts From gjb at FreeBSD.org Mon Aug 25 16:25:09 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 16:25:08 +0000 (UTC) Subject: svn commit: r270581 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251625.s7PGP8BG089567@svn.freebsd.org> Author: gjb Date: Mon Aug 25 16:25:08 2014 New Revision: 270581 URL: http://svnweb.freebsd.org/changeset/base/270581 Log: Document r268046, oce(4) vendor updates. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 16:25:06 2014 (r270580) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 16:25:08 2014 (r270581) @@ -249,6 +249,10 @@ The &man.hpt27xx.4; driver has been updated with various vendor-supplied bug fixes. + The &man.oce.4; driver has been updated + with vendor-supplied fixes for big endian support, and 20GB/s + and 25GB/s link speeds. + Virtualization Support From gjb at FreeBSD.org Mon Aug 25 16:25:15 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 16:25:14 +0000 (UTC) Subject: svn commit: r270584 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251625.s7PGPEnF089702@svn.freebsd.org> Author: gjb Date: Mon Aug 25 16:25:14 2014 New Revision: 270584 URL: http://svnweb.freebsd.org/changeset/base/270584 Log: Document r268515, file(1) and libmagic(3) update to 5.19. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 16:25:12 2014 (r270583) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 16:25:14 2014 (r270584) @@ -706,6 +706,9 @@ The timezone database has been updated to version tzdata2014e. + + The &man.file.1; utility and + &man.libmagic.3; library have been updated to 5.19. From gjb at FreeBSD.org Mon Aug 25 16:25:11 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 16:25:10 +0000 (UTC) Subject: svn commit: r270582 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251625.s7PGPAxB089620@svn.freebsd.org> Author: gjb Date: Mon Aug 25 16:25:10 2014 New Revision: 270582 URL: http://svnweb.freebsd.org/changeset/base/270582 Log: Document r268098, service(8) directory traversal check. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 16:25:08 2014 (r270581) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 16:25:10 2014 (r270582) @@ -675,6 +675,10 @@ would not be created if _alias1 was not defined. + + The &man.service.8; utility has been + updated to check that the &man.rc.d.8; directory exists + before traversing the directory. From gjb at FreeBSD.org Mon Aug 25 16:25:17 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 16:25:16 +0000 (UTC) Subject: svn commit: r270585 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251625.s7PGPGQP089751@svn.freebsd.org> Author: gjb Date: Mon Aug 25 16:25:16 2014 New Revision: 270585 URL: http://svnweb.freebsd.org/changeset/base/270585 Log: Document r268700, camcontrol(8) 'persist' command. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 16:25:14 2014 (r270584) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 16:25:16 2014 (r270585) @@ -664,6 +664,11 @@ The &man.mkimg.1; utility has been merged from &os;-CURRENT. + The &man.camcontrol.8; has been updated + to include a new persist command, which + allows issuing SCSI PERSISTENT RESERVE IN + and SCSI PERSISTENT RESERVE OUT. + <filename>/etc/rc.d</filename> Scripts From gjb at FreeBSD.org Mon Aug 25 16:25:19 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 16:25:18 +0000 (UTC) Subject: svn commit: r270586 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251625.s7PGPIwo089808@svn.freebsd.org> Author: gjb Date: Mon Aug 25 16:25:18 2014 New Revision: 270586 URL: http://svnweb.freebsd.org/changeset/base/270586 Log: Document r268791, gstat(8) '-p' flag. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 16:25:16 2014 (r270585) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 16:25:18 2014 (r270586) @@ -669,6 +669,10 @@ allows issuing SCSI PERSISTENT RESERVE IN and SCSI PERSISTENT RESERVE OUT. + The &man.gstat.8; utility has been + updated to include a new flag, -p, which + displays only physical providers when specified. + <filename>/etc/rc.d</filename> Scripts From gjb at FreeBSD.org Mon Aug 25 17:30:16 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 17:30:16 +0000 (UTC) Subject: svn commit: r270590 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251730.s7PHUGFT023457@svn.freebsd.org> Author: gjb Date: Mon Aug 25 17:30:16 2014 New Revision: 270590 URL: http://svnweb.freebsd.org/changeset/base/270590 Log: Document r268899, byacc(1) update to 20140422. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 17:08:38 2014 (r270589) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 17:30:16 2014 (r270590) @@ -718,6 +718,9 @@ The &man.file.1; utility and &man.libmagic.3; library have been updated to 5.19. + + The &man.byacc.1; parser has been + updated to version 20140422. From gjb at FreeBSD.org Mon Aug 25 17:30:18 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 17:30:18 +0000 (UTC) Subject: svn commit: r270591 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251730.s7PHUIkB023505@svn.freebsd.org> Author: gjb Date: Mon Aug 25 17:30:18 2014 New Revision: 270591 URL: http://svnweb.freebsd.org/changeset/base/270591 Log: Document r268903, kldstat(8) '-q' support when using '-n module.ko' Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 17:30:16 2014 (r270590) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 17:30:18 2014 (r270591) @@ -673,6 +673,11 @@ updated to include a new flag, -p, which displays only physical providers when specified. + The &man.kldstat.8; utility has been + updated to allow -q to be specified when + also specifying -n + module.ko. + <filename>/etc/rc.d</filename> Scripts From gjb at FreeBSD.org Mon Aug 25 17:30:20 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 17:30:20 +0000 (UTC) Subject: svn commit: r270592 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251730.s7PHUKsn023546@svn.freebsd.org> Author: gjb Date: Mon Aug 25 17:30:20 2014 New Revision: 270592 URL: http://svnweb.freebsd.org/changeset/base/270592 Log: Document r268932, bhyve(4) zfs boot Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 17:30:18 2014 (r270591) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 17:30:20 2014 (r270592) @@ -274,6 +274,9 @@ XSAVE and XSAVE-enabled features, such as AVX. + + The &man.bhyve.4; hypervisor now + supports booting from a &man.zfs.8; filesystem. From gjb at FreeBSD.org Mon Aug 25 17:30:23 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 17:30:22 +0000 (UTC) Subject: svn commit: r270593 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251730.s7PHUMtH023596@svn.freebsd.org> Author: gjb Date: Mon Aug 25 17:30:21 2014 New Revision: 270593 URL: http://svnweb.freebsd.org/changeset/base/270593 Log: Document r268933, virtio_random(4). Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 17:30:20 2014 (r270592) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 17:30:21 2014 (r270593) @@ -277,6 +277,10 @@ The &man.bhyve.4; hypervisor now supports booting from a &man.zfs.8; filesystem. + + A new driver, &man.virtio_random.4;, + has been added, which allows &os; virtual machines to + harvest entropy from the hypervisor. From gjb at FreeBSD.org Mon Aug 25 17:30:24 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 17:30:24 +0000 (UTC) Subject: svn commit: r270594 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251730.s7PHUO76023660@svn.freebsd.org> Author: gjb Date: Mon Aug 25 17:30:23 2014 New Revision: 270594 URL: http://svnweb.freebsd.org/changeset/base/270594 Log: Document r269024, lldb update to r202189. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 17:30:21 2014 (r270593) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 17:30:23 2014 (r270594) @@ -709,10 +709,6 @@ The &man.xz.1; utility has been updated to a post-5.0.5 snapshot. - The &man.lldb.1; debugging library has - been updated to the r196322 snapshot. - OpenSSH has been updated to version 6.6p1. @@ -733,6 +729,10 @@ The &man.byacc.1; parser has been updated to version 20140422. + + The &man.lldb.1; debugging library has + been updated to the r202189 snapshot. From gjb at FreeBSD.org Mon Aug 25 17:30:26 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 17:30:26 +0000 (UTC) Subject: svn commit: r270595 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251730.s7PHUQk3023704@svn.freebsd.org> Author: gjb Date: Mon Aug 25 17:30:25 2014 New Revision: 270595 URL: http://svnweb.freebsd.org/changeset/base/270595 Log: Document r269177, fixed- and dynamically-allocated support in mkimg(1) for VMDK and VHD files. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 17:30:23 2014 (r270594) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 17:30:25 2014 (r270595) @@ -685,6 +685,11 @@ also specifying -n module.ko. + The &man.mkimg.1; utility has been + updated to include support for both fixed- and + dynamically-allocated images for the VHD + and VMDK formats. + <filename>/etc/rc.d</filename> Scripts From gjb at FreeBSD.org Mon Aug 25 17:30:30 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 17:30:29 +0000 (UTC) Subject: svn commit: r270597 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251730.s7PHUTP7023800@svn.freebsd.org> Author: gjb Date: Mon Aug 25 17:30:29 2014 New Revision: 270597 URL: http://svnweb.freebsd.org/changeset/base/270597 Log: Document r269220, save-entropy.sh no longer harvests entropy within jail(8). Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 17:30:27 2014 (r270596) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 17:30:29 2014 (r270597) @@ -693,6 +693,10 @@ dynamically-allocated images for the VHD and VMDK formats. + The &man.random.4; entropy collection + script, /usr/libexec/save-entropy, no + longer runs within &man.jail.8; environments. + <filename>/etc/rc.d</filename> Scripts From gjb at FreeBSD.org Mon Aug 25 17:30:32 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 17:30:31 +0000 (UTC) Subject: svn commit: r270598 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251730.s7PHUVGI023843@svn.freebsd.org> Author: gjb Date: Mon Aug 25 17:30:31 2014 New Revision: 270598 URL: http://svnweb.freebsd.org/changeset/base/270598 Log: Document r269257, ldns/unbound update. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 17:30:29 2014 (r270597) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 17:30:31 2014 (r270598) @@ -745,6 +745,10 @@ The &man.lldb.1; debugging library has been updated to the r202189 snapshot. + + The &man.unbound.8; caching resolver and + ldns have been updated to version + 1.4.22. From gjb at FreeBSD.org Mon Aug 25 17:30:28 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 17:30:28 +0000 (UTC) Subject: svn commit: r270596 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251730.s7PHUSt5023751@svn.freebsd.org> Author: gjb Date: Mon Aug 25 17:30:27 2014 New Revision: 270596 URL: http://svnweb.freebsd.org/changeset/base/270596 Log: Document r269196, em(4) update to 7.4.2. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 17:30:25 2014 (r270595) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 17:30:27 2014 (r270596) @@ -390,6 +390,9 @@ vendor="&chelsio;">The bundled &man.cxgbe.4; firmware for T4 and T5 cards has been updated to version 1.11.27.0. + + The &man.em.4; driver has been + updated to version 7.4.2. From gjb at FreeBSD.org Mon Aug 25 17:30:34 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 17:30:33 +0000 (UTC) Subject: svn commit: r270599 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251730.s7PHUXbB023887@svn.freebsd.org> Author: gjb Date: Mon Aug 25 17:30:33 2014 New Revision: 270599 URL: http://svnweb.freebsd.org/changeset/base/270599 Log: Document r269298, max SCSI ports in ctl(4). Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 17:30:31 2014 (r270598) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 17:30:33 2014 (r270599) @@ -439,6 +439,10 @@ driver has been updated to include 32-bit &man.ioctl.2; support, allowing 32-bit applications to run on a 64-bit system. + + The maximum number of + SCSI ports in the &man.ctl.4; driver has + been increased from 32 to 128. From ian at FreeBSD.org Mon Aug 25 17:31:07 2014 From: ian at FreeBSD.org (Ian Lepore) Date: Mon, 25 Aug 2014 17:31:07 +0000 (UTC) Subject: svn commit: r270600 - stable/10 Message-ID: <201408251731.s7PHV7K2024235@svn.freebsd.org> Author: ian Date: Mon Aug 25 17:31:06 2014 New Revision: 270600 URL: http://svnweb.freebsd.org/changeset/base/270600 Log: Revert r270079 which was MFC of r269688, build libohash while bootstrapping. The changes to split the ohash code out of m4 into its own library haven't been MFC'd, so this change was causing an error during bootstrap when building stable-10. Submitted by: Dai Sieh Pointy hat to: ian Modified: stable/10/Makefile.inc1 Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Mon Aug 25 17:30:33 2014 (r270599) +++ stable/10/Makefile.inc1 Mon Aug 25 17:31:06 2014 (r270600) @@ -1228,8 +1228,7 @@ _sed= usr.bin/sed .endif .if ${BOOTSTRAPPING} < 1000002 -_m4= lib/libohash \ - usr.bin/m4 +_m4= usr.bin/m4 .endif .if ${BOOTSTRAPPING} < 1000013 From gjb at FreeBSD.org Mon Aug 25 17:53:04 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 17:53:04 +0000 (UTC) Subject: svn commit: r270602 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251753.s7PHr48T037041@svn.freebsd.org> Author: gjb Date: Mon Aug 25 17:53:03 2014 New Revision: 270602 URL: http://svnweb.freebsd.org/changeset/base/270602 Log: Document r269398, NFSv4.1 Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 17:53:01 2014 (r270601) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 17:53:03 2014 (r270602) @@ -736,6 +736,9 @@ + The &man.nfsd.8; server update to 4.1 + has merged from &os;-CURRENT. + <filename>/etc/rc.d</filename> Scripts From gjb at FreeBSD.org Mon Aug 25 17:53:02 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 17:53:02 +0000 (UTC) Subject: svn commit: r270601 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251753.s7PHr2C0036995@svn.freebsd.org> Author: gjb Date: Mon Aug 25 17:53:01 2014 New Revision: 270601 URL: http://svnweb.freebsd.org/changeset/base/270601 Log: Document r269397, vmrun.sh synced with head/. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 17:31:06 2014 (r270600) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 17:53:01 2014 (r270601) @@ -701,6 +701,41 @@ script, /usr/libexec/save-entropy, no longer runs within &man.jail.8; environments. + The &man.bhyve.8; wrapper script, + /usr/share/examples/bhyve/vmrun.sh, + has been synced with &os;-CURRENT. + + This update includes: + + + + A new flag, -e, has been added, + which is used to set &man.loader.8; environment + variables. + + + + A new flag, -C, has been added, + which is used to specify the guest console device. + + + + A new flag, -H, has been added, + which is used to pass the host path to + &man.bhyveload.8;. + + + + Support for multiple disk and &man.tap.4; devices + has been added. + + + + The -I flag has been + removed. + + + <filename>/etc/rc.d</filename> Scripts From ian at FreeBSD.org Mon Aug 25 18:45:16 2014 From: ian at FreeBSD.org (Ian Lepore) Date: Mon, 25 Aug 2014 18:45:15 +0000 (UTC) Subject: svn commit: r270606 - stable/10/contrib/gcc/config/arm Message-ID: <201408251845.s7PIjFvx064948@svn.freebsd.org> Author: ian Date: Mon Aug 25 18:45:15 2014 New Revision: 270606 URL: http://svnweb.freebsd.org/changeset/base/270606 Log: MFC r268994: C++ exception/unwind handling fix Add FreeBSD to the list of environments that needs to handle R_ARM_TARGET2 relocations in unwind data as pc-relative indirect references. Note that the commit log for r269792 incorrectly claims that it includes this change, but I apparently fumbled it somehow, so this is the real MFC. Modified: stable/10/contrib/gcc/config/arm/unwind-arm.h Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/gcc/config/arm/unwind-arm.h ============================================================================== --- stable/10/contrib/gcc/config/arm/unwind-arm.h Mon Aug 25 18:34:23 2014 (r270605) +++ stable/10/contrib/gcc/config/arm/unwind-arm.h Mon Aug 25 18:45:15 2014 (r270606) @@ -232,7 +232,7 @@ extern "C" { if (!tmp) return 0; -#if defined(linux) || defined(__NetBSD__) +#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__) /* Pc-relative indirect. */ tmp += ptr; tmp = *(_Unwind_Word *) tmp; From gjb at FreeBSD.org Mon Aug 25 18:52:42 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 18:52:42 +0000 (UTC) Subject: svn commit: r270607 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251852.s7PIqgam069924@svn.freebsd.org> Author: gjb Date: Mon Aug 25 18:52:41 2014 New Revision: 270607 URL: http://svnweb.freebsd.org/changeset/base/270607 Log: Document r269432, ttyu0 and ttyu1 default to 'onifconsole' on ia64. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 18:45:15 2014 (r270606) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 18:52:41 2014 (r270607) @@ -739,6 +739,12 @@ The &man.nfsd.8; server update to 4.1 has merged from &os;-CURRENT. + The serial terminals + ttyu0 and ttyu1 have + been updated to onifconsole by default in + &man.ttys.5;, which either can be the serial console, + depending on the platform. + <filename>/etc/rc.d</filename> Scripts From gjb at FreeBSD.org Mon Aug 25 18:52:44 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 18:52:44 +0000 (UTC) Subject: svn commit: r270608 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251852.s7PIqi4B069968@svn.freebsd.org> Author: gjb Date: Mon Aug 25 18:52:43 2014 New Revision: 270608 URL: http://svnweb.freebsd.org/changeset/base/270608 Log: Document r269651, restore(8) fix when restoring UFS dump to ZFS filesystem. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 18:52:41 2014 (r270607) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 18:52:43 2014 (r270608) @@ -471,6 +471,12 @@ OpenSolaris, and adapted for &os;. This change allows parallel disk scanning, which can reduce &man.zpool.8; overall import time in some workloads. + + The &man.restore.8; utility has been + updated to prevent assertion failures when restoring + a UFS filesystem dump to + a ZFS filesystem by writing restored + files in block sizes that are a multiple of 1024. From gjb at FreeBSD.org Mon Aug 25 18:52:48 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 18:52:48 +0000 (UTC) Subject: svn commit: r270610 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251852.s7PIqmhj070060@svn.freebsd.org> Author: gjb Date: Mon Aug 25 18:52:47 2014 New Revision: 270610 URL: http://svnweb.freebsd.org/changeset/base/270610 Log: Document r269774, new zfs(8) sysctls. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 18:52:45 2014 (r270609) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 18:52:47 2014 (r270610) @@ -477,6 +477,27 @@ a UFS filesystem dump to a ZFS filesystem by writing restored files in block sizes that are a multiple of 1024. + + Two &man.sysctl.8;s have been added + to the &man.zfs.8; filesystem: + + + + + vfs.zfs.mg_fragmentation_threshold: The + percentage of the metaslab group size that should be + considered eligible for allocation, unless all metaslab + groups within the metaslab class have also crossed this + threshold. + + + + + vfs.zfs.metaslab.fragmentation_threshold: The + maximum percentage of metaslab fragmentation level to + keep their active state + + From gjb at FreeBSD.org Mon Aug 25 18:52:50 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 18:52:50 +0000 (UTC) Subject: svn commit: r270611 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251852.s7PIqojC070113@svn.freebsd.org> Author: gjb Date: Mon Aug 25 18:52:49 2014 New Revision: 270611 URL: http://svnweb.freebsd.org/changeset/base/270611 Log: Document r269800, ping6(8) itimer reset when low interval and small number of packets. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 18:52:47 2014 (r270610) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 18:52:49 2014 (r270611) @@ -772,6 +772,13 @@ &man.ttys.5;, which either can be the serial console, depending on the platform. + The &man.ping6.8; utility has been + updated to reset itimer when the maximum + number of packets to send have been reached. This prevents + &man.ping6.8; from exiting when the interval in set to a small + value and a low number of packets to send has been + specified. + <filename>/etc/rc.d</filename> Scripts From gjb at FreeBSD.org Mon Aug 25 18:52:46 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 18:52:46 +0000 (UTC) Subject: svn commit: r270609 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251852.s7PIqkSY070013@svn.freebsd.org> Author: gjb Date: Mon Aug 25 18:52:45 2014 New Revision: 270609 URL: http://svnweb.freebsd.org/changeset/base/270609 Log: Document r269686, OpenSSL update to 1.0.1i. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 18:52:43 2014 (r270608) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 18:52:45 2014 (r270609) @@ -784,9 +784,6 @@ Sendmail has been updated to 8.14.9. - OpenSSL has - been updated to version 1.0.1h. - The timezone database has been updated to version tzdata2014e. @@ -803,6 +800,9 @@ The &man.unbound.8; caching resolver and ldns have been updated to version 1.4.22. + + OpenSSL has + been updated to version 1.0.1i. From gjb at FreeBSD.org Mon Aug 25 18:52:52 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 18:52:52 +0000 (UTC) Subject: svn commit: r270612 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251852.s7PIqq2d070159@svn.freebsd.org> Author: gjb Date: Mon Aug 25 18:52:51 2014 New Revision: 270612 URL: http://svnweb.freebsd.org/changeset/base/270612 Log: Document r269805, extra ifconfig(8) arguments are passable to jail(8) ip4.addr and ip6.addr parameters. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 18:52:49 2014 (r270611) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 18:52:51 2014 (r270612) @@ -779,6 +779,12 @@ value and a low number of packets to send has been specified. + The &man.jail.8; utility has been + updated to support extra &man.ifconfig.8; arguments for the + ip4.addr and ip6.addr + parameters. This change allows &man.carp.4; interfaces to + be used within the &man.jail.8;. + <filename>/etc/rc.d</filename> Scripts From gjb at FreeBSD.org Mon Aug 25 19:45:42 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 19:45:42 +0000 (UTC) Subject: svn commit: r270615 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251945.s7PJjgxg095878@svn.freebsd.org> Author: gjb Date: Mon Aug 25 19:45:42 2014 New Revision: 270615 URL: http://svnweb.freebsd.org/changeset/base/270615 Log: Document r269847: apr 1.4.8 -> 1.5.1 apr-util 1.5.2 -> 1.5.3 serf 1.3.4 -> 1.3.7 svnlite 1.8.8 -> 1.8.10 Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 19:45:40 2014 (r270614) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 19:45:42 2014 (r270615) @@ -849,6 +849,33 @@ OpenSSL has been updated to version 1.0.1i. + + The lite version of + Subversion included in the + &os; base system and its dependencies have been + updated: + + + + apr has been + updated to version 1.5.1. + + + + apr-util has been + updated to version 1.5.3. + + + + serf has been + updated to version 1.3.7. + + + + svnlite has been + updated to version 1.8.10. + + From gjb at FreeBSD.org Mon Aug 25 19:45:40 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 19:45:40 +0000 (UTC) Subject: svn commit: r270614 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251945.s7PJje1T095764@svn.freebsd.org> Author: gjb Date: Mon Aug 25 19:45:40 2014 New Revision: 270614 URL: http://svnweb.freebsd.org/changeset/base/270614 Log: Document r269846, vfs.zfs.arc_average_blocksize. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 19:06:31 2014 (r270613) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 19:45:40 2014 (r270614) @@ -498,6 +498,18 @@ keep their active state + + The default &man.zfs.8; + ARC hash table size has been increased, + and a new &man.loader.8; tunable, + vfs.zfs.arc_average_blocksize, has been + added. Previously, the hash table could be too small, which + would lead to long hash chains and limit performance for + cached reads. The + vfs.zfs.arc_average_blocksize tunable + allows overriding the default block size. The previous + default was 65536, and default of the new &man.loader.8; + tunable is 8192. From gjb at FreeBSD.org Mon Aug 25 19:45:45 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 19:45:44 +0000 (UTC) Subject: svn commit: r270616 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251945.s7PJjiHA095954@svn.freebsd.org> Author: gjb Date: Mon Aug 25 19:45:44 2014 New Revision: 270616 URL: http://svnweb.freebsd.org/changeset/base/270616 Log: Document r269968, iscsictl(8) '-M' flag. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 19:45:42 2014 (r270615) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 19:45:44 2014 (r270616) @@ -797,6 +797,12 @@ parameters. This change allows &man.carp.4; interfaces to be used within the &man.jail.8;. + The &man.iscsictl.8; utility has been + updated to include a new flag, -M, which + allows modifying the iSCSI session + parameters without requiring the session to be removed and + added back. + <filename>/etc/rc.d</filename> Scripts From gjb at FreeBSD.org Mon Aug 25 19:45:47 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 19:45:46 +0000 (UTC) Subject: svn commit: r270617 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408251945.s7PJjkZq096004@svn.freebsd.org> Author: gjb Date: Mon Aug 25 19:45:46 2014 New Revision: 270617 URL: http://svnweb.freebsd.org/changeset/base/270617 Log: Document r269975, igxbe(4) tunable renaming. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 19:45:44 2014 (r270616) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 19:45:46 2014 (r270617) @@ -393,6 +393,73 @@ The &man.em.4; driver has been updated to version 7.4.2. + + The &man.ixgbe.4; tunables have been + renamed to match their &man.sysctl.8; counterparts: + + + + + + + + Old Name + New Name + + + + + + hw.ixgbe.enable_aim + hw.ix.enable_aim + + + + hw.ixgbe.max_interrupt_rate + hw.ix.max_interrupt_rate + + + + hw.ixgbe.rx_process_limit + hw.ix.rx_process_limit + + + + hw.ixgbe.tx_process_limit + hw.ix.tx_process_limit + + + + hw.ixgbe.enable_msix + hw.ix.enable_msix + + + + hw.ixgbe.num_queues + hw.ix.num_queues + + + + hw.ixgbe.txd + hw.ix.txd + + + + hw.ixgbe.rxd + hw.ix.rxd + + + + hw.ixgbe.unsupported_sfp + hw.ix.unsupported_sfp + + + + + + Be sure to update &man.loader.conf.5; if using the + old tunables before upgrading to + &os; &release.current;. From gjb at FreeBSD.org Mon Aug 25 20:37:04 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 20:37:03 +0000 (UTC) Subject: svn commit: r270621 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408252037.s7PKb3jv020480@svn.freebsd.org> Author: gjb Date: Mon Aug 25 20:37:03 2014 New Revision: 270621 URL: http://svnweb.freebsd.org/changeset/base/270621 Log: Document r270026, nvi 2.1.2-c80f493b038 Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 20:15:19 2014 (r270620) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 20:37:03 2014 (r270621) @@ -949,6 +949,9 @@ updated to version 1.8.10. + + The &man.nvi.1; editor has been + update to version 2.1.2-c80f493b038. From gjb at FreeBSD.org Mon Aug 25 20:37:07 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 20:37:07 +0000 (UTC) Subject: svn commit: r270623 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408252037.s7PKb7bi020571@svn.freebsd.org> Author: gjb Date: Mon Aug 25 20:37:07 2014 New Revision: 270623 URL: http://svnweb.freebsd.org/changeset/base/270623 Log: Document r270043, '-o key=val' pairing for NFS version specification. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 20:37:05 2014 (r270622) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 20:37:07 2014 (r270623) @@ -870,6 +870,13 @@ parameters without requiring the session to be removed and added back. + The &man.mount.nfs.8; utility has been + updated to support specifying the NFS version as + a key=value pair + argument to the -o flag. For example, to + specify NFS version 4, the syntax to use is + -o vers=4. + <filename>/etc/rc.d</filename> Scripts From gjb at FreeBSD.org Mon Aug 25 20:37:05 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 20:37:05 +0000 (UTC) Subject: svn commit: r270622 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408252037.s7PKb5pb020526@svn.freebsd.org> Author: gjb Date: Mon Aug 25 20:37:05 2014 New Revision: 270622 URL: http://svnweb.freebsd.org/changeset/base/270622 Log: Document r270031, fparseln(3) update to 1.7. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 20:37:03 2014 (r270621) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 20:37:05 2014 (r270622) @@ -952,6 +952,9 @@ The &man.nvi.1; editor has been update to version 2.1.2-c80f493b038. + + The &man.fparseln.3; library has + been updated to version 1.7. From gjb at FreeBSD.org Mon Aug 25 20:37:09 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 20:37:09 +0000 (UTC) Subject: svn commit: r270624 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408252037.s7PKb98W020613@svn.freebsd.org> Author: gjb Date: Mon Aug 25 20:37:09 2014 New Revision: 270624 URL: http://svnweb.freebsd.org/changeset/base/270624 Log: Document r270061, if__nf10bmac(4) merged from head/. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 20:37:07 2014 (r270623) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 20:37:09 2014 (r270624) @@ -460,6 +460,10 @@ Be sure to update &man.loader.conf.5; if using the old tunables before upgrading to &os; &release.current;. + + The &man.if.nf10bmac.4; driver has + been merged from &os;-CURRENT to support the NetFPGA-10G + Embedded CPU Ethernet Core. From gjb at FreeBSD.org Mon Aug 25 20:37:11 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 20:37:11 +0000 (UTC) Subject: svn commit: r270625 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408252037.s7PKbBqC020655@svn.freebsd.org> Author: gjb Date: Mon Aug 25 20:37:10 2014 New Revision: 270625 URL: http://svnweb.freebsd.org/changeset/base/270625 Log: Document r270130, unmapped I/O in Xen's blkfront driver. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 20:37:09 2014 (r270624) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 20:37:10 2014 (r270625) @@ -253,6 +253,9 @@ with vendor-supplied fixes for big endian support, and 20GB/s and 25GB/s link speeds. + Support for unmapped I/O has been added + to the &man.xen.4; blkfront driver. + Virtualization Support From gjb at FreeBSD.org Mon Aug 25 20:37:13 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 20:37:13 +0000 (UTC) Subject: svn commit: r270626 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408252037.s7PKbDGj020699@svn.freebsd.org> Author: gjb Date: Mon Aug 25 20:37:12 2014 New Revision: 270626 URL: http://svnweb.freebsd.org/changeset/base/270626 Log: Add attribution for r270130 Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 20:37:10 2014 (r270625) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 20:37:12 2014 (r270626) @@ -253,7 +253,8 @@ with vendor-supplied fixes for big endian support, and 20GB/s and 25GB/s link speeds. - Support for unmapped I/O has been added + Support for unmapped I/O has been added to the &man.xen.4; blkfront driver. From kib at FreeBSD.org Mon Aug 25 20:49:26 2014 From: kib at FreeBSD.org (Konstantin Belousov) Date: Mon, 25 Aug 2014 20:49:25 +0000 (UTC) Subject: svn commit: r270627 - stable/10/sys/vm Message-ID: <201408252049.s7PKnPwL025867@svn.freebsd.org> Author: kib Date: Mon Aug 25 20:49:25 2014 New Revision: 270627 URL: http://svnweb.freebsd.org/changeset/base/270627 Log: MFC r269978 (by alc): Avoid pointless (but harmless) actions on unmanaged pages. Modified: stable/10/sys/vm/vm_fault.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_fault.c ============================================================================== --- stable/10/sys/vm/vm_fault.c Mon Aug 25 20:37:12 2014 (r270626) +++ stable/10/sys/vm/vm_fault.c Mon Aug 25 20:49:25 2014 (r270627) @@ -856,8 +856,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 kib at FreeBSD.org Mon Aug 25 21:16:58 2014 From: kib at FreeBSD.org (Konstantin Belousov) Date: Mon, 25 Aug 2014 21:16:57 +0000 (UTC) Subject: svn commit: r270628 - stable/10/sys/vm Message-ID: <201408252116.s7PLGvOV039666@svn.freebsd.org> Author: kib Date: Mon Aug 25 21:16:57 2014 New Revision: 270628 URL: http://svnweb.freebsd.org/changeset/base/270628 Log: MFC r261412 (by alc): Make prefaulting more aggressive on hard faults. Modified: stable/10/sys/vm/vm_fault.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_fault.c ============================================================================== --- stable/10/sys/vm/vm_fault.c Mon Aug 25 20:49:25 2014 (r270627) +++ stable/10/sys/vm/vm_fault.c Mon Aug 25 21:16:57 2014 (r270628) @@ -104,17 +104,8 @@ __FBSDID("$FreeBSD$"); #define PFBAK 4 #define PFFOR 4 -#define PAGEORDER_SIZE (PFBAK+PFFOR) - -static int prefault_pageorder[] = { - -1 * PAGE_SIZE, 1 * PAGE_SIZE, - -2 * PAGE_SIZE, 2 * PAGE_SIZE, - -3 * PAGE_SIZE, 3 * PAGE_SIZE, - -4 * PAGE_SIZE, 4 * PAGE_SIZE -}; static int vm_fault_additional_pages(vm_page_t, int, int, vm_page_t *, int *); -static void vm_fault_prefault(pmap_t, vm_offset_t, vm_map_entry_t); #define VM_FAULT_READ_BEHIND 8 #define VM_FAULT_READ_MAX (1 + VM_FAULT_READ_AHEAD_MAX) @@ -136,6 +127,8 @@ struct faultstate { }; static void vm_fault_cache_behind(const struct faultstate *fs, int distance); +static void vm_fault_prefault(const struct faultstate *fs, vm_offset_t addra, + int faultcount, int reqpage); static inline void release_page(struct faultstate *fs) @@ -911,7 +904,7 @@ vnode_locked: pmap_enter(fs.map->pmap, vaddr, fs.m, prot, fault_type | (wired ? PMAP_ENTER_WIRED : 0), 0); if ((fault_flags & VM_FAULT_CHANGE_WIRING) == 0 && wired == 0) - vm_fault_prefault(fs.map->pmap, vaddr, fs.entry); + vm_fault_prefault(&fs, vaddr, faultcount, reqpage); VM_OBJECT_WLOCK(fs.object); vm_page_lock(fs.m); @@ -1006,31 +999,49 @@ vm_fault_cache_behind(const struct fault * of mmap time. */ static void -vm_fault_prefault(pmap_t pmap, vm_offset_t addra, vm_map_entry_t entry) +vm_fault_prefault(const struct faultstate *fs, vm_offset_t addra, + int faultcount, int reqpage) { - int i; + pmap_t pmap; + vm_map_entry_t entry; + vm_object_t backing_object, lobject; vm_offset_t addr, starta; vm_pindex_t pindex; vm_page_t m; - vm_object_t object; + int backward, forward, i; + pmap = fs->map->pmap; if (pmap != vmspace_pmap(curthread->td_proc->p_vmspace)) return; - object = entry->object.vm_object; + if (faultcount > 0) { + backward = reqpage; + forward = faultcount - reqpage - 1; + } else { + backward = PFBAK; + forward = PFFOR; + } + entry = fs->entry; - starta = addra - PFBAK * PAGE_SIZE; + starta = addra - backward * PAGE_SIZE; if (starta < entry->start) { starta = entry->start; } else if (starta > addra) { starta = 0; } - for (i = 0; i < PAGEORDER_SIZE; i++) { - vm_object_t backing_object, lobject; - - addr = addra + prefault_pageorder[i]; - if (addr > addra + (PFFOR * PAGE_SIZE)) + /* + * Generate the sequence of virtual addresses that are candidates for + * prefaulting in an outward spiral from the faulting virtual address, + * "addra". Specifically, the sequence is "addra - PAGE_SIZE", "addra + * + PAGE_SIZE", "addra - 2 * PAGE_SIZE", "addra + 2 * PAGE_SIZE", ... + * If the candidate address doesn't have a backing physical page, then + * the loop immediately terminates. + */ + for (i = 0; i < 2 * imax(backward, forward); i++) { + addr = addra + ((i >> 1) + 1) * ((i & 1) == 0 ? -PAGE_SIZE : + PAGE_SIZE); + if (addr > addra + forward * PAGE_SIZE) addr = 0; if (addr < starta || addr >= entry->end) @@ -1040,7 +1051,7 @@ vm_fault_prefault(pmap_t pmap, vm_offset continue; pindex = ((addr - entry->start) + entry->offset) >> PAGE_SHIFT; - lobject = object; + lobject = entry->object.vm_object; VM_OBJECT_RLOCK(lobject); while ((m = vm_page_lookup(lobject, pindex)) == NULL && lobject->type == OBJT_DEFAULT && @@ -1052,9 +1063,6 @@ vm_fault_prefault(pmap_t pmap, vm_offset VM_OBJECT_RUNLOCK(lobject); lobject = backing_object; } - /* - * give-up when a page is not in memory - */ if (m == NULL) { VM_OBJECT_RUNLOCK(lobject); break; From kib at FreeBSD.org Mon Aug 25 21:19:09 2014 From: kib at FreeBSD.org (Konstantin Belousov) Date: Mon, 25 Aug 2014 21:19:08 +0000 (UTC) Subject: svn commit: r270629 - stable/10/sys/vm Message-ID: <201408252119.s7PLJ8Bs040125@svn.freebsd.org> Author: kib Date: Mon Aug 25 21:19:08 2014 New Revision: 270629 URL: http://svnweb.freebsd.org/changeset/base/270629 Log: MFC r261647 (by alc): Don't call vm_fault_prefault() on zero-fill faults. Modified: stable/10/sys/vm/vm_fault.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_fault.c ============================================================================== --- stable/10/sys/vm/vm_fault.c Mon Aug 25 21:16:57 2014 (r270628) +++ stable/10/sys/vm/vm_fault.c Mon Aug 25 21:19:08 2014 (r270629) @@ -656,6 +656,8 @@ vnode_locked: } PCPU_INC(cnt.v_zfod); fs.m->valid = VM_PAGE_BITS_ALL; + /* Don't try to prefault neighboring pages. */ + faultcount = 1; break; /* break to PAGE HAS BEEN FOUND */ } else { KASSERT(fs.object != next_object, @@ -903,7 +905,8 @@ vnode_locked: */ pmap_enter(fs.map->pmap, vaddr, fs.m, prot, fault_type | (wired ? PMAP_ENTER_WIRED : 0), 0); - if ((fault_flags & VM_FAULT_CHANGE_WIRING) == 0 && wired == 0) + if (faultcount != 1 && (fault_flags & VM_FAULT_CHANGE_WIRING) == 0 && + wired == 0) vm_fault_prefault(&fs, vaddr, faultcount, reqpage); VM_OBJECT_WLOCK(fs.object); vm_page_lock(fs.m); From kib at FreeBSD.org Mon Aug 25 21:21:30 2014 From: kib at FreeBSD.org (Konstantin Belousov) Date: Mon, 25 Aug 2014 21:21:30 +0000 (UTC) Subject: svn commit: r270630 - stable/10/sys/vm Message-ID: <201408252121.s7PLLUlC043683@svn.freebsd.org> Author: kib Date: Mon Aug 25 21:21:29 2014 New Revision: 270630 URL: http://svnweb.freebsd.org/changeset/base/270630 Log: MFC r270011: Implement 'fast path' for the vm page fault handler. MFC r270387 (by alc): Relax one of the conditions for mapping a page on the fast path. Approved by: re (gjb) Modified: stable/10/sys/vm/vm_fault.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_fault.c ============================================================================== --- stable/10/sys/vm/vm_fault.c Mon Aug 25 21:19:08 2014 (r270629) +++ stable/10/sys/vm/vm_fault.c Mon Aug 25 21:21:29 2014 (r270630) @@ -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,56 @@ 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); + /* A busy page can be mapped for read|execute access. */ + if (m == NULL || ((prot & VM_PROT_WRITE) != 0 && + 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 +351,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 jfv at FreeBSD.org Mon Aug 25 22:04:30 2014 From: jfv at FreeBSD.org (Jack F Vogel) Date: Mon, 25 Aug 2014 22:04:29 +0000 (UTC) Subject: svn commit: r270631 - in stable/10/sys: conf dev/ixl modules/ixl modules/ixlv Message-ID: <201408252204.s7PM4Tgi062611@svn.freebsd.org> Author: jfv Date: Mon Aug 25 22:04:29 2014 New Revision: 270631 URL: http://svnweb.freebsd.org/changeset/base/270631 Log: MFC of the Intel Base driver for the Intel XL710 Ethernet Controller Family - It was decided to change the driver name to if_ixl for FreeBSD - This release adds the VF Driver to the tree, it can be built into the kernel or as the if_ixlv module - The VF driver is independent for the first time, this will be desireable when full SRIOV capability is added to the OS. Submitted by: jack.vogel at intel.com and eric.joyner at intel.com Added: stable/10/sys/dev/ixl/ stable/10/sys/dev/ixl/README (contents, props changed) stable/10/sys/dev/ixl/i40e_adminq.c (contents, props changed) stable/10/sys/dev/ixl/i40e_adminq.h (contents, props changed) stable/10/sys/dev/ixl/i40e_adminq_cmd.h (contents, props changed) stable/10/sys/dev/ixl/i40e_alloc.h (contents, props changed) stable/10/sys/dev/ixl/i40e_common.c (contents, props changed) stable/10/sys/dev/ixl/i40e_hmc.c (contents, props changed) stable/10/sys/dev/ixl/i40e_hmc.h (contents, props changed) stable/10/sys/dev/ixl/i40e_lan_hmc.c (contents, props changed) stable/10/sys/dev/ixl/i40e_lan_hmc.h (contents, props changed) stable/10/sys/dev/ixl/i40e_nvm.c (contents, props changed) stable/10/sys/dev/ixl/i40e_osdep.c (contents, props changed) stable/10/sys/dev/ixl/i40e_osdep.h (contents, props changed) stable/10/sys/dev/ixl/i40e_prototype.h (contents, props changed) stable/10/sys/dev/ixl/i40e_register.h (contents, props changed) stable/10/sys/dev/ixl/i40e_register_x710_int.h (contents, props changed) stable/10/sys/dev/ixl/i40e_status.h (contents, props changed) stable/10/sys/dev/ixl/i40e_type.h (contents, props changed) stable/10/sys/dev/ixl/i40e_virtchnl.h (contents, props changed) stable/10/sys/dev/ixl/if_ixl.c (contents, props changed) stable/10/sys/dev/ixl/if_ixlv.c (contents, props changed) stable/10/sys/dev/ixl/ixl.h (contents, props changed) stable/10/sys/dev/ixl/ixl_pf.h (contents, props changed) stable/10/sys/dev/ixl/ixl_txrx.c (contents, props changed) stable/10/sys/dev/ixl/ixlv.h (contents, props changed) stable/10/sys/dev/ixl/ixlvc.c (contents, props changed) stable/10/sys/modules/ixl/ stable/10/sys/modules/ixl/Makefile (contents, props changed) stable/10/sys/modules/ixlv/ stable/10/sys/modules/ixlv/Makefile (contents, props changed) Modified: stable/10/sys/conf/files Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Mon Aug 25 21:21:29 2014 (r270630) +++ stable/10/sys/conf/files Mon Aug 25 22:04:29 2014 (r270631) @@ -1729,6 +1729,26 @@ dev/ixgbe/ixgbe_dcb_82598.c optional ixg compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_dcb_82599.c optional ixgbe inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" +dev/ixl/if_ixl.c optional ixl inet \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/if_ixlv.c optional ixlv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/ixlvc.c optional ixlv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/ixl_txrx.c optional ixl ixlv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_osdep.c optional ixl ixlv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_lan_hmc.c optional ixl ixlv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_hmc.c optional ixl ixlv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_common.c optional ixl ixlv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_nvm.c optional ixl ixlv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_adminq.c optional ixl ixlv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixl" dev/jme/if_jme.c optional jme pci dev/joy/joy.c optional joy dev/joy/joy_isa.c optional joy isa Added: stable/10/sys/dev/ixl/README ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/dev/ixl/README Mon Aug 25 22:04:29 2014 (r270631) @@ -0,0 +1,342 @@ +ixl FreeBSD* Base Driver for the Intel? XL710 Ethernet Controller Family + +/*$FreeBSD$*/ +================================================================ + +July 21, 2014 + + +Contents +======== + +- Overview +- Supported Adapters +- Building and Installation +- Additional Configurations +- Known Limitations + + +Overview +======== + +This file describes the IXL FreeBSD* Base driver for the XL710 Ethernet Family of Adapters. The Driver has been developed for use with FreeBSD 10.0 or later, but should be compatible with any supported release. + +For questions related to hardware requirements, refer to the documentation supplied with your Intel XL710 adapter. All hardware requirements listed apply for use with FreeBSD. + + +Supported Adapters +================== + +The driver in this release is compatible with XL710 and X710-based Intel Ethernet Network Connections. + + +SFP+ Devices with Pluggable Optics +---------------------------------- + +SR Modules +---------- + Intel DUAL RATE 1G/10G SFP+ SR (bailed) FTLX8571D3BCV-IT + Intel DUAL RATE 1G/10G SFP+ SR (bailed) AFBR-703SDZ-IN2 + +LR Modules +---------- + Intel DUAL RATE 1G/10G SFP+ LR (bailed) FTLX1471D3BCV-IT + Intel DUAL RATE 1G/10G SFP+ LR (bailed) AFCT-701SDZ-IN2 + +QSFP+ Modules +------------- + Intel TRIPLE RATE 1G/10G/40G QSFP+ SR (bailed) E40GQSFPSR + Intel TRIPLE RATE 1G/10G/40G QSFP+ LR (bailed) E40GQSFPLR + QSFP+ 1G speed is not supported on XL710 based devices. + +X710/XL710 Based SFP+ adapters support all passive and active limiting direct attach cables that comply with SFF-8431 v4.1 and SFF-8472 v10.4 specifications. + + +Building and Installation +========================= + +NOTE: You must have kernel sources installed to compile the driver module. + +In the instructions below, x.x.x is the driver version +as indicated in thename of the driver tar. + +1. Move the base driver tar file to the directory of your choice. For example, use /home/username/ixl or /usr/local/src/ixl. + +2. Untar/unzip the archive: + tar xfz ixl-x.x.x.tar.gz + +3. To install man page: + cd ixl-x.x.x + gzip -c ixl.4 > /usr/share/man/man4/ixl.4.gz + +4. To load the driver onto a running system: + cd ixl-x.x.x/src + make load + +5. To assign an IP address to the interface, enter the following: + ifconfig ixl + +6. Verify that the interface works. Enter the following, where is the IP address for another machine on the same subnet as the interface that is being tested: + + ping + +7. If you want the driver to load automatically when the system is booted: + + cd ixl-x.x.x/src + make + make install + + Edit /boot/loader.conf, and add the following line: + if_ixl_load="YES" + + Edit /etc/rc.conf, and create the appropriate + ifconfig_ixl entry: + + ifconfig_ixl="" + + Example usage: + + ifconfig_ixl0="inet 192.168.10.1 netmask 255.255.255.0" + + NOTE: For assistance, see the ifconfig man page. + + + +Configuration and Tuning +========================= + +The driver supports Transmit/Receive Checksum Offload for IPv4 and IPv6, +TSO forIPv4 and IPv6, LRO, and Jumbo Frames on all 40 Gigabit adapters. + + Jumbo Frames + ------------ + To enable Jumbo Frames, use the ifconfig utility to increase + the MTU beyond 1500 bytes. + + - The Jumbo Frames setting on the switch must be set to at least + 22 byteslarger than that of the adapter. + + - The maximum MTU setting for Jumbo Frames is 9706. This value + coincides with the maximum jumbo frames size of 9728. + To modify the setting, enter the following: + + ifconfig ixl mtu 9000 + + - To confirm an interface's MTU value, use the ifconfig command. + To confirm the MTU used between two specific devices, use: + + route get + + VLANs + ----- + To create a new VLAN pseudo-interface: + + ifconfig create + + To associate the VLAN pseudo-interface with a physical interface + and assign a VLAN ID, IP address, and netmask: + + ifconfig netmask vlan + vlandev + + Example: + + ifconfig vlan10 10.0.0.1 netmask 255.255.255.0 vlan 10 vlandev ixl0 + + In this example, all packets will be marked on egress with + 802.1Q VLAN tags, specifying a VLAN ID of 10. + + To remove a VLAN pseudo-interface: + + ifconfig destroy + + + Checksum Offload + ---------------- + + Checksum offloading supports IPv4 and IPv6 with TCP and UDP packets + and is supported for both transmit and receive. Checksum offloading + for transmit and recieve is enabled by default for both IPv4 and IPv6. + + Checksum offloading can be enabled or disabled using ifconfig. + Transmit and receive offloading for IPv4 and Ipv6 are enabled + and disabled seperately. + + NOTE: TSO requires Tx checksum, so when Tx checksum + is disabled, TSO will also be disabled. + + To enable Tx checksum offloading for ipv4: + + ifconfig ixl txcsum4 + + To disable Tx checksum offloading for ipv4: + + ifconfig ixl -txcsum4 + (NOTE: This will disable TSO4) + + To enable Rx checksum offloading for ipv6: + + ifconfig ixl rxcsum6 + + To disable Rx checksum offloading for ipv6: + + ifconfig ixl -rxcsum6 + (NOTE: This will disable TSO6) + + + To confirm the current settings: + + ifconfig ixl + + + TSO + --- + + TSO supports both IPv4 and IPv6 and is enabled by default. TSO can + be disabled and enabled using the ifconfig utility. + + NOTE: TSO requires Tx checksum, so when Tx checksum is + disabled, TSO will also be disabled. + + To disable TSO IPv4: + + ifconfig ixl -tso4 + + To enable TSO IPv4: + + ifconfig ixl tso4 + + To disable TSO IPv6: + + ifconfig ixl -tso6 + + To enable TSO IPv6: + + ifconfig ixl tso6 + + To disable BOTH TSO IPv4 and IPv6: + + ifconfig ixl -tso + + To enable BOTH TSO IPv4 and IPv6: + + ifconfig ixl tso + + + LRO + --- + + Large Receive Offload is enabled by default. It can be enabled + or disabled by using the ifconfig utility. + + NOTE: LRO should be disabled when forwarding packets. + + To disable LRO: + + ifconfig ixl -lro + + To enable LRO: + + ifconfig ixl lro + + +Flow Control +------------ +Flow control is disabled by default. To change flow control settings use sysctl. + +To enable flow control to Rx pause frames: + + sysctl dev.ixl..fc=1 + +To enable flow control to Tx pause frames: + + sysctl dev.ixl..fc=2 + +To enable flow control to Rx and Tx pause frames: + + sysctl dev.ixl..fc=3 + +To disable flow control: + + sysctl dev.ixl..fc=0 + + +NOTE: You must have a flow control capable link partner. + + + + Important system configuration changes: + ======================================= + + +-Change the file /etc/sysctl.conf, and add the line: + + hw.intr_storm_threshold: 0 (the default is 1000) + +-Best throughput results are seen with a large MTU; use 9706 if possible. + +-The default number of descriptors per ring is 1024, increasing this may improve performance depending on the use case. + + +Known Limitations +================= + +Network Memory Buffer allocation +-------------------------------- + FreeBSD may have a low number of network memory buffers (mbufs) by default. Ifyour mbuf value is too low, it may cause the driver to fail to initialize and/orcause the system to become unresponsive. You can check to see if the system is mbuf-starved by running 'netstat -m'. Increase the number of mbufs by editing the lines below in /etc/sysctl.conf: + + kern.ipc.nmbclusters + kern.ipc.nmbjumbop + kern.ipc.nmbjumbo9 + kern.ipc.nmbjumbo16 + kern.ipc.nmbufs + +The amount of memory that you allocate is system specific, and may require some trial and error. + +Also, increasing the follwing in /etc/sysctl.conf could help increase network performance: + + kern.ipc.maxsockbuf + net.inet.tcp.sendspace + net.inet.tcp.recvspace + net.inet.udp.maxdgram + net.inet.udp.recvspace + + +UDP Stress Test Dropped Packet Issue +------------------------------------ + Under small packet UDP stress test with the ixl driver, the FreeBSD system will drop UDP packets due to the fullness of socket buffers. You may want to change the driver's Flow Control variables to the minimum value for controlling packet reception. + + +Disable LRO when routing/bridging +--------------------------------- +LRO must be turned off when forwarding traffic. + + +Lower than expected performance +------------------------------- + Some PCIe x8 slots are actually configured as x4 slots. These slots have insufficient bandwidth for full line rate with dual port and quad port devices. In addition, if you put a PCIe Generation 3-capable adapter into a PCIe Generation 2 slot, you cannot get full bandwidth. The driver detects this situation and writes the following message in the system log: + + "PCI-Express bandwidth available for this card is not sufficient for optimal performance. For optimal performance a x8 PCI-Express slot is required." + +If this error occurs, moving your adapter to a true PCIe Generation 3 x8 slot will resolve the issue. + + +Support +======= + +For general information and support, go to the Intel support website at: + + http://support.intel.com + +If an issue is identified with the released source code on the supported kernel with a supported adapter, email the specific information related to the issue tofreebsdnic at mailbox.intel.com. + + +License +======= + +This software program is released under the terms of a license agreement betweenyou ('Licensee') and Intel. Do not use or load this software or any associated materials (collectively, the 'Software') until you have carefully read the full terms and conditions of the LICENSE located in this software package. By loadingor using the Software, you agree to the terms of this Agreement. If you do not +agree with the terms of this Agreement, do not install or use the Software. + +* Other names and brands may be claimed as the property of others. + + Added: stable/10/sys/dev/ixl/i40e_adminq.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/dev/ixl/i40e_adminq.c Mon Aug 25 22:04:29 2014 (r270631) @@ -0,0 +1,1070 @@ +/****************************************************************************** + + Copyright (c) 2013-2014, Intel 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. + + 3. Neither the name of the Intel Corporation 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 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$*/ + +#include "i40e_status.h" +#include "i40e_type.h" +#include "i40e_register.h" +#include "i40e_adminq.h" +#include "i40e_prototype.h" + +/** + * i40e_is_nvm_update_op - return TRUE if this is an NVM update operation + * @desc: API request descriptor + **/ +static INLINE bool i40e_is_nvm_update_op(struct i40e_aq_desc *desc) +{ + return (desc->opcode == CPU_TO_LE16(i40e_aqc_opc_nvm_erase) || + desc->opcode == CPU_TO_LE16(i40e_aqc_opc_nvm_update)); +} + +/** + * i40e_adminq_init_regs - Initialize AdminQ registers + * @hw: pointer to the hardware structure + * + * This assumes the alloc_asq and alloc_arq functions have already been called + **/ +static void i40e_adminq_init_regs(struct i40e_hw *hw) +{ + /* set head and tail registers in our local struct */ + if (i40e_is_vf(hw)) { + hw->aq.asq.tail = I40E_VF_ATQT1; + hw->aq.asq.head = I40E_VF_ATQH1; + hw->aq.asq.len = I40E_VF_ATQLEN1; + hw->aq.asq.bal = I40E_VF_ATQBAL1; + hw->aq.asq.bah = I40E_VF_ATQBAH1; + hw->aq.arq.tail = I40E_VF_ARQT1; + hw->aq.arq.head = I40E_VF_ARQH1; + hw->aq.arq.len = I40E_VF_ARQLEN1; + hw->aq.arq.bal = I40E_VF_ARQBAL1; + hw->aq.arq.bah = I40E_VF_ARQBAH1; + } else { + hw->aq.asq.tail = I40E_PF_ATQT; + hw->aq.asq.head = I40E_PF_ATQH; + hw->aq.asq.len = I40E_PF_ATQLEN; + hw->aq.asq.bal = I40E_PF_ATQBAL; + hw->aq.asq.bah = I40E_PF_ATQBAH; + hw->aq.arq.tail = I40E_PF_ARQT; + hw->aq.arq.head = I40E_PF_ARQH; + hw->aq.arq.len = I40E_PF_ARQLEN; + hw->aq.arq.bal = I40E_PF_ARQBAL; + hw->aq.arq.bah = I40E_PF_ARQBAH; + } +} + +/** + * i40e_alloc_adminq_asq_ring - Allocate Admin Queue send rings + * @hw: pointer to the hardware structure + **/ +enum i40e_status_code i40e_alloc_adminq_asq_ring(struct i40e_hw *hw) +{ + enum i40e_status_code ret_code; + + ret_code = i40e_allocate_dma_mem(hw, &hw->aq.asq.desc_buf, + i40e_mem_atq_ring, + (hw->aq.num_asq_entries * + sizeof(struct i40e_aq_desc)), + I40E_ADMINQ_DESC_ALIGNMENT); + if (ret_code) + return ret_code; + + ret_code = i40e_allocate_virt_mem(hw, &hw->aq.asq.cmd_buf, + (hw->aq.num_asq_entries * + sizeof(struct i40e_asq_cmd_details))); + if (ret_code) { + i40e_free_dma_mem(hw, &hw->aq.asq.desc_buf); + return ret_code; + } + + return ret_code; +} + +/** + * i40e_alloc_adminq_arq_ring - Allocate Admin Queue receive rings + * @hw: pointer to the hardware structure + **/ +enum i40e_status_code i40e_alloc_adminq_arq_ring(struct i40e_hw *hw) +{ + enum i40e_status_code ret_code; + + ret_code = i40e_allocate_dma_mem(hw, &hw->aq.arq.desc_buf, + i40e_mem_arq_ring, + (hw->aq.num_arq_entries * + sizeof(struct i40e_aq_desc)), + I40E_ADMINQ_DESC_ALIGNMENT); + + return ret_code; +} + +/** + * i40e_free_adminq_asq - Free Admin Queue send rings + * @hw: pointer to the hardware structure + * + * This assumes the posted send buffers have already been cleaned + * and de-allocated + **/ +void i40e_free_adminq_asq(struct i40e_hw *hw) +{ + i40e_free_dma_mem(hw, &hw->aq.asq.desc_buf); +} + +/** + * i40e_free_adminq_arq - Free Admin Queue receive rings + * @hw: pointer to the hardware structure + * + * This assumes the posted receive buffers have already been cleaned + * and de-allocated + **/ +void i40e_free_adminq_arq(struct i40e_hw *hw) +{ + i40e_free_dma_mem(hw, &hw->aq.arq.desc_buf); +} + +/** + * i40e_alloc_arq_bufs - Allocate pre-posted buffers for the receive queue + * @hw: pointer to the hardware structure + **/ +static enum i40e_status_code i40e_alloc_arq_bufs(struct i40e_hw *hw) +{ + enum i40e_status_code ret_code; + struct i40e_aq_desc *desc; + struct i40e_dma_mem *bi; + int i; + + /* We'll be allocating the buffer info memory first, then we can + * allocate the mapped buffers for the event processing + */ + + /* buffer_info structures do not need alignment */ + ret_code = i40e_allocate_virt_mem(hw, &hw->aq.arq.dma_head, + (hw->aq.num_arq_entries * sizeof(struct i40e_dma_mem))); + if (ret_code) + goto alloc_arq_bufs; + hw->aq.arq.r.arq_bi = (struct i40e_dma_mem *)hw->aq.arq.dma_head.va; + + /* allocate the mapped buffers */ + for (i = 0; i < hw->aq.num_arq_entries; i++) { + bi = &hw->aq.arq.r.arq_bi[i]; + ret_code = i40e_allocate_dma_mem(hw, bi, + i40e_mem_arq_buf, + hw->aq.arq_buf_size, + I40E_ADMINQ_DESC_ALIGNMENT); + if (ret_code) + goto unwind_alloc_arq_bufs; + + /* now configure the descriptors for use */ + desc = I40E_ADMINQ_DESC(hw->aq.arq, i); + + desc->flags = CPU_TO_LE16(I40E_AQ_FLAG_BUF); + if (hw->aq.arq_buf_size > I40E_AQ_LARGE_BUF) + desc->flags |= CPU_TO_LE16(I40E_AQ_FLAG_LB); + desc->opcode = 0; + /* This is in accordance with Admin queue design, there is no + * register for buffer size configuration + */ + desc->datalen = CPU_TO_LE16((u16)bi->size); + desc->retval = 0; + desc->cookie_high = 0; + desc->cookie_low = 0; + desc->params.external.addr_high = + CPU_TO_LE32(I40E_HI_DWORD(bi->pa)); + desc->params.external.addr_low = + CPU_TO_LE32(I40E_LO_DWORD(bi->pa)); + desc->params.external.param0 = 0; + desc->params.external.param1 = 0; + } + +alloc_arq_bufs: + return ret_code; + +unwind_alloc_arq_bufs: + /* don't try to free the one that failed... */ + i--; + for (; i >= 0; i--) + i40e_free_dma_mem(hw, &hw->aq.arq.r.arq_bi[i]); + i40e_free_virt_mem(hw, &hw->aq.arq.dma_head); + + return ret_code; +} + +/** + * i40e_alloc_asq_bufs - Allocate empty buffer structs for the send queue + * @hw: pointer to the hardware structure + **/ +static enum i40e_status_code i40e_alloc_asq_bufs(struct i40e_hw *hw) +{ + enum i40e_status_code ret_code; + struct i40e_dma_mem *bi; + int i; + + /* No mapped memory needed yet, just the buffer info structures */ + ret_code = i40e_allocate_virt_mem(hw, &hw->aq.asq.dma_head, + (hw->aq.num_asq_entries * sizeof(struct i40e_dma_mem))); + if (ret_code) + goto alloc_asq_bufs; + hw->aq.asq.r.asq_bi = (struct i40e_dma_mem *)hw->aq.asq.dma_head.va; + + /* allocate the mapped buffers */ + for (i = 0; i < hw->aq.num_asq_entries; i++) { + bi = &hw->aq.asq.r.asq_bi[i]; + ret_code = i40e_allocate_dma_mem(hw, bi, + i40e_mem_asq_buf, + hw->aq.asq_buf_size, + I40E_ADMINQ_DESC_ALIGNMENT); + if (ret_code) + goto unwind_alloc_asq_bufs; + } +alloc_asq_bufs: + return ret_code; + +unwind_alloc_asq_bufs: + /* don't try to free the one that failed... */ + i--; + for (; i >= 0; i--) + i40e_free_dma_mem(hw, &hw->aq.asq.r.asq_bi[i]); + i40e_free_virt_mem(hw, &hw->aq.asq.dma_head); + + return ret_code; +} + +/** + * i40e_free_arq_bufs - Free receive queue buffer info elements + * @hw: pointer to the hardware structure + **/ +static void i40e_free_arq_bufs(struct i40e_hw *hw) +{ + int i; + + /* free descriptors */ + for (i = 0; i < hw->aq.num_arq_entries; i++) + i40e_free_dma_mem(hw, &hw->aq.arq.r.arq_bi[i]); + + /* free the descriptor memory */ + i40e_free_dma_mem(hw, &hw->aq.arq.desc_buf); + + /* free the dma header */ + i40e_free_virt_mem(hw, &hw->aq.arq.dma_head); +} + +/** + * i40e_free_asq_bufs - Free send queue buffer info elements + * @hw: pointer to the hardware structure + **/ +static void i40e_free_asq_bufs(struct i40e_hw *hw) +{ + int i; + + /* only unmap if the address is non-NULL */ + for (i = 0; i < hw->aq.num_asq_entries; i++) + if (hw->aq.asq.r.asq_bi[i].pa) + i40e_free_dma_mem(hw, &hw->aq.asq.r.asq_bi[i]); + + /* free the buffer info list */ + i40e_free_virt_mem(hw, &hw->aq.asq.cmd_buf); + + /* free the descriptor memory */ + i40e_free_dma_mem(hw, &hw->aq.asq.desc_buf); + + /* free the dma header */ + i40e_free_virt_mem(hw, &hw->aq.asq.dma_head); +} + +/** + * i40e_config_asq_regs - configure ASQ registers + * @hw: pointer to the hardware structure + * + * Configure base address and length registers for the transmit queue + **/ +static enum i40e_status_code i40e_config_asq_regs(struct i40e_hw *hw) +{ + enum i40e_status_code ret_code = I40E_SUCCESS; + u32 reg = 0; + + /* Clear Head and Tail */ + wr32(hw, hw->aq.asq.head, 0); + wr32(hw, hw->aq.asq.tail, 0); + + /* set starting point */ + wr32(hw, hw->aq.asq.len, (hw->aq.num_asq_entries | + I40E_PF_ATQLEN_ATQENABLE_MASK)); + wr32(hw, hw->aq.asq.bal, I40E_LO_DWORD(hw->aq.asq.desc_buf.pa)); + wr32(hw, hw->aq.asq.bah, I40E_HI_DWORD(hw->aq.asq.desc_buf.pa)); + + /* Check one register to verify that config was applied */ + reg = rd32(hw, hw->aq.asq.bal); + if (reg != I40E_LO_DWORD(hw->aq.asq.desc_buf.pa)) + ret_code = I40E_ERR_ADMIN_QUEUE_ERROR; + + return ret_code; +} + +/** + * i40e_config_arq_regs - ARQ register configuration + * @hw: pointer to the hardware structure + * + * Configure base address and length registers for the receive (event queue) + **/ +static enum i40e_status_code i40e_config_arq_regs(struct i40e_hw *hw) +{ + enum i40e_status_code ret_code = I40E_SUCCESS; + u32 reg = 0; + + /* Clear Head and Tail */ + wr32(hw, hw->aq.arq.head, 0); + wr32(hw, hw->aq.arq.tail, 0); + + /* set starting point */ + wr32(hw, hw->aq.arq.len, (hw->aq.num_arq_entries | + I40E_PF_ARQLEN_ARQENABLE_MASK)); + wr32(hw, hw->aq.arq.bal, I40E_LO_DWORD(hw->aq.arq.desc_buf.pa)); + wr32(hw, hw->aq.arq.bah, I40E_HI_DWORD(hw->aq.arq.desc_buf.pa)); + + /* Update tail in the HW to post pre-allocated buffers */ + wr32(hw, hw->aq.arq.tail, hw->aq.num_arq_entries - 1); + + /* Check one register to verify that config was applied */ + reg = rd32(hw, hw->aq.arq.bal); + if (reg != I40E_LO_DWORD(hw->aq.arq.desc_buf.pa)) + ret_code = I40E_ERR_ADMIN_QUEUE_ERROR; + + return ret_code; +} + +/** + * i40e_init_asq - main initialization routine for ASQ + * @hw: pointer to the hardware structure + * + * This is the main initialization routine for the Admin Send Queue + * Prior to calling this function, drivers *MUST* set the following fields + * in the hw->aq structure: + * - hw->aq.num_asq_entries + * - hw->aq.arq_buf_size + * + * Do *NOT* hold the lock when calling this as the memory allocation routines + * called are not going to be atomic context safe + **/ +enum i40e_status_code i40e_init_asq(struct i40e_hw *hw) +{ + enum i40e_status_code ret_code = I40E_SUCCESS; + + if (hw->aq.asq.count > 0) { + /* queue already initialized */ + ret_code = I40E_ERR_NOT_READY; + goto init_adminq_exit; + } + + /* verify input for valid configuration */ + if ((hw->aq.num_asq_entries == 0) || + (hw->aq.asq_buf_size == 0)) { + ret_code = I40E_ERR_CONFIG; + goto init_adminq_exit; + } + + hw->aq.asq.next_to_use = 0; + hw->aq.asq.next_to_clean = 0; + hw->aq.asq.count = hw->aq.num_asq_entries; + + /* allocate the ring memory */ + ret_code = i40e_alloc_adminq_asq_ring(hw); + if (ret_code != I40E_SUCCESS) + goto init_adminq_exit; + + /* allocate buffers in the rings */ + ret_code = i40e_alloc_asq_bufs(hw); + if (ret_code != I40E_SUCCESS) + goto init_adminq_free_rings; + + /* initialize base registers */ + ret_code = i40e_config_asq_regs(hw); + if (ret_code != I40E_SUCCESS) + goto init_adminq_free_rings; + + /* success! */ + goto init_adminq_exit; + +init_adminq_free_rings: + i40e_free_adminq_asq(hw); + +init_adminq_exit: + return ret_code; +} + +/** + * i40e_init_arq - initialize ARQ + * @hw: pointer to the hardware structure + * + * The main initialization routine for the Admin Receive (Event) Queue. + * Prior to calling this function, drivers *MUST* set the following fields + * in the hw->aq structure: + * - hw->aq.num_asq_entries + * - hw->aq.arq_buf_size + * + * Do *NOT* hold the lock when calling this as the memory allocation routines + * called are not going to be atomic context safe + **/ +enum i40e_status_code i40e_init_arq(struct i40e_hw *hw) +{ + enum i40e_status_code ret_code = I40E_SUCCESS; + + if (hw->aq.arq.count > 0) { + /* queue already initialized */ + ret_code = I40E_ERR_NOT_READY; + goto init_adminq_exit; + } + + /* verify input for valid configuration */ + if ((hw->aq.num_arq_entries == 0) || + (hw->aq.arq_buf_size == 0)) { + ret_code = I40E_ERR_CONFIG; + goto init_adminq_exit; + } + + hw->aq.arq.next_to_use = 0; + hw->aq.arq.next_to_clean = 0; + hw->aq.arq.count = hw->aq.num_arq_entries; + + /* allocate the ring memory */ + ret_code = i40e_alloc_adminq_arq_ring(hw); + if (ret_code != I40E_SUCCESS) + goto init_adminq_exit; + + /* allocate buffers in the rings */ + ret_code = i40e_alloc_arq_bufs(hw); + if (ret_code != I40E_SUCCESS) + goto init_adminq_free_rings; + + /* initialize base registers */ + ret_code = i40e_config_arq_regs(hw); + if (ret_code != I40E_SUCCESS) + goto init_adminq_free_rings; + + /* success! */ + goto init_adminq_exit; + +init_adminq_free_rings: + i40e_free_adminq_arq(hw); + +init_adminq_exit: + return ret_code; +} + +/** + * i40e_shutdown_asq - shutdown the ASQ + * @hw: pointer to the hardware structure + * + * The main shutdown routine for the Admin Send Queue + **/ +enum i40e_status_code i40e_shutdown_asq(struct i40e_hw *hw) +{ + enum i40e_status_code ret_code = I40E_SUCCESS; + + if (hw->aq.asq.count == 0) + return I40E_ERR_NOT_READY; + + /* Stop firmware AdminQ processing */ + wr32(hw, hw->aq.asq.head, 0); + wr32(hw, hw->aq.asq.tail, 0); + wr32(hw, hw->aq.asq.len, 0); + wr32(hw, hw->aq.asq.bal, 0); + wr32(hw, hw->aq.asq.bah, 0); + + /* make sure spinlock is available */ + i40e_acquire_spinlock(&hw->aq.asq_spinlock); + + hw->aq.asq.count = 0; /* to indicate uninitialized queue */ + + /* free ring buffers */ + i40e_free_asq_bufs(hw); + + i40e_release_spinlock(&hw->aq.asq_spinlock); + + return ret_code; +} + +/** + * i40e_shutdown_arq - shutdown ARQ + * @hw: pointer to the hardware structure + * + * The main shutdown routine for the Admin Receive Queue + **/ +enum i40e_status_code i40e_shutdown_arq(struct i40e_hw *hw) +{ + enum i40e_status_code ret_code = I40E_SUCCESS; + + if (hw->aq.arq.count == 0) + return I40E_ERR_NOT_READY; + + /* Stop firmware AdminQ processing */ + wr32(hw, hw->aq.arq.head, 0); + wr32(hw, hw->aq.arq.tail, 0); + wr32(hw, hw->aq.arq.len, 0); + wr32(hw, hw->aq.arq.bal, 0); + wr32(hw, hw->aq.arq.bah, 0); + + /* make sure spinlock is available */ + i40e_acquire_spinlock(&hw->aq.arq_spinlock); + + hw->aq.arq.count = 0; /* to indicate uninitialized queue */ + + /* free ring buffers */ + i40e_free_arq_bufs(hw); + + i40e_release_spinlock(&hw->aq.arq_spinlock); + + return ret_code; +} + +/** + * i40e_init_adminq - main initialization routine for Admin Queue + * @hw: pointer to the hardware structure + * + * Prior to calling this function, drivers *MUST* set the following fields + * in the hw->aq structure: + * - hw->aq.num_asq_entries + * - hw->aq.num_arq_entries + * - hw->aq.arq_buf_size + * - hw->aq.asq_buf_size + **/ +enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw) +{ + enum i40e_status_code ret_code; + u16 eetrack_lo, eetrack_hi; + int retry = 0; + /* verify input for valid configuration */ + if ((hw->aq.num_arq_entries == 0) || + (hw->aq.num_asq_entries == 0) || + (hw->aq.arq_buf_size == 0) || + (hw->aq.asq_buf_size == 0)) { + ret_code = I40E_ERR_CONFIG; + goto init_adminq_exit; + } + + /* initialize spin locks */ + i40e_init_spinlock(&hw->aq.asq_spinlock); + i40e_init_spinlock(&hw->aq.arq_spinlock); + + /* Set up register offsets */ + i40e_adminq_init_regs(hw); + + /* setup ASQ command write back timeout */ + hw->aq.asq_cmd_timeout = I40E_ASQ_CMD_TIMEOUT; + + /* allocate the ASQ */ + ret_code = i40e_init_asq(hw); + if (ret_code != I40E_SUCCESS) + goto init_adminq_destroy_spinlocks; + + /* allocate the ARQ */ + ret_code = i40e_init_arq(hw); + if (ret_code != I40E_SUCCESS) + goto init_adminq_free_asq; + + if (i40e_is_vf(hw)) /* VF has no need of firmware */ + goto init_adminq_exit; + +/* There are some cases where the firmware may not be quite ready + * for AdminQ operations, so we retry the AdminQ setup a few times + * if we see timeouts in this first AQ call. + */ + do { + ret_code = i40e_aq_get_firmware_version(hw, + &hw->aq.fw_maj_ver, + &hw->aq.fw_min_ver, + &hw->aq.api_maj_ver, + &hw->aq.api_min_ver, + NULL); + if (ret_code != I40E_ERR_ADMIN_QUEUE_TIMEOUT) + break; + retry++; + i40e_msec_delay(100); + i40e_resume_aq(hw); + } while (retry < 10); + if (ret_code != I40E_SUCCESS) + goto init_adminq_free_arq; + + /* get the NVM version info */ + i40e_read_nvm_word(hw, I40E_SR_NVM_IMAGE_VERSION, &hw->nvm.version); + i40e_read_nvm_word(hw, I40E_SR_NVM_EETRACK_LO, &eetrack_lo); + i40e_read_nvm_word(hw, I40E_SR_NVM_EETRACK_HI, &eetrack_hi); + hw->nvm.eetrack = (eetrack_hi << 16) | eetrack_lo; + + if (hw->aq.api_maj_ver > I40E_FW_API_VERSION_MAJOR) { + ret_code = I40E_ERR_FIRMWARE_API_VERSION; + goto init_adminq_free_arq; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From gjb at FreeBSD.org Mon Aug 25 22:19:23 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 18:19:17 -0400 Subject: svn commit: r270631 - in stable/10/sys: conf dev/ixl modules/ixl modules/ixlv In-Reply-To: <201408252204.s7PM4Tgi062611@svn.freebsd.org> References: <201408252204.s7PM4Tgi062611@svn.freebsd.org> Message-ID: <20140825221917.GF17339@hub.FreeBSD.org> On Mon, Aug 25, 2014 at 10:04:29PM +0000, Jack F Vogel wrote: > Author: jfv > Date: Mon Aug 25 22:04:29 2014 > New Revision: 270631 > URL: http://svnweb.freebsd.org/changeset/base/270631 > > Log: > MFC of the Intel Base driver for the Intel XL710 Ethernet Controller Family > - It was decided to change the driver name to if_ixl for FreeBSD > - This release adds the VF Driver to the tree, it can be built into > the kernel or as the if_ixlv module > - The VF driver is independent for the first time, this will be > desireable when full SRIOV capability is added to the OS. > > Submitted by: jack.vogel at intel.com and eric.joyner at intel.com > Is there a manual page for ixl to go along with this? Glen -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From gjb at FreeBSD.org Mon Aug 25 22:19:51 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 22:19:51 +0000 (UTC) Subject: svn commit: r270633 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408252219.s7PMJpDe068205@svn.freebsd.org> Author: gjb Date: Mon Aug 25 22:19:50 2014 New Revision: 270633 URL: http://svnweb.freebsd.org/changeset/base/270633 Log: Document r270159, various bhyve(4) enhancements. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 22:19:48 2014 (r270632) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 22:19:50 2014 (r270633) @@ -285,6 +285,46 @@ A new driver, &man.virtio_random.4;, has been added, which allows &os; virtual machines to harvest entropy from the hypervisor. + + The &man.bhyve.4; hypervisor has been + synced with the version in &os;-CURRENT. + + A number of enhancements have been added, and several + bug fixes, including: + + + + Post-mortem debugging has been added when + a guest virtual machine exits with an + EPT Misconfiguration + error. + + + + The hypervisor &man.virtio.4; API + has been expanded from 32- to 64-bit. + + + + Support for identifying capabilities of the virtual + CPU has been added. + + + + Support for emulating legacy x86 task + switching has been added. + + + + Support to list the VT-x features in base kernel + &man.dmesg.8; has been added. + + + + Support for extended PCI configuration space + has been added. + + From gjb at FreeBSD.org Mon Aug 25 22:19:49 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 22:19:49 +0000 (UTC) Subject: svn commit: r270632 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408252219.s7PMJnvT068156@svn.freebsd.org> Author: gjb Date: Mon Aug 25 22:19:48 2014 New Revision: 270632 URL: http://svnweb.freebsd.org/changeset/base/270632 Log: Document r270157, FFS multithreaded soft updates. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 22:04:29 2014 (r270631) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 22:19:48 2014 (r270632) @@ -585,6 +585,12 @@ allows overriding the default block size. The previous default was 65536, and default of the new &man.loader.8; tunable is 8192. + + The Fast File System + (FFS) has been updated to support + multi-threaded soft updates. Previously, soft updates were + handled by a single thread, and as of this change, now have + one thread per FFS mountpoint. From gjb at FreeBSD.org Mon Aug 25 22:19:53 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 22:19:53 +0000 (UTC) Subject: svn commit: r270634 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408252219.s7PMJrqv068247@svn.freebsd.org> Author: gjb Date: Mon Aug 25 22:19:52 2014 New Revision: 270634 URL: http://svnweb.freebsd.org/changeset/base/270634 Log: Document r270297, native netmap(4) support in cxgbe(4) for the T5 10G/40G card. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 22:19:50 2014 (r270633) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 22:19:52 2014 (r270634) @@ -508,6 +508,10 @@ The &man.if.nf10bmac.4; driver has been merged from &os;-CURRENT to support the NetFPGA-10G Embedded CPU Ethernet Core. + + The &man.cxgbe.4; driver has been + updated to support &man.netmap.4; for the T5 10G/40G + cards. From gjb at FreeBSD.org Mon Aug 25 22:19:57 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 22:19:56 +0000 (UTC) Subject: svn commit: r270636 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408252219.s7PMJv8e068341@svn.freebsd.org> Author: gjb Date: Mon Aug 25 22:19:56 2014 New Revision: 270636 URL: http://svnweb.freebsd.org/changeset/base/270636 Log: Document r270415, lukemftpd removal. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 22:19:54 2014 (r270635) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 22:19:56 2014 (r270636) @@ -1023,6 +1023,9 @@ The &man.fparseln.3; library has been updated to version 1.7. + + The lukemftpd + has been removed from the &os; base system. From gjb at FreeBSD.org Mon Aug 25 22:19:55 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 22:19:55 +0000 (UTC) Subject: svn commit: r270635 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408252219.s7PMJtS1068295@svn.freebsd.org> Author: gjb Date: Mon Aug 25 22:19:54 2014 New Revision: 270635 URL: http://svnweb.freebsd.org/changeset/base/270635 Log: Document r270401, pam(3) 'account' facility support. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 22:19:52 2014 (r270634) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 22:19:54 2014 (r270635) @@ -935,6 +935,9 @@ specify NFS version 4, the syntax to use is -o vers=4. + Support for the account + facility has been added to &man.pam.3; library. + <filename>/etc/rc.d</filename> Scripts From gjb at FreeBSD.org Mon Aug 25 22:20:03 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 22:20:02 +0000 (UTC) Subject: svn commit: r270639 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408252220.s7PMK2Pj068553@svn.freebsd.org> Author: gjb Date: Mon Aug 25 22:20:02 2014 New Revision: 270639 URL: http://svnweb.freebsd.org/changeset/base/270639 Log: Document r270552, kern.geom.part.mbr.enforce_chs tunable. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 22:20:00 2014 (r270638) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 22:20:02 2014 (r270639) @@ -568,6 +568,15 @@ The maximum number of SCSI ports in the &man.ctl.4; driver has been increased from 32 to 128. + + A new &man.sysctl.8; and + &man.loader.8; tunable, + kern.geom.part.mbr.enforce_chs has been + added to the &man.geom.8; MBR partition + class. When set to a non-zero value, + GEOM_PART_MBR will automatically + recalculate the user-specified offset and size for alignment + with the disk geometry. From gjb at FreeBSD.org Mon Aug 25 22:20:01 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 22:20:00 +0000 (UTC) Subject: svn commit: r270638 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408252220.s7PMK0fP068488@svn.freebsd.org> Author: gjb Date: Mon Aug 25 22:20:00 2014 New Revision: 270638 URL: http://svnweb.freebsd.org/changeset/base/270638 Log: Document r270514, ASUS USB-AC51 support in urtwn(4). Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 22:19:58 2014 (r270637) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 22:20:00 2014 (r270638) @@ -515,6 +515,9 @@ The &man.vtnet.4; driver has been updated to support &man.netmap.4;. + + The &man.urtwn.4; driver has been + updated to support the ASUS USB-AC51 wireless card. From gjb at FreeBSD.org Mon Aug 25 22:19:59 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 22:19:58 +0000 (UTC) Subject: svn commit: r270637 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408252219.s7PMJwpF068383@svn.freebsd.org> Author: gjb Date: Mon Aug 25 22:19:58 2014 New Revision: 270637 URL: http://svnweb.freebsd.org/changeset/base/270637 Log: Document r270509, vtnet(4) netmap(4) support. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 22:19:56 2014 (r270636) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 22:19:58 2014 (r270637) @@ -512,6 +512,9 @@ The &man.cxgbe.4; driver has been updated to support &man.netmap.4; for the T5 10G/40G cards. + + The &man.vtnet.4; driver has been + updated to support &man.netmap.4;. From gjb at FreeBSD.org Mon Aug 25 22:20:05 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 22:20:04 +0000 (UTC) Subject: svn commit: r270640 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408252220.s7PMK4E9068608@svn.freebsd.org> Author: gjb Date: Mon Aug 25 22:20:04 2014 New Revision: 270640 URL: http://svnweb.freebsd.org/changeset/base/270640 Log: Document r270630, vm 'fast path' page fault hander. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 22:20:02 2014 (r270639) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 22:20:04 2014 (r270640) @@ -257,6 +257,10 @@ sponsor="&citrix.rd;">Support for unmapped I/O has been added to the &man.xen.4; blkfront driver. + The &os; virtual memory subsystem + has been updated to implement fast path for + the page fault handler. + Virtualization Support From jfvogel at gmail.com Mon Aug 25 22:23:03 2014 From: jfvogel at gmail.com (Jack Vogel) Date: Mon, 25 Aug 2014 15:23:02 -0700 Subject: svn commit: r270631 - in stable/10/sys: conf dev/ixl modules/ixl modules/ixlv In-Reply-To: <20140825221917.GF17339@hub.FreeBSD.org> References: <201408252204.s7PM4Tgi062611@svn.freebsd.org> <20140825221917.GF17339@hub.FreeBSD.org> Message-ID: Not yet, only the README, there will be a manual page coming soon I hope. Jack On Mon, Aug 25, 2014 at 3:19 PM, Glen Barber wrote: > On Mon, Aug 25, 2014 at 10:04:29PM +0000, Jack F Vogel wrote: > > Author: jfv > > Date: Mon Aug 25 22:04:29 2014 > > New Revision: 270631 > > URL: http://svnweb.freebsd.org/changeset/base/270631 > > > > Log: > > MFC of the Intel Base driver for the Intel XL710 Ethernet Controller > Family > > - It was decided to change the driver name to if_ixl for FreeBSD > > - This release adds the VF Driver to the tree, it can be built into > > the kernel or as the if_ixlv module > > - The VF driver is independent for the first time, this will be > > desireable when full SRIOV capability is added to the OS. > > > > Submitted by: jack.vogel at intel.com and eric.joyner at intel.com > > > > Is there a manual page for ixl to go along with this? > > Glen > > From gjb at FreeBSD.org Mon Aug 25 22:25:57 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 22:25:57 +0000 (UTC) Subject: svn commit: r270641 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408252225.s7PMPvkY072631@svn.freebsd.org> Author: gjb Date: Mon Aug 25 22:25:57 2014 New Revision: 270641 URL: http://svnweb.freebsd.org/changeset/base/270641 Log: Fix a formatting nit. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 22:20:04 2014 (r270640) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 22:25:57 2014 (r270641) @@ -299,8 +299,8 @@ Post-mortem debugging has been added when - a guest virtual machine exits with an - EPT Misconfiguration + a guest virtual machine exits with an + EPT Misconfiguration error. From gjb at FreeBSD.org Mon Aug 25 22:31:05 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 25 Aug 2014 22:31:05 +0000 (UTC) Subject: svn commit: r270642 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408252231.s7PMV5SX074912@svn.freebsd.org> Author: gjb Date: Mon Aug 25 22:31:04 2014 New Revision: 270642 URL: http://svnweb.freebsd.org/changeset/base/270642 Log: Document r270631, ixlv(4) merged from head/. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 22:25:57 2014 (r270641) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Aug 25 22:31:04 2014 (r270642) @@ -522,6 +522,10 @@ The &man.urtwn.4; driver has been updated to support the ASUS USB-AC51 wireless card. + + The &intel; XL710 ethernet + controller driver, ixlv(4), has been + merged from &os;-CURRENT. From thompsa at FreeBSD.org Tue Aug 26 02:31:38 2014 From: thompsa at FreeBSD.org (Andrew Thompson) Date: Tue, 26 Aug 2014 02:31:37 +0000 (UTC) Subject: svn commit: r270644 - stable/10/usr.sbin/bsdinstall/scripts Message-ID: <201408260231.s7Q2VbCW087619@svn.freebsd.org> Author: thompsa Date: Tue Aug 26 02:31:37 2014 New Revision: 270644 URL: http://svnweb.freebsd.org/changeset/base/270644 Log: MFH (r269653): Give a brief error message Modified: stable/10/usr.sbin/bsdinstall/scripts/auto stable/10/usr.sbin/bsdinstall/scripts/jail Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/auto ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/auto Tue Aug 26 02:20:37 2014 (r270643) +++ stable/10/usr.sbin/bsdinstall/scripts/auto Tue Aug 26 02:31:37 2014 (r270644) @@ -35,11 +35,15 @@ BSDCFG_SHARE="/usr/share/bsdconfig" ############################################################ FUNCTIONS error() { + local msg + if [ -n "$1" ]; then + msg="$1\n\n" + fi test -n "$DISTDIR_IS_UNIONFS" && umount -f $BSDINSTALL_DISTDIR test -f $PATH_FSTAB && bsdinstall umount dialog --backtitle "FreeBSD Installer" --title "Abort" \ --no-label "Exit" --yes-label "Restart" --yesno \ - "An installation step has been aborted. Would you like to restart the installation or exit the installer?" 0 0 + "${msg}An installation step has been aborted. Would you like to restart the installation or exit the installer?" 0 0 if [ $? -ne 0 ]; then exit 1 else @@ -58,7 +62,7 @@ trap true SIGINT # This section is optio bsdinstall keymap trap error SIGINT # Catch cntrl-C here -bsdinstall hostname || error +bsdinstall hostname || error "Set hostname failed" export DISTRIBUTIONS="base.txz kernel.txz" if [ -f $BSDINSTALL_DISTDIR/MANIFEST ]; then @@ -95,7 +99,7 @@ if [ -n "$FETCH_DISTRIBUTIONS" ]; then BSDINSTALL_DISTSITE=$(`dirname $0`/mirrorselect 2>&1 1>&3) MIRROR_BUTTON=$? exec 3>&- - test $MIRROR_BUTTON -eq 0 || error + test $MIRROR_BUTTON -eq 0 || error "No mirror selected" export BSDINSTALL_DISTSITE fi @@ -125,8 +129,8 @@ exec 3>&- case "$PARTMODE" in "Guided") # Guided - bsdinstall autopart || error - bsdinstall mount || error + bsdinstall autopart || error "Partitioning error" + bsdinstall mount || error "Failed to mount filesystem" ;; "Shell") # Shell clear @@ -136,18 +140,18 @@ case "$PARTMODE" in "Manual") # Manual if f_isset debugFile; then # Give partedit the path to our logfile so it can append - BSDINSTALL_LOG="${debugFile#+}" bsdinstall partedit || error + BSDINSTALL_LOG="${debugFile#+}" bsdinstall partedit || error "Partitioning error" else - bsdinstall partedit || error + bsdinstall partedit || error "Partitioning error" fi - bsdinstall mount || error + bsdinstall mount || error "Failed to mount filesystem" ;; "ZFS") # ZFS - bsdinstall zfsboot || error - bsdinstall mount || error + bsdinstall zfsboot || error "ZFS setup failed" + bsdinstall mount || error "Failed to mount filesystem" ;; *) - error + error "Unknown partitioning mode" ;; esac @@ -156,7 +160,7 @@ if [ ! -z "$FETCH_DISTRIBUTIONS" ]; then # Download to a directory in the new system as scratch space BSDINSTALL_FETCHDEST="$BSDINSTALL_CHROOT/usr/freebsd-dist" - mkdir -p "$BSDINSTALL_FETCHDEST" || error + mkdir -p "$BSDINSTALL_FETCHDEST" || error "Could not create directory $BSDINSTALL_FETCHDEST" export DISTRIBUTIONS="$FETCH_DISTRIBUTIONS" # Try to use any existing distfiles @@ -169,13 +173,13 @@ if [ ! -z "$FETCH_DISTRIBUTIONS" ]; then fi export FTP_PASSIVE_MODE=YES - bsdinstall distfetch || error + bsdinstall distfetch || error "Failed to fetch distribution" export DISTRIBUTIONS="$ALL_DISTRIBUTIONS" fi -bsdinstall checksum || error -bsdinstall distextract || error -bsdinstall rootpass || error +bsdinstall checksum || error "Distribution checksum failed" +bsdinstall distextract || error "Distribution extract failed" +bsdinstall rootpass || error "Could not set root password" trap true SIGINT # This section is optional if [ "$NETCONFIG_DONE" != yes ]; then @@ -239,7 +243,7 @@ finalconfig() { finalconfig trap error SIGINT # SIGINT is bad again -bsdinstall config || error +bsdinstall config || error "Failed to save config" if [ ! -z "$BSDINSTALL_FETCHDEST" ]; then [ "$BSDINSTALL_FETCHDEST" != "$BSDINSTALL_DISTDIR" ] && \ Modified: stable/10/usr.sbin/bsdinstall/scripts/jail ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/jail Tue Aug 26 02:20:37 2014 (r270643) +++ stable/10/usr.sbin/bsdinstall/scripts/jail Tue Aug 26 02:31:37 2014 (r270644) @@ -38,9 +38,13 @@ f_dprintf "Began Installation at %s" "$( export BSDINSTALL_CHROOT=$1 error() { + local msg + if [ -n "$1" ]; then + msg="$1\n\n" + fi dialog --backtitle "FreeBSD Installer" --title "Abort" \ --no-label "Exit" --yes-label "Restart" --yesno \ - "An installation step has been aborted. Would you like to restart the installation or exit the installer?" 0 0 + "${msg}An installation step has been aborted. Would you like to restart the installation or exit the installer?" 0 0 if [ $? -ne 0 ]; then exit else @@ -51,7 +55,7 @@ error() { rm -rf $BSDINSTALL_TMPETC mkdir $BSDINSTALL_TMPETC -mkdir -p $1 || error +mkdir -p $1 || error "mkdir failed for $1" test ! -d $BSDINSTALL_DISTDIR && mkdir -p $BSDINSTALL_DISTDIR @@ -60,9 +64,9 @@ if [ ! -f $BSDINSTALL_DISTDIR/MANIFEST - BSDINSTALL_DISTSITE=$(`dirname $0`/mirrorselect 2>&1 1>&3) MIRROR_BUTTON=$? exec 3>&- - test $MIRROR_BUTTON -eq 0 || error + test $MIRROR_BUTTON -eq 0 || error "No mirror selected" export BSDINSTALL_DISTSITE - fetch -o $BSDINSTALL_DISTDIR/MANIFEST $BSDINSTALL_DISTSITE/MANIFEST || error + fetch -o $BSDINSTALL_DISTDIR/MANIFEST $BSDINSTALL_DISTSITE/MANIFEST || error "Could not download $BSDINSTALL_DISTSITE/MANIFEST" fi export DISTRIBUTIONS="base.txz" @@ -94,17 +98,17 @@ if [ -n "$FETCH_DISTRIBUTIONS" -a -z "$B BSDINSTALL_DISTSITE=`bsdinstall mirrorselect 2>&1 1>&3` MIRROR_BUTTON=$? exec 3>&- - test $MIRROR_BUTTON -eq 0 || error + test $MIRROR_BUTTON -eq 0 || error "No mirror selected" export BSDINSTALL_DISTSITE fi if [ ! -z "$FETCH_DISTRIBUTIONS" ]; then - bsdinstall distfetch || error + bsdinstall distfetch || error "Failed to fetch distribution" fi -bsdinstall checksum || error -bsdinstall distextract || error -bsdinstall rootpass || error +bsdinstall checksum || error "Distribution checksum failed" +bsdinstall distextract || error "Distribution extract failed" +bsdinstall rootpass || error "Could not set root password" trap true SIGINT # This section is optional bsdinstall services @@ -114,7 +118,7 @@ dialog --backtitle "FreeBSD Installer" - bsdinstall adduser trap error SIGINT # SIGINT is bad again -bsdinstall config || error +bsdinstall config || error "Failed to save config" cp /etc/resolv.conf $1/etc cp /etc/localtime $1/etc From imp at FreeBSD.org Tue Aug 26 03:45:55 2014 From: imp at FreeBSD.org (Warner Losh) Date: Tue, 26 Aug 2014 03:45:55 +0000 (UTC) Subject: svn commit: r270645 - stable/10/sys/cam/ata Message-ID: <201408260345.s7Q3jtVO022311@svn.freebsd.org> Author: imp Date: Tue Aug 26 03:45:54 2014 New Revision: 270645 URL: http://svnweb.freebsd.org/changeset/base/270645 Log: Merge SETAN changes from head: r270327 | imp | 2014-08-22 07:15:59 -0600 (Fri, 22 Aug 2014) | 6 lines We should never enter the PROBE_SETAN phase if we're not ATAPI, since that's ATAPI specific. Instead, skip to PROBE_SET_MULTI instead for non ATAPI protocols. The prior code incorrectly terminated the probe with a break, rather than arranging for probedone to get called. This caused panics or worse on some systems. r270249 | imp | 2014-08-20 16:58:12 -0600 (Wed, 20 Aug 2014) | 13 lines Turns out that IDENTIFY DEVICE and IDENTIFY PACKET DEVICE return data that's only mostly similar. Specifically word 78 bits are defined for IDENTIFY DEVICE as 5 Supports Hardware Feature Control while a IDENTIFY PACKET DEVICE defines them as 5 Asynchronous notification supported Therefore, only pay attention to bit 5 when we're talking to ATAPI devices (we don't use the hardware feature control at this time). Ignore it for ATA devices. Remove kludge that papered over this issue for Samsung SATA SSDs, since Micron drives also have the bit set and the error was caused by this bad interpretation of the spec (which is quite easy to do, since bits aren't normally overlapping like this). Sponsored by: Netflix (the merge and the original work) Modified: stable/10/sys/cam/ata/ata_xpt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ata/ata_xpt.c ============================================================================== --- stable/10/sys/cam/ata/ata_xpt.c Tue Aug 26 02:31:37 2014 (r270644) +++ stable/10/sys/cam/ata/ata_xpt.c Tue Aug 26 03:45:54 2014 (r270645) @@ -750,14 +750,6 @@ out: goto noerror; /* - * Some Samsung SSDs report supported Asynchronous Notification, - * but return ABORT on attempt to enable it. - */ - } else if (softc->action == PROBE_SETAN && - status == CAM_ATA_STATUS_ERROR) { - goto noerror; - - /* * SES and SAF-TE SEPs have different IDENTIFY commands, * but SATA specification doesn't tell how to identify them. * Until better way found, just try another if first fail. @@ -1059,7 +1051,8 @@ noerror: } /* FALLTHROUGH */ case PROBE_SETDMAAA: - if ((ident_buf->satasupport & ATA_SUPPORT_ASYNCNOTIF) && + if (path->device->protocol != PROTO_ATA && + (ident_buf->satasupport & ATA_SUPPORT_ASYNCNOTIF) && (!(softc->caps & CTS_SATA_CAPS_H_AN)) != (!(ident_buf->sataenabled & ATA_SUPPORT_ASYNCNOTIF))) { PROBE_SET_ACTION(softc, PROBE_SETAN); @@ -1180,7 +1173,7 @@ notsata: else caps = 0; /* Remember what transport thinks about AEN. */ - if (caps & CTS_SATA_CAPS_H_AN) + if ((caps & CTS_SATA_CAPS_H_AN) && path->device->protocol != PROTO_ATA) path->device->inq_flags |= SID_AEN; else path->device->inq_flags &= ~SID_AEN; From dim at FreeBSD.org Tue Aug 26 06:31:53 2014 From: dim at FreeBSD.org (Dimitry Andric) Date: Tue, 26 Aug 2014 06:31:52 +0000 (UTC) Subject: svn commit: r270646 - in stable: 10/contrib/libc++/include 9/contrib/libc++/include Message-ID: <201408260631.s7Q6VqWL098298@svn.freebsd.org> Author: dim Date: Tue Aug 26 06:31:52 2014 New Revision: 270646 URL: http://svnweb.freebsd.org/changeset/base/270646 Log: MFC r270416: In r260015, I renamed several identifiers to avoid -Wsystem-header warnings. In r261283, I imported libc++ 3.4 release, but this contained one identifier that had not been renamed yet, leading to a compilation error when using -std=c++1y. Fix the compilation error by correctly renaming the identifier. Reported by: rcarter at pinyon.org PR: base/192139 Modified: stable/10/contrib/libc++/include/type_traits Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/contrib/libc++/include/type_traits Directory Properties: stable/9/contrib/libc++/ (props changed) Modified: stable/10/contrib/libc++/include/type_traits ============================================================================== --- stable/10/contrib/libc++/include/type_traits Tue Aug 26 03:45:54 2014 (r270645) +++ stable/10/contrib/libc++/include/type_traits Tue Aug 26 06:31:52 2014 (r270646) @@ -301,7 +301,7 @@ template struct _LIBCPP_TYPE #if _LIBCPP_STD_VER > 11 template struct _LIBCPP_TYPE_VIS_ONLY is_null_pointer - : public ____is_nullptr_t::type> {}; + : public __libcpp___is_nullptr::type> {}; #endif // is_integral From dim at FreeBSD.org Tue Aug 26 06:31:52 2014 From: dim at FreeBSD.org (Dimitry Andric) Date: Tue, 26 Aug 2014 06:31:52 +0000 (UTC) Subject: svn commit: r270646 - in stable: 10/contrib/libc++/include 9/contrib/libc++/include Message-ID: <201408260631.s7Q6VqAZ098292@svn.freebsd.org> Author: dim Date: Tue Aug 26 06:31:52 2014 New Revision: 270646 URL: http://svnweb.freebsd.org/changeset/base/270646 Log: MFC r270416: In r260015, I renamed several identifiers to avoid -Wsystem-header warnings. In r261283, I imported libc++ 3.4 release, but this contained one identifier that had not been renamed yet, leading to a compilation error when using -std=c++1y. Fix the compilation error by correctly renaming the identifier. Reported by: rcarter at pinyon.org PR: base/192139 Modified: stable/9/contrib/libc++/include/type_traits Directory Properties: stable/9/contrib/libc++/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/libc++/include/type_traits Directory Properties: stable/10/ (props changed) Modified: stable/9/contrib/libc++/include/type_traits ============================================================================== --- stable/9/contrib/libc++/include/type_traits Tue Aug 26 03:45:54 2014 (r270645) +++ stable/9/contrib/libc++/include/type_traits Tue Aug 26 06:31:52 2014 (r270646) @@ -301,7 +301,7 @@ template struct _LIBCPP_TYPE #if _LIBCPP_STD_VER > 11 template struct _LIBCPP_TYPE_VIS_ONLY is_null_pointer - : public ____is_nullptr_t::type> {}; + : public __libcpp___is_nullptr::type> {}; #endif // is_integral From ae at FreeBSD.org Tue Aug 26 10:32:09 2014 From: ae at FreeBSD.org (Andrey V. Elsukov) Date: Tue, 26 Aug 2014 10:32:08 +0000 (UTC) Subject: svn commit: r270655 - stable/10/usr.sbin/ndp Message-ID: <201408261032.s7QAW87A007320@svn.freebsd.org> Author: ae Date: Tue Aug 26 10:32:08 2014 New Revision: 270655 URL: http://svnweb.freebsd.org/changeset/base/270655 Log: MFC r265778 (by melifaro): Fix ndp(8) -f flag parsing PR: bin/136661 MFC r268827 (by peter): Fix "ndp -d hostname". Modified: stable/10/usr.sbin/ndp/ndp.8 stable/10/usr.sbin/ndp/ndp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ndp/ndp.8 ============================================================================== --- stable/10/usr.sbin/ndp/ndp.8 Tue Aug 26 10:22:59 2014 (r270654) +++ stable/10/usr.sbin/ndp/ndp.8 Tue Aug 26 10:32:08 2014 (r270655) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Jan 10, 2013 +.Dd May 9, 2014 .Dt NDP 8 .Os .\" @@ -136,9 +136,26 @@ seconds. Erase all the NDP entries. .It Fl d Delete specified NDP entry. -.It Fl f -Parse the file specified by -.Ar filename . +.It Fl f Ar filename +Cause the file +.Ar filename +to be read and multiple entries to be set in the +.Tn NDP +table. +Entries +in the file should be of the form +.Pp +.Bd -ragged -offset indent -compact +.Ar hostname ether_addr +.Op Cm temp +.Op Cm proxy +.Ed +.Pp +with argument meanings as given above. +Leading whitespace and empty lines are ignored. +A +.Ql # +character will mark the rest of the line as a comment. .It Fl H Harmonize consistency between the routing table and the default router list; install the top entry of the list into the kernel routing table. Modified: stable/10/usr.sbin/ndp/ndp.c ============================================================================== --- stable/10/usr.sbin/ndp/ndp.c Tue Aug 26 10:22:59 2014 (r270654) +++ stable/10/usr.sbin/ndp/ndp.c Tue Aug 26 10:32:08 2014 (r270655) @@ -97,6 +97,7 @@ #include +#include #include #include #include @@ -131,7 +132,7 @@ char host_buf[NI_MAXHOST]; /* getnamein char ifix_buf[IFNAMSIZ]; /* if_indextoname() */ int main(int, char **); -int file(char *); +static int file(char *); void getsocket(void); int set(int, char **); void get(char *); @@ -194,9 +195,10 @@ main(argc, argv) mode = ch; arg = NULL; break; - case 'd': case 'f': - case 'i' : + exit(file(optarg) ? 1 : 0); + case 'd': + case 'i': if (mode) { usage(); /*NOTREACHED*/ @@ -319,18 +321,16 @@ main(argc, argv) /* * Process a file to set standard ndp entries */ -int +static int file(name) char *name; { FILE *fp; int i, retval; - char line[100], arg[5][50], *args[5]; + char line[100], arg[5][50], *args[5], *p; - if ((fp = fopen(name, "r")) == NULL) { - fprintf(stderr, "ndp: cannot open %s\n", name); - exit(1); - } + if ((fp = fopen(name, "r")) == NULL) + err(1, "cannot open %s", name); args[0] = &arg[0][0]; args[1] = &arg[1][0]; args[2] = &arg[2][0]; @@ -338,10 +338,15 @@ file(name) args[4] = &arg[4][0]; retval = 0; while (fgets(line, sizeof(line), fp) != NULL) { + if ((p = strchr(line, '#')) != NULL) + *p = '\0'; + for (p = line; isblank(*p); p++); + if (*p == '\n' || *p == '\0') + continue; i = sscanf(line, "%49s %49s %49s %49s %49s", arg[0], arg[1], arg[2], arg[3], arg[4]); if (i < 2) { - fprintf(stderr, "ndp: bad line: %s\n", line); + warnx("bad line: %s", line); retval = 1; continue; } From ae at FreeBSD.org Tue Aug 26 10:35:33 2014 From: ae at FreeBSD.org (Andrey V. Elsukov) Date: Tue, 26 Aug 2014 10:35:32 +0000 (UTC) Subject: svn commit: r270656 - stable/9/usr.sbin/ndp Message-ID: <201408261035.s7QAZWU0008040@svn.freebsd.org> Author: ae Date: Tue Aug 26 10:35:32 2014 New Revision: 270656 URL: http://svnweb.freebsd.org/changeset/base/270656 Log: MFC r265778 (by melifaro): Fix ndp(8) -f flag parsing PR: bin/136661 MFC r268827 (by peter): Fix "ndp -d hostname". Modified: stable/9/usr.sbin/ndp/ndp.8 stable/9/usr.sbin/ndp/ndp.c Directory Properties: stable/9/usr.sbin/ndp/ (props changed) Modified: stable/9/usr.sbin/ndp/ndp.8 ============================================================================== --- stable/9/usr.sbin/ndp/ndp.8 Tue Aug 26 10:32:08 2014 (r270655) +++ stable/9/usr.sbin/ndp/ndp.8 Tue Aug 26 10:35:32 2014 (r270656) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Jan 10, 2013 +.Dd May 9, 2014 .Dt NDP 8 .Os .\" @@ -136,9 +136,26 @@ seconds. Erase all the NDP entries. .It Fl d Delete specified NDP entry. -.It Fl f -Parse the file specified by -.Ar filename . +.It Fl f Ar filename +Cause the file +.Ar filename +to be read and multiple entries to be set in the +.Tn NDP +table. +Entries +in the file should be of the form +.Pp +.Bd -ragged -offset indent -compact +.Ar hostname ether_addr +.Op Cm temp +.Op Cm proxy +.Ed +.Pp +with argument meanings as given above. +Leading whitespace and empty lines are ignored. +A +.Ql # +character will mark the rest of the line as a comment. .It Fl H Harmonize consistency between the routing table and the default router list; install the top entry of the list into the kernel routing table. Modified: stable/9/usr.sbin/ndp/ndp.c ============================================================================== --- stable/9/usr.sbin/ndp/ndp.c Tue Aug 26 10:32:08 2014 (r270655) +++ stable/9/usr.sbin/ndp/ndp.c Tue Aug 26 10:35:32 2014 (r270656) @@ -97,6 +97,7 @@ #include +#include #include #include #include @@ -131,7 +132,7 @@ char host_buf[NI_MAXHOST]; /* getnamein char ifix_buf[IFNAMSIZ]; /* if_indextoname() */ int main(int, char **); -int file(char *); +static int file(char *); void getsocket(void); int set(int, char **); void get(char *); @@ -194,9 +195,10 @@ main(argc, argv) mode = ch; arg = NULL; break; - case 'd': case 'f': - case 'i' : + exit(file(optarg) ? 1 : 0); + case 'd': + case 'i': if (mode) { usage(); /*NOTREACHED*/ @@ -319,18 +321,16 @@ main(argc, argv) /* * Process a file to set standard ndp entries */ -int +static int file(name) char *name; { FILE *fp; int i, retval; - char line[100], arg[5][50], *args[5]; + char line[100], arg[5][50], *args[5], *p; - if ((fp = fopen(name, "r")) == NULL) { - fprintf(stderr, "ndp: cannot open %s\n", name); - exit(1); - } + if ((fp = fopen(name, "r")) == NULL) + err(1, "cannot open %s", name); args[0] = &arg[0][0]; args[1] = &arg[1][0]; args[2] = &arg[2][0]; @@ -338,10 +338,15 @@ file(name) args[4] = &arg[4][0]; retval = 0; while (fgets(line, sizeof(line), fp) != NULL) { + if ((p = strchr(line, '#')) != NULL) + *p = '\0'; + for (p = line; isblank(*p); p++); + if (*p == '\n' || *p == '\0') + continue; i = sscanf(line, "%49s %49s %49s %49s %49s", arg[0], arg[1], arg[2], arg[3], arg[4]); if (i < 2) { - fprintf(stderr, "ndp: bad line: %s\n", line); + warnx("bad line: %s", line); retval = 1; continue; } From gjb at FreeBSD.org Tue Aug 26 13:44:56 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Tue, 26 Aug 2014 13:44:56 +0000 (UTC) Subject: svn commit: r270662 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408261344.s7QDiuia097207@svn.freebsd.org> Author: gjb Date: Tue Aug 26 13:44:56 2014 New Revision: 270662 URL: http://svnweb.freebsd.org/changeset/base/270662 Log: Fix an oddly-worded sentence. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Aug 26 13:11:38 2014 (r270661) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Aug 26 13:44:56 2014 (r270662) @@ -1048,7 +1048,8 @@ been updated to version 1.7. The lukemftpd - has been removed from the &os; base system. + FTP server has been removed from the + &os; base system. From gjb at FreeBSD.org Tue Aug 26 13:53:02 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Tue, 26 Aug 2014 13:53:01 +0000 (UTC) Subject: svn commit: r270663 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408261353.s7QDr12a001712@svn.freebsd.org> Author: gjb Date: Tue Aug 26 13:53:01 2014 New Revision: 270663 URL: http://svnweb.freebsd.org/changeset/base/270663 Log: Add a non-breaking space in the mount_nfs(8) example. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Aug 26 13:44:56 2014 (r270662) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Aug 26 13:53:01 2014 (r270663) @@ -956,7 +956,7 @@ a key=value pair argument to the -o flag. For example, to specify NFS version 4, the syntax to use is - -o vers=4. + -o vers=4. Support for the account facility has been added to &man.pam.3; library. From gjb at FreeBSD.org Tue Aug 26 15:31:57 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Tue, 26 Aug 2014 15:31:56 +0000 (UTC) Subject: svn commit: r270665 - in stable/10: gnu/usr.bin/groff/tmac lib/clang sys/conf Message-ID: <201408261531.s7QFVusu050576@svn.freebsd.org> Author: gjb Date: Tue Aug 26 15:31:56 2014 New Revision: 270665 URL: http://svnweb.freebsd.org/changeset/base/270665 Log: - Update stable/10 to 10.1-PRERELEASE now that the code slush is in effect. (Forgotten on the 22nd.) - Set the 10.1 as the .Fx mdoc(7) default. - Update the TARGET_TRIPLE and BUILD_TRIPLE for clang(1) to reflect 10.1. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/gnu/usr.bin/groff/tmac/mdoc.local stable/10/lib/clang/clang.build.mk stable/10/sys/conf/newvers.sh Modified: stable/10/gnu/usr.bin/groff/tmac/mdoc.local ============================================================================== --- stable/10/gnu/usr.bin/groff/tmac/mdoc.local Tue Aug 26 14:44:08 2014 (r270664) +++ stable/10/gnu/usr.bin/groff/tmac/mdoc.local Tue Aug 26 15:31:56 2014 (r270665) @@ -50,7 +50,7 @@ .ds doc-str-Lb-libstdthreads C11 Threads Library (libstdthreads, \-lstdthreads) . .\" Default .Os value -.ds doc-default-operating-system FreeBSD\~10.0 +.ds doc-default-operating-system FreeBSD\~10.1 . .\" FreeBSD releases not found in doc-common .ds doc-operating-system-FreeBSD-7.4 7.4 Modified: stable/10/lib/clang/clang.build.mk ============================================================================== --- stable/10/lib/clang/clang.build.mk Tue Aug 26 14:44:08 2014 (r270664) +++ stable/10/lib/clang/clang.build.mk Tue Aug 26 15:31:56 2014 (r270665) @@ -27,8 +27,8 @@ TARGET_ABI= gnueabi TARGET_ABI= unknown .endif -TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd10.0 -BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/}-unknown-freebsd10.0 +TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd10.1 +BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/}-unknown-freebsd10.1 CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\"${TARGET_TRIPLE}\" \ -DLLVM_HOST_TRIPLE=\"${BUILD_TRIPLE}\" \ -DDEFAULT_SYSROOT=\"${TOOLS_PREFIX}\" Modified: stable/10/sys/conf/newvers.sh ============================================================================== --- stable/10/sys/conf/newvers.sh Tue Aug 26 14:44:08 2014 (r270664) +++ stable/10/sys/conf/newvers.sh Tue Aug 26 15:31:56 2014 (r270665) @@ -31,8 +31,8 @@ # $FreeBSD$ TYPE="FreeBSD" -REVISION="10.0" -BRANCH="STABLE" +REVISION="10.1" +BRANCH="PRERELEASE" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From wblock at FreeBSD.org Tue Aug 26 19:58:49 2014 From: wblock at FreeBSD.org (Warren Block) Date: Tue, 26 Aug 2014 19:58:49 +0000 (UTC) Subject: svn commit: r270670 - stable/10/sys/sys Message-ID: <201408261958.s7QJwn3E081168@svn.freebsd.org> Author: wblock (doc committer) Date: Tue Aug 26 19:58:48 2014 New Revision: 270670 URL: http://svnweb.freebsd.org/changeset/base/270670 Log: MFC r269743: Update the comments in exec.h with help from jilles. Modified: stable/10/sys/sys/exec.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/exec.h ============================================================================== --- stable/10/sys/sys/exec.h Tue Aug 26 19:36:47 2014 (r270669) +++ stable/10/sys/sys/exec.h Tue Aug 26 19:58:48 2014 (r270670) @@ -39,12 +39,17 @@ #define _SYS_EXEC_H_ /* - * The following structure is found at the top of the user stack of each - * user process. The ps program uses it to locate argv and environment - * strings. Programs that wish ps to display other information may modify - * it; normally ps_argvstr points to the argv vector, and ps_nargvstr - * is the same as the program's argc. The fields ps_envstr and ps_nenvstr - * are the equivalent for the environment. + * Before ps_args existed, the following structure, found at the top of + * the user stack of each user process, was used by ps(1) to locate + * environment and argv strings. Normally ps_argvstr points to the + * argv vector, and ps_nargvstr is the same as the program's argc. The + * fields ps_envstr and ps_nenvstr are the equivalent for the environment. + * + * Programs should now use setproctitle(3) to change ps output. + * setproctitle() always informs the kernel with sysctl and sets the + * pointers in ps_strings. The kern.proc.args sysctl first tries p_args. + * If p_args is NULL, it then falls back to reading ps_strings and following + * the pointers. */ struct ps_strings { char **ps_argvstr; /* first of 0 or more argument strings */ @@ -55,6 +60,7 @@ struct ps_strings { /* * Address of ps_strings structure (in user space). + * Prefer the kern.ps_strings or kern.proc.ps_strings sysctls to this constant. */ #define PS_STRINGS (USRSTACK - sizeof(struct ps_strings)) #define SPARE_USRSPACE 4096 From wblock at FreeBSD.org Tue Aug 26 20:01:18 2014 From: wblock at FreeBSD.org (Warren Block) Date: Tue, 26 Aug 2014 20:01:18 +0000 (UTC) Subject: svn commit: r270671 - stable/9/sys/sys Message-ID: <201408262001.s7QK1Iog082773@svn.freebsd.org> Author: wblock (doc committer) Date: Tue Aug 26 20:01:18 2014 New Revision: 270671 URL: http://svnweb.freebsd.org/changeset/base/270671 Log: MFC r269743: Update the comments in exec.h with help from jilles. Modified: stable/9/sys/sys/exec.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/sys/exec.h ============================================================================== --- stable/9/sys/sys/exec.h Tue Aug 26 19:58:48 2014 (r270670) +++ stable/9/sys/sys/exec.h Tue Aug 26 20:01:18 2014 (r270671) @@ -39,12 +39,17 @@ #define _SYS_EXEC_H_ /* - * The following structure is found at the top of the user stack of each - * user process. The ps program uses it to locate argv and environment - * strings. Programs that wish ps to display other information may modify - * it; normally ps_argvstr points to the argv vector, and ps_nargvstr - * is the same as the program's argc. The fields ps_envstr and ps_nenvstr - * are the equivalent for the environment. + * Before ps_args existed, the following structure, found at the top of + * the user stack of each user process, was used by ps(1) to locate + * environment and argv strings. Normally ps_argvstr points to the + * argv vector, and ps_nargvstr is the same as the program's argc. The + * fields ps_envstr and ps_nenvstr are the equivalent for the environment. + * + * Programs should now use setproctitle(3) to change ps output. + * setproctitle() always informs the kernel with sysctl and sets the + * pointers in ps_strings. The kern.proc.args sysctl first tries p_args. + * If p_args is NULL, it then falls back to reading ps_strings and following + * the pointers. */ struct ps_strings { char **ps_argvstr; /* first of 0 or more argument strings */ @@ -55,6 +60,7 @@ struct ps_strings { /* * Address of ps_strings structure (in user space). + * Prefer the kern.ps_strings or kern.proc.ps_strings sysctls to this constant. */ #define PS_STRINGS (USRSTACK - sizeof(struct ps_strings)) #define SPARE_USRSPACE 4096 From gjb at FreeBSD.org Tue Aug 26 22:47:41 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Tue, 26 Aug 2014 22:47:40 +0000 (UTC) Subject: svn commit: r270678 - stable/10/release/doc/en_US.ISO8859-1/hardware Message-ID: <201408262247.s7QMleYl062223@svn.freebsd.org> Author: gjb Date: Tue Aug 26 22:47:40 2014 New Revision: 270678 URL: http://svnweb.freebsd.org/changeset/base/270678 Log: Add the following to the hardware notes: - aacraid(4) - alc(4) - ath_hal(4) - atp(4) - cxgbe(4) - hptnr(4) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Tue Aug 26 22:39:24 2014 (r270677) +++ stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Tue Aug 26 22:47:40 2014 (r270678) @@ -665,6 +665,8 @@ &hwlist.aac; + &hwlist.aacraid; + &hwlist.adv; &hwlist.adw; @@ -709,6 +711,8 @@ &hwlist.hptmv; + &hwlist.hptnr; + &hwlist.hptrr; &hwlist.ida; @@ -819,6 +823,8 @@ &hwlist.ale; + &hwlist.alc; + &hwlist.aue; &hwlist.axe; @@ -846,6 +852,8 @@ &hwlist.cxgb; + &hwlist.cxgbe; + &hwlist.dc; &hwlist.de; @@ -998,6 +1006,8 @@ &hwlist.ath; + &hwlist.ath.hal; + &hwlist.bwi; &hwlist.bwn; @@ -1581,6 +1591,10 @@ + &hwlist.atp; + + + [&arch.amd64;, &arch.i386;] PS/2 keyboards (&man.atkbd.4; driver) From gjb at FreeBSD.org Tue Aug 26 23:19:10 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Tue, 26 Aug 2014 23:19:10 +0000 (UTC) Subject: svn commit: r270680 - stable/10/release/doc/en_US.ISO8859-1/hardware Message-ID: <201408262319.s7QNJAhp077332@svn.freebsd.org> Author: gjb Date: Tue Aug 26 23:19:09 2014 New Revision: 270680 URL: http://svnweb.freebsd.org/changeset/base/270680 Log: Fix alphabetical sorting with alc(4) addition. Move atp(4) driver under 'Pointing Devices', added to 'Keyboards' by mistake. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Tue Aug 26 22:54:54 2014 (r270679) +++ stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Tue Aug 26 23:19:09 2014 (r270680) @@ -821,10 +821,10 @@ &hwlist.age; - &hwlist.ale; - &hwlist.alc; + &hwlist.ale; + &hwlist.aue; &hwlist.axe; @@ -1591,10 +1591,6 @@ - &hwlist.atp; - - - [&arch.amd64;, &arch.i386;] PS/2 keyboards (&man.atkbd.4; driver) @@ -1614,6 +1610,10 @@ + &hwlist.atp; + + + [&arch.amd64;, &arch.i386;, &arch.pc98;] Bus mice and compatible devices (&man.mse.4; driver) From gjb at FreeBSD.org Tue Aug 26 23:31:24 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Tue, 26 Aug 2014 23:31:22 +0000 (UTC) Subject: svn commit: r270681 - stable/10/release/doc/en_US.ISO8859-1/errata Message-ID: <201408262331.s7QNVMOb082898@svn.freebsd.org> Author: gjb Date: Tue Aug 26 23:31:22 2014 New Revision: 270681 URL: http://svnweb.freebsd.org/changeset/base/270681 Log: Fix a typo: s/sytem/system/ Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Tue Aug 26 23:19:09 2014 (r270680) +++ stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Tue Aug 26 23:31:22 2014 (r270681) @@ -333,7 +333,7 @@ boot Updating LSI firmware on &man.mps.4; controllers with the sas2flash utility may cause - the system to hang, or may cause the sytem to panic. This + the system to hang, or may cause the system to panic. This is fixed in the stable/10 branch with revisions r262553 and r262575, and will be included in From gjb at FreeBSD.org Tue Aug 26 23:45:27 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Tue, 26 Aug 2014 23:45:27 +0000 (UTC) Subject: svn commit: r270682 - stable/10/release/doc/en_US.ISO8859-1/hardware Message-ID: <201408262345.s7QNjRlr090788@svn.freebsd.org> Author: gjb Date: Tue Aug 26 23:45:26 2014 New Revision: 270682 URL: http://svnweb.freebsd.org/changeset/base/270682 Log: Fix the stable/10 hardware/article.xml to conform to FDP style conventions. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Tue Aug 26 23:31:22 2014 (r270681) +++ stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Tue Aug 26 23:45:26 2014 (r270682) @@ -1,14 +1,15 @@ %release; %devauto; ]> -
- &os; &release.current; Hardware Notes - +
+ + &os; &release.current; Hardware Notes The &os; Documentation Project @@ -30,7 +31,8 @@ 2012 2013 2014 - The &os; Documentation Project + The &os; Documentation + Project @@ -43,7 +45,6 @@ &tm-attrib.sun; &tm-attrib.general; - @@ -97,8 +98,8 @@ - The single-core &intel; &xeon; - processors Nocona, Irwindale, + The single-core &intel; &xeon; processors + Nocona, Irwindale, Potomac, and Cranford have EM64T support. @@ -121,9 +122,10 @@ Some &intel; &pentium; 4s and Celeron Ds using the Prescott core have EM64T support. See - the Intel - Processor Spec Finder for the definitive answer about - EM64T support in Intel processors. + the Intel + Processor Spec Finder for the definitive answer + about EM64T support in Intel processors. @@ -148,14 +150,14 @@ i386 &os;/&arch.i386; runs on a wide variety of IBM PC - compatible machines. Due to the wide range of + compatible machines. Due to the wide range of hardware available for this architecture, it is impossible to exhaustively list all combinations of equipment supported by &os;. Nevertheless, some general guidelines are presented here. Almost all &i386;-compatible processors with a floating - point unit are supported. All &intel; processors beginning + point unit are supported. All &intel; processors beginning with the 80486 are supported, including the 80486, &pentium;, &pentium; Pro, &pentium; II, &pentium; III, &pentium; 4, and variants thereof, such as the &xeon; and &celeron; processors. @@ -225,19 +227,22 @@ (DSDT) provided by each machine's BIOS. Some machines have bad or incomplete DSDTs, which prevents ACPI from functioning correctly. Replacement DSDTs for some machines can be found - at the DSDT - section of the ACPI4Linux project - Web site. &os; can use these DSDTs to override the DSDT - provided by the BIOS; see the &man.acpi.4; manual page for - more information. + at the DSDT + section of the ACPI4Linux + project Web site. &os; can use these DSDTs to override the + DSDT provided by the BIOS; see the &man.acpi.4; manual page + for more information. ia64 - Currently supported processors are the &itanium; - and the &itanium; - 2. + Currently supported processors are the &itanium; + and the &itanium; 2. Supported chipsets include: @@ -260,10 +265,10 @@ Most devices that can be found in or are compatible with &arch.ia64; machines are fully supported. The notable - exception is the VGA console. The &os; support for VGA + exception is the VGA console. The &os; support for VGA consoles is at this time too much based on PC hardware and not all &arch.ia64; machines have chipsets that provide sufficient - PC legacy support. As such &man.syscons.4; can not be enabled + PC legacy support. As such &man.syscons.4; cannot be enabled and the use of a serial console is required. @@ -299,8 +304,8 @@ powerpc - All Apple PowerPC machines with built-in USB are supported, - as well a limited selection of non-Apple machines, + All Apple PowerPC machines with built-in USB are + supported, as well a limited selection of non-Apple machines, including KVM on POWER7 SMP is supported on all systems with more than @@ -311,8 +316,8 @@ sparc64 This section describes the systems currently known to be - supported by &os; on the Fujitsu &sparc64; and Sun &ultrasparc; - platforms. + supported by &os; on the Fujitsu &sparc64; and Sun + &ultrasparc; platforms. SMP is supported on all systems with more than 1 processor. @@ -322,8 +327,8 @@ supported by the &man.creator.4; (Sun Creator, Sun Creator3D and Sun Elite3D) or &man.machfb.4; (Sun PGX and Sun PGX64 as well as the ATI Mach64 chips found onboard in for example - &sun.blade; 100, &sun.blade; 150, &sun.ultra; 5 and &sun.ultra; 10) - driver must use the serial console. + &sun.blade; 100, &sun.blade; 150, &sun.ultra; 5 and + &sun.ultra; 10) driver must use the serial console. If you have a system that is not listed here, it may not have been tested with &os; &release.current;. We encourage @@ -468,10 +473,11 @@ The following systems are partially supported by &os;. In - particular the fiber channel controllers in SBus-based systems are not - supported. However, it is possible to use these with a SCSI controller - supported by the &man.esp.4; driver (Sun ESP SCSI, Sun FAS Fast-SCSI - and Sun FAS366 Fast-Wide SCSI controllers). + particular the fiber channel controllers in SBus-based systems + are not supported. However, it is possible to use these with + a SCSI controller supported by the &man.esp.4; driver (Sun ESP + SCSI, Sun FAS Fast-SCSI and Sun FAS366 Fast-Wide SCSI + controllers). @@ -483,9 +489,9 @@ - Starting with 7.2-RELEASE, &arch.sparc64; systems based on Sun - &ultrasparc; III and beyond are also supported by &os;, which includes - the following known working systems: + Starting with 7.2-RELEASE, &arch.sparc64; systems based on + Sun &ultrasparc; III and beyond are also supported by &os;, + which includes the following known working systems: @@ -513,7 +519,8 @@ - &sun.fire; V215 (support first appeared in 7.3-RELEASE and 8.1-RELEASE) + &sun.fire; V215 (support first appeared in 7.3-RELEASE + and 8.1-RELEASE) @@ -521,7 +528,8 @@ - &sun.fire; V245 (support first appeared in 7.3-RELEASE and 8.1-RELEASE) + &sun.fire; V245 (support first appeared in 7.3-RELEASE + and 8.1-RELEASE) @@ -534,9 +542,10 @@ - &sun.fire; V480 (501-6780 and 501-6790 centerplanes only, for - which support first appeared in 7.3-RELEASE and 8.1-RELEASE, - other centerplanes might work beginning with 8.3-RELEASE and 9.0-RELEASE) + &sun.fire; V480 (501-6780 and 501-6790 centerplanes + only, for which support first appeared in 7.3-RELEASE and + 8.1-RELEASE, other centerplanes might work beginning with + 8.3-RELEASE and 9.0-RELEASE) @@ -544,8 +553,9 @@ - &sun.fire; V890 (support first appeared in 7.4-RELEASE and 8.1-RELEASE, - non-mixed &ultrasparc; IV/IV+ CPU-configurations only) + &sun.fire; V890 (support first appeared in 7.4-RELEASE + and 8.1-RELEASE, non-mixed &ultrasparc; IV/IV+ + CPU-configurations only) @@ -554,7 +564,7 @@ The following Sun &ultrasparc; systems are not tested but - believed to be also supported by &os;: + also believed to be supported by &os;: @@ -562,14 +572,16 @@ - &sun.fire; V490 (support first appeared in 7.4-RELEASE and 8.1-RELEASE, - non-mixed &ultrasparc; IV/IV+ CPU-configurations only) + &sun.fire; V490 (support first appeared in 7.4-RELEASE + and 8.1-RELEASE, non-mixed &ultrasparc; IV/IV+ + CPU-configurations only) - Starting with 7.4-RELEASE and 8.1-RELEASE, &arch.sparc64; systems based on - Fujitsu &sparc64; V are also supported by &os;, which - includes the following known working systems: + Starting with 7.4-RELEASE and 8.1-RELEASE, &arch.sparc64; + systems based on Fujitsu &sparc64; V are also supported by + &os;, which includes the following known working + systems: @@ -577,8 +589,8 @@ - The following Fujitsu &primepower; systems are not tested but - believed to be also supported by &os;: + The following Fujitsu &primepower; systems are not tested + but also believed to be supported by &os;: @@ -699,7 +711,7 @@ [&arch.amd64;, &arch.i386;] Booting from these - controllers is supported. EISA adapters are not + controllers is supported. EISA adapters are not supported. @@ -731,7 +743,7 @@ [&arch.amd64;, &arch.i386;] Booting from these - controllers is supported. EISA adapters are not + controllers is supported. EISA adapters are not supported. @@ -782,8 +794,8 @@ support CD-ROM commands are supported for read-only access by the CD-ROM drivers (such as &man.cd.4;). WORM/CD-R/CD-RW writing support is provided by &man.cdrecord.1;, which is a - part of the sysutils/cdrtools port in the Ports - Collection. + part of the sysutils/cdrtools port in the + Ports Collection. The following CD-ROM type systems are supported at this time: @@ -1023,8 +1035,8 @@ 4965AGN IEEE 802.11n PCI network adapters (&man.iwn.4; driver) - [&arch.i386;, &arch.amd64;] Marvell Libertas IEEE 802.11b/g - PCI network adapters (&man.malo.4; driver) + [&arch.i386;, &arch.amd64;] Marvell Libertas IEEE + 802.11b/g PCI network adapters (&man.malo.4; driver) Marvell 88W8363 IEEE 802.11n wireless network adapters (&man.mwl.4; driver) @@ -1145,12 +1157,13 @@ - [&arch.amd64;, &arch.i386;] Avlab Technology, PCI IO 2S - and PCI IO 4S + [&arch.amd64;, &arch.i386;] Avlab Technology, PCI IO + 2S and PCI IO 4S - [&arch.amd64;, &arch.i386;] Comtrol RocketPort 550 + [&arch.amd64;, &arch.i386;] Comtrol RocketPort + 550 @@ -1224,7 +1237,7 @@ [&arch.amd64;, &arch.i386;] SIIG Cyber 4S PCI - 16C550/16C650/16C850 + 16C550/16C650/16C850 @@ -1307,7 +1320,7 @@ "flags 0x15000?01" is necessary in kernel - configuration. + configuration. [&arch.pc98;] Media Intelligent RSB-384 (&man.sio.4; @@ -1456,7 +1469,8 @@ [&arch.amd64;, &arch.i386;, &arch.ia64;, &arch.pc98;] - USB Bluetooth adapters can be found in Bluetooth section. + USB Bluetooth adapters can be found in Bluetooth section. &hwlist.ohci; @@ -1578,7 +1592,8 @@ Information regarding specific video cards and compatibility with Xorg can be - found at http://www.x.org/. + found at http://www.x.org/. [&arch.amd64;, &arch.i386;, &arch.ia64;, &arch.pc98;] @@ -1637,7 +1652,8 @@ &man.moused.8; has more information on using pointing devices with &os;. Information on using pointing devices - with Xorg can be found at http://www.x.org/. + with Xorg can be found at http://www.x.org/. [&arch.amd64;, &arch.i386;] PC standard @@ -1670,8 +1686,9 @@ [&arch.i386;] Xilinx XC6200-based reconfigurable hardware - cards compatible with the HOT1 from Virtual Computers (xrpu - driver). + cards compatible with the HOT1 from Virtual Computers + (xrpu driver). [&arch.pc98;] Power Management Controller of NEC PC-98 Note (pmc driver) From gjb at FreeBSD.org Tue Aug 26 23:50:22 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Tue, 26 Aug 2014 23:50:22 +0000 (UTC) Subject: svn commit: r270683 - stable/10/release/doc/en_US.ISO8859-1/readme Message-ID: <201408262350.s7QNoMMt094303@svn.freebsd.org> Author: gjb Date: Tue Aug 26 23:50:21 2014 New Revision: 270683 URL: http://svnweb.freebsd.org/changeset/base/270683 Log: Update the readme/article.xml to reflect send-pr(1) is deprecated, and direct to Bugzilla. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/readme/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/readme/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/readme/article.xml Tue Aug 26 23:45:26 2014 (r270682) +++ stable/10/release/doc/en_US.ISO8859-1/readme/article.xml Tue Aug 26 23:50:21 2014 (r270683) @@ -249,21 +249,17 @@ course even more welcome. The preferred method to submit bug reports from a machine - with Internet mail connectivity is to use the &man.send-pr.1; - command. + with Internet connectivity is to use the Bugzilla + bug tracker. Problem Reports (PRs) submitted in this way will be filed and their progress tracked; the &os; developers will do their best to respond to all reported bugs as soon as - possible. A list + possible. A list of all active PRs is available on the &os; Web site; this list is useful to see what potential problems other users have encountered. - Note that &man.send-pr.1; itself is a shell script that - should be easy to move even onto a non-&os; system. Using - this interface is highly preferred. If, for some reason, you - are unable to use &man.send-pr.1; to submit a bug report, you - can try to send it to the &a.bugs;. + Note that &man.send-pr.1; is deprecated. For more information, Writing &os; Problem Reports, available on the &os; Web From gjb at FreeBSD.org Tue Aug 26 23:51:02 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Tue, 26 Aug 2014 23:51:01 +0000 (UTC) Subject: svn commit: r270684 - stable/10/release/doc/en_US.ISO8859-1/readme Message-ID: <201408262351.s7QNp1BK094444@svn.freebsd.org> Author: gjb Date: Tue Aug 26 23:51:01 2014 New Revision: 270684 URL: http://svnweb.freebsd.org/changeset/base/270684 Log: Bump copyright year. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/readme/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/readme/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/readme/article.xml Tue Aug 26 23:50:21 2014 (r270683) +++ stable/10/release/doc/en_US.ISO8859-1/readme/article.xml Tue Aug 26 23:51:01 2014 (r270684) @@ -35,6 +35,7 @@ 2011 2012 2013 + 2014 The &os; Documentation Project From gjb at FreeBSD.org Tue Aug 26 23:58:54 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Tue, 26 Aug 2014 23:58:54 +0000 (UTC) Subject: svn commit: r270685 - stable/10/release/doc/en_US.ISO8859-1/readme Message-ID: <201408262358.s7QNwswR096018@svn.freebsd.org> Author: gjb Date: Tue Aug 26 23:58:54 2014 New Revision: 270685 URL: http://svnweb.freebsd.org/changeset/base/270685 Log: Fix the stable/10 hardware/article.xml to conform to FDP style conventions. Fix a few rendering issues, while here. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/readme/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/readme/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/readme/article.xml Tue Aug 26 23:51:01 2014 (r270684) +++ stable/10/release/doc/en_US.ISO8859-1/readme/article.xml Tue Aug 26 23:58:54 2014 (r270685) @@ -1,10 +1,10 @@ %release; ]> - -
- &os; &release.current; README - +
+ + &os; &release.current; README The &os; Project @@ -36,7 +37,8 @@ 2012 2013 2014 - The &os; Documentation Project + The &os; Documentation + Project @@ -47,31 +49,32 @@ &tm-attrib.general; - - This document gives a brief introduction to &os; - &release.current;. It includes some information on how to - obtain &os;, a listing of various ways to contact the &os; - Project, and pointers to some other sources of - information. - + + This document gives a brief introduction to &os; + &release.current;. It includes some information on how to + obtain &os;, a listing of various ways to contact the &os; + Project, and pointers to some other sources of + information. + Introduction - This distribution is a &release.type; of &os; &release.current;, the - latest point along the &release.branch; branch. + This distribution is a &release.type; of &os; + &release.current;, the latest point along the &release.branch; + branch. About &os; &os; is an operating system based on 4.4 BSD Lite for - AMD64 and Intel EM64T based PC hardware (&arch.amd64;), - Intel, AMD, Cyrix or NexGen x86 based PC hardware (&arch.i386;), - Intel Itanium Processor based computers (&arch.ia64;), - NEC PC-9801/9821 series PCs and compatibles (&arch.pc98;), - and &ultrasparc; machines (&arch.sparc64;). Versions - for the &arm; (&arch.arm;), &mips; (&arch.mips;), and + AMD64 and Intel EM64T based PC hardware (&arch.amd64;), Intel, + AMD, Cyrix or NexGen x86 based PC hardware + (&arch.i386;), Intel Itanium Processor based computers + (&arch.ia64;), NEC PC-9801/9821 series PCs and compatibles + (&arch.pc98;), and &ultrasparc; machines (&arch.sparc64;). + Versions for the &arm; (&arch.arm;), &mips; (&arch.mips;), and &powerpc; (&arch.powerpc;) architectures are currently under development as well. &os; works with a wide variety of peripherals and configurations and can be used for everything @@ -88,61 +91,63 @@ A large collection of third-party ported software (the Ports Collection) is also provided to make it - easy to obtain and install all your favorite traditional &unix; - utilities for &os;. Each port consists of a - set of scripts to retrieve, configure, build, and install a - piece of software, with a single command. Over &os.numports; - ports, from editors to programming languages to graphical - applications, make &os; a powerful and comprehensive operating - environment that extends far beyond what's provided by many - commercial versions of &unix;. Most ports are also available as - pre-compiled packages, which can be quickly - installed from the installation program. + easy to obtain and install all your favorite traditional + &unix; utilities for &os;. Each port consists + of a set of scripts to retrieve, configure, build, and install + a piece of software, with a single command. Over + &os.numports; ports, from editors to programming languages to + graphical applications, make &os; a powerful and comprehensive + operating environment that extends far beyond what's provided + by many commercial versions of &unix;. Most ports are also + available as pre-compiled packages, which can + be quickly installed from the installation program. Target Audience - This &release.type; is aimed primarily at early adopters - and various other users who want to get involved with the - ongoing development of &os;. While the &os; development team - tries its best to ensure that each &release.type; works as - advertised, &release.branch; is very much a - work-in-progress. - - The basic requirements for using this &release.type; are - technical proficiency with &os; and an understanding of the - ongoing development process of &os; &release.branch; (as - discussed on the &a.stable;). - - For those more interested in doing business with &os; than - in experimenting with new &os; technology, formal releases - (such as &release.prev.stable;) are frequently more appropriate. - Releases undergo a period of testing and quality assurance - checking to ensure high reliability and dependability. - - This &release.type; is aimed primarily at early adopters - and various other users who want to get involved with the - ongoing development of &os;. While the &os; development team - tries its best to ensure that each &release.type; works as - advertised, &release.branch; is very much a - work-in-progress. - - The basic requirements for using this &release.type; are - technical proficiency with &os; and an understanding of the - ongoing development process of &os; &release.branch; (as - discussed on the &a.stable;). - - For those more interested in doing business with &os; than - in experimenting with new &os; technology, formal releases - (such as &release.prev.stable;) are frequently more appropriate. - Releases undergo a period of testing and quality assurance - checking to ensure high reliability and dependability. - - This &release.type; of &os; is suitable for all users. It - has undergone a period of testing and quality assurance - checking to ensure the highest reliability and - dependability. + This &release.type; is aimed + primarily at early adopters and various other users who want + to get involved with the ongoing development of &os;. While + the &os; development team tries its best to ensure that each + &release.type; works as advertised, &release.branch; is very + much a work-in-progress. + + The basic requirements for using + this &release.type; are technical proficiency with &os; and an + understanding of the ongoing development process of &os; + &release.branch; (as discussed on the &a.stable;). + + For those more interested in doing + business with &os; than in experimenting with new &os; + technology, formal releases (such as &release.prev.stable;) + are frequently more appropriate. Releases undergo a period of + testing and quality assurance checking to ensure high + reliability and dependability. + + This &release.type; is aimed + primarily at early adopters and various other users who want + to get involved with the ongoing development of &os;. While + the &os; development team tries its best to ensure that each + &release.type; works as advertised, &release.branch; is very + much a work-in-progress. + + The basic requirements for using + this &release.type; are technical proficiency with &os; and an + understanding of the ongoing development process of &os; + &release.branch; (as discussed on the &a.stable;). + + For those more interested in doing + business with &os; than in experimenting with new &os; + technology, formal releases (such as &release.prev.stable;) + are frequently more appropriate. Releases undergo a period of + testing and quality assurance checking to ensure high + reliability and dependability. + + This &release.type; of &os; is + suitable for all users. It has undergone a period of testing + and quality assurance checking to ensure the highest + reliability and dependability. @@ -166,16 +171,18 @@ Collection, or other extra material. A list of the CDROM and DVD publishers known to the - project are listed in the Obtaining - &os; appendix to the Handbook. + project are listed in the Obtaining + &os; appendix to the Handbook. FTP You can use FTP to retrieve &os; and any or all of its - optional packages from ftp://ftp.FreeBSD.org/, which is the official - &os; release site, or any of its + optional packages from ftp://ftp.FreeBSD.org/, + which is the official &os; release site, or any of its mirrors. Lists of locations that mirror &os; can be found in the @@ -187,8 +194,9 @@ Additional mirror sites are always welcome. Contact freebsd-admin at FreeBSD.org for more details on becoming an official mirror site. You can also find useful - information for mirror sites at the Mirroring - &os; article. + information for mirror sites at the Mirroring &os; + article. Mirrors generally contain the ISO images generally used to create a CDROM of a &os; release. They usually also contain @@ -208,16 +216,17 @@ For any questions or general technical support issues, please send mail to the &a.questions;. - If you're tracking the &release.branch; development efforts, you + If tracking the &release.branch; development efforts, you must join the &a.stable;, in order to keep abreast of recent developments and changes that may affect the way you use and maintain the system. - Being a largely-volunteer effort, the &os; - Project is always happy to have extra hands willing to help—there are already far more desired enhancements than - there is time to implement them. To contact the developers on - technical matters, or with offers of help, please send mail to - the &a.hackers;. + Being a largely-volunteer effort, the &os; Project is + always happy to have extra hands willing to help—there + are already far more desired enhancements than there is time + to implement them. To contact the developers on technical + matters, or with offers of help, please send mail to the + &a.hackers;. Please note that these mailing lists can experience significant amounts of traffic. If you @@ -226,13 +235,15 @@ preferable to subscribe instead to the &a.announce;. All of the mailing lists can be freely joined by anyone - wishing to do so. Visit the - &os; Mailman Info Page. This will give you more - information on joining the various lists, accessing archives, - etc. There are a number of mailing lists targeted at special - interest groups not mentioned here; more information can be - obtained either from the Mailman pages or the mailing - lists section of the &os; Web site. + wishing to do so. Visit the &os; Mailman Info + Page. This will give you more information on joining + the various lists, accessing archives, etc. There are + a number of mailing lists targeted at special interest groups + not mentioned here; more information can be obtained either + from the Mailman pages or the mailing + lists section of the &os; Web site. Do not send email to the lists @@ -250,22 +261,24 @@ course even more welcome. The preferred method to submit bug reports from a machine - with Internet connectivity is to use the Bugzilla - bug tracker. + with Internet connectivity is to use the + Bugzilla bug tracker. Problem Reports (PRs) submitted in this way will be filed and their progress tracked; the &os; developers will do their best to respond to all reported bugs as soon as - possible. A list - of all active PRs is available on the &os; Web site; - this list is useful to see what potential problems other users - have encountered. + possible. A list of all + active PRs is available on the &os; Web site; this + list is useful to see what potential problems other users have + encountered. Note that &man.send-pr.1; is deprecated. - For more information, Writing - &os; Problem Reports, available on the &os; Web - site, has a number of helpful hints on writing and submitting - effective problem reports. + For more information, Writing + &os; Problem Reports, available on the &os; + Web site, has a number of helpful hints on writing and + submitting effective problem reports. @@ -284,47 +297,47 @@ provided in various formats. Most distributions will include both ASCII text (.TXT) and HTML (.HTM) renditions. Some distributions - may also include other formats such as Portable Document Format - (.PDF). + may also include other formats such as Portable Document + Format (.PDF). - - - README.TXT: This file, which - gives some general information about &os; as well as - some cursory notes about obtaining a - distribution. - - - - RELNOTES.TXT: The release - notes, showing what's new and different in &os; - &release.current; compared to the previous release (&os; - &release.prev;). - - - - HARDWARE.TXT: The hardware - compatibility list, showing devices with which &os; has - been tested and is known to work. - - - - ERRATA.TXT: Release errata. - Late-breaking, post-release information can be found in - this file, which is principally applicable to releases - (as opposed to snapshots). It is important to consult - this file before installing a release of &os;, as it - contains the latest information on problems which have - been found and fixed since the release was - created. - - - + + + README.TXT: This file, which + gives some general information about &os; as well as + some cursory notes about obtaining a + distribution. + + + + RELNOTES.TXT: The release + notes, showing what's new and different in &os; + &release.current; compared to the previous release (&os; + &release.prev;). + + + + HARDWARE.TXT: The hardware + compatibility list, showing devices with which &os; has + been tested and is known to work. + + + + ERRATA.TXT: Release errata. + Late-breaking, post-release information can be found in + this file, which is principally applicable to releases + (as opposed to snapshots). It is important to consult + this file before installing a release of &os;, as it + contains the latest information on problems which have + been found and fixed since the release was + created. + + On platforms that support &man.bsdinstall.8; (currently - &arch.amd64;, &arch.i386;, &arch.ia64;, &arch.pc98;, and &arch.sparc64;), these documents are generally available via the - Documentation menu during installation. Once the system is - installed, you can revisit this menu by re-running the + &arch.amd64;, &arch.i386;, &arch.ia64;, &arch.pc98;, and + &arch.sparc64;), these documents are generally available via + the Documentation menu during installation. Once the system + is installed, you can revisit this menu by re-running the &man.bsdinstall.8; utility. @@ -336,8 +349,9 @@ other copies are kept updated on the Internet and should be consulted as the current errata for this release. These other copies of the errata are located at - &url.base;/releases/ (as - well as any sites which keep up-to-date mirrors of this + &url.base;/releases/ + (as well as any sites which keep up-to-date mirrors of this location). @@ -345,50 +359,54 @@ Manual Pages - As with almost all &unix; like operating systems, &os; comes - with a set of on-line manual pages, accessed through the - &man.man.1; command or through the hypertext manual - pages gateway on the &os; Web site. In general, the - manual pages provide information on the different commands and - APIs available to the &os; user. + As with almost all &unix; like operating systems, &os; + comes with a set of on-line manual pages, accessed through the + &man.man.1; command or through the hypertext + manual pages gateway on the &os; Web site. In + general, the manual pages provide information on the different + commands and APIs available to the &os; user. In some cases, manual pages are written to give information on particular topics. Notable examples of such - manual pages are &man.tuning.7; (a guide to performance tuning), - &man.security.7; (an introduction to &os; security), and - &man.style.9; (a style guide to kernel coding). + manual pages are &man.tuning.7; (a guide to performance + tuning), &man.security.7; (an introduction to &os; security), + and &man.style.9; (a style guide to kernel coding). Books and Articles Two highly-useful collections of &os;-related information, - maintained by the &os; Project, - are the &os; Handbook and &os; FAQ (Frequently Asked - Questions document). On-line versions of the Handbook - and FAQ - are always available from the &os; Documentation - page or its mirrors. If you install the + maintained by the &os; Project, are the &os; Handbook and &os; + FAQ (Frequently Asked Questions document). On-line versions + of the Handbook and FAQ are always + available from the &os; Documentation + page or its mirrors. If you install the doc distribution set, you can use a Web browser to read the Handbook and FAQ locally. In particular, note that the Handbook contains a step-by-step guide to installing &os;. A number of on-line books and articles, also maintained by - the &os; Project, cover more-specialized, &os;-related topics. - This material spans a wide range of topics, from effective use - of the mailing lists, to dual-booting &os; with other - operating systems, to guidelines for new committers. Like the - Handbook and FAQ, these documents are available from the &os; - Documentation Page or in the doc - distribution set. + the &os; Project, cover more-specialized, &os;-related topics. + This material spans a wide range of topics, from effective use + of the mailing lists, to dual-booting &os; with other + operating systems, to guidelines for new committers. Like the + Handbook and FAQ, these documents are available from the &os; + Documentation Page or in the doc + distribution set. A listing of other books and documents about &os; can be - found in the bibliography - of the &os; Handbook. Because of &os;'s strong &unix; heritage, - many other articles and books written for &unix; systems are - applicable as well, some of which are also listed in the - bibliography. + found in the bibliography + of the &os; Handbook. Because of &os;'s strong &unix; + heritage, many other articles and books written for &unix; + systems are applicable as well, some of which are also listed + in the bibliography. @@ -397,10 +415,11 @@ &os; represents the cumulative work of many hundreds, if not thousands, of individuals from around the world who have worked - countless hours to bring about this &release.type;. For a - complete list of &os; developers and contributors, please see - Contributors - to &os; on the &os; Web site or any of its + countless hours to bring about this &release.type;. For + a complete list of &os; developers and contributors, please see + Contributors + to &os; on the &os; Web site or any of its mirrors. Special thanks also go to the many thousands of &os; users From gjb at FreeBSD.org Wed Aug 27 00:07:34 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Wed, 27 Aug 2014 00:07:33 +0000 (UTC) Subject: svn commit: r270686 - stable/10/release/doc/en_US.ISO8859-1/errata Message-ID: <201408270007.s7R07XHJ001713@svn.freebsd.org> Author: gjb Date: Wed Aug 27 00:07:33 2014 New Revision: 270686 URL: http://svnweb.freebsd.org/changeset/base/270686 Log: Fix the stable/10 errata/article.xml to conform to FDP style conventions (as best as possible). Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Tue Aug 26 23:58:54 2014 (r270685) +++ stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Wed Aug 27 00:07:33 2014 (r270686) @@ -1,14 +1,14 @@ + "http://www.FreeBSD.org/release/XML/release.ent"> %release; ]>
+ xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"> + &os; &release.prev; Errata @@ -19,7 +19,8 @@ 2014 - The &os; Documentation Project + The &os; Documentation + Project @@ -31,46 +32,45 @@ This document lists errata items for &os; &release.prev;, - containing significant information discovered after the release - or too late in the release cycle to be otherwise included in the - release documentation. - This information includes security advisories, as well as news - relating to the software or documentation that could affect its - operation or usability. An up-to-date version of this document - should always be consulted before installing this version of + containing significant information discovered after the + release or too late in the release cycle to be otherwise + included in the release documentation. This information + includes security advisories, as well as news relating to the + software or documentation that could affect its operation or + usability. An up-to-date version of this document should + always be consulted before installing this version of &os;. - This errata document for &os; &release.prev; - will be maintained until the release of &os; &release.next;. + This errata document for &os; &release.prev; will be + maintained until the release of &os; &release.next;. Introduction - This errata document contains late-breaking news - about &os; &release.prev; - Before installing this version, it is important to consult this - document to learn about any post-release discoveries or problems - that may already have been found and fixed. + This errata document contains late-breaking + news about &os; &release.prev; Before installing this + version, it is important to consult this document to learn about + any post-release discoveries or problems that may already have + been found and fixed. Any version of this errata document actually distributed with the release (for example, on a CDROM distribution) will be out of date by definition, but other copies are kept updated on the Internet and should be consulted as the current - errata for this release. These other copies of the - errata are located at - , - plus any sites - which keep up-to-date mirrors of this location. + errata for this release. These other copies of the + errata are located at , plus any + sites which keep up-to-date mirrors of this location. Source and binary snapshots of &os; &release.branch; also contain up-to-date copies of this document (as of the time of the snapshot). - For a list of all &os; CERT security advisories, see - - or . + For a list of all &os; CERT security advisories, see or . @@ -240,17 +240,17 @@ It causes various errors and makes &os; quite unstable. Although the cause is still unclear, disabling unmapped I/O - works as a workaround. To disable it, choose Escape to - loader prompt in the boot menu and enter the following - lines from &man.loader.8; prompt, after - an OK: + works as a workaround. To disable it, choose + Escape to loader prompt in the boot menu + and enter the following lines from &man.loader.8; prompt, + after an OK: set vfs.unmapped_buf_allowed=0 boot Note that the following line has to be added to - /boot/loader.conf after a boot. - It disables unmapped I/O at every boot: + /boot/loader.conf after a boot. It + disables unmapped I/O at every boot: vfs.unmapped_buf_allowed=0 @@ -295,7 +295,8 @@ boot ifconfig_bxe0="DHCP -tso" - This bug has been fixed on &os; &release.current;. + This bug has been fixed on &os; + &release.current;. @@ -327,7 +328,7 @@ boot The &man.mount.udf.8; utility has a bug which prevents it from mounting any UDF file system. This has been fixed - in &os;-CURRENT and &os; &release.current;. + in &os;-CURRENT and &os; &release.current;. From gjb at FreeBSD.org Wed Aug 27 00:50:52 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Wed, 27 Aug 2014 00:50:51 +0000 (UTC) Subject: svn commit: r270688 - in stable/10/release: . arm Message-ID: <201408270050.s7R0opZn023505@svn.freebsd.org> Author: gjb Date: Wed Aug 27 00:50:51 2014 New Revision: 270688 URL: http://svnweb.freebsd.org/changeset/base/270688 Log: MFC r270417, r270418, r270455, r270457: r270417: Fix arm build breakage when building stable/10 on head/. r270418: Also export UNAME_r to fix arm builds. r270455: Set OSREL and UNAME_r in release/release.sh when building ports to prevent ports build failures from killing the release build. r270457: Wrap a long line. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/arm/release.sh stable/10/release/release.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/release/arm/release.sh ============================================================================== --- stable/10/release/arm/release.sh Wed Aug 27 00:48:09 2014 (r270687) +++ stable/10/release/arm/release.sh Wed Aug 27 00:50:51 2014 (r270688) @@ -92,6 +92,14 @@ install_uboot() { } main() { + # Fix broken ports that use kern.osreldate. + OSVERSION=$(chroot ${CHROOTDIR} /usr/bin/uname -U) + export OSVERSION + REVISION=$(chroot ${CHROOTDIR} make -C /usr/src/release -V REVISION) + BRANCH=$(chroot ${CHROOTDIR} make -C /usr/src/release -V BRANCH) + UNAME_r=${REVISION}-${BRANCH} + export UNAME_r + # Build the 'xdev' target for crochet. eval chroot ${CHROOTDIR} make -C /usr/src \ ${XDEV_FLAGS} XDEV=${XDEV} XDEV_ARCH=${XDEV_ARCH} \ Modified: stable/10/release/release.sh ============================================================================== --- stable/10/release/release.sh Wed Aug 27 00:48:09 2014 (r270687) +++ stable/10/release/release.sh Wed Aug 27 00:50:51 2014 (r270688) @@ -253,11 +253,16 @@ if [ -d ${CHROOTDIR}/usr/ports ]; then ## Trick the ports 'run-autotools-fixup' target to do the right thing. _OSVERSION=$(sysctl -n kern.osreldate) + REVISION=$(chroot ${CHROOTDIR} make -C /usr/src/release -V REVISION) + BRANCH=$(chroot ${CHROOTDIR} make -C /usr/src/release -V BRANCH) + UNAME_r=${REVISION}-${BRANCH} if [ -d ${CHROOTDIR}/usr/doc ] && [ -z "${NODOC}" ]; then PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes" - PBUILD_FLAGS="${PBUILD_FLAGS}" + PBUILD_FLAGS="${PBUILD_FLAGS} UNAME_r=${UNAME_r}" + PBUILD_FLAGS="${PBUILD_FLAGS} OSREL=${REVISION}" chroot ${CHROOTDIR} make -C /usr/ports/textproc/docproj \ - ${PBUILD_FLAGS} OPTIONS_UNSET="FOP IGOR" install clean distclean + ${PBUILD_FLAGS} OPTIONS_UNSET="FOP IGOR" \ + install clean distclean fi fi From gjb at FreeBSD.org Wed Aug 27 00:57:46 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Wed, 27 Aug 2014 00:57:46 +0000 (UTC) Subject: svn commit: r270690 - stable/9/release Message-ID: <201408270057.s7R0vkk9025293@svn.freebsd.org> Author: gjb Date: Wed Aug 27 00:57:45 2014 New Revision: 270690 URL: http://svnweb.freebsd.org/changeset/base/270690 Log: MFC r270455, r270457: r270455: Set OSREL and UNAME_r in release/release.sh when building ports to prevent ports build failures from killing the release build. r270457: Wrap a long line. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/release.sh Directory Properties: stable/9/release/ (props changed) Modified: stable/9/release/release.sh ============================================================================== --- stable/9/release/release.sh Wed Aug 27 00:53:56 2014 (r270689) +++ stable/9/release/release.sh Wed Aug 27 00:57:45 2014 (r270690) @@ -253,11 +253,16 @@ if [ -d ${CHROOTDIR}/usr/ports ]; then ## Trick the ports 'run-autotools-fixup' target to do the right thing. _OSVERSION=$(sysctl -n kern.osreldate) + REVISION=$(chroot ${CHROOTDIR} make -C /usr/src/release -V REVISION) + BRANCH=$(chroot ${CHROOTDIR} make -C /usr/src/release -V BRANCH) + UNAME_r=${REVISION}-${BRANCH} if [ -d ${CHROOTDIR}/usr/doc ] && [ -z "${NODOC}" ]; then PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes" - PBUILD_FLAGS="${PBUILD_FLAGS}" + PBUILD_FLAGS="${PBUILD_FLAGS} UNAME_r=${UNAME_r}" + PBUILD_FLAGS="${PBUILD_FLAGS} OSREL=${REVISION}" chroot ${CHROOTDIR} make -C /usr/ports/textproc/docproj \ - ${PBUILD_FLAGS} OPTIONS_UNSET="FOP IGOR" install clean distclean + ${PBUILD_FLAGS} OPTIONS_UNSET="FOP IGOR" \ + install clean distclean fi fi From kib at FreeBSD.org Wed Aug 27 01:34:34 2014 From: kib at FreeBSD.org (Konstantin Belousov) Date: Wed, 27 Aug 2014 01:34:34 +0000 (UTC) Subject: svn commit: r270693 - stable/10/sys/amd64/include Message-ID: <201408270134.s7R1YYav043618@svn.freebsd.org> Author: kib Date: Wed Aug 27 01:34:33 2014 New Revision: 270693 URL: http://svnweb.freebsd.org/changeset/base/270693 Log: MFC r270202: Increase max number of physical segments on amd64 to 63. Modified: stable/10/sys/amd64/include/vmparam.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/include/vmparam.h ============================================================================== --- stable/10/sys/amd64/include/vmparam.h Wed Aug 27 01:02:19 2014 (r270692) +++ stable/10/sys/amd64/include/vmparam.h Wed Aug 27 01:34:33 2014 (r270693) @@ -87,7 +87,7 @@ * largest physical address that is accessible by ISA DMA is split * into two PHYSSEG entries. */ -#define VM_PHYSSEG_MAX 31 +#define VM_PHYSSEG_MAX 63 /* * Create three free page pools: VM_FREEPOOL_DEFAULT is the default pool From kib at FreeBSD.org Wed Aug 27 01:37:23 2014 From: kib at FreeBSD.org (Konstantin Belousov) Date: Wed, 27 Aug 2014 01:37:23 +0000 (UTC) Subject: svn commit: r270694 - stable/10/sys/ufs/ffs Message-ID: <201408270137.s7R1bNgF044090@svn.freebsd.org> Author: kib Date: Wed Aug 27 01:37:22 2014 New Revision: 270694 URL: http://svnweb.freebsd.org/changeset/base/270694 Log: MFC r270203: Correct the test for condition to suspend UFS filesystem during unmount. Modified: stable/10/sys/ufs/ffs/ffs_vfsops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- stable/10/sys/ufs/ffs/ffs_vfsops.c Wed Aug 27 01:34:33 2014 (r270693) +++ stable/10/sys/ufs/ffs/ffs_vfsops.c Wed Aug 27 01:37:22 2014 (r270694) @@ -1213,7 +1213,7 @@ ffs_unmount(mp, mntflags) susp = 0; if (mntflags & MNT_FORCE) { flags |= FORCECLOSE; - susp = fs->fs_ronly != 0; + susp = fs->fs_ronly == 0; } #ifdef UFS_EXTATTR if ((error = ufs_extattr_stop(mp, td))) { From kib at FreeBSD.org Wed Aug 27 01:38:27 2014 From: kib at FreeBSD.org (Konstantin Belousov) Date: Wed, 27 Aug 2014 01:38:26 +0000 (UTC) Subject: svn commit: r270695 - stable/10/sys/ufs/ufs Message-ID: <201408270138.s7R1cQqf044298@svn.freebsd.org> Author: kib Date: Wed Aug 27 01:38:26 2014 New Revision: 270695 URL: http://svnweb.freebsd.org/changeset/base/270695 Log: MFC r270204: Do not busy the UFS mount point inside VOP_RENAME(). Modified: stable/10/sys/ufs/ufs/ufs_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- stable/10/sys/ufs/ufs/ufs_vnops.c Wed Aug 27 01:37:22 2014 (r270694) +++ stable/10/sys/ufs/ufs/ufs_vnops.c Wed Aug 27 01:38:26 2014 (r270695) @@ -1142,11 +1142,6 @@ ufs_rename(ap) mp = NULL; goto releout; } - error = vfs_busy(mp, 0); - if (error) { - mp = NULL; - goto releout; - } relock: /* * We need to acquire 2 to 4 locks depending on whether tvp is NULL @@ -1546,8 +1541,6 @@ unlockout: if (error == 0 && tdp->i_flag & IN_NEEDSYNC) error = VOP_FSYNC(tdvp, MNT_WAIT, td); vput(tdvp); - if (mp) - vfs_unbusy(mp); return (error); bad: @@ -1565,8 +1558,6 @@ releout: vrele(tdvp); if (tvp) vrele(tvp); - if (mp) - vfs_unbusy(mp); return (error); } From grehan at FreeBSD.org Wed Aug 27 06:13:44 2014 From: grehan at FreeBSD.org (Peter Grehan) Date: Wed, 27 Aug 2014 06:13:44 +0000 (UTC) Subject: svn commit: r270696 - stable/10/sys/amd64/include Message-ID: <201408270613.s7R6DiDS071771@svn.freebsd.org> Author: grehan Date: Wed Aug 27 06:13:44 2014 New Revision: 270696 URL: http://svnweb.freebsd.org/changeset/base/270696 Log: MFC 270438 Change __inline style to be consistent with FreeBSD usage, and also fix gcc build. PR: 192880 Modified: stable/10/sys/amd64/include/vmm.h Modified: stable/10/sys/amd64/include/vmm.h ============================================================================== --- stable/10/sys/amd64/include/vmm.h Wed Aug 27 01:38:26 2014 (r270695) +++ stable/10/sys/amd64/include/vmm.h Wed Aug 27 06:13:44 2014 (r270696) @@ -587,25 +587,25 @@ struct vm_exit { void vm_inject_fault(void *vm, int vcpuid, int vector, int errcode_valid, int errcode); -static void __inline +static __inline void vm_inject_ud(void *vm, int vcpuid) { vm_inject_fault(vm, vcpuid, IDT_UD, 0, 0); } -static void __inline +static __inline void vm_inject_gp(void *vm, int vcpuid) { vm_inject_fault(vm, vcpuid, IDT_GP, 1, 0); } -static void __inline +static __inline void vm_inject_ac(void *vm, int vcpuid, int errcode) { vm_inject_fault(vm, vcpuid, IDT_AC, 1, errcode); } -static void __inline +static __inline void vm_inject_ss(void *vm, int vcpuid, int errcode) { vm_inject_fault(vm, vcpuid, IDT_SS, 1, errcode); From hselasky at FreeBSD.org Wed Aug 27 14:07:25 2014 From: hselasky at FreeBSD.org (Hans Petter Selasky) Date: Wed, 27 Aug 2014 14:07:24 +0000 (UTC) Subject: svn commit: r270711 - stable/10/sys/netinet/cc Message-ID: <201408271407.s7RE7O8V089299@svn.freebsd.org> Author: hselasky Date: Wed Aug 27 14:07:24 2014 New Revision: 270711 URL: http://svnweb.freebsd.org/changeset/base/270711 Log: MFC r269777: 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 Modified: stable/10/sys/netinet/cc/cc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/cc/cc.c ============================================================================== --- stable/10/sys/netinet/cc/cc.c Wed Aug 27 13:21:53 2014 (r270710) +++ stable/10/sys/netinet/cc/cc.c Wed Aug 27 14:07:24 2014 (r270711) @@ -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 slw at zxy.spb.ru Wed Aug 27 14:09:06 2014 From: slw at zxy.spb.ru (Slawa Olhovchenkov) Date: Wed, 27 Aug 2014 18:09:02 +0400 Subject: svn commit: r270644 - stable/10/usr.sbin/bsdinstall/scripts In-Reply-To: <201408260231.s7Q2VbCW087619@svn.freebsd.org> References: <201408260231.s7Q2VbCW087619@svn.freebsd.org> Message-ID: <20140827140902.GA41194@zxy.spb.ru> On Tue, Aug 26, 2014 at 02:31:37AM +0000, Andrew Thompson wrote: In zfs directory layout you missing some separate datesets: usr/home (or, may be, just /home) usr/obj usr/ports/packages usr/ports/distfiles Can you do it before 10.1? From hselasky at FreeBSD.org Wed Aug 27 14:11:26 2014 From: hselasky at FreeBSD.org (Hans Petter Selasky) Date: Wed, 27 Aug 2014 14:11:26 +0000 (UTC) Subject: svn commit: r270712 - stable/9/sys/netinet/cc Message-ID: <201408271411.s7REBQGP091508@svn.freebsd.org> Author: hselasky Date: Wed Aug 27 14:11:25 2014 New Revision: 270712 URL: http://svnweb.freebsd.org/changeset/base/270712 Log: MFC r269777: 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 Modified: stable/9/sys/netinet/cc/cc.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/cc/cc.c ============================================================================== --- stable/9/sys/netinet/cc/cc.c Wed Aug 27 14:07:24 2014 (r270711) +++ stable/9/sys/netinet/cc/cc.c Wed Aug 27 14:11:25 2014 (r270712) @@ -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 hselasky at FreeBSD.org Wed Aug 27 14:13:48 2014 From: hselasky at FreeBSD.org (Hans Petter Selasky) Date: Wed, 27 Aug 2014 14:13:48 +0000 (UTC) Subject: svn commit: r270713 - stable/8/sys/netinet/cc Message-ID: <201408271413.s7REDme3093694@svn.freebsd.org> Author: hselasky Date: Wed Aug 27 14:13:47 2014 New Revision: 270713 URL: http://svnweb.freebsd.org/changeset/base/270713 Log: MFC r269777: 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 Modified: stable/8/sys/netinet/cc/cc.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/netinet/cc/cc.c ============================================================================== --- stable/8/sys/netinet/cc/cc.c Wed Aug 27 14:11:25 2014 (r270712) +++ stable/8/sys/netinet/cc/cc.c Wed Aug 27 14:13:47 2014 (r270713) @@ -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 hselasky at FreeBSD.org Wed Aug 27 14:17:16 2014 From: hselasky at FreeBSD.org (Hans Petter Selasky) Date: Wed, 27 Aug 2014 14:17:16 +0000 (UTC) Subject: svn commit: r270714 - stable/10/lib/libusb Message-ID: <201408271417.s7REHGuX094246@svn.freebsd.org> Author: hselasky Date: Wed Aug 27 14:17:15 2014 New Revision: 270714 URL: http://svnweb.freebsd.org/changeset/base/270714 Log: MFC r270133: Add more USB class codes. Modified: stable/10/lib/libusb/libusb.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libusb/libusb.h ============================================================================== --- stable/10/lib/libusb/libusb.h Wed Aug 27 14:13:47 2014 (r270713) +++ stable/10/lib/libusb/libusb.h Wed Aug 27 14:17:15 2014 (r270714) @@ -51,10 +51,18 @@ enum libusb_class_code { LIBUSB_CLASS_COMM = 2, LIBUSB_CLASS_HID = 3, LIBUSB_CLASS_PTP = 6, + LIBUSB_CLASS_IMAGE = 6, LIBUSB_CLASS_PRINTER = 7, LIBUSB_CLASS_MASS_STORAGE = 8, LIBUSB_CLASS_HUB = 9, LIBUSB_CLASS_DATA = 10, + LIBUSB_CLASS_SMART_CARD = 11, + LIBUSB_CLASS_CONTENT_SECURITY = 13, + LIBUSB_CLASS_VIDEO = 14, + LIBUSB_CLASS_PERSONAL_HEALTHCARE = 15, + LIBUSB_CLASS_DIAGNOSTIC_DEVICE = 0xdc, + LIBUSB_CLASS_WIRELESS = 0xe0, + LIBUSB_CLASS_APPLICATION = 0xfe, LIBUSB_CLASS_VENDOR_SPEC = 0xff, }; From hselasky at FreeBSD.org Wed Aug 27 14:18:49 2014 From: hselasky at FreeBSD.org (Hans Petter Selasky) Date: Wed, 27 Aug 2014 14:18:48 +0000 (UTC) Subject: svn commit: r270715 - stable/9/lib/libusb Message-ID: <201408271418.s7REImCr094493@svn.freebsd.org> Author: hselasky Date: Wed Aug 27 14:18:48 2014 New Revision: 270715 URL: http://svnweb.freebsd.org/changeset/base/270715 Log: MFC r270133: Add more USB class codes. Modified: stable/9/lib/libusb/libusb.h Directory Properties: stable/9/lib/libusb/ (props changed) Modified: stable/9/lib/libusb/libusb.h ============================================================================== --- stable/9/lib/libusb/libusb.h Wed Aug 27 14:17:15 2014 (r270714) +++ stable/9/lib/libusb/libusb.h Wed Aug 27 14:18:48 2014 (r270715) @@ -48,10 +48,18 @@ enum libusb_class_code { LIBUSB_CLASS_COMM = 2, LIBUSB_CLASS_HID = 3, LIBUSB_CLASS_PTP = 6, + LIBUSB_CLASS_IMAGE = 6, LIBUSB_CLASS_PRINTER = 7, LIBUSB_CLASS_MASS_STORAGE = 8, LIBUSB_CLASS_HUB = 9, LIBUSB_CLASS_DATA = 10, + LIBUSB_CLASS_SMART_CARD = 11, + LIBUSB_CLASS_CONTENT_SECURITY = 13, + LIBUSB_CLASS_VIDEO = 14, + LIBUSB_CLASS_PERSONAL_HEALTHCARE = 15, + LIBUSB_CLASS_DIAGNOSTIC_DEVICE = 0xdc, + LIBUSB_CLASS_WIRELESS = 0xe0, + LIBUSB_CLASS_APPLICATION = 0xfe, LIBUSB_CLASS_VENDOR_SPEC = 0xff, }; From hselasky at FreeBSD.org Wed Aug 27 14:20:02 2014 From: hselasky at FreeBSD.org (Hans Petter Selasky) Date: Wed, 27 Aug 2014 14:20:02 +0000 (UTC) Subject: svn commit: r270716 - stable/8/lib/libusb Message-ID: <201408271420.s7REK24K094782@svn.freebsd.org> Author: hselasky Date: Wed Aug 27 14:20:01 2014 New Revision: 270716 URL: http://svnweb.freebsd.org/changeset/base/270716 Log: MFC r270133: Add more USB class codes. Modified: stable/8/lib/libusb/libusb.h Directory Properties: stable/8/lib/libusb/ (props changed) Modified: stable/8/lib/libusb/libusb.h ============================================================================== --- stable/8/lib/libusb/libusb.h Wed Aug 27 14:18:48 2014 (r270715) +++ stable/8/lib/libusb/libusb.h Wed Aug 27 14:20:01 2014 (r270716) @@ -48,10 +48,18 @@ enum libusb_class_code { LIBUSB_CLASS_COMM = 2, LIBUSB_CLASS_HID = 3, LIBUSB_CLASS_PTP = 6, + LIBUSB_CLASS_IMAGE = 6, LIBUSB_CLASS_PRINTER = 7, LIBUSB_CLASS_MASS_STORAGE = 8, LIBUSB_CLASS_HUB = 9, LIBUSB_CLASS_DATA = 10, + LIBUSB_CLASS_SMART_CARD = 11, + LIBUSB_CLASS_CONTENT_SECURITY = 13, + LIBUSB_CLASS_VIDEO = 14, + LIBUSB_CLASS_PERSONAL_HEALTHCARE = 15, + LIBUSB_CLASS_DIAGNOSTIC_DEVICE = 0xdc, + LIBUSB_CLASS_WIRELESS = 0xe0, + LIBUSB_CLASS_APPLICATION = 0xfe, LIBUSB_CLASS_VENDOR_SPEC = 0xff, }; From hselasky at FreeBSD.org Wed Aug 27 14:22:41 2014 From: hselasky at FreeBSD.org (Hans Petter Selasky) Date: Wed, 27 Aug 2014 14:22:40 +0000 (UTC) Subject: svn commit: r270717 - stable/10/sys/dev/sound/usb Message-ID: <201408271422.s7REMeED098424@svn.freebsd.org> Author: hselasky Date: Wed Aug 27 14:22:40 2014 New Revision: 270717 URL: http://svnweb.freebsd.org/changeset/base/270717 Log: MFC r270134: Use the "bSubslotSize" and "bSubFrameSize" fields to obtain the actual sample size. According to the USB audio frame format specification from USB.org, the value in the "bBitResolution" field can be less than the actual sample size, depending on the actual hardware, and should not be used for this computation. PR: 192755 Modified: stable/10/sys/dev/sound/usb/uaudio.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/10/sys/dev/sound/usb/uaudio.c Wed Aug 27 14:20:01 2014 (r270716) +++ stable/10/sys/dev/sound/usb/uaudio.c Wed Aug 27 14:22:40 2014 (r270717) @@ -1665,21 +1665,10 @@ uaudio_chan_fill_info_sub(struct uaudio_ } else if (audio_rev >= UAUDIO_VERSION_20) { uint32_t dwFormat; - uint8_t bSubslotSize; dwFormat = UGETDW(asid.v2->bmFormats); bChannels = asid.v2->bNrChannels; - bBitResolution = asf1d.v2->bBitResolution; - bSubslotSize = asf1d.v2->bSubslotSize; - - /* Map 4-byte aligned 24-bit samples into 32-bit */ - if (bBitResolution == 24 && bSubslotSize == 4) - bBitResolution = 32; - - if (bBitResolution != (bSubslotSize * 8)) { - DPRINTF("Invalid bSubslotSize\n"); - goto next_ep; - } + bBitResolution = asf1d.v2->bSubslotSize * 8; if ((bChannels != channels) || (bBitResolution != bit_resolution)) { @@ -1726,7 +1715,7 @@ uaudio_chan_fill_info_sub(struct uaudio_ wFormat = UGETW(asid.v1->wFormatTag); bChannels = UAUDIO_MAX_CHAN(asf1d.v1->bNrChannels); - bBitResolution = asf1d.v1->bBitResolution; + bBitResolution = asf1d.v1->bSubFrameSize * 8; if (asf1d.v1->bSamFreqType == 0) { DPRINTFN(16, "Sample rate: %d-%dHz\n", From hselasky at FreeBSD.org Wed Aug 27 14:24:01 2014 From: hselasky at FreeBSD.org (Hans Petter Selasky) Date: Wed, 27 Aug 2014 14:24:01 +0000 (UTC) Subject: svn commit: r270718 - stable/9/sys/dev/sound/usb Message-ID: <201408271424.s7REO1Ut098814@svn.freebsd.org> Author: hselasky Date: Wed Aug 27 14:24:00 2014 New Revision: 270718 URL: http://svnweb.freebsd.org/changeset/base/270718 Log: MFC r270134: Use the "bSubslotSize" and "bSubFrameSize" fields to obtain the actual sample size. According to the USB audio frame format specification from USB.org, the value in the "bBitResolution" field can be less than the actual sample size, depending on the actual hardware, and should not be used for this computation. PR: 192755 Modified: stable/9/sys/dev/sound/usb/uaudio.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/9/sys/dev/sound/usb/uaudio.c Wed Aug 27 14:22:40 2014 (r270717) +++ stable/9/sys/dev/sound/usb/uaudio.c Wed Aug 27 14:24:00 2014 (r270718) @@ -1665,21 +1665,10 @@ uaudio_chan_fill_info_sub(struct uaudio_ } else if (audio_rev >= UAUDIO_VERSION_20) { uint32_t dwFormat; - uint8_t bSubslotSize; dwFormat = UGETDW(asid.v2->bmFormats); bChannels = asid.v2->bNrChannels; - bBitResolution = asf1d.v2->bBitResolution; - bSubslotSize = asf1d.v2->bSubslotSize; - - /* Map 4-byte aligned 24-bit samples into 32-bit */ - if (bBitResolution == 24 && bSubslotSize == 4) - bBitResolution = 32; - - if (bBitResolution != (bSubslotSize * 8)) { - DPRINTF("Invalid bSubslotSize\n"); - goto next_ep; - } + bBitResolution = asf1d.v2->bSubslotSize * 8; if ((bChannels != channels) || (bBitResolution != bit_resolution)) { @@ -1726,7 +1715,7 @@ uaudio_chan_fill_info_sub(struct uaudio_ wFormat = UGETW(asid.v1->wFormatTag); bChannels = UAUDIO_MAX_CHAN(asf1d.v1->bNrChannels); - bBitResolution = asf1d.v1->bBitResolution; + bBitResolution = asf1d.v1->bSubFrameSize * 8; if (asf1d.v1->bSamFreqType == 0) { DPRINTFN(16, "Sample rate: %d-%dHz\n", From hselasky at FreeBSD.org Wed Aug 27 14:25:19 2014 From: hselasky at FreeBSD.org (Hans Petter Selasky) Date: Wed, 27 Aug 2014 14:25:18 +0000 (UTC) Subject: svn commit: r270719 - stable/8/sys/dev/sound/usb Message-ID: <201408271425.s7REPIfT099095@svn.freebsd.org> Author: hselasky Date: Wed Aug 27 14:25:18 2014 New Revision: 270719 URL: http://svnweb.freebsd.org/changeset/base/270719 Log: MFC r270134: Use the "bSubslotSize" and "bSubFrameSize" fields to obtain the actual sample size. According to the USB audio frame format specification from USB.org, the value in the "bBitResolution" field can be less than the actual sample size, depending on the actual hardware, and should not be used for this computation. PR: 192755 Modified: stable/8/sys/dev/sound/usb/uaudio.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/sound/ (props changed) stable/8/sys/dev/sound/usb/ (props changed) Modified: stable/8/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/8/sys/dev/sound/usb/uaudio.c Wed Aug 27 14:24:00 2014 (r270718) +++ stable/8/sys/dev/sound/usb/uaudio.c Wed Aug 27 14:25:18 2014 (r270719) @@ -1665,21 +1665,10 @@ uaudio_chan_fill_info_sub(struct uaudio_ } else if (audio_rev >= UAUDIO_VERSION_20) { uint32_t dwFormat; - uint8_t bSubslotSize; dwFormat = UGETDW(asid.v2->bmFormats); bChannels = asid.v2->bNrChannels; - bBitResolution = asf1d.v2->bBitResolution; - bSubslotSize = asf1d.v2->bSubslotSize; - - /* Map 4-byte aligned 24-bit samples into 32-bit */ - if (bBitResolution == 24 && bSubslotSize == 4) - bBitResolution = 32; - - if (bBitResolution != (bSubslotSize * 8)) { - DPRINTF("Invalid bSubslotSize\n"); - goto next_ep; - } + bBitResolution = asf1d.v2->bSubslotSize * 8; if ((bChannels != channels) || (bBitResolution != bit_resolution)) { @@ -1726,7 +1715,7 @@ uaudio_chan_fill_info_sub(struct uaudio_ wFormat = UGETW(asid.v1->wFormatTag); bChannels = UAUDIO_MAX_CHAN(asf1d.v1->bNrChannels); - bBitResolution = asf1d.v1->bBitResolution; + bBitResolution = asf1d.v1->bSubFrameSize * 8; if (asf1d.v1->bSamFreqType == 0) { DPRINTFN(16, "Sample rate: %d-%dHz\n", From truckman at FreeBSD.org Wed Aug 27 18:00:58 2014 From: truckman at FreeBSD.org (Don Lewis) Date: Wed, 27 Aug 2014 18:00:58 +0000 (UTC) Subject: svn commit: r270723 - stable/10 Message-ID: <201408271800.s7RI0wsb096945@svn.freebsd.org> Author: truckman Date: Wed Aug 27 18:00:58 2014 New Revision: 270723 URL: http://svnweb.freebsd.org/changeset/base/270723 Log: MFC r270510 Catch up to gcc 3.3 -> 3.4 upgrade. Modified: stable/10/ObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Wed Aug 27 17:44:59 2014 (r270722) +++ stable/10/ObsoleteFiles.inc Wed Aug 27 18:00:58 2014 (r270723) @@ -3063,6 +3063,202 @@ OLD_FILES+=lib/geom/geom_concat.so.1 OLD_FILES+=lib/geom/geom_label.so.1 OLD_FILES+=lib/geom/geom_nop.so.1 OLD_FILES+=lib/geom/geom_stripe.so.1 +# 20040728: GCC 3.4.2 +OLD_DIRS+=usr/include/c++/3.3 +OLD_FILES+=usr/include/c++/3.3/FlexLexer.h +OLD_FILES+=usr/include/c++/3.3/algorithm +OLD_FILES+=usr/include/c++/3.3/backward/algo.h +OLD_FILES+=usr/include/c++/3.3/backward/algobase.h +OLD_FILES+=usr/include/c++/3.3/backward/alloc.h +OLD_FILES+=usr/include/c++/3.3/backward/backward_warning.h +OLD_FILES+=usr/include/c++/3.3/backward/bvector.h +OLD_FILES+=usr/include/c++/3.3/backward/complex.h +OLD_FILES+=usr/include/c++/3.3/backward/defalloc.h +OLD_FILES+=usr/include/c++/3.3/backward/deque.h +OLD_FILES+=usr/include/c++/3.3/backward/fstream.h +OLD_FILES+=usr/include/c++/3.3/backward/function.h +OLD_FILES+=usr/include/c++/3.3/backward/hash_map.h +OLD_FILES+=usr/include/c++/3.3/backward/hash_set.h +OLD_FILES+=usr/include/c++/3.3/backward/hashtable.h +OLD_FILES+=usr/include/c++/3.3/backward/heap.h +OLD_FILES+=usr/include/c++/3.3/backward/iomanip.h +OLD_FILES+=usr/include/c++/3.3/backward/iostream.h +OLD_FILES+=usr/include/c++/3.3/backward/istream.h +OLD_FILES+=usr/include/c++/3.3/backward/iterator.h +OLD_FILES+=usr/include/c++/3.3/backward/list.h +OLD_FILES+=usr/include/c++/3.3/backward/map.h +OLD_FILES+=usr/include/c++/3.3/backward/multimap.h +OLD_FILES+=usr/include/c++/3.3/backward/multiset.h +OLD_FILES+=usr/include/c++/3.3/backward/new.h +OLD_FILES+=usr/include/c++/3.3/backward/ostream.h +OLD_FILES+=usr/include/c++/3.3/backward/pair.h +OLD_FILES+=usr/include/c++/3.3/backward/queue.h +OLD_FILES+=usr/include/c++/3.3/backward/rope.h +OLD_FILES+=usr/include/c++/3.3/backward/set.h +OLD_FILES+=usr/include/c++/3.3/backward/slist.h +OLD_FILES+=usr/include/c++/3.3/backward/stack.h +OLD_FILES+=usr/include/c++/3.3/backward/stream.h +OLD_FILES+=usr/include/c++/3.3/backward/streambuf.h +OLD_FILES+=usr/include/c++/3.3/backward/strstream +OLD_FILES+=usr/include/c++/3.3/backward/strstream.h +OLD_FILES+=usr/include/c++/3.3/backward/tempbuf.h +OLD_FILES+=usr/include/c++/3.3/backward/tree.h +OLD_FILES+=usr/include/c++/3.3/backward/vector.h +OLD_DIRS+=usr/include/c++/3.3/backward +OLD_FILES+=usr/include/c++/3.3/bits/atomicity.h +OLD_FILES+=usr/include/c++/3.3/bits/basic_file.h +OLD_FILES+=usr/include/c++/3.3/bits/basic_ios.h +OLD_FILES+=usr/include/c++/3.3/bits/basic_ios.tcc +OLD_FILES+=usr/include/c++/3.3/bits/basic_string.h +OLD_FILES+=usr/include/c++/3.3/bits/basic_string.tcc +OLD_FILES+=usr/include/c++/3.3/bits/boost_concept_check.h +OLD_FILES+=usr/include/c++/3.3/bits/c++config.h +OLD_FILES+=usr/include/c++/3.3/bits/c++io.h +OLD_FILES+=usr/include/c++/3.3/bits/c++locale.h +OLD_FILES+=usr/include/c++/3.3/bits/c++locale_internal.h +OLD_FILES+=usr/include/c++/3.3/bits/char_traits.h +OLD_FILES+=usr/include/c++/3.3/bits/cmath.tcc +OLD_FILES+=usr/include/c++/3.3/bits/codecvt.h +OLD_FILES+=usr/include/c++/3.3/bits/codecvt_specializations.h +OLD_FILES+=usr/include/c++/3.3/bits/concept_check.h +OLD_FILES+=usr/include/c++/3.3/bits/cpp_type_traits.h +OLD_FILES+=usr/include/c++/3.3/bits/ctype_base.h +OLD_FILES+=usr/include/c++/3.3/bits/ctype_inline.h +OLD_FILES+=usr/include/c++/3.3/bits/ctype_noninline.h +OLD_FILES+=usr/include/c++/3.3/bits/deque.tcc +OLD_FILES+=usr/include/c++/3.3/bits/fpos.h +OLD_FILES+=usr/include/c++/3.3/bits/fstream.tcc +OLD_FILES+=usr/include/c++/3.3/bits/functexcept.h +OLD_FILES+=usr/include/c++/3.3/bits/generic_shadow.h +OLD_FILES+=usr/include/c++/3.3/bits/gslice.h +OLD_FILES+=usr/include/c++/3.3/bits/gslice_array.h +OLD_FILES+=usr/include/c++/3.3/bits/gthr-default.h +OLD_FILES+=usr/include/c++/3.3/bits/gthr-posix.h +OLD_FILES+=usr/include/c++/3.3/bits/gthr-single.h +OLD_FILES+=usr/include/c++/3.3/bits/gthr.h +OLD_FILES+=usr/include/c++/3.3/bits/indirect_array.h +OLD_FILES+=usr/include/c++/3.3/bits/ios_base.h +OLD_FILES+=usr/include/c++/3.3/bits/istream.tcc +OLD_FILES+=usr/include/c++/3.3/bits/list.tcc +OLD_FILES+=usr/include/c++/3.3/bits/locale_classes.h +OLD_FILES+=usr/include/c++/3.3/bits/locale_facets.h +OLD_FILES+=usr/include/c++/3.3/bits/locale_facets.tcc +OLD_FILES+=usr/include/c++/3.3/bits/localefwd.h +OLD_FILES+=usr/include/c++/3.3/bits/mask_array.h +OLD_FILES+=usr/include/c++/3.3/bits/messages_members.h +OLD_FILES+=usr/include/c++/3.3/bits/os_defines.h +OLD_FILES+=usr/include/c++/3.3/bits/ostream.tcc +OLD_FILES+=usr/include/c++/3.3/bits/pthread_allocimpl.h +OLD_FILES+=usr/include/c++/3.3/bits/slice.h +OLD_FILES+=usr/include/c++/3.3/bits/slice_array.h +OLD_FILES+=usr/include/c++/3.3/bits/sstream.tcc +OLD_FILES+=usr/include/c++/3.3/bits/stl_algo.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_algobase.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_alloc.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_bvector.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_construct.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_deque.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_function.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_heap.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_iterator.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_iterator_base_funcs.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_iterator_base_types.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_list.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_map.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_multimap.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_multiset.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_numeric.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_pair.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_pthread_alloc.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_queue.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_raw_storage_iter.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_relops.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_set.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_stack.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_tempbuf.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_threads.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_tree.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_uninitialized.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_vector.h +OLD_FILES+=usr/include/c++/3.3/bits/stream_iterator.h +OLD_FILES+=usr/include/c++/3.3/bits/streambuf.tcc +OLD_FILES+=usr/include/c++/3.3/bits/streambuf_iterator.h +OLD_FILES+=usr/include/c++/3.3/bits/stringfwd.h +OLD_FILES+=usr/include/c++/3.3/bits/time_members.h +OLD_FILES+=usr/include/c++/3.3/bits/type_traits.h +OLD_FILES+=usr/include/c++/3.3/bits/valarray_array.h +OLD_FILES+=usr/include/c++/3.3/bits/valarray_array.tcc +OLD_FILES+=usr/include/c++/3.3/bits/valarray_meta.h +OLD_FILES+=usr/include/c++/3.3/bits/vector.tcc +OLD_DIRS+=usr/include/c++/3.3/bits +OLD_FILES+=usr/include/c++/3.3/bitset +OLD_FILES+=usr/include/c++/3.3/cassert +OLD_FILES+=usr/include/c++/3.3/cctype +OLD_FILES+=usr/include/c++/3.3/cerrno +OLD_FILES+=usr/include/c++/3.3/cfloat +OLD_FILES+=usr/include/c++/3.3/ciso646 +OLD_FILES+=usr/include/c++/3.3/climits +OLD_FILES+=usr/include/c++/3.3/clocale +OLD_FILES+=usr/include/c++/3.3/cmath +OLD_FILES+=usr/include/c++/3.3/complex +OLD_FILES+=usr/include/c++/3.3/csetjmp +OLD_FILES+=usr/include/c++/3.3/csignal +OLD_FILES+=usr/include/c++/3.3/cstdarg +OLD_FILES+=usr/include/c++/3.3/cstddef +OLD_FILES+=usr/include/c++/3.3/cstdio +OLD_FILES+=usr/include/c++/3.3/cstdlib +OLD_FILES+=usr/include/c++/3.3/cstring +OLD_FILES+=usr/include/c++/3.3/ctime +OLD_FILES+=usr/include/c++/3.3/cwchar +OLD_FILES+=usr/include/c++/3.3/cwctype +OLD_FILES+=usr/include/c++/3.3/cxxabi.h +OLD_FILES+=usr/include/c++/3.3/deque +OLD_FILES+=usr/include/c++/3.3/exception +OLD_FILES+=usr/include/c++/3.3/exception_defines.h +OLD_FILES+=usr/include/c++/3.3/ext/algorithm +OLD_FILES+=usr/include/c++/3.3/ext/enc_filebuf.h +OLD_FILES+=usr/include/c++/3.3/ext/functional +OLD_FILES+=usr/include/c++/3.3/ext/hash_map +OLD_FILES+=usr/include/c++/3.3/ext/hash_set +OLD_FILES+=usr/include/c++/3.3/ext/iterator +OLD_FILES+=usr/include/c++/3.3/ext/memory +OLD_FILES+=usr/include/c++/3.3/ext/numeric +OLD_FILES+=usr/include/c++/3.3/ext/rb_tree +OLD_FILES+=usr/include/c++/3.3/ext/rope +OLD_FILES+=usr/include/c++/3.3/ext/ropeimpl.h +OLD_FILES+=usr/include/c++/3.3/ext/slist +OLD_FILES+=usr/include/c++/3.3/ext/stdio_filebuf.h +OLD_FILES+=usr/include/c++/3.3/ext/stl_hash_fun.h +OLD_FILES+=usr/include/c++/3.3/ext/stl_hashtable.h +OLD_FILES+=usr/include/c++/3.3/ext/stl_rope.h +OLD_DIRS+=usr/include/c++/3.3/ext +OLD_FILES+=usr/include/c++/3.3/fstream +OLD_FILES+=usr/include/c++/3.3/functional +OLD_FILES+=usr/include/c++/3.3/iomanip +OLD_FILES+=usr/include/c++/3.3/ios +OLD_FILES+=usr/include/c++/3.3/iosfwd +OLD_FILES+=usr/include/c++/3.3/iostream +OLD_FILES+=usr/include/c++/3.3/istream +OLD_FILES+=usr/include/c++/3.3/iterator +OLD_FILES+=usr/include/c++/3.3/limits +OLD_FILES+=usr/include/c++/3.3/list +OLD_FILES+=usr/include/c++/3.3/locale +OLD_FILES+=usr/include/c++/3.3/map +OLD_FILES+=usr/include/c++/3.3/memory +OLD_FILES+=usr/include/c++/3.3/new +OLD_FILES+=usr/include/c++/3.3/numeric +OLD_FILES+=usr/include/c++/3.3/ostream +OLD_FILES+=usr/include/c++/3.3/queue +OLD_FILES+=usr/include/c++/3.3/set +OLD_FILES+=usr/include/c++/3.3/sstream +OLD_FILES+=usr/include/c++/3.3/stack +OLD_FILES+=usr/include/c++/3.3/stdexcept +OLD_FILES+=usr/include/c++/3.3/streambuf +OLD_FILES+=usr/include/c++/3.3/string +OLD_FILES+=usr/include/c++/3.3/typeinfo +OLD_FILES+=usr/include/c++/3.3/utility +OLD_FILES+=usr/include/c++/3.3/valarray +OLD_FILES+=usr/include/c++/3.3/vector # 20040713: fla(4) removed. OLD_FILES+=usr/share/man/man4/fla.4.gz # 200407XX From dteske at FreeBSD.org Wed Aug 27 18:03:07 2014 From: dteske at FreeBSD.org (dteske at FreeBSD.org) Date: Wed, 27 Aug 2014 11:02:28 -0700 Subject: svn commit: r270644 - stable/10/usr.sbin/bsdinstall/scripts In-Reply-To: <20140827140902.GA41194@zxy.spb.ru> References: <201408260231.s7Q2VbCW087619@svn.freebsd.org> <20140827140902.GA41194@zxy.spb.ru> Message-ID: <1d0501cfc221$1114f850$333ee8f0$@FreeBSD.org> > -----Original Message----- > From: owner-src-committers at freebsd.org [mailto:owner-src- > committers at freebsd.org] On Behalf Of Slawa Olhovchenkov > Sent: Wednesday, August 27, 2014 7:09 AM > To: Andrew Thompson > Cc: src-committers at freebsd.org; svn-src-all at freebsd.org; svn-src- > stable at freebsd.org; svn-src-stable-10 at freebsd.org > Subject: Re: svn commit: r270644 - stable/10/usr.sbin/bsdinstall/scripts > > On Tue, Aug 26, 2014 at 02:31:37AM +0000, Andrew Thompson wrote: > > In zfs directory layout you missing some separate datesets: > > usr/home (or, may be, just /home) > usr/obj > usr/ports/packages > usr/ports/distfiles > > Can you do it before 10.1? You must have missed the following in the evolution of that script: http://svnweb.freebsd.org/base?view=revision&revision=257842 [snip] + Remove some unnecessary default ZFS datasets from the automatic "zfsboot" script. Such as: /usr/ports/distfiles /usr/ports/packages /usr/obj /var/db /var/empty /var/mail and /var/run (these can all be created as-needed once the system is installed). [/snip] The idea is that all of those directories you mentioned are empty by default on a freshly installed system. Compare that to directories which are not empty -- if the user wants the data in a separate dataset, they have salvage existing data in the process. -- Devin From ngie at FreeBSD.org Wed Aug 27 18:25:16 2014 From: ngie at FreeBSD.org (Garrett Cooper) Date: Wed, 27 Aug 2014 18:25:15 +0000 (UTC) Subject: svn commit: r270724 - in stable/10: etc/mtree lib/libutil lib/libutil/tests tools/regression/lib/libutil Message-ID: <201408271825.s7RIPFb7009161@svn.freebsd.org> Author: ngie Date: Wed Aug 27 18:25:14 2014 New Revision: 270724 URL: http://svnweb.freebsd.org/changeset/base/270724 Log: MFC r270180: r269906: Add missing BSD.tests.dist entry for lib/libutil to unbreak installworld with MK_TESTS == no Phabric: D555 Approved by: jmmv (mentor, implicit) Pointyhat to: ngie r269904: 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) Obtained from: EMC / Isilon Storage Division [*] Submitted by: Casey Peel [*] Sponsored by: EMC / Isilon Storage Division Added: stable/10/lib/libutil/tests/ - copied from r269904, head/lib/libutil/tests/ Deleted: stable/10/tools/regression/lib/libutil/ Modified: stable/10/etc/mtree/BSD.tests.dist stable/10/lib/libutil/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Wed Aug 27 18:00:58 2014 (r270723) +++ stable/10/etc/mtree/BSD.tests.dist Wed Aug 27 18:25:14 2014 (r270724) @@ -87,6 +87,8 @@ .. libmp .. + libutil + .. .. libexec atf Modified: stable/10/lib/libutil/Makefile ============================================================================== --- stable/10/lib/libutil/Makefile Wed Aug 27 18:00:58 2014 (r270723) +++ stable/10/lib/libutil/Makefile Wed Aug 27 18:25:14 2014 (r270724) @@ -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 From slw at zxy.spb.ru Wed Aug 27 18:48:41 2014 From: slw at zxy.spb.ru (Slawa Olhovchenkov) Date: Wed, 27 Aug 2014 22:48:32 +0400 Subject: svn commit: r270644 - stable/10/usr.sbin/bsdinstall/scripts In-Reply-To: <1d0501cfc221$1114f850$333ee8f0$@FreeBSD.org> References: <201408260231.s7Q2VbCW087619@svn.freebsd.org> <20140827140902.GA41194@zxy.spb.ru> <1d0501cfc221$1114f850$333ee8f0$@FreeBSD.org> Message-ID: <20140827184832.GJ2075@zxy.spb.ru> On Wed, Aug 27, 2014 at 11:02:28AM -0700, dteske at FreeBSD.org wrote: > > > > -----Original Message----- > > From: owner-src-committers at freebsd.org [mailto:owner-src- > > committers at freebsd.org] On Behalf Of Slawa Olhovchenkov > > Sent: Wednesday, August 27, 2014 7:09 AM > > To: Andrew Thompson > > Cc: src-committers at freebsd.org; svn-src-all at freebsd.org; svn-src- > > stable at freebsd.org; svn-src-stable-10 at freebsd.org > > Subject: Re: svn commit: r270644 - stable/10/usr.sbin/bsdinstall/scripts > > > > On Tue, Aug 26, 2014 at 02:31:37AM +0000, Andrew Thompson wrote: > > > > In zfs directory layout you missing some separate datesets: > > > > usr/home (or, may be, just /home) > > usr/obj > > usr/ports/packages > > usr/ports/distfiles > > > > Can you do it before 10.1? > > You must have missed the following in the evolution of that script: > > http://svnweb.freebsd.org/base?view=revision&revision=257842 > > [snip] > + Remove some unnecessary default ZFS datasets from the automatic "zfsboot" > script. Such as: /usr/ports/distfiles /usr/ports/packages /usr/obj /var/db > /var/empty /var/mail and /var/run (these can all be created as-needed once > the system is installed). > [/snip] > > The idea is that all of those directories you mentioned are empty > by default on a freshly installed system. Compare that to directories > which are not empty -- if the user wants the data in a separate > dataset, they have salvage existing data in the process. /home is not empty on a freshly installed system (I am create account for remoty login). Other datasets have special atributes and removing datasets is simples then creating and to easy to forget create their before use. From markj at FreeBSD.org Wed Aug 27 19:51:09 2014 From: markj at FreeBSD.org (Mark Johnston) Date: Wed, 27 Aug 2014 19:51:08 +0000 (UTC) Subject: svn commit: r270730 - stable/9/lib/libproc Message-ID: <201408271951.s7RJp8YU050440@svn.freebsd.org> Author: markj Date: Wed Aug 27 19:51:07 2014 New Revision: 270730 URL: http://svnweb.freebsd.org/changeset/base/270730 Log: MFC r265255, r270506: Allow "a.out" as an alias for the executable if no other matching entries are found. Modified: stable/9/lib/libproc/_libproc.h stable/9/lib/libproc/proc_create.c stable/9/lib/libproc/proc_rtld.c stable/9/lib/libproc/proc_sym.c Directory Properties: stable/9/lib/libproc/ (props changed) Modified: stable/9/lib/libproc/_libproc.h ============================================================================== --- stable/9/lib/libproc/_libproc.h Wed Aug 27 19:34:49 2014 (r270729) +++ stable/9/lib/libproc/_libproc.h Wed Aug 27 19:51:07 2014 (r270730) @@ -46,6 +46,8 @@ struct proc_handle { size_t rdobjsz; size_t nobjs; struct lwpstatus lwps; + rd_loadobj_t *rdexec; /* rdobj index of program executable. */ + char execname[MAXPATHLEN]; /* Path to program executable. */ }; #ifdef DEBUG Modified: stable/9/lib/libproc/proc_create.c ============================================================================== --- stable/9/lib/libproc/proc_create.c Wed Aug 27 19:34:49 2014 (r270729) +++ stable/9/lib/libproc/proc_create.c Wed Aug 27 19:51:07 2014 (r270730) @@ -26,8 +26,10 @@ * $FreeBSD$ */ -#include "_libproc.h" -#include +#include +#include +#include + #include #include #include @@ -35,7 +37,37 @@ #include #include #include -#include + +#include "_libproc.h" + +static int proc_init(pid_t, int, int, struct proc_handle *); + +static int +proc_init(pid_t pid, int flags, int status, struct proc_handle *phdl) +{ + int mib[4], error; + size_t len; + + memset(phdl, 0, sizeof(*phdl)); + phdl->pid = pid; + phdl->flags = flags; + phdl->status = status; + + mib[0] = CTL_KERN; + mib[1] = KERN_PROC; + mib[2] = KERN_PROC_PATHNAME; + mib[3] = pid; + len = sizeof(phdl->execname); + if (sysctl(mib, 4, phdl->execname, &len, NULL, 0) != 0) { + error = errno; + DPRINTF("ERROR: cannot get pathname for child process %d", pid); + return (error); + } + if (len == 0) + phdl->execname[0] = '\0'; + + return (0); +} int proc_attach(pid_t pid, int flags, struct proc_handle **pphdl) @@ -54,12 +86,12 @@ proc_attach(pid_t pid, int flags, struct if ((phdl = malloc(sizeof(struct proc_handle))) == NULL) return (ENOMEM); - memset(phdl, 0, sizeof(struct proc_handle)); - phdl->pid = pid; - phdl->flags = flags; - phdl->status = PS_RUN; elf_version(EV_CURRENT); + error = proc_init(pid, flags, PS_RUN, phdl); + if (error != 0) + goto out; + if (ptrace(PT_ATTACH, phdl->pid, 0, 0) != 0) { error = errno; DPRINTF("ERROR: cannot ptrace child process %d", pid); @@ -123,9 +155,9 @@ proc_create(const char *file, char * con _exit(2); } else { /* The parent owns the process handle. */ - memset(phdl, 0, sizeof(struct proc_handle)); - phdl->pid = pid; - phdl->status = PS_IDLE; + error = proc_init(pid, 0, PS_IDLE, phdl); + if (error != 0) + goto bad; /* Wait for the child process to stop. */ if (waitpid(pid, &status, WUNTRACED) == -1) { Modified: stable/9/lib/libproc/proc_rtld.c ============================================================================== --- stable/9/lib/libproc/proc_rtld.c Wed Aug 27 19:34:49 2014 (r270729) +++ stable/9/lib/libproc/proc_rtld.c Wed Aug 27 19:51:07 2014 (r270730) @@ -49,6 +49,9 @@ map_iter(const rd_loadobj_t *lop, void * if (phdl->rdobjs == NULL) return (-1); } + if (strcmp(lop->rdl_path, phdl->execname) == 0 && + (lop->rdl_prot & RD_RDL_X) != 0) + phdl->rdexec = &phdl->rdobjs[phdl->nobjs]; memcpy(&phdl->rdobjs[phdl->nobjs++], lop, sizeof(*lop)); return (0); Modified: stable/9/lib/libproc/proc_sym.c ============================================================================== --- stable/9/lib/libproc/proc_sym.c Wed Aug 27 19:34:49 2014 (r270729) +++ stable/9/lib/libproc/proc_sym.c Wed Aug 27 19:51:07 2014 (r270730) @@ -90,17 +90,25 @@ proc_obj2map(struct proc_handle *p, cons rd_loadobj_t *rdl; char path[MAXPATHLEN]; + rdl = NULL; for (i = 0; i < p->nobjs; i++) { - rdl = &p->rdobjs[i]; - basename_r(rdl->rdl_path, path); + basename_r(p->rdobjs[i].rdl_path, path); if (strcmp(path, objname) == 0) { - if ((map = malloc(sizeof(*map))) == NULL) - return (NULL); - proc_rdl2prmap(rdl, map); - return (map); + rdl = &p->rdobjs[i]; + break; } } - return (NULL); + if (rdl == NULL) { + if (strcmp(objname, "a.out") == 0 && p->rdexec != NULL) + rdl = p->rdexec; + else + return (NULL); + } + + if ((map = malloc(sizeof(*map))) == NULL) + return (NULL); + proc_rdl2prmap(rdl, map); + return (map); } int @@ -358,8 +366,9 @@ proc_name2map(struct proc_handle *p, con free(kves); return (NULL); } - if (name == NULL || strcmp(name, "a.out") == 0) { - map = proc_addr2map(p, p->rdobjs[0].rdl_saddr); + if ((name == NULL || strcmp(name, "a.out") == 0) && + p->rdexec != NULL) { + map = proc_addr2map(p, p->rdexec->rdl_saddr); return (map); } for (i = 0; i < p->nobjs; i++) { From markj at FreeBSD.org Wed Aug 27 19:51:44 2014 From: markj at FreeBSD.org (Mark Johnston) Date: Wed, 27 Aug 2014 19:51:43 +0000 (UTC) Subject: svn commit: r270731 - stable/10/lib/libproc Message-ID: <201408271951.s7RJphpl051109@svn.freebsd.org> Author: markj Date: Wed Aug 27 19:51:42 2014 New Revision: 270731 URL: http://svnweb.freebsd.org/changeset/base/270731 Log: MFC r265255, r270506: Allow "a.out" as an alias for the executable if no other matching entries are found. Modified: stable/10/lib/libproc/_libproc.h stable/10/lib/libproc/proc_create.c stable/10/lib/libproc/proc_rtld.c stable/10/lib/libproc/proc_sym.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libproc/_libproc.h ============================================================================== --- stable/10/lib/libproc/_libproc.h Wed Aug 27 19:51:07 2014 (r270730) +++ stable/10/lib/libproc/_libproc.h Wed Aug 27 19:51:42 2014 (r270731) @@ -46,6 +46,8 @@ struct proc_handle { size_t rdobjsz; size_t nobjs; struct lwpstatus lwps; + rd_loadobj_t *rdexec; /* rdobj index of program executable. */ + char execname[MAXPATHLEN]; /* Path to program executable. */ }; #ifdef DEBUG Modified: stable/10/lib/libproc/proc_create.c ============================================================================== --- stable/10/lib/libproc/proc_create.c Wed Aug 27 19:51:07 2014 (r270730) +++ stable/10/lib/libproc/proc_create.c Wed Aug 27 19:51:42 2014 (r270731) @@ -26,8 +26,10 @@ * $FreeBSD$ */ -#include "_libproc.h" -#include +#include +#include +#include + #include #include #include @@ -35,7 +37,37 @@ #include #include #include -#include + +#include "_libproc.h" + +static int proc_init(pid_t, int, int, struct proc_handle *); + +static int +proc_init(pid_t pid, int flags, int status, struct proc_handle *phdl) +{ + int mib[4], error; + size_t len; + + memset(phdl, 0, sizeof(*phdl)); + phdl->pid = pid; + phdl->flags = flags; + phdl->status = status; + + mib[0] = CTL_KERN; + mib[1] = KERN_PROC; + mib[2] = KERN_PROC_PATHNAME; + mib[3] = pid; + len = sizeof(phdl->execname); + if (sysctl(mib, 4, phdl->execname, &len, NULL, 0) != 0) { + error = errno; + DPRINTF("ERROR: cannot get pathname for child process %d", pid); + return (error); + } + if (len == 0) + phdl->execname[0] = '\0'; + + return (0); +} int proc_attach(pid_t pid, int flags, struct proc_handle **pphdl) @@ -54,12 +86,12 @@ proc_attach(pid_t pid, int flags, struct if ((phdl = malloc(sizeof(struct proc_handle))) == NULL) return (ENOMEM); - memset(phdl, 0, sizeof(struct proc_handle)); - phdl->pid = pid; - phdl->flags = flags; - phdl->status = PS_RUN; elf_version(EV_CURRENT); + error = proc_init(pid, flags, PS_RUN, phdl); + if (error != 0) + goto out; + if (ptrace(PT_ATTACH, phdl->pid, 0, 0) != 0) { error = errno; DPRINTF("ERROR: cannot ptrace child process %d", pid); @@ -123,9 +155,9 @@ proc_create(const char *file, char * con _exit(2); } else { /* The parent owns the process handle. */ - memset(phdl, 0, sizeof(struct proc_handle)); - phdl->pid = pid; - phdl->status = PS_IDLE; + error = proc_init(pid, 0, PS_IDLE, phdl); + if (error != 0) + goto bad; /* Wait for the child process to stop. */ if (waitpid(pid, &status, WUNTRACED) == -1) { Modified: stable/10/lib/libproc/proc_rtld.c ============================================================================== --- stable/10/lib/libproc/proc_rtld.c Wed Aug 27 19:51:07 2014 (r270730) +++ stable/10/lib/libproc/proc_rtld.c Wed Aug 27 19:51:42 2014 (r270731) @@ -49,6 +49,9 @@ map_iter(const rd_loadobj_t *lop, void * if (phdl->rdobjs == NULL) return (-1); } + if (strcmp(lop->rdl_path, phdl->execname) == 0 && + (lop->rdl_prot & RD_RDL_X) != 0) + phdl->rdexec = &phdl->rdobjs[phdl->nobjs]; memcpy(&phdl->rdobjs[phdl->nobjs++], lop, sizeof(*lop)); return (0); Modified: stable/10/lib/libproc/proc_sym.c ============================================================================== --- stable/10/lib/libproc/proc_sym.c Wed Aug 27 19:51:07 2014 (r270730) +++ stable/10/lib/libproc/proc_sym.c Wed Aug 27 19:51:42 2014 (r270731) @@ -113,17 +113,25 @@ proc_obj2map(struct proc_handle *p, cons rd_loadobj_t *rdl; char path[MAXPATHLEN]; + rdl = NULL; for (i = 0; i < p->nobjs; i++) { - rdl = &p->rdobjs[i]; - basename_r(rdl->rdl_path, path); + basename_r(p->rdobjs[i].rdl_path, path); if (strcmp(path, objname) == 0) { - if ((map = malloc(sizeof(*map))) == NULL) - return (NULL); - proc_rdl2prmap(rdl, map); - return (map); + rdl = &p->rdobjs[i]; + break; } } - return (NULL); + if (rdl == NULL) { + if (strcmp(objname, "a.out") == 0 && p->rdexec != NULL) + rdl = p->rdexec; + else + return (NULL); + } + + if ((map = malloc(sizeof(*map))) == NULL) + return (NULL); + proc_rdl2prmap(rdl, map); + return (map); } int @@ -381,8 +389,9 @@ proc_name2map(struct proc_handle *p, con free(kves); return (NULL); } - if (name == NULL || strcmp(name, "a.out") == 0) { - map = proc_addr2map(p, p->rdobjs[0].rdl_saddr); + if ((name == NULL || strcmp(name, "a.out") == 0) && + p->rdexec != NULL) { + map = proc_addr2map(p, p->rdexec->rdl_saddr); return (map); } for (i = 0; i < p->nobjs; i++) { From markj at FreeBSD.org Wed Aug 27 21:11:20 2014 From: markj at FreeBSD.org (Mark Johnston) Date: Wed, 27 Aug 2014 21:11:19 +0000 (UTC) Subject: svn commit: r270732 - in stable/10: share/man/man4 sys/dev/mfi Message-ID: <201408272111.s7RLBJGM089506@svn.freebsd.org> Author: markj Date: Wed Aug 27 21:11:19 2014 New Revision: 270732 URL: http://svnweb.freebsd.org/changeset/base/270732 Log: MFC r261491 (by ambrisko): Add a tunable "hw.mfi.mrsas_enable" to allow mfi(4) to drop priority and allow mrsas(4) from LSI to attach to newer LSI cards that are support by mrsas(4). If mrsas(4) is not loaded into the system at boot then mfi(4) will always attach. If a modified mrsas(4) is loaded in the system. That modification is return "-30" in it's probe since that is between BUS_PROBE_DEFAULT and BUS_PROBE_LOW_PRIORITY. This option is controller by a new probe flag "MFI_FLAGS_MRSAS" in mfi_ident that denotes cards that should work with mrsas(4). New entries that should have this option. This is the first step to get mrsas(4) checked into FreeBSD and to avoid collision with people that use mrsas(4) from LSI. Since mfi(4) takes priority, then mrsas(4) users need to rebuild GENERIC. Using the .disabled="1" method doesn't work since that blocks attaching and the probe gave it to mfi(4). MFC r267451 (by delphij): Correct variable for loader tunable variable hw.mfi.mrsas_enable. Modified: stable/10/share/man/man4/mfi.4 stable/10/sys/dev/mfi/mfi_pci.c stable/10/sys/dev/mfi/mfivar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/mfi.4 ============================================================================== --- stable/10/share/man/man4/mfi.4 Wed Aug 27 19:51:42 2014 (r270731) +++ stable/10/share/man/man4/mfi.4 Wed Aug 27 21:11:19 2014 (r270732) @@ -72,6 +72,17 @@ If the sysctl .Va dev.mfi.%d.delete_busy_volumes is set to 1, then the driver will allow mounted volumes to be removed. +.Pp +A tunable is provided to adjust the +.Nm +driver's behaviour when attaching to a card. By default the driver will +attach to all known cards with high probe priority. If the tunable +.Va hw.mfi.mrsas_enable +is set to 1, +then the driver will reduce its probe priority to allow +.Cd mrsas +to attach to the card instead of +.Nm . .Sh HARDWARE The .Nm Modified: stable/10/sys/dev/mfi/mfi_pci.c ============================================================================== --- stable/10/sys/dev/mfi/mfi_pci.c Wed Aug 27 19:51:42 2014 (r270731) +++ stable/10/sys/dev/mfi/mfi_pci.c Wed Aug 27 21:11:19 2014 (r270732) @@ -112,6 +112,11 @@ TUNABLE_INT("hw.mfi.msi", &mfi_msi); SYSCTL_INT(_hw_mfi, OID_AUTO, msi, CTLFLAG_RDTUN, &mfi_msi, 0, "Enable use of MSI interrupts"); +static int mfi_mrsas_enable = 0; +TUNABLE_INT("hw.mfi.mrsas_enable", &mfi_mrsas_enable); +SYSCTL_INT(_hw_mfi, OID_AUTO, mrsas_enable, CTLFLAG_RDTUN, &mfi_mrsas_enable, + 0, "Allow mrasas to take newer cards"); + struct mfi_ident { uint16_t vendor; uint16_t device; @@ -120,19 +125,19 @@ struct mfi_ident { int flags; const char *desc; } mfi_identifiers[] = { - {0x1000, 0x005b, 0x1028, 0x1f2d, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT, "Dell PERC H810 Adapter"}, - {0x1000, 0x005b, 0x1028, 0x1f30, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT, "Dell PERC H710 Embedded"}, - {0x1000, 0x005b, 0x1028, 0x1f31, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT, "Dell PERC H710P Adapter"}, - {0x1000, 0x005b, 0x1028, 0x1f33, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT, "Dell PERC H710P Mini (blades)"}, - {0x1000, 0x005b, 0x1028, 0x1f34, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT, "Dell PERC H710P Mini (monolithics)"}, - {0x1000, 0x005b, 0x1028, 0x1f35, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT, "Dell PERC H710 Adapter"}, - {0x1000, 0x005b, 0x1028, 0x1f37, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT, "Dell PERC H710 Mini (blades)"}, - {0x1000, 0x005b, 0x1028, 0x1f38, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT, "Dell PERC H710 Mini (monolithics)"}, - {0x1000, 0x005b, 0x8086, 0x9265, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT, "Intel (R) RAID Controller RS25DB080"}, - {0x1000, 0x005b, 0x8086, 0x9285, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT, "Intel (R) RAID Controller RS25NB008"}, - {0x1000, 0x005b, 0xffff, 0xffff, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT, "ThunderBolt"}, - {0x1000, 0x005d, 0xffff, 0xffff, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_INVADER, "Invader"}, - {0x1000, 0x005f, 0xffff, 0xffff, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_FURY, "Fury"}, + {0x1000, 0x005b, 0x1028, 0x1f2d, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Dell PERC H810 Adapter"}, + {0x1000, 0x005b, 0x1028, 0x1f30, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Dell PERC H710 Embedded"}, + {0x1000, 0x005b, 0x1028, 0x1f31, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Dell PERC H710P Adapter"}, + {0x1000, 0x005b, 0x1028, 0x1f33, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Dell PERC H710P Mini (blades)"}, + {0x1000, 0x005b, 0x1028, 0x1f34, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Dell PERC H710P Mini (monolithics)"}, + {0x1000, 0x005b, 0x1028, 0x1f35, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Dell PERC H710 Adapter"}, + {0x1000, 0x005b, 0x1028, 0x1f37, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Dell PERC H710 Mini (blades)"}, + {0x1000, 0x005b, 0x1028, 0x1f38, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Dell PERC H710 Mini (monolithics)"}, + {0x1000, 0x005b, 0x8086, 0x9265, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Intel (R) RAID Controller RS25DB080"}, + {0x1000, 0x005b, 0x8086, 0x9285, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Intel (R) RAID Controller RS25NB008"}, + {0x1000, 0x005b, 0xffff, 0xffff, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "ThunderBolt"}, + {0x1000, 0x005d, 0xffff, 0xffff, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS| MFI_FLAGS_INVADER, "Invader"}, + {0x1000, 0x005f, 0xffff, 0xffff, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS| MFI_FLAGS_FURY, "Fury"}, {0x1000, 0x0060, 0x1028, 0xffff, MFI_FLAGS_1078, "Dell PERC 6"}, {0x1000, 0x0060, 0xffff, 0xffff, MFI_FLAGS_1078, "LSI MegaSAS 1078"}, {0x1000, 0x0071, 0xffff, 0xffff, MFI_FLAGS_SKINNY, "Drake Skinny"}, @@ -179,7 +184,13 @@ mfi_pci_probe(device_t dev) if ((id = mfi_find_ident(dev)) != NULL) { device_set_desc(dev, id->desc); - return (BUS_PROBE_DEFAULT); + + /* give priority to mrsas if tunable set */ + TUNABLE_INT_FETCH("hw.mfi.mrsas_enable", &mfi_mrsas_enable); + if ((id->flags & MFI_FLAGS_MRSAS) && mfi_mrsas_enable) + return (BUS_PROBE_LOW_PRIORITY); + else + return (BUS_PROBE_DEFAULT); } return (ENXIO); } Modified: stable/10/sys/dev/mfi/mfivar.h ============================================================================== --- stable/10/sys/dev/mfi/mfivar.h Wed Aug 27 19:51:42 2014 (r270731) +++ stable/10/sys/dev/mfi/mfivar.h Wed Aug 27 21:11:19 2014 (r270732) @@ -201,6 +201,7 @@ struct mfi_softc { #define MFI_FLAGS_GEN2 (1<<6) #define MFI_FLAGS_SKINNY (1<<7) #define MFI_FLAGS_TBOLT (1<<8) +#define MFI_FLAGS_MRSAS (1<<9) #define MFI_FLAGS_INVADER (1<<10) #define MFI_FLAGS_FURY (1<<11) // Start: LSIP200113393 From markj at FreeBSD.org Wed Aug 27 21:11:20 2014 From: markj at FreeBSD.org (Mark Johnston) Date: Wed, 27 Aug 2014 21:11:20 +0000 (UTC) Subject: svn commit: r270733 - in stable/9: share/man/man4 sys/dev/mfi Message-ID: <201408272111.s7RLBKXj089538@svn.freebsd.org> Author: markj Date: Wed Aug 27 21:11:19 2014 New Revision: 270733 URL: http://svnweb.freebsd.org/changeset/base/270733 Log: MFC r261491 (by ambrisko): Add a tunable "hw.mfi.mrsas_enable" to allow mfi(4) to drop priority and allow mrsas(4) from LSI to attach to newer LSI cards that are support by mrsas(4). If mrsas(4) is not loaded into the system at boot then mfi(4) will always attach. If a modified mrsas(4) is loaded in the system. That modification is return "-30" in it's probe since that is between BUS_PROBE_DEFAULT and BUS_PROBE_LOW_PRIORITY. This option is controller by a new probe flag "MFI_FLAGS_MRSAS" in mfi_ident that denotes cards that should work with mrsas(4). New entries that should have this option. This is the first step to get mrsas(4) checked into FreeBSD and to avoid collision with people that use mrsas(4) from LSI. Since mfi(4) takes priority, then mrsas(4) users need to rebuild GENERIC. Using the .disabled="1" method doesn't work since that blocks attaching and the probe gave it to mfi(4). MFC r267451 (by delphij): Correct variable for loader tunable variable hw.mfi.mrsas_enable. Modified: stable/9/share/man/man4/mfi.4 stable/9/sys/dev/mfi/mfi_pci.c stable/9/sys/dev/mfi/mfivar.h Directory Properties: stable/9/share/man/man4/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/share/man/man4/mfi.4 ============================================================================== --- stable/9/share/man/man4/mfi.4 Wed Aug 27 21:11:19 2014 (r270732) +++ stable/9/share/man/man4/mfi.4 Wed Aug 27 21:11:19 2014 (r270733) @@ -72,6 +72,17 @@ If the sysctl .Va dev.mfi.%d.delete_busy_volumes is set to 1, then the driver will allow mounted volumes to be removed. +.Pp +A tunable is provided to adjust the +.Nm +driver's behaviour when attaching to a card. By default the driver will +attach to all known cards with high probe priority. If the tunable +.Va hw.mfi.mrsas_enable +is set to 1, +then the driver will reduce its probe priority to allow +.Cd mrsas +to attach to the card instead of +.Nm . .Sh HARDWARE The .Nm Modified: stable/9/sys/dev/mfi/mfi_pci.c ============================================================================== --- stable/9/sys/dev/mfi/mfi_pci.c Wed Aug 27 21:11:19 2014 (r270732) +++ stable/9/sys/dev/mfi/mfi_pci.c Wed Aug 27 21:11:19 2014 (r270733) @@ -112,6 +112,11 @@ TUNABLE_INT("hw.mfi.msi", &mfi_msi); SYSCTL_INT(_hw_mfi, OID_AUTO, msi, CTLFLAG_RDTUN, &mfi_msi, 0, "Enable use of MSI interrupts"); +static int mfi_mrsas_enable = 0; +TUNABLE_INT("hw.mfi.mrsas_enable", &mfi_mrsas_enable); +SYSCTL_INT(_hw_mfi, OID_AUTO, mrsas_enable, CTLFLAG_RDTUN, &mfi_mrsas_enable, + 0, "Allow mrasas to take newer cards"); + struct mfi_ident { uint16_t vendor; uint16_t device; @@ -120,19 +125,19 @@ struct mfi_ident { int flags; const char *desc; } mfi_identifiers[] = { - {0x1000, 0x005b, 0x1028, 0x1f2d, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT, "Dell PERC H810 Adapter"}, - {0x1000, 0x005b, 0x1028, 0x1f30, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT, "Dell PERC H710 Embedded"}, - {0x1000, 0x005b, 0x1028, 0x1f31, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT, "Dell PERC H710P Adapter"}, - {0x1000, 0x005b, 0x1028, 0x1f33, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT, "Dell PERC H710P Mini (blades)"}, - {0x1000, 0x005b, 0x1028, 0x1f34, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT, "Dell PERC H710P Mini (monolithics)"}, - {0x1000, 0x005b, 0x1028, 0x1f35, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT, "Dell PERC H710 Adapter"}, - {0x1000, 0x005b, 0x1028, 0x1f37, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT, "Dell PERC H710 Mini (blades)"}, - {0x1000, 0x005b, 0x1028, 0x1f38, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT, "Dell PERC H710 Mini (monolithics)"}, - {0x1000, 0x005b, 0x8086, 0x9265, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT, "Intel (R) RAID Controller RS25DB080"}, - {0x1000, 0x005b, 0x8086, 0x9285, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT, "Intel (R) RAID Controller RS25NB008"}, - {0x1000, 0x005b, 0xffff, 0xffff, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT, "ThunderBolt"}, - {0x1000, 0x005d, 0xffff, 0xffff, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_INVADER, "Invader"}, - {0x1000, 0x005f, 0xffff, 0xffff, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_FURY, "Fury"}, + {0x1000, 0x005b, 0x1028, 0x1f2d, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Dell PERC H810 Adapter"}, + {0x1000, 0x005b, 0x1028, 0x1f30, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Dell PERC H710 Embedded"}, + {0x1000, 0x005b, 0x1028, 0x1f31, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Dell PERC H710P Adapter"}, + {0x1000, 0x005b, 0x1028, 0x1f33, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Dell PERC H710P Mini (blades)"}, + {0x1000, 0x005b, 0x1028, 0x1f34, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Dell PERC H710P Mini (monolithics)"}, + {0x1000, 0x005b, 0x1028, 0x1f35, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Dell PERC H710 Adapter"}, + {0x1000, 0x005b, 0x1028, 0x1f37, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Dell PERC H710 Mini (blades)"}, + {0x1000, 0x005b, 0x1028, 0x1f38, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Dell PERC H710 Mini (monolithics)"}, + {0x1000, 0x005b, 0x8086, 0x9265, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Intel (R) RAID Controller RS25DB080"}, + {0x1000, 0x005b, 0x8086, 0x9285, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Intel (R) RAID Controller RS25NB008"}, + {0x1000, 0x005b, 0xffff, 0xffff, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "ThunderBolt"}, + {0x1000, 0x005d, 0xffff, 0xffff, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS| MFI_FLAGS_INVADER, "Invader"}, + {0x1000, 0x005f, 0xffff, 0xffff, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS| MFI_FLAGS_FURY, "Fury"}, {0x1000, 0x0060, 0x1028, 0xffff, MFI_FLAGS_1078, "Dell PERC 6"}, {0x1000, 0x0060, 0xffff, 0xffff, MFI_FLAGS_1078, "LSI MegaSAS 1078"}, {0x1000, 0x0071, 0xffff, 0xffff, MFI_FLAGS_SKINNY, "Drake Skinny"}, @@ -179,7 +184,13 @@ mfi_pci_probe(device_t dev) if ((id = mfi_find_ident(dev)) != NULL) { device_set_desc(dev, id->desc); - return (BUS_PROBE_DEFAULT); + + /* give priority to mrsas if tunable set */ + TUNABLE_INT_FETCH("hw.mfi.mrsas_enable", &mfi_mrsas_enable); + if ((id->flags & MFI_FLAGS_MRSAS) && mfi_mrsas_enable) + return (BUS_PROBE_LOW_PRIORITY); + else + return (BUS_PROBE_DEFAULT); } return (ENXIO); } Modified: stable/9/sys/dev/mfi/mfivar.h ============================================================================== --- stable/9/sys/dev/mfi/mfivar.h Wed Aug 27 21:11:19 2014 (r270732) +++ stable/9/sys/dev/mfi/mfivar.h Wed Aug 27 21:11:19 2014 (r270733) @@ -199,6 +199,7 @@ struct mfi_softc { #define MFI_FLAGS_GEN2 (1<<6) #define MFI_FLAGS_SKINNY (1<<7) #define MFI_FLAGS_TBOLT (1<<8) +#define MFI_FLAGS_MRSAS (1<<9) #define MFI_FLAGS_INVADER (1<<10) #define MFI_FLAGS_FURY (1<<11) // Start: LSIP200113393 From truckman at FreeBSD.org Thu Aug 28 01:14:31 2014 From: truckman at FreeBSD.org (Don Lewis) Date: Thu, 28 Aug 2014 01:14:31 +0000 (UTC) Subject: svn commit: r270735 - stable/9 Message-ID: <201408280114.s7S1EVF5003010@svn.freebsd.org> Author: truckman Date: Thu Aug 28 01:14:30 2014 New Revision: 270735 URL: http://svnweb.freebsd.org/changeset/base/270735 Log: MFC r270510: Catch up to gcc 3.3 -> 3.4 upgrade. Modified: stable/9/ObsoleteFiles.inc (contents, props changed) Directory Properties: stable/9/ (props changed) Modified: stable/9/ObsoleteFiles.inc ============================================================================== --- stable/9/ObsoleteFiles.inc Thu Aug 28 00:05:02 2014 (r270734) +++ stable/9/ObsoleteFiles.inc Thu Aug 28 01:14:30 2014 (r270735) @@ -2456,6 +2456,202 @@ OLD_FILES+=lib/geom/geom_concat.so.1 OLD_FILES+=lib/geom/geom_label.so.1 OLD_FILES+=lib/geom/geom_nop.so.1 OLD_FILES+=lib/geom/geom_stripe.so.1 +# 20040728: GCC 3.4.2 +OLD_DIRS+=usr/include/c++/3.3 +OLD_FILES+=usr/include/c++/3.3/FlexLexer.h +OLD_FILES+=usr/include/c++/3.3/algorithm +OLD_FILES+=usr/include/c++/3.3/backward/algo.h +OLD_FILES+=usr/include/c++/3.3/backward/algobase.h +OLD_FILES+=usr/include/c++/3.3/backward/alloc.h +OLD_FILES+=usr/include/c++/3.3/backward/backward_warning.h +OLD_FILES+=usr/include/c++/3.3/backward/bvector.h +OLD_FILES+=usr/include/c++/3.3/backward/complex.h +OLD_FILES+=usr/include/c++/3.3/backward/defalloc.h +OLD_FILES+=usr/include/c++/3.3/backward/deque.h +OLD_FILES+=usr/include/c++/3.3/backward/fstream.h +OLD_FILES+=usr/include/c++/3.3/backward/function.h +OLD_FILES+=usr/include/c++/3.3/backward/hash_map.h +OLD_FILES+=usr/include/c++/3.3/backward/hash_set.h +OLD_FILES+=usr/include/c++/3.3/backward/hashtable.h +OLD_FILES+=usr/include/c++/3.3/backward/heap.h +OLD_FILES+=usr/include/c++/3.3/backward/iomanip.h +OLD_FILES+=usr/include/c++/3.3/backward/iostream.h +OLD_FILES+=usr/include/c++/3.3/backward/istream.h +OLD_FILES+=usr/include/c++/3.3/backward/iterator.h +OLD_FILES+=usr/include/c++/3.3/backward/list.h +OLD_FILES+=usr/include/c++/3.3/backward/map.h +OLD_FILES+=usr/include/c++/3.3/backward/multimap.h +OLD_FILES+=usr/include/c++/3.3/backward/multiset.h +OLD_FILES+=usr/include/c++/3.3/backward/new.h +OLD_FILES+=usr/include/c++/3.3/backward/ostream.h +OLD_FILES+=usr/include/c++/3.3/backward/pair.h +OLD_FILES+=usr/include/c++/3.3/backward/queue.h +OLD_FILES+=usr/include/c++/3.3/backward/rope.h +OLD_FILES+=usr/include/c++/3.3/backward/set.h +OLD_FILES+=usr/include/c++/3.3/backward/slist.h +OLD_FILES+=usr/include/c++/3.3/backward/stack.h +OLD_FILES+=usr/include/c++/3.3/backward/stream.h +OLD_FILES+=usr/include/c++/3.3/backward/streambuf.h +OLD_FILES+=usr/include/c++/3.3/backward/strstream +OLD_FILES+=usr/include/c++/3.3/backward/strstream.h +OLD_FILES+=usr/include/c++/3.3/backward/tempbuf.h +OLD_FILES+=usr/include/c++/3.3/backward/tree.h +OLD_FILES+=usr/include/c++/3.3/backward/vector.h +OLD_DIRS+=usr/include/c++/3.3/backward +OLD_FILES+=usr/include/c++/3.3/bits/atomicity.h +OLD_FILES+=usr/include/c++/3.3/bits/basic_file.h +OLD_FILES+=usr/include/c++/3.3/bits/basic_ios.h +OLD_FILES+=usr/include/c++/3.3/bits/basic_ios.tcc +OLD_FILES+=usr/include/c++/3.3/bits/basic_string.h +OLD_FILES+=usr/include/c++/3.3/bits/basic_string.tcc +OLD_FILES+=usr/include/c++/3.3/bits/boost_concept_check.h +OLD_FILES+=usr/include/c++/3.3/bits/c++config.h +OLD_FILES+=usr/include/c++/3.3/bits/c++io.h +OLD_FILES+=usr/include/c++/3.3/bits/c++locale.h +OLD_FILES+=usr/include/c++/3.3/bits/c++locale_internal.h +OLD_FILES+=usr/include/c++/3.3/bits/char_traits.h +OLD_FILES+=usr/include/c++/3.3/bits/cmath.tcc +OLD_FILES+=usr/include/c++/3.3/bits/codecvt.h +OLD_FILES+=usr/include/c++/3.3/bits/codecvt_specializations.h +OLD_FILES+=usr/include/c++/3.3/bits/concept_check.h +OLD_FILES+=usr/include/c++/3.3/bits/cpp_type_traits.h +OLD_FILES+=usr/include/c++/3.3/bits/ctype_base.h +OLD_FILES+=usr/include/c++/3.3/bits/ctype_inline.h +OLD_FILES+=usr/include/c++/3.3/bits/ctype_noninline.h +OLD_FILES+=usr/include/c++/3.3/bits/deque.tcc +OLD_FILES+=usr/include/c++/3.3/bits/fpos.h +OLD_FILES+=usr/include/c++/3.3/bits/fstream.tcc +OLD_FILES+=usr/include/c++/3.3/bits/functexcept.h +OLD_FILES+=usr/include/c++/3.3/bits/generic_shadow.h +OLD_FILES+=usr/include/c++/3.3/bits/gslice.h +OLD_FILES+=usr/include/c++/3.3/bits/gslice_array.h +OLD_FILES+=usr/include/c++/3.3/bits/gthr-default.h +OLD_FILES+=usr/include/c++/3.3/bits/gthr-posix.h +OLD_FILES+=usr/include/c++/3.3/bits/gthr-single.h +OLD_FILES+=usr/include/c++/3.3/bits/gthr.h +OLD_FILES+=usr/include/c++/3.3/bits/indirect_array.h +OLD_FILES+=usr/include/c++/3.3/bits/ios_base.h +OLD_FILES+=usr/include/c++/3.3/bits/istream.tcc +OLD_FILES+=usr/include/c++/3.3/bits/list.tcc +OLD_FILES+=usr/include/c++/3.3/bits/locale_classes.h +OLD_FILES+=usr/include/c++/3.3/bits/locale_facets.h +OLD_FILES+=usr/include/c++/3.3/bits/locale_facets.tcc +OLD_FILES+=usr/include/c++/3.3/bits/localefwd.h +OLD_FILES+=usr/include/c++/3.3/bits/mask_array.h +OLD_FILES+=usr/include/c++/3.3/bits/messages_members.h +OLD_FILES+=usr/include/c++/3.3/bits/os_defines.h +OLD_FILES+=usr/include/c++/3.3/bits/ostream.tcc +OLD_FILES+=usr/include/c++/3.3/bits/pthread_allocimpl.h +OLD_FILES+=usr/include/c++/3.3/bits/slice.h +OLD_FILES+=usr/include/c++/3.3/bits/slice_array.h +OLD_FILES+=usr/include/c++/3.3/bits/sstream.tcc +OLD_FILES+=usr/include/c++/3.3/bits/stl_algo.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_algobase.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_alloc.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_bvector.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_construct.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_deque.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_function.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_heap.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_iterator.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_iterator_base_funcs.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_iterator_base_types.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_list.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_map.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_multimap.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_multiset.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_numeric.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_pair.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_pthread_alloc.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_queue.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_raw_storage_iter.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_relops.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_set.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_stack.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_tempbuf.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_threads.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_tree.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_uninitialized.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_vector.h +OLD_FILES+=usr/include/c++/3.3/bits/stream_iterator.h +OLD_FILES+=usr/include/c++/3.3/bits/streambuf.tcc +OLD_FILES+=usr/include/c++/3.3/bits/streambuf_iterator.h +OLD_FILES+=usr/include/c++/3.3/bits/stringfwd.h +OLD_FILES+=usr/include/c++/3.3/bits/time_members.h +OLD_FILES+=usr/include/c++/3.3/bits/type_traits.h +OLD_FILES+=usr/include/c++/3.3/bits/valarray_array.h +OLD_FILES+=usr/include/c++/3.3/bits/valarray_array.tcc +OLD_FILES+=usr/include/c++/3.3/bits/valarray_meta.h +OLD_FILES+=usr/include/c++/3.3/bits/vector.tcc +OLD_DIRS+=usr/include/c++/3.3/bits +OLD_FILES+=usr/include/c++/3.3/bitset +OLD_FILES+=usr/include/c++/3.3/cassert +OLD_FILES+=usr/include/c++/3.3/cctype +OLD_FILES+=usr/include/c++/3.3/cerrno +OLD_FILES+=usr/include/c++/3.3/cfloat +OLD_FILES+=usr/include/c++/3.3/ciso646 +OLD_FILES+=usr/include/c++/3.3/climits +OLD_FILES+=usr/include/c++/3.3/clocale +OLD_FILES+=usr/include/c++/3.3/cmath +OLD_FILES+=usr/include/c++/3.3/complex +OLD_FILES+=usr/include/c++/3.3/csetjmp +OLD_FILES+=usr/include/c++/3.3/csignal +OLD_FILES+=usr/include/c++/3.3/cstdarg +OLD_FILES+=usr/include/c++/3.3/cstddef +OLD_FILES+=usr/include/c++/3.3/cstdio +OLD_FILES+=usr/include/c++/3.3/cstdlib +OLD_FILES+=usr/include/c++/3.3/cstring +OLD_FILES+=usr/include/c++/3.3/ctime +OLD_FILES+=usr/include/c++/3.3/cwchar +OLD_FILES+=usr/include/c++/3.3/cwctype +OLD_FILES+=usr/include/c++/3.3/cxxabi.h +OLD_FILES+=usr/include/c++/3.3/deque +OLD_FILES+=usr/include/c++/3.3/exception +OLD_FILES+=usr/include/c++/3.3/exception_defines.h +OLD_FILES+=usr/include/c++/3.3/ext/algorithm +OLD_FILES+=usr/include/c++/3.3/ext/enc_filebuf.h +OLD_FILES+=usr/include/c++/3.3/ext/functional +OLD_FILES+=usr/include/c++/3.3/ext/hash_map +OLD_FILES+=usr/include/c++/3.3/ext/hash_set +OLD_FILES+=usr/include/c++/3.3/ext/iterator +OLD_FILES+=usr/include/c++/3.3/ext/memory +OLD_FILES+=usr/include/c++/3.3/ext/numeric +OLD_FILES+=usr/include/c++/3.3/ext/rb_tree +OLD_FILES+=usr/include/c++/3.3/ext/rope +OLD_FILES+=usr/include/c++/3.3/ext/ropeimpl.h +OLD_FILES+=usr/include/c++/3.3/ext/slist +OLD_FILES+=usr/include/c++/3.3/ext/stdio_filebuf.h +OLD_FILES+=usr/include/c++/3.3/ext/stl_hash_fun.h +OLD_FILES+=usr/include/c++/3.3/ext/stl_hashtable.h +OLD_FILES+=usr/include/c++/3.3/ext/stl_rope.h +OLD_DIRS+=usr/include/c++/3.3/ext +OLD_FILES+=usr/include/c++/3.3/fstream +OLD_FILES+=usr/include/c++/3.3/functional +OLD_FILES+=usr/include/c++/3.3/iomanip +OLD_FILES+=usr/include/c++/3.3/ios +OLD_FILES+=usr/include/c++/3.3/iosfwd +OLD_FILES+=usr/include/c++/3.3/iostream +OLD_FILES+=usr/include/c++/3.3/istream +OLD_FILES+=usr/include/c++/3.3/iterator +OLD_FILES+=usr/include/c++/3.3/limits +OLD_FILES+=usr/include/c++/3.3/list +OLD_FILES+=usr/include/c++/3.3/locale +OLD_FILES+=usr/include/c++/3.3/map +OLD_FILES+=usr/include/c++/3.3/memory +OLD_FILES+=usr/include/c++/3.3/new +OLD_FILES+=usr/include/c++/3.3/numeric +OLD_FILES+=usr/include/c++/3.3/ostream +OLD_FILES+=usr/include/c++/3.3/queue +OLD_FILES+=usr/include/c++/3.3/set +OLD_FILES+=usr/include/c++/3.3/sstream +OLD_FILES+=usr/include/c++/3.3/stack +OLD_FILES+=usr/include/c++/3.3/stdexcept +OLD_FILES+=usr/include/c++/3.3/streambuf +OLD_FILES+=usr/include/c++/3.3/string +OLD_FILES+=usr/include/c++/3.3/typeinfo +OLD_FILES+=usr/include/c++/3.3/utility +OLD_FILES+=usr/include/c++/3.3/valarray +OLD_FILES+=usr/include/c++/3.3/vector # 20040713: fla(4) removed. OLD_FILES+=usr/share/man/man4/fla.4.gz # 200407XX From gjb at FreeBSD.org Thu Aug 28 01:15:00 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Thu, 28 Aug 2014 01:15:00 +0000 (UTC) Subject: svn commit: r270736 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408280115.s7S1F08w003138@svn.freebsd.org> Author: gjb Date: Thu Aug 28 01:14:59 2014 New Revision: 270736 URL: http://svnweb.freebsd.org/changeset/base/270736 Log: Correct the note about r270401: s/pam(3)/pam_group(8) Submitted by: jilles Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 01:14:30 2014 (r270735) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 01:14:59 2014 (r270736) @@ -959,7 +959,8 @@ -o vers=4. Support for the account - facility has been added to &man.pam.3; library. + facility has been added to the &man.pam.group.8; + module. <filename>/etc/rc.d</filename> Scripts From truckman at FreeBSD.org Thu Aug 28 01:15:57 2014 From: truckman at FreeBSD.org (Don Lewis) Date: Thu, 28 Aug 2014 01:15:57 +0000 (UTC) Subject: svn commit: r270737 - stable/8 Message-ID: <201408280115.s7S1FvfG003344@svn.freebsd.org> Author: truckman Date: Thu Aug 28 01:15:56 2014 New Revision: 270737 URL: http://svnweb.freebsd.org/changeset/base/270737 Log: MFC r270510: Catch up to gcc 3.3 -> 3.4 upgrade. Modified: stable/8/ObsoleteFiles.inc (contents, props changed) Directory Properties: stable/8/ (props changed) Modified: stable/8/ObsoleteFiles.inc ============================================================================== --- stable/8/ObsoleteFiles.inc Thu Aug 28 01:14:59 2014 (r270736) +++ stable/8/ObsoleteFiles.inc Thu Aug 28 01:15:56 2014 (r270737) @@ -1972,6 +1972,202 @@ OLD_FILES+=lib/geom/geom_concat.so.1 OLD_FILES+=lib/geom/geom_label.so.1 OLD_FILES+=lib/geom/geom_nop.so.1 OLD_FILES+=lib/geom/geom_stripe.so.1 +# 20040728: GCC 3.4.2 +OLD_DIRS+=usr/include/c++/3.3 +OLD_FILES+=usr/include/c++/3.3/FlexLexer.h +OLD_FILES+=usr/include/c++/3.3/algorithm +OLD_FILES+=usr/include/c++/3.3/backward/algo.h +OLD_FILES+=usr/include/c++/3.3/backward/algobase.h +OLD_FILES+=usr/include/c++/3.3/backward/alloc.h +OLD_FILES+=usr/include/c++/3.3/backward/backward_warning.h +OLD_FILES+=usr/include/c++/3.3/backward/bvector.h +OLD_FILES+=usr/include/c++/3.3/backward/complex.h +OLD_FILES+=usr/include/c++/3.3/backward/defalloc.h +OLD_FILES+=usr/include/c++/3.3/backward/deque.h +OLD_FILES+=usr/include/c++/3.3/backward/fstream.h +OLD_FILES+=usr/include/c++/3.3/backward/function.h +OLD_FILES+=usr/include/c++/3.3/backward/hash_map.h +OLD_FILES+=usr/include/c++/3.3/backward/hash_set.h +OLD_FILES+=usr/include/c++/3.3/backward/hashtable.h +OLD_FILES+=usr/include/c++/3.3/backward/heap.h +OLD_FILES+=usr/include/c++/3.3/backward/iomanip.h +OLD_FILES+=usr/include/c++/3.3/backward/iostream.h +OLD_FILES+=usr/include/c++/3.3/backward/istream.h +OLD_FILES+=usr/include/c++/3.3/backward/iterator.h +OLD_FILES+=usr/include/c++/3.3/backward/list.h +OLD_FILES+=usr/include/c++/3.3/backward/map.h +OLD_FILES+=usr/include/c++/3.3/backward/multimap.h +OLD_FILES+=usr/include/c++/3.3/backward/multiset.h +OLD_FILES+=usr/include/c++/3.3/backward/new.h +OLD_FILES+=usr/include/c++/3.3/backward/ostream.h +OLD_FILES+=usr/include/c++/3.3/backward/pair.h +OLD_FILES+=usr/include/c++/3.3/backward/queue.h +OLD_FILES+=usr/include/c++/3.3/backward/rope.h +OLD_FILES+=usr/include/c++/3.3/backward/set.h +OLD_FILES+=usr/include/c++/3.3/backward/slist.h +OLD_FILES+=usr/include/c++/3.3/backward/stack.h +OLD_FILES+=usr/include/c++/3.3/backward/stream.h +OLD_FILES+=usr/include/c++/3.3/backward/streambuf.h +OLD_FILES+=usr/include/c++/3.3/backward/strstream +OLD_FILES+=usr/include/c++/3.3/backward/strstream.h +OLD_FILES+=usr/include/c++/3.3/backward/tempbuf.h +OLD_FILES+=usr/include/c++/3.3/backward/tree.h +OLD_FILES+=usr/include/c++/3.3/backward/vector.h +OLD_DIRS+=usr/include/c++/3.3/backward +OLD_FILES+=usr/include/c++/3.3/bits/atomicity.h +OLD_FILES+=usr/include/c++/3.3/bits/basic_file.h +OLD_FILES+=usr/include/c++/3.3/bits/basic_ios.h +OLD_FILES+=usr/include/c++/3.3/bits/basic_ios.tcc +OLD_FILES+=usr/include/c++/3.3/bits/basic_string.h +OLD_FILES+=usr/include/c++/3.3/bits/basic_string.tcc +OLD_FILES+=usr/include/c++/3.3/bits/boost_concept_check.h +OLD_FILES+=usr/include/c++/3.3/bits/c++config.h +OLD_FILES+=usr/include/c++/3.3/bits/c++io.h +OLD_FILES+=usr/include/c++/3.3/bits/c++locale.h +OLD_FILES+=usr/include/c++/3.3/bits/c++locale_internal.h +OLD_FILES+=usr/include/c++/3.3/bits/char_traits.h +OLD_FILES+=usr/include/c++/3.3/bits/cmath.tcc +OLD_FILES+=usr/include/c++/3.3/bits/codecvt.h +OLD_FILES+=usr/include/c++/3.3/bits/codecvt_specializations.h +OLD_FILES+=usr/include/c++/3.3/bits/concept_check.h +OLD_FILES+=usr/include/c++/3.3/bits/cpp_type_traits.h +OLD_FILES+=usr/include/c++/3.3/bits/ctype_base.h +OLD_FILES+=usr/include/c++/3.3/bits/ctype_inline.h +OLD_FILES+=usr/include/c++/3.3/bits/ctype_noninline.h +OLD_FILES+=usr/include/c++/3.3/bits/deque.tcc +OLD_FILES+=usr/include/c++/3.3/bits/fpos.h +OLD_FILES+=usr/include/c++/3.3/bits/fstream.tcc +OLD_FILES+=usr/include/c++/3.3/bits/functexcept.h +OLD_FILES+=usr/include/c++/3.3/bits/generic_shadow.h +OLD_FILES+=usr/include/c++/3.3/bits/gslice.h +OLD_FILES+=usr/include/c++/3.3/bits/gslice_array.h +OLD_FILES+=usr/include/c++/3.3/bits/gthr-default.h +OLD_FILES+=usr/include/c++/3.3/bits/gthr-posix.h +OLD_FILES+=usr/include/c++/3.3/bits/gthr-single.h +OLD_FILES+=usr/include/c++/3.3/bits/gthr.h +OLD_FILES+=usr/include/c++/3.3/bits/indirect_array.h +OLD_FILES+=usr/include/c++/3.3/bits/ios_base.h +OLD_FILES+=usr/include/c++/3.3/bits/istream.tcc +OLD_FILES+=usr/include/c++/3.3/bits/list.tcc +OLD_FILES+=usr/include/c++/3.3/bits/locale_classes.h +OLD_FILES+=usr/include/c++/3.3/bits/locale_facets.h +OLD_FILES+=usr/include/c++/3.3/bits/locale_facets.tcc +OLD_FILES+=usr/include/c++/3.3/bits/localefwd.h +OLD_FILES+=usr/include/c++/3.3/bits/mask_array.h +OLD_FILES+=usr/include/c++/3.3/bits/messages_members.h +OLD_FILES+=usr/include/c++/3.3/bits/os_defines.h +OLD_FILES+=usr/include/c++/3.3/bits/ostream.tcc +OLD_FILES+=usr/include/c++/3.3/bits/pthread_allocimpl.h +OLD_FILES+=usr/include/c++/3.3/bits/slice.h +OLD_FILES+=usr/include/c++/3.3/bits/slice_array.h +OLD_FILES+=usr/include/c++/3.3/bits/sstream.tcc +OLD_FILES+=usr/include/c++/3.3/bits/stl_algo.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_algobase.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_alloc.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_bvector.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_construct.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_deque.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_function.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_heap.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_iterator.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_iterator_base_funcs.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_iterator_base_types.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_list.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_map.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_multimap.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_multiset.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_numeric.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_pair.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_pthread_alloc.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_queue.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_raw_storage_iter.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_relops.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_set.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_stack.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_tempbuf.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_threads.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_tree.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_uninitialized.h +OLD_FILES+=usr/include/c++/3.3/bits/stl_vector.h +OLD_FILES+=usr/include/c++/3.3/bits/stream_iterator.h +OLD_FILES+=usr/include/c++/3.3/bits/streambuf.tcc +OLD_FILES+=usr/include/c++/3.3/bits/streambuf_iterator.h +OLD_FILES+=usr/include/c++/3.3/bits/stringfwd.h +OLD_FILES+=usr/include/c++/3.3/bits/time_members.h +OLD_FILES+=usr/include/c++/3.3/bits/type_traits.h +OLD_FILES+=usr/include/c++/3.3/bits/valarray_array.h +OLD_FILES+=usr/include/c++/3.3/bits/valarray_array.tcc +OLD_FILES+=usr/include/c++/3.3/bits/valarray_meta.h +OLD_FILES+=usr/include/c++/3.3/bits/vector.tcc +OLD_DIRS+=usr/include/c++/3.3/bits +OLD_FILES+=usr/include/c++/3.3/bitset +OLD_FILES+=usr/include/c++/3.3/cassert +OLD_FILES+=usr/include/c++/3.3/cctype +OLD_FILES+=usr/include/c++/3.3/cerrno +OLD_FILES+=usr/include/c++/3.3/cfloat +OLD_FILES+=usr/include/c++/3.3/ciso646 +OLD_FILES+=usr/include/c++/3.3/climits +OLD_FILES+=usr/include/c++/3.3/clocale +OLD_FILES+=usr/include/c++/3.3/cmath +OLD_FILES+=usr/include/c++/3.3/complex +OLD_FILES+=usr/include/c++/3.3/csetjmp +OLD_FILES+=usr/include/c++/3.3/csignal +OLD_FILES+=usr/include/c++/3.3/cstdarg +OLD_FILES+=usr/include/c++/3.3/cstddef +OLD_FILES+=usr/include/c++/3.3/cstdio +OLD_FILES+=usr/include/c++/3.3/cstdlib +OLD_FILES+=usr/include/c++/3.3/cstring +OLD_FILES+=usr/include/c++/3.3/ctime +OLD_FILES+=usr/include/c++/3.3/cwchar +OLD_FILES+=usr/include/c++/3.3/cwctype +OLD_FILES+=usr/include/c++/3.3/cxxabi.h +OLD_FILES+=usr/include/c++/3.3/deque +OLD_FILES+=usr/include/c++/3.3/exception +OLD_FILES+=usr/include/c++/3.3/exception_defines.h +OLD_FILES+=usr/include/c++/3.3/ext/algorithm +OLD_FILES+=usr/include/c++/3.3/ext/enc_filebuf.h +OLD_FILES+=usr/include/c++/3.3/ext/functional +OLD_FILES+=usr/include/c++/3.3/ext/hash_map +OLD_FILES+=usr/include/c++/3.3/ext/hash_set +OLD_FILES+=usr/include/c++/3.3/ext/iterator +OLD_FILES+=usr/include/c++/3.3/ext/memory +OLD_FILES+=usr/include/c++/3.3/ext/numeric +OLD_FILES+=usr/include/c++/3.3/ext/rb_tree +OLD_FILES+=usr/include/c++/3.3/ext/rope +OLD_FILES+=usr/include/c++/3.3/ext/ropeimpl.h +OLD_FILES+=usr/include/c++/3.3/ext/slist +OLD_FILES+=usr/include/c++/3.3/ext/stdio_filebuf.h +OLD_FILES+=usr/include/c++/3.3/ext/stl_hash_fun.h +OLD_FILES+=usr/include/c++/3.3/ext/stl_hashtable.h +OLD_FILES+=usr/include/c++/3.3/ext/stl_rope.h +OLD_DIRS+=usr/include/c++/3.3/ext +OLD_FILES+=usr/include/c++/3.3/fstream +OLD_FILES+=usr/include/c++/3.3/functional +OLD_FILES+=usr/include/c++/3.3/iomanip +OLD_FILES+=usr/include/c++/3.3/ios +OLD_FILES+=usr/include/c++/3.3/iosfwd +OLD_FILES+=usr/include/c++/3.3/iostream +OLD_FILES+=usr/include/c++/3.3/istream +OLD_FILES+=usr/include/c++/3.3/iterator +OLD_FILES+=usr/include/c++/3.3/limits +OLD_FILES+=usr/include/c++/3.3/list +OLD_FILES+=usr/include/c++/3.3/locale +OLD_FILES+=usr/include/c++/3.3/map +OLD_FILES+=usr/include/c++/3.3/memory +OLD_FILES+=usr/include/c++/3.3/new +OLD_FILES+=usr/include/c++/3.3/numeric +OLD_FILES+=usr/include/c++/3.3/ostream +OLD_FILES+=usr/include/c++/3.3/queue +OLD_FILES+=usr/include/c++/3.3/set +OLD_FILES+=usr/include/c++/3.3/sstream +OLD_FILES+=usr/include/c++/3.3/stack +OLD_FILES+=usr/include/c++/3.3/stdexcept +OLD_FILES+=usr/include/c++/3.3/streambuf +OLD_FILES+=usr/include/c++/3.3/string +OLD_FILES+=usr/include/c++/3.3/typeinfo +OLD_FILES+=usr/include/c++/3.3/utility +OLD_FILES+=usr/include/c++/3.3/valarray +OLD_FILES+=usr/include/c++/3.3/vector # 20040713: fla(4) removed. OLD_FILES+=usr/share/man/man4/fla.4.gz # 200407XX From dteske at FreeBSD.org Thu Aug 28 02:28:24 2014 From: dteske at FreeBSD.org (dteske at FreeBSD.org) Date: Wed, 27 Aug 2014 19:27:37 -0700 Subject: svn commit: r270644 - stable/10/usr.sbin/bsdinstall/scripts In-Reply-To: <20140827184832.GJ2075@zxy.spb.ru> References: <201408260231.s7Q2VbCW087619@svn.freebsd.org> <20140827140902.GA41194@zxy.spb.ru> <1d0501cfc221$1114f850$333ee8f0$@FreeBSD.org> <20140827184832.GJ2075@zxy.spb.ru> Message-ID: <1e8b01cfc267$a266a650$e733f2f0$@FreeBSD.org> > -----Original Message----- > From: Slawa Olhovchenkov [mailto:slw at zxy.spb.ru] > Sent: Wednesday, August 27, 2014 11:49 AM > To: dteske at FreeBSD.org > Cc: 'Andrew Thompson'; src-committers at freebsd.org; svn-src- > all at freebsd.org; svn-src-stable at freebsd.org; svn-src-stable- > 10 at freebsd.org > Subject: Re: svn commit: r270644 - stable/10/usr.sbin/bsdinstall/scripts > > On Wed, Aug 27, 2014 at 11:02:28AM -0700, dteske at FreeBSD.org wrote: > > > > > > > > -----Original Message----- > > > From: owner-src-committers at freebsd.org [mailto:owner-src- > > > committers at freebsd.org] On Behalf Of Slawa Olhovchenkov > > > Sent: Wednesday, August 27, 2014 7:09 AM > > > To: Andrew Thompson > > > Cc: src-committers at freebsd.org; svn-src-all at freebsd.org; svn-src- > > > stable at freebsd.org; svn-src-stable-10 at freebsd.org > > > Subject: Re: svn commit: r270644 - stable/10/usr.sbin/bsdinstall/scripts > > > > > > On Tue, Aug 26, 2014 at 02:31:37AM +0000, Andrew Thompson wrote: > > > > > > In zfs directory layout you missing some separate datesets: > > > > > > usr/home (or, may be, just /home) > > > usr/obj > > > usr/ports/packages > > > usr/ports/distfiles > > > > > > Can you do it before 10.1? > > > > You must have missed the following in the evolution of that script: > > > > http://svnweb.freebsd.org/base?view=revision&revision=257842 > > > > [snip] > > + Remove some unnecessary default ZFS datasets from the automatic > "zfsboot" > > script. Such as: /usr/ports/distfiles /usr/ports/packages /usr/obj /var/db > > /var/empty /var/mail and /var/run (these can all be created as-needed > once > > the system is installed). > > [/snip] > > > > The idea is that all of those directories you mentioned are empty > > by default on a freshly installed system. Compare that to directories > > which are not empty -- if the user wants the data in a separate > > dataset, they have salvage existing data in the process. > > /home is not empty on a freshly installed system (I am create account > for remoty login). > I quote from your above test: "usr/home (or, may be, just /home)" On a freshly installed 10-STABLE snapshot: root at zbeastie:~ # ls /home ls: /home: No such file or directory root at zbeastie:~ # ls /usr/home root at zbeastie:~ # df -h /usr/home Filesystem Size Used Avail Capacity Mounted on zroot/usr/home 17G 96K 17G 0% /usr/home Now compare that to the following code: http://svnweb.freebsd.org/base/head/usr.sbin/bsdinstall/scripts/zfsboot?view =markup Read: There is a /usr/home already -- what's the issue? > Other datasets have special atributes and removing datasets is simples > then creating and to easy to forget create their before use. Perhaps; but if you're really deploying that many systems (to which it is a need that each be setup in the same [custom] manner), you really out to make a custom installer. Just rip open the installer ISO, create the following file: FILE: /etc/installerconfig ZFSBOOT_DATASETS=" # your custom settings here -- see /usr/libexec/bsdinstall/zfsboot " # END-QUOTE Then repack the ISO and use that instead of the generic release media. -- Devin From bryanv at FreeBSD.org Thu Aug 28 04:20:25 2014 From: bryanv at FreeBSD.org (Bryan Venteicher) Date: Thu, 28 Aug 2014 04:20:25 +0000 (UTC) Subject: svn commit: r270739 - stable/10/sys/dev/vmware/vmxnet3 Message-ID: <201408280420.s7S4KPEF091125@svn.freebsd.org> Author: bryanv Date: Thu Aug 28 04:20:24 2014 New Revision: 270739 URL: http://svnweb.freebsd.org/changeset/base/270739 Log: MFC r267632: Fix GCC compile warning: Variable(s) can be used uninitialized. PR: 193076 Modified: stable/10/sys/dev/vmware/vmxnet3/if_vmx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vmware/vmxnet3/if_vmx.c ============================================================================== --- stable/10/sys/dev/vmware/vmxnet3/if_vmx.c Thu Aug 28 03:18:27 2014 (r270738) +++ stable/10/sys/dev/vmware/vmxnet3/if_vmx.c Thu Aug 28 04:20:24 2014 (r270739) @@ -2619,10 +2619,12 @@ vmxnet3_txq_offload_ctx(struct vmxnet3_t struct ether_vlan_header *evh; int offset; #if defined(INET) - struct ip *ip, iphdr; + struct ip *ip = NULL; + struct ip iphdr; #endif #if defined(INET6) - struct ip6_hdr *ip6, ip6hdr; + struct ip6_hdr *ip6 = NULL; + struct ip6_hdr ip6hdr; #endif evh = mtod(m, struct ether_vlan_header *); From gjb at FreeBSD.org Thu Aug 28 06:16:37 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Thu, 28 Aug 2014 06:16:36 +0000 (UTC) Subject: svn commit: r270741 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408280616.s7S6Gbo1045801@svn.freebsd.org> Author: gjb Date: Thu Aug 28 06:16:36 2014 New Revision: 270741 URL: http://svnweb.freebsd.org/changeset/base/270741 Log: Document r269946, USDT DTrace probe improvements. Submitted by: rpaulo Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 04:35:38 2014 (r270740) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 06:16:36 2014 (r270741) @@ -945,6 +945,15 @@ parameters. This change allows &man.carp.4; interfaces to be used within the &man.jail.8;. + Support for generating and compiling + USDT DTrace + probes has been improved. DTrace + USDT files are now handled similar to + &man.lex.1; and &man.yacc.1; files, meaning support for + handling D files as part of the + build process is built into the SRCS + &man.make.1; environment variable. + The &man.iscsictl.8; utility has been updated to include a new flag, -M, which allows modifying the iSCSI session From slw at zxy.spb.ru Thu Aug 28 07:34:12 2014 From: slw at zxy.spb.ru (Slawa Olhovchenkov) Date: Thu, 28 Aug 2014 11:34:08 +0400 Subject: svn commit: r270644 - stable/10/usr.sbin/bsdinstall/scripts In-Reply-To: <1e8b01cfc267$a266a650$e733f2f0$@FreeBSD.org> References: <201408260231.s7Q2VbCW087619@svn.freebsd.org> <20140827140902.GA41194@zxy.spb.ru> <1d0501cfc221$1114f850$333ee8f0$@FreeBSD.org> <20140827184832.GJ2075@zxy.spb.ru> <1e8b01cfc267$a266a650$e733f2f0$@FreeBSD.org> Message-ID: <20140828073408.GK2075@zxy.spb.ru> On Wed, Aug 27, 2014 at 07:27:37PM -0700, dteske at FreeBSD.org wrote: > Now compare that to the following code: > http://svnweb.freebsd.org/base/head/usr.sbin/bsdinstall/scripts/zfsboot?view > =markup > > Read: There is a /usr/home already -- what's the issue? May be best mount to /home and do symlink from /usr/home? This is proposal. I think for ZFS install this is natural. > > Other datasets have special atributes and removing datasets is simples > > then creating and to easy to forget create their before use. > > Perhaps; but if you're really deploying that many systems (to which it is > a need that each be setup in the same [custom] manner), you really > out to make a custom installer. In some cases I do remote setup where install image supplayed for me. > Just rip open the installer ISO, create the following file: > > FILE: /etc/installerconfig > ZFSBOOT_DATASETS=" > # your custom settings here -- see /usr/libexec/bsdinstall/zfsboot > " # END-QUOTE I see this but don't correlate with actual ZFS layout: /usr in real not copressed, /usr/ports is compressed. I don't see compression options for /usr/ports in ZFSBOOT_DATASETS, how it work?! > Then repack the ISO and use that instead of the generic release media. And do it for each new release? What about "advanced options" with checkboxes for optional dataset? From mav at FreeBSD.org Thu Aug 28 07:57:01 2014 From: mav at FreeBSD.org (Alexander Motin) Date: Thu, 28 Aug 2014 07:57:00 +0000 (UTC) Subject: svn commit: r270743 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408280757.s7S7v0Ke093298@svn.freebsd.org> Author: mav Date: Thu Aug 28 07:57:00 2014 New Revision: 270743 URL: http://svnweb.freebsd.org/changeset/base/270743 Log: Move some points between sections. Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 07:44:59 2014 (r270742) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 07:57:00 2014 (r270743) @@ -130,30 +130,11 @@ Kernel Changes - The - vfs.zfs.zio.use_uma &man.sysctl.8; has been - re-enabled. On multi-CPU machines with enough RAM, this can - easily double &man.zfs.8; performance or reduce CPU usage in - half. It was originally disabled due to memory and - KVA exhaustion problem reports, which - should be resolved due to several change in the VM - subsystem. - - The - &man.geom.4; RAID driver has been - updated to support unmapped I/O. - A new &man.sysctl.8;, kern.panic_reboot_wait_time, has been added, which allows controlling how long the system will wait after &man.panic.9; before rebooting. - The &man.virtio_blk.4; driver has been - updated to support unmapped I/O. - - The &man.virtio_scsi.4; driver has been - updated to support unmapped I/O. - The &man.vt.4; driver has been merged from &os;-CURRENT. To enable &man.vt.4;, enter set kern.vty=vt at the &man.loader.8; @@ -233,6 +214,11 @@ updated to include support for the &intel; Lynx Point KT AMT serial port. + The radeonkms(4) + driver has been updated to include 32-bit &man.ioctl.2; + support, allowing 32-bit applications to run on a 64-bit + system. + A bug that would prevent a &man.jail.8; from setting the correct IPv4 source address with some operations that required @@ -243,20 +229,10 @@ updated to support core events from the Atom™ Silvermont architecture. - The &man.mfi.4; driver has been - updated to include support for unmapped I/O. - - The &man.hpt27xx.4; driver has been - updated with various vendor-supplied bug fixes. - The &man.oce.4; driver has been updated with vendor-supplied fixes for big endian support, and 20GB/s and 25GB/s link speeds. - Support for unmapped I/O has been added - to the &man.xen.4; blkfront driver. - The &os; virtual memory subsystem has been updated to implement fast path for the page fault handler. @@ -544,6 +520,26 @@ Disks and Storage + The + &man.geom.4; RAID driver has been + updated to support unmapped I/O. + + The &man.virtio_blk.4; driver has been + updated to support unmapped I/O. + + The &man.virtio_scsi.4; driver has been + updated to support unmapped I/O. + + The &man.mfi.4; driver has been + updated to include support for unmapped I/O. + + The &man.hpt27xx.4; driver has been + updated with various vendor-supplied bug fixes. + + Support for unmapped I/O has been added + to the &man.xen.4; blkfront driver. + The &man.geom.8; label class is now aware of resized partitions. This corrects an issue where @@ -568,11 +564,6 @@ disklabel64 partitioning scheme has been added to &man.gpart.8;. - The radeonkms(4) - driver has been updated to include 32-bit &man.ioctl.2; - support, allowing 32-bit applications to run on a 64-bit - system. - The maximum number of SCSI ports in the &man.ctl.4; driver has been increased from 32 to 128. @@ -590,6 +581,15 @@ File Systems + The + vfs.zfs.zio.use_uma &man.sysctl.8; has been + re-enabled. On multi-CPU machines with enough RAM, this can + easily double &man.zfs.8; performance or reduce CPU usage in + half. It was originally disabled due to memory and + KVA exhaustion problem reports, which + should be resolved due to several change in the VM + subsystem. + A new flag, -R, has been added to the &man.fsck.ffs.8; utility. When used, From mav at FreeBSD.org Thu Aug 28 08:25:16 2014 From: mav at FreeBSD.org (Alexander Motin) Date: Thu, 28 Aug 2014 08:25:16 +0000 (UTC) Subject: svn commit: r270744 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408280825.s7S8PGX7006884@svn.freebsd.org> Author: mav Date: Thu Aug 28 08:25:15 2014 New Revision: 270744 URL: http://svnweb.freebsd.org/changeset/base/270744 Log: Move more storage stuff to storage section. Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 07:57:00 2014 (r270743) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 08:25:15 2014 (r270744) @@ -141,12 +141,6 @@ prompt during boot, or add kern.vty=vt to &man.loader.conf.5; and reboot the system. - Support for MegaRAID Fury cards has been - added to the &man.mfi.4; driver. - - The &man.aacraid.4; driver has been - updated to version 3.2.5. - Support for &man.hwpmc.4; has been added for &powerpc; 970 class processors. @@ -165,51 +159,14 @@ Support for &amd; Family 16h sensor devices has been added to &man.amdtemp.4;. - Support for LUN-based CD changers has - been removed from the &man.cd.4; driver. - - Support for 9th generation HP host bus - adapter cards has been added to &man.ciss.4;. - - The - &man.mpr.4; device has been added, - providing support for LSI Fusion-MPT 3 12Gb SCSI/SATA - controllers. - - The GEOM_VINUM option - is now able to be built both directly into the kernel or as - a &man.kldload.8; loadable module. - The &man.uslcom.4; driver has been updated to support 26 new devices. - The - &man.mrsas.4; driver has been added, - providing support for LSI MegaRAID SAS controllers. The - &man.mfi.4; driver will attach to the controller, by default. - To enable &man.mrsas.4; add - hw.mfi.mrsas_enable=1 to - /boot/loader.conf, which turns off - &man.mfi.4; device probing. - - - At this time, the &man.mfiutil.8; utility and - the &os; version of - MegaCLI and - StorCli do not work with - &man.mrsas.4;. - - A kernel bug that inhibited proper functionality of the dev.cpu.0.freq &man.sysctl.8; on &intel; processors with Turbo Boost™ enabled has been fixed. - The &man.geom.uncompress.4; module is - built by default which, similar to &man.geom.uzip.4;, - provides support for compressed, read-only disk - images. - The &man.uart.4; driver has been updated to include support for the &intel; Lynx Point KT AMT serial port. @@ -530,6 +487,34 @@ The &man.virtio_scsi.4; driver has been updated to support unmapped I/O. + Support for LUN-based CD changers has + been removed from the &man.cd.4; driver. + + Support for 9th generation HP host bus + adapter cards has been added to &man.ciss.4;. + + The + &man.mpr.4; device has been added, + providing support for LSI Fusion-MPT 3 12Gb SCSI/SATA + controllers. + + The + &man.mrsas.4; driver has been added, + providing support for LSI MegaRAID SAS controllers. The + &man.mfi.4; driver will attach to the controller, by default. + To enable &man.mrsas.4; add + hw.mfi.mrsas_enable=1 to + /boot/loader.conf, which turns off + &man.mfi.4; device probing. + + + At this time, the &man.mfiutil.8; utility and + the &os; version of + MegaCLI and + StorCli do not work with + &man.mrsas.4;. + + The &man.mfi.4; driver has been updated to include support for unmapped I/O. @@ -553,6 +538,16 @@ it easier to resize the size of a mirror when all of its components have been replaced. + Support for MegaRAID Fury cards has been + added to the &man.mfi.4; driver. + + The &man.aacraid.4; driver has been + updated to version 3.2.5. + + The GEOM_VINUM option + is now able to be built both directly into the kernel or as + a &man.kldload.8; loadable module. + The &man.geom.8; GEOM_PART class has been updated to support automatic partition resizing. Changes to the @@ -560,6 +555,11 @@ gpart commit is run, and prior to saving, can be reverted with gpart undo. + The &man.geom.uncompress.4; module is + built by default which, similar to &man.geom.uzip.4;, + provides support for compressed, read-only disk + images. + Support for the disklabel64 partitioning scheme has been added to &man.gpart.8;. From mav at FreeBSD.org Thu Aug 28 08:48:11 2014 From: mav at FreeBSD.org (Alexander Motin) Date: Thu, 28 Aug 2014 08:48:10 +0000 (UTC) Subject: svn commit: r270746 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408280848.s7S8mAV1016803@svn.freebsd.org> Author: mav Date: Thu Aug 28 08:48:10 2014 New Revision: 270746 URL: http://svnweb.freebsd.org/changeset/base/270746 Log: Document GEOM direct dispatch support and some other GEOM changes. Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 08:41:11 2014 (r270745) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 08:48:10 2014 (r270746) @@ -478,9 +478,21 @@ Disks and Storage The + &man.geom.4; got I/O direct dispatch support. + When safety requirements are met, it allows to avoid passing + I/O requests to GEOM g_up/g_down thread, executing them directly + in the caller context. That allows to avoid CPU bottlenecks in + g_up/g_down threads, plus avoid several context switches per I/O. + + + The &man.geom.4; RAID driver has been updated to support unmapped I/O. + The &man.geom.8; + GEOM_MULTIPATH class got automatic live + resize support. + The &man.virtio_blk.4; driver has been updated to support unmapped I/O. @@ -515,6 +527,13 @@ &man.mrsas.4;. + Fixed accounting of BIO_FLUSH operation + in &man.geom.8; GEOM_DISK class + + The &man.gstat.8; + utility now has a -o option, to + display "other" operatins (e.g. BIO_FLUSH). + The &man.mfi.4; driver has been updated to include support for unmapped I/O. From mav at FreeBSD.org Thu Aug 28 09:00:54 2014 From: mav at FreeBSD.org (Alexander Motin) Date: Thu, 28 Aug 2014 09:00:54 +0000 (UTC) Subject: svn commit: r270747 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408280900.s7S90sR5023688@svn.freebsd.org> Author: mav Date: Thu Aug 28 09:00:53 2014 New Revision: 270747 URL: http://svnweb.freebsd.org/changeset/base/270747 Log: Document CAM locking improvements. Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 08:48:10 2014 (r270746) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 09:00:53 2014 (r270747) @@ -489,6 +489,14 @@ &man.geom.4; RAID driver has been updated to support unmapped I/O. + The + &man.cam.4; got finer-grained locking, direct dispatch and + multi-queue support. + Combined with &man.geom.4; direct dispatch that allows to + reduce lock congestion and improve SMP scalability of the + SCSI/ATA stack. + + The &man.geom.8; GEOM_MULTIPATH class got automatic live resize support. From mav at FreeBSD.org Thu Aug 28 09:40:45 2014 From: mav at FreeBSD.org (Alexander Motin) Date: Thu, 28 Aug 2014 09:40:45 +0000 (UTC) Subject: svn commit: r270748 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408280940.s7S9ejiq040321@svn.freebsd.org> Author: mav Date: Thu Aug 28 09:40:44 2014 New Revision: 270748 URL: http://svnweb.freebsd.org/changeset/base/270748 Log: Document some CTL improvements. Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 09:00:53 2014 (r270747) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 09:40:44 2014 (r270748) @@ -591,10 +591,6 @@ disklabel64 partitioning scheme has been added to &man.gpart.8;. - The maximum number of - SCSI ports in the &man.ctl.4; driver has - been increased from 32 to 128. - A new &man.sysctl.8; and &man.loader.8; tunable, kern.geom.part.mbr.enforce_chs has been @@ -603,6 +599,36 @@ GEOM_PART_MBR will automatically recalculate the user-specified offset and size for alignment with the disk geometry. + + CAM Target Layer (CTL) + got many impromenets: + + + Support for UNMAP, WRITE SAME, COMPARE AND WRITE, XCOPY + and some other SCSI commands was added to support VMWare VAAI + and Microsoft ODX storage acceleration. + + + READ/WRITE size limitations were removed + by supporting multiple data moves per command. + + + Finer-grained per-LUN locking and + multiple worker threads for better SMP scapability. + + + Memory consumption reduced by several + times by disabling some never used functionality. + + + The maximum number of + SCSI ports increased from 32 to 128 + + + Improved ZVOL integration for better + performance. + + From gjb at FreeBSD.org Thu Aug 28 14:57:10 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Thu, 28 Aug 2014 14:57:10 +0000 (UTC) Subject: svn commit: r270751 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408281457.s7SEvAmw086668@svn.freebsd.org> Author: gjb Date: Thu Aug 28 14:57:09 2014 New Revision: 270751 URL: http://svnweb.freebsd.org/changeset/base/270751 Log: Note r268700 was sponsored by Spectra Logic. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 12:40:31 2014 (r270750) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 14:57:09 2014 (r270751) @@ -918,10 +918,12 @@ The &man.mkimg.1; utility has been merged from &os;-CURRENT. - The &man.camcontrol.8; has been updated - to include a new persist command, which - allows issuing SCSI PERSISTENT RESERVE IN - and SCSI PERSISTENT RESERVE OUT. + The &man.camcontrol.8; has been + updated to include a new persist command, + which allows issuing SCSI PERSISTENT RESERVE + IN and SCSI PERSISTENT RESERVE + OUT. The &man.gstat.8; utility has been updated to include a new flag, -p, which From gjb at FreeBSD.org Thu Aug 28 15:00:04 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Thu, 28 Aug 2014 15:00:04 +0000 (UTC) Subject: svn commit: r270752 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408281500.s7SF04bT087480@svn.freebsd.org> Author: gjb Date: Thu Aug 28 15:00:04 2014 New Revision: 270752 URL: http://svnweb.freebsd.org/changeset/base/270752 Log: Document r270242, sequential packet support in devd(8) Submitted by: asomers Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 14:57:09 2014 (r270751) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 15:00:04 2014 (r270752) @@ -1022,6 +1022,11 @@ specify NFS version 4, the syntax to use is -o vers=4. + The &man.devd.8; client socket type + has been changed to SOCK_SEQPACKET, + providing sequential packet support. + Support for the account facility has been added to the &man.pam.group.8; module. From gjb at FreeBSD.org Thu Aug 28 15:05:43 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Thu, 28 Aug 2014 15:05:43 +0000 (UTC) Subject: svn commit: r270753 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408281505.s7SF5hYn091856@svn.freebsd.org> Author: gjb Date: Thu Aug 28 15:05:42 2014 New Revision: 270753 URL: http://svnweb.freebsd.org/changeset/base/270753 Log: Note r269398 adds RFC5661 support. Submitted by: rmacklem Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 15:00:04 2014 (r270752) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 15:05:42 2014 (r270753) @@ -978,8 +978,9 @@ - The &man.nfsd.8; server update to 4.1 - has merged from &os;-CURRENT. + The &man.nfsd.8; server update to 4.1, + adding support for RFC5661, has merged from + &os;-CURRENT. The serial terminals ttyu0 and ttyu1 have From pfg at FreeBSD.org Thu Aug 28 18:11:06 2014 From: pfg at FreeBSD.org (Pedro F. Giffuni) Date: Thu, 28 Aug 2014 18:11:05 +0000 (UTC) Subject: svn commit: r270756 - in stable/10: bin/ed libexec/rtld-elf usr.bin/mail Message-ID: <201408281811.s7SIB5oh089427@svn.freebsd.org> Author: pfg Date: Thu Aug 28 18:11:05 2014 New Revision: 270756 URL: http://svnweb.freebsd.org/changeset/base/270756 Log: MFC r270256: Always check the limits of array index variables before using them. Obtained from: DragonFlyBSD Modified: stable/10/bin/ed/cbc.c stable/10/libexec/rtld-elf/libmap.c stable/10/usr.bin/mail/edit.c Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/ed/cbc.c ============================================================================== --- stable/10/bin/ed/cbc.c Thu Aug 28 17:40:19 2014 (r270755) +++ stable/10/bin/ed/cbc.c Thu Aug 28 18:11:05 2014 (r270756) @@ -237,7 +237,7 @@ expand_des_key(char *obuf, char *kbuf) /* * now translate it, bombing on any illegal hex digit */ - for (i = 0; kbuf[i] && i < 16; i++) + for (i = 0; i < 16 && kbuf[i]; i++) if ((nbuf[i] = hex_to_binary((int) kbuf[i], 16)) == -1) des_error("bad hex digit in key"); while (i < 16) Modified: stable/10/libexec/rtld-elf/libmap.c ============================================================================== --- stable/10/libexec/rtld-elf/libmap.c Thu Aug 28 17:40:19 2014 (r270755) +++ stable/10/libexec/rtld-elf/libmap.c Thu Aug 28 18:11:05 2014 (r270756) @@ -216,14 +216,14 @@ lmc_parse(char *lm_p, size_t lm_len) p = NULL; while (cnt < lm_len) { i = 0; - while (lm_p[cnt] != '\n' && cnt < lm_len && + while (cnt < lm_len && lm_p[cnt] != '\n' && i < sizeof(line) - 1) { line[i] = lm_p[cnt]; cnt++; i++; } line[i] = '\0'; - while (lm_p[cnt] != '\n' && cnt < lm_len) + while (cnt < lm_len && lm_p[cnt] != '\n') cnt++; /* skip over nl */ cnt++; Modified: stable/10/usr.bin/mail/edit.c ============================================================================== --- stable/10/usr.bin/mail/edit.c Thu Aug 28 17:40:19 2014 (r270755) +++ stable/10/usr.bin/mail/edit.c Thu Aug 28 18:11:05 2014 (r270756) @@ -81,7 +81,7 @@ edit1(int *msgvec, int type) /* * Deal with each message to be edited . . . */ - for (i = 0; msgvec[i] && i < msgCount; i++) { + for (i = 0; i < msgCount && msgvec[i]; i++) { sig_t sigint; if (i > 0) { From ngie at FreeBSD.org Thu Aug 28 19:59:05 2014 From: ngie at FreeBSD.org (Garrett Cooper) Date: Thu, 28 Aug 2014 19:59:05 +0000 (UTC) Subject: svn commit: r270760 - in stable/10: lib/libc share/mk Message-ID: <201408281959.s7SJx5u8053142@svn.freebsd.org> Author: ngie Date: Thu Aug 28 19:59:04 2014 New Revision: 270760 URL: http://svnweb.freebsd.org/changeset/base/270760 Log: MFC r270519: Fix "make checkdpadd" for lib/libc when MK_SSP != no Add LIBSSP_NONSHARED to bsd.libnames.mk and append LIBSSP_NONSHARED to DPADD in lib/libc when MK_SSP != no Approved by: rpaulo (mentor) Phabric: D675 (as part of a larger diff) PR: 192728 Modified: stable/10/lib/libc/Makefile stable/10/share/mk/bsd.libnames.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/Makefile ============================================================================== --- stable/10/lib/libc/Makefile Thu Aug 28 19:50:08 2014 (r270759) +++ stable/10/lib/libc/Makefile Thu Aug 28 19:59:04 2014 (r270760) @@ -47,6 +47,7 @@ LDFLAGS+= -nodefaultlibs LDADD+= -lgcc .if ${MK_SSP} != "no" +DPADD+= ${LIBSSP_NONSHARED} LDADD+= -lssp_nonshared .endif Modified: stable/10/share/mk/bsd.libnames.mk ============================================================================== --- stable/10/share/mk/bsd.libnames.mk Thu Aug 28 19:50:08 2014 (r270759) +++ stable/10/share/mk/bsd.libnames.mk Thu Aug 28 19:59:04 2014 (r270760) @@ -142,6 +142,7 @@ LIBSDP?= ${DESTDIR}${LIBDIR}/libsdp.a LIBSMB?= ${DESTDIR}${LIBDIR}/libsmb.a LIBSSH?= ${DESTDIR}${LIBPRIVATEDIR}/libssh.a LIBSSL?= ${DESTDIR}${LIBDIR}/libssl.a +LIBSSP_NONSHARED?= ${DESTDIR}${LIBDIR}/libssp_nonshared.a LIBSTAND?= ${DESTDIR}${LIBDIR}/libstand.a LIBSTDCPLUSPLUS?= ${DESTDIR}${LIBDIR}/libstdc++.a LIBTACPLUS?= ${DESTDIR}${LIBDIR}/libtacplus.a From mav at FreeBSD.org Thu Aug 28 20:25:18 2014 From: mav at FreeBSD.org (Alexander Motin) Date: Thu, 28 Aug 2014 20:25:18 +0000 (UTC) Subject: svn commit: r270761 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408282025.s7SKPIoJ071225@svn.freebsd.org> Author: mav Date: Thu Aug 28 20:25:17 2014 New Revision: 270761 URL: http://svnweb.freebsd.org/changeset/base/270761 Log: Mention NFS and kernel iSCSI optimizations. Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 19:59:04 2014 (r270760) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 20:25:17 2014 (r270761) @@ -472,6 +472,13 @@ A bug in &man.sctp.4; that would allow two listening sockets bound to the same port has been fixed. + + Kernel RPC code, which is a + base of NFS server took multiple optimizations, that significantly + improved its performance and SMP scapability. + + New kernel-based iSCSI target and initiator code took many + fixes and performance optimizations. From mav at FreeBSD.org Thu Aug 28 20:38:05 2014 From: mav at FreeBSD.org (Alexander Motin) Date: Thu, 28 Aug 2014 20:38:04 +0000 (UTC) Subject: svn commit: r270762 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408282038.s7SKc4jO077686@svn.freebsd.org> Author: mav Date: Thu Aug 28 20:38:04 2014 New Revision: 270762 URL: http://svnweb.freebsd.org/changeset/base/270762 Log: Document volmode ZVOL property addition. Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 20:25:17 2014 (r270761) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 20:38:04 2014 (r270762) @@ -525,6 +525,12 @@ providing support for LSI Fusion-MPT 3 12Gb SCSI/SATA controllers. + A new ZVOL property volmode + and &man.sysctl.8; vfs.zfs.vol.mode has been + added to allow switching ZVOL between three different ways of + exposing it to a user: geom, + dev and none. + The &man.mrsas.4; driver has been added, providing support for LSI MegaRAID SAS controllers. The From mav at FreeBSD.org Thu Aug 28 20:41:54 2014 From: mav at FreeBSD.org (Alexander Motin) Date: Thu, 28 Aug 2014 20:41:53 +0000 (UTC) Subject: svn commit: r270763 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408282041.s7SKfrnT081520@svn.freebsd.org> Author: mav Date: Thu Aug 28 20:41:53 2014 New Revision: 270763 URL: http://svnweb.freebsd.org/changeset/base/270763 Log: Document ZVOLs got BIO_DELETE support. Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 20:38:04 2014 (r270762) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 20:41:53 2014 (r270763) @@ -517,6 +517,8 @@ Support for LUN-based CD changers has been removed from the &man.cd.4; driver. + ZVOLs got BIO_DELETE support. + Support for 9th generation HP host bus adapter cards has been added to &man.ciss.4;. From gjb at FreeBSD.org Thu Aug 28 21:02:11 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Thu, 28 Aug 2014 21:02:11 +0000 (UTC) Subject: svn commit: r270764 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408282102.s7SL2BBa091012@svn.freebsd.org> Author: gjb Date: Thu Aug 28 21:02:10 2014 New Revision: 270764 URL: http://svnweb.freebsd.org/changeset/base/270764 Log: Add FreeBSD/ARM notes. These do not have corresponding revision numbers, since the updates took place over a large span of revisions, not one revision in particular. Submitted/prepared by: ian Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 20:41:53 2014 (r270763) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 21:02:10 2014 (r270764) @@ -285,9 +285,83 @@ The &man.gpioiic.4; and &man.gpioled.4; have been merged from &os;-CURRENT. - The ZEDBOARD kernel - configuration file has been updated to include - SMP support. + Support for hardware floating point was added to the + kernel, and enabled by default in the configuration files + for all platforms that contain the required hardware. + + C++ exception handling now + works with GCC. + + Support for SMP was added to the + kernel, and enabled by default in the configuration files + for all platforms that contain multi-core CPUs. + + Support was added for: + + + + CHROMEBOOK (Samsung Exynos 5250) + + + + COLIBRI (Freescale Vybrid) + + + + COSMIC (Freescale Vybrid) + + + + IMX53-QSB (Freescale i.MX53) + + + + QUARTZ (Freescale Vybrid) + + + + RADXA (Rockchip rk30xx) + + + + WANDBOARD (Freescale i.MX6) + + + + An I2C driver was added for + the RaspberryPi. + + Drivers have been added to support TI + platforms, such as BEAGLEBONE and PANDABOARD: + + + + PRUSS (Programmable Realtime Unit Subsystem) + + + + MBOX (Mailbox hardware) + + + + SDHCI (new faster driver for + MMC/SD + storage) + + + + PPS (Pulse Per Second input on a + GPIO/timer pin) + + + + PWM (Pulse Width Modulation output) + + + + ADC (Analog to Digital converter) + + From mav at FreeBSD.org Thu Aug 28 21:07:55 2014 From: mav at FreeBSD.org (Alexander Motin) Date: Thu, 28 Aug 2014 21:07:55 +0000 (UTC) Subject: svn commit: r270765 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408282107.s7SL7tjF091792@svn.freebsd.org> Author: mav Date: Thu Aug 28 21:07:54 2014 New Revision: 270765 URL: http://svnweb.freebsd.org/changeset/base/270765 Log: Fix typo. Submitted by: Hugo Lombard Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 21:02:10 2014 (r270764) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 21:07:54 2014 (r270765) @@ -689,8 +689,8 @@ recalculate the user-specified offset and size for alignment with the disk geometry. - CAM Target Layer (CTL) - got many impromenets: + Many improvements to the + CAM Target Layer (CTL): Support for UNMAP, WRITE SAME, COMPARE AND WRITE, XCOPY From gjb at FreeBSD.org Thu Aug 28 21:14:32 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Thu, 28 Aug 2014 21:14:32 +0000 (UTC) Subject: svn commit: r270766 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408282114.s7SLEWeE096077@svn.freebsd.org> Author: gjb Date: Thu Aug 28 21:14:32 2014 New Revision: 270766 URL: http://svnweb.freebsd.org/changeset/base/270766 Log: Use and in a few places where needed. Minor rewording to r264732 entry. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 21:07:54 2014 (r270765) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 21:14:32 2014 (r270766) @@ -549,7 +549,7 @@ Kernel RPC code, which is a base of NFS server took multiple optimizations, that significantly - improved its performance and SMP scapability. + improved its performance and SMP scapability. New kernel-based iSCSI target and initiator code took many fixes and performance optimizations. @@ -561,9 +561,9 @@ The &man.geom.4; got I/O direct dispatch support. When safety requirements are met, it allows to avoid passing - I/O requests to GEOM g_up/g_down thread, executing them directly + I/O requests to GEOM g_up/g_down thread, executing them directly in the caller context. That allows to avoid CPU bottlenecks in - g_up/g_down threads, plus avoid several context switches per I/O. + g_up/g_down threads, plus avoid several context switches per I/O. The @@ -574,7 +574,7 @@ &man.cam.4; got finer-grained locking, direct dispatch and multi-queue support. Combined with &man.geom.4; direct dispatch that allows to - reduce lock congestion and improve SMP scalability of the + reduce lock congestion and improve SMP scalability of the SCSI/ATA stack. @@ -591,7 +591,7 @@ Support for LUN-based CD changers has been removed from the &man.cd.4; driver. - ZVOLs got BIO_DELETE support. + Support for BIO_DELETE has been added to &man.zfs.8; zvol volumes. Support for 9th generation HP host bus adapter cards has been added to &man.ciss.4;. @@ -601,9 +601,9 @@ providing support for LSI Fusion-MPT 3 12Gb SCSI/SATA controllers. - A new ZVOL property volmode + A new zvol property volmode and &man.sysctl.8; vfs.zfs.vol.mode has been - added to allow switching ZVOL between three different ways of + added to allow switching zvol between three different ways of exposing it to a user: geom, dev and none. @@ -624,12 +624,12 @@ &man.mrsas.4;. - Fixed accounting of BIO_FLUSH operation + Fixed accounting of BIO_FLUSH operation in &man.geom.8; GEOM_DISK class The &man.gstat.8; utility now has a -o option, to - display "other" operatins (e.g. BIO_FLUSH). + display "other" operatins (e.g. BIO_FLUSH). The &man.mfi.4; driver has been updated to include support for unmapped I/O. @@ -693,17 +693,17 @@ CAM Target Layer (CTL): - Support for UNMAP, WRITE SAME, COMPARE AND WRITE, XCOPY + Support for UNMAP, WRITE SAME, COMPARE AND WRITE, XCOPY and some other SCSI commands was added to support VMWare VAAI and Microsoft ODX storage acceleration. - READ/WRITE size limitations were removed + READ/WRITE size limitations were removed by supporting multiple data moves per command. Finer-grained per-LUN locking and - multiple worker threads for better SMP scapability. + multiple worker threads for better SMP scapability. Memory consumption reduced by several @@ -714,7 +714,7 @@ SCSI ports increased from 32 to 128 - Improved ZVOL integration for better + Improved zvol integration for better performance. @@ -1244,7 +1244,7 @@ (and snapshots of the various security branches) are supported using the &man.freebsd-update.8; utility. The binary upgrade procedure will update unmodified userland utilities, as well as - unmodified GENERIC or SMP kernels distributed as a part of an + unmodified GENERIC or SMP kernels distributed as a part of an official &os; release. The &man.freebsd-update.8; utility requires that the host being upgraded have Internet connectivity. From gjb at FreeBSD.org Thu Aug 28 21:16:31 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Thu, 28 Aug 2014 21:16:31 +0000 (UTC) Subject: svn commit: r270767 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408282116.s7SLGVxO096427@svn.freebsd.org> Author: gjb Date: Thu Aug 28 21:16:30 2014 New Revision: 270767 URL: http://svnweb.freebsd.org/changeset/base/270767 Log: We do not differentiate the SMP from GENERIC kernel anymore, so remove mention of it. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 21:14:32 2014 (r270766) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 21:16:30 2014 (r270767) @@ -1244,7 +1244,7 @@ (and snapshots of the various security branches) are supported using the &man.freebsd-update.8; utility. The binary upgrade procedure will update unmodified userland utilities, as well as - unmodified GENERIC or SMP kernels distributed as a part of an + unmodified GENERIC kernel distributed as a part of an official &os; release. The &man.freebsd-update.8; utility requires that the host being upgraded have Internet connectivity. From gjb at FreeBSD.org Thu Aug 28 21:19:00 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Thu, 28 Aug 2014 21:18:59 +0000 (UTC) Subject: svn commit: r270768 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408282118.s7SLIx8o096783@svn.freebsd.org> Author: gjb Date: Thu Aug 28 21:18:59 2014 New Revision: 270768 URL: http://svnweb.freebsd.org/changeset/base/270768 Log: Minor rewording to a few sections. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 21:16:30 2014 (r270767) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 21:18:59 2014 (r270768) @@ -559,7 +559,7 @@ Disks and Storage The - &man.geom.4; got I/O direct dispatch support. + &man.geom.4; subsystem has been updated to support I/O direct dispatch. When safety requirements are met, it allows to avoid passing I/O requests to GEOM g_up/g_down thread, executing them directly in the caller context. That allows to avoid CPU bottlenecks in @@ -571,16 +571,16 @@ updated to support unmapped I/O. The - &man.cam.4; got finer-grained locking, direct dispatch and - multi-queue support. + &man.cam.4; subsystem has been updated to support + finer-grained locking, direct dispatch and multi-queue. Combined with &man.geom.4; direct dispatch that allows to reduce lock congestion and improve SMP scalability of the SCSI/ATA stack. The &man.geom.8; - GEOM_MULTIPATH class got automatic live - resize support. + GEOM_MULTIPATH class has been updated to + support automatic live partition resizing. The &man.virtio_blk.4; driver has been updated to support unmapped I/O. From gjb at FreeBSD.org Thu Aug 28 21:25:31 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Thu, 28 Aug 2014 21:25:30 +0000 (UTC) Subject: svn commit: r270769 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408282125.s7SLPUHQ001792@svn.freebsd.org> Author: gjb Date: Thu Aug 28 21:25:30 2014 New Revision: 270769 URL: http://svnweb.freebsd.org/changeset/base/270769 Log: FDP style nits. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 21:18:59 2014 (r270768) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 21:25:30 2014 (r270769) @@ -547,24 +547,27 @@ two listening sockets bound to the same port has been fixed. - Kernel RPC code, which is a - base of NFS server took multiple optimizations, that significantly - improved its performance and SMP scapability. + Kernel RPC code, which + is a base of NFS server took multiple optimizations, that + significantly improved its performance and + SMP scapability. - New kernel-based iSCSI target and initiator code took many - fixes and performance optimizations. + New kernel-based iSCSI target and initiator code took + many fixes and performance optimizations. Disks and Storage The - &man.geom.4; subsystem has been updated to support I/O direct dispatch. - When safety requirements are met, it allows to avoid passing - I/O requests to GEOM g_up/g_down thread, executing them directly - in the caller context. That allows to avoid CPU bottlenecks in - g_up/g_down threads, plus avoid several context switches per I/O. - + &man.geom.4; subsystem has been updated to support I/O + direct dispatch. When safety requirements are met, it + allows to avoid passing I/O requests to GEOM + g_up/g_down thread, + executing them directly in the caller context. That allows + to avoid CPU bottlenecks in + g_up/g_down threads, + plus avoid several context switches per I/O. The &man.geom.4; RAID driver has been @@ -574,9 +577,8 @@ &man.cam.4; subsystem has been updated to support finer-grained locking, direct dispatch and multi-queue. Combined with &man.geom.4; direct dispatch that allows to - reduce lock congestion and improve SMP scalability of the - SCSI/ATA stack. - + reduce lock congestion and improve SMP + scalability of the SCSI/ATA stack. The &man.geom.8; GEOM_MULTIPATH class has been updated to @@ -585,13 +587,15 @@ The &man.virtio_blk.4; driver has been updated to support unmapped I/O. - The &man.virtio_scsi.4; driver has been - updated to support unmapped I/O. + The &man.virtio_scsi.4; driver has + been updated to support unmapped I/O. Support for LUN-based CD changers has been removed from the &man.cd.4; driver. - Support for BIO_DELETE has been added to &man.zfs.8; zvol volumes. + Support for + BIO_DELETE has been added to &man.zfs.8; + zvol volumes. Support for 9th generation HP host bus adapter cards has been added to &man.ciss.4;. @@ -601,35 +605,35 @@ providing support for LSI Fusion-MPT 3 12Gb SCSI/SATA controllers. - A new zvol property volmode - and &man.sysctl.8; vfs.zfs.vol.mode has been - added to allow switching zvol between three different ways of - exposing it to a user: geom, + A new zvol property + volmode and &man.sysctl.8; + vfs.zfs.vol.mode has been added to allow + switching zvol between three different + ways of exposing it to a user: geom, dev and none. The - &man.mrsas.4; driver has been added, - providing support for LSI MegaRAID SAS controllers. The - &man.mfi.4; driver will attach to the controller, by default. - To enable &man.mrsas.4; add - hw.mfi.mrsas_enable=1 to - /boot/loader.conf, which turns off + &man.mrsas.4; driver has been added, providing support for + LSI MegaRAID SAS controllers. The &man.mfi.4; driver will + attach to the controller, by default. To enable + &man.mrsas.4; add hw.mfi.mrsas_enable=1 + to /boot/loader.conf, which turns off &man.mfi.4; device probing. - At this time, the &man.mfiutil.8; utility and - the &os; version of - MegaCLI and + At this time, the &man.mfiutil.8; utility and the &os; + version of MegaCLI and StorCli do not work with &man.mrsas.4;. - Fixed accounting of BIO_FLUSH operation - in &man.geom.8; GEOM_DISK class - - The &man.gstat.8; - utility now has a -o option, to - display "other" operatins (e.g. BIO_FLUSH). + Fixed accounting of + BIO_FLUSH operation in &man.geom.8; + GEOM_DISK class + + The &man.gstat.8; utility now has + a -o option, to display "other" operatins + (e.g. BIO_FLUSH). The &man.mfi.4; driver has been updated to include support for unmapped I/O. @@ -638,8 +642,9 @@ updated with various vendor-supplied bug fixes. Support for unmapped I/O has been added - to the &man.xen.4; blkfront driver. + sponsor="&citrix.rd;">Support for unmapped I/O has been + added to the &man.xen.4; blkfront + driver. The &man.geom.8; label class is now aware of @@ -654,15 +659,15 @@ it easier to resize the size of a mirror when all of its components have been replaced. - Support for MegaRAID Fury cards has been - added to the &man.mfi.4; driver. + Support for MegaRAID Fury cards has + been added to the &man.mfi.4; driver. The &man.aacraid.4; driver has been updated to version 3.2.5. - The GEOM_VINUM option - is now able to be built both directly into the kernel or as - a &man.kldload.8; loadable module. + The GEOM_VINUM + option is now able to be built both directly into the kernel + or as a &man.kldload.8; loadable module. The &man.geom.8; GEOM_PART class has been updated to @@ -689,33 +694,40 @@ recalculate the user-specified offset and size for alignment with the disk geometry. - Many improvements to the - CAM Target Layer (CTL): + Many improvements to + the CAM Target Layer (CTL): - Support for UNMAP, WRITE SAME, COMPARE AND WRITE, XCOPY - and some other SCSI commands was added to support VMWare VAAI - and Microsoft ODX storage acceleration. + Support for UNMAP, WRITE + SAME, COMPARE AND WRITE, + XCOPY and some other SCSI commands + was added to support VMWare VAAI and Microsoft ODX + storage acceleration. - READ/WRITE size limitations were removed - by supporting multiple data moves per command. + The + READ/WRITE size + limitations were removed by supporting multiple + data moves per command. Finer-grained per-LUN locking and - multiple worker threads for better SMP scapability. + multiple worker threads for better + SMP scapability. - Memory consumption reduced by several - times by disabling some never used functionality. + Memory consumption reduced by + several times by disabling some never used + functionality. The maximum number of - SCSI ports increased from 32 to 128 + SCSI ports increased from 32 to + 128 - Improved zvol integration for better - performance. + Improved zvol + integration for better performance. @@ -724,10 +736,10 @@ File Systems The - vfs.zfs.zio.use_uma &man.sysctl.8; has been - re-enabled. On multi-CPU machines with enough RAM, this can - easily double &man.zfs.8; performance or reduce CPU usage in - half. It was originally disabled due to memory and + vfs.zfs.zio.use_uma &man.sysctl.8; has + been re-enabled. On multi-CPU machines with enough RAM, + this can easily double &man.zfs.8; performance or reduce CPU + usage in half. It was originally disabled due to memory and KVA exhaustion problem reports, which should be resolved due to several change in the VM subsystem. @@ -1244,9 +1256,9 @@ (and snapshots of the various security branches) are supported using the &man.freebsd-update.8; utility. The binary upgrade procedure will update unmodified userland utilities, as well as - unmodified GENERIC kernel distributed as a part of an - official &os; release. The &man.freebsd-update.8; utility - requires that the host being upgraded have Internet + unmodified GENERIC kernel distributed as + a part of an official &os; release. The &man.freebsd-update.8; + utility requires that the host being upgraded have Internet connectivity. Source-based upgrades (those based on recompiling the &os; From gjb at FreeBSD.org Thu Aug 28 21:27:38 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Thu, 28 Aug 2014 21:27:37 +0000 (UTC) Subject: svn commit: r270770 - stable/10/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201408282127.s7SLRbbG002091@svn.freebsd.org> Author: gjb Date: Thu Aug 28 21:27:37 2014 New Revision: 270770 URL: http://svnweb.freebsd.org/changeset/base/270770 Log: Minor wording changes. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 21:25:30 2014 (r270769) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Aug 28 21:27:37 2014 (r270770) @@ -631,9 +631,10 @@ BIO_FLUSH operation in &man.geom.8; GEOM_DISK class - The &man.gstat.8; utility now has - a -o option, to display "other" operatins - (e.g. BIO_FLUSH). + The &man.gstat.8; utility now has an + -o option, to display + other operations, such as + BIO_FLUSH. The &man.mfi.4; driver has been updated to include support for unmapped I/O. From gjb at FreeBSD.org Fri Aug 29 01:20:32 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Fri, 29 Aug 2014 01:20:31 +0000 (UTC) Subject: svn commit: r270776 - in stable/10: gnu/usr.bin/grep usr.bin/host usr.bin/svn/svn Message-ID: <201408290120.s7T1KVTi012522@svn.freebsd.org> Author: gjb Date: Fri Aug 29 01:20:31 2014 New Revision: 270776 URL: http://svnweb.freebsd.org/changeset/base/270776 Log: MFC r270668, r270669, r270672: r270668: Add gnugrep.1 to CLEANFILES. r270669: Add host.1 to CLEANFILES. r270672: Add svnlite.1 to CLEANFILES. Sponsored by: The FreeBSD Foundation Modified: stable/10/gnu/usr.bin/grep/Makefile stable/10/usr.bin/host/Makefile stable/10/usr.bin/svn/svn/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/gnu/usr.bin/grep/Makefile ============================================================================== --- stable/10/gnu/usr.bin/grep/Makefile Fri Aug 29 00:33:31 2014 (r270775) +++ stable/10/gnu/usr.bin/grep/Makefile Fri Aug 29 01:20:31 2014 (r270776) @@ -12,6 +12,7 @@ PROG= gnugrep SRCS= closeout.c dfa.c error.c exclude.c grep.c grepmat.c hard-locale.c \ isdir.c kwset.c obstack.c quotearg.c savedir.c search.c xmalloc.c \ xstrtoumax.c +CLEANFILES+= gnugrep.1 CFLAGS+=-I${.CURDIR} -I${DESTDIR}/usr/include/gnu -DHAVE_CONFIG_H Modified: stable/10/usr.bin/host/Makefile ============================================================================== --- stable/10/usr.bin/host/Makefile Fri Aug 29 00:33:31 2014 (r270775) +++ stable/10/usr.bin/host/Makefile Fri Aug 29 01:20:31 2014 (r270776) @@ -8,6 +8,7 @@ LDNSHOSTDIR= ${.CURDIR}/../../contrib/ld PROG= host SRCS= ldns-host.c MAN= host.1 +CLEANFILES+= host.1 host.1: ldns-host.1 sed -e 's/ldns-//gI' <${.ALLSRC} >${.TARGET} || \ Modified: stable/10/usr.bin/svn/svn/Makefile ============================================================================== --- stable/10/usr.bin/svn/svn/Makefile Fri Aug 29 00:33:31 2014 (r270775) +++ stable/10/usr.bin/svn/svn/Makefile Fri Aug 29 01:20:31 2014 (r270776) @@ -51,6 +51,7 @@ DPADD= ${LIBSVN_CLIENT} ${LIBSVN_WC} ${L ${LIBBSDXML} ${LIBAPR} ${LIBSQLITE} ${LIBZ} ${LIBCRYPT} ${LIBMAGIC} \ ${LIBCRYPTO} ${LIBSSL} ${LIBPTHREAD} +CLEANFILES+= svnlite.1 .if(defined(ORGANIZATION) && !empty(ORGANIZATION)) DPSRCS+= freebsd-organization.h CLEANFILES+= freebsd-organization.h From gjb at FreeBSD.org Fri Aug 29 01:21:09 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Fri, 29 Aug 2014 01:21:09 +0000 (UTC) Subject: svn commit: r270777 - stable/9/gnu/usr.bin/grep Message-ID: <201408290121.s7T1L9oG013118@svn.freebsd.org> Author: gjb Date: Fri Aug 29 01:21:08 2014 New Revision: 270777 URL: http://svnweb.freebsd.org/changeset/base/270777 Log: MFC r270668: Add gnugrep.1 to CLEANFILES. Sponsored by: The FreeBSD Foundation Modified: stable/9/gnu/usr.bin/grep/Makefile Directory Properties: stable/9/gnu/usr.bin/ (props changed) Modified: stable/9/gnu/usr.bin/grep/Makefile ============================================================================== --- stable/9/gnu/usr.bin/grep/Makefile Fri Aug 29 01:20:31 2014 (r270776) +++ stable/9/gnu/usr.bin/grep/Makefile Fri Aug 29 01:21:08 2014 (r270777) @@ -12,6 +12,7 @@ PROG= gnugrep SRCS= closeout.c dfa.c error.c exclude.c grep.c grepmat.c hard-locale.c \ isdir.c kwset.c obstack.c quotearg.c savedir.c search.c xmalloc.c \ xstrtoumax.c +CLEANFILES+= gnugrep.1 CFLAGS+=-I${.CURDIR} -I${DESTDIR}/usr/include/gnu -DHAVE_CONFIG_H From gjb at FreeBSD.org Fri Aug 29 01:40:50 2014 From: gjb at FreeBSD.org (Glen Barber) Date: Fri, 29 Aug 2014 01:40:50 +0000 (UTC) Subject: svn commit: r270778 - stable/10/sys/dev/usb Message-ID: <201408290140.s7T1eo2e024673@svn.freebsd.org> Author: gjb Date: Fri Aug 29 01:40:49 2014 New Revision: 270778 URL: http://svnweb.freebsd.org/changeset/base/270778 Log: MFC r269608: Add device ID for the Chicony USB 2.0 HD UVC Webcam found on the Asus X550LA. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/usb/usbdevs Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/usbdevs ============================================================================== --- stable/10/sys/dev/usb/usbdevs Fri Aug 29 01:21:08 2014 (r270777) +++ stable/10/sys/dev/usb/usbdevs Fri Aug 29 01:40:49 2014 (r270778) @@ -1380,6 +1380,7 @@ product CHIC CYPRESS 0x0003 Cypress USB product CHICONY KB8933 0x0001 KB-8933 keyboard product CHICONY KU0325 0x0116 KU-0325 keyboard product CHICONY CNF7129 0xb071 Notebook Web Camera +product CHICONY HDUVCCAM 0xb40a HD UVC WebCam product CHICONY RTL8188CUS_1 0xaff7 RTL8188CUS product CHICONY RTL8188CUS_2 0xaff8 RTL8188CUS product CHICONY RTL8188CUS_3 0xaff9 RTL8188CUS From ngie at FreeBSD.org Fri Aug 29 02:21:03 2014 From: ngie at FreeBSD.org (Garrett Cooper) Date: Fri, 29 Aug 2014 02:21:02 +0000 (UTC) Subject: svn commit: r270779 - in stable/10: bin/date/tests tools/build/mk Message-ID: <201408290221.s7T2L2MO040748@svn.freebsd.org> Author: ngie Date: Fri Aug 29 02:21:02 2014 New Revision: 270779 URL: http://svnweb.freebsd.org/changeset/base/270779 Log: MFC r269903: Port date/bin/tests to ATF Phabric: D545 Approved by: jmmv (mentor) Submitted by: keramida (earlier version) Sponsored by: Google, Inc Sponsored by: EMC / Isilon Storage Division Added: stable/10/bin/date/tests/format_string_test.sh - copied unchanged from r269903, head/bin/date/tests/format_string_test.sh Deleted: stable/10/bin/date/tests/legacy_test.sh Modified: stable/10/bin/date/tests/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/date/tests/Makefile ============================================================================== --- stable/10/bin/date/tests/Makefile Fri Aug 29 01:40:49 2014 (r270778) +++ stable/10/bin/date/tests/Makefile Fri Aug 29 02:21:02 2014 (r270779) @@ -4,6 +4,6 @@ TESTSDIR= ${TESTSBASE}/bin/date -TAP_TESTS_SH= legacy_test +ATF_TESTS_SH= format_string_test .include Copied: stable/10/bin/date/tests/format_string_test.sh (from r269903, head/bin/date/tests/format_string_test.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/bin/date/tests/format_string_test.sh Fri Aug 29 02:21:02 2014 (r270779, copy of r269903, head/bin/date/tests/format_string_test.sh) @@ -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: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Fri Aug 29 01:40:49 2014 (r270778) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Fri Aug 29 02:21:02 2014 (r270779) @@ -4071,6 +4071,7 @@ OLD_FILES+=usr/share/man/man8/telnetd.8. .if ${MK_TESTS} == yes OLD_LIBS+=usr/lib/libatf-c++.so.1 +OLD_FILES+=usr/tests/bin/date/legacy_test OLD_FILES+=usr/tests/lib/atf/libatf-c/test_helpers_test OLD_FILES+=usr/tests/lib/atf/test-programs/fork_test OLD_FILES+=usr/tests/lib/atf/libatf-c++/application_test From kib at FreeBSD.org Fri Aug 29 08:33:33 2014 From: kib at FreeBSD.org (Konstantin Belousov) Date: Fri, 29 Aug 2014 08:33:33 +0000 (UTC) Subject: svn commit: r270787 - stable/10/sys/kern Message-ID: <201408290833.s7T8XX65013499@svn.freebsd.org> Author: kib Date: Fri Aug 29 08:33:32 2014 New Revision: 270787 URL: http://svnweb.freebsd.org/changeset/base/270787 Log: MFC r270320: Check the validity of struct sigaction sa_flags value, reject unknown flags. Modified: stable/10/sys/kern/kern_sig.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_sig.c ============================================================================== --- stable/10/sys/kern/kern_sig.c Fri Aug 29 08:20:03 2014 (r270786) +++ stable/10/sys/kern/kern_sig.c Fri Aug 29 08:33:32 2014 (r270787) @@ -644,6 +644,10 @@ kern_sigaction(td, sig, act, oact, flags if (!_SIG_VALID(sig)) return (EINVAL); + if (act != NULL && (act->sa_flags & ~(SA_ONSTACK | SA_RESTART | + SA_RESETHAND | SA_NOCLDSTOP | SA_NODEFER | SA_NOCLDWAIT | + SA_SIGINFO)) != 0) + return (EINVAL); PROC_LOCK(p); ps = p->p_sigacts; From kib at FreeBSD.org Fri Aug 29 08:38:34 2014 From: kib at FreeBSD.org (Konstantin Belousov) Date: Fri, 29 Aug 2014 08:38:34 +0000 (UTC) Subject: svn commit: r270788 - stable/10/sys/kern Message-ID: <201408290838.s7T8cYbx014214@svn.freebsd.org> Author: kib Date: Fri Aug 29 08:38:34 2014 New Revision: 270788 URL: http://svnweb.freebsd.org/changeset/base/270788 Log: MFC r270321: Ensure that sigaction flags for signal, which disposition is reset to ignored or default, are not leaking. MFC r270504: Revert the handling of all siginfo sa_flags except SA_SIGINFO to the pre-r270321 state. Modified: stable/10/sys/kern/kern_sig.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_sig.c ============================================================================== --- stable/10/sys/kern/kern_sig.c Fri Aug 29 08:33:32 2014 (r270787) +++ stable/10/sys/kern/kern_sig.c Fri Aug 29 08:38:34 2014 (r270788) @@ -626,6 +626,20 @@ sig_ffs(sigset_t *set) return (0); } +static bool +sigact_flag_test(struct sigaction *act, int flag) +{ + + /* + * SA_SIGINFO is reset when signal disposition is set to + * ignore or default. Other flags are kept according to user + * settings. + */ + return ((act->sa_flags & flag) != 0 && (flag != SA_SIGINFO || + ((__sighandler_t *)act->sa_sigaction != SIG_IGN && + (__sighandler_t *)act->sa_sigaction != SIG_DFL))); +} + /* * kern_sigaction * sigaction @@ -688,7 +702,7 @@ kern_sigaction(td, sig, act, oact, flags ps->ps_catchmask[_SIG_IDX(sig)] = act->sa_mask; SIG_CANTMASK(ps->ps_catchmask[_SIG_IDX(sig)]); - if (act->sa_flags & SA_SIGINFO) { + if (sigact_flag_test(act, SA_SIGINFO)) { ps->ps_sigact[_SIG_IDX(sig)] = (__sighandler_t *)act->sa_sigaction; SIGADDSET(ps->ps_siginfo, sig); @@ -696,19 +710,19 @@ kern_sigaction(td, sig, act, oact, flags ps->ps_sigact[_SIG_IDX(sig)] = act->sa_handler; SIGDELSET(ps->ps_siginfo, sig); } - if (!(act->sa_flags & SA_RESTART)) + if (!sigact_flag_test(act, SA_RESTART)) SIGADDSET(ps->ps_sigintr, sig); else SIGDELSET(ps->ps_sigintr, sig); - if (act->sa_flags & SA_ONSTACK) + if (sigact_flag_test(act, SA_ONSTACK)) SIGADDSET(ps->ps_sigonstack, sig); else SIGDELSET(ps->ps_sigonstack, sig); - if (act->sa_flags & SA_RESETHAND) + if (sigact_flag_test(act, SA_RESETHAND)) SIGADDSET(ps->ps_sigreset, sig); else SIGDELSET(ps->ps_sigreset, sig); - if (act->sa_flags & SA_NODEFER) + if (sigact_flag_test(act, SA_NODEFER)) SIGADDSET(ps->ps_signodefer, sig); else SIGDELSET(ps->ps_signodefer, sig); @@ -909,14 +923,31 @@ siginit(p) PROC_LOCK(p); ps = p->p_sigacts; mtx_lock(&ps->ps_mtx); - for (i = 1; i <= NSIG; i++) - if (sigprop(i) & SA_IGNORE && i != SIGCONT) + for (i = 1; i <= NSIG; i++) { + if (sigprop(i) & SA_IGNORE && i != SIGCONT) { SIGADDSET(ps->ps_sigignore, i); + } + } mtx_unlock(&ps->ps_mtx); PROC_UNLOCK(p); } /* + * Reset specified signal to the default disposition. + */ +static void +sigdflt(struct sigacts *ps, int sig) +{ + + mtx_assert(&ps->ps_mtx, MA_OWNED); + SIGDELSET(ps->ps_sigcatch, sig); + if ((sigprop(sig) & SA_IGNORE) != 0 && sig != SIGCONT) + SIGADDSET(ps->ps_sigignore, sig); + ps->ps_sigact[_SIG_IDX(sig)] = SIG_DFL; + SIGDELSET(ps->ps_siginfo, sig); +} + +/* * Reset signals for an exec of the specified process. */ void @@ -937,13 +968,9 @@ execsigs(struct proc *p) mtx_lock(&ps->ps_mtx); while (SIGNOTEMPTY(ps->ps_sigcatch)) { sig = sig_ffs(&ps->ps_sigcatch); - SIGDELSET(ps->ps_sigcatch, sig); - if (sigprop(sig) & SA_IGNORE) { - if (sig != SIGCONT) - SIGADDSET(ps->ps_sigignore, sig); + sigdflt(ps, sig); + if ((sigprop(sig) & SA_IGNORE) != 0) sigqueue_delete_proc(p, sig); - } - ps->ps_sigact[_SIG_IDX(sig)] = SIG_DFL; } /* * Reset stack state to the user stack. @@ -1901,16 +1928,8 @@ trapsignal(struct thread *td, ksiginfo_t SIGADDSET(mask, sig); kern_sigprocmask(td, SIG_BLOCK, &mask, NULL, SIGPROCMASK_PROC_LOCKED | SIGPROCMASK_PS_LOCKED); - if (SIGISMEMBER(ps->ps_sigreset, sig)) { - /* - * See kern_sigaction() for origin of this code. - */ - SIGDELSET(ps->ps_sigcatch, sig); - if (sig != SIGCONT && - sigprop(sig) & SA_IGNORE) - SIGADDSET(ps->ps_sigignore, sig); - ps->ps_sigact[_SIG_IDX(sig)] = SIG_DFL; - } + if (SIGISMEMBER(ps->ps_sigreset, sig)) + sigdflt(ps, sig); mtx_unlock(&ps->ps_mtx); } else { /* @@ -2853,16 +2872,8 @@ postsig(sig) kern_sigprocmask(td, SIG_BLOCK, &mask, NULL, SIGPROCMASK_PROC_LOCKED | SIGPROCMASK_PS_LOCKED); - if (SIGISMEMBER(ps->ps_sigreset, sig)) { - /* - * See kern_sigaction() for origin of this code. - */ - SIGDELSET(ps->ps_sigcatch, sig); - if (sig != SIGCONT && - sigprop(sig) & SA_IGNORE) - SIGADDSET(ps->ps_sigignore, sig); - ps->ps_sigact[_SIG_IDX(sig)] = SIG_DFL; - } + if (SIGISMEMBER(ps->ps_sigreset, sig)) + sigdflt(ps, sig); td->td_ru.ru_nsignals++; if (p->p_sig == sig) { p->p_code = 0; From kib at FreeBSD.org Fri Aug 29 08:42:21 2014 From: kib at FreeBSD.org (Konstantin Belousov) Date: Fri, 29 Aug 2014 08:42:21 +0000 (UTC) Subject: svn commit: r270789 - stable/10/sys/kern Message-ID: <201408290842.s7T8gLCx018037@svn.freebsd.org> Author: kib Date: Fri Aug 29 08:42:20 2014 New Revision: 270789 URL: http://svnweb.freebsd.org/changeset/base/270789 Log: MFC r270345: In do_lock_pi(), do not override error from umtxq_sleep_pi() when doing suspend check. Modified: stable/10/sys/kern/kern_umtx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_umtx.c ============================================================================== --- stable/10/sys/kern/kern_umtx.c Fri Aug 29 08:38:34 2014 (r270788) +++ stable/10/sys/kern/kern_umtx.c Fri Aug 29 08:42:20 2014 (r270789) @@ -2071,10 +2071,12 @@ do_lock_pi(struct thread *td, struct umu * and we need to retry or we lost a race to the thread * unlocking the umtx. */ - if (old == owner) + if (old == owner) { error = umtxq_sleep_pi(uq, pi, owner & ~UMUTEX_CONTESTED, "umtxpi", timeout == NULL ? NULL : &timo); - else { + if (error != 0) + continue; + } else { umtxq_unbusy(&uq->uq_key); umtxq_unlock(&uq->uq_key); } From delphij at FreeBSD.org Fri Aug 29 13:03:14 2014 From: delphij at FreeBSD.org (Xin LI) Date: Fri, 29 Aug 2014 13:03:13 +0000 (UTC) Subject: svn commit: r270809 - in stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys Message-ID: <201408291303.s7TD3DAg043804@svn.freebsd.org> Author: delphij Date: Fri Aug 29 13:03:13 2014 New Revision: 270809 URL: http://svnweb.freebsd.org/changeset/base/270809 Log: MFC r270383: MFV r270198: Instead of using timestamp in the AVL, use the memory address when comparing. Illumos issue: 5095 panic when adding a duplicate dbuf to dn_dbufs Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Fri Aug 29 12:48:38 2014 (r270808) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Fri Aug 29 13:03:13 2014 (r270809) @@ -70,12 +70,6 @@ dbuf_cons(void *vdb, void *unused, int k cv_init(&db->db_changed, NULL, CV_DEFAULT, NULL); refcount_create(&db->db_holds); -#if defined(illumos) || !defined(_KERNEL) - db->db_creation = gethrtime(); -#else - db->db_creation = cpu_ticks() ^ ((uint64_t)CPU_SEQID << 48); -#endif - return (0); } @@ -823,7 +817,7 @@ dbuf_free_range(dnode_t *dn, uint64_t st db_search.db_level = 0; db_search.db_blkid = start_blkid; - db_search.db_creation = 0; + db_search.db_state = DB_SEARCH; mutex_enter(&dn->dn_dbufs_mtx); if (start_blkid >= dn->dn_unlisted_l0_blkid) { Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Fri Aug 29 12:48:38 2014 (r270808) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Fri Aug 29 13:03:13 2014 (r270809) @@ -69,33 +69,35 @@ dbuf_compare(const void *x1, const void if (d1->db_level < d2->db_level) { return (-1); - } else if (d1->db_level > d2->db_level) { + } + if (d1->db_level > d2->db_level) { return (1); } if (d1->db_blkid < d2->db_blkid) { return (-1); - } else if (d1->db_blkid > d2->db_blkid) { + } + if (d1->db_blkid > d2->db_blkid) { return (1); } - /* - * If a dbuf is being evicted while dn_dbufs_mutex is not held, we set - * the db_state to DB_EVICTING but do not remove it from dn_dbufs. If - * another thread creates a dbuf of the same blkid before the dbuf is - * removed from dn_dbufs, we can reach a state where there are two - * dbufs of the same blkid and level in db_dbufs. To maintain the avl - * invariant that there cannot be duplicate items, we distinguish - * between these two dbufs based on the time they were created. - */ - if (d1->db_creation < d2->db_creation) { + if (d1->db_state < d2->db_state) { return (-1); - } else if (d1->db_creation > d2->db_creation) { + } + if (d1->db_state > d2->db_state) { return (1); - } else { - ASSERT3P(d1, ==, d2); - return (0); } + + ASSERT3S(d1->db_state, !=, DB_SEARCH); + ASSERT3S(d2->db_state, !=, DB_SEARCH); + + if ((uintptr_t)d1 < (uintptr_t)d2) { + return (-1); + } + if ((uintptr_t)d1 > (uintptr_t)d2) { + return (1); + } + return (0); } /* ARGSUSED */ Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h Fri Aug 29 12:48:38 2014 (r270808) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h Fri Aug 29 13:03:13 2014 (r270809) @@ -66,8 +66,13 @@ extern "C" { * | | * | | * +--------> NOFILL -------+ + * + * DB_SEARCH is an invalid state for a dbuf. It is used by dbuf_free_range + * to find all dbufs in a range of a dnode and must be less than any other + * dbuf_states_t (see comment on dn_dbufs in dnode.h). */ typedef enum dbuf_states { + DB_SEARCH = -1, DB_UNCACHED, DB_FILL, DB_NOFILL, @@ -213,9 +218,6 @@ typedef struct dmu_buf_impl { /* pointer to most recent dirty record for this buffer */ dbuf_dirty_record_t *db_last_dirty; - /* Creation time of dbuf (see comment in dbuf_compare). */ - hrtime_t db_creation; - /* * Our link on the owner dnodes's dn_dbufs list. * Protected by its dn_dbufs_mtx. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Fri Aug 29 12:48:38 2014 (r270808) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Fri Aug 29 13:03:13 2014 (r270809) @@ -211,7 +211,18 @@ typedef struct dnode { refcount_t dn_holds; kmutex_t dn_dbufs_mtx; - avl_tree_t dn_dbufs; /* descendent dbufs */ + /* + * Descendent dbufs, ordered by dbuf_compare. Note that dn_dbufs + * can contain multiple dbufs of the same (level, blkid) when a + * dbuf is marked DB_EVICTING without being removed from + * dn_dbufs. To maintain the avl invariant that there cannot be + * duplicate entries, we order the dbufs by an arbitrary value - + * their address in memory. This means that dn_dbufs cannot be used to + * directly look up a dbuf. Instead, callers must use avl_walk, have + * a reference to the dbuf, or look up a non-existant node with + * db_state = DB_SEARCH (see dbuf_free_range for an example). + */ + avl_tree_t dn_dbufs; /* protected by dn_struct_rwlock */ struct dmu_buf_impl *dn_bonus; /* bonus buffer dbuf */ From delphij at FreeBSD.org Fri Aug 29 13:06:31 2014 From: delphij at FreeBSD.org (Xin LI) Date: Fri, 29 Aug 2014 13:06:31 +0000 (UTC) Subject: svn commit: r270810 - stable/10/sys/dev/hptnr Message-ID: <201408291306.s7TD6VaD044316@svn.freebsd.org> Author: delphij Date: Fri Aug 29 13:06:30 2014 New Revision: 270810 URL: http://svnweb.freebsd.org/changeset/base/270810 Log: MFC r270384: Update hptnr(4) driver to version 1.0.1 supplied by the vendor. v1.0.1 2014-8-19 * Do not retry the command and reset the disk when failed to enable or disable spin up feature. * Fix up a bug that disk failed to probe if driver failed to access the 10th LBA. * Fix a bug that request timeout but it has been completed in certain cases. * Support smartmontool for R750. Many thanks to HighPoint for continued support of FreeBSD! Modified: stable/10/sys/dev/hptnr/README stable/10/sys/dev/hptnr/amd64-elf.hptnr_lib.o.uu stable/10/sys/dev/hptnr/hptnr_config.c stable/10/sys/dev/hptnr/hptnr_os_bsd.c stable/10/sys/dev/hptnr/hptnr_osm_bsd.c stable/10/sys/dev/hptnr/i386-elf.hptnr_lib.o.uu Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hptnr/README ============================================================================== --- stable/10/sys/dev/hptnr/README Fri Aug 29 13:03:13 2014 (r270809) +++ stable/10/sys/dev/hptnr/README Fri Aug 29 13:06:30 2014 (r270810) @@ -1,10 +1,19 @@ Rocket Controller Driver for FreeBSD -Copyright (C) 2013 HighPoint Technologies, Inc. All rights reserved. +Copyright (C) 2014 HighPoint Technologies, Inc. All rights reserved. ############################################################################# Revision History: + v1.0.1 2014-8-19 + * Do not retry the command and reset the disk when failed to enable or + disable spin up feature. + * Fix up a bug that disk failed to probe if driver failed to access the + 10th LBA. + * Fix a bug that request timeout but it has been completed in certain + cases. + * Support smartmontool for R750. + v1.0 2013-7-3 - First source code release + *First source code release ############################################################################# @@ -40,7 +49,7 @@ Revision History: 2) Extract the driver files under the kernel source tree: # cd /usr/src/sys/ - # tar xvzf /your/path/to/hptnr-freebsd-src-v1.0-130701.tgz + # tar xvzf /your/path/to/hptnr_freebsd_src_v1.0.1_14_08_19.tgz 3) Update the kernel configuration file to include the HighPoint source. Assume the configure file is GENERIC, and new kernel configure file is Modified: stable/10/sys/dev/hptnr/amd64-elf.hptnr_lib.o.uu ============================================================================== --- stable/10/sys/dev/hptnr/amd64-elf.hptnr_lib.o.uu Fri Aug 29 13:03:13 2014 (r270809) +++ stable/10/sys/dev/hptnr/amd64-elf.hptnr_lib.o.uu Fri Aug 29 13:06:30 2014 (r270810) @@ -1,5 +1,5 @@ begin 644 hptnr_lib.o -M?T5,1@(!`0D```````````$`/@`!`````````````````````````##R!0`` +M?T5,1@(!`0D```````````$`/@`!`````````````````````````+`#!@`` M`````````$```````$``$``-`(G0Q@<(QD`P2`G"#[9'04@)P@^V1SQ(P>`H2`G"#[9'/4C MP@^V1S](P>`02`G"#[9'0$C!X`A(B=%("<$/ME="P>(8#[9'0\'@$`G"#[9' M10G"#[9'1,'@"`G02(F/B````(F'D````&:#3R(!\\-F9F:0NO____]FA?9T M,4B)^;\`````NO____])Q\``````9I`/M@$QT`^VP,'J"$$S%("#QP%(@\$! -M9CGW=>6)T,-FD%-(@^Q at 2(G[1`^V3SM$#[9'.@^V3SD/ME)@E0!``##9F9FD&9FD&9FD&9FD(GQ2(L' -MBY`$`0``B14`````#[='/&8]@&1T#&8]@)%T!F8]@)1U$0^VR8/!"+@!```` -MT^`)PNL00`^VSH/!#+@!````T^`)PDB+!XF0!`$``,-F9F:09F9FD&9FD&9F -MD(GQ2(L'BY`$`0``B14`````#[='/&8]@&1T#&8]@)%T!F8]@)1U$0^VR8/! -M"+C^____T\`APNL00`^VSH/!#+C^____T\`APDB+!XF0!`$``,-F9F:09F9F -MD&9FD&9FD(GQ0(#^_W1O0(#^'W(8#[9%`L'@$`G"#[9%``G"#[9%`<'@"`G"B1-!QP0D$`$``+\0 -M)P``Z``````/ME4'P>(8#[9%!L'@$`G"#[9%!`G"#[9%!<'@"`G"B1-(BUPD -M"$B+;"003(MD)!A,BVPD($B#Q"C#2(/L&$B)7"0(3(ED)!!)B?Q`#[;>B=[H -M`````+\0)P``Z`````")WDR)Y^@`````2(M<)`A,BV0D$$B#Q!C#D$%7059! -M54%455-(@^Q828G_B%0D5TB+%X!_/@`/A#P"``!!O`````!!O>#___]!OO#_ -M__]`#[;&2(E$)$A(C8*``0``2(E$)$!(C8J$`0``2(E,)#A(C8*@`0``2(E$ -M)#!(C8JD`0``2(E,)"A(C8)0`@``2(E$)"!(C8I4`@``2(E,)!A(C8+@`0`` -M2(E$)!!(@<+0`0``2(E4)`AF9I!(BT0D2$2)X4C3^*@!#X2-`0``1(GE at _T# -M=A=$B>I(`U0D*(L"B04`````@^#^B0+K&XT4[0````")TD@#5"0XBP*)!0`` -M``"#X/Z)`K\0)P``Z`````"`?"17`'1R at _T#=A=$B?)(`U0D$(L"B04````` -M@\@"B0+K&XT4K0````")TD@#5"0(BP*)!0````"#R`*)`D2)\$B+3"002`'! -MC02M`````(G`2(M4)`A(`<*#_0-V"HL!B04`````ZPB+`HD%`````*@"='3K -MXV:0 at _T#=B]$B>M(BT0D($@!V,<``````+\0)P``Z`````!(`UPD&(L#B04` -M````@\@!B0/K08T<[0````")VTB+1"0 at 2`'8QP``````OQ`G``#H`````$@# -M7"08BP.)!0````"#R`&)`^LW9F9FD&9FD(/]`W8K1(GJ2(M$)#!(`=#'``$` -M``!(`U0D*(L"B04`````@\@!B0+K-F9FD&9FD(T$[0````")P$B+5"1`2`'" -MQP(!````2`-$)#B+$(D5`````(/*`8D09F9FD&9FD$&-5"0!28/$`4&#Q0A! -M@\8$00^V1SXYT`^'0O[__TB#Q%A;74%<05U!7D%?PV9FD%532(/L"(G12(LO -M at _X#=B"-!/7 at ____BC02U`````(G`2(V4!=`!``"+`HD%`````(/( -M`HD"C12U`````(U"\(G`2(V,!>`!``")TDB-E!70`0``@_X#=@J+`8D%```` -M`.L(BP*)!0````"H`G1UZ^.#_ at -V.(T<]>#___^)VTB-A"M0`@``QP`````` -MOQ`G``#H`````$B-G"M4`@``BP.)!0````"#R`&)`^LVC1SU`````(G;2(V$ -M*U`"``#'``````"_$"<``.@`````2(V<*U0"``"+`XD%`````(/(`8D#2(/$ -M"%M=PY"0D)"0D$B)^4B+/P^W@;`2``"#P`%FB8&P$@``9CN!M!(``'()9L>! -ML!(`````#[>!L!(``$C!X`)(`X%H$0``BQ:)$`^W@;`2``")ARP!``##9F:0 -M08G0N`````#&!`@`2(/``4B#^`1U\HGR9H'B_P\/MP%F)0#P"=!FB0$/ME<- -MP>(,BP$E_P_P_PG0B0$/MD<*@^`"2(/X`1G2@^("@\(!P>(%#[9!`X/@'PG0 -M@\@0@^#WB$$#]D<*`7071(G"@^)_P>($#[=!`F8E#_@)T&:)00+SPV9F9I!F -M9F:09F:09F:0N`````#&!#``2(/``4B#^`UU\@^V1SF(!@^V1SJ(1@$/MD<[ -MB$8"#[9'/(A&`P^V1SV(1 at 0/MD<^B$8%#[9'/XA&!O:'E@````1T(P^V1T"( -M1@@/MD=!B$8)#[9'0HA&"@^V1T.(1 at L/MD=$B$8,N`$```##9F9FD&9F9I!F -M9I"Z`````$&Z`````$&Y_____^M2`=)$B<#3^*@!=!+WP@````%U&H'R=R?; -M`.L29I")T#5W)]L`]\(````!#T70@^D!1#G)=@(B$@%#[?`C02%``,``(F"<`$``$B+%P^W3C*#X1^X`0`` -M`$C3X(F"=`$``+H`````Z`````!(@\0(PY!!5T%6055!5%532(/L"$B)_4F) -M]H!_0P!T);D`````]D8-`70.ZQA!#[9C3^*@!=0R#P0$/MD5#9CG(=^A) -MBT9`2(7`=!Q(C;"0````2(M]*.@`````28MV0$B)[^@`````28U&8$DY1F`/ -MA%P!``!)B<=,B?_H`````$B)PTB#>$``#X0I`0``@+B#``````^$H@```&:# -M?6@`#X27````0;T`````0;P`````D$B+A;`)``!,`>!(BS!(A?9T8P^W1B!F -M.T,X=5EF/84`=U,/M\"`O`5@"```_W1&2(M5``^W1C)FP>@%#[?`C02%``,` -M`(F"<`$``$B+50`/MTXR@^$?N`$```!(T^")@G0!``#&1B0AN@````!(B>_H -M`````$&#Q0%)@\0(#[=%:$0YZ`^/=O___TB+0T!(QT!@`````/9#3`1U&4B) -M[^@`````2(MS0+H!````2(GOZ`````!(BT-`#[90`@^V<`%(Q\<`````N``` -M``#H`````$B+4T!(B[7P"```OP$```#H`````$B+4T!(B[7P"```OP8```#H -M`````$C'0T``````08!N#@%(B=Y(B>_H`````$TY?F`/A:?^__])QT9````` -M`$B+10"+B%@!``")#0````"%R70*2(M%`(F(6`$``$B#Q`A;74%<05U!7D%? -MPV9F9I!F9I!F9I!F9I!(@^P(3(L'00^V<$-`A/9T-4F- at +@2``"Y`````$@Y -M^'4:ZR(/ML%(C11`2(T4D$F-E-"X$@``2#GZ=`^#P0%`./%UX.L%N0`````/ -MML%(C11`2(T4D$B-!-4`````28NT`,`2``!(A?9T??9&"@)T=TF-A`"X$@`` -M2#E&('5I#[9&6(3`=`B#P`&(1ECK64B+5DA(@^HX2(U.2$B-0CA(.A``=2SK"F9FD$B#>A``=2#&1E@!#[:*NP```$F+N+`0``!)Q\``````Z``` -M``#K$4B+4CA(@^HX2(U".$@YR'7(2(/$",-F9I!(@^PH2(E<)`A(B6PD$$R) -M9"083(EL)"!(B?M(B?5(BT9P3(MH*`^W5B!F@?J%`'=T#[?"#[:$!V`(```\ -M_W1E9H/Z?W<<#[;`2(N7.`D``$AIP)@!``!(BT004`^V0`CK2&:!^H$`=QP/ -MML!(BY>("0``2&G`R`\``$B+1!`(#[9`".LE#[;`2(N78`D``$B-!,!(P>`% -M2(N$$(@````/MD`(ZP6X_P```$B81`^VI`/F"```2(MU>$B%]G0(2(G?Z``` -M``!(B>Y(B=_H`````$$/ML1(C3R`2(T\N$B-O/O``0``3(GN0?^5H````$B+ -M7"0(2(ML)!!,BV0D&$R+;"0 at 2(/$*,-F9F:09F9FD$%455-(B?5(B=-F at 7XX -MX0%U$0^V1CJ#Z!%!O``````\`78O2(L72(NZ.`D```^W12"^:)8!`&8]A0!W -M$@^WP`^VA`)@"```2&GPF`$``$R-)#?&0P0%@&,%_H`CW[@`````9H%]..$! -M=18/MD4Z@^@!/`$/EL`/ML!F9F:09F:0P>`'#[83@^)_"<*($P^VA98```"# +M9CGW=>6)T,-FD$B#[&A$#[9/.T0/MD)^ +M__[_B9$$`0``)7[_\O](BU<(B0)(BU<(B4(,2(M7"(E"$$B+5PB)0A1(BU<( +MB4(82(M7"(E"!$B+!XN`5`$``(D%`````"7^`/__2(L7B8)4`0``PV9F9I!F +M9I!F9I!F9I")\4B+!XN0!`$``(D5``````^W1SQF/8!D=`QF/8"1=`9F/8"4 +M=1$/MLF#P0BX`0```-/@"<+K$$`/MLZ#P0RX`0```-/@"<)(BP>)D`0!``## +M9F9FD&9F9I!F9I!F9I")\4B+!XN0!`$``(D5``````^W1SQF/8!D=`QF/8"1 +M=`9F/8"4=1$/MLF#P0BX_O___]/`(<+K$$`/MLZ#P0RX_O___]/`(<)(BP>) +MD`0!``##9F9FD&9F9I!F9I!F9I")\4"`_O]T;T"`_A]W,HNW&`$``+H!```` +MT^*)T/?0(?")AQ@!``"+AU@!``")!0`````AT'1`B8=8`0``PV:0B[<<`0`` +M#[;!@^@@N@$```")P=/BB=#WT"'PB8<<`0``BX=@`0``B04`````(=!T!HF' +M8`$``//#9F9FD&9FD$B#["A(B5PD"$B);"003(ED)!A,B6PD($B)U8GP3(LO +M0(#^`P^&B0```$B-',4`````@>/X!P``38VD'0`"``!!QP0D#`$``+\0)P`` +MZ`````!)C9P=!`(```^V50/!XA@/MD4"P>`0"<(/MD4`"<(/MD4!P>`("<*) +M$T''!"00`0``OQ`G``#H``````^V50?!XA@/MD4&P>`0"<(/MD4$"<(/MD4% +MP>`("<*)$^F$````2(TZ`````"_$"<``.@`````B=Y,B>?H`````$B+7"0(3(MD +M)!!(@\08PY!!5T%6055!5%532(/L6$F)_XA4)%=(BQ>`?SX`#X0\`@``0;P` +M````0;W at ____0;[P____0`^VQDB)1"1(2(V"@`$``$B)1"1`2(V*A`$``$B) +M3"0X2(V"H`$``$B)1"0P2(V*I`$``$B)3"0H2(V"4`(``$B)1"0 at 2(V*5`(` +M`$B)3"082(V"X`$``$B)1"002('"T`$``$B)5"0(9F:02(M$)$A$B>%(T_BH +M`0^$C0$``$2)Y8/]`W871(GJ2`-4)"B+`HD%`````(/@_HD"ZQN-%.T````` +MB=)(`U0D.(L"B04`````@^#^B0*_$"<``.@`````@'PD5P!TOC at _X#=CB-'/7 at ____B=M( +MC80K4`(``,<``````+\0)P``Z`````!(C9PK5`(``(L#B04`````@\@!B0/K +M-HT<]0````")VTB-A"M0`@``QP``````OQ`G``#H`````$B-G"M4`@``BP.) +M!0````"#R`&)`TB#Q`A;7<.0D)"0D)!(B?E(BS\/MX&P$@``@\`!9HF!L!(` +M`&8[@;02``!R"6;'@;`2``````^W@;`2``!(P>`"2`.!:!$``(L6B1`/MX&P +M$@``B8@0B`>)T,'H"(A'`8A7`L-%#[8$,KD'````ZZ)F9F:09F9F +MD&9F9I!F9I!(BX<($0``BQ"+4`2+4`B+0`R)!0````##9F9FD&9FD$B#[`A( +MBX:(````1`^V1T-%A,!T(@^V4`VY`````/;"`70,ZQ)(B=!(T_BH`74(@\$! +M1#C!=>[&1D(,Z`````!(@\0(PV9F9I!F9F:09F:02(/L"$B)^$B+/V;'0$X! +M`,9`0AU(B<;H`````$B#Q`C#9F9FD&9F9I!F9F:09F:02(/L"$B+/P^W]DC! +MY at -(`[>P"0``2(LV2(7V=#U(BQ@%#[?`C02%``,``(F"<`$``$B+$P^W3C*#X1^X`0```$C3X(F"=`$``,9& +M)"&Z`````$B)W^@`````08/%`4F#Q`@/MT-H1#GH#X]X____2(M%0$C'0&`` +M````]D5,!'492(G?Z`````!(BW5`N@$```!(B=_H`````$B+54`/MH+,```` +MC02`#[92`@'02)@/MH@`````#[93.@^VY(B=_H`````$TY?F`/A9#^__])QT9``````$B+`XN(6`$` +M`(D-`````(7)=`E(BP.)B%@!``!(@\0(6UU!7$%=05Y!7\-F9F:09F9FD$B# +M[`A,BP=!#[9P0T"$]G0U28V`N!(``+D`````2#GX=1KK(@^VP4B-%$!(C120 +M28V4T+ at 2``!(.?IT#X/!`4`X\77 at ZP6Y``````^VP4B-%$!(C1202(T$U0`` +M``!)B[0`R!(``$B%]G1]]D8*`G1W28V$`+ at 2``!(.48@=6D/MD98A,!T"(/` +M`8A&6.M92(M62$B#ZCA(C4Y(2(U".$@YR'1$2(-Z$`!U+.L*9F:02(-Z$`!U +M(,9&6`$/MHJ[````28NXL!```$G'P`````#H`````.L12(M2.$B#ZCA(C4(X +M2#G(=`%2(M$"%`/MD`(ZTYF@?F!`'<<#[;`2(N7B`D``$AI +MP,@/``!(BT00"`^V0`CK*P^VP$B+EV`)``!(C03`2,'@!4B+A!"(````#[9` +M".L+9F:09F:0N/\```!(F$0/MJ0#Y@@``$B+=7A(A?9T"$B)W^@`````2(GN +M2(G?Z`````!!#[;$2(T\@$B-/+A(C;S[P`$``$R)[D'_E:````!(BUPD"$B+ +M;"003(MD)!A,BVPD($B#Q"C#9F9FD&9FD&9FD&9FD$%455-(B?5(B=-F at 7XX +MX0%U$0^V1CJ#Z!%!O``````\`78T2(LW2(N^.`D```^W12"Z8)X!`&8]A0!W +M%P^WP`^VA`9@"```2(T40$B-%)!(P>(%3(TD%\9#!`6`8P7^@"/?N`````!F +M at 7TXX0%U$0^V13J#Z`$\`0^6P`^VP&:0P>`'#[83@^)_"<*($P^VA98```"# MX`'!X`:#XK\)PH at 3]H66`````70.3(GGZ`````!FB4,(ZP1FB4L(#[=#"(A% M)6:!?3CA`74E#[95.HU"_SP!=PH/ME4[@^(/ZRJ0C4+ON@\````\`78=9F9F MD+H`````28-\)&``=`Q!#[:4)($```"#X@\/M at .#X/`)T(@#6UU!7,-F9F:0 M9F9FD$B#[#A(B5PD"$B);"003(ED)!A,B6PD($R)="0H3(E\)#!)B?Q(B?-) MB=$````/ -MMU, at 9H'ZA0`/A]($```/M\)!#[:,!&`(``")R(#Y_W1F9H/Z?W<=#[;!28N4 -M)#@)``!(:<"8`0``2(M$$%`/MD`(ZT-F@?J!`'<=#[;!28N4)(@)``!(:<#( -M#P``2(M$$`@/MD`(ZQ\/ML%)BY0D8`D``$B-!,!(P>`%2(N$$(@````/MD`( -M#[;`00^VA`3F"```2(T4@$B-%)!)C;34P`$``$F+E"2("0``#[;!2&G`R`\` -M`$&]`````/9$`ET0#X5*`@``QD,D!$''!P````"X`0```.DU!```9F:09I`/ -MMU, at N?\```"X_____V:!^H4`#X=]````#[?"00^VC`1@"```BT/A/4```"% -MR69FD`^$Z@```/;"!`^$X0```$B)WDR)[^@`````A,!U%<9#)`1!QP<````` -MN`$```#IO0(``$&`O8,````?=A%!QP_H`````&:#^!\/AF(! -M``!!QPA(B<*#X@$/MD,Z@^@&/`D/A\8` -M```/ML#_),4`````0;@!````N0$```!(B=I,B>Y,B>?H`````(3`#X6P```` -M0<<'`@```+@!````Z4X!``!!N`$```"Y`````$B)VDR)[DR)Y^@`````A,`/ -MA7X```!!QP<"````N`$```#I'`$```^VRD&X`0```$B)VDR)[DR)Y^@````` -MA,!U4D''!P(```"X`0```.GP````#[;*0;@`````2(G:3(GN3(GGZ`````"$ -MP'4F0<<'`@```+@!````Z<0```#&0R0$0<<'`````+@!````Z:\```!)C;PD -MH`\``.@`````A,!T$4''!P$```"X`0```.F-````@'LXX75.@'LY`69FD'5% -M@'LZ#W4_@'L]`69F9I!U-0^V?H`````$@[0VAU -M!4B%P'42QD,D!$''!P````"X`0```.LYN`````#K,F:000^VA"3E"0``2(T4 -M@$B-%)!)C;34P`$``$F+E"2("0``N#BX#P#IJOO__V9FD&:02(M<)`A(BVPD -M$$R+9"083(ML)"!,BW0D*$R+?"0P2(/$.,-F9F:09F:09F:09F:02(/L"$B+ -M/^@`````2(/$",-F9F:09F9FD&9F9I!F9I!!5T%6055!5%532(/L6$F)_4B) -M]4B+GS at 1``!FQT8R_P](C50D+.@`````A,!T"8M$)"SI#0L``(M%."7___\` -M/>$!$``/A=L```"_B!,``.@`````#[=5(&:!^H4`#X>X"@``#[?"00^VC`5@ -M"```B8(``!(C12`2(T4D$V-M-7``0``#[?!2&G`F`$` -M`$D#A3@)``!(B40D"&:!_N$!=4;K,@^WP4B-!,!(P>`%20.%8`D``$B)1"08 -M3(NPB````$C'1"0(`````$C'1"00`````.M$#[95.HU"[SP!=B>-0O\\`78@ -M9H'Y_P!T"TB+1"0(]D!+!'4.QD4D!K@`````Z0/ -MA(H(``!,B:6`````00^WUTB)%"1(:<*P!```2(T<&$B-0R!)*X4X$0``20.% -M0!$``$B+5"1(B4(@2,'H($B+5"1(B4(D28M$)!A(BU0D2(E"*$C!Z"!(BU0D -M2(E"+$B+1"1(9D2)>`BX`````,8$&`!(@\`!2#VP!```=?!F at 7TXX0%U50^V -M13J#Z!$\`7=*2(U,)#!(BT0D2`^V4`A(B>Y(BWPD".@`````2(V#(`0``$DK -MA3 at 1``!)`X5`$0``2(M4)$B)0A!(P>@@2(M4)$B)0A3I/@$``)!!#[96"O;" -M`74LBT4X)?___P`]X0$0``^$S0```$B+3"0(#[9!2*@!#X2\````J`0/A+0` -M``#VA98````@=`](C70D,$B)[^@`````ZQM(C4PD,$B+1"1(#[90"$B)[DB+ -M?"0(Z`````!(C8,@!```22N%.!$``$D#A4`1``!(BU0D2(E"$$C!Z"!(BU0D -M2(E"%&:!?3CA`74/#[9%.H/H$3P!#X:4````2(M$)`@/ME!(2(G0@^`&2(/X -M!G5_]L(!='I(B=A)*X4X$0``20.%0!$``$B+5"1(B4(82,'H($B+5"1(B4(< -MZU/VP@)T3DB)V$DKA3 at 1``!)`X5`$0``2(M4)$B)0AA(P>@@2(M4)$B)0AQ( -MC8,@!```22N%.!$``$D#A4`1``!(BU0D2(E"$$C!Z"!(BU0D2(E"%$B+1"1( -M@$@!`@^V55E(BT0D2&:)4`*`?5D`=#._`````(GX2(T$0$C!X`))BW0D$$B+ -M36!(BQ0(2(D4!HM4"`B)5`8(@\Y,B??H`````$B-3"0P2(G:2(GN -M3(GWZ`````!!@&8,_NF-!```9F:09I!!#[9&"J@"#X0B!```2(M$)$C&0`;^ -M2(M$)$B`8`?^2(-\)`@`#X2X````2(M,)`@/ME%(2(G0@^`&2(/X!@^%GP`` +M`7<1 at XN4````"+@`````Z4D%``!$BT,X08'@____`$&!^.$!$``/A>8````/ +MMTL at 9H'YA0`/A_($```/M\%!#[:\!&`(``")^$"`__]T;F:#^7]W(T`/MM=) +MBXPD.`D``$B-!%)(C02"2,'@!4B+1`A0#[9`".M%9H'Y at 0!W'D`/ML=)BY0D +MB`D``$AIP,@/``!(BT00"`^V0`CK($`/ML=)BY0D8`D``$B-!,!(P>`%2(N$ +M$(@````/MD`(#[;`00^VA`3F"```2(T4@$B-%)!)C;34P`$``$F+E"2("0`` +M0`^VQTAIP,@/``!!O0````#V1`)=$`^%8`(``,9#)`1!QP<`````N`$```#I +M2P0```^W4R"Y_P```+C_____9H'ZA0`/AXL````/M\)!#[:T!&`(``")\$"` +M_O]T0`^VQDF+E"2("0``2&G`R`\``$B+1!`(#[9`".L at 0`^V +MQDF+E"1@"0``2(T$P$C!X`5(BX00B`````^V0`A`#[;.1`^V\$ECQD$/MJP$ +MY@@``$B-1*T`2(U$A0!)C;3$P`$```^WP4B-%$!(C1202,'B!4F)U4T#K"0X +M"0``9H'_X0%U"P^V0SJ#Z`$\`78I9H'Y_P!T!T'V14L$=1O&0R0&0<<'```` +M`+@!````Z38#``!F9I!F9I!!#[952(G1@^$!="3VP at 1T'T$/MD0D1$$Z1"1. +MT/A/<```"%R0^$[P```/;"!`^$Y@`` +M`$B)WDR)[^@`````A,!U%<9#)`1!QP<`````N`$```#IP@(``$&`O8,````? +M=A%!QP_H`````&:#^!\/AF +M0<<'`0```+@!````Z<@!``!!@?CA`1``#X0,`0``00^W16J`>SCA#X7]```` +M@'LY`0^%\P```$C1Z$B)PH/B`0^V0SJ#Z`8\"0^'Q@````^VP/\DQ0````!! +MN`$```"Y`0```$B)VDR)[DR)Y^@`````A,`/A;````!!QP<"````N`$```#I +M3@$``$&X`0```+D`````2(G:3(GN3(GGZ`````"$P`^%?@```$''!P(```"X +M`0```.D<`0``#[;*0;@!````2(G:3(GN3(GGZ`````"$P'520<<'`@```+@! +M````Z?`````/MLI!N`````!(B=I,B>Y,B>?H`````(3`=29!QP<"````N`$` +M``#IQ````,9#)`1!QP<`````N`$```#IKP```$F-O"2@#P``Z`````"$P'01 +M0<<'`0```+@!````Z8T```"`>SCA=4Z`>SD!9F:0=46`>SH/=3^`>ST!9F9F +MD'4U#[9S/,'F"`^V0SL!Q@^W]DR)Y^@`````2#M#:'4%2(7`=1+&0R0$0<<' +M`````+@!````ZSFX`````.LR9I!!#[:$).4)``!(C12`2(T4D$F-M-3``0`` +M28N4)(@)``"X.+@/`.F4^___9F:09I!(BUPD"$B+;"003(MD)!A,BVPD($R+ +M="0H3(M\)#!(@\0XPV9F9I!F9I!F9I!F9I!(@^P(2(L_Z`````!(@\0(PV9F +M9I!F9F:09F9FD&9FD$%7059!54%455-(@^Q828G]2(GU2(N?.!$``&;'1C+_ +M#TB-5"0LZ`````"$P'0)BT0D+.D."P``BT4X)?___P`]X0$0``^%Y0```+^( +M$P``Z``````/MTT at 9H'YA0`/A[D*```/M\%!#[:T!6`(``")\$"`_O]T:V:# +M^7]W(D`/MM9)BXTX"0``2(T$4DB-!()(P>`%2(M$"%`/MD`(ZT-F@?F!`'<= +M0`^VQDF+E8@)``!(:<#(#P``2(M$$`@/MD`(ZQ]`#[;&28N58`D``$B-!,!( +MP>`%2(N$$(@````/MD`(#[;`00^VA`7F"```2(T4@$B-%)!-C;35P`$``$F+ +ME8@)``!`#[;&2&G`R`\``$@!PDB)5"002,=$)`@`````2,=$)!@`````Z7(! +M```/MU4 at OO\```!F@?J%`'<,#[?"00^VM`5@"```#[=].&:!_^$!=0\/MD4Z +M@^@1/`$/AL8```!F@?J%`'=Z#[?"00^VA`5@"```//]T:F:#^G]W(0^VT$F+ +MC3@)``!(C0122(T$@DC!X`5(BT0(4`^V0`CK2&:!^H$`=QP/ML!)BY6("0`` +M2&G`R`\``$B+1!`(#[9`".LE#[;`28N58`D``$B-!,!(P>`%2(N$$(@````/ +MMD`(ZP6X_____P^VP$$/MH0%Y@@``$B-%(!(C12038VTU<`!```/M\9(C11` +M2(T4D$C!X at 5)`Y4X"0``2(E4)`AF@?_A`75&ZS(/M\9(C03`2,'@!4D#A6`) +M``!(B40D&$R+L(@```!(QT0D"`````!(QT0D$`````#K1`^V53J-0N\\`78G +MC4+_/`%V(&:!_O\`=`M(BT0D"/9`2P1U#L9%)`:X`````.FV"```2,=$)!`` +M````2,=$)!@`````2(UT)$A,B>_H`````$&)QV:)13),B>_H`````$F)Q+@" +M````387D#X1W"```3(FE@````$$/M]=(B10D2&G"L`0``$B-'!A(C4, at 22N% +M.!$``$D#A4`1``!(BU0D2(E"($C!Z"!(BU0D2(E")$F+1"082(M4)$B)0BA( +MP>@@2(M4)$B)0BQ(BT0D2&9$B7@(N`````#&!!@`2(/``4@]L`0``'7P9H%] +M..$!=50/MD4Z@^@1/`%W24B-3"0P2(M$)$@/ME`(2(GN2(M\)`CH`````$B- +M at R`$``!)*X4X$0``20.%0!$``$B+5"1(B4(02,'H($B+5"1(B4(4Z14!``!! +M#[96"O;"`74LBT4X)?___P`]X0$0``^$G````$B+3"0(#[9!2*@!#X2+```` +MJ`0/A(,```#VA98````@=`](C70D,$B)[^@`````ZQM(C4PD,$B+1"1(#[90 +M"$B)[DB+?"0(Z`````!(C8,@!```22N%.!$``$D#A4`1``!(BU0D2(E"$$C! +MZ"!(BU0D2(E"%$B)V$DKA3 at 1``!)`X5`$0``2(M4)$B)0AA(P>@@2(M4)$B) +M0ASK7/;"`G172(G822N%.!$``$D#A4`1``!(BU0D2(E"&$C!Z"!(BU0D2(E" +M'$B- at R`$``!)*X4X$0``20.%0!$``$B+5"1(B4(02,'H($B+5"1(B4(42(M$ +M)$B`2`$"#[9564B+1"1(9HE0`H!]60!T,[\`````B?A(C01`2,'@`DF+="00 +M2(M-8$B+%`A(B10&BU0("(E4!@B#QP$/MD59.?AWTHM5-$B+1"1(B5`,9H%] +M..$!=3\/MD4Z@^@1/`%W-$$/M\](BU0D2$B)[DR)]^@`````2(U,)#!(B=I( +MB>Y,B??H`````$&`9 at S^Z8L$``!F9I!!#[9&"J@"#X0B!```2(M$)$C&0`;^ +M2(M$)$B`8`?^2(-\)`@`#X2X````2(M$)`@/ME!(2(G0@^`&2(/X!@^%GP`` M`/;"`0^$E@```$$/M\](BU0D2$B)[DR)]^@`````]H66`````7002(M$)$@/ MMT`(P>`#B$0D,4B-3"0P2(G:2(GN3(GWZ`````#VA98````!=`=!@$X,`>L% M08!F#/[&`Z%(BU0D"`^V at NH```"#X`\/ME,!@^+P"<*(4P%(BTPD"`^W03B# @@ -215,7 +215,7 @@ M2(!@!?Z`3"1#"$B+="1(#[9%)4$/MHWN````T^! M@\@@B$$!2(M%/DB)@S@$``!FP<((9HF31`0```^V13V(@T($``#&`Y%(BU0D M"`^W0CB#P`%FP<`(9HE#`DB+3"0(#[:1Z@```(/B#P^V0P&#X/`)T(A#`4F) MS$F!Q-0```#I:`(``$B+5"1(#[9%)4$/MHWN````T^!F"4((Q at .!9L=#`O__ -M2(M$)!`/MI"[````@^(/#[9#`8/@\`G0B$,!2(-]2`!U#L9%)"&X`````.G- +M2(M$)!`/MI"[````@^(/#[9#`8/@\`G0B$,!2(-]2`!U#L9%)"&X`````.GN M`P``]D4[`70I3(ME4$V%Y'0 at 28N]L!```$R)YN@`````@^`/#[93`8/B\`G" MB%,!ZP5,BV0D$$B+54@/MD(!OA`````\@`^$A@```#R`=Q\\%7<2/!!F9I!F MD'-G@^@"/`%W1.M7/!=F9I!W.^M>/(5T+CR%9F:09F:0=Q`\@71#/()U(V9F @@ -230,107 +230,109 @@ M````2(M%.$B)@T0$``!(BT5`2(F#3`0``$B+5"0 M`Y%(BTPD"`^VD>H```"#X@\/MD,!@^#P"="(0P$/MT$X@\`!9L'`"&:)0P)- MA>1T8TF+!"1(B4,$ZUFH`71500^WSTB+5"1(2(GN3(GWZ`````#VA98````! M=!!(BT0D2`^W0`C!X`.(1"0Q2(U,)#!(B=I(B>Y,B??H`````/:%E@````%T -M!T&`3 at P!ZP5!@&8,_DF+A;`)``!(BQ0D2(DLT$2)^F;!Z at 5!#[??@>+_!P`` -MB=F#X1^X`0```$C3X$$)A)6X"0``BT4X)?___P`]X0$0`'4H2(U,)$"Z```` -M`(G>3(GWZ``````/MD0D0X/@'X/(0(A$)$/II````&:!?3CA`74T#[9%.H/H -M$3P!=RE(BW0D&$R)[^@`````2(U,)$!(BT0D&`^V4%")WDR)]^@`````ZVIF -MD$B+="0(3(GOZ`````!(C4PD0$B+1"0(#[903(GWZ`````!(BTPD"`^V -M44A(B="#X`9(@_@&=2[VP@%T*0^V1"1#@^`?@\A at B$0D0P^V47*#XG_!X at 0/ -MMT0D0F8E#_@)T&:)1"1"2(UT)$!,B>_H`````+@#````ZRE!#[:%Y0D``$B- -M%(!(C12038VTU<`!``!)BY6("0``N#BX#P#IPO7__TB#Q%A;74%<05U!7D%? -MPV9F9I!F9F:09F9FD$%505154TB#[`A(B?U!O0````!,C:?X````Z;$!``"0 -M3(GGZ`````!(B<-(@WAP`'4V2(GOZ`````!(B4-P2(7`=25(C97X````2(N% -M^````$B)6`A(B0-(B5,(2(F=^````.F0`0``BT,X)?___P`]X0$0``^$U@`` -M``^W0R!F/8``#X3(````#[;09HE3(&:#^G]V&F:!>SCA`74I#[9#.H/H$3P! -M=QYF9F:09F:09H'ZA0!W$`^WP@^VC`5@"```@/G_=1G&0R0&2(G>2(GOZ``` -M``#I]0```&9FD&:0#[=S.&:!_N$!=14/MGLZC4?O/`$/A^4```#K&F9F9I`/ -MML%(:<"8`0``28G%3`.M.`D``.L*C4?_/`%V-&9FD&:!^H``="IF@?[A`74+ -M#[9#.H/H$3P!=AA!]D5+!'41QD,D!DB)WDB)[^@`````ZW](B=Y(B>_H```` -M`(/X`I!W#H/X`7, at ZPYF9F:09F:0 at _@#=5OK2TB)WDB)[V9FD.@`````ZTE( -M@[N``````'0/2(VS@````$B)[^@`````2(V5^````$B+A?@```!(B5@(2(D# -M2(E3"$B)G?@```#K-DB)WDB)[^@`````9F:03#FE^`````^%0_[__^L9#[;! -M2&G`F`$``$F)Q4P#K3@)``#I'O___TB#Q`A;74%<05W#9F9FD&9FD&9FD&9F -MD$B#[$A(B5PD&$B);"0 at 3(ED)"A,B6PD,$R)="0X3(E\)$!(B?5)B?U,BV=0 -M38LT)$$/MD0D#*@0=`S&A^@````&Z7P"```/MI?H````@/H!#X2"````@/H! -M\02(N5"!$` -M`$B!PD`(``!!#[9$)'+!X`A(F$@!PHM"!(D%`````(A$)!")PL'J"(A4)!'! -MZ!"(1"022(N5"!$``$B!PD`(``!!#[9$)'+!X`A(F$@!PHM""(D%`````(A$ -M)!.)PL'J"(A4)!3!Z!"(1"05QD0D%@#&1"07`(M,)!!!B?9!P>X800^VWT2+ -M1"041(GRB=Y(Q\<`````N`````#H`````(G8 at _`!B<*#X@%T%$6$_W0/0<9% -M)`"X`````.F@`@``08!])(%U(4B-3"001(GRB=Y,B>_H`````$'&120"N``` -M``#I>`(``$&+13 at E____`#WA`0X`=0]!QD4D(;@`````Z5D"``!!]H66```` -M`74HA-)U)$&`?"1*_W0<2(U,)!!$B?*)WDR)[^@`````N`````#I)P(``$R) -MYDB)[^@`````3(GF2(GOZ`````!(BU4`00^W13)FP>@%#[?`C02%``,``(F" -M<`$``$B+10!!#[=-,H/A'[H!````2(G32-/CB9AT`0``00^W13)(P>`#2`.% -ML`D``$C'``````!!#[=-,HG(9L'H!27_!P``@^$?2(G62-/F2(GQ]]$AC(6X -M"0``00^W33*)R&;!Z`4E_P<``(/A'TC3XO?2(52%;$F+50!)BT4(2(E""$B) -M$$$/MW4R2(V]H`\``.@`````08"L)(,````!0<9%)(%)@[V``````'0/28VU -M@````$B)[^@`````28U$)"!).40D(`^$!`$``$F)QDB-A:`/``!(B40D"$R- -MO?@```!FD$R)]^@`````2(G#2(M5``^W0#)FP>@%#[?`C02%``,``(F"<`$` -M`$B+10`/MTLR@^$?N@$```!(B=9(T^:)L'0!```/MT,R2,'@`T@#A;`)``!( -MQP``````#[=+,HG(9L'H!27_!P``@^$?2(G62-/F2(GQ]]$AC(6X"0``#[=+ -M,HG(9L'H!27_!P``@^$?2-/B]](A5(5L#[=S,DB+?"0(Z`````!!@*PD at P`` -M``%(@[N``````'0/2(VS@````$B)[^@`````2(N%^````$B)6`A(B0-,B7L( -M2(F=^````$TY="0@#X44____08&EE````/___O]!QH0DZ`````1,B>Y,B>?H -M`````+@!````2(/$*%M=05Q!74%>05_#D$B#[%A(B5PD*$B);"0P3(ED)#A, -MB6PD0$R)="1(3(E\)%!(B50D$$B++TR+A3 at 1``!(A=(/A,8"```/M]9(:<*P -M!```2HT,`/9!(0)T&$B-!-4`````2`.%L`D``$B+`,9`)`+K%DB-!-4````` -M2`.%L`D``$B+`,9`)"%,C135`````$B+A;`)``!,`=!(BQ"+0C at E____`#WA -M`1``#X2L`0``#[="(&8]A0!W$@^WP`^VA`5@"```//]U&69FD$R)T$@#A;`) -M``!(BP#&0"0&Z;H(```/ML!(:<"8`0``3(N=.`D``$D!PX!\)!,`>6Y!#[93 -M2$B)T(/@!DB#^`9U(_;"`70>2(M%`(N06`$``(D5`````(72=`I(BT4`B9!8 -M`0``2(M%`(N`4`$``(D%`````(/(`DB+50")@E`!``!(BT4`BX`$`0``B04` -M````@,S_2(M5`(F"!`$``&;W02`""`^$ZP```(!]0P`/A.$```"[`````$&Y -M`````$6)R$$/MLD/MD<-2-/XJ`%T84&`^0-V*$B+10!(!=`!``"-%(T````` -M2&/22`'0BP")!0````#!Z!2#X`'K)I!(BT4`2`70`0``C12-`````$ACTD@! -MT(L`B04`````P>@4@^`!A,!T"K@!````2-/@"<-!@\$!08U``3A%0W>`A-MT -M4CA?#75-B?!FP>@%)?\'``"+1(5LB?](T_BH`74R08"[Z`````)W"$'& -M@^@````#3(G02`.%L`D``$B+,$R)W^@`````Z4`'``!!NP````#V1"03`0^$ -M+P<``$R)T$@#A;`)``!(BS#&1B0ABT8X)?___P`]X0$.``^$"P<``$B+E0 at 1 -M``!(@<)`"```00^V0W+!X`A(F$@!PHL"B04`````2(N5"!$``$B!PD0(``!! -M#[9#`(2)A( -M`<*+`HD%`````$B)[^@`````Z94&``!F9I!FD`^W]DB-'/4`````2(N%L`D` -M`$@!V$B+$&:!>CCA`0^%#`$```^V>CI`@/\0#X=>!@``N`$```")^4C3X*G` -M,```#X7,````J0```0!U5/;$@`^$.08``$AIQK`$``!*C0P`#[9!,XA")$B) -MV$@#A;`)``!(BP#V0",$#X00!@``@'@D``^$!@8``$B+4%!(A=(/A/D%```/ -MMD$SB`+I[@4``$AIQK`$``!*C0P`3(UA*$B)V$@#A;`)``!(BQ!!#[9$)`*( -M0B1(B=A(`X6P"0``2(L`2(-X2``/A+$%```/MKDA!```Z`````!(B=I(`Y6P -M"0``2(L*BU$T.=`/1\*)PDB+>4A,B>;H`````.E]!0``2(G82`.%L`D``$B+ -M`,9`)`#I9P4``&9F9I!F9I!(B=A(`X6P"0``3(LH38M]:+C_____9D&!?2"% -M`'<92(G82`.%L`D``$B+``^W0"`/MH0%8`@```^VP$AIP)@!``!,BZ4X"0`` -M20'$0<:$).@`````00^V5"1(2(G0@^`&2(/X!@^%EP$``/;"`0^$C@$``$'& -M120`0?:%E@```"`/A-D$``!-A?\/A-`$``!!]H>Q`````@^$H0```$&+132% -MP`^$E0```$F+OZ````!(A?]T#8G"28MU2.@`````ZWQ)@WU(`'1U28._N``` -M``!U"DF#O\``````=&%-BVU(28N'N````$B%P'0-2(G#0?:'L0````%T)DB+ -MM4`*``"Z`0```$R)_T'_E\````"[`````(7`=`=(BYU`"@``2(M["(L33(GN -MZ`````"+`TD!Q8M#!$B#PQ"%P'3B2(N5"!$``$B!PD`(``!!#[9$)'+!X`A( -MF$@!PHL"B04`````B<+!ZA!!B)>;````P>@89D&)AY````!(BY4($0``2('" -M1`@``$$/MD0D6 -M````B=#!Z!`/ML!F08F'F````,'J&$&(EYH```!(BY4($0``2('"3`@``$$/ -MMD0D`P``2&G&L`0``$Z- -M-`!!#[9&,X3`#X7,````2(G82`.%L`D``$B+`,9`)`!!]H66````$`^$)P,` -M`$V%_P^$'@,``$$/MD8S08B'D@```$'VA[$````"#X0$`P``08-]-``/A/D" -M``!)@[^X`````'4.28._P``````/A.$"``!-BV5(28N'N````$B%P'0-2(G# -M0?:'L0````%T)DB+M4`*``"Z`0```$R)_T'_E\````"[`````(7`=`=(BYU` -M"@``2(M["(L33(GFZ`````"+`TD!Q(M#!$B#PQ"%P`^%?`(``.O+_!P`` +M1(GA@^$?N`$```!(T^!!"825N`D``(M%."7___\`/>$!$`!U*4B-3"1`N@`` +M``!$B>9,B??H``````^V1"1#@^`?@\A`B$0D0^FD````9H%]..$!=3,/MD4Z +M@^@1/`%W*$B+="083(GOZ`````!(C4PD0$B+1"08#[904$2)YDR)]^@````` +MZVE(BW0D"$R)[^@`````2(U,)$!(BT0D"`^V4')$B>9,B??H`````$B+3"0( +M#[912$B)T(/@!DB#^`9U+O;"`70I#[9$)$.#X!^#R&"(1"1##[91?H`````$B)PTB# +M>'``=39(B>_H`````$B)0W!(A_H`````.G]````9F:09I`/ +MMW,X9H'^X0%U%0^V>SJ-1^\\`0^'[0```.L?9F9FD`^VPDB-%$!(C1202,'B +M!4F)U4P#K3@)``#K!XU'_SP!=C9F@?F``'0O9H'^X0%FD'4+#[9#.H/H$3P! +M=AM!]D5+!'44QD,D!DB)WDB)[^@`````Z8````!(B=Y(B>_H`````(/X`G<* +M at _@!_H`````&9FD.M&2(.[ +M@`````!T#TB-LX````!(B>_H`````$B-E?@```!(BX7X````2(E8"$B)`TB) +M4PA(B9WX````ZSA(B=Y(B>_H`````$PYI?@````/A3O^___K'@^VPDB-%$!( +MC1202,'B!4F)U4P#K3@)``#I%O___TB#Q`A;74%<05W#2(/L2$B)7"082(EL +M)"!,B60D*$R);"0P3(ET)#A,B7PD0$B)]4F)_4R+9U!-BS0D00^V1"0,J!!T +M#,:'Z`````;IC`(```^VE^@```"`^@$/A((```"`^@%R&H#Z!`^$HP```(#Z +M!@^%S0(``&9FD.E=`@``QH?H`````4B)_DR)]^@`````QD4D at 4&`3"0,"$B# +MO8``````=`](C;6`````3(GWZ`````!)BX;X````2(EH"$B)10!)C8;X```` +M2(E%"$F)KO@```!,B??H`````.EB`@``@^#W08A$)`R`A^L````!QH?H```` +M`,9&)`),B??H`````$R)]^@`````Z3,"``#&A^L`````2(.^@`````!T#TB- +MMH````!,B??H`````$F+34!(A?H`````.FH`0``00^V1"0,@^#W@\@008A$ +M)`Q)BW582(7V=11!@'PD#@!U+.GE````9F9FD&9FD$$/MI6!````0;@````` +MN0(```!,B>?H`````.E:`0``0;\`````QD0D%P!)C40D8$B)1"0(2(M\)`CH +M`````$B)Q4F+1"1H28EL)&A(BU0D"$B)50!(B44(2(DH2(M50$B%TG0528NV +M\`@``+\%````Z`````"`34P"2(GJO at 8```!,B>?H`````("]@P````!T-D&- +M7P%!@?]_EI@`=R9,B??H`````+\!````Z`````"`O8,`````=`N#PP&!^X&6 +MF`!UVD&)WX!$)!?H`````(#[_W4.3(GJ3(GF3(GWZ`````!,B??H +M`````$B+7"082(ML)"!,BV0D*$R+;"0P3(MT)#A,BWPD0$B#Q$C#9F:005=! +M5D%505154TB#["A(B?U)B?5(BX\X"0``N&">`0!F at 7X@A0!W&P^W1B`/MH0' +M8`@``$B-%$!(C1202(G02,'@!4R-)`%(BY4($0``2('"0`@``$$/MD0D\02(N5"!$``$B!PD`(``!!#[9$)'+!X`A( +MF$@!PHM"!(D%`````(A$)!")PL'J"(A4)!'!Z!"(1"022(N5"!$``$B!PD`( +M``!!#[9$)'+!X`A(F$@!PHM""(D%`````(A$)!.)PL'J"(A4)!3!Z!"(1"05 +MQD0D%@#&1"07`(M,)!!!B?9!P>X800^VWT2+1"041(GRB=Y(Q\<`````N``` +M``#H`````(G8 at _`!B<*#X@%T%$6$_W0/0<9%)`"X`````.FH`@``08!])(%F +M9I!U(4B-3"001(GRB=Y,B>_H`````$'&120"N`````#I?0(``$&+13 at E____ +M`#WA`0X`=0]!QD4D(;@`````Z5X"``!!]H66`````74HA-)U)$&`?"1*_W0< +M2(U,)!!$B?*)WDR)[^@`````N`````#I+`(``$R)YDB)[^@`````3(GF2(GO +MZ`````!(BU4`00^W13)FP>@%#[?`C02%``,``(F"<`$``$B+10!!#[=-,H/A +M'[H!````2(G32-/CB9AT`0``00^W13)(P>`#2`.%L`D``$C'``````!!#[=- +M,HG(9L'H!27_!P``@^$?2(G62-/F2(GQ]]$AC(6X"0``00^W33*)R&;!Z`4E +M_P<``(/A'TC3XO?2(52%;$F+50!)BT4(2(E""$B)$$$/MW4R2(V]H`\``.@` +M````08"L)(,````!0<9%)(%)@[V``````'0/28VU@````$B)[^@`````28U$ +M)"!).40D(`^$"0$``$F)QDB-A:`/``!(B40D"$R-O?@```!F9F:09F:03(GW +MZ`````!(B<-(BU4`#[=`,F;!Z`4/M\"-!(4``P``B8)P`0``2(M%``^W2S*# +MX1^Z`0```$B)UDC3YHFP=`$```^W0S)(P>`#2`.%L`D``$C'```````/MTLR +MB@%)?\'``"#X1](B=9(T^9(B?'WT2&,A;@)```/MTLRB@%)?\' +M``"#X1](T^+WTB%4A6P/MW,R2(M\)`CH`````$&`K"2#`````4B#NX`````` +M=`](C;.`````2(GOZ`````!(BX7X````2(E8"$B)`TR)>PA(B9WX````33ET +M)"`/A13___]!@:64````___^_T'&A"3H````!$R)[DR)Y^@`````N`$```!( +M@\0H6UU!7$%=05Y!7\.02(/L6$B)7"0H2(EL)#!,B60D.$R);"1`3(ET)$A, +MB7PD4$B)5"002(LO3(N%.!$``$B%T@^$Q@(```^WUDAIPK`$``!*C0P`]D$A +M`G082(T$U0````!(`X6P"0``2(L`QD`D`NL62(T$U0````!(`X6P"0``2(L` +MQD`D(4R-%-4`````2(N%L`D``$P!T$B+$(M"."7___\`/>$!$``/A+`!```/ +MMT(@9CV%`'<2#[?`#[:$!6`(```\_W499F:03(G02`.%L`D``$B+`,9`)`;I +MR@@```^VP$B-%$!(C1202,'B!4R+G3@)``!)`=.`?"03`'EN00^V4TA(B="# +MX`9(@_@&=2/VP@%T'DB+10"+D%@!``")%0````"%TG0*2(M%`(F06`$``$B+ +M10"+@%`!``")!0````"#R`)(BU4`B8)0`0``2(M%`(N`!`$``(D%`````(#, +M_TB+50")@@0!``!F]T$@`@@/A.H```"`?4,`#X3@````NP````!!N0````!% +MB@4@^`!ZR5(BT4`2`70`0``C12-`````$ACTD@!T(L`B04` +M````P>@4@^`!A,!T"K@!````2-/@"<-!@\$!08U``3A%0W>!A-MT4CA?#75- +MB?!FP>@%)?\'``"+1(5LB?](T_BH`74R08"[Z`````)W"$'&@^@````# +M3(G02`.%L`D``$B+,$R)W^@`````Z4P'``!!NP````#V1"03`0^$.P<``$R) +MT$@#A;`)``!(BS#&1B0ABT8X)?___P`]X0$.``^$%P<``$B+E0 at 1``!(@<)` +M"```00^V0W+!X`A(F$@!PHL"B04`````2(N5"!$``$B!PD0(``!!#[9#`(2)A(`<*+`HD% +M`````$B)[^@`````Z:$&``"0#[?V2(T<]0````!(BX6P"0``2`'82(L09H%Z +M..$!#X4,`0``#[9Z.D"`_Q`/AVX&``"X`0```(GY2-/@J<`P```/A"0`#X06!@``2(M04$B%T@^$"08```^V03.(`NG^!0`` +M2&G&L`0``$J-#`!,C6$H2(G82`.%L`D``$B+$$$/MD0D`HA")$B)V$@#A;`) +M``!(BP!(@WA(``^$P04```^VN2$$``#H`````$B)VD@#E;`)``!(BPJ+430Y +MT`]'PHG"2(MY2$R)YN@`````Z8T%``!(B=A(`X6P"0``2(L`QD`D`.EW!0`` +M9F9FD&9FD$B)V$@#A;`)``!,BRA-BWUHN/____]F08%]((4`=QE(B=A(`X6P +M"0``2(L`#[=`(`^VA`5@"```#[;`2(T40$B-%)!(P>(%3(NE.`D``$D!U$'& +MA"3H`````$$/ME0D2$B)T(/@!DB#^`8/A9PB+$TR)[N@````` +MBP-)`<6+0P1(@\,0A`(2)A(`<*+ +M`HD%`````(G"P>H008B7FP```,'H&&9!B8>0````2(N5"!$``$B!PD0(``!! +M#[9$)'+!X`A(F$@!PHL2B14`````#[;"9D&)AY0````/ML9F08F'E@```(G0 +MP>@0#[;`9D&)AY@```#!ZAA!B)>:````2(N5"!$``$B!PDP(``!!#[9$)'+! +MX`A(F$@!PHL"B04`````#[;`9D&)AY(```#I:0,``$AIQK`$``!.C30`00^V +M1C.$P`^%T0```$B)V$@#A;`)``!(BP#&0"0`0?:%E@```!`/A#(#``!-A?\/ +MA"D#``!!#[9&,T&(AY(```!!]H>Q`````@^$#P,``$&#?30`#X0$`P``28._ +MN`````!U#DF#O\``````#X3L`@``38ME2$F+A[@```!(APB+$TR)YN@`````BP-)`<2+0P1(@\,0A<`/A8<"``#KW&9FD&:0/`(/A2@" M``!!#[9.0$&+1CB)1"0D#[94)"`(08G400G$@^%_@/EQ=CS&1"0-`$&#_`%V#$$/MD9!@^`/B$0D#<9$)`X` M08/\`G8)00^V3D*(3"0.08/\`W9F00^V1D.(1"0/ZV#&1"0-`$&#_`)V#$$/ @@ -338,4490 +340,1720 @@ MMDY"@^$/B$PD#<9$)`X`QD0D#P!!@_P'=CE!#[9 M`$&#_`QV"4$/MD9,B$0D#D&#_`UV"T$/MDY-B$PD#^L%QD0D#P!(B=A(`X6P M"0``2(L`@'@P`'1(187D=$/&0"0 at 2(G82`.%L`D``$B+``^V0#`/MM!$..!$ M#T+B2(G82`.%L`D``$B+`$B+>%!(A?]T'T2)XDF-=D#H`````.L12(G82`.% -ML`D``$B+`,9`)"*`?"0-!'412(G82`.%L`D``$B+`,9`)`)).6TH#X0,`0`` -M387_#X0#`0``0?:%E@```!!T0$$/MD8S08B'D@```$'VA[$````"="I!#[9% +ML`D``$B+`,9`)"*`?"0-!'412(G82`.%L`D``$B+`,9`)`)).6TH#X02`0`` +M387_#X0)`0``0?:%E@```!!T0$$/MD8S08B'D@```$'VA[$````"="I!#[9% M,$2)XD$XQ`]'T(32=!A)B[^H````2(7_=`P/MM))C79`Z`````"`?"0-"W=< -M#[9$)`W_),4`````0<:'L@````'IF0```(!\)`X$=12`?"0/`G4-0<:'L@`` -M`!'I?@```$'&A[(````"ZW1!QH>R````$.MJ0<:'L@````OK8$'&A[(````& -MZU9!QH>R````#>M,/"AU)T$/MH0D at P```(/H`4&(A"2"````2(G82`.%L`D` -M`$B+`,9`)('K(3P(=0J_$"<``.@`````2(G82`.%L`D``$B+`,9`)"%FD$B+ -M7"0H2(ML)#!,BV0D.$R+;"1`3(MT)$A,BWPD4$B#Q%C#9F9FD&9FD&9FD&9F -MD$%7059!54%455-(@^PH2(G[2(E\)!A$#[>GLA(``$B+!XN`0`$``(D%```` -M`&8E_P]FB8>R$@``9D0YX'5.2(L'B[!0`0``B34`````2(L'B;!0`0``N``` -M``#WQ@#__P`/A-T&``!(Q\<`````N`````#H`````$B+?"08Z`````"X`0`` -M`.FX!@``9H&_LA(``/\/#X45!@``Z3X&``!(B[,X$0``08/$`69$.Z.V$@`` -MN`````!$#T/@2(N3F!$``$B#P at 1!#[?$BP2"08G`0<'H$$'VP`@/A+$```!( -MBP.+D%`!``")%0````!(BP.)D%`!``#WP@#__P!T;8![0P!T9XG6]\8``0`` -M=3"_`````/?&```!`'1$ZR%FD`^WUXU*"$B)\$C3^*@!=12-2A!(B?!(T_BH -M`74'ZR&_``````^WQTB-%(!(C1202(VLT\`!``!(A>UU'^L.9I"#QP$/MD-# -M9CGX=[1(BWPD&.@`````Z54%``!(BWPD&.@`````B$4/Z4,%``!F9I")P6:! -MX?\/#[?!2&G0L`0``$R+3!8 at 2(T\Q0````!(BX.P"0``2`'X2(LH2(7M#X0, -M!0``0?;`(`^$?@$``(!])($/A5@!``#&120A#[=%,DC!X`-(`X.P"0``2,<` -M``````^W33*)R&;!Z`4E_P<``(/A'[H!````2(G62-/F2(GQ]]$AC(.X"0`` -M#[=-,HG(9L'H!27_!P``@^$?2-/B]](A5(-L#[=U,DB+?"00Z`````!(@[V` -M`````'0/2(VU@````$B)W^@`````#[=5(&:!^H4`#X?$````#[?"#[:$`V`( -M```\_P^$L0```&:#^G]W'@^VP$AIP)@!``!(`X,X"0``2(M`4(!X"/\/E<#K -M60^W12!F/8$`=R8/M\`/MH0#8`@``$AIP,@/``!(`X.("0``2(M`"(!X"/\/ -ME<#K*0^W12`/MH0#8`@``$B-!,!(P>`%2`.#8`D``$B+@(@```"`>`C_#Y7` -MA,!T,$B)[DB)W^@`````2(N#^````$B):`A(B44`2(M$)`A(B44(2(FK^``` -M`.FA`P``D$F+5 at A(C44028E&"$R)=1!(B5`(2(D"Z80#``")R&;!Z`4/M\") -M1"0 at 2)@/M_&)\H/B'XE4)"2+1(-LB=%(T_BH`0^%6`,``$B)^$@#@[`)``!( -MBP`/MU`@9H'ZA0`/A[4````/M\(/MH0#8`@``#S_#X2B````9H/Z?W<;#[;` -M2&G`F`$``$@#@S@)``!(BT!0#[9`".MM2(GX2`.#L`D``$B+``^W0"!F/8$` -M=R,/M\`/MH0#8`@``$AIP,@/``!(`X.("0``2(M`"`^V0`CK,TB)^$@#@[`) -M``!(BP`/MT`@#[:$`V`(``!(C03`2,'@!4@#@V`)``!(BX"(````#[9`"#S_ -M=!`/MM!(8\*`O`/F"```_W4_2&-$)""+1(-L#[9,)"1(T_BH`0^%;@(``,9% -M)`:^`````$B)[^@`````N@````!(B>Y(B=_H`````.E(`@``2&/"#[:$`^8( -M``!(C12`2(T4D$B-O-/``0``387)=`U!]L`"N`````!,#T3(]D<*`@^$4@$` -M`$R)RN@`````2&-$)""+1(-L#[9,)"1(T_BH`0^%\`$``(!])($/A9`````/ -MMT4R2,'@`T@#@[`)``!(QP``````#[=-,HG*9L'J!8'B_P<``(/A'[@!```` -M2-/@]]`AA).X"0``#[=U,DB+?"00Z`````!(B>Y(B=_H`````$B#O8`````` -M=`](C;6`````2(G?Z`````!(BX/X````2(EH"$B)10!(BW0D"$B)=0A(B:OX -M````Z58!``!(BX,(`0``3#GP=%9!O0````!!@\4!2(L`23G&=?1%A.UT/T&_ -M`````$R)]^@`````2(U(\$F+5 at A)B48(3(DP2(E0"$B)`D at YZ;@!````1`]$ -M^$&`[0%UT$6$_P^%]````$F+5 at A(C44028E&"$R)=1!(B5`(2(D"2&-4)""X -M`0````^V3"0D2-/@"823K````.F_````3(G*Z`````!(BX,(`0``3#GP=%)! -MO0````!!@\4!2(L`23G&=?1%A.UT.T&_`````$R)]^@`````2(U(\$F+5 at A) -MB48(3(DP2(E0"$B)`D at YZ;@!````1`]$^$&`[0%UT$6$_W59@'TD at 71328M6 -M"$B-11!)B48(3(EU$$B)4`A(B0)(8U0D(+@!````#[9,)"1(T^`)A).L```` -MZR&03(VW"`$``$B-MZ`/``!(B70D$$B-A_@```!(B40D")!F1#FCLA(```^% -MPOG__TB- at P@!``!(.8,(`0``=$E(B<5(B>_H`````$B-H% -M@>+_!P``@^$?N`$```!(T^#WT"&$DZP```"Z`````$B)W^@`````2#FK"`$` -M`'6Z2(G?Z`````"X`0```$B#Q"A;74%<05U!7D%?PV9F9I!F9I!F9I!F9I!( -M@^PH2(E<)`A(B6PD$$R)9"083(EL)"!(BY_P"```2(M#"$2+*$2)+0````!! -M]\4```"0='I(BT,(1(DHZW&02('#>!0``$B+`XN04`$``(D5`````$B+`XF0 -M4`$``(72=#SWP@```!!T'$B+`\>`4`$``````!!(BP.+@%`!``")!0````!( -MBP/'@%`!```!````2(G?Z`````!!`<2#Q0&#_0)UF>L79F9FD&9FD$&\```` -M`+T`````ZXIF9I!%A.0/ET/E<()T`^VP$B+7"0(2(ML)!!,BV0D&$R+ -M;"0 at 2(/$*,-F9I!F9I!!5T%6055!5%532(/L*$F)_$B+!XN04`$``(D5```` -M`$B+!XF04`$``&9F9I!F9I#WP@#__P`/A"@)``!!@'PD0P`/A!P)``#&1"00 -M`(G22(E4)`A$#[9L)!!!C4T(2(M$)`A(T_BH`74408U-$$B+1"0(2-/XJ`$/ -MA-$(``"`?"00`W8K28L$)$@%@`$``$*-%.T`````2&/22`'0BP")!0````#! -MZ!.#X`'K*69FD$F+!"1(!8`!``!"C13M`````$ACTD@!T(L`B04`````P>@3 -M@^`!A,!T)DR)Y^@`````26/52(T$4DB-!()!@8S$Z!(`````"`!F9F:09F:0 -M28L4)(!\)!`#=B5"C03M`````$B82(V$`H`!``"+`(D%`````"4```$`ZR-F -M9F:00HT$[0````!(F$B-A`*``0``BP")!0`````E```!`(7`=$&`?"00`W8= -M0HT$[0````!(F$B-A`*``0``QP````$`Z1D(``!"C03M`````$B82(V$`H`! -M``#'`````0#I_`<``$&`?"11`0^%J`8``(!\)!`#=BE)BP0D2`6``0``0HT4 -M[0````!(8])(`="+`(D%`````(/@`>LG9F9FD$F+!"1(!8`!``!"C13M```` -M`$ACTD@!T(L`B04`````@^`!A,`/A%4!``!)8\5(C1Q`2(T$#2HTT(8F6\!(``$C'A@`3```` -M````#[9$)!!(C11`2(T4D$F-E-2X$@``2(F6"!,``$F-M`SP$@``28M\)"CH -M`````&9FD(!\)!`#=CU"C13M`````$ACTDF+!"1(!8`!``!(`="+`(D%```` -M`$F+!"1(!8`!``!(`<*+`HD%`````,'H!X/@`>L[0HT4[0````!(8]))BP0D -M2`6``0``2`'0BP")!0````!)BP0D2`6``0``2`'"BP*)!0````#!Z`>#X`&$ -MP'1U@'PD$`-V-T*-#.T`````2&/)28L$)$@%A`$``$@!R(L`B04`````28L4 -M)$B!PH0!``!(`=$-```!`(D!ZSY"C0SM`````$ACR4F+!"1(!80!``!(`LO@'PD$`-V*$F+!"1(!8`! -M``!"C13M`````$ACTD@!T(L`B04`````P>@2@^`!ZR9)BP0D2`6``0``0HT4 -M[0````!(8])(`="+`(D%`````,'H$H/@`83`#X0B`@``@'PD$`-V-T*-#.T` -M````2&/)28L$)$@%@`$``$@!R(L`B04`````#0``!`!)BQ0D2('"@`$``$@! -MT8D!ZS5"C0SM`````$ACR4F+!"1(!8`!``!(`$`` -M#X6B````Z80!``"`?"00`W9*0HT4[0````!(8]))BP0D2`6``0``2`'0BPB) -M#0````!)BP0D2`6``0``2(T$`HD(28L$)$@%@`$``$@!PHL"B04`````Z=`# -M``!"C13M`````$ACTDF+!"1(!8`!``!(`="+"(D-`````$F+!"1(!8`!``!( -MC00"B0A)BP0D2`6``0``2`'"BP*)!0````#IA@,``&:02(M(0`^W04X/M]#V -MQ@$/A=,```!(B.QX7````` -M0$M,`$C'A=``````````2(FMV````$B-M<````!)BWPD*.@`````@'PD$`-V -M,DF+!"1(!8`!```/ME0D$$C!X at .!XO@'``!(`="+`(D%`````,'H"(/@`>LP -M9F:09F:028L$)$@%@`$```^V5"002,'B`X'B^`<``$@!T(L`B04`````P>@( -M@^`!A,`/A!8!``"`?"00`W8L28L$)$@%@`$```^V5"002,'B`X'B^`<``$@! -MT(L`B04`````@_`!@^`!ZRI)BP0D2`6``0``#[94)!!(P>(#@>+X!P``2`'0 -MBP")!0````"#\`&#X`&$P`^$L0````^V1"002(T40$B-%)!)C934L!(``$R- -M>@A)BT<(2(7`#X2+````28G&2(UR0$F+?"0HZ`````!!@'X.`'110;T````` -M28UN8)!(B>_H`````$B)PTB+10A(B5T(2(DK2(E#"$B)&$B+4T!(A=)T%DF+ -MM"3P"```OP4```#H`````(!+3`)!@\4!13AN#G>Z0<='.("$'@!)QT=(```` -M`$V)?U!)C7,#@>/X!P`` -M28L$)$@%@`$``$@!V(L0B14`````28L$)$@%@`$``$B-!`.)$$F+!"1(!8`! -M``!(C00#BP")!0````!)BP0D2`4P`@``2(T$`\<``````+\0)P``Z`````!) -MBP0D2`4T`@``2`'#BP.)!0````#K?0^V7"002,'C`X'C^`<``$F+!"1(!8`! -M``!(`=B+$(D5`````$F+!"1(!8`!``!(C00#B1!)BP0D2`6``0``2(T$`XL` -MB04`````28L$)$@%4`(``$B-!`/'``````"_$"<``.@`````28L$)$@%5`(` -M`$@!PXL#B04`````@$0D$`$/MD0D$$$X1"1##X?P]O__28L$)(N04`$``(D5 -M`````$F+!"2)D%`!``#WP@#__P!T)NFE]O__9F:09I!)8]5(C0122(T$@D&! -MC,3H$@`````!`.GH]___N`````!(@\0H6UU!7$%=05Y!7\-!5T%6055!5%53 -M2(/L:$F)_4"(="1+0`^VQHE$)$Q(F$B-%$!(C1202(T4UTR+NL`2```/MJKA -M$@``2(L'0(#^`W8,QX!P`0``Q`$``.L*QX!P`0``J`$``$B)1"1 at 2`5T`0`` -M2(E$)%!(BU0D8(N"=`$``(D%`````(M,)$R#X0.[!P```-/C08G<00G$1(FB -M=`$``+_H`P``Z`````#WTT0AXTB+3"1 at B9ET`0``@'PD2P-V58M$)$S!X`)( -MF$B-E`'0`0``BP*)!0````"#R`B)`HM<)$S!XP-(8]M(C809``(``,<`.``` -M`+\0)P``Z`````!(BU0D8$B-A!H$`@``QP``````ZUB+1"1,P>`"2)A(BTPD -M8$B-E`'0`0``BP*)!0````"#R`B)`HM<)$S!XP-(8]M(C809``(``,<`.``` -M`+\0)P``Z`````!(BU0D8$B-A!H$`@``QP``````387_#X0V"```08!]0P!T -M++L`````#[;+00^V1PU(T_BH`70/N@$```")SDR)[^@`````@\,!03A=0W?9 -M0?9'"@%T9TR)_DR)[^@`````BW0D3$R)[^@`````2&-$)$Q(C11`2(T4D$F- -ME-70$@``BT(4J0``$`!T""7__^__B4(43(G^3(GOZ`````!(8T0D3$B-%$!( -MC1202<>$U<`2````````Z94'``!!@']8`'0428N]L!```$R)_N@`````08!O -M6`%(Q\#^____#[9,)$Q(T\!`(.B(1"1;#X2]`@``BW0D3$R)[^@`````2&-$ -M)$Q(C11`2(T4D$F-E-70$@``BT(4J0``$`!T""7__^__B4(4#[9$)%M!B$<- -M08!]0P`/A.\!``#'1"1<``````^VT$B)5"0P2(M,)&!(@<$``@``2(E,)"A( -MBT0D8$@%!`(``$B)1"0@#[94)%N)5"0<2(M,)&!(@<'0`0``2(E,)!!$#[9T -M)%Q!#[;N2(M$)#")Z4C3^*@!#X1-`0``2&/%2(T40$B-%)`/MD0D6T&(A-7A -M$@``08#^`P^&E0```(T<[0````!(8]M(BT0D*$@!V,<`.````+\0)P``Z``` -M``!(`UPD((M4)!R)$TB+3"1 at QX%P`0``Q`$``$B+5"10BP*)!0````")Z8/A -M`[L'````T^-!B=Q!"<1$B2*_Z`,``.@`````]]-$(>-(BTPD4(D9C12M```` -M`$ACTD@#5"00BP*)!0````"#R`B)`NF6````C1SM`````$ACVTB+1"0H2`'8 -MQP`X````OQ`G``#H`````$@#7"0 at BT0D'(D#2(M4)&#'@G`!``"H`0``2(M, -M)%"+`8D%`````(GI@^$#NP<```#3XT&)W$$)Q$B+1"101(D at O^@#``#H```` -M`/?302'<2(M4)%!$B2*-%*T`````2&/22`-4)!"+`HD%`````(/("(D"@T0D -M7`%!C48!03A%0W8LZ8/^__](B=_H`````$B-<,A(BU,(2(E#"$B)&$B)4`A( -MB0)(@WC8`'01ZPF^`````$F-7TA).5](=_H`````$B+#"1).4](#X4$_O__28U'8$DY1V`/A.\```"]`````$F)Q$R) -MY^@`````2(G#@+B#`````'0ZC44!@?U_EI@`=@>)Q>LK9F:0B<5,B>_H```` -M`+\!````Z`````"`NX,`````=`N#Q0&!_8&6F`!UVDB+0T!(A_H`````$B+0T`/ME`"#[9P -M`4C'QP````"X`````.@`````2(M30$F+M?`(``"_`0```.@`````2(M30$F+ -MM?`(``"_!@```.@`````2,=#0`````!!@&\.`4B)WDR)[^@`````33EG8`^% -M&?___TR)_DR)[^@`````2&-$)$Q(C11`2(T4D$G'A-7`$@```````.EW_/__ -M0;\`````#[9$)%M(B40D0$B+5"1 at 2('"T`$``$B)5"0X18G^00^V[TB+1"1` -MB>E(T_BH`74+1#A\)$L/A=4```!!@/X#=FA(BT0D8,>`<`$``,0!``!(BU0D -M4(L"B04`````B>F#X0.-#$F[!P```-/C08G<00G$1(DBO^@#``#H`````/?3 -M1"'C2(M,)%")&8T4K0````!(8])(`U0D.(L"B04`````@\@(B0+K9TB+1"1@ -MQX!P`0``J`$``$B+5"10BP*)!0````")Z8/A`XT,2;L'````T^-!B=Q!"<1$ -MB2*_Z`,``.@`````]]-!(=Q(BTPD4$2)(8T4K0````!(8])(`U0D.(L"B04` -M````@\@(B0)!@\_H`````(3`=%%,B>?H`````$B)QDB%P'1,2(M5:$B)16A(C45 at 2(D&2(E6 -M"$B),H!%#@%(B6Y0QD9(!<9&20#&AH$````/N0$```"Z`0```$B)[^@````` -MZPL/MO-,B>?H`````%M=05S#9F:09I!!5D%505154TB)_4&)]40/MO9"C02U -M`````$QCX+L`````OQ`G``#H`````$&`_0-V'DB+10!(!=`!``!,`>"+`(D% -M`````,'H%(/@`>L=D$B+10!(!=`!``!)C00$BP")!0````#!Z!2#X`&$P'4* -M@\,!9H'[+`%UJ$2)]DB)[^@`````2(GOZ`````!)8\9(C11`2(T4D$B-1-4` -M]H#@$@```70/2(NPP!(``$B)[^@`````6UU!7$%=05[#9I!!5D%505154T&) -M]4F)_$0/MO9)8\9(C11`2(T4D$B+K-?`$@``2(7M#X26`0``2,?`_O___T2) -M\4C3P(1%#0^%@`$``$B-14A(.45(=15!O0````!(C5U@@'T.`'4CZ?,"``!` -M#[;&2(T\0$B-/+A)C;S\N!(``.@`````Z=4"``!(B=_H`````$B)P4B+0PA( -MB4L(2(D92(E!"$B)"(!Y20`/A0D!```/MT$X28.\Q&`$````=0M(@WE```^$ -MV0````^W03A)BX3$8`0``$B#N(``````#X2G````QH'H``````^V44A(B="# -MX`9(@_@&=2WVP@%T*,9!2 at 7&04L$#[:1 at 0```$B+<5A(BWE0Z`````#IF``` -M`&9F9I!F9I`/ME%(2(G0@^`&2(/X!'4@]L(!=!O&04H#QD%+!$B)SDR)Y^@` -M````ZV=F9I!F9I`/ME%(2(G0@^`&2(/X!G51]L(!=4S&04L&QD%*!6;'@<@` -M`````$B)SDR)Y^@`````ZRY(BU%`28NT)/`(``"_!````.@`````ZQ8/MU$X -M28NT)/`(``"_`@```.@`````08/%`40X;0X/AI@4@^`!ZQM)BP0D2`70`0``2`'HBP")!0````#!Z!2#X`&$P'4*@\,!9H'[ -M+`%UJD2)]DR)Y^@`````3(GGZ`````!)8\9(C11`2(T4D$F+K-3`$@``2(7M -M#X3]````08!\)$,`="R[``````^VRP^V10U(T_BH`70/N@````")SDR)Y^@` -M````@\,!03A<)$-WV4$/ML5(C11`2(T4D$F-E-2X$@``2(E5($B-14A(.45( -M=3A(C45 at 2#E%8'4NZWMF9I!FD$B)W^@`````2(UPR$B+4PA(B4,(2(D82(E0 -M"$B)`DB#>-@`=!'K";X`````2(U=2$@Y74AURDB%]G1;QD9:`$&`?"1#`'1/ -MN0````"Z``````^V10U(T_BH`70.#[;"B$P&<(!&6@&#P@&#P0%!.$PD0W8B -MZ]OV10H!=`U(B>Y,B>?H`````.L-O@````!(B>_H`````%M=05Q!74%>PY!( -M@^P(3(L'1(M/,$$/MG!#0(3V=&))C8"X$@``N0````!(.?AU&NM/#[;!2(T4 -M0$B-%)!)C930N!(``$@Y^G0(@\$!0#CQ=>"`^0-V+TF+`$@%T`$``$B-%(T` -M````@>+\`P``2`'0BP")!0````#!Z!2#X`'K+;D`````28L`2`70`0``2(T4 -MC0````"!XOP#``!(`="+`(D%`````,'H%(/@`83`=!`/MO%$B(````28LL)$'V1"0,$'0$QD=1!D$/MD91/`%T>3P!,"``!!@&0D#/=!@$92`4'&1E$`QD,D`DB)WDB) -M[^@`````2(GOZ`````#IMP(``$$/MD0D#(/@]X/($$&(1"0,08N6"`$``(U" -M`4&)A@@!``"#^@(/AP,!``!(@[N``````'0/2(VS@````$B)[^@`````2(V5 -M^````$B+A?@```!(B5@(2(D#2(E3"$B)G?@```!!@'Y"`'480;\`````38UL -M)&!!@'PD#@!U'NF>````N@````"^`@```$R)Y^@`````9I#I&P(``$R)[^@` -M````2(G#28M%"$F)70A,B2M(B4,(2(D82(M30$B%TG052(NU\`@``+\%```` -MZ`````"`2TP"2(G:O at 8```!,B>?H`````("[@P````!T(F9F9I!F9I!(B>_H -M`````+\!````Z`````"`NX,`````=>5!@\&"`$```````!(@[N``````'0/2(VS@````$B)[^@` -M````2(V5^````$B+A?@```!(B5@(2(D#2(E3"$B)G?@```"Z`````+X&```` -M3(GGZ`````!)C40D8$DY1"1@='Q)B<5,B>_H`````$B)PTB+0$!(A_H`````$B+4T!(B[7P"```OP$` -M``#H`````$B+4T!(B[7P"```OP8```#H`````$C'0T``````2(G>2(GOZ``` -M``!-.6PD8'6'3(GV2(GOZ`````!)QT0D0`````!(BT4`BY!8`0``B14````` -MA=)T"DB+10")D%@!``!!]D0D"@%T:X!]0P!T++D`````0?9$)`T!=!7K'69F -MD&9FD$$/MD0D#4C3^*@!=0^#P0$X34-WZ^L%N0`````/MMF)WDB)[^@````` -M3(GF2(GOZ`````!(8]M(C01;2(T$@TC'A,7`$@```````&9FD&:02(/$"%M= -M05Q!74%>05_#D$B#["A(B5PD"$B);"003(ED)!A,B6PD($B)\TB)_4R+;U!- -MBV4`#[=.,HG(9L'H!0^W\$ACQD&+1(1L@^$?2-/XJ`$/A6<#``!)BQ0DC02U -M``,``(F"<`$``$F+!"2+D'0!``")%0````#&0R0ABT,X)?___P`]X0$/`'4C -MO@````!(B=_H`````+H`````2(G>3(GGZ`````#I$0,``)")T`^W2S*#X1]( -MT_BH`705O@$```!(B=_H`````$R)Y^@`````#[:%Z````#P$#X?<`@``#[;` -M_R3%`````,:%Z`````&Z`0```$B)WDR)[^@`````Z;8"``#&A>@````"N@@` -M``!(B=Y,B>_H`````.F:`@``QH7H`````TB)ZKXA````3(GOZ`````!(BW58 -M2(7V=!\/MI6!````0;@`````N0$```!,B>_H`````.E;`@``00^V=0VZ```` -M`$R)Y^@`````Z40"``#&A>@````$2(-]6`!T,TB)ZKXA````3(GOZ``````/ -MMI6!````2(MU6$&X`````+D"````3(GOZ`````#I`P(``+H`````OB$```!, -MB>_H`````$$/MG4-N@$```!,B>?H`````.G:`0``@'U*_W052(GJO at 8```!, -MB>_H`````.F_`0``2(GJO at 8```!,B>_H`````$B+34!(A9F:03(GGZ`````"_`0```.@` -M````@+V#`````'7E2(-]6`!T&4B+51!(BT482(E""$B)$$B+15B`:%@!ZQE( -MBU5 at 2(72=!`/MH6!````2,=$PE@`````2(M5`$B+10A(B4((2(D008!M#@%( -MB[T@`0``2(7_=!$/MK4-`0``N@$```#H`````$B+?5A(A?]T$0^VM8$```"Z -M`0```.@`````2(M%0$B%P'1R2,=`8`````!,B>?H`````$B+=4"Z`0```$R) -MY^@`````2(M%0`^V4`(/MG`!2,?'`````+@`````Z`````!(BU5`28NT)/`( -M``"_`0```.@`````2(M50$F+M"3P"```OP8```#H`````$C'14``````2(GN -M3(GGZ`````!!@'T)_W14O0````!!@'T.`'0RO0````!)C5U at 2(G?Z`````!( -MBU,(2(E#"$B)&$B)4`A(B0*`>$K_=0F#Q0%!.&T.=]=!.&T.=Q!!QD4)_TR) -M[DR)Y^@`````2(M<)`A(BVPD$$R+9"083(ML)"!(@\0HPV9F9I!F9I!!5T%6 -M055!5%532(/L&$F)_$R+OX@```!)BQ](BX.8$0``1(LH2(G^2(G?Z`````!! -M@'PD4@%V!D'&1"11!$F-;"0H23EL)"@/A/\!``!(B>_H`````$F)QDF+1"0H -M3(EP"$F)!DF);@A-B70D*&:#>V@`#X2T`0``O0````!(C8.@#P``2(E$)!!( -MC;OX````2(E\)`@/M\5(P>`#2`.#L`D``$B+,$B%]@^$<`$```^W1B!F03E$ -M)$`/A6`!```/MY.R$@``03G5=$]F9F:0@\(!#[>#MA(``#G"N``````/0]"- -M0@%(P>`"2`.#F!$``(L`J0``"`!U&V8E_P]F.>AU$DDY]G422(G?Z`````#I -M-P$``$0YZG6U#[=&(&8]A0`/A_<````/M\"`O`-@"```_P^$Y@```$&`?U@` -M#X7;````0?9'"@$/A-````!(BQ,/MT8R9L'H!0^WP(T$A0`#``")@G`!``!( -MBP,/MTXR@^$?N@$```!(B==(T^>)N'0!```/MT8R2,'@`T@#@[`)``!(QP`` -M````#[=.,HG(9L'H!27_!P``@^$?2(G72-/G2(GY]]$AC(.X"0``#[=.,HG( -M9L'H!27_!P``@^$?2-/B]](A5(-L3#GV="Q(BP9(BU8(2(E0"$B)`DB+ at _@` -M``!(B7`(2(D&2(M$)`A(B48(2(FS^`````^W=C)(BWPD$.@`````08!L)$4! -M@\4!9CEK:`^':?[__T'V1PH!=!E)BQ9)BT8(2(E""$B)$$R)]DR)Y^@````` -M2(/$&%M=05Q!74%>05_#9F9FD$%505154TB#[`A(B10D3(LG#[?V2,'F`TD# -MM"2P"0``2(L>9H%[..$!=28/MD,Z@^@1/`%W&TB+;T!!O0````!(A=)U4L9% -M40!!O0````#K1DF+E"0X"0``N&B6`0!F at 7L@A0!W%`^W0R!!#[:$!&`(``!( -M:<"8`0``3(TL`KT`````2(,\)`!U#4'&A>@`````O0````"`>R2!=02`9PSW -M2(,\)``/A00!``#&0R0`]H.6````(`^$*@,``$B+0VA(A<`/A!T#``!(B<7V -M at +$````"=!U(B[B@````2(7_=!%(BW-(2(7V=`B+4S3H`````$F+E"0($0`` -M2('"0`@``$$/MD5RP>`(2)A(`<*+`HD%`````(G"P>H0B)6;````P>@89HF% -MD````$F+E"0($0``2('"1`@``$$/MD5RP>`(2)A(`<*+$HD5``````^VPF:) -MA90````/ML9FB866````B=#!Z!`/ML!FB868````P>H8B)6:````28N4)`@1 -M``!(@<),"```00^V17+!X`A(F$@!PHL"B04`````#[;`9HF%D@```.DX`@`` -MD(![)(!U"L9#)"%F9I!F9I!(BS0D2,?'`````+@`````Z`````!F at 7LXX0%U -M&`^V0SJ#Z!$\`7<-2(GOZ`````#I\@$``$B)X0^V5"0#]L(!#X1]`0``BT,X -M)?___P`]X0$.``^$:@$``$F+E"0($0``2('"0`@``$$/MD5RP>`(2)A(`<*+ -M,HDU`````$F+E"0($0``2('"1`@``$$/MD5RP>`(2)A(`<)$BP)$B04````` -M28N4)`@1``!(@<)("```00^V17+!X`A(F$@!PHL*B0T`````]H.6````(`^$ -MX@```$B+>VC&A[(````0QD,D((GPP>@0B(>;````B?#!Z!AFB8>0````B4````BH0P>((1(G` -MP>@0#[;``<)FB9>8````28N4)`@1``!(@<),"```00^V17+!X`A(F$@!PHLR -MB34`````0`^V]F:)MY(````/MX^6````#[>7F`````^W]D0/MX>4````2,?' -M`````+@`````Z`````!)BY0D"!$``$B!PD`(``!!#[9%?H`````.MDA-)Y($F+!"2+B%@!``")#0````"%R71,28L$ -M)(F(6`$``.M`@#D`>#N`>0<`>35)BQ0D#[=#,F;!Z`4/M\"-!(4``P``B8)P -M`0``28L4)`^W2S*#X1^X`0```$C3X(F"=`$``$B#Q`A;74%<05W#9F9FD&9F -M9I!F9I!F9I!(@^P(#[9&.$@Y?BAU2CP(=&4\*'1A/*AT73R(9F9FD'15/`IT -M43PJ=$T\JF9F9I!T13R*=$%(BX?X````2(EP"$B)!DB-A_@```!(B48(2(FW -M^````.L?2(N7``$``$B)MP`!``!(C8?X````2(D&2(E6"$B),N@`````2(/$ -M",-F9F:09F9FD&9F9I!F9I!(@^P(Z`````!(@\0(PV:04TB#[&!(B?M(C4PD -M74B-5"1>2(UT)%\/MW\\2(U$)%)(B40D.$B-1"142(E$)#!(C40D3$B)1"0H -M2(U$)$Y(B40D($B-1"182(E$)!A(C40D6DB)1"002(U$)%M(B40D"$B-1"16 -M2(D$)$R-3"1<3(U$)%#H``````^V5"1?#[9T)%Y(C7PD2.@`````#[94)%]( -M:=*8`0``2(MS($B-NQ@)``"Y`0```.@`````#[94)%U(C1322,'B!4B+2&G2R`\``$B+(#2(MS($B-NV@*``"Y`0```.@`````#[94)%P/MT0D4$@/K]!(C112 -M2,'B`DB+(# -M2(MS($B-NS`+``"Y`0```.@`````#[=4)%A(`=)(BW, at 2(V[>`\``+D!```` -MZ``````/ME0D7T@!TDB+(+2(MS($B-NZ at 1``!!N`$```"Y"````.@`````2(MS($B-N]@1``!! -MN`$```"Y"````+H```@`Z``````/MU0D5DAITHP!``!(BW, at 2('#"!(``$&X -M`0```+D(````2(G?Z`````"X`````$B#Q&!;PV9F9I!F9I!F9I!(@^PX2(E< -M)`A(B6PD$$R)9"083(EL)"!,B70D*$R)?"0P28GW28G]2(L'2(D$)$R-9TA, -MB>?H`````$B)PTR-<,A(BSPDZ`````!(B<5)BT5028E=4$V)9CA)B49`2(D8 -MN`$```!(A>UT>,9%..'&13D!QD4Z$(!-.P%)BX>@````2(E%:$B+17!,B7 at H -M28V'D````$B)15#&127,00^V1EMFB44 at 28M%`$B)12C'1320````3(E]2$C' -MA:``````````2(U]6+X`````Z`````!(B>Y(BSPDZ`````"X`````$B+7"0( -M2(ML)!!,BV0D&$R+;"0 at 3(MT)"A,BWPD,$B#Q#C#9F9FD&9FD&9FD$%7059! -M54%455-(@^P82(G]2,=$)!``````2(M$)!`/MI0HY@@``(#Z_P^$Z@````^V -MRDB-!(E(C02!2(V$Q<`!``!(B40D"`^V\DACQDB-%(!(C120 at +S5S@$````/ -MA+8```!!O`````!(C02)2(T$@4C!X`-,C;0%(`(``$R-+"A(8\9(C12`2(T4 -MD$R-O-7``0``3(GWZ`````!(B<-)BX4H`@``28F=*`(``$R),TB)0PA(B1A( -MBU-`2(72=!5(B[7P"```OP4```#H`````(!+3`)(B=J^`@```$B+?"0(Z``` -M``"`NX,`````=!M(B>_H`````+\!````Z`````"`NX,`````=>5!@\0!13AG -M#@^'>____TB#1"00`4B#?"00!`^%[O[__TB)[^@`````2(/$&%M=05Q!74%> -M05_#9F9FD&9FD&9FD&9FD$%7059!54%455-(@^QX2(G[QD=1`,9'4`#&1T\` -MQH=I%````$B-E[@2``"X`````,8$$`!(@\`!2#V@`0``=?!(C8/X````2(F# -M^````$B)@P`!``!(C8,(`0``2(F#"`$``$B)@Q`!``!,C:,8`0``3(FC&`$` -M`$R)HR`!``!,C:LH`0``3(FK*`$``$R)JS`!``!(C8,X`0``2(E$)$A(B8,X -M`0``2(F#0`$``$B-BT@!``!(B4PD4$B)BT@!``!(B8M0`0``3(VS:`$``$R) -MLV@!``!,B;-P`0``2(VS>`$``$B)="1`2(FS>`$``$B)LX`!``!,C;M8`0`` -M3(F[6`$``$R)NV`!``!(C4PD;DB-5"1P2(UT)'$/MWL\2(U$)')(B40D.$B- -M1"1T2(E$)#!(C40D9$B)1"0H2(U$)&I(B40D($B-1"1V2(E$)!A(C40D;$B) -M1"002(U$)&U(B40D"$B-1"1H2(D$)$R-3"1O3(U$)&;H``````^V1"1QB$-& -M#[9$)'"(0T(%2(72=!!(B`L``$B+DX`!``!( -MB8.``0``2(M,)$!(B0A(B5`(2(D"@\4!#[9$)'%F.>AWPTB-NW@/``#H```` -M`$B)@Y@/``!(B8.@#P``#[=T)'9FB;.J#P``#[?V2(V[H`\``.@`````2(V[ -ML`\``.@`````2(F#T`\``$B)@]@/```/MG0D<6:)L^(/```/M_9(C;O8#P`` -MZ`````!(C;OH#P``Z`````!(B8,($```2(F#$!````^V="1N9HFS&A````^W -M]DB-NQ`0``#H`````$B-NR`0``#H`````$B)@T`0``!(B8-($```#[9T)'!F -MB;-2$```#[?V2(V[2!```.@`````2(V[6!```.@`````2(F#>!```$B)@X`0 -M```/MD,^9HF#BA````^V`A!QD`)`$B)F,`!``!!QD`.`,:`&`(```#&@.@!````QX!@`@`````` -M`$B-C!/P`0``2(F(\`$``$B)B/@!``!(C8P3"`(``$B)B`@"``!(B8 at 0`@`` -M2(V4$R`"``!(B9`@`@``2(F0*`(``$'&0`H"@\$`L@``````$C'A,M@!``````` -M`$B)T4@#BS@)``!(C4$@2(E!($@#DS@)``!(C4(@2(E"*(/&`0^V1"1Q9CGP -M#X=T____9L>#[```````N`````!F9I!F9I#&A!A@"```_TB#P`%(/88```!U -M[(!\)'``#X2]````O@`````/M\9(:<#(#P``2(N3B`D``,9$`E@`2(N3B`D` -M`,9$$%D`2(N3B`D``$C'1!`0`````$B)P4@#BX@)``!(C5$82(E1&$B)P4@# -MBX@)``!(C5$82(E1($B)P4@#BX@)``!(C5$H2(E1*$B)P4@#BX@)``!(C5$H -M2(E1,$B+DX@)``!,B400"$B)P4@#BX@)``!(C5%(2(E12$@#@X@)``!(C5!( -M2(E04(/&`0^V1"1P9CGP#X=(____QH/O````@(!\)&X`#X2"````O@`````/ -MM\9(C03`2,'@!4B+DV`)``!FQT0"3 at 0`2(N38`D``,9$$$(`2(N38`D``,9$ -M$$3_2(N38`D``,9$$%#_2(G!2`.+8`D``$B-42A(B5$H2(G!2`.+8`D``$B- -M42A(B5$P2(N38`D``$R)A!"(````@\8!#[9$)&YF.?!W@\:#\````()(C;/@ -M$```2(V[N!```.@`````2(F#V!```$B-LQ`1``!(C;OH$```Z`````!(B8,( -M$0``2(VS0!$``$B-NQ at 1``#H`````$B)@S at 1``!(C;-P$0``2(V[2!$``.@` -M````2(F#:!$``$B-LZ`1``!(C;MX$0``Z`````!(B8.8$0``2(VST!$``$B- -MNZ at 1``#H`````$F)Q$B)@\@1``!(BZO0$0``@'PD;0!T4D&]`````$B+?"1( -MZ`````!,B6`02(EH&$B+DT`!``!(B8-``0``2(MT)$A(B3!(B5`(2(D"28'$ -M``@``$B!Q0`(``!!@\4!#[9$)&UF1#GH=[1(C;,`$@``2(V[V!$``.@````` -M28G$2(F#^!$``$B+JP`2``!!O0````!(BWPD4.@`````3(E@$$B):!A(BY-0 -M`0``2(F#4`$``$B+3"102(D(2(E0"$B)`DF!Q````0!(@<4```$`08/%`69! -M at _T(=;A(C;,P$@``2(V["!(``.@`````2(F#*!(``$R+HS`2``!F at WPD:`!T -M2$B)Q4&U`$R)_^@`````2(EH$$R)8!A(BY-@`0``2(F#8`$``$R).$B)4`A( -MB0)(@<6,`0``28'$C`$``$&#Q0%F1#EL)&AWODB#Q'A;74%<05U!7D%?PV9F -M9I!F9F:0055!5%532(/L"$F)_4F)]$B+GH@````/ME9'2(G^2(G?Z`````!( -MB<5F08-,)$X008!]0P!T6;D`````]D,-`70-ZTP/MD,-2-/XJ`%U#8/!`4$/ -MMD5#9CG(=^AF at _D#=C-)BT4`2`70`0``2(T4C0````"!XOS_`P!(`="+`(D% -M`````,'H%(/P`8/@`>LQN0````!)BT4`2`70`0``2(T4C0````"!XOS_`P!( -M`="+`(D%`````,'H%(/P`8/@`83`=!`/MO%,B>_H`````.F7`0``2(U#8$@Y -M0V`/A!D!``!(A>T/A!`!```/MH6!````2<=$Q%@`````2(M5`$B+10A(B4(( -M2(D02(GJO at 8```!(B=_H`````("]@P````!T&TR)[^@`````OP$```#H```` -M`("]@P````!UY4B+14!(AY,B>_H`````$F+10"+D%@!``")%0````"%TG0*28M%`(F06`$` -M`$'&1"1"`&9!@V0D3N]!@'PD.P!T*KH`````#[?"28M$Q%A(AM+3(GF -M3(GOZ`````!FD.M*#[?%28M_H`````$F)QTF+1"0 at 3(EX"$F)!TF);PA- -MB7PD(&:#>V@`#X0+`@``0;T`````2(VSH`\``$B)="002(V#^````$B)1"0( -M00^WQ4C!X`-(`X.P"0``2(LH2(7M#X3#`0``#[=%(&9!.40D.`^%LP$```^W -MD[(2``!!.=9T469FD&:0@\(!#[>#MA(``#G"N``````/0]"-0@%(P>`"2`.# -MF!$``(L`J0``"`!U'&8E_P]F1#GH=1)).>]U$DB)W^@`````Z9D!``!$.?)U -MM$B+="0@@'Y8``^%1P$```^W12!F/84`#X Author: delphij Date: Fri Aug 29 13:12:45 2014 New Revision: 270811 URL: http://svnweb.freebsd.org/changeset/base/270811 Log: MFC r269963+269964: 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. 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. Modified: stable/10/sys/kern/kern_malloc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_malloc.c ============================================================================== --- stable/10/sys/kern/kern_malloc.c Fri Aug 29 13:06:30 2014 (r270810) +++ stable/10/sys/kern/kern_malloc.c Fri Aug 29 13:12:45 2014 (r270811) @@ -121,7 +121,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]; @@ -152,21 +152,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}, }; @@ -184,6 +173,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"); @@ -498,7 +491,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; @@ -783,6 +776,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, @@ -807,7 +803,7 @@ mallocinit(void *dummy) } for (;i <= size; i+= KMEM_ZBASE) kmemsize[i >> KMEM_ZSHIFT] = indx; - + } } SYSINIT(kmem, SI_SUB_KMEM, SI_ORDER_FIRST, mallocinit, NULL); From pluknet at FreeBSD.org Fri Aug 29 13:22:57 2014 From: pluknet at FreeBSD.org (Sergey Kandaurov) Date: Fri, 29 Aug 2014 13:22:56 +0000 (UTC) Subject: svn commit: r270812 - stable/6/share/zoneinfo Message-ID: <201408291322.s7TDMucO053143@svn.freebsd.org> Author: pluknet Date: Fri Aug 29 13:22:56 2014 New Revision: 270812 URL: http://svnweb.freebsd.org/changeset/base/270812 Log: MFC r270728, tzdata2014f - Parts of Russia will change times on 2014-10-26. - Time zone name changes for Asia/Novokuznetsk and Xinjiang and Samoa and America/Metlakatla, new zones Asia/Chita and Asia/Srednekolymsk. - Australia will now use Axxx. - New zone tab data format. And lots of historical changes (See http://mm.icann.org/pipermail/tz-announce/2014-August/000023.html for the full details.) Added: stable/6/share/zoneinfo/zone1970.tab - copied unchanged from r270728, head/contrib/tzdata/zone1970.tab Modified: stable/6/share/zoneinfo/africa stable/6/share/zoneinfo/antarctica stable/6/share/zoneinfo/asia stable/6/share/zoneinfo/australasia stable/6/share/zoneinfo/backward stable/6/share/zoneinfo/etcetera stable/6/share/zoneinfo/europe stable/6/share/zoneinfo/factory stable/6/share/zoneinfo/leap-seconds.list (contents, props changed) stable/6/share/zoneinfo/northamerica stable/6/share/zoneinfo/southamerica stable/6/share/zoneinfo/systemv stable/6/share/zoneinfo/yearistype.sh stable/6/share/zoneinfo/zone.tab Directory Properties: stable/6/share/zoneinfo/ (props changed) Modified: stable/6/share/zoneinfo/africa ============================================================================== --- stable/6/share/zoneinfo/africa Fri Aug 29 13:12:45 2014 (r270811) +++ stable/6/share/zoneinfo/africa Fri Aug 29 13:22:56 2014 (r270812) @@ -1,4 +1,3 @@ -#
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -35,13 +34,13 @@
 # Previous editions of this database used WAT, CAT, SAT, and EAT
 # for +0:00 through +3:00, respectively,
 # but Mark R V Murray reports that
-# `SAST' is the official abbreviation for +2:00 in the country of South Africa,
-# `CAT' is commonly used for +2:00 in countries north of South Africa, and
-# `WAT' is probably the best name for +1:00, as the common phrase for
-# the area that includes Nigeria is ``West Africa''.
-# He has heard of ``Western Sahara Time'' for +0:00 but can find no reference.
+# 'SAST' is the official abbreviation for +2:00 in the country of South Africa,
+# 'CAT' is commonly used for +2:00 in countries north of South Africa, and
+# 'WAT' is probably the best name for +1:00, as the common phrase for
+# the area that includes Nigeria is "West Africa".
+# He has heard of "Western Sahara Time" for +0:00 but can find no reference.
 #
-# To make things confusing, `WAT' seems to have been used for -1:00 long ago;
+# To make things confusing, 'WAT' seems to have been used for -1:00 long ago;
 # I'd guess that this was because people needed _some_ name for -1:00,
 # and at the time, far west Africa was the only major land area in -1:00.
 # This usage is now obsolete, as the last use of -1:00 on the African
@@ -54,7 +53,7 @@
 #	 2:00	SAST	South Africa Standard Time
 # and Murray suggests the following abbreviation:
 #	 1:00	WAT	West Africa Time
-# I realize that this leads to `WAT' being used for both -1:00 and 1:00
+# I realize that this leads to 'WAT' being used for both -1:00 and 1:00
 # for times before 1976, but this is the best I can think of
 # until we get more information.
 #
@@ -131,9 +130,7 @@ Zone	Africa/Gaborone	1:43:40 -	LMT	1885
 			2:00	-	CAT
 
 # Burkina Faso
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone Africa/Ouagadougou	-0:06:04 -	LMT	1912
-			 0:00	-	GMT
+# See Africa/Abidjan.
 
 # Burundi
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -161,7 +158,7 @@ Zone	Africa/Bangui	1:14:20	-	LMT	1912
 
 # Chad
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Ndjamena	1:00:12 -	LMT	1912
+Zone	Africa/Ndjamena	1:00:12 -	LMT	1912 # N'Djamena
 			1:00	-	WAT	1979 Oct 14
 			1:00	1:00	WAST	1980 Mar  8
 			1:00	-	WAT
@@ -183,10 +180,20 @@ Zone Africa/Lubumbashi	1:49:52 -	LMT	189
 Zone Africa/Brazzaville	1:01:08 -	LMT	1912
 			1:00	-	WAT
 
-# Cote D'Ivoire
+# C?te D'Ivoire / Ivory Coast
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Abidjan	-0:16:08 -	LMT	1912
 			 0:00	-	GMT
+Link Africa/Abidjan Africa/Bamako	# Mali
+Link Africa/Abidjan Africa/Banjul	# Gambia
+Link Africa/Abidjan Africa/Conakry	# Guinea
+Link Africa/Abidjan Africa/Dakar	# Senegal
+Link Africa/Abidjan Africa/Freetown	# Sierra Leone
+Link Africa/Abidjan Africa/Lome		# Togo
+Link Africa/Abidjan Africa/Nouakchott	# Mauritania
+Link Africa/Abidjan Africa/Ouagadougou	# Burkina Faso
+Link Africa/Abidjan Africa/Sao_Tome	# S?o Tom? and Pr?ncipe
+Link Africa/Abidjan Atlantic/St_Helena	# St Helena
 
 # Djibouti
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -231,13 +238,9 @@ Rule	Egypt	1990	1994	-	May	 1	1:00	1:00	
 # Egyptians would approve the cancellation."
 #
 # Egypt to cancel daylight saving time
-# 
 # http://www.almasryalyoum.com/en/node/407168
-# 
 # or
-# 
 # http://www.worldtimezone.com/dst_news/dst_news_egypt04.html
-# 
 Rule	Egypt	1995	2010	-	Apr	lastFri	 0:00s	1:00	S
 Rule	Egypt	1995	2005	-	Sep	lastThu	24:00	0	-
 # From Steffen Thorsen (2006-09-19):
@@ -249,7 +252,7 @@ Rule	Egypt	2006	only	-	Sep	21	24:00	0	-
 # From Dirk Losch (2007-08-14):
 # I received a mail from an airline which says that the daylight
 # saving time in Egypt will end in the night of 2007-09-06 to 2007-09-07.
-# From Jesper Norgaard Welen (2007-08-15): [The following agree:]
+# From Jesper N?rgaard Welen (2007-08-15): [The following agree:]
 # http://www.nentjes.info/Bill/bill5.htm
 # http://www.timeanddate.com/worldclock/city.html?n=53
 # From Steffen Thorsen (2007-09-04): The official information...:
@@ -288,15 +291,9 @@ Rule	Egypt	2007	only	-	Sep	Thu>=1	24:00	
 #
 # timeanddate[2] and another site I've found[3] also support that.
 #
-# [1] 
-# https://bugzilla.redhat.com/show_bug.cgi?id=492263
-# 
-# [2] 
-# http://www.timeanddate.com/worldclock/clockchange.html?n=53
-# 
-# [3] 
-# http://wwp.greenwichmeantime.com/time-zone/africa/egypt/
-# 
+# [1] https://bugzilla.redhat.com/show_bug.cgi?id=492263
+# [2] http://www.timeanddate.com/worldclock/clockchange.html?n=53
+# [3] http://wwp.greenwichmeantime.com/time-zone/africa/egypt/
 
 # From Arthur David Olson (2009-04-20):
 # In 2009 (and for the next several years), Ramadan ends before the fourth
@@ -306,14 +303,10 @@ Rule	Egypt	2007	only	-	Sep	Thu>=1	24:00	
 # From Steffen Thorsen (2009-08-11):
 # We have been able to confirm the August change with the Egyptian Cabinet
 # Information and Decision Support Center:
-# 
 # http://www.timeanddate.com/news/time/egypt-dst-ends-2009.html
-# 
 #
 # The Middle East News Agency
-# 
 # http://www.mena.org.eg/index.aspx
-# 
 # also reports "Egypt starts winter time on August 21"
 # today in article numbered "71, 11/08/2009 12:25 GMT."
 # Only the title above is available without a subscription to their service,
@@ -321,19 +314,14 @@ Rule	Egypt	2007	only	-	Sep	Thu>=1	24:00	
 # (at least today).
 
 # From Alexander Krivenyshev (2010-07-20):
-# According to News from Egypt -  Al-Masry Al-Youm Egypt's cabinet has
+# According to News from Egypt - Al-Masry Al-Youm Egypt's cabinet has
 # decided that Daylight Saving Time will not be used in Egypt during
 # Ramadan.
 #
 # Arabic translation:
-# "Clocks to go back during Ramadan--and then forward again"
-# 
+# "Clocks to go back during Ramadan - and then forward again"
 # http://www.almasryalyoum.com/en/news/clocks-go-back-during-ramadan-and-then-forward-again
-# 
-# or
-# 
 # http://www.worldtimezone.com/dst_news/dst_news_egypt02.html
-# 
 
 # From Ahmad El-Dardiry (2014-05-07):
 # Egypt is to change back to Daylight system on May 15
@@ -433,10 +421,15 @@ Zone	Africa/Asmara	2:35:32 -	LMT	1870
 			3:00	-	EAT
 
 # Ethiopia
-# From Paul Eggert (2006-03-22):
-# Shanks & Pottenger write that Ethiopia had six narrowly-spaced time zones
-# between 1870 and 1890, and that they merged to 38E50 (2:35:20) in 1890.
-# We'll guess that 38E50 is for Adis Dera.
+# From Paul Eggert (2014-07-31):
+# Like the Swahili of Kenya and Tanzania, many Ethiopians keep a
+# 12-hour clock starting at our 06:00, so their "8 o'clock" is our
+# 02:00 or 14:00.  Keep this in mind when you ask the time in Amharic.
+#
+# Shanks & Pottenger write that Ethiopia had six narrowly-spaced time
+# zones between 1870 and 1890, that they merged to 38E50 (2:35:20) in
+# 1890, and that they switched to 3:00 on 1936-05-05.  Perhaps 38E50
+# was for Adis Dera.  Quite likely the Shanks data are wrong anyway.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Africa/Addis_Ababa	2:34:48 -	LMT	1870
 			2:35:20	-	ADMT	1936 May 5    # Adis Dera MT
@@ -448,28 +441,24 @@ Zone Africa/Libreville	0:37:48 -	LMT	191
 			1:00	-	WAT
 
 # Gambia
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Banjul	-1:06:36 -	LMT	1912
-			-1:06:36 -	BMT	1935	# Banjul Mean Time
-			-1:00	-	WAT	1964
-			 0:00	-	GMT
+# See Africa/Abidjan.
 
 # Ghana
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-# Whitman says DST was observed from 1931 to ``the present'';
-# go with Shanks & Pottenger.
-Rule	Ghana	1936	1942	-	Sep	 1	0:00	0:20	GHST
-Rule	Ghana	1936	1942	-	Dec	31	0:00	0	GMT
+# Whitman says DST was observed from 1931 to "the present";
+# Shanks & Pottenger say 1936 to 1942;
+# and September 1 to January 1 is given by:
+# Scott Keltie J, Epstein M (eds), The Statesman's Year-Book,
+# 57th ed. Macmillan, London (1920), OCLC 609408015, pp xxviii.
+# For lack of better info, assume DST was observed from 1920 to 1942.
+Rule	Ghana	1920	1942	-	Sep	 1	0:00	0:20	GHST
+Rule	Ghana	1920	1942	-	Dec	31	0:00	0	GMT
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Accra	-0:00:52 -	LMT	1918
 			 0:00	Ghana	%s
 
 # Guinea
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Conakry	-0:54:52 -	LMT	1912
-			 0:00	-	GMT	1934 Feb 26
-			-1:00	-	WAT	1960
-			 0:00	-	GMT
+# See Africa/Abidjan.
 
 # Guinea-Bissau
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -577,18 +566,8 @@ Zone	Africa/Blantyre	2:20:00 -	LMT	1903 
 			2:00	-	CAT
 
 # Mali
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Bamako	-0:32:00 -	LMT	1912
-			 0:00	-	GMT	1934 Feb 26
-			-1:00	-	WAT	1960 Jun 20
-			 0:00	-	GMT
-
 # Mauritania
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone Africa/Nouakchott	-1:03:48 -	LMT	1912
-			 0:00	-	GMT	1934 Feb 26
-			-1:00	-	WAT	1960 Nov 28
-			 0:00	-	GMT
+# See Africa/Abidjan.
 
 # Mauritius
 
@@ -612,9 +591,7 @@ Zone Africa/Nouakchott	-1:03:48 -	LMT	19
 
 # From Steffen Thorsen (2008-07-10):
 # According to
-# 
 # http://www.lexpress.mu/display_article.php?news_id=111216
-# 
 # (in French), Mauritius will start and end their DST a few days earlier
 # than previously announced (2008-11-01 to 2009-03-31).  The new start
 # date is 2008-10-26 at 02:00 and the new end date is 2009-03-27 (no time
@@ -633,18 +610,13 @@ Zone Africa/Nouakchott	-1:03:48 -	LMT	19
 # published on Monday, June 30, 2008...
 #
 # I guess that article in French "Le gouvernement avance l'introduction
-# de l'heure d'ete" stating that DST in Mauritius starting on October 26
-# and ending on March 27, 2009 is the most recent one.
-# ...
-# 
+# de l'heure d'?t?" stating that DST in Mauritius starting on October 26
+# and ending on March 27, 2009 is the most recent one....
 # http://www.worldtimezone.com/dst_news/dst_news_mauritius02.html
-# 
 
 # From Riad M. Hossen Ally (2008-08-03):
 # The Government of Mauritius weblink
-# 
 # http://www.gov.mu/portal/site/pmosite/menuitem.4ca0efdee47462e7440a600248a521ca/?content_id=4728ca68b2a5b110VgnVCM1000000a04a8c0RCRD
-# 
 # Cabinet Decision of July 18th, 2008 states as follows:
 #
 # 4. ...Cabinet has agreed to the introduction into the National Assembly
@@ -654,33 +626,25 @@ Zone Africa/Nouakchott	-1:03:48 -	LMT	19
 # States of America. It will start at two o'clock in the morning on the
 # last Sunday of October and will end at two o'clock in the morning on
 # the last Sunday of March the following year. The summer time for the
-# year 2008 - 2009 will, therefore, be effective as from 26 October 2008
+# year 2008-2009 will, therefore, be effective as from 26 October 2008
 # and end on 29 March 2009.
 
 # From Ed Maste (2008-10-07):
 # THE TIME BILL (No. XXVII of 2008) Explanatory Memorandum states the
 # beginning / ending of summer time is 2 o'clock standard time in the
 # morning of the last Sunday of October / last Sunday of March.
-# 
 # http://www.gov.mu/portal/goc/assemblysite/file/bill2708.pdf
-# 
 
 # From Steffen Thorsen (2009-06-05):
 # According to several sources, Mauritius will not continue to observe
 # DST the coming summer...
 #
 # Some sources, in French:
-# 
 # http://www.defimedia.info/news/946/Rashid-Beebeejaun-:-%C2%AB-L%E2%80%99heure-d%E2%80%99%C3%A9t%C3%A9-ne-sera-pas-appliqu%C3%A9e-cette-ann%C3%A9e-%C2%BB
-# 
-# 
 # http://lexpress.mu/Story/3398~Beebeejaun---Les-objectifs-d-%C3%A9conomie-d-%C3%A9nergie-de-l-heure-d-%C3%A9t%C3%A9-ont-%C3%A9t%C3%A9-atteints-
-# 
 #
 # Our wrap-up:
-# 
 # http://www.timeanddate.com/news/time/mauritius-dst-will-not-repeat.html
-# 
 
 # From Arthur David Olson (2009-07-11):
 # The "mauritius-dst-will-not-repeat" wrapup includes this:
@@ -704,7 +668,7 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 			3:00	-	EAT
 
 # Morocco
-# See the `europe' file for Spanish Morocco (Africa/Ceuta).
+# See the 'europe' file for Spanish Morocco (Africa/Ceuta).
 
 # From Alex Krivenyshev (2008-05-09):
 # Here is an article that Morocco plan to introduce Daylight Saving Time between
@@ -712,60 +676,43 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 #
 # "... Morocco is to save energy by adjusting its clock during summer so it will
 # be one hour ahead of GMT between 1 June and 27 September, according to
-# Communication Minister and Gov ernment Spokesman, Khalid Naciri...."
+# Communication Minister and Government Spokesman, Khalid Naciri...."
 #
-# 
 # http://www.worldtimezone.net/dst_news/dst_news_morocco01.html
-# 
-# OR
-# 
 # http://en.afrik.com/news11892.html
-# 
 
 # From Alex Krivenyshev (2008-05-09):
 # The Morocco time change can be confirmed on Morocco web site Maghreb Arabe Presse:
-# 
 # http://www.map.ma/eng/sections/box3/morocco_shifts_to_da/view
-# 
 #
 # Morocco shifts to daylight time on June 1st through September 27, Govt.
 # spokesman.
 
 # From Patrice Scattolin (2008-05-09):
 # According to this article:
-# 
 # http://www.avmaroc.com/actualite/heure-dete-comment-a127896.html
-# 
-# (and republished here:
-# 
-# http://www.actu.ma/heure-dete-comment_i127896_0.html
-# 
-# )
-# the changes occurs at midnight:
-#
-# saturday night may 31st at midnight (which in french is to be
-# intrepreted as the night between saturday and sunday)
-# sunday night the 28th  at midnight
-#
-# Seeing that the 28th is monday, I am guessing that she intends to say
-# the midnight of the 28th which is the midnight between sunday and
-# monday, which jives with other sources that say that it's inclusive
-# june1st to sept 27th.
+# (and republished here: )
+# the changes occur at midnight:
+#
+# Saturday night May 31st at midnight (which in French is to be
+# interpreted as the night between Saturday and Sunday)
+# Sunday night the 28th at midnight
+#
+# Seeing that the 28th is Monday, I am guessing that she intends to say
+# the midnight of the 28th which is the midnight between Sunday and
+# Monday, which jives with other sources that say that it's inclusive
+# June 1st to Sept 27th.
 #
 # The decision was taken by decree *2-08-224 *but I can't find the decree
 # published on the web.
 #
 # It's also confirmed here:
-# 
 # http://www.maroc.ma/NR/exeres/FACF141F-D910-44B0-B7FA-6E03733425D1.htm
-# 
-# on a government portal as being  between june 1st and sept 27th (not yet
-# posted in english).
+# on a government portal as being between June 1st and Sept 27th (not yet
+# posted in English).
 #
-# The following google query will generate many relevant hits:
-# 
+# The following Google query will generate many relevant hits:
 # http://www.google.com/search?hl=en&q=Conseil+de+gouvernement+maroc+heure+avance&btnG=Search
-# 
 
 # From Steffen Thorsen (2008-08-27):
 # Morocco will change the clocks back on the midnight between August 31
@@ -773,47 +720,32 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 # of September:
 #
 # One article about it (in French):
-# 
 # http://www.menara.ma/fr/Actualites/Maroc/Societe/ci.retour_a_l_heure_gmt_a_partir_du_dimanche_31_aout_a_minuit_officiel_.default
-# 
 #
 # We have some further details posted here:
-# 
 # http://www.timeanddate.com/news/time/morocco-ends-dst-early-2008.html
-# 
 
 # From Steffen Thorsen (2009-03-17):
 # Morocco will observe DST from 2009-06-01 00:00 to 2009-08-21 00:00 according
 # to many sources, such as
-# 
 # http://news.marweb.com/morocco/entertainment/morocco-daylight-saving.html
-# 
-# 
 # http://www.medi1sat.ma/fr/depeche.aspx?idp=2312
-# 
 # (French)
 #
 # Our summary:
-# 
 # http://www.timeanddate.com/news/time/morocco-starts-dst-2009.html
-# 
 
 # From Alexander Krivenyshev (2009-03-17):
 # Here is a link to official document from Royaume du Maroc Premier Ministre,
-# Ministere de la Modernisation des Secteurs Publics
+# Minist?re de la Modernisation des Secteurs Publics
 #
 # Under Article 1 of Royal Decree No. 455-67 of Act 23 safar 1387 (2 june 1967)
 # concerning the amendment of the legal time, the Ministry of Modernization of
 # Public Sectors announced that the official time in the Kingdom will be
 # advanced 60 minutes from Sunday 31 May 2009 at midnight.
 #
-# 
 # http://www.mmsp.gov.ma/francais/Actualites_fr/PDF_Actualites_Fr/HeureEte_FR.pdf
-# 
-#
-# 
 # http://www.worldtimezone.com/dst_news/dst_news_morocco03.html
-# 
 
 # From Steffen Thorsen (2010-04-13):
 # Several news media in Morocco report that the Ministry of Modernization
@@ -821,14 +753,10 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 # 2010-05-02 to 2010-08-08.
 #
 # Example:
-# 
 # http://www.lavieeco.com/actualites/4099-le-maroc-passera-a-l-heure-d-ete-gmt1-le-2-mai.html
-# 
 # (French)
 # Our page:
-# 
 # http://www.timeanddate.com/news/time/morocco-starts-dst-2010.html
-# 
 
 # From Dan Abitol (2011-03-30):
 # ...Rules for Africa/Casablanca are the following (24h format)
@@ -838,34 +766,20 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 # The change was broadcast on the FM Radio
 # I ve called ANRT (telecom regulations in Morocco) at
 # +212.537.71.84.00
-# 
 # http://www.anrt.net.ma/fr/
-# 
 # They said that
-# 
 # http://www.map.ma/fr/sections/accueil/l_heure_legale_au_ma/view
-# 
 # is the official publication to look at.
 # They said that the decision was already taken.
 #
 # More articles in the press
-# 
-# http://www.yabiladi.com/articles/details/5058/secret-l-heure-d-ete-maroc-lev
-# 
-# e.html
-# 
+# http://www.yabiladi.com/articles/details/5058/secret-l-heure-d-ete-maroc-leve.html
 # http://www.lematin.ma/Actualite/Express/Article.asp?id=148923
-# 
-# 
 # http://www.lavieeco.com/actualite/Le-Maroc-passe-sur-GMT%2B1-a-partir-de-dim
-# anche-prochain-5538.html
-# 
 
 # From Petr Machata (2011-03-30):
 # They have it written in English here:
-# 
 # http://www.map.ma/eng/sections/home/morocco_to_spring_fo/view
-# 
 #
 # It says there that "Morocco will resume its standard time on July 31,
 # 2011 at midnight." Now they don't say whether they mean midnight of
@@ -873,20 +787,16 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 # also been like that in the past.
 
 # From Alexander Krivenyshev (2012-03-09):
-# According to Infomédiaire web site from Morocco (infomediaire.ma),
-# on March 9, 2012, (in French) Heure légale:
-# Le Maroc adopte officiellement l'heure d'été
-# 
+# According to Infom?diaire web site from Morocco (infomediaire.ma),
+# on March 9, 2012, (in French) Heure l?gale:
+# Le Maroc adopte officiellement l'heure d'?t?
 # http://www.infomediaire.ma/news/maroc/heure-l%C3%A9gale-le-maroc-adopte-officiellement-lheure-d%C3%A9t%C3%A9
-# 
 # Governing Council adopted draft decree, that Morocco DST starts on
 # the last Sunday of March (March 25, 2012) and ends on
 # last Sunday of September (September 30, 2012)
 # except the month of Ramadan.
 # or (brief)
-# 
 # http://www.worldtimezone.com/dst_news/dst_news_morocco06.html
-# 
 
 # From Arthur David Olson (2012-03-10):
 # The infomediaire.ma source indicates that the system is to be in
@@ -897,17 +807,13 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 
 # From Christophe Tropamer (2012-03-16):
 # Seen Morocco change again:
-# 
 # http://www.le2uminutes.com/actualite.php
-# 
-# "...à partir du dernier dimance d'avril et non fins mars,
-# comme annoncé précédemment."
+# "...? partir du dernier dimanche d'avril et non fins mars,
+# comme annonc? pr?c?demment."
 
 # From Milamber Space Network (2012-07-17):
 # The official return to GMT is announced by the Moroccan government:
-# 
 # http://www.mmsp.gov.ma/fr/actualites.aspx?id=288 [in French]
-# 
 #
 # Google translation, lightly edited:
 # Back to the standard time of the Kingdom (GMT)
@@ -1052,7 +958,7 @@ Zone Africa/Casablanca	-0:30:20 -	LMT	19
 # Assume that this has been true since Western Sahara switched to GMT,
 # since most of it was then controlled by Morocco.
 
-Zone Africa/El_Aaiun	-0:52:48 -	LMT	1934 Jan
+Zone Africa/El_Aaiun	-0:52:48 -	LMT	1934 Jan # El Aai?n
 			-1:00	-	WAT	1976 Apr 14
 			 0:00	Morocco	WE%sT
 
@@ -1102,15 +1008,17 @@ Zone	Africa/Niamey	 0:08:28 -	LMT	1912
 Zone	Africa/Lagos	0:13:36 -	LMT	1919 Sep
 			1:00	-	WAT
 
-# Reunion
+# R?union
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Indian/Reunion	3:41:52 -	LMT	1911 Jun	# Saint-Denis
-			4:00	-	RET	# Reunion Time
+			4:00	-	RET	# R?union Time
 #
-# Scattered Islands (Iles Eparses) administered from Reunion are as follows.
+# Crozet Islands also observes R?union time; see the 'antarctica' file.
+#
+# Scattered Islands (?les ?parses) administered from R?union are as follows.
 # The following information about them is taken from
-# Iles Eparses (www.outre-mer.gouv.fr/domtom/ile.htm, 1997-07-22, in French;
-# no longer available as of 1999-08-17).
+# ?les ?parses (, 1997-07-22,
+# in French; no longer available as of 1999-08-17).
 # We have no info about their time zone histories.
 #
 # Bassas da India - uninhabited
@@ -1125,28 +1033,17 @@ Zone	Africa/Kigali	2:00:16 -	LMT	1935 Ju
 			2:00	-	CAT
 
 # St Helena
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone Atlantic/St_Helena	-0:22:48 -	LMT	1890		# Jamestown
-			-0:22:48 -	JMT	1951	# Jamestown Mean Time
-			 0:00	-	GMT
+# See Africa/Abidjan.
 # The other parts of the St Helena territory are similar:
 #	Tristan da Cunha: on GMT, say Whitman and the CIA
-#	Ascension: on GMT, says usno1995 and the CIA
+#	Ascension: on GMT, say the USNO (1995-12-21) and the CIA
 #	Gough (scientific station since 1955; sealers wintered previously):
 #		on GMT, says the CIA
-#	Inaccessible, Nightingale: no information, but probably GMT
-
-# Sao Tome and Principe
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Sao_Tome	 0:26:56 -	LMT	1884
-			-0:36:32 -	LMT	1912	# Lisbon Mean Time
-			 0:00	-	GMT
+#	Inaccessible, Nightingale: uninhabited
 
+# S?o Tom? and Pr?ncipe
 # Senegal
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Dakar	-1:09:44 -	LMT	1912
-			-1:00	-	WAT	1941 Jun
-			 0:00	-	GMT
+# See Africa/Abidjan.
 
 # Seychelles
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -1160,17 +1057,7 @@ Zone	Indian/Mahe	3:41:48 -	LMT	1906 Jun	
 # Possibly the islands were uninhabited.
 
 # Sierra Leone
-# Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-# Whitman gives Mar 31 - Aug 31 for 1931 on; go with Shanks & Pottenger.
-Rule	SL	1935	1942	-	Jun	 1	0:00	0:40	SLST
-Rule	SL	1935	1942	-	Oct	 1	0:00	0	WAT
-Rule	SL	1957	1962	-	Jun	 1	0:00	1:00	SLST
-Rule	SL	1957	1962	-	Sep	 1	0:00	0	GMT
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Freetown	-0:53:00 -	LMT	1882
-			-0:53:00 -	FMT	1913 Jun # Freetown Mean Time
-			-1:00	SL	%s	1957
-			 0:00	SL	%s
+# See Africa/Abidjan.
 
 # Somalia
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -1193,9 +1080,9 @@ Zone Africa/Johannesburg 1:52:00 -	LMT	1
 
 # Sudan
 #
-# From 
-# Sudan News Agency (2000-01-13)
-# , also reported by Michael De Beukelaer-Dossche via Steffen Thorsen:
+# From 
+# Sudan News Agency (2000-01-13),
+# also reported by Micha?l De Beukelaer-Dossche via Steffen Thorsen:
 # Clocks will be moved ahead for 60 minutes all over the Sudan as of noon
 # Saturday....  This was announced Thursday by Caretaker State Minister for
 # Manpower Abdul-Rahman Nur-Eddin.
@@ -1226,14 +1113,12 @@ Zone Africa/Dar_es_Salaam 2:37:08 -	LMT	
 			3:00	-	EAT
 
 # Togo
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Lome	0:04:52 -	LMT	1893
-			0:00	-	GMT
+# See Africa/Abidjan.
 
 # Tunisia
 
 # From Gwillim Law (2005-04-30):
-# My correspondent, Risto Nykanen, has alerted me to another adoption of DST,
+# My correspondent, Risto Nyk?nen, has alerted me to another adoption of DST,
 # this time in Tunisia.  According to Yahoo France News
 # , in a story attributed to AP
 # and dated 2005-04-26, "Tunisia has decided to advance its official time by
@@ -1242,7 +1127,7 @@ Zone	Africa/Lome	0:04:52 -	LMT	1893
 # Saturday."  (My translation)
 #
 # From Oscar van Vlijmen (2005-05-02):
-# LaPresse, the first national daily newspaper ...
+# La Presse, the first national daily newspaper ...
 # 
 # ... DST for 2005: on: Sun May 1 0h standard time, off: Fri Sept. 30,
 # 1h standard time.
@@ -1256,18 +1141,12 @@ Zone	Africa/Lome	0:04:52 -	LMT	1893
 # From Steffen Thorsen (2009-03-16):
 # According to several news sources, Tunisia will not observe DST this year.
 # (Arabic)
-# 
 # http://www.elbashayer.com/?page=viewn&nid=42546
-# 
-# 
 # http://www.babnet.net/kiwidetail-15295.asp
-# 
 #
 # We have also confirmed this with the US embassy in Tunisia.
 # We have a wrap-up about this on the following page:
-# 
 # http://www.timeanddate.com/news/time/tunisia-cancels-dst-2009.html
-# 
 
 # From Alexander Krivenyshev (2009-03-17):
 # Here is a link to Tunis Afrique Presse News Agency
@@ -1275,20 +1154,17 @@ Zone	Africa/Lome	0:04:52 -	LMT	1893
 # Standard time to be kept the whole year long (tap.info.tn):
 #
 # (in English)
-# 
 # http://www.tap.info.tn/en/index.php?option=com_content&task=view&id=26813&Itemid=157
-# 
 #
 # (in Arabic)
-# 
 # http://www.tap.info.tn/ar/index.php?option=com_content&task=view&id=61240&Itemid=1
-# 
 
-# From Arthur David Olson (2009--3-18):
-# The Tunis Afrique Presse News Agency notice contains this: "This measure is due to the fact
-# that the fasting month of ramadan coincides with the period concerned by summer time.
-# Therefore, the standard time will be kept unchanged the whole year long."
-# So foregoing DST seems to be an exception (albeit one that may be repeated in the  future).
+# From Arthur David Olson (2009-03-18):
+# The Tunis Afrique Presse News Agency notice contains this: "This measure is
+# due to the fact that the fasting month of Ramadan coincides with the period
+# concerned by summer time.  Therefore, the standard time will be kept
+# unchanged the whole year long."  So foregoing DST seems to be an exception
+# (albeit one that may be repeated in the future).
 
 # From Alexander Krivenyshev (2010-03-27):
 # According to some news reports Tunis confirmed not to use DST in 2010
@@ -1300,12 +1176,8 @@ Zone	Africa/Lome	0:04:52 -	LMT	1893
 # coincided with the month of Ramadan..."
 #
 # (in Arabic)
-# 
 # http://www.moheet.com/show_news.aspx?nid=358861&pg=1
-# 
 # http://www.almadenahnews.com/newss/news.php?c=118&id=38036
-# or
-# 
 # http://www.worldtimezone.com/dst_news/dst_news_tunis02.html
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S

Modified: stable/6/share/zoneinfo/antarctica
==============================================================================
--- stable/6/share/zoneinfo/antarctica	Fri Aug 29 13:12:45 2014	(r270811)
+++ stable/6/share/zoneinfo/antarctica	Fri Aug 29 13:22:56 2014	(r270812)
@@ -1,16 +1,13 @@
-# 
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
 # From Paul Eggert (1999-11-15):
 # To keep things manageable, we list only locations occupied year-round; see
-# 
 # COMNAP - Stations and Bases
-# 
+# 
 # and
-# 
 # Summary of the Peri-Antarctic Islands (1998-07-23)
-# 
+# 
 # for information.
 # Unless otherwise specified, we have no time zone information.
 #
@@ -55,19 +52,19 @@ Rule	ChileAQ	2012	max	-	Sep	Sun>=2	4:00u
 
 # Argentina - year-round bases
 # Belgrano II, Confin Coast, -770227-0343737, since 1972-02-05
-# Esperanza, San Martin Land, -6323-05659, since 1952-12-17
-# Jubany, Potter Peninsula, King George Island, -6414-0602320, since 1982-01
-# Marambio, Seymour I, -6414-05637, since 1969-10-29
+# Carlini, Potter Cove, King George Island, -6414-0602320, since 1982-01
+# Esperanza, Hope Bay, -6323-05659, since 1952-12-17
+# Marambio, -6414-05637, since 1969-10-29
 # Orcadas, Laurie I, -6016-04444, since 1904-02-22
-# San Martin, Debenham I, -6807-06708, since 1951-03-21
+# San Mart?n, Barry I, -6808-06706, since 1951-03-21
 #	(except 1960-03 / 1976-03-21)
 
 # Australia - territories
 # Heard Island, McDonald Islands (uninhabited)
 #	previously sealers and scientific personnel wintered
-#	
 #	Margaret Turner reports
-#	 (1999-09-30) that they're UTC+5, with no DST;
+#	
+#	(1999-09-30) that they're UTC+5, with no DST;
 #	presumably this is when they have visitors.
 #
 # year-round bases
@@ -84,14 +81,10 @@ Rule	ChileAQ	2012	max	-	Sep	Sun>=2	4:00u
 # The changes occurred on 2009-10-18 at 02:00 (local times).
 #
 # Government source: (Australian Antarctic Division)
-# 
 # http://www.aad.gov.au/default.asp?casid=37079
-# 
 #
 # We have more background information here:
-# 
 # http://www.timeanddate.com/news/time/antarctica-new-times.html
-# 
 
 # From Steffen Thorsen (2010-03-10):
 # We got these changes from the Australian Antarctic Division: ...
@@ -106,19 +99,17 @@ Rule	ChileAQ	2012	max	-	Sep	Sun>=2	4:00u
 # - Mawson station stays on UTC+5.
 #
 # Background:
-# 
 # http://www.timeanddate.com/news/time/antartica-time-changes-2010.html
-# 
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Antarctica/Casey	0	-	zzz	1969
-			8:00	-	WST	2009 Oct 18 2:00
-						# Western (Aus) Standard Time
+			8:00	-	AWST	2009 Oct 18 2:00
+						# Australian Western Std Time
 			11:00	-	CAST	2010 Mar 5 2:00
 						# Casey Time
-			8:00	-	WST	2011 Oct 28 2:00
+			8:00	-	AWST	2011 Oct 28 2:00
 			11:00	-	CAST	2012 Feb 21 17:00u
-			8:00	-	WST
+			8:00	-	AWST
 Zone Antarctica/Davis	0	-	zzz	1957 Jan 13
 			7:00	-	DAVT	1964 Nov # Davis Time
 			0	-	zzz	1969 Feb
@@ -132,24 +123,27 @@ Zone Antarctica/Mawson	0	-	zzz	1954 Feb 
 						# Mawson Time
 			5:00	-	MAWT
 # References:
-# 
 # Casey Weather (1998-02-26)
-# 
-# 
+# 
 # Davis Station, Antarctica (1998-02-26)
-# 
-# 
+# 
 # Mawson Station, Antarctica (1998-02-25)
-# 
+# 
+
+# Belgium - year-round base
+# Princess Elisabeth, Queen Maud Land, -713412+0231200, since 2007
 
 # Brazil - year-round base
-# Comandante Ferraz, King George Island, -6205+05824, since 1983/4
+# Ferraz, King George Island, -6205+05824, since 1983/4
+
+# Bulgaria - year-round base
+# St. Kliment Ohridski, Livingston Island, -623829-0602153, since 1988
 
 # Chile - year-round bases and towns
 # Escudero, South Shetland Is, -621157-0585735, since 1994
-# Presidente Eduadro Frei, King George Island, -6214-05848, since 1969-03-07
-# General Bernardo O'Higgins, Antarctic Peninsula, -6319-05704, since 1948-02
-# Capitan Arturo Prat, -6230-05941
+# Frei Montalva, King George Island, -6214-05848, since 1969-03-07
+# O'Higgins, Antarctic Peninsula, -6319-05704, since 1948-02
+# Prat, -6230-05941
 # Villa Las Estrellas (a town), around the Frei base, since 1984-04-09
 # These locations have always used Santiago time; use TZ='America/Santiago'.
 
@@ -157,31 +151,35 @@ Zone Antarctica/Mawson	0	-	zzz	1954 Feb 
 # Great Wall, King George Island, -6213-05858, since 1985-02-20
 # Zhongshan, Larsemann Hills, Prydz Bay, -6922+07623, since 1989-02-26
 
-# France - year-round bases
+# France - year-round bases (also see "France & Italy")
 #
 # From Antoine Leca (1997-01-20):
 # Time data are from Nicole Pailleau at the IFRTP
 # (French Institute for Polar Research and Technology).
-# She confirms that French Southern Territories and Terre Adelie bases
-# don't observe daylight saving time, even if Terre Adelie supplies came
+# She confirms that French Southern Territories and Terre Ad?lie bases
+# don't observe daylight saving time, even if Terre Ad?lie supplies came
 # from Tasmania.
 #
 # French Southern Territories with year-round inhabitants
 #
-# Martin-de-Vivies Base, Amsterdam Island, -374105+0773155, since 1950
-# Alfred-Faure Base, Crozet Islands, -462551+0515152, since 1964
-# Port-aux-Francais, Kerguelen Islands, -492110+0701303, since 1951;
+# Alfred Faure, Possession Island, Crozet Islands, -462551+0515152, since 1964;
+#	sealing & whaling stations operated variously 1802/1911+;
+#	see Indian/Reunion.
+#
+# Martin-de-Vivi?s, Amsterdam Island, -374105+0773155, since 1950
+# Port-aux-Fran?ais, Kerguelen Islands, -492110+0701303, since 1951;
 #	whaling & sealing station operated 1908/1914, 1920/1929, and 1951/1956
 #
 # St Paul Island - near Amsterdam, uninhabited
 #	fishing stations operated variously 1819/1931
 #
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone Indian/Kerguelen	0	-	zzz	1950	# Port-aux-Francais
+Zone Indian/Kerguelen	0	-	zzz	1950	# Port-aux-Fran?ais
 			5:00	-	TFT	# ISO code TF Time
 #
 # year-round base in the main continent
-# Dumont-d'Urville, Ile des Petrels, -6640+14001, since 1956-11
+# Dumont d'Urville, ?le des P?trels, -6640+14001, since 1956-11
+#  (2005-12-05)
 #
 # Another base at Port-Martin, 50km east, began operation in 1947.
 # It was destroyed by fire on 1952-01-14.
@@ -191,20 +189,22 @@ Zone Antarctica/DumontDUrville 0 -	zzz	1
 			10:00	-	PMT	1952 Jan 14 # Port-Martin Time
 			0	-	zzz	1956 Nov
 			10:00	-	DDUT	# Dumont-d'Urville Time
-# Reference:
-# 
-# Dumont d'Urville Station (2005-12-05)
-# 
+
+# France & Italy - year-round base
+# Concordia, -750600+1232000, since 2005
 
 # Germany - year-round base
-# Georg von Neumayer, -7039-00815
+# Neumayer III, -704080-0081602, since 2009
 
-# India - year-round base
-# Dakshin Gangotri, -7005+01200
+# India - year-round bases
+# Bharati, -692428+0761114, since 2012
+# Maitri, -704558+0114356, since 1989
+
+# Italy - year-round base (also see "France & Italy")
+# Zuchelli, Terra Nova Bay, -744140+1640647, since 1986
 
 # Japan - year-round bases
-# Dome Fuji, -7719+03942
-# Syowa, -690022+0393524
+# Syowa (also known as Showa), -690022+0393524, since 1957
 #
 # From Hideyuki Suzuki (1999-02-06):
 # In all Japanese stations, +0300 is used as the standard time.
@@ -216,11 +216,11 @@ Zone Antarctica/DumontDUrville 0 -	zzz	1
 Zone Antarctica/Syowa	0	-	zzz	1957 Jan 29
 			3:00	-	SYOT	# Syowa Time
 # See:
-# 
 # NIPR Antarctic Research Activities (1999-08-17)
-# 
+# 
 
 # S Korea - year-round base
+# Jang Bogo, Terra Nova Bay, -743700+1641205 since 2014
 # King Sejong, King George Island, -6213-05847, since 1988
 
 # New Zealand - claims
@@ -269,6 +269,9 @@ Zone Antarctica/Troll	0	-	zzz	2005 Feb 1
 # Poland - year-round base
 # Arctowski, King George Island, -620945-0582745, since 1977
 
+# Romania - year-bound base
+# Law-Racovi??, Larsemann Hills, -692319+0762251, since 1986
+
 # Russia - year-round bases
 # Bellingshausen, King George Island, -621159-0585337, since 1968-02-22
 # Mirny, Davis coast, -6633+09301, since 1956-02
@@ -278,8 +281,8 @@ Zone Antarctica/Troll	0	-	zzz	2005 Feb 1
 #	year-round from 1960/61 to 1992
 
 # Vostok, since 1957-12-16, temporarily closed 1994-02/1994-11
-# 
-# From Craig Mundell (1994-12-15):
+# From Craig Mundell (1994-12-15)
+# :
 # Vostok, which is one of the Russian stations, is set on the same
 # time as Moscow, Russia.
 #
@@ -294,7 +297,7 @@ Zone Antarctica/Troll	0	-	zzz	2005 Feb 1
 #
 # From Paul Eggert (2001-05-04):
 # This seems to be hopelessly confusing, so I asked Lee Hotz about it
-# in person.  He said that some Antartic locations set their local
+# in person.  He said that some Antarctic locations set their local
 # time so that noon is the warmest part of the day, and that this
 # changes during the year and does not necessarily correspond to mean
 # solar noon.  So the Vostok time might have been whatever the clocks
@@ -306,9 +309,12 @@ Zone Antarctica/Vostok	0	-	zzz	1957 Dec 
 
 # S Africa - year-round bases
 # Marion Island, -4653+03752
-# Sanae, -7141-00250
+# SANAE IV, Vesleskarvet, Queen Maud Land, -714022-0025026, since 1997
+
+# Ukraine - year-round base
+# Vernadsky (formerly Faraday), Galindez Island, -651445-0641526, since 1954
 
-# UK
+# United Kingdom
 #
 # British Antarctic Territories (BAT) claims
 # South Orkney Islands
@@ -364,7 +370,7 @@ Zone Antarctica/Palmer	0	-	zzz	1965
 # but that he found it more convenient to keep GMT+12
 # as supplies for the station were coming from McMurdo Sound,
 # which was on GMT+12 because New Zealand was on GMT+12 all year
-# at that time (1957).  (Source: Siple's book 90 degrees SOUTH.)
+# at that time (1957).  (Source: Siple's book 90 Degrees South.)
 #
 # From Susan Smith
 # http://www.cybertours.com/whs/pole10.html

Modified: stable/6/share/zoneinfo/asia
==============================================================================
--- stable/6/share/zoneinfo/asia	Fri Aug 29 13:12:45 2014	(r270811)
+++ stable/6/share/zoneinfo/asia	Fri Aug 29 13:22:56 2014	(r270812)
@@ -1,4 +1,3 @@
-# 
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -32,7 +31,7 @@
 # A reliable and entertaining source about time zones is
 # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997).
 #
-# I invented the abbreviations marked `*' in the following table;
+# I invented the abbreviations marked '*' in the following table;
 # the rest are from earlier versions of this file, or from other sources.
 # Corrections are welcome!
 #	     std  dst
@@ -47,13 +46,14 @@
 #	7:00 WIB	west Indonesia (Waktu Indonesia Barat)

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From pluknet at FreeBSD.org  Fri Aug 29 13:24:50 2014
From: pluknet at FreeBSD.org (Sergey Kandaurov)
Date: Fri, 29 Aug 2014 13:24:49 +0000 (UTC)
Subject: svn commit: r270813 - stable/7/share/zoneinfo
Message-ID: <201408291324.s7TDOn8l053556@svn.freebsd.org>

Author: pluknet
Date: Fri Aug 29 13:24:49 2014
New Revision: 270813
URL: http://svnweb.freebsd.org/changeset/base/270813

Log:
  MFC r270728, tzdata2014f
  
  - Parts of Russia will change times on 2014-10-26.
  - Time zone name changes for Asia/Novokuznetsk and Xinjiang and Samoa
    and America/Metlakatla, new zones Asia/Chita and Asia/Srednekolymsk.
  - Australia will now use Axxx.
  - New zone tab data format.
  
  And lots of historical changes (See
  http://mm.icann.org/pipermail/tz-announce/2014-August/000023.html
  for the full details.)

Added:
  stable/7/share/zoneinfo/zone1970.tab
     - copied unchanged from r270728, head/contrib/tzdata/zone1970.tab
Modified:
  stable/7/share/zoneinfo/africa
  stable/7/share/zoneinfo/antarctica
  stable/7/share/zoneinfo/asia
  stable/7/share/zoneinfo/australasia
  stable/7/share/zoneinfo/backward
  stable/7/share/zoneinfo/etcetera
  stable/7/share/zoneinfo/europe
  stable/7/share/zoneinfo/factory
  stable/7/share/zoneinfo/leap-seconds.list   (contents, props changed)
  stable/7/share/zoneinfo/northamerica
  stable/7/share/zoneinfo/southamerica
  stable/7/share/zoneinfo/systemv
  stable/7/share/zoneinfo/yearistype.sh
  stable/7/share/zoneinfo/zone.tab
Directory Properties:
  stable/7/share/zoneinfo/   (props changed)

Modified: stable/7/share/zoneinfo/africa
==============================================================================
--- stable/7/share/zoneinfo/africa	Fri Aug 29 13:22:56 2014	(r270812)
+++ stable/7/share/zoneinfo/africa	Fri Aug 29 13:24:49 2014	(r270813)
@@ -1,4 +1,3 @@
-# 
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -35,13 +34,13 @@
 # Previous editions of this database used WAT, CAT, SAT, and EAT
 # for +0:00 through +3:00, respectively,
 # but Mark R V Murray reports that
-# `SAST' is the official abbreviation for +2:00 in the country of South Africa,
-# `CAT' is commonly used for +2:00 in countries north of South Africa, and
-# `WAT' is probably the best name for +1:00, as the common phrase for
-# the area that includes Nigeria is ``West Africa''.
-# He has heard of ``Western Sahara Time'' for +0:00 but can find no reference.
+# 'SAST' is the official abbreviation for +2:00 in the country of South Africa,
+# 'CAT' is commonly used for +2:00 in countries north of South Africa, and
+# 'WAT' is probably the best name for +1:00, as the common phrase for
+# the area that includes Nigeria is "West Africa".
+# He has heard of "Western Sahara Time" for +0:00 but can find no reference.
 #
-# To make things confusing, `WAT' seems to have been used for -1:00 long ago;
+# To make things confusing, 'WAT' seems to have been used for -1:00 long ago;
 # I'd guess that this was because people needed _some_ name for -1:00,
 # and at the time, far west Africa was the only major land area in -1:00.
 # This usage is now obsolete, as the last use of -1:00 on the African
@@ -54,7 +53,7 @@
 #	 2:00	SAST	South Africa Standard Time
 # and Murray suggests the following abbreviation:
 #	 1:00	WAT	West Africa Time
-# I realize that this leads to `WAT' being used for both -1:00 and 1:00
+# I realize that this leads to 'WAT' being used for both -1:00 and 1:00
 # for times before 1976, but this is the best I can think of
 # until we get more information.
 #
@@ -131,9 +130,7 @@ Zone	Africa/Gaborone	1:43:40 -	LMT	1885
 			2:00	-	CAT
 
 # Burkina Faso
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone Africa/Ouagadougou	-0:06:04 -	LMT	1912
-			 0:00	-	GMT
+# See Africa/Abidjan.
 
 # Burundi
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -161,7 +158,7 @@ Zone	Africa/Bangui	1:14:20	-	LMT	1912
 
 # Chad
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Ndjamena	1:00:12 -	LMT	1912
+Zone	Africa/Ndjamena	1:00:12 -	LMT	1912 # N'Djamena
 			1:00	-	WAT	1979 Oct 14
 			1:00	1:00	WAST	1980 Mar  8
 			1:00	-	WAT
@@ -183,10 +180,20 @@ Zone Africa/Lubumbashi	1:49:52 -	LMT	189
 Zone Africa/Brazzaville	1:01:08 -	LMT	1912
 			1:00	-	WAT
 
-# Cote D'Ivoire
+# C?te D'Ivoire / Ivory Coast
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Abidjan	-0:16:08 -	LMT	1912
 			 0:00	-	GMT
+Link Africa/Abidjan Africa/Bamako	# Mali
+Link Africa/Abidjan Africa/Banjul	# Gambia
+Link Africa/Abidjan Africa/Conakry	# Guinea
+Link Africa/Abidjan Africa/Dakar	# Senegal
+Link Africa/Abidjan Africa/Freetown	# Sierra Leone
+Link Africa/Abidjan Africa/Lome		# Togo
+Link Africa/Abidjan Africa/Nouakchott	# Mauritania
+Link Africa/Abidjan Africa/Ouagadougou	# Burkina Faso
+Link Africa/Abidjan Africa/Sao_Tome	# S?o Tom? and Pr?ncipe
+Link Africa/Abidjan Atlantic/St_Helena	# St Helena
 
 # Djibouti
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -231,13 +238,9 @@ Rule	Egypt	1990	1994	-	May	 1	1:00	1:00	
 # Egyptians would approve the cancellation."
 #
 # Egypt to cancel daylight saving time
-# 
 # http://www.almasryalyoum.com/en/node/407168
-# 
 # or
-# 
 # http://www.worldtimezone.com/dst_news/dst_news_egypt04.html
-# 
 Rule	Egypt	1995	2010	-	Apr	lastFri	 0:00s	1:00	S
 Rule	Egypt	1995	2005	-	Sep	lastThu	24:00	0	-
 # From Steffen Thorsen (2006-09-19):
@@ -249,7 +252,7 @@ Rule	Egypt	2006	only	-	Sep	21	24:00	0	-
 # From Dirk Losch (2007-08-14):
 # I received a mail from an airline which says that the daylight
 # saving time in Egypt will end in the night of 2007-09-06 to 2007-09-07.
-# From Jesper Norgaard Welen (2007-08-15): [The following agree:]
+# From Jesper N?rgaard Welen (2007-08-15): [The following agree:]
 # http://www.nentjes.info/Bill/bill5.htm
 # http://www.timeanddate.com/worldclock/city.html?n=53
 # From Steffen Thorsen (2007-09-04): The official information...:
@@ -288,15 +291,9 @@ Rule	Egypt	2007	only	-	Sep	Thu>=1	24:00	
 #
 # timeanddate[2] and another site I've found[3] also support that.
 #
-# [1] 
-# https://bugzilla.redhat.com/show_bug.cgi?id=492263
-# 
-# [2] 
-# http://www.timeanddate.com/worldclock/clockchange.html?n=53
-# 
-# [3] 
-# http://wwp.greenwichmeantime.com/time-zone/africa/egypt/
-# 
+# [1] https://bugzilla.redhat.com/show_bug.cgi?id=492263
+# [2] http://www.timeanddate.com/worldclock/clockchange.html?n=53
+# [3] http://wwp.greenwichmeantime.com/time-zone/africa/egypt/
 
 # From Arthur David Olson (2009-04-20):
 # In 2009 (and for the next several years), Ramadan ends before the fourth
@@ -306,14 +303,10 @@ Rule	Egypt	2007	only	-	Sep	Thu>=1	24:00	
 # From Steffen Thorsen (2009-08-11):
 # We have been able to confirm the August change with the Egyptian Cabinet
 # Information and Decision Support Center:
-# 
 # http://www.timeanddate.com/news/time/egypt-dst-ends-2009.html
-# 
 #
 # The Middle East News Agency
-# 
 # http://www.mena.org.eg/index.aspx
-# 
 # also reports "Egypt starts winter time on August 21"
 # today in article numbered "71, 11/08/2009 12:25 GMT."
 # Only the title above is available without a subscription to their service,
@@ -321,19 +314,14 @@ Rule	Egypt	2007	only	-	Sep	Thu>=1	24:00	
 # (at least today).
 
 # From Alexander Krivenyshev (2010-07-20):
-# According to News from Egypt -  Al-Masry Al-Youm Egypt's cabinet has
+# According to News from Egypt - Al-Masry Al-Youm Egypt's cabinet has
 # decided that Daylight Saving Time will not be used in Egypt during
 # Ramadan.
 #
 # Arabic translation:
-# "Clocks to go back during Ramadan--and then forward again"
-# 
+# "Clocks to go back during Ramadan - and then forward again"
 # http://www.almasryalyoum.com/en/news/clocks-go-back-during-ramadan-and-then-forward-again
-# 
-# or
-# 
 # http://www.worldtimezone.com/dst_news/dst_news_egypt02.html
-# 
 
 # From Ahmad El-Dardiry (2014-05-07):
 # Egypt is to change back to Daylight system on May 15
@@ -433,10 +421,15 @@ Zone	Africa/Asmara	2:35:32 -	LMT	1870
 			3:00	-	EAT
 
 # Ethiopia
-# From Paul Eggert (2006-03-22):
-# Shanks & Pottenger write that Ethiopia had six narrowly-spaced time zones
-# between 1870 and 1890, and that they merged to 38E50 (2:35:20) in 1890.
-# We'll guess that 38E50 is for Adis Dera.
+# From Paul Eggert (2014-07-31):
+# Like the Swahili of Kenya and Tanzania, many Ethiopians keep a
+# 12-hour clock starting at our 06:00, so their "8 o'clock" is our
+# 02:00 or 14:00.  Keep this in mind when you ask the time in Amharic.
+#
+# Shanks & Pottenger write that Ethiopia had six narrowly-spaced time
+# zones between 1870 and 1890, that they merged to 38E50 (2:35:20) in
+# 1890, and that they switched to 3:00 on 1936-05-05.  Perhaps 38E50
+# was for Adis Dera.  Quite likely the Shanks data are wrong anyway.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Africa/Addis_Ababa	2:34:48 -	LMT	1870
 			2:35:20	-	ADMT	1936 May 5    # Adis Dera MT
@@ -448,28 +441,24 @@ Zone Africa/Libreville	0:37:48 -	LMT	191
 			1:00	-	WAT
 
 # Gambia
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Banjul	-1:06:36 -	LMT	1912
-			-1:06:36 -	BMT	1935	# Banjul Mean Time
-			-1:00	-	WAT	1964
-			 0:00	-	GMT
+# See Africa/Abidjan.
 
 # Ghana
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-# Whitman says DST was observed from 1931 to ``the present'';
-# go with Shanks & Pottenger.
-Rule	Ghana	1936	1942	-	Sep	 1	0:00	0:20	GHST
-Rule	Ghana	1936	1942	-	Dec	31	0:00	0	GMT
+# Whitman says DST was observed from 1931 to "the present";
+# Shanks & Pottenger say 1936 to 1942;
+# and September 1 to January 1 is given by:
+# Scott Keltie J, Epstein M (eds), The Statesman's Year-Book,
+# 57th ed. Macmillan, London (1920), OCLC 609408015, pp xxviii.
+# For lack of better info, assume DST was observed from 1920 to 1942.
+Rule	Ghana	1920	1942	-	Sep	 1	0:00	0:20	GHST
+Rule	Ghana	1920	1942	-	Dec	31	0:00	0	GMT
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Accra	-0:00:52 -	LMT	1918
 			 0:00	Ghana	%s
 
 # Guinea
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Conakry	-0:54:52 -	LMT	1912
-			 0:00	-	GMT	1934 Feb 26
-			-1:00	-	WAT	1960
-			 0:00	-	GMT
+# See Africa/Abidjan.
 
 # Guinea-Bissau
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -577,18 +566,8 @@ Zone	Africa/Blantyre	2:20:00 -	LMT	1903 
 			2:00	-	CAT
 
 # Mali
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Bamako	-0:32:00 -	LMT	1912
-			 0:00	-	GMT	1934 Feb 26
-			-1:00	-	WAT	1960 Jun 20
-			 0:00	-	GMT
-
 # Mauritania
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone Africa/Nouakchott	-1:03:48 -	LMT	1912
-			 0:00	-	GMT	1934 Feb 26
-			-1:00	-	WAT	1960 Nov 28
-			 0:00	-	GMT
+# See Africa/Abidjan.
 
 # Mauritius
 
@@ -612,9 +591,7 @@ Zone Africa/Nouakchott	-1:03:48 -	LMT	19
 
 # From Steffen Thorsen (2008-07-10):
 # According to
-# 
 # http://www.lexpress.mu/display_article.php?news_id=111216
-# 
 # (in French), Mauritius will start and end their DST a few days earlier
 # than previously announced (2008-11-01 to 2009-03-31).  The new start
 # date is 2008-10-26 at 02:00 and the new end date is 2009-03-27 (no time
@@ -633,18 +610,13 @@ Zone Africa/Nouakchott	-1:03:48 -	LMT	19
 # published on Monday, June 30, 2008...
 #
 # I guess that article in French "Le gouvernement avance l'introduction
-# de l'heure d'ete" stating that DST in Mauritius starting on October 26
-# and ending on March 27, 2009 is the most recent one.
-# ...
-# 
+# de l'heure d'?t?" stating that DST in Mauritius starting on October 26
+# and ending on March 27, 2009 is the most recent one....
 # http://www.worldtimezone.com/dst_news/dst_news_mauritius02.html
-# 
 
 # From Riad M. Hossen Ally (2008-08-03):
 # The Government of Mauritius weblink
-# 
 # http://www.gov.mu/portal/site/pmosite/menuitem.4ca0efdee47462e7440a600248a521ca/?content_id=4728ca68b2a5b110VgnVCM1000000a04a8c0RCRD
-# 
 # Cabinet Decision of July 18th, 2008 states as follows:
 #
 # 4. ...Cabinet has agreed to the introduction into the National Assembly
@@ -654,33 +626,25 @@ Zone Africa/Nouakchott	-1:03:48 -	LMT	19
 # States of America. It will start at two o'clock in the morning on the
 # last Sunday of October and will end at two o'clock in the morning on
 # the last Sunday of March the following year. The summer time for the
-# year 2008 - 2009 will, therefore, be effective as from 26 October 2008
+# year 2008-2009 will, therefore, be effective as from 26 October 2008
 # and end on 29 March 2009.
 
 # From Ed Maste (2008-10-07):
 # THE TIME BILL (No. XXVII of 2008) Explanatory Memorandum states the
 # beginning / ending of summer time is 2 o'clock standard time in the
 # morning of the last Sunday of October / last Sunday of March.
-# 
 # http://www.gov.mu/portal/goc/assemblysite/file/bill2708.pdf
-# 
 
 # From Steffen Thorsen (2009-06-05):
 # According to several sources, Mauritius will not continue to observe
 # DST the coming summer...
 #
 # Some sources, in French:
-# 
 # http://www.defimedia.info/news/946/Rashid-Beebeejaun-:-%C2%AB-L%E2%80%99heure-d%E2%80%99%C3%A9t%C3%A9-ne-sera-pas-appliqu%C3%A9e-cette-ann%C3%A9e-%C2%BB
-# 
-# 
 # http://lexpress.mu/Story/3398~Beebeejaun---Les-objectifs-d-%C3%A9conomie-d-%C3%A9nergie-de-l-heure-d-%C3%A9t%C3%A9-ont-%C3%A9t%C3%A9-atteints-
-# 
 #
 # Our wrap-up:
-# 
 # http://www.timeanddate.com/news/time/mauritius-dst-will-not-repeat.html
-# 
 
 # From Arthur David Olson (2009-07-11):
 # The "mauritius-dst-will-not-repeat" wrapup includes this:
@@ -704,7 +668,7 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 			3:00	-	EAT
 
 # Morocco
-# See the `europe' file for Spanish Morocco (Africa/Ceuta).
+# See the 'europe' file for Spanish Morocco (Africa/Ceuta).
 
 # From Alex Krivenyshev (2008-05-09):
 # Here is an article that Morocco plan to introduce Daylight Saving Time between
@@ -712,60 +676,43 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 #
 # "... Morocco is to save energy by adjusting its clock during summer so it will
 # be one hour ahead of GMT between 1 June and 27 September, according to
-# Communication Minister and Gov ernment Spokesman, Khalid Naciri...."
+# Communication Minister and Government Spokesman, Khalid Naciri...."
 #
-# 
 # http://www.worldtimezone.net/dst_news/dst_news_morocco01.html
-# 
-# OR
-# 
 # http://en.afrik.com/news11892.html
-# 
 
 # From Alex Krivenyshev (2008-05-09):
 # The Morocco time change can be confirmed on Morocco web site Maghreb Arabe Presse:
-# 
 # http://www.map.ma/eng/sections/box3/morocco_shifts_to_da/view
-# 
 #
 # Morocco shifts to daylight time on June 1st through September 27, Govt.
 # spokesman.
 
 # From Patrice Scattolin (2008-05-09):
 # According to this article:
-# 
 # http://www.avmaroc.com/actualite/heure-dete-comment-a127896.html
-# 
-# (and republished here:
-# 
-# http://www.actu.ma/heure-dete-comment_i127896_0.html
-# 
-# )
-# the changes occurs at midnight:
-#
-# saturday night may 31st at midnight (which in french is to be
-# intrepreted as the night between saturday and sunday)
-# sunday night the 28th  at midnight
-#
-# Seeing that the 28th is monday, I am guessing that she intends to say
-# the midnight of the 28th which is the midnight between sunday and
-# monday, which jives with other sources that say that it's inclusive
-# june1st to sept 27th.
+# (and republished here: )
+# the changes occur at midnight:
+#
+# Saturday night May 31st at midnight (which in French is to be
+# interpreted as the night between Saturday and Sunday)
+# Sunday night the 28th at midnight
+#
+# Seeing that the 28th is Monday, I am guessing that she intends to say
+# the midnight of the 28th which is the midnight between Sunday and
+# Monday, which jives with other sources that say that it's inclusive
+# June 1st to Sept 27th.
 #
 # The decision was taken by decree *2-08-224 *but I can't find the decree
 # published on the web.
 #
 # It's also confirmed here:
-# 
 # http://www.maroc.ma/NR/exeres/FACF141F-D910-44B0-B7FA-6E03733425D1.htm
-# 
-# on a government portal as being  between june 1st and sept 27th (not yet
-# posted in english).
+# on a government portal as being between June 1st and Sept 27th (not yet
+# posted in English).
 #
-# The following google query will generate many relevant hits:
-# 
+# The following Google query will generate many relevant hits:
 # http://www.google.com/search?hl=en&q=Conseil+de+gouvernement+maroc+heure+avance&btnG=Search
-# 
 
 # From Steffen Thorsen (2008-08-27):
 # Morocco will change the clocks back on the midnight between August 31
@@ -773,47 +720,32 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 # of September:
 #
 # One article about it (in French):
-# 
 # http://www.menara.ma/fr/Actualites/Maroc/Societe/ci.retour_a_l_heure_gmt_a_partir_du_dimanche_31_aout_a_minuit_officiel_.default
-# 
 #
 # We have some further details posted here:
-# 
 # http://www.timeanddate.com/news/time/morocco-ends-dst-early-2008.html
-# 
 
 # From Steffen Thorsen (2009-03-17):
 # Morocco will observe DST from 2009-06-01 00:00 to 2009-08-21 00:00 according
 # to many sources, such as
-# 
 # http://news.marweb.com/morocco/entertainment/morocco-daylight-saving.html
-# 
-# 
 # http://www.medi1sat.ma/fr/depeche.aspx?idp=2312
-# 
 # (French)
 #
 # Our summary:
-# 
 # http://www.timeanddate.com/news/time/morocco-starts-dst-2009.html
-# 
 
 # From Alexander Krivenyshev (2009-03-17):
 # Here is a link to official document from Royaume du Maroc Premier Ministre,
-# Ministere de la Modernisation des Secteurs Publics
+# Minist?re de la Modernisation des Secteurs Publics
 #
 # Under Article 1 of Royal Decree No. 455-67 of Act 23 safar 1387 (2 june 1967)
 # concerning the amendment of the legal time, the Ministry of Modernization of
 # Public Sectors announced that the official time in the Kingdom will be
 # advanced 60 minutes from Sunday 31 May 2009 at midnight.
 #
-# 
 # http://www.mmsp.gov.ma/francais/Actualites_fr/PDF_Actualites_Fr/HeureEte_FR.pdf
-# 
-#
-# 
 # http://www.worldtimezone.com/dst_news/dst_news_morocco03.html
-# 
 
 # From Steffen Thorsen (2010-04-13):
 # Several news media in Morocco report that the Ministry of Modernization
@@ -821,14 +753,10 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 # 2010-05-02 to 2010-08-08.
 #
 # Example:
-# 
 # http://www.lavieeco.com/actualites/4099-le-maroc-passera-a-l-heure-d-ete-gmt1-le-2-mai.html
-# 
 # (French)
 # Our page:
-# 
 # http://www.timeanddate.com/news/time/morocco-starts-dst-2010.html
-# 
 
 # From Dan Abitol (2011-03-30):
 # ...Rules for Africa/Casablanca are the following (24h format)
@@ -838,34 +766,20 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 # The change was broadcast on the FM Radio
 # I ve called ANRT (telecom regulations in Morocco) at
 # +212.537.71.84.00
-# 
 # http://www.anrt.net.ma/fr/
-# 
 # They said that
-# 
 # http://www.map.ma/fr/sections/accueil/l_heure_legale_au_ma/view
-# 
 # is the official publication to look at.
 # They said that the decision was already taken.
 #
 # More articles in the press
-# 
-# http://www.yabiladi.com/articles/details/5058/secret-l-heure-d-ete-maroc-lev
-# 
-# e.html
-# 
+# http://www.yabiladi.com/articles/details/5058/secret-l-heure-d-ete-maroc-leve.html
 # http://www.lematin.ma/Actualite/Express/Article.asp?id=148923
-# 
-# 
 # http://www.lavieeco.com/actualite/Le-Maroc-passe-sur-GMT%2B1-a-partir-de-dim
-# anche-prochain-5538.html
-# 
 
 # From Petr Machata (2011-03-30):
 # They have it written in English here:
-# 
 # http://www.map.ma/eng/sections/home/morocco_to_spring_fo/view
-# 
 #
 # It says there that "Morocco will resume its standard time on July 31,
 # 2011 at midnight." Now they don't say whether they mean midnight of
@@ -873,20 +787,16 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 # also been like that in the past.
 
 # From Alexander Krivenyshev (2012-03-09):
-# According to Infomédiaire web site from Morocco (infomediaire.ma),
-# on March 9, 2012, (in French) Heure légale:
-# Le Maroc adopte officiellement l'heure d'été
-# 
+# According to Infom?diaire web site from Morocco (infomediaire.ma),
+# on March 9, 2012, (in French) Heure l?gale:
+# Le Maroc adopte officiellement l'heure d'?t?
 # http://www.infomediaire.ma/news/maroc/heure-l%C3%A9gale-le-maroc-adopte-officiellement-lheure-d%C3%A9t%C3%A9
-# 
 # Governing Council adopted draft decree, that Morocco DST starts on
 # the last Sunday of March (March 25, 2012) and ends on
 # last Sunday of September (September 30, 2012)
 # except the month of Ramadan.
 # or (brief)
-# 
 # http://www.worldtimezone.com/dst_news/dst_news_morocco06.html
-# 
 
 # From Arthur David Olson (2012-03-10):
 # The infomediaire.ma source indicates that the system is to be in
@@ -897,17 +807,13 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 
 # From Christophe Tropamer (2012-03-16):
 # Seen Morocco change again:
-# 
 # http://www.le2uminutes.com/actualite.php
-# 
-# "...à partir du dernier dimance d'avril et non fins mars,
-# comme annoncé précédemment."
+# "...? partir du dernier dimanche d'avril et non fins mars,
+# comme annonc? pr?c?demment."
 
 # From Milamber Space Network (2012-07-17):
 # The official return to GMT is announced by the Moroccan government:
-# 
 # http://www.mmsp.gov.ma/fr/actualites.aspx?id=288 [in French]
-# 
 #
 # Google translation, lightly edited:
 # Back to the standard time of the Kingdom (GMT)
@@ -1052,7 +958,7 @@ Zone Africa/Casablanca	-0:30:20 -	LMT	19
 # Assume that this has been true since Western Sahara switched to GMT,
 # since most of it was then controlled by Morocco.
 
-Zone Africa/El_Aaiun	-0:52:48 -	LMT	1934 Jan
+Zone Africa/El_Aaiun	-0:52:48 -	LMT	1934 Jan # El Aai?n
 			-1:00	-	WAT	1976 Apr 14
 			 0:00	Morocco	WE%sT
 
@@ -1102,15 +1008,17 @@ Zone	Africa/Niamey	 0:08:28 -	LMT	1912
 Zone	Africa/Lagos	0:13:36 -	LMT	1919 Sep
 			1:00	-	WAT
 
-# Reunion
+# R?union
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Indian/Reunion	3:41:52 -	LMT	1911 Jun	# Saint-Denis
-			4:00	-	RET	# Reunion Time
+			4:00	-	RET	# R?union Time
 #
-# Scattered Islands (Iles Eparses) administered from Reunion are as follows.
+# Crozet Islands also observes R?union time; see the 'antarctica' file.
+#
+# Scattered Islands (?les ?parses) administered from R?union are as follows.
 # The following information about them is taken from
-# Iles Eparses (www.outre-mer.gouv.fr/domtom/ile.htm, 1997-07-22, in French;
-# no longer available as of 1999-08-17).
+# ?les ?parses (, 1997-07-22,
+# in French; no longer available as of 1999-08-17).
 # We have no info about their time zone histories.
 #
 # Bassas da India - uninhabited
@@ -1125,28 +1033,17 @@ Zone	Africa/Kigali	2:00:16 -	LMT	1935 Ju
 			2:00	-	CAT
 
 # St Helena
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone Atlantic/St_Helena	-0:22:48 -	LMT	1890		# Jamestown
-			-0:22:48 -	JMT	1951	# Jamestown Mean Time
-			 0:00	-	GMT
+# See Africa/Abidjan.
 # The other parts of the St Helena territory are similar:
 #	Tristan da Cunha: on GMT, say Whitman and the CIA
-#	Ascension: on GMT, says usno1995 and the CIA
+#	Ascension: on GMT, say the USNO (1995-12-21) and the CIA
 #	Gough (scientific station since 1955; sealers wintered previously):
 #		on GMT, says the CIA
-#	Inaccessible, Nightingale: no information, but probably GMT
-
-# Sao Tome and Principe
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Sao_Tome	 0:26:56 -	LMT	1884
-			-0:36:32 -	LMT	1912	# Lisbon Mean Time
-			 0:00	-	GMT
+#	Inaccessible, Nightingale: uninhabited
 
+# S?o Tom? and Pr?ncipe
 # Senegal
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Dakar	-1:09:44 -	LMT	1912
-			-1:00	-	WAT	1941 Jun
-			 0:00	-	GMT
+# See Africa/Abidjan.
 
 # Seychelles
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -1160,17 +1057,7 @@ Zone	Indian/Mahe	3:41:48 -	LMT	1906 Jun	
 # Possibly the islands were uninhabited.
 
 # Sierra Leone
-# Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-# Whitman gives Mar 31 - Aug 31 for 1931 on; go with Shanks & Pottenger.
-Rule	SL	1935	1942	-	Jun	 1	0:00	0:40	SLST
-Rule	SL	1935	1942	-	Oct	 1	0:00	0	WAT
-Rule	SL	1957	1962	-	Jun	 1	0:00	1:00	SLST
-Rule	SL	1957	1962	-	Sep	 1	0:00	0	GMT
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Freetown	-0:53:00 -	LMT	1882
-			-0:53:00 -	FMT	1913 Jun # Freetown Mean Time
-			-1:00	SL	%s	1957
-			 0:00	SL	%s
+# See Africa/Abidjan.
 
 # Somalia
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -1193,9 +1080,9 @@ Zone Africa/Johannesburg 1:52:00 -	LMT	1
 
 # Sudan
 #
-# From 
-# Sudan News Agency (2000-01-13)
-# , also reported by Michael De Beukelaer-Dossche via Steffen Thorsen:
+# From 
+# Sudan News Agency (2000-01-13),
+# also reported by Micha?l De Beukelaer-Dossche via Steffen Thorsen:
 # Clocks will be moved ahead for 60 minutes all over the Sudan as of noon
 # Saturday....  This was announced Thursday by Caretaker State Minister for
 # Manpower Abdul-Rahman Nur-Eddin.
@@ -1226,14 +1113,12 @@ Zone Africa/Dar_es_Salaam 2:37:08 -	LMT	
 			3:00	-	EAT
 
 # Togo
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Lome	0:04:52 -	LMT	1893
-			0:00	-	GMT
+# See Africa/Abidjan.
 
 # Tunisia
 
 # From Gwillim Law (2005-04-30):
-# My correspondent, Risto Nykanen, has alerted me to another adoption of DST,
+# My correspondent, Risto Nyk?nen, has alerted me to another adoption of DST,
 # this time in Tunisia.  According to Yahoo France News
 # , in a story attributed to AP
 # and dated 2005-04-26, "Tunisia has decided to advance its official time by
@@ -1242,7 +1127,7 @@ Zone	Africa/Lome	0:04:52 -	LMT	1893
 # Saturday."  (My translation)
 #
 # From Oscar van Vlijmen (2005-05-02):
-# LaPresse, the first national daily newspaper ...
+# La Presse, the first national daily newspaper ...
 # 
 # ... DST for 2005: on: Sun May 1 0h standard time, off: Fri Sept. 30,
 # 1h standard time.
@@ -1256,18 +1141,12 @@ Zone	Africa/Lome	0:04:52 -	LMT	1893
 # From Steffen Thorsen (2009-03-16):
 # According to several news sources, Tunisia will not observe DST this year.
 # (Arabic)
-# 
 # http://www.elbashayer.com/?page=viewn&nid=42546
-# 
-# 
 # http://www.babnet.net/kiwidetail-15295.asp
-# 
 #
 # We have also confirmed this with the US embassy in Tunisia.
 # We have a wrap-up about this on the following page:
-# 
 # http://www.timeanddate.com/news/time/tunisia-cancels-dst-2009.html
-# 
 
 # From Alexander Krivenyshev (2009-03-17):
 # Here is a link to Tunis Afrique Presse News Agency
@@ -1275,20 +1154,17 @@ Zone	Africa/Lome	0:04:52 -	LMT	1893
 # Standard time to be kept the whole year long (tap.info.tn):
 #
 # (in English)
-# 
 # http://www.tap.info.tn/en/index.php?option=com_content&task=view&id=26813&Itemid=157
-# 
 #
 # (in Arabic)
-# 
 # http://www.tap.info.tn/ar/index.php?option=com_content&task=view&id=61240&Itemid=1
-# 
 
-# From Arthur David Olson (2009--3-18):
-# The Tunis Afrique Presse News Agency notice contains this: "This measure is due to the fact
-# that the fasting month of ramadan coincides with the period concerned by summer time.
-# Therefore, the standard time will be kept unchanged the whole year long."
-# So foregoing DST seems to be an exception (albeit one that may be repeated in the  future).
+# From Arthur David Olson (2009-03-18):
+# The Tunis Afrique Presse News Agency notice contains this: "This measure is
+# due to the fact that the fasting month of Ramadan coincides with the period
+# concerned by summer time.  Therefore, the standard time will be kept
+# unchanged the whole year long."  So foregoing DST seems to be an exception
+# (albeit one that may be repeated in the future).
 
 # From Alexander Krivenyshev (2010-03-27):
 # According to some news reports Tunis confirmed not to use DST in 2010
@@ -1300,12 +1176,8 @@ Zone	Africa/Lome	0:04:52 -	LMT	1893
 # coincided with the month of Ramadan..."
 #
 # (in Arabic)
-# 
 # http://www.moheet.com/show_news.aspx?nid=358861&pg=1
-# 
 # http://www.almadenahnews.com/newss/news.php?c=118&id=38036
-# or
-# 
 # http://www.worldtimezone.com/dst_news/dst_news_tunis02.html
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S

Modified: stable/7/share/zoneinfo/antarctica
==============================================================================
--- stable/7/share/zoneinfo/antarctica	Fri Aug 29 13:22:56 2014	(r270812)
+++ stable/7/share/zoneinfo/antarctica	Fri Aug 29 13:24:49 2014	(r270813)
@@ -1,16 +1,13 @@
-# 
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
 # From Paul Eggert (1999-11-15):
 # To keep things manageable, we list only locations occupied year-round; see
-# 
 # COMNAP - Stations and Bases
-# 
+# 
 # and
-# 
 # Summary of the Peri-Antarctic Islands (1998-07-23)
-# 
+# 
 # for information.
 # Unless otherwise specified, we have no time zone information.
 #
@@ -55,19 +52,19 @@ Rule	ChileAQ	2012	max	-	Sep	Sun>=2	4:00u
 
 # Argentina - year-round bases
 # Belgrano II, Confin Coast, -770227-0343737, since 1972-02-05
-# Esperanza, San Martin Land, -6323-05659, since 1952-12-17
-# Jubany, Potter Peninsula, King George Island, -6414-0602320, since 1982-01
-# Marambio, Seymour I, -6414-05637, since 1969-10-29
+# Carlini, Potter Cove, King George Island, -6414-0602320, since 1982-01
+# Esperanza, Hope Bay, -6323-05659, since 1952-12-17
+# Marambio, -6414-05637, since 1969-10-29
 # Orcadas, Laurie I, -6016-04444, since 1904-02-22
-# San Martin, Debenham I, -6807-06708, since 1951-03-21
+# San Mart?n, Barry I, -6808-06706, since 1951-03-21
 #	(except 1960-03 / 1976-03-21)
 
 # Australia - territories
 # Heard Island, McDonald Islands (uninhabited)
 #	previously sealers and scientific personnel wintered
-#	
 #	Margaret Turner reports
-#	 (1999-09-30) that they're UTC+5, with no DST;
+#	
+#	(1999-09-30) that they're UTC+5, with no DST;
 #	presumably this is when they have visitors.
 #
 # year-round bases
@@ -84,14 +81,10 @@ Rule	ChileAQ	2012	max	-	Sep	Sun>=2	4:00u
 # The changes occurred on 2009-10-18 at 02:00 (local times).
 #
 # Government source: (Australian Antarctic Division)
-# 
 # http://www.aad.gov.au/default.asp?casid=37079
-# 
 #
 # We have more background information here:
-# 
 # http://www.timeanddate.com/news/time/antarctica-new-times.html
-# 
 
 # From Steffen Thorsen (2010-03-10):
 # We got these changes from the Australian Antarctic Division: ...
@@ -106,19 +99,17 @@ Rule	ChileAQ	2012	max	-	Sep	Sun>=2	4:00u
 # - Mawson station stays on UTC+5.
 #
 # Background:
-# 
 # http://www.timeanddate.com/news/time/antartica-time-changes-2010.html
-# 
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Antarctica/Casey	0	-	zzz	1969
-			8:00	-	WST	2009 Oct 18 2:00
-						# Western (Aus) Standard Time
+			8:00	-	AWST	2009 Oct 18 2:00
+						# Australian Western Std Time
 			11:00	-	CAST	2010 Mar 5 2:00
 						# Casey Time
-			8:00	-	WST	2011 Oct 28 2:00
+			8:00	-	AWST	2011 Oct 28 2:00
 			11:00	-	CAST	2012 Feb 21 17:00u
-			8:00	-	WST
+			8:00	-	AWST
 Zone Antarctica/Davis	0	-	zzz	1957 Jan 13
 			7:00	-	DAVT	1964 Nov # Davis Time
 			0	-	zzz	1969 Feb
@@ -132,24 +123,27 @@ Zone Antarctica/Mawson	0	-	zzz	1954 Feb 
 						# Mawson Time
 			5:00	-	MAWT
 # References:
-# 
 # Casey Weather (1998-02-26)
-# 
-# 
+# 
 # Davis Station, Antarctica (1998-02-26)
-# 
-# 
+# 
 # Mawson Station, Antarctica (1998-02-25)
-# 
+# 
+
+# Belgium - year-round base
+# Princess Elisabeth, Queen Maud Land, -713412+0231200, since 2007
 
 # Brazil - year-round base
-# Comandante Ferraz, King George Island, -6205+05824, since 1983/4
+# Ferraz, King George Island, -6205+05824, since 1983/4
+
+# Bulgaria - year-round base
+# St. Kliment Ohridski, Livingston Island, -623829-0602153, since 1988
 
 # Chile - year-round bases and towns
 # Escudero, South Shetland Is, -621157-0585735, since 1994
-# Presidente Eduadro Frei, King George Island, -6214-05848, since 1969-03-07
-# General Bernardo O'Higgins, Antarctic Peninsula, -6319-05704, since 1948-02
-# Capitan Arturo Prat, -6230-05941
+# Frei Montalva, King George Island, -6214-05848, since 1969-03-07
+# O'Higgins, Antarctic Peninsula, -6319-05704, since 1948-02
+# Prat, -6230-05941
 # Villa Las Estrellas (a town), around the Frei base, since 1984-04-09
 # These locations have always used Santiago time; use TZ='America/Santiago'.
 
@@ -157,31 +151,35 @@ Zone Antarctica/Mawson	0	-	zzz	1954 Feb 
 # Great Wall, King George Island, -6213-05858, since 1985-02-20
 # Zhongshan, Larsemann Hills, Prydz Bay, -6922+07623, since 1989-02-26
 
-# France - year-round bases
+# France - year-round bases (also see "France & Italy")
 #
 # From Antoine Leca (1997-01-20):
 # Time data are from Nicole Pailleau at the IFRTP
 # (French Institute for Polar Research and Technology).
-# She confirms that French Southern Territories and Terre Adelie bases
-# don't observe daylight saving time, even if Terre Adelie supplies came
+# She confirms that French Southern Territories and Terre Ad?lie bases
+# don't observe daylight saving time, even if Terre Ad?lie supplies came
 # from Tasmania.
 #
 # French Southern Territories with year-round inhabitants
 #
-# Martin-de-Vivies Base, Amsterdam Island, -374105+0773155, since 1950
-# Alfred-Faure Base, Crozet Islands, -462551+0515152, since 1964
-# Port-aux-Francais, Kerguelen Islands, -492110+0701303, since 1951;
+# Alfred Faure, Possession Island, Crozet Islands, -462551+0515152, since 1964;
+#	sealing & whaling stations operated variously 1802/1911+;
+#	see Indian/Reunion.
+#
+# Martin-de-Vivi?s, Amsterdam Island, -374105+0773155, since 1950
+# Port-aux-Fran?ais, Kerguelen Islands, -492110+0701303, since 1951;
 #	whaling & sealing station operated 1908/1914, 1920/1929, and 1951/1956
 #
 # St Paul Island - near Amsterdam, uninhabited
 #	fishing stations operated variously 1819/1931
 #
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone Indian/Kerguelen	0	-	zzz	1950	# Port-aux-Francais
+Zone Indian/Kerguelen	0	-	zzz	1950	# Port-aux-Fran?ais
 			5:00	-	TFT	# ISO code TF Time
 #
 # year-round base in the main continent
-# Dumont-d'Urville, Ile des Petrels, -6640+14001, since 1956-11
+# Dumont d'Urville, ?le des P?trels, -6640+14001, since 1956-11
+#  (2005-12-05)
 #
 # Another base at Port-Martin, 50km east, began operation in 1947.
 # It was destroyed by fire on 1952-01-14.
@@ -191,20 +189,22 @@ Zone Antarctica/DumontDUrville 0 -	zzz	1
 			10:00	-	PMT	1952 Jan 14 # Port-Martin Time
 			0	-	zzz	1956 Nov
 			10:00	-	DDUT	# Dumont-d'Urville Time
-# Reference:
-# 
-# Dumont d'Urville Station (2005-12-05)
-# 
+
+# France & Italy - year-round base
+# Concordia, -750600+1232000, since 2005
 
 # Germany - year-round base
-# Georg von Neumayer, -7039-00815
+# Neumayer III, -704080-0081602, since 2009
 
-# India - year-round base
-# Dakshin Gangotri, -7005+01200
+# India - year-round bases
+# Bharati, -692428+0761114, since 2012
+# Maitri, -704558+0114356, since 1989
+
+# Italy - year-round base (also see "France & Italy")
+# Zuchelli, Terra Nova Bay, -744140+1640647, since 1986
 
 # Japan - year-round bases
-# Dome Fuji, -7719+03942
-# Syowa, -690022+0393524
+# Syowa (also known as Showa), -690022+0393524, since 1957
 #
 # From Hideyuki Suzuki (1999-02-06):
 # In all Japanese stations, +0300 is used as the standard time.
@@ -216,11 +216,11 @@ Zone Antarctica/DumontDUrville 0 -	zzz	1
 Zone Antarctica/Syowa	0	-	zzz	1957 Jan 29
 			3:00	-	SYOT	# Syowa Time
 # See:
-# 
 # NIPR Antarctic Research Activities (1999-08-17)
-# 
+# 
 
 # S Korea - year-round base
+# Jang Bogo, Terra Nova Bay, -743700+1641205 since 2014
 # King Sejong, King George Island, -6213-05847, since 1988
 
 # New Zealand - claims
@@ -269,6 +269,9 @@ Zone Antarctica/Troll	0	-	zzz	2005 Feb 1
 # Poland - year-round base
 # Arctowski, King George Island, -620945-0582745, since 1977
 
+# Romania - year-bound base
+# Law-Racovi??, Larsemann Hills, -692319+0762251, since 1986
+
 # Russia - year-round bases
 # Bellingshausen, King George Island, -621159-0585337, since 1968-02-22
 # Mirny, Davis coast, -6633+09301, since 1956-02
@@ -278,8 +281,8 @@ Zone Antarctica/Troll	0	-	zzz	2005 Feb 1
 #	year-round from 1960/61 to 1992
 
 # Vostok, since 1957-12-16, temporarily closed 1994-02/1994-11
-# 
-# From Craig Mundell (1994-12-15):
+# From Craig Mundell (1994-12-15)
+# :
 # Vostok, which is one of the Russian stations, is set on the same
 # time as Moscow, Russia.
 #
@@ -294,7 +297,7 @@ Zone Antarctica/Troll	0	-	zzz	2005 Feb 1
 #
 # From Paul Eggert (2001-05-04):
 # This seems to be hopelessly confusing, so I asked Lee Hotz about it
-# in person.  He said that some Antartic locations set their local
+# in person.  He said that some Antarctic locations set their local
 # time so that noon is the warmest part of the day, and that this
 # changes during the year and does not necessarily correspond to mean
 # solar noon.  So the Vostok time might have been whatever the clocks
@@ -306,9 +309,12 @@ Zone Antarctica/Vostok	0	-	zzz	1957 Dec 
 
 # S Africa - year-round bases
 # Marion Island, -4653+03752
-# Sanae, -7141-00250
+# SANAE IV, Vesleskarvet, Queen Maud Land, -714022-0025026, since 1997
+
+# Ukraine - year-round base
+# Vernadsky (formerly Faraday), Galindez Island, -651445-0641526, since 1954
 
-# UK
+# United Kingdom
 #
 # British Antarctic Territories (BAT) claims
 # South Orkney Islands
@@ -364,7 +370,7 @@ Zone Antarctica/Palmer	0	-	zzz	1965
 # but that he found it more convenient to keep GMT+12
 # as supplies for the station were coming from McMurdo Sound,
 # which was on GMT+12 because New Zealand was on GMT+12 all year
-# at that time (1957).  (Source: Siple's book 90 degrees SOUTH.)
+# at that time (1957).  (Source: Siple's book 90 Degrees South.)
 #
 # From Susan Smith
 # http://www.cybertours.com/whs/pole10.html

Modified: stable/7/share/zoneinfo/asia
==============================================================================
--- stable/7/share/zoneinfo/asia	Fri Aug 29 13:22:56 2014	(r270812)
+++ stable/7/share/zoneinfo/asia	Fri Aug 29 13:24:49 2014	(r270813)
@@ -1,4 +1,3 @@
-# 
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -32,7 +31,7 @@
 # A reliable and entertaining source about time zones is
 # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997).
 #
-# I invented the abbreviations marked `*' in the following table;
+# I invented the abbreviations marked '*' in the following table;
 # the rest are from earlier versions of this file, or from other sources.
 # Corrections are welcome!
 #	     std  dst
@@ -47,13 +46,14 @@
 #	7:00 WIB	west Indonesia (Waktu Indonesia Barat)

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From pluknet at FreeBSD.org  Fri Aug 29 13:26:12 2014
From: pluknet at FreeBSD.org (Sergey Kandaurov)
Date: Fri, 29 Aug 2014 13:26:12 +0000 (UTC)
Subject: svn commit: r270814 - stable/8/share/zoneinfo
Message-ID: <201408291326.s7TDQCiL053815@svn.freebsd.org>

Author: pluknet
Date: Fri Aug 29 13:26:11 2014
New Revision: 270814
URL: http://svnweb.freebsd.org/changeset/base/270814

Log:
  MFC r270728, tzdata2014f
  
  - Parts of Russia will change times on 2014-10-26.
  - Time zone name changes for Asia/Novokuznetsk and Xinjiang and Samoa
    and America/Metlakatla, new zones Asia/Chita and Asia/Srednekolymsk.
  - Australia will now use Axxx.
  - New zone tab data format.
  
  And lots of historical changes (See
  http://mm.icann.org/pipermail/tz-announce/2014-August/000023.html
  for the full details.)

Added:
  stable/8/share/zoneinfo/zone1970.tab
     - copied unchanged from r270728, head/contrib/tzdata/zone1970.tab
Modified:
  stable/8/share/zoneinfo/africa
  stable/8/share/zoneinfo/antarctica
  stable/8/share/zoneinfo/asia
  stable/8/share/zoneinfo/australasia
  stable/8/share/zoneinfo/backward
  stable/8/share/zoneinfo/etcetera
  stable/8/share/zoneinfo/europe
  stable/8/share/zoneinfo/factory
  stable/8/share/zoneinfo/leap-seconds.list   (contents, props changed)
  stable/8/share/zoneinfo/northamerica
  stable/8/share/zoneinfo/pacificnew
  stable/8/share/zoneinfo/southamerica
  stable/8/share/zoneinfo/systemv
  stable/8/share/zoneinfo/yearistype.sh
  stable/8/share/zoneinfo/zone.tab
Directory Properties:
  stable/8/share/zoneinfo/   (props changed)

Modified: stable/8/share/zoneinfo/africa
==============================================================================
--- stable/8/share/zoneinfo/africa	Fri Aug 29 13:24:49 2014	(r270813)
+++ stable/8/share/zoneinfo/africa	Fri Aug 29 13:26:11 2014	(r270814)
@@ -1,4 +1,3 @@
-# 
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -35,13 +34,13 @@
 # Previous editions of this database used WAT, CAT, SAT, and EAT
 # for +0:00 through +3:00, respectively,
 # but Mark R V Murray reports that
-# `SAST' is the official abbreviation for +2:00 in the country of South Africa,
-# `CAT' is commonly used for +2:00 in countries north of South Africa, and
-# `WAT' is probably the best name for +1:00, as the common phrase for
-# the area that includes Nigeria is ``West Africa''.
-# He has heard of ``Western Sahara Time'' for +0:00 but can find no reference.
+# 'SAST' is the official abbreviation for +2:00 in the country of South Africa,
+# 'CAT' is commonly used for +2:00 in countries north of South Africa, and
+# 'WAT' is probably the best name for +1:00, as the common phrase for
+# the area that includes Nigeria is "West Africa".
+# He has heard of "Western Sahara Time" for +0:00 but can find no reference.
 #
-# To make things confusing, `WAT' seems to have been used for -1:00 long ago;
+# To make things confusing, 'WAT' seems to have been used for -1:00 long ago;
 # I'd guess that this was because people needed _some_ name for -1:00,
 # and at the time, far west Africa was the only major land area in -1:00.
 # This usage is now obsolete, as the last use of -1:00 on the African
@@ -54,7 +53,7 @@
 #	 2:00	SAST	South Africa Standard Time
 # and Murray suggests the following abbreviation:
 #	 1:00	WAT	West Africa Time
-# I realize that this leads to `WAT' being used for both -1:00 and 1:00
+# I realize that this leads to 'WAT' being used for both -1:00 and 1:00
 # for times before 1976, but this is the best I can think of
 # until we get more information.
 #
@@ -131,9 +130,7 @@ Zone	Africa/Gaborone	1:43:40 -	LMT	1885
 			2:00	-	CAT
 
 # Burkina Faso
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone Africa/Ouagadougou	-0:06:04 -	LMT	1912
-			 0:00	-	GMT
+# See Africa/Abidjan.
 
 # Burundi
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -161,7 +158,7 @@ Zone	Africa/Bangui	1:14:20	-	LMT	1912
 
 # Chad
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Ndjamena	1:00:12 -	LMT	1912
+Zone	Africa/Ndjamena	1:00:12 -	LMT	1912 # N'Djamena
 			1:00	-	WAT	1979 Oct 14
 			1:00	1:00	WAST	1980 Mar  8
 			1:00	-	WAT
@@ -183,10 +180,20 @@ Zone Africa/Lubumbashi	1:49:52 -	LMT	189
 Zone Africa/Brazzaville	1:01:08 -	LMT	1912
 			1:00	-	WAT
 
-# Cote D'Ivoire
+# C?te D'Ivoire / Ivory Coast
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Abidjan	-0:16:08 -	LMT	1912
 			 0:00	-	GMT
+Link Africa/Abidjan Africa/Bamako	# Mali
+Link Africa/Abidjan Africa/Banjul	# Gambia
+Link Africa/Abidjan Africa/Conakry	# Guinea
+Link Africa/Abidjan Africa/Dakar	# Senegal
+Link Africa/Abidjan Africa/Freetown	# Sierra Leone
+Link Africa/Abidjan Africa/Lome		# Togo
+Link Africa/Abidjan Africa/Nouakchott	# Mauritania
+Link Africa/Abidjan Africa/Ouagadougou	# Burkina Faso
+Link Africa/Abidjan Africa/Sao_Tome	# S?o Tom? and Pr?ncipe
+Link Africa/Abidjan Atlantic/St_Helena	# St Helena
 
 # Djibouti
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -231,13 +238,9 @@ Rule	Egypt	1990	1994	-	May	 1	1:00	1:00	
 # Egyptians would approve the cancellation."
 #
 # Egypt to cancel daylight saving time
-# 
 # http://www.almasryalyoum.com/en/node/407168
-# 
 # or
-# 
 # http://www.worldtimezone.com/dst_news/dst_news_egypt04.html
-# 
 Rule	Egypt	1995	2010	-	Apr	lastFri	 0:00s	1:00	S
 Rule	Egypt	1995	2005	-	Sep	lastThu	24:00	0	-
 # From Steffen Thorsen (2006-09-19):
@@ -249,7 +252,7 @@ Rule	Egypt	2006	only	-	Sep	21	24:00	0	-
 # From Dirk Losch (2007-08-14):
 # I received a mail from an airline which says that the daylight
 # saving time in Egypt will end in the night of 2007-09-06 to 2007-09-07.
-# From Jesper Norgaard Welen (2007-08-15): [The following agree:]
+# From Jesper N?rgaard Welen (2007-08-15): [The following agree:]
 # http://www.nentjes.info/Bill/bill5.htm
 # http://www.timeanddate.com/worldclock/city.html?n=53
 # From Steffen Thorsen (2007-09-04): The official information...:
@@ -288,15 +291,9 @@ Rule	Egypt	2007	only	-	Sep	Thu>=1	24:00	
 #
 # timeanddate[2] and another site I've found[3] also support that.
 #
-# [1] 
-# https://bugzilla.redhat.com/show_bug.cgi?id=492263
-# 
-# [2] 
-# http://www.timeanddate.com/worldclock/clockchange.html?n=53
-# 
-# [3] 
-# http://wwp.greenwichmeantime.com/time-zone/africa/egypt/
-# 
+# [1] https://bugzilla.redhat.com/show_bug.cgi?id=492263
+# [2] http://www.timeanddate.com/worldclock/clockchange.html?n=53
+# [3] http://wwp.greenwichmeantime.com/time-zone/africa/egypt/
 
 # From Arthur David Olson (2009-04-20):
 # In 2009 (and for the next several years), Ramadan ends before the fourth
@@ -306,14 +303,10 @@ Rule	Egypt	2007	only	-	Sep	Thu>=1	24:00	
 # From Steffen Thorsen (2009-08-11):
 # We have been able to confirm the August change with the Egyptian Cabinet
 # Information and Decision Support Center:
-# 
 # http://www.timeanddate.com/news/time/egypt-dst-ends-2009.html
-# 
 #
 # The Middle East News Agency
-# 
 # http://www.mena.org.eg/index.aspx
-# 
 # also reports "Egypt starts winter time on August 21"
 # today in article numbered "71, 11/08/2009 12:25 GMT."
 # Only the title above is available without a subscription to their service,
@@ -321,19 +314,14 @@ Rule	Egypt	2007	only	-	Sep	Thu>=1	24:00	
 # (at least today).
 
 # From Alexander Krivenyshev (2010-07-20):
-# According to News from Egypt -  Al-Masry Al-Youm Egypt's cabinet has
+# According to News from Egypt - Al-Masry Al-Youm Egypt's cabinet has
 # decided that Daylight Saving Time will not be used in Egypt during
 # Ramadan.
 #
 # Arabic translation:
-# "Clocks to go back during Ramadan--and then forward again"
-# 
+# "Clocks to go back during Ramadan - and then forward again"
 # http://www.almasryalyoum.com/en/news/clocks-go-back-during-ramadan-and-then-forward-again
-# 
-# or
-# 
 # http://www.worldtimezone.com/dst_news/dst_news_egypt02.html
-# 
 
 # From Ahmad El-Dardiry (2014-05-07):
 # Egypt is to change back to Daylight system on May 15
@@ -433,10 +421,15 @@ Zone	Africa/Asmara	2:35:32 -	LMT	1870
 			3:00	-	EAT
 
 # Ethiopia
-# From Paul Eggert (2006-03-22):
-# Shanks & Pottenger write that Ethiopia had six narrowly-spaced time zones
-# between 1870 and 1890, and that they merged to 38E50 (2:35:20) in 1890.
-# We'll guess that 38E50 is for Adis Dera.
+# From Paul Eggert (2014-07-31):
+# Like the Swahili of Kenya and Tanzania, many Ethiopians keep a
+# 12-hour clock starting at our 06:00, so their "8 o'clock" is our
+# 02:00 or 14:00.  Keep this in mind when you ask the time in Amharic.
+#
+# Shanks & Pottenger write that Ethiopia had six narrowly-spaced time
+# zones between 1870 and 1890, that they merged to 38E50 (2:35:20) in
+# 1890, and that they switched to 3:00 on 1936-05-05.  Perhaps 38E50
+# was for Adis Dera.  Quite likely the Shanks data are wrong anyway.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Africa/Addis_Ababa	2:34:48 -	LMT	1870
 			2:35:20	-	ADMT	1936 May 5    # Adis Dera MT
@@ -448,28 +441,24 @@ Zone Africa/Libreville	0:37:48 -	LMT	191
 			1:00	-	WAT
 
 # Gambia
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Banjul	-1:06:36 -	LMT	1912
-			-1:06:36 -	BMT	1935	# Banjul Mean Time
-			-1:00	-	WAT	1964
-			 0:00	-	GMT
+# See Africa/Abidjan.
 
 # Ghana
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-# Whitman says DST was observed from 1931 to ``the present'';
-# go with Shanks & Pottenger.
-Rule	Ghana	1936	1942	-	Sep	 1	0:00	0:20	GHST
-Rule	Ghana	1936	1942	-	Dec	31	0:00	0	GMT
+# Whitman says DST was observed from 1931 to "the present";
+# Shanks & Pottenger say 1936 to 1942;
+# and September 1 to January 1 is given by:
+# Scott Keltie J, Epstein M (eds), The Statesman's Year-Book,
+# 57th ed. Macmillan, London (1920), OCLC 609408015, pp xxviii.
+# For lack of better info, assume DST was observed from 1920 to 1942.
+Rule	Ghana	1920	1942	-	Sep	 1	0:00	0:20	GHST
+Rule	Ghana	1920	1942	-	Dec	31	0:00	0	GMT
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Accra	-0:00:52 -	LMT	1918
 			 0:00	Ghana	%s
 
 # Guinea
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Conakry	-0:54:52 -	LMT	1912
-			 0:00	-	GMT	1934 Feb 26
-			-1:00	-	WAT	1960
-			 0:00	-	GMT
+# See Africa/Abidjan.
 
 # Guinea-Bissau
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -577,18 +566,8 @@ Zone	Africa/Blantyre	2:20:00 -	LMT	1903 
 			2:00	-	CAT
 
 # Mali
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Bamako	-0:32:00 -	LMT	1912
-			 0:00	-	GMT	1934 Feb 26
-			-1:00	-	WAT	1960 Jun 20
-			 0:00	-	GMT
-
 # Mauritania
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone Africa/Nouakchott	-1:03:48 -	LMT	1912
-			 0:00	-	GMT	1934 Feb 26
-			-1:00	-	WAT	1960 Nov 28
-			 0:00	-	GMT
+# See Africa/Abidjan.
 
 # Mauritius
 
@@ -612,9 +591,7 @@ Zone Africa/Nouakchott	-1:03:48 -	LMT	19
 
 # From Steffen Thorsen (2008-07-10):
 # According to
-# 
 # http://www.lexpress.mu/display_article.php?news_id=111216
-# 
 # (in French), Mauritius will start and end their DST a few days earlier
 # than previously announced (2008-11-01 to 2009-03-31).  The new start
 # date is 2008-10-26 at 02:00 and the new end date is 2009-03-27 (no time
@@ -633,18 +610,13 @@ Zone Africa/Nouakchott	-1:03:48 -	LMT	19
 # published on Monday, June 30, 2008...
 #
 # I guess that article in French "Le gouvernement avance l'introduction
-# de l'heure d'ete" stating that DST in Mauritius starting on October 26
-# and ending on March 27, 2009 is the most recent one.
-# ...
-# 
+# de l'heure d'?t?" stating that DST in Mauritius starting on October 26
+# and ending on March 27, 2009 is the most recent one....
 # http://www.worldtimezone.com/dst_news/dst_news_mauritius02.html
-# 
 
 # From Riad M. Hossen Ally (2008-08-03):
 # The Government of Mauritius weblink
-# 
 # http://www.gov.mu/portal/site/pmosite/menuitem.4ca0efdee47462e7440a600248a521ca/?content_id=4728ca68b2a5b110VgnVCM1000000a04a8c0RCRD
-# 
 # Cabinet Decision of July 18th, 2008 states as follows:
 #
 # 4. ...Cabinet has agreed to the introduction into the National Assembly
@@ -654,33 +626,25 @@ Zone Africa/Nouakchott	-1:03:48 -	LMT	19
 # States of America. It will start at two o'clock in the morning on the
 # last Sunday of October and will end at two o'clock in the morning on
 # the last Sunday of March the following year. The summer time for the
-# year 2008 - 2009 will, therefore, be effective as from 26 October 2008
+# year 2008-2009 will, therefore, be effective as from 26 October 2008
 # and end on 29 March 2009.
 
 # From Ed Maste (2008-10-07):
 # THE TIME BILL (No. XXVII of 2008) Explanatory Memorandum states the
 # beginning / ending of summer time is 2 o'clock standard time in the
 # morning of the last Sunday of October / last Sunday of March.
-# 
 # http://www.gov.mu/portal/goc/assemblysite/file/bill2708.pdf
-# 
 
 # From Steffen Thorsen (2009-06-05):
 # According to several sources, Mauritius will not continue to observe
 # DST the coming summer...
 #
 # Some sources, in French:
-# 
 # http://www.defimedia.info/news/946/Rashid-Beebeejaun-:-%C2%AB-L%E2%80%99heure-d%E2%80%99%C3%A9t%C3%A9-ne-sera-pas-appliqu%C3%A9e-cette-ann%C3%A9e-%C2%BB
-# 
-# 
 # http://lexpress.mu/Story/3398~Beebeejaun---Les-objectifs-d-%C3%A9conomie-d-%C3%A9nergie-de-l-heure-d-%C3%A9t%C3%A9-ont-%C3%A9t%C3%A9-atteints-
-# 
 #
 # Our wrap-up:
-# 
 # http://www.timeanddate.com/news/time/mauritius-dst-will-not-repeat.html
-# 
 
 # From Arthur David Olson (2009-07-11):
 # The "mauritius-dst-will-not-repeat" wrapup includes this:
@@ -704,7 +668,7 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 			3:00	-	EAT
 
 # Morocco
-# See the `europe' file for Spanish Morocco (Africa/Ceuta).
+# See the 'europe' file for Spanish Morocco (Africa/Ceuta).
 
 # From Alex Krivenyshev (2008-05-09):
 # Here is an article that Morocco plan to introduce Daylight Saving Time between
@@ -712,60 +676,43 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 #
 # "... Morocco is to save energy by adjusting its clock during summer so it will
 # be one hour ahead of GMT between 1 June and 27 September, according to
-# Communication Minister and Gov ernment Spokesman, Khalid Naciri...."
+# Communication Minister and Government Spokesman, Khalid Naciri...."
 #
-# 
 # http://www.worldtimezone.net/dst_news/dst_news_morocco01.html
-# 
-# OR
-# 
 # http://en.afrik.com/news11892.html
-# 
 
 # From Alex Krivenyshev (2008-05-09):
 # The Morocco time change can be confirmed on Morocco web site Maghreb Arabe Presse:
-# 
 # http://www.map.ma/eng/sections/box3/morocco_shifts_to_da/view
-# 
 #
 # Morocco shifts to daylight time on June 1st through September 27, Govt.
 # spokesman.
 
 # From Patrice Scattolin (2008-05-09):
 # According to this article:
-# 
 # http://www.avmaroc.com/actualite/heure-dete-comment-a127896.html
-# 
-# (and republished here:
-# 
-# http://www.actu.ma/heure-dete-comment_i127896_0.html
-# 
-# )
-# the changes occurs at midnight:
-#
-# saturday night may 31st at midnight (which in french is to be
-# intrepreted as the night between saturday and sunday)
-# sunday night the 28th  at midnight
-#
-# Seeing that the 28th is monday, I am guessing that she intends to say
-# the midnight of the 28th which is the midnight between sunday and
-# monday, which jives with other sources that say that it's inclusive
-# june1st to sept 27th.
+# (and republished here: )
+# the changes occur at midnight:
+#
+# Saturday night May 31st at midnight (which in French is to be
+# interpreted as the night between Saturday and Sunday)
+# Sunday night the 28th at midnight
+#
+# Seeing that the 28th is Monday, I am guessing that she intends to say
+# the midnight of the 28th which is the midnight between Sunday and
+# Monday, which jives with other sources that say that it's inclusive
+# June 1st to Sept 27th.
 #
 # The decision was taken by decree *2-08-224 *but I can't find the decree
 # published on the web.
 #
 # It's also confirmed here:
-# 
 # http://www.maroc.ma/NR/exeres/FACF141F-D910-44B0-B7FA-6E03733425D1.htm
-# 
-# on a government portal as being  between june 1st and sept 27th (not yet
-# posted in english).
+# on a government portal as being between June 1st and Sept 27th (not yet
+# posted in English).
 #
-# The following google query will generate many relevant hits:
-# 
+# The following Google query will generate many relevant hits:
 # http://www.google.com/search?hl=en&q=Conseil+de+gouvernement+maroc+heure+avance&btnG=Search
-# 
 
 # From Steffen Thorsen (2008-08-27):
 # Morocco will change the clocks back on the midnight between August 31
@@ -773,47 +720,32 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 # of September:
 #
 # One article about it (in French):
-# 
 # http://www.menara.ma/fr/Actualites/Maroc/Societe/ci.retour_a_l_heure_gmt_a_partir_du_dimanche_31_aout_a_minuit_officiel_.default
-# 
 #
 # We have some further details posted here:
-# 
 # http://www.timeanddate.com/news/time/morocco-ends-dst-early-2008.html
-# 
 
 # From Steffen Thorsen (2009-03-17):
 # Morocco will observe DST from 2009-06-01 00:00 to 2009-08-21 00:00 according
 # to many sources, such as
-# 
 # http://news.marweb.com/morocco/entertainment/morocco-daylight-saving.html
-# 
-# 
 # http://www.medi1sat.ma/fr/depeche.aspx?idp=2312
-# 
 # (French)
 #
 # Our summary:
-# 
 # http://www.timeanddate.com/news/time/morocco-starts-dst-2009.html
-# 
 
 # From Alexander Krivenyshev (2009-03-17):
 # Here is a link to official document from Royaume du Maroc Premier Ministre,
-# Ministere de la Modernisation des Secteurs Publics
+# Minist?re de la Modernisation des Secteurs Publics
 #
 # Under Article 1 of Royal Decree No. 455-67 of Act 23 safar 1387 (2 june 1967)
 # concerning the amendment of the legal time, the Ministry of Modernization of
 # Public Sectors announced that the official time in the Kingdom will be
 # advanced 60 minutes from Sunday 31 May 2009 at midnight.
 #
-# 
 # http://www.mmsp.gov.ma/francais/Actualites_fr/PDF_Actualites_Fr/HeureEte_FR.pdf
-# 
-#
-# 
 # http://www.worldtimezone.com/dst_news/dst_news_morocco03.html
-# 
 
 # From Steffen Thorsen (2010-04-13):
 # Several news media in Morocco report that the Ministry of Modernization
@@ -821,14 +753,10 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 # 2010-05-02 to 2010-08-08.
 #
 # Example:
-# 
 # http://www.lavieeco.com/actualites/4099-le-maroc-passera-a-l-heure-d-ete-gmt1-le-2-mai.html
-# 
 # (French)
 # Our page:
-# 
 # http://www.timeanddate.com/news/time/morocco-starts-dst-2010.html
-# 
 
 # From Dan Abitol (2011-03-30):
 # ...Rules for Africa/Casablanca are the following (24h format)
@@ -838,34 +766,20 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 # The change was broadcast on the FM Radio
 # I ve called ANRT (telecom regulations in Morocco) at
 # +212.537.71.84.00
-# 
 # http://www.anrt.net.ma/fr/
-# 
 # They said that
-# 
 # http://www.map.ma/fr/sections/accueil/l_heure_legale_au_ma/view
-# 
 # is the official publication to look at.
 # They said that the decision was already taken.
 #
 # More articles in the press
-# 
-# http://www.yabiladi.com/articles/details/5058/secret-l-heure-d-ete-maroc-lev
-# 
-# e.html
-# 
+# http://www.yabiladi.com/articles/details/5058/secret-l-heure-d-ete-maroc-leve.html
 # http://www.lematin.ma/Actualite/Express/Article.asp?id=148923
-# 
-# 
 # http://www.lavieeco.com/actualite/Le-Maroc-passe-sur-GMT%2B1-a-partir-de-dim
-# anche-prochain-5538.html
-# 
 
 # From Petr Machata (2011-03-30):
 # They have it written in English here:
-# 
 # http://www.map.ma/eng/sections/home/morocco_to_spring_fo/view
-# 
 #
 # It says there that "Morocco will resume its standard time on July 31,
 # 2011 at midnight." Now they don't say whether they mean midnight of
@@ -873,20 +787,16 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 # also been like that in the past.
 
 # From Alexander Krivenyshev (2012-03-09):
-# According to Infomédiaire web site from Morocco (infomediaire.ma),
-# on March 9, 2012, (in French) Heure légale:
-# Le Maroc adopte officiellement l'heure d'été
-# 
+# According to Infom?diaire web site from Morocco (infomediaire.ma),
+# on March 9, 2012, (in French) Heure l?gale:
+# Le Maroc adopte officiellement l'heure d'?t?
 # http://www.infomediaire.ma/news/maroc/heure-l%C3%A9gale-le-maroc-adopte-officiellement-lheure-d%C3%A9t%C3%A9
-# 
 # Governing Council adopted draft decree, that Morocco DST starts on
 # the last Sunday of March (March 25, 2012) and ends on
 # last Sunday of September (September 30, 2012)
 # except the month of Ramadan.
 # or (brief)
-# 
 # http://www.worldtimezone.com/dst_news/dst_news_morocco06.html
-# 
 
 # From Arthur David Olson (2012-03-10):
 # The infomediaire.ma source indicates that the system is to be in
@@ -897,17 +807,13 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 
 # From Christophe Tropamer (2012-03-16):
 # Seen Morocco change again:
-# 
 # http://www.le2uminutes.com/actualite.php
-# 
-# "...à partir du dernier dimance d'avril et non fins mars,
-# comme annoncé précédemment."
+# "...? partir du dernier dimanche d'avril et non fins mars,
+# comme annonc? pr?c?demment."
 
 # From Milamber Space Network (2012-07-17):
 # The official return to GMT is announced by the Moroccan government:
-# 
 # http://www.mmsp.gov.ma/fr/actualites.aspx?id=288 [in French]
-# 
 #
 # Google translation, lightly edited:
 # Back to the standard time of the Kingdom (GMT)
@@ -1052,7 +958,7 @@ Zone Africa/Casablanca	-0:30:20 -	LMT	19
 # Assume that this has been true since Western Sahara switched to GMT,
 # since most of it was then controlled by Morocco.
 
-Zone Africa/El_Aaiun	-0:52:48 -	LMT	1934 Jan
+Zone Africa/El_Aaiun	-0:52:48 -	LMT	1934 Jan # El Aai?n
 			-1:00	-	WAT	1976 Apr 14
 			 0:00	Morocco	WE%sT
 
@@ -1102,15 +1008,17 @@ Zone	Africa/Niamey	 0:08:28 -	LMT	1912
 Zone	Africa/Lagos	0:13:36 -	LMT	1919 Sep
 			1:00	-	WAT
 
-# Reunion
+# R?union
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Indian/Reunion	3:41:52 -	LMT	1911 Jun	# Saint-Denis
-			4:00	-	RET	# Reunion Time
+			4:00	-	RET	# R?union Time
 #
-# Scattered Islands (Iles Eparses) administered from Reunion are as follows.
+# Crozet Islands also observes R?union time; see the 'antarctica' file.
+#
+# Scattered Islands (?les ?parses) administered from R?union are as follows.
 # The following information about them is taken from
-# Iles Eparses (www.outre-mer.gouv.fr/domtom/ile.htm, 1997-07-22, in French;
-# no longer available as of 1999-08-17).
+# ?les ?parses (, 1997-07-22,
+# in French; no longer available as of 1999-08-17).
 # We have no info about their time zone histories.
 #
 # Bassas da India - uninhabited
@@ -1125,28 +1033,17 @@ Zone	Africa/Kigali	2:00:16 -	LMT	1935 Ju
 			2:00	-	CAT
 
 # St Helena
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone Atlantic/St_Helena	-0:22:48 -	LMT	1890		# Jamestown
-			-0:22:48 -	JMT	1951	# Jamestown Mean Time
-			 0:00	-	GMT
+# See Africa/Abidjan.
 # The other parts of the St Helena territory are similar:
 #	Tristan da Cunha: on GMT, say Whitman and the CIA
-#	Ascension: on GMT, says usno1995 and the CIA
+#	Ascension: on GMT, say the USNO (1995-12-21) and the CIA
 #	Gough (scientific station since 1955; sealers wintered previously):
 #		on GMT, says the CIA
-#	Inaccessible, Nightingale: no information, but probably GMT
-
-# Sao Tome and Principe
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Sao_Tome	 0:26:56 -	LMT	1884
-			-0:36:32 -	LMT	1912	# Lisbon Mean Time
-			 0:00	-	GMT
+#	Inaccessible, Nightingale: uninhabited
 
+# S?o Tom? and Pr?ncipe
 # Senegal
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Dakar	-1:09:44 -	LMT	1912
-			-1:00	-	WAT	1941 Jun
-			 0:00	-	GMT
+# See Africa/Abidjan.
 
 # Seychelles
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -1160,17 +1057,7 @@ Zone	Indian/Mahe	3:41:48 -	LMT	1906 Jun	
 # Possibly the islands were uninhabited.
 
 # Sierra Leone
-# Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-# Whitman gives Mar 31 - Aug 31 for 1931 on; go with Shanks & Pottenger.
-Rule	SL	1935	1942	-	Jun	 1	0:00	0:40	SLST
-Rule	SL	1935	1942	-	Oct	 1	0:00	0	WAT
-Rule	SL	1957	1962	-	Jun	 1	0:00	1:00	SLST
-Rule	SL	1957	1962	-	Sep	 1	0:00	0	GMT
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Freetown	-0:53:00 -	LMT	1882
-			-0:53:00 -	FMT	1913 Jun # Freetown Mean Time
-			-1:00	SL	%s	1957
-			 0:00	SL	%s
+# See Africa/Abidjan.
 
 # Somalia
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -1193,9 +1080,9 @@ Zone Africa/Johannesburg 1:52:00 -	LMT	1
 
 # Sudan
 #
-# From 
-# Sudan News Agency (2000-01-13)
-# , also reported by Michael De Beukelaer-Dossche via Steffen Thorsen:
+# From 
+# Sudan News Agency (2000-01-13),
+# also reported by Micha?l De Beukelaer-Dossche via Steffen Thorsen:
 # Clocks will be moved ahead for 60 minutes all over the Sudan as of noon
 # Saturday....  This was announced Thursday by Caretaker State Minister for
 # Manpower Abdul-Rahman Nur-Eddin.
@@ -1226,14 +1113,12 @@ Zone Africa/Dar_es_Salaam 2:37:08 -	LMT	
 			3:00	-	EAT
 
 # Togo
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Lome	0:04:52 -	LMT	1893
-			0:00	-	GMT
+# See Africa/Abidjan.
 
 # Tunisia
 
 # From Gwillim Law (2005-04-30):
-# My correspondent, Risto Nykanen, has alerted me to another adoption of DST,
+# My correspondent, Risto Nyk?nen, has alerted me to another adoption of DST,
 # this time in Tunisia.  According to Yahoo France News
 # , in a story attributed to AP
 # and dated 2005-04-26, "Tunisia has decided to advance its official time by
@@ -1242,7 +1127,7 @@ Zone	Africa/Lome	0:04:52 -	LMT	1893
 # Saturday."  (My translation)
 #
 # From Oscar van Vlijmen (2005-05-02):
-# LaPresse, the first national daily newspaper ...
+# La Presse, the first national daily newspaper ...
 # 
 # ... DST for 2005: on: Sun May 1 0h standard time, off: Fri Sept. 30,
 # 1h standard time.
@@ -1256,18 +1141,12 @@ Zone	Africa/Lome	0:04:52 -	LMT	1893
 # From Steffen Thorsen (2009-03-16):
 # According to several news sources, Tunisia will not observe DST this year.
 # (Arabic)
-# 
 # http://www.elbashayer.com/?page=viewn&nid=42546
-# 
-# 
 # http://www.babnet.net/kiwidetail-15295.asp
-# 
 #
 # We have also confirmed this with the US embassy in Tunisia.
 # We have a wrap-up about this on the following page:
-# 
 # http://www.timeanddate.com/news/time/tunisia-cancels-dst-2009.html
-# 
 
 # From Alexander Krivenyshev (2009-03-17):
 # Here is a link to Tunis Afrique Presse News Agency
@@ -1275,20 +1154,17 @@ Zone	Africa/Lome	0:04:52 -	LMT	1893
 # Standard time to be kept the whole year long (tap.info.tn):
 #
 # (in English)
-# 
 # http://www.tap.info.tn/en/index.php?option=com_content&task=view&id=26813&Itemid=157
-# 
 #
 # (in Arabic)
-# 
 # http://www.tap.info.tn/ar/index.php?option=com_content&task=view&id=61240&Itemid=1
-# 
 
-# From Arthur David Olson (2009--3-18):
-# The Tunis Afrique Presse News Agency notice contains this: "This measure is due to the fact
-# that the fasting month of ramadan coincides with the period concerned by summer time.
-# Therefore, the standard time will be kept unchanged the whole year long."
-# So foregoing DST seems to be an exception (albeit one that may be repeated in the  future).
+# From Arthur David Olson (2009-03-18):
+# The Tunis Afrique Presse News Agency notice contains this: "This measure is
+# due to the fact that the fasting month of Ramadan coincides with the period
+# concerned by summer time.  Therefore, the standard time will be kept
+# unchanged the whole year long."  So foregoing DST seems to be an exception
+# (albeit one that may be repeated in the future).
 
 # From Alexander Krivenyshev (2010-03-27):
 # According to some news reports Tunis confirmed not to use DST in 2010
@@ -1300,12 +1176,8 @@ Zone	Africa/Lome	0:04:52 -	LMT	1893
 # coincided with the month of Ramadan..."
 #
 # (in Arabic)
-# 
 # http://www.moheet.com/show_news.aspx?nid=358861&pg=1
-# 
 # http://www.almadenahnews.com/newss/news.php?c=118&id=38036
-# or
-# 
 # http://www.worldtimezone.com/dst_news/dst_news_tunis02.html
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S

Modified: stable/8/share/zoneinfo/antarctica
==============================================================================
--- stable/8/share/zoneinfo/antarctica	Fri Aug 29 13:24:49 2014	(r270813)
+++ stable/8/share/zoneinfo/antarctica	Fri Aug 29 13:26:11 2014	(r270814)
@@ -1,16 +1,13 @@
-# 
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
 # From Paul Eggert (1999-11-15):
 # To keep things manageable, we list only locations occupied year-round; see
-# 
 # COMNAP - Stations and Bases
-# 
+# 
 # and
-# 
 # Summary of the Peri-Antarctic Islands (1998-07-23)
-# 
+# 
 # for information.
 # Unless otherwise specified, we have no time zone information.
 #
@@ -55,19 +52,19 @@ Rule	ChileAQ	2012	max	-	Sep	Sun>=2	4:00u
 
 # Argentina - year-round bases
 # Belgrano II, Confin Coast, -770227-0343737, since 1972-02-05
-# Esperanza, San Martin Land, -6323-05659, since 1952-12-17
-# Jubany, Potter Peninsula, King George Island, -6414-0602320, since 1982-01
-# Marambio, Seymour I, -6414-05637, since 1969-10-29
+# Carlini, Potter Cove, King George Island, -6414-0602320, since 1982-01
+# Esperanza, Hope Bay, -6323-05659, since 1952-12-17
+# Marambio, -6414-05637, since 1969-10-29
 # Orcadas, Laurie I, -6016-04444, since 1904-02-22
-# San Martin, Debenham I, -6807-06708, since 1951-03-21
+# San Mart?n, Barry I, -6808-06706, since 1951-03-21
 #	(except 1960-03 / 1976-03-21)
 
 # Australia - territories
 # Heard Island, McDonald Islands (uninhabited)
 #	previously sealers and scientific personnel wintered
-#	
 #	Margaret Turner reports
-#	 (1999-09-30) that they're UTC+5, with no DST;
+#	
+#	(1999-09-30) that they're UTC+5, with no DST;
 #	presumably this is when they have visitors.
 #
 # year-round bases
@@ -84,14 +81,10 @@ Rule	ChileAQ	2012	max	-	Sep	Sun>=2	4:00u
 # The changes occurred on 2009-10-18 at 02:00 (local times).
 #
 # Government source: (Australian Antarctic Division)
-# 
 # http://www.aad.gov.au/default.asp?casid=37079
-# 
 #
 # We have more background information here:
-# 
 # http://www.timeanddate.com/news/time/antarctica-new-times.html
-# 
 
 # From Steffen Thorsen (2010-03-10):
 # We got these changes from the Australian Antarctic Division: ...
@@ -106,19 +99,17 @@ Rule	ChileAQ	2012	max	-	Sep	Sun>=2	4:00u
 # - Mawson station stays on UTC+5.
 #
 # Background:
-# 
 # http://www.timeanddate.com/news/time/antartica-time-changes-2010.html
-# 
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Antarctica/Casey	0	-	zzz	1969
-			8:00	-	WST	2009 Oct 18 2:00
-						# Western (Aus) Standard Time
+			8:00	-	AWST	2009 Oct 18 2:00
+						# Australian Western Std Time
 			11:00	-	CAST	2010 Mar 5 2:00
 						# Casey Time
-			8:00	-	WST	2011 Oct 28 2:00
+			8:00	-	AWST	2011 Oct 28 2:00
 			11:00	-	CAST	2012 Feb 21 17:00u
-			8:00	-	WST
+			8:00	-	AWST
 Zone Antarctica/Davis	0	-	zzz	1957 Jan 13
 			7:00	-	DAVT	1964 Nov # Davis Time
 			0	-	zzz	1969 Feb
@@ -132,24 +123,27 @@ Zone Antarctica/Mawson	0	-	zzz	1954 Feb 
 						# Mawson Time
 			5:00	-	MAWT
 # References:
-# 
 # Casey Weather (1998-02-26)
-# 
-# 
+# 
 # Davis Station, Antarctica (1998-02-26)
-# 
-# 
+# 
 # Mawson Station, Antarctica (1998-02-25)
-# 
+# 
+
+# Belgium - year-round base
+# Princess Elisabeth, Queen Maud Land, -713412+0231200, since 2007
 
 # Brazil - year-round base
-# Comandante Ferraz, King George Island, -6205+05824, since 1983/4
+# Ferraz, King George Island, -6205+05824, since 1983/4
+
+# Bulgaria - year-round base
+# St. Kliment Ohridski, Livingston Island, -623829-0602153, since 1988
 
 # Chile - year-round bases and towns
 # Escudero, South Shetland Is, -621157-0585735, since 1994
-# Presidente Eduadro Frei, King George Island, -6214-05848, since 1969-03-07
-# General Bernardo O'Higgins, Antarctic Peninsula, -6319-05704, since 1948-02
-# Capitan Arturo Prat, -6230-05941
+# Frei Montalva, King George Island, -6214-05848, since 1969-03-07
+# O'Higgins, Antarctic Peninsula, -6319-05704, since 1948-02
+# Prat, -6230-05941
 # Villa Las Estrellas (a town), around the Frei base, since 1984-04-09
 # These locations have always used Santiago time; use TZ='America/Santiago'.
 
@@ -157,31 +151,35 @@ Zone Antarctica/Mawson	0	-	zzz	1954 Feb 
 # Great Wall, King George Island, -6213-05858, since 1985-02-20
 # Zhongshan, Larsemann Hills, Prydz Bay, -6922+07623, since 1989-02-26
 
-# France - year-round bases
+# France - year-round bases (also see "France & Italy")
 #
 # From Antoine Leca (1997-01-20):
 # Time data are from Nicole Pailleau at the IFRTP
 # (French Institute for Polar Research and Technology).
-# She confirms that French Southern Territories and Terre Adelie bases
-# don't observe daylight saving time, even if Terre Adelie supplies came
+# She confirms that French Southern Territories and Terre Ad?lie bases
+# don't observe daylight saving time, even if Terre Ad?lie supplies came
 # from Tasmania.
 #
 # French Southern Territories with year-round inhabitants
 #
-# Martin-de-Vivies Base, Amsterdam Island, -374105+0773155, since 1950
-# Alfred-Faure Base, Crozet Islands, -462551+0515152, since 1964
-# Port-aux-Francais, Kerguelen Islands, -492110+0701303, since 1951;
+# Alfred Faure, Possession Island, Crozet Islands, -462551+0515152, since 1964;
+#	sealing & whaling stations operated variously 1802/1911+;
+#	see Indian/Reunion.
+#
+# Martin-de-Vivi?s, Amsterdam Island, -374105+0773155, since 1950
+# Port-aux-Fran?ais, Kerguelen Islands, -492110+0701303, since 1951;
 #	whaling & sealing station operated 1908/1914, 1920/1929, and 1951/1956
 #
 # St Paul Island - near Amsterdam, uninhabited
 #	fishing stations operated variously 1819/1931
 #
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone Indian/Kerguelen	0	-	zzz	1950	# Port-aux-Francais
+Zone Indian/Kerguelen	0	-	zzz	1950	# Port-aux-Fran?ais
 			5:00	-	TFT	# ISO code TF Time
 #
 # year-round base in the main continent
-# Dumont-d'Urville, Ile des Petrels, -6640+14001, since 1956-11
+# Dumont d'Urville, ?le des P?trels, -6640+14001, since 1956-11
+#  (2005-12-05)
 #
 # Another base at Port-Martin, 50km east, began operation in 1947.
 # It was destroyed by fire on 1952-01-14.
@@ -191,20 +189,22 @@ Zone Antarctica/DumontDUrville 0 -	zzz	1
 			10:00	-	PMT	1952 Jan 14 # Port-Martin Time
 			0	-	zzz	1956 Nov
 			10:00	-	DDUT	# Dumont-d'Urville Time
-# Reference:
-# 
-# Dumont d'Urville Station (2005-12-05)
-# 
+
+# France & Italy - year-round base
+# Concordia, -750600+1232000, since 2005
 
 # Germany - year-round base
-# Georg von Neumayer, -7039-00815
+# Neumayer III, -704080-0081602, since 2009
 
-# India - year-round base
-# Dakshin Gangotri, -7005+01200
+# India - year-round bases
+# Bharati, -692428+0761114, since 2012
+# Maitri, -704558+0114356, since 1989
+
+# Italy - year-round base (also see "France & Italy")
+# Zuchelli, Terra Nova Bay, -744140+1640647, since 1986
 
 # Japan - year-round bases
-# Dome Fuji, -7719+03942
-# Syowa, -690022+0393524
+# Syowa (also known as Showa), -690022+0393524, since 1957
 #
 # From Hideyuki Suzuki (1999-02-06):
 # In all Japanese stations, +0300 is used as the standard time.
@@ -216,11 +216,11 @@ Zone Antarctica/DumontDUrville 0 -	zzz	1
 Zone Antarctica/Syowa	0	-	zzz	1957 Jan 29
 			3:00	-	SYOT	# Syowa Time
 # See:
-# 
 # NIPR Antarctic Research Activities (1999-08-17)
-# 
+# 
 
 # S Korea - year-round base
+# Jang Bogo, Terra Nova Bay, -743700+1641205 since 2014
 # King Sejong, King George Island, -6213-05847, since 1988
 
 # New Zealand - claims
@@ -269,6 +269,9 @@ Zone Antarctica/Troll	0	-	zzz	2005 Feb 1
 # Poland - year-round base
 # Arctowski, King George Island, -620945-0582745, since 1977
 
+# Romania - year-bound base
+# Law-Racovi??, Larsemann Hills, -692319+0762251, since 1986
+
 # Russia - year-round bases
 # Bellingshausen, King George Island, -621159-0585337, since 1968-02-22
 # Mirny, Davis coast, -6633+09301, since 1956-02
@@ -278,8 +281,8 @@ Zone Antarctica/Troll	0	-	zzz	2005 Feb 1
 #	year-round from 1960/61 to 1992
 
 # Vostok, since 1957-12-16, temporarily closed 1994-02/1994-11
-# 
-# From Craig Mundell (1994-12-15):
+# From Craig Mundell (1994-12-15)
+# :
 # Vostok, which is one of the Russian stations, is set on the same
 # time as Moscow, Russia.
 #
@@ -294,7 +297,7 @@ Zone Antarctica/Troll	0	-	zzz	2005 Feb 1
 #
 # From Paul Eggert (2001-05-04):
 # This seems to be hopelessly confusing, so I asked Lee Hotz about it
-# in person.  He said that some Antartic locations set their local
+# in person.  He said that some Antarctic locations set their local
 # time so that noon is the warmest part of the day, and that this
 # changes during the year and does not necessarily correspond to mean
 # solar noon.  So the Vostok time might have been whatever the clocks
@@ -306,9 +309,12 @@ Zone Antarctica/Vostok	0	-	zzz	1957 Dec 
 
 # S Africa - year-round bases
 # Marion Island, -4653+03752
-# Sanae, -7141-00250
+# SANAE IV, Vesleskarvet, Queen Maud Land, -714022-0025026, since 1997
+
+# Ukraine - year-round base
+# Vernadsky (formerly Faraday), Galindez Island, -651445-0641526, since 1954
 
-# UK
+# United Kingdom
 #
 # British Antarctic Territories (BAT) claims
 # South Orkney Islands
@@ -364,7 +370,7 @@ Zone Antarctica/Palmer	0	-	zzz	1965
 # but that he found it more convenient to keep GMT+12
 # as supplies for the station were coming from McMurdo Sound,
 # which was on GMT+12 because New Zealand was on GMT+12 all year
-# at that time (1957).  (Source: Siple's book 90 degrees SOUTH.)
+# at that time (1957).  (Source: Siple's book 90 Degrees South.)
 #
 # From Susan Smith
 # http://www.cybertours.com/whs/pole10.html

Modified: stable/8/share/zoneinfo/asia
==============================================================================
--- stable/8/share/zoneinfo/asia	Fri Aug 29 13:24:49 2014	(r270813)
+++ stable/8/share/zoneinfo/asia	Fri Aug 29 13:26:11 2014	(r270814)
@@ -1,4 +1,3 @@
-# 
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -32,7 +31,7 @@
 # A reliable and entertaining source about time zones is
 # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997).
 #
-# I invented the abbreviations marked `*' in the following table;
+# I invented the abbreviations marked '*' in the following table;
 # the rest are from earlier versions of this file, or from other sources.
 # Corrections are welcome!
 #	     std  dst
@@ -47,13 +46,14 @@
 #	7:00 WIB	west Indonesia (Waktu Indonesia Barat)

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From pluknet at FreeBSD.org  Fri Aug 29 13:27:50 2014
From: pluknet at FreeBSD.org (Sergey Kandaurov)
Date: Fri, 29 Aug 2014 13:27:50 +0000 (UTC)
Subject: svn commit: r270815 - stable/9/contrib/tzdata
Message-ID: <201408291327.s7TDRoN7054056@svn.freebsd.org>

Author: pluknet
Date: Fri Aug 29 13:27:49 2014
New Revision: 270815
URL: http://svnweb.freebsd.org/changeset/base/270815

Log:
  MFC r270728, tzdata2014f
  
  - Parts of Russia will change times on 2014-10-26.
  - Time zone name changes for Asia/Novokuznetsk and Xinjiang and Samoa
    and America/Metlakatla, new zones Asia/Chita and Asia/Srednekolymsk.
  - Australia will now use Axxx.
  - New zone tab data format.
  
  And lots of historical changes (See
  http://mm.icann.org/pipermail/tz-announce/2014-August/000023.html
  for the full details.)

Added:
  stable/9/contrib/tzdata/zone1970.tab
     - copied unchanged from r270728, head/contrib/tzdata/zone1970.tab
Modified:
  stable/9/contrib/tzdata/africa
  stable/9/contrib/tzdata/antarctica
  stable/9/contrib/tzdata/asia
  stable/9/contrib/tzdata/australasia
  stable/9/contrib/tzdata/backward
  stable/9/contrib/tzdata/etcetera
  stable/9/contrib/tzdata/europe
  stable/9/contrib/tzdata/factory
  stable/9/contrib/tzdata/leap-seconds.list   (contents, props changed)
  stable/9/contrib/tzdata/northamerica
  stable/9/contrib/tzdata/pacificnew
  stable/9/contrib/tzdata/southamerica
  stable/9/contrib/tzdata/systemv
  stable/9/contrib/tzdata/yearistype.sh
  stable/9/contrib/tzdata/zone.tab
Directory Properties:
  stable/9/contrib/tzdata/   (props changed)

Modified: stable/9/contrib/tzdata/africa
==============================================================================
--- stable/9/contrib/tzdata/africa	Fri Aug 29 13:26:11 2014	(r270814)
+++ stable/9/contrib/tzdata/africa	Fri Aug 29 13:27:49 2014	(r270815)
@@ -1,4 +1,3 @@
-# 
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -35,13 +34,13 @@
 # Previous editions of this database used WAT, CAT, SAT, and EAT
 # for +0:00 through +3:00, respectively,
 # but Mark R V Murray reports that
-# `SAST' is the official abbreviation for +2:00 in the country of South Africa,
-# `CAT' is commonly used for +2:00 in countries north of South Africa, and
-# `WAT' is probably the best name for +1:00, as the common phrase for
-# the area that includes Nigeria is ``West Africa''.
-# He has heard of ``Western Sahara Time'' for +0:00 but can find no reference.
+# 'SAST' is the official abbreviation for +2:00 in the country of South Africa,
+# 'CAT' is commonly used for +2:00 in countries north of South Africa, and
+# 'WAT' is probably the best name for +1:00, as the common phrase for
+# the area that includes Nigeria is "West Africa".
+# He has heard of "Western Sahara Time" for +0:00 but can find no reference.
 #
-# To make things confusing, `WAT' seems to have been used for -1:00 long ago;
+# To make things confusing, 'WAT' seems to have been used for -1:00 long ago;
 # I'd guess that this was because people needed _some_ name for -1:00,
 # and at the time, far west Africa was the only major land area in -1:00.
 # This usage is now obsolete, as the last use of -1:00 on the African
@@ -54,7 +53,7 @@
 #	 2:00	SAST	South Africa Standard Time
 # and Murray suggests the following abbreviation:
 #	 1:00	WAT	West Africa Time
-# I realize that this leads to `WAT' being used for both -1:00 and 1:00
+# I realize that this leads to 'WAT' being used for both -1:00 and 1:00
 # for times before 1976, but this is the best I can think of
 # until we get more information.
 #
@@ -131,9 +130,7 @@ Zone	Africa/Gaborone	1:43:40 -	LMT	1885
 			2:00	-	CAT
 
 # Burkina Faso
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone Africa/Ouagadougou	-0:06:04 -	LMT	1912
-			 0:00	-	GMT
+# See Africa/Abidjan.
 
 # Burundi
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -161,7 +158,7 @@ Zone	Africa/Bangui	1:14:20	-	LMT	1912
 
 # Chad
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Ndjamena	1:00:12 -	LMT	1912
+Zone	Africa/Ndjamena	1:00:12 -	LMT	1912 # N'Djamena
 			1:00	-	WAT	1979 Oct 14
 			1:00	1:00	WAST	1980 Mar  8
 			1:00	-	WAT
@@ -183,10 +180,20 @@ Zone Africa/Lubumbashi	1:49:52 -	LMT	189
 Zone Africa/Brazzaville	1:01:08 -	LMT	1912
 			1:00	-	WAT
 
-# Cote D'Ivoire
+# C?te D'Ivoire / Ivory Coast
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Abidjan	-0:16:08 -	LMT	1912
 			 0:00	-	GMT
+Link Africa/Abidjan Africa/Bamako	# Mali
+Link Africa/Abidjan Africa/Banjul	# Gambia
+Link Africa/Abidjan Africa/Conakry	# Guinea
+Link Africa/Abidjan Africa/Dakar	# Senegal
+Link Africa/Abidjan Africa/Freetown	# Sierra Leone
+Link Africa/Abidjan Africa/Lome		# Togo
+Link Africa/Abidjan Africa/Nouakchott	# Mauritania
+Link Africa/Abidjan Africa/Ouagadougou	# Burkina Faso
+Link Africa/Abidjan Africa/Sao_Tome	# S?o Tom? and Pr?ncipe
+Link Africa/Abidjan Atlantic/St_Helena	# St Helena
 
 # Djibouti
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -231,13 +238,9 @@ Rule	Egypt	1990	1994	-	May	 1	1:00	1:00	
 # Egyptians would approve the cancellation."
 #
 # Egypt to cancel daylight saving time
-# 
 # http://www.almasryalyoum.com/en/node/407168
-# 
 # or
-# 
 # http://www.worldtimezone.com/dst_news/dst_news_egypt04.html
-# 
 Rule	Egypt	1995	2010	-	Apr	lastFri	 0:00s	1:00	S
 Rule	Egypt	1995	2005	-	Sep	lastThu	24:00	0	-
 # From Steffen Thorsen (2006-09-19):
@@ -249,7 +252,7 @@ Rule	Egypt	2006	only	-	Sep	21	24:00	0	-
 # From Dirk Losch (2007-08-14):
 # I received a mail from an airline which says that the daylight
 # saving time in Egypt will end in the night of 2007-09-06 to 2007-09-07.
-# From Jesper Norgaard Welen (2007-08-15): [The following agree:]
+# From Jesper N?rgaard Welen (2007-08-15): [The following agree:]
 # http://www.nentjes.info/Bill/bill5.htm
 # http://www.timeanddate.com/worldclock/city.html?n=53
 # From Steffen Thorsen (2007-09-04): The official information...:
@@ -288,15 +291,9 @@ Rule	Egypt	2007	only	-	Sep	Thu>=1	24:00	
 #
 # timeanddate[2] and another site I've found[3] also support that.
 #
-# [1] 
-# https://bugzilla.redhat.com/show_bug.cgi?id=492263
-# 
-# [2] 
-# http://www.timeanddate.com/worldclock/clockchange.html?n=53
-# 
-# [3] 
-# http://wwp.greenwichmeantime.com/time-zone/africa/egypt/
-# 
+# [1] https://bugzilla.redhat.com/show_bug.cgi?id=492263
+# [2] http://www.timeanddate.com/worldclock/clockchange.html?n=53
+# [3] http://wwp.greenwichmeantime.com/time-zone/africa/egypt/
 
 # From Arthur David Olson (2009-04-20):
 # In 2009 (and for the next several years), Ramadan ends before the fourth
@@ -306,14 +303,10 @@ Rule	Egypt	2007	only	-	Sep	Thu>=1	24:00	
 # From Steffen Thorsen (2009-08-11):
 # We have been able to confirm the August change with the Egyptian Cabinet
 # Information and Decision Support Center:
-# 
 # http://www.timeanddate.com/news/time/egypt-dst-ends-2009.html
-# 
 #
 # The Middle East News Agency
-# 
 # http://www.mena.org.eg/index.aspx
-# 
 # also reports "Egypt starts winter time on August 21"
 # today in article numbered "71, 11/08/2009 12:25 GMT."
 # Only the title above is available without a subscription to their service,
@@ -321,19 +314,14 @@ Rule	Egypt	2007	only	-	Sep	Thu>=1	24:00	
 # (at least today).
 
 # From Alexander Krivenyshev (2010-07-20):
-# According to News from Egypt -  Al-Masry Al-Youm Egypt's cabinet has
+# According to News from Egypt - Al-Masry Al-Youm Egypt's cabinet has
 # decided that Daylight Saving Time will not be used in Egypt during
 # Ramadan.
 #
 # Arabic translation:
-# "Clocks to go back during Ramadan--and then forward again"
-# 
+# "Clocks to go back during Ramadan - and then forward again"
 # http://www.almasryalyoum.com/en/news/clocks-go-back-during-ramadan-and-then-forward-again
-# 
-# or
-# 
 # http://www.worldtimezone.com/dst_news/dst_news_egypt02.html
-# 
 
 # From Ahmad El-Dardiry (2014-05-07):
 # Egypt is to change back to Daylight system on May 15
@@ -433,10 +421,15 @@ Zone	Africa/Asmara	2:35:32 -	LMT	1870
 			3:00	-	EAT
 
 # Ethiopia
-# From Paul Eggert (2006-03-22):
-# Shanks & Pottenger write that Ethiopia had six narrowly-spaced time zones
-# between 1870 and 1890, and that they merged to 38E50 (2:35:20) in 1890.
-# We'll guess that 38E50 is for Adis Dera.
+# From Paul Eggert (2014-07-31):
+# Like the Swahili of Kenya and Tanzania, many Ethiopians keep a
+# 12-hour clock starting at our 06:00, so their "8 o'clock" is our
+# 02:00 or 14:00.  Keep this in mind when you ask the time in Amharic.
+#
+# Shanks & Pottenger write that Ethiopia had six narrowly-spaced time
+# zones between 1870 and 1890, that they merged to 38E50 (2:35:20) in
+# 1890, and that they switched to 3:00 on 1936-05-05.  Perhaps 38E50
+# was for Adis Dera.  Quite likely the Shanks data are wrong anyway.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Africa/Addis_Ababa	2:34:48 -	LMT	1870
 			2:35:20	-	ADMT	1936 May 5    # Adis Dera MT
@@ -448,28 +441,24 @@ Zone Africa/Libreville	0:37:48 -	LMT	191
 			1:00	-	WAT
 
 # Gambia
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Banjul	-1:06:36 -	LMT	1912
-			-1:06:36 -	BMT	1935	# Banjul Mean Time
-			-1:00	-	WAT	1964
-			 0:00	-	GMT
+# See Africa/Abidjan.
 
 # Ghana
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-# Whitman says DST was observed from 1931 to ``the present'';
-# go with Shanks & Pottenger.
-Rule	Ghana	1936	1942	-	Sep	 1	0:00	0:20	GHST
-Rule	Ghana	1936	1942	-	Dec	31	0:00	0	GMT
+# Whitman says DST was observed from 1931 to "the present";
+# Shanks & Pottenger say 1936 to 1942;
+# and September 1 to January 1 is given by:
+# Scott Keltie J, Epstein M (eds), The Statesman's Year-Book,
+# 57th ed. Macmillan, London (1920), OCLC 609408015, pp xxviii.
+# For lack of better info, assume DST was observed from 1920 to 1942.
+Rule	Ghana	1920	1942	-	Sep	 1	0:00	0:20	GHST
+Rule	Ghana	1920	1942	-	Dec	31	0:00	0	GMT
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Accra	-0:00:52 -	LMT	1918
 			 0:00	Ghana	%s
 
 # Guinea
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Conakry	-0:54:52 -	LMT	1912
-			 0:00	-	GMT	1934 Feb 26
-			-1:00	-	WAT	1960
-			 0:00	-	GMT
+# See Africa/Abidjan.
 
 # Guinea-Bissau
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -577,18 +566,8 @@ Zone	Africa/Blantyre	2:20:00 -	LMT	1903 
 			2:00	-	CAT
 
 # Mali
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Bamako	-0:32:00 -	LMT	1912
-			 0:00	-	GMT	1934 Feb 26
-			-1:00	-	WAT	1960 Jun 20
-			 0:00	-	GMT
-
 # Mauritania
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone Africa/Nouakchott	-1:03:48 -	LMT	1912
-			 0:00	-	GMT	1934 Feb 26
-			-1:00	-	WAT	1960 Nov 28
-			 0:00	-	GMT
+# See Africa/Abidjan.
 
 # Mauritius
 
@@ -612,9 +591,7 @@ Zone Africa/Nouakchott	-1:03:48 -	LMT	19
 
 # From Steffen Thorsen (2008-07-10):
 # According to
-# 
 # http://www.lexpress.mu/display_article.php?news_id=111216
-# 
 # (in French), Mauritius will start and end their DST a few days earlier
 # than previously announced (2008-11-01 to 2009-03-31).  The new start
 # date is 2008-10-26 at 02:00 and the new end date is 2009-03-27 (no time
@@ -633,18 +610,13 @@ Zone Africa/Nouakchott	-1:03:48 -	LMT	19
 # published on Monday, June 30, 2008...
 #
 # I guess that article in French "Le gouvernement avance l'introduction
-# de l'heure d'ete" stating that DST in Mauritius starting on October 26
-# and ending on March 27, 2009 is the most recent one.
-# ...
-# 
+# de l'heure d'?t?" stating that DST in Mauritius starting on October 26
+# and ending on March 27, 2009 is the most recent one....
 # http://www.worldtimezone.com/dst_news/dst_news_mauritius02.html
-# 
 
 # From Riad M. Hossen Ally (2008-08-03):
 # The Government of Mauritius weblink
-# 
 # http://www.gov.mu/portal/site/pmosite/menuitem.4ca0efdee47462e7440a600248a521ca/?content_id=4728ca68b2a5b110VgnVCM1000000a04a8c0RCRD
-# 
 # Cabinet Decision of July 18th, 2008 states as follows:
 #
 # 4. ...Cabinet has agreed to the introduction into the National Assembly
@@ -654,33 +626,25 @@ Zone Africa/Nouakchott	-1:03:48 -	LMT	19
 # States of America. It will start at two o'clock in the morning on the
 # last Sunday of October and will end at two o'clock in the morning on
 # the last Sunday of March the following year. The summer time for the
-# year 2008 - 2009 will, therefore, be effective as from 26 October 2008
+# year 2008-2009 will, therefore, be effective as from 26 October 2008
 # and end on 29 March 2009.
 
 # From Ed Maste (2008-10-07):
 # THE TIME BILL (No. XXVII of 2008) Explanatory Memorandum states the
 # beginning / ending of summer time is 2 o'clock standard time in the
 # morning of the last Sunday of October / last Sunday of March.
-# 
 # http://www.gov.mu/portal/goc/assemblysite/file/bill2708.pdf
-# 
 
 # From Steffen Thorsen (2009-06-05):
 # According to several sources, Mauritius will not continue to observe
 # DST the coming summer...
 #
 # Some sources, in French:
-# 
 # http://www.defimedia.info/news/946/Rashid-Beebeejaun-:-%C2%AB-L%E2%80%99heure-d%E2%80%99%C3%A9t%C3%A9-ne-sera-pas-appliqu%C3%A9e-cette-ann%C3%A9e-%C2%BB
-# 
-# 
 # http://lexpress.mu/Story/3398~Beebeejaun---Les-objectifs-d-%C3%A9conomie-d-%C3%A9nergie-de-l-heure-d-%C3%A9t%C3%A9-ont-%C3%A9t%C3%A9-atteints-
-# 
 #
 # Our wrap-up:
-# 
 # http://www.timeanddate.com/news/time/mauritius-dst-will-not-repeat.html
-# 
 
 # From Arthur David Olson (2009-07-11):
 # The "mauritius-dst-will-not-repeat" wrapup includes this:
@@ -704,7 +668,7 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 			3:00	-	EAT
 
 # Morocco
-# See the `europe' file for Spanish Morocco (Africa/Ceuta).
+# See the 'europe' file for Spanish Morocco (Africa/Ceuta).
 
 # From Alex Krivenyshev (2008-05-09):
 # Here is an article that Morocco plan to introduce Daylight Saving Time between
@@ -712,60 +676,43 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 #
 # "... Morocco is to save energy by adjusting its clock during summer so it will
 # be one hour ahead of GMT between 1 June and 27 September, according to
-# Communication Minister and Gov ernment Spokesman, Khalid Naciri...."
+# Communication Minister and Government Spokesman, Khalid Naciri...."
 #
-# 
 # http://www.worldtimezone.net/dst_news/dst_news_morocco01.html
-# 
-# OR
-# 
 # http://en.afrik.com/news11892.html
-# 
 
 # From Alex Krivenyshev (2008-05-09):
 # The Morocco time change can be confirmed on Morocco web site Maghreb Arabe Presse:
-# 
 # http://www.map.ma/eng/sections/box3/morocco_shifts_to_da/view
-# 
 #
 # Morocco shifts to daylight time on June 1st through September 27, Govt.
 # spokesman.
 
 # From Patrice Scattolin (2008-05-09):
 # According to this article:
-# 
 # http://www.avmaroc.com/actualite/heure-dete-comment-a127896.html
-# 
-# (and republished here:
-# 
-# http://www.actu.ma/heure-dete-comment_i127896_0.html
-# 
-# )
-# the changes occurs at midnight:
-#
-# saturday night may 31st at midnight (which in french is to be
-# intrepreted as the night between saturday and sunday)
-# sunday night the 28th  at midnight
-#
-# Seeing that the 28th is monday, I am guessing that she intends to say
-# the midnight of the 28th which is the midnight between sunday and
-# monday, which jives with other sources that say that it's inclusive
-# june1st to sept 27th.
+# (and republished here: )
+# the changes occur at midnight:
+#
+# Saturday night May 31st at midnight (which in French is to be
+# interpreted as the night between Saturday and Sunday)
+# Sunday night the 28th at midnight
+#
+# Seeing that the 28th is Monday, I am guessing that she intends to say
+# the midnight of the 28th which is the midnight between Sunday and
+# Monday, which jives with other sources that say that it's inclusive
+# June 1st to Sept 27th.
 #
 # The decision was taken by decree *2-08-224 *but I can't find the decree
 # published on the web.
 #
 # It's also confirmed here:
-# 
 # http://www.maroc.ma/NR/exeres/FACF141F-D910-44B0-B7FA-6E03733425D1.htm
-# 
-# on a government portal as being  between june 1st and sept 27th (not yet
-# posted in english).
+# on a government portal as being between June 1st and Sept 27th (not yet
+# posted in English).
 #
-# The following google query will generate many relevant hits:
-# 
+# The following Google query will generate many relevant hits:
 # http://www.google.com/search?hl=en&q=Conseil+de+gouvernement+maroc+heure+avance&btnG=Search
-# 
 
 # From Steffen Thorsen (2008-08-27):
 # Morocco will change the clocks back on the midnight between August 31
@@ -773,47 +720,32 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 # of September:
 #
 # One article about it (in French):
-# 
 # http://www.menara.ma/fr/Actualites/Maroc/Societe/ci.retour_a_l_heure_gmt_a_partir_du_dimanche_31_aout_a_minuit_officiel_.default
-# 
 #
 # We have some further details posted here:
-# 
 # http://www.timeanddate.com/news/time/morocco-ends-dst-early-2008.html
-# 
 
 # From Steffen Thorsen (2009-03-17):
 # Morocco will observe DST from 2009-06-01 00:00 to 2009-08-21 00:00 according
 # to many sources, such as
-# 
 # http://news.marweb.com/morocco/entertainment/morocco-daylight-saving.html
-# 
-# 
 # http://www.medi1sat.ma/fr/depeche.aspx?idp=2312
-# 
 # (French)
 #
 # Our summary:
-# 
 # http://www.timeanddate.com/news/time/morocco-starts-dst-2009.html
-# 
 
 # From Alexander Krivenyshev (2009-03-17):
 # Here is a link to official document from Royaume du Maroc Premier Ministre,
-# Ministere de la Modernisation des Secteurs Publics
+# Minist?re de la Modernisation des Secteurs Publics
 #
 # Under Article 1 of Royal Decree No. 455-67 of Act 23 safar 1387 (2 june 1967)
 # concerning the amendment of the legal time, the Ministry of Modernization of
 # Public Sectors announced that the official time in the Kingdom will be
 # advanced 60 minutes from Sunday 31 May 2009 at midnight.
 #
-# 
 # http://www.mmsp.gov.ma/francais/Actualites_fr/PDF_Actualites_Fr/HeureEte_FR.pdf
-# 
-#
-# 
 # http://www.worldtimezone.com/dst_news/dst_news_morocco03.html
-# 
 
 # From Steffen Thorsen (2010-04-13):
 # Several news media in Morocco report that the Ministry of Modernization
@@ -821,14 +753,10 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 # 2010-05-02 to 2010-08-08.
 #
 # Example:
-# 
 # http://www.lavieeco.com/actualites/4099-le-maroc-passera-a-l-heure-d-ete-gmt1-le-2-mai.html
-# 
 # (French)
 # Our page:
-# 
 # http://www.timeanddate.com/news/time/morocco-starts-dst-2010.html
-# 
 
 # From Dan Abitol (2011-03-30):
 # ...Rules for Africa/Casablanca are the following (24h format)
@@ -838,34 +766,20 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 # The change was broadcast on the FM Radio
 # I ve called ANRT (telecom regulations in Morocco) at
 # +212.537.71.84.00
-# 
 # http://www.anrt.net.ma/fr/
-# 
 # They said that
-# 
 # http://www.map.ma/fr/sections/accueil/l_heure_legale_au_ma/view
-# 
 # is the official publication to look at.
 # They said that the decision was already taken.
 #
 # More articles in the press
-# 
-# http://www.yabiladi.com/articles/details/5058/secret-l-heure-d-ete-maroc-lev
-# 
-# e.html
-# 
+# http://www.yabiladi.com/articles/details/5058/secret-l-heure-d-ete-maroc-leve.html
 # http://www.lematin.ma/Actualite/Express/Article.asp?id=148923
-# 
-# 
 # http://www.lavieeco.com/actualite/Le-Maroc-passe-sur-GMT%2B1-a-partir-de-dim
-# anche-prochain-5538.html
-# 
 
 # From Petr Machata (2011-03-30):
 # They have it written in English here:
-# 
 # http://www.map.ma/eng/sections/home/morocco_to_spring_fo/view
-# 
 #
 # It says there that "Morocco will resume its standard time on July 31,
 # 2011 at midnight." Now they don't say whether they mean midnight of
@@ -873,20 +787,16 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 # also been like that in the past.
 
 # From Alexander Krivenyshev (2012-03-09):
-# According to Infomédiaire web site from Morocco (infomediaire.ma),
-# on March 9, 2012, (in French) Heure légale:
-# Le Maroc adopte officiellement l'heure d'été
-# 
+# According to Infom?diaire web site from Morocco (infomediaire.ma),
+# on March 9, 2012, (in French) Heure l?gale:
+# Le Maroc adopte officiellement l'heure d'?t?
 # http://www.infomediaire.ma/news/maroc/heure-l%C3%A9gale-le-maroc-adopte-officiellement-lheure-d%C3%A9t%C3%A9
-# 
 # Governing Council adopted draft decree, that Morocco DST starts on
 # the last Sunday of March (March 25, 2012) and ends on
 # last Sunday of September (September 30, 2012)
 # except the month of Ramadan.
 # or (brief)
-# 
 # http://www.worldtimezone.com/dst_news/dst_news_morocco06.html
-# 
 
 # From Arthur David Olson (2012-03-10):
 # The infomediaire.ma source indicates that the system is to be in
@@ -897,17 +807,13 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 
 # From Christophe Tropamer (2012-03-16):
 # Seen Morocco change again:
-# 
 # http://www.le2uminutes.com/actualite.php
-# 
-# "...à partir du dernier dimance d'avril et non fins mars,
-# comme annoncé précédemment."
+# "...? partir du dernier dimanche d'avril et non fins mars,
+# comme annonc? pr?c?demment."
 
 # From Milamber Space Network (2012-07-17):
 # The official return to GMT is announced by the Moroccan government:
-# 
 # http://www.mmsp.gov.ma/fr/actualites.aspx?id=288 [in French]
-# 
 #
 # Google translation, lightly edited:
 # Back to the standard time of the Kingdom (GMT)
@@ -1052,7 +958,7 @@ Zone Africa/Casablanca	-0:30:20 -	LMT	19
 # Assume that this has been true since Western Sahara switched to GMT,
 # since most of it was then controlled by Morocco.
 
-Zone Africa/El_Aaiun	-0:52:48 -	LMT	1934 Jan
+Zone Africa/El_Aaiun	-0:52:48 -	LMT	1934 Jan # El Aai?n
 			-1:00	-	WAT	1976 Apr 14
 			 0:00	Morocco	WE%sT
 
@@ -1102,15 +1008,17 @@ Zone	Africa/Niamey	 0:08:28 -	LMT	1912
 Zone	Africa/Lagos	0:13:36 -	LMT	1919 Sep
 			1:00	-	WAT
 
-# Reunion
+# R?union
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Indian/Reunion	3:41:52 -	LMT	1911 Jun	# Saint-Denis
-			4:00	-	RET	# Reunion Time
+			4:00	-	RET	# R?union Time
 #
-# Scattered Islands (Iles Eparses) administered from Reunion are as follows.
+# Crozet Islands also observes R?union time; see the 'antarctica' file.
+#
+# Scattered Islands (?les ?parses) administered from R?union are as follows.
 # The following information about them is taken from
-# Iles Eparses (www.outre-mer.gouv.fr/domtom/ile.htm, 1997-07-22, in French;
-# no longer available as of 1999-08-17).
+# ?les ?parses (, 1997-07-22,
+# in French; no longer available as of 1999-08-17).
 # We have no info about their time zone histories.
 #
 # Bassas da India - uninhabited
@@ -1125,28 +1033,17 @@ Zone	Africa/Kigali	2:00:16 -	LMT	1935 Ju
 			2:00	-	CAT
 
 # St Helena
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone Atlantic/St_Helena	-0:22:48 -	LMT	1890		# Jamestown
-			-0:22:48 -	JMT	1951	# Jamestown Mean Time
-			 0:00	-	GMT
+# See Africa/Abidjan.
 # The other parts of the St Helena territory are similar:
 #	Tristan da Cunha: on GMT, say Whitman and the CIA
-#	Ascension: on GMT, says usno1995 and the CIA
+#	Ascension: on GMT, say the USNO (1995-12-21) and the CIA
 #	Gough (scientific station since 1955; sealers wintered previously):
 #		on GMT, says the CIA
-#	Inaccessible, Nightingale: no information, but probably GMT
-
-# Sao Tome and Principe
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Sao_Tome	 0:26:56 -	LMT	1884
-			-0:36:32 -	LMT	1912	# Lisbon Mean Time
-			 0:00	-	GMT
+#	Inaccessible, Nightingale: uninhabited
 
+# S?o Tom? and Pr?ncipe
 # Senegal
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Dakar	-1:09:44 -	LMT	1912
-			-1:00	-	WAT	1941 Jun
-			 0:00	-	GMT
+# See Africa/Abidjan.
 
 # Seychelles
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -1160,17 +1057,7 @@ Zone	Indian/Mahe	3:41:48 -	LMT	1906 Jun	
 # Possibly the islands were uninhabited.
 
 # Sierra Leone
-# Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-# Whitman gives Mar 31 - Aug 31 for 1931 on; go with Shanks & Pottenger.
-Rule	SL	1935	1942	-	Jun	 1	0:00	0:40	SLST
-Rule	SL	1935	1942	-	Oct	 1	0:00	0	WAT
-Rule	SL	1957	1962	-	Jun	 1	0:00	1:00	SLST
-Rule	SL	1957	1962	-	Sep	 1	0:00	0	GMT
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Freetown	-0:53:00 -	LMT	1882
-			-0:53:00 -	FMT	1913 Jun # Freetown Mean Time
-			-1:00	SL	%s	1957
-			 0:00	SL	%s
+# See Africa/Abidjan.
 
 # Somalia
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -1193,9 +1080,9 @@ Zone Africa/Johannesburg 1:52:00 -	LMT	1
 
 # Sudan
 #
-# From 
-# Sudan News Agency (2000-01-13)
-# , also reported by Michael De Beukelaer-Dossche via Steffen Thorsen:
+# From 
+# Sudan News Agency (2000-01-13),
+# also reported by Micha?l De Beukelaer-Dossche via Steffen Thorsen:
 # Clocks will be moved ahead for 60 minutes all over the Sudan as of noon
 # Saturday....  This was announced Thursday by Caretaker State Minister for
 # Manpower Abdul-Rahman Nur-Eddin.
@@ -1226,14 +1113,12 @@ Zone Africa/Dar_es_Salaam 2:37:08 -	LMT	
 			3:00	-	EAT
 
 # Togo
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Lome	0:04:52 -	LMT	1893
-			0:00	-	GMT
+# See Africa/Abidjan.
 
 # Tunisia
 
 # From Gwillim Law (2005-04-30):
-# My correspondent, Risto Nykanen, has alerted me to another adoption of DST,
+# My correspondent, Risto Nyk?nen, has alerted me to another adoption of DST,
 # this time in Tunisia.  According to Yahoo France News
 # , in a story attributed to AP
 # and dated 2005-04-26, "Tunisia has decided to advance its official time by
@@ -1242,7 +1127,7 @@ Zone	Africa/Lome	0:04:52 -	LMT	1893
 # Saturday."  (My translation)
 #
 # From Oscar van Vlijmen (2005-05-02):
-# LaPresse, the first national daily newspaper ...
+# La Presse, the first national daily newspaper ...
 # 
 # ... DST for 2005: on: Sun May 1 0h standard time, off: Fri Sept. 30,
 # 1h standard time.
@@ -1256,18 +1141,12 @@ Zone	Africa/Lome	0:04:52 -	LMT	1893
 # From Steffen Thorsen (2009-03-16):
 # According to several news sources, Tunisia will not observe DST this year.
 # (Arabic)
-# 
 # http://www.elbashayer.com/?page=viewn&nid=42546
-# 
-# 
 # http://www.babnet.net/kiwidetail-15295.asp
-# 
 #
 # We have also confirmed this with the US embassy in Tunisia.
 # We have a wrap-up about this on the following page:
-# 
 # http://www.timeanddate.com/news/time/tunisia-cancels-dst-2009.html
-# 
 
 # From Alexander Krivenyshev (2009-03-17):
 # Here is a link to Tunis Afrique Presse News Agency
@@ -1275,20 +1154,17 @@ Zone	Africa/Lome	0:04:52 -	LMT	1893
 # Standard time to be kept the whole year long (tap.info.tn):
 #
 # (in English)
-# 
 # http://www.tap.info.tn/en/index.php?option=com_content&task=view&id=26813&Itemid=157
-# 
 #
 # (in Arabic)
-# 
 # http://www.tap.info.tn/ar/index.php?option=com_content&task=view&id=61240&Itemid=1
-# 
 
-# From Arthur David Olson (2009--3-18):
-# The Tunis Afrique Presse News Agency notice contains this: "This measure is due to the fact
-# that the fasting month of ramadan coincides with the period concerned by summer time.
-# Therefore, the standard time will be kept unchanged the whole year long."
-# So foregoing DST seems to be an exception (albeit one that may be repeated in the  future).
+# From Arthur David Olson (2009-03-18):
+# The Tunis Afrique Presse News Agency notice contains this: "This measure is
+# due to the fact that the fasting month of Ramadan coincides with the period
+# concerned by summer time.  Therefore, the standard time will be kept
+# unchanged the whole year long."  So foregoing DST seems to be an exception
+# (albeit one that may be repeated in the future).
 
 # From Alexander Krivenyshev (2010-03-27):
 # According to some news reports Tunis confirmed not to use DST in 2010
@@ -1300,12 +1176,8 @@ Zone	Africa/Lome	0:04:52 -	LMT	1893
 # coincided with the month of Ramadan..."
 #
 # (in Arabic)
-# 
 # http://www.moheet.com/show_news.aspx?nid=358861&pg=1
-# 
 # http://www.almadenahnews.com/newss/news.php?c=118&id=38036
-# or
-# 
 # http://www.worldtimezone.com/dst_news/dst_news_tunis02.html
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S

Modified: stable/9/contrib/tzdata/antarctica
==============================================================================
--- stable/9/contrib/tzdata/antarctica	Fri Aug 29 13:26:11 2014	(r270814)
+++ stable/9/contrib/tzdata/antarctica	Fri Aug 29 13:27:49 2014	(r270815)
@@ -1,16 +1,13 @@
-# 
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
 # From Paul Eggert (1999-11-15):
 # To keep things manageable, we list only locations occupied year-round; see
-# 
 # COMNAP - Stations and Bases
-# 
+# 
 # and
-# 
 # Summary of the Peri-Antarctic Islands (1998-07-23)
-# 
+# 
 # for information.
 # Unless otherwise specified, we have no time zone information.
 #
@@ -55,19 +52,19 @@ Rule	ChileAQ	2012	max	-	Sep	Sun>=2	4:00u
 
 # Argentina - year-round bases
 # Belgrano II, Confin Coast, -770227-0343737, since 1972-02-05
-# Esperanza, San Martin Land, -6323-05659, since 1952-12-17
-# Jubany, Potter Peninsula, King George Island, -6414-0602320, since 1982-01
-# Marambio, Seymour I, -6414-05637, since 1969-10-29
+# Carlini, Potter Cove, King George Island, -6414-0602320, since 1982-01
+# Esperanza, Hope Bay, -6323-05659, since 1952-12-17
+# Marambio, -6414-05637, since 1969-10-29
 # Orcadas, Laurie I, -6016-04444, since 1904-02-22
-# San Martin, Debenham I, -6807-06708, since 1951-03-21
+# San Mart?n, Barry I, -6808-06706, since 1951-03-21
 #	(except 1960-03 / 1976-03-21)
 
 # Australia - territories
 # Heard Island, McDonald Islands (uninhabited)
 #	previously sealers and scientific personnel wintered
-#	
 #	Margaret Turner reports
-#	 (1999-09-30) that they're UTC+5, with no DST;
+#	
+#	(1999-09-30) that they're UTC+5, with no DST;
 #	presumably this is when they have visitors.
 #
 # year-round bases
@@ -84,14 +81,10 @@ Rule	ChileAQ	2012	max	-	Sep	Sun>=2	4:00u
 # The changes occurred on 2009-10-18 at 02:00 (local times).
 #
 # Government source: (Australian Antarctic Division)
-# 
 # http://www.aad.gov.au/default.asp?casid=37079
-# 
 #
 # We have more background information here:
-# 
 # http://www.timeanddate.com/news/time/antarctica-new-times.html
-# 
 
 # From Steffen Thorsen (2010-03-10):
 # We got these changes from the Australian Antarctic Division: ...
@@ -106,19 +99,17 @@ Rule	ChileAQ	2012	max	-	Sep	Sun>=2	4:00u
 # - Mawson station stays on UTC+5.
 #
 # Background:
-# 
 # http://www.timeanddate.com/news/time/antartica-time-changes-2010.html
-# 
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Antarctica/Casey	0	-	zzz	1969
-			8:00	-	WST	2009 Oct 18 2:00
-						# Western (Aus) Standard Time
+			8:00	-	AWST	2009 Oct 18 2:00
+						# Australian Western Std Time
 			11:00	-	CAST	2010 Mar 5 2:00
 						# Casey Time
-			8:00	-	WST	2011 Oct 28 2:00
+			8:00	-	AWST	2011 Oct 28 2:00
 			11:00	-	CAST	2012 Feb 21 17:00u
-			8:00	-	WST
+			8:00	-	AWST
 Zone Antarctica/Davis	0	-	zzz	1957 Jan 13
 			7:00	-	DAVT	1964 Nov # Davis Time
 			0	-	zzz	1969 Feb
@@ -132,24 +123,27 @@ Zone Antarctica/Mawson	0	-	zzz	1954 Feb 
 						# Mawson Time
 			5:00	-	MAWT
 # References:
-# 
 # Casey Weather (1998-02-26)
-# 
-# 
+# 
 # Davis Station, Antarctica (1998-02-26)
-# 
-# 
+# 
 # Mawson Station, Antarctica (1998-02-25)
-# 
+# 
+
+# Belgium - year-round base
+# Princess Elisabeth, Queen Maud Land, -713412+0231200, since 2007
 
 # Brazil - year-round base
-# Comandante Ferraz, King George Island, -6205+05824, since 1983/4
+# Ferraz, King George Island, -6205+05824, since 1983/4
+
+# Bulgaria - year-round base
+# St. Kliment Ohridski, Livingston Island, -623829-0602153, since 1988
 
 # Chile - year-round bases and towns
 # Escudero, South Shetland Is, -621157-0585735, since 1994
-# Presidente Eduadro Frei, King George Island, -6214-05848, since 1969-03-07
-# General Bernardo O'Higgins, Antarctic Peninsula, -6319-05704, since 1948-02
-# Capitan Arturo Prat, -6230-05941
+# Frei Montalva, King George Island, -6214-05848, since 1969-03-07
+# O'Higgins, Antarctic Peninsula, -6319-05704, since 1948-02
+# Prat, -6230-05941
 # Villa Las Estrellas (a town), around the Frei base, since 1984-04-09
 # These locations have always used Santiago time; use TZ='America/Santiago'.
 
@@ -157,31 +151,35 @@ Zone Antarctica/Mawson	0	-	zzz	1954 Feb 
 # Great Wall, King George Island, -6213-05858, since 1985-02-20
 # Zhongshan, Larsemann Hills, Prydz Bay, -6922+07623, since 1989-02-26
 
-# France - year-round bases
+# France - year-round bases (also see "France & Italy")
 #
 # From Antoine Leca (1997-01-20):
 # Time data are from Nicole Pailleau at the IFRTP
 # (French Institute for Polar Research and Technology).
-# She confirms that French Southern Territories and Terre Adelie bases
-# don't observe daylight saving time, even if Terre Adelie supplies came
+# She confirms that French Southern Territories and Terre Ad?lie bases
+# don't observe daylight saving time, even if Terre Ad?lie supplies came
 # from Tasmania.
 #
 # French Southern Territories with year-round inhabitants
 #
-# Martin-de-Vivies Base, Amsterdam Island, -374105+0773155, since 1950
-# Alfred-Faure Base, Crozet Islands, -462551+0515152, since 1964
-# Port-aux-Francais, Kerguelen Islands, -492110+0701303, since 1951;
+# Alfred Faure, Possession Island, Crozet Islands, -462551+0515152, since 1964;
+#	sealing & whaling stations operated variously 1802/1911+;
+#	see Indian/Reunion.
+#
+# Martin-de-Vivi?s, Amsterdam Island, -374105+0773155, since 1950
+# Port-aux-Fran?ais, Kerguelen Islands, -492110+0701303, since 1951;
 #	whaling & sealing station operated 1908/1914, 1920/1929, and 1951/1956
 #
 # St Paul Island - near Amsterdam, uninhabited
 #	fishing stations operated variously 1819/1931
 #
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone Indian/Kerguelen	0	-	zzz	1950	# Port-aux-Francais
+Zone Indian/Kerguelen	0	-	zzz	1950	# Port-aux-Fran?ais
 			5:00	-	TFT	# ISO code TF Time
 #
 # year-round base in the main continent
-# Dumont-d'Urville, Ile des Petrels, -6640+14001, since 1956-11
+# Dumont d'Urville, ?le des P?trels, -6640+14001, since 1956-11
+#  (2005-12-05)
 #
 # Another base at Port-Martin, 50km east, began operation in 1947.
 # It was destroyed by fire on 1952-01-14.
@@ -191,20 +189,22 @@ Zone Antarctica/DumontDUrville 0 -	zzz	1
 			10:00	-	PMT	1952 Jan 14 # Port-Martin Time
 			0	-	zzz	1956 Nov
 			10:00	-	DDUT	# Dumont-d'Urville Time
-# Reference:
-# 
-# Dumont d'Urville Station (2005-12-05)
-# 
+
+# France & Italy - year-round base
+# Concordia, -750600+1232000, since 2005
 
 # Germany - year-round base
-# Georg von Neumayer, -7039-00815
+# Neumayer III, -704080-0081602, since 2009
 
-# India - year-round base
-# Dakshin Gangotri, -7005+01200
+# India - year-round bases
+# Bharati, -692428+0761114, since 2012
+# Maitri, -704558+0114356, since 1989
+
+# Italy - year-round base (also see "France & Italy")
+# Zuchelli, Terra Nova Bay, -744140+1640647, since 1986
 
 # Japan - year-round bases
-# Dome Fuji, -7719+03942
-# Syowa, -690022+0393524
+# Syowa (also known as Showa), -690022+0393524, since 1957
 #
 # From Hideyuki Suzuki (1999-02-06):
 # In all Japanese stations, +0300 is used as the standard time.
@@ -216,11 +216,11 @@ Zone Antarctica/DumontDUrville 0 -	zzz	1
 Zone Antarctica/Syowa	0	-	zzz	1957 Jan 29
 			3:00	-	SYOT	# Syowa Time
 # See:
-# 
 # NIPR Antarctic Research Activities (1999-08-17)
-# 
+# 
 
 # S Korea - year-round base
+# Jang Bogo, Terra Nova Bay, -743700+1641205 since 2014
 # King Sejong, King George Island, -6213-05847, since 1988
 
 # New Zealand - claims
@@ -269,6 +269,9 @@ Zone Antarctica/Troll	0	-	zzz	2005 Feb 1
 # Poland - year-round base
 # Arctowski, King George Island, -620945-0582745, since 1977
 
+# Romania - year-bound base
+# Law-Racovi??, Larsemann Hills, -692319+0762251, since 1986
+
 # Russia - year-round bases
 # Bellingshausen, King George Island, -621159-0585337, since 1968-02-22
 # Mirny, Davis coast, -6633+09301, since 1956-02
@@ -278,8 +281,8 @@ Zone Antarctica/Troll	0	-	zzz	2005 Feb 1
 #	year-round from 1960/61 to 1992
 
 # Vostok, since 1957-12-16, temporarily closed 1994-02/1994-11
-# 
-# From Craig Mundell (1994-12-15):
+# From Craig Mundell (1994-12-15)
+# :
 # Vostok, which is one of the Russian stations, is set on the same
 # time as Moscow, Russia.
 #
@@ -294,7 +297,7 @@ Zone Antarctica/Troll	0	-	zzz	2005 Feb 1
 #
 # From Paul Eggert (2001-05-04):
 # This seems to be hopelessly confusing, so I asked Lee Hotz about it
-# in person.  He said that some Antartic locations set their local
+# in person.  He said that some Antarctic locations set their local
 # time so that noon is the warmest part of the day, and that this
 # changes during the year and does not necessarily correspond to mean
 # solar noon.  So the Vostok time might have been whatever the clocks
@@ -306,9 +309,12 @@ Zone Antarctica/Vostok	0	-	zzz	1957 Dec 
 
 # S Africa - year-round bases
 # Marion Island, -4653+03752
-# Sanae, -7141-00250
+# SANAE IV, Vesleskarvet, Queen Maud Land, -714022-0025026, since 1997
+
+# Ukraine - year-round base
+# Vernadsky (formerly Faraday), Galindez Island, -651445-0641526, since 1954
 
-# UK
+# United Kingdom
 #
 # British Antarctic Territories (BAT) claims
 # South Orkney Islands
@@ -364,7 +370,7 @@ Zone Antarctica/Palmer	0	-	zzz	1965
 # but that he found it more convenient to keep GMT+12
 # as supplies for the station were coming from McMurdo Sound,
 # which was on GMT+12 because New Zealand was on GMT+12 all year
-# at that time (1957).  (Source: Siple's book 90 degrees SOUTH.)
+# at that time (1957).  (Source: Siple's book 90 Degrees South.)
 #
 # From Susan Smith
 # http://www.cybertours.com/whs/pole10.html

Modified: stable/9/contrib/tzdata/asia
==============================================================================
--- stable/9/contrib/tzdata/asia	Fri Aug 29 13:26:11 2014	(r270814)
+++ stable/9/contrib/tzdata/asia	Fri Aug 29 13:27:49 2014	(r270815)
@@ -1,4 +1,3 @@
-# 
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -32,7 +31,7 @@
 # A reliable and entertaining source about time zones is
 # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997).
 #
-# I invented the abbreviations marked `*' in the following table;
+# I invented the abbreviations marked '*' in the following table;
 # the rest are from earlier versions of this file, or from other sources.
 # Corrections are welcome!
 #	     std  dst
@@ -47,13 +46,14 @@
 #	7:00 WIB	west Indonesia (Waktu Indonesia Barat)

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From delphij at FreeBSD.org  Fri Aug 29 13:37:02 2014
From: delphij at FreeBSD.org (Xin LI)
Date: Fri, 29 Aug 2014 13:37:02 +0000 (UTC)
Subject: svn commit: r270816 - stable/9/sys/dev/hptnr
Message-ID: <201408291337.s7TDb2Wc058859@svn.freebsd.org>

Author: delphij
Date: Fri Aug 29 13:37:01 2014
New Revision: 270816
URL: http://svnweb.freebsd.org/changeset/base/270816

Log:
  MFC r270384:
  
  Update hptnr(4) driver to version 1.0.1 supplied by the vendor.
  
  v1.0.1 2014-8-19
    * Do not retry the command and reset the disk when failed to enable or
      disable spin up feature.
    * Fix up a bug that disk failed to probe if driver failed to access the
      10th LBA.
    * Fix a bug that request timeout but it has been completed in certain
      cases.
    * Support smartmontool for R750.
  
  Many thanks to HighPoint for continued support of FreeBSD!

Modified:
  stable/9/sys/dev/hptnr/README
  stable/9/sys/dev/hptnr/amd64-elf.hptnr_lib.o.uu
  stable/9/sys/dev/hptnr/hptnr_config.c
  stable/9/sys/dev/hptnr/hptnr_os_bsd.c
  stable/9/sys/dev/hptnr/hptnr_osm_bsd.c
  stable/9/sys/dev/hptnr/i386-elf.hptnr_lib.o.uu
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/hptnr/README
==============================================================================
--- stable/9/sys/dev/hptnr/README	Fri Aug 29 13:27:49 2014	(r270815)
+++ stable/9/sys/dev/hptnr/README	Fri Aug 29 13:37:01 2014	(r270816)
@@ -1,10 +1,19 @@
 Rocket Controller Driver for FreeBSD
-Copyright (C) 2013 HighPoint Technologies, Inc. All rights reserved.
+Copyright (C) 2014 HighPoint Technologies, Inc. All rights reserved.
 
 #############################################################################
 Revision History:
+   v1.0.1 2014-8-19
+     * Do not retry the command and reset the disk when failed to enable or 
+       disable spin up feature.
+     * Fix up a bug that disk failed to probe if driver failed to access the
+       10th LBA.
+     * Fix a bug that request timeout but it has been completed in certain 
+       cases.
+     * Support smartmontool for R750.
+
    v1.0 2013-7-3
-        First source code release
+     *First source code release
 
 #############################################################################
 
@@ -40,7 +49,7 @@ Revision History:
   2) Extract the driver files under the kernel source tree:
 
      # cd /usr/src/sys/
-     # tar xvzf /your/path/to/hptnr-freebsd-src-v1.0-130701.tgz
+     # tar xvzf /your/path/to/hptnr_freebsd_src_v1.0.1_14_08_19.tgz
 
   3) Update the kernel configuration file to include the HighPoint source.
      Assume the configure file is GENERIC, and new kernel configure file is 

Modified: stable/9/sys/dev/hptnr/amd64-elf.hptnr_lib.o.uu
==============================================================================
--- stable/9/sys/dev/hptnr/amd64-elf.hptnr_lib.o.uu	Fri Aug 29 13:27:49 2014	(r270815)
+++ stable/9/sys/dev/hptnr/amd64-elf.hptnr_lib.o.uu	Fri Aug 29 13:37:01 2014	(r270816)
@@ -1,5 +1,5 @@
 begin 644 hptnr_lib.o
-M?T5,1@(!`0D```````````$`/@`!`````````````````````````##R!0``
+M?T5,1@(!`0D```````````$`/@`!`````````````````````````+`#!@``
 M`````````$```````$``$``-`(G0Q@<(QD`P2`G"#[9'04@)P@^V1SQ(P>`H2`G"#[9'/4C
 MP@^V1S](P>`02`G"#[9'0$C!X`A(B=%("<$/ME="P>(8#[9'0\'@$`G"#[9'
 M10G"#[9'1,'@"`G02(F/B````(F'D````&:#3R(!\\-F9F:0NO____]FA?9T
 M,4B)^;\`````NO____])Q\``````9I`/M@$QT`^VP,'J"$$S%("#QP%(@\$!
-M9CGW=>6)T,-FD%-(@^Q at 2(G[1`^V3SM$#[9'.@^V3SD/ME)@E0!``##9F9FD&9FD&9FD&9FD(GQ2(L'
-MBY`$`0``B14`````#[='/&8]@&1T#&8]@)%T!F8]@)1U$0^VR8/!"+@!````
-MT^`)PNL00`^VSH/!#+@!````T^`)PDB+!XF0!`$``,-F9F:09F9FD&9FD&9F
-MD(GQ2(L'BY`$`0``B14`````#[='/&8]@&1T#&8]@)%T!F8]@)1U$0^VR8/!
-M"+C^____T\`APNL00`^VSH/!#+C^____T\`APDB+!XF0!`$``,-F9F:09F9F
-MD&9FD&9FD(GQ0(#^_W1O0(#^'W(8#[9%`L'@$`G"#[9%``G"#[9%`<'@"`G"B1-!QP0D$`$``+\0
-M)P``Z``````/ME4'P>(8#[9%!L'@$`G"#[9%!`G"#[9%!<'@"`G"B1-(BUPD
-M"$B+;"003(MD)!A,BVPD($B#Q"C#2(/L&$B)7"0(3(ED)!!)B?Q`#[;>B=[H
-M`````+\0)P``Z`````")WDR)Y^@`````2(M<)`A,BV0D$$B#Q!C#D$%7059!
-M54%455-(@^Q828G_B%0D5TB+%X!_/@`/A#P"``!!O`````!!O>#___]!OO#_
-M__]`#[;&2(E$)$A(C8*``0``2(E$)$!(C8J$`0``2(E,)#A(C8*@`0``2(E$
-M)#!(C8JD`0``2(E,)"A(C8)0`@``2(E$)"!(C8I4`@``2(E,)!A(C8+@`0``
-M2(E$)!!(@<+0`0``2(E4)`AF9I!(BT0D2$2)X4C3^*@!#X2-`0``1(GE at _T#
-M=A=$B>I(`U0D*(L"B04`````@^#^B0+K&XT4[0````")TD@#5"0XBP*)!0``
-M``"#X/Z)`K\0)P``Z`````"`?"17`'1R at _T#=A=$B?)(`U0D$(L"B04`````
-M@\@"B0+K&XT4K0````")TD@#5"0(BP*)!0````"#R`*)`D2)\$B+3"002`'!
-MC02M`````(G`2(M4)`A(`<*#_0-V"HL!B04`````ZPB+`HD%`````*@"='3K
-MXV:0 at _T#=B]$B>M(BT0D($@!V,<``````+\0)P``Z`````!(`UPD&(L#B04`
-M````@\@!B0/K08T<[0````")VTB+1"0 at 2`'8QP``````OQ`G``#H`````$@#
-M7"08BP.)!0````"#R`&)`^LW9F9FD&9FD(/]`W8K1(GJ2(M$)#!(`=#'``$`
-M``!(`U0D*(L"B04`````@\@!B0+K-F9FD&9FD(T$[0````")P$B+5"1`2`'"
-MQP(!````2`-$)#B+$(D5`````(/*`8D09F9FD&9FD$&-5"0!28/$`4&#Q0A!
-M@\8$00^V1SXYT`^'0O[__TB#Q%A;74%<05U!7D%?PV9FD%532(/L"(G12(LO
-M at _X#=B"-!/7 at ____BC02U`````(G`2(V4!=`!``"+`HD%`````(/(
-M`HD"C12U`````(U"\(G`2(V,!>`!``")TDB-E!70`0``@_X#=@J+`8D%````
-M`.L(BP*)!0````"H`G1UZ^.#_ at -V.(T<]>#___^)VTB-A"M0`@``QP``````
-MOQ`G``#H`````$B-G"M4`@``BP.)!0````"#R`&)`^LVC1SU`````(G;2(V$
-M*U`"``#'``````"_$"<``.@`````2(V<*U0"``"+`XD%`````(/(`8D#2(/$
-M"%M=PY"0D)"0D$B)^4B+/P^W@;`2``"#P`%FB8&P$@``9CN!M!(``'()9L>!
-ML!(`````#[>!L!(``$C!X`)(`X%H$0``BQ:)$`^W@;`2``")ARP!``##9F:0
-M08G0N`````#&!`@`2(/``4B#^`1U\HGR9H'B_P\/MP%F)0#P"=!FB0$/ME<-
-MP>(,BP$E_P_P_PG0B0$/MD<*@^`"2(/X`1G2@^("@\(!P>(%#[9!`X/@'PG0
-M@\@0@^#WB$$#]D<*`7071(G"@^)_P>($#[=!`F8E#_@)T&:)00+SPV9F9I!F
-M9F:09F:09F:0N`````#&!#``2(/``4B#^`UU\@^V1SF(!@^V1SJ(1@$/MD<[
-MB$8"#[9'/(A&`P^V1SV(1 at 0/MD<^B$8%#[9'/XA&!O:'E@````1T(P^V1T"(
-M1@@/MD=!B$8)#[9'0HA&"@^V1T.(1 at L/MD=$B$8,N`$```##9F9FD&9F9I!F
-M9I"Z`````$&Z`````$&Y_____^M2`=)$B<#3^*@!=!+WP@````%U&H'R=R?;
-M`.L29I")T#5W)]L`]\(````!#T70@^D!1#G)=@(B$@%#[?`C02%``,``(F"<`$``$B+%P^W3C*#X1^X`0``
-M`$C3X(F"=`$``+H`````Z`````!(@\0(PY!!5T%6055!5%532(/L"$B)_4F)
-M]H!_0P!T);D`````]D8-`70.ZQA!#[9C3^*@!=0R#P0$/MD5#9CG(=^A)
-MBT9`2(7`=!Q(C;"0````2(M]*.@`````28MV0$B)[^@`````28U&8$DY1F`/
-MA%P!``!)B<=,B?_H`````$B)PTB#>$``#X0I`0``@+B#``````^$H@```&:#
-M?6@`#X27````0;T`````0;P`````D$B+A;`)``!,`>!(BS!(A?9T8P^W1B!F
-M.T,X=5EF/84`=U,/M\"`O`5@"```_W1&2(M5``^W1C)FP>@%#[?`C02%``,`
-M`(F"<`$``$B+50`/MTXR@^$?N`$```!(T^")@G0!``#&1B0AN@````!(B>_H
-M`````$&#Q0%)@\0(#[=%:$0YZ`^/=O___TB+0T!(QT!@`````/9#3`1U&4B)
-M[^@`````2(MS0+H!````2(GOZ`````!(BT-`#[90`@^V<`%(Q\<`````N```
-M``#H`````$B+4T!(B[7P"```OP$```#H`````$B+4T!(B[7P"```OP8```#H
-M`````$C'0T``````08!N#@%(B=Y(B>_H`````$TY?F`/A:?^__])QT9`````
-M`$B+10"+B%@!``")#0````"%R70*2(M%`(F(6`$``$B#Q`A;74%<05U!7D%?
-MPV9F9I!F9I!F9I!F9I!(@^P(3(L'00^V<$-`A/9T-4F- at +@2``"Y`````$@Y
-M^'4:ZR(/ML%(C11`2(T4D$F-E-"X$@``2#GZ=`^#P0%`./%UX.L%N0`````/
-MML%(C11`2(T4D$B-!-4`````28NT`,`2``!(A?9T??9&"@)T=TF-A`"X$@``
-M2#E&('5I#[9&6(3`=`B#P`&(1ECK64B+5DA(@^HX2(U.2$B-0CA(.A``=2SK"F9FD$B#>A``=2#&1E@!#[:*NP```$F+N+`0``!)Q\``````Z```
-M``#K$4B+4CA(@^HX2(U".$@YR'7(2(/$",-F9I!(@^PH2(E<)`A(B6PD$$R)
-M9"083(EL)"!(B?M(B?5(BT9P3(MH*`^W5B!F@?J%`'=T#[?"#[:$!V`(```\
-M_W1E9H/Z?W<<#[;`2(N7.`D``$AIP)@!``!(BT004`^V0`CK2&:!^H$`=QP/
-MML!(BY>("0``2&G`R`\``$B+1!`(#[9`".LE#[;`2(N78`D``$B-!,!(P>`%
-M2(N$$(@````/MD`(ZP6X_P```$B81`^VI`/F"```2(MU>$B%]G0(2(G?Z```
-M``!(B>Y(B=_H`````$$/ML1(C3R`2(T\N$B-O/O``0``3(GN0?^5H````$B+
-M7"0(2(ML)!!,BV0D&$R+;"0 at 2(/$*,-F9F:09F9FD$%455-(B?5(B=-F at 7XX
-MX0%U$0^V1CJ#Z!%!O``````\`78O2(L72(NZ.`D```^W12"^:)8!`&8]A0!W
-M$@^WP`^VA`)@"```2&GPF`$``$R-)#?&0P0%@&,%_H`CW[@`````9H%]..$!
-M=18/MD4Z@^@!/`$/EL`/ML!F9F:09F:0P>`'#[83@^)_"<*($P^VA98```"#
+M9CGW=>6)T,-FD$B#[&A$#[9/.T0/MD)^
+M__[_B9$$`0``)7[_\O](BU<(B0)(BU<(B4(,2(M7"(E"$$B+5PB)0A1(BU<(
+MB4(82(M7"(E"!$B+!XN`5`$``(D%`````"7^`/__2(L7B8)4`0``PV9F9I!F
+M9I!F9I!F9I")\4B+!XN0!`$``(D5``````^W1SQF/8!D=`QF/8"1=`9F/8"4
+M=1$/MLF#P0BX`0```-/@"<+K$$`/MLZ#P0RX`0```-/@"<)(BP>)D`0!``##
+M9F9FD&9F9I!F9I!F9I")\4B+!XN0!`$``(D5``````^W1SQF/8!D=`QF/8"1
+M=`9F/8"4=1$/MLF#P0BX_O___]/`(<+K$$`/MLZ#P0RX_O___]/`(<)(BP>)
+MD`0!``##9F9FD&9F9I!F9I!F9I")\4"`_O]T;T"`_A]W,HNW&`$``+H!````
+MT^*)T/?0(?")AQ@!``"+AU@!``")!0`````AT'1`B8=8`0``PV:0B[<<`0``
+M#[;!@^@@N@$```")P=/BB=#WT"'PB8<<`0``BX=@`0``B04`````(=!T!HF'
+M8`$``//#9F9FD&9FD$B#["A(B5PD"$B);"003(ED)!A,B6PD($B)U8GP3(LO
+M0(#^`P^&B0```$B-',4`````@>/X!P``38VD'0`"``!!QP0D#`$``+\0)P``
+MZ`````!)C9P=!`(```^V50/!XA@/MD4"P>`0"<(/MD4`"<(/MD4!P>`("<*)
+M$T''!"00`0``OQ`G``#H``````^V50?!XA@/MD4&P>`0"<(/MD4$"<(/MD4%
+MP>`("<*)$^F$````2(TZ`````"_$"<``.@`````B=Y,B>?H`````$B+7"0(3(MD
+M)!!(@\08PY!!5T%6055!5%532(/L6$F)_XA4)%=(BQ>`?SX`#X0\`@``0;P`
+M````0;W at ____0;[P____0`^VQDB)1"1(2(V"@`$``$B)1"1`2(V*A`$``$B)
+M3"0X2(V"H`$``$B)1"0P2(V*I`$``$B)3"0H2(V"4`(``$B)1"0 at 2(V*5`(`
+M`$B)3"082(V"X`$``$B)1"002('"T`$``$B)5"0(9F:02(M$)$A$B>%(T_BH
+M`0^$C0$``$2)Y8/]`W871(GJ2`-4)"B+`HD%`````(/@_HD"ZQN-%.T`````
+MB=)(`U0D.(L"B04`````@^#^B0*_$"<``.@`````@'PD5P!TOC at _X#=CB-'/7 at ____B=M(
+MC80K4`(``,<``````+\0)P``Z`````!(C9PK5`(``(L#B04`````@\@!B0/K
+M-HT<]0````")VTB-A"M0`@``QP``````OQ`G``#H`````$B-G"M4`@``BP.)
+M!0````"#R`&)`TB#Q`A;7<.0D)"0D)!(B?E(BS\/MX&P$@``@\`!9HF!L!(`
+M`&8[@;02``!R"6;'@;`2``````^W@;`2``!(P>`"2`.!:!$``(L6B1`/MX&P
+M$@``B8@0B`>)T,'H"(A'`8A7`L-%#[8$,KD'````ZZ)F9F:09F9F
+MD&9F9I!F9I!(BX<($0``BQ"+4`2+4`B+0`R)!0````##9F9FD&9FD$B#[`A(
+MBX:(````1`^V1T-%A,!T(@^V4`VY`````/;"`70,ZQ)(B=!(T_BH`74(@\$!
+M1#C!=>[&1D(,Z`````!(@\0(PV9F9I!F9F:09F:02(/L"$B)^$B+/V;'0$X!
+M`,9`0AU(B<;H`````$B#Q`C#9F9FD&9F9I!F9F:09F:02(/L"$B+/P^W]DC!
+MY at -(`[>P"0``2(LV2(7V=#U(BQ@%#[?`C02%``,``(F"<`$``$B+$P^W3C*#X1^X`0```$C3X(F"=`$``,9&
+M)"&Z`````$B)W^@`````08/%`4F#Q`@/MT-H1#GH#X]X____2(M%0$C'0&``
+M````]D5,!'492(G?Z`````!(BW5`N@$```!(B=_H`````$B+54`/MH+,````
+MC02`#[92`@'02)@/MH@`````#[93.@^VY(B=_H`````$TY?F`/A9#^__])QT9``````$B+`XN(6`$`
+M`(D-`````(7)=`E(BP.)B%@!``!(@\0(6UU!7$%=05Y!7\-F9F:09F9FD$B#
+M[`A,BP=!#[9P0T"$]G0U28V`N!(``+D`````2#GX=1KK(@^VP4B-%$!(C120
+M28V4T+ at 2``!(.?IT#X/!`4`X\77 at ZP6Y``````^VP4B-%$!(C1202(T$U0``
+M``!)B[0`R!(``$B%]G1]]D8*`G1W28V$`+ at 2``!(.48@=6D/MD98A,!T"(/`
+M`8A&6.M92(M62$B#ZCA(C4Y(2(U".$@YR'1$2(-Z$`!U+.L*9F:02(-Z$`!U
+M(,9&6`$/MHJ[````28NXL!```$G'P`````#H`````.L12(M2.$B#ZCA(C4(X
+M2#G(=`%2(M$"%`/MD`(ZTYF@?F!`'<<#[;`2(N7B`D``$AI
+MP,@/``!(BT00"`^V0`CK*P^VP$B+EV`)``!(C03`2,'@!4B+A!"(````#[9`
+M".L+9F:09F:0N/\```!(F$0/MJ0#Y@@``$B+=7A(A?9T"$B)W^@`````2(GN
+M2(G?Z`````!!#[;$2(T\@$B-/+A(C;S[P`$``$R)[D'_E:````!(BUPD"$B+
+M;"003(MD)!A,BVPD($B#Q"C#9F9FD&9FD&9FD&9FD$%455-(B?5(B=-F at 7XX
+MX0%U$0^V1CJ#Z!%!O``````\`78T2(LW2(N^.`D```^W12"Z8)X!`&8]A0!W
+M%P^WP`^VA`9@"```2(T40$B-%)!(P>(%3(TD%\9#!`6`8P7^@"/?N`````!F
+M at 7TXX0%U$0^V13J#Z`$\`0^6P`^VP&:0P>`'#[83@^)_"<*($P^VA98```"#
 MX`'!X`:#XK\)PH at 3]H66`````70.3(GGZ`````!FB4,(ZP1FB4L(#[=#"(A%
 M)6:!?3CA`74E#[95.HU"_SP!=PH/ME4[@^(/ZRJ0C4+ON@\````\`78=9F9F
 MD+H`````28-\)&``=`Q!#[:4)($```"#X@\/M at .#X/`)T(@#6UU!7,-F9F:0
 M9F9FD$B#[#A(B5PD"$B);"003(ED)!A,B6PD($R)="0H3(E\)#!)B?Q(B?-)
 MB=$````/
-MMU, at 9H'ZA0`/A]($```/M\)!#[:,!&`(``")R(#Y_W1F9H/Z?W<=#[;!28N4
-M)#@)``!(:<"8`0``2(M$$%`/MD`(ZT-F@?J!`'<=#[;!28N4)(@)``!(:<#(
-M#P``2(M$$`@/MD`(ZQ\/ML%)BY0D8`D``$B-!,!(P>`%2(N$$(@````/MD`(
-M#[;`00^VA`3F"```2(T4@$B-%)!)C;34P`$``$F+E"2("0``#[;!2&G`R`\`
-M`$&]`````/9$`ET0#X5*`@``QD,D!$''!P````"X`0```.DU!```9F:09I`/
-MMU, at N?\```"X_____V:!^H4`#X=]````#[?"00^VC`1@"```BT/A/4```"%
-MR69FD`^$Z@```/;"!`^$X0```$B)WDR)[^@`````A,!U%<9#)`1!QP<`````
-MN`$```#IO0(``$&`O8,````?=A%!QP_H`````&:#^!\/AF(!
-M``!!QPA(B<*#X@$/MD,Z@^@&/`D/A\8`
-M```/ML#_),4`````0;@!````N0$```!(B=I,B>Y,B>?H`````(3`#X6P````
-M0<<'`@```+@!````Z4X!``!!N`$```"Y`````$B)VDR)[DR)Y^@`````A,`/
-MA7X```!!QP<"````N`$```#I'`$```^VRD&X`0```$B)VDR)[DR)Y^@`````
-MA,!U4D''!P(```"X`0```.GP````#[;*0;@`````2(G:3(GN3(GGZ`````"$
-MP'4F0<<'`@```+@!````Z<0```#&0R0$0<<'`````+@!````Z:\```!)C;PD
-MH`\``.@`````A,!T$4''!P$```"X`0```.F-````@'LXX75.@'LY`69FD'5%
-M@'LZ#W4_@'L]`69F9I!U-0^V?H`````$@[0VAU
-M!4B%P'42QD,D!$''!P````"X`0```.LYN`````#K,F:000^VA"3E"0``2(T4
-M@$B-%)!)C;34P`$``$F+E"2("0``N#BX#P#IJOO__V9FD&:02(M<)`A(BVPD
-M$$R+9"083(ML)"!,BW0D*$R+?"0P2(/$.,-F9F:09F:09F:09F:02(/L"$B+
-M/^@`````2(/$",-F9F:09F9FD&9F9I!F9I!!5T%6055!5%532(/L6$F)_4B)
-M]4B+GS at 1``!FQT8R_P](C50D+.@`````A,!T"8M$)"SI#0L``(M%."7___\`
-M/>$!$``/A=L```"_B!,``.@`````#[=5(&:!^H4`#X>X"@``#[?"00^VC`5@
-M"```B8(``!(C12`2(T4D$V-M-7``0``#[?!2&G`F`$`
-M`$D#A3@)``!(B40D"&:!_N$!=4;K,@^WP4B-!,!(P>`%20.%8`D``$B)1"08
-M3(NPB````$C'1"0(`````$C'1"00`````.M$#[95.HU"[SP!=B>-0O\\`78@
-M9H'Y_P!T"TB+1"0(]D!+!'4.QD4D!K@`````Z0/
-MA(H(``!,B:6`````00^WUTB)%"1(:<*P!```2(T<&$B-0R!)*X4X$0``20.%
-M0!$``$B+5"1(B4(@2,'H($B+5"1(B4(D28M$)!A(BU0D2(E"*$C!Z"!(BU0D
-M2(E"+$B+1"1(9D2)>`BX`````,8$&`!(@\`!2#VP!```=?!F at 7TXX0%U50^V
-M13J#Z!$\`7=*2(U,)#!(BT0D2`^V4`A(B>Y(BWPD".@`````2(V#(`0``$DK
-MA3 at 1``!)`X5`$0``2(M4)$B)0A!(P>@@2(M4)$B)0A3I/@$``)!!#[96"O;"
-M`74LBT4X)?___P`]X0$0``^$S0```$B+3"0(#[9!2*@!#X2\````J`0/A+0`
-M``#VA98````@=`](C70D,$B)[^@`````ZQM(C4PD,$B+1"1(#[90"$B)[DB+
-M?"0(Z`````!(C8,@!```22N%.!$``$D#A4`1``!(BU0D2(E"$$C!Z"!(BU0D
-M2(E"%&:!?3CA`74/#[9%.H/H$3P!#X:4````2(M$)`@/ME!(2(G0@^`&2(/X
-M!G5_]L(!='I(B=A)*X4X$0``20.%0!$``$B+5"1(B4(82,'H($B+5"1(B4(<
-MZU/VP@)T3DB)V$DKA3 at 1``!)`X5`$0``2(M4)$B)0AA(P>@@2(M4)$B)0AQ(
-MC8,@!```22N%.!$``$D#A4`1``!(BU0D2(E"$$C!Z"!(BU0D2(E"%$B+1"1(
-M@$@!`@^V55E(BT0D2&:)4`*`?5D`=#._`````(GX2(T$0$C!X`))BW0D$$B+
-M36!(BQ0(2(D4!HM4"`B)5`8(@\Y,B??H`````$B-3"0P2(G:2(GN
-M3(GWZ`````!!@&8,_NF-!```9F:09I!!#[9&"J@"#X0B!```2(M$)$C&0`;^
-M2(M$)$B`8`?^2(-\)`@`#X2X````2(M,)`@/ME%(2(G0@^`&2(/X!@^%GP``
+M`7<1 at XN4````"+@`````Z4D%``!$BT,X08'@____`$&!^.$!$``/A>8````/
+MMTL at 9H'YA0`/A_($```/M\%!#[:\!&`(``")^$"`__]T;F:#^7]W(T`/MM=)
+MBXPD.`D``$B-!%)(C02"2,'@!4B+1`A0#[9`".M%9H'Y at 0!W'D`/ML=)BY0D
+MB`D``$AIP,@/``!(BT00"`^V0`CK($`/ML=)BY0D8`D``$B-!,!(P>`%2(N$
+M$(@````/MD`(#[;`00^VA`3F"```2(T4@$B-%)!)C;34P`$``$F+E"2("0``
+M0`^VQTAIP,@/``!!O0````#V1`)=$`^%8`(``,9#)`1!QP<`````N`$```#I
+M2P0```^W4R"Y_P```+C_____9H'ZA0`/AXL````/M\)!#[:T!&`(``")\$"`
+M_O]T0`^VQDF+E"2("0``2&G`R`\``$B+1!`(#[9`".L at 0`^V
+MQDF+E"1@"0``2(T$P$C!X`5(BX00B`````^V0`A`#[;.1`^V\$ECQD$/MJP$
+MY@@``$B-1*T`2(U$A0!)C;3$P`$```^WP4B-%$!(C1202,'B!4F)U4T#K"0X
+M"0``9H'_X0%U"P^V0SJ#Z`$\`78I9H'Y_P!T!T'V14L$=1O&0R0&0<<'````
+M`+@!````Z38#``!F9I!F9I!!#[952(G1@^$!="3VP at 1T'T$/MD0D1$$Z1"1.
+MT/A/<```"%R0^$[P```/;"!`^$Y@``
+M`$B)WDR)[^@`````A,!U%<9#)`1!QP<`````N`$```#IP@(``$&`O8,````?
+M=A%!QP_H`````&:#^!\/AF
+M0<<'`0```+@!````Z<@!``!!@?CA`1``#X0,`0``00^W16J`>SCA#X7]````
+M@'LY`0^%\P```$C1Z$B)PH/B`0^V0SJ#Z`8\"0^'Q@````^VP/\DQ0````!!
+MN`$```"Y`0```$B)VDR)[DR)Y^@`````A,`/A;````!!QP<"````N`$```#I
+M3@$``$&X`0```+D`````2(G:3(GN3(GGZ`````"$P`^%?@```$''!P(```"X
+M`0```.D<`0``#[;*0;@!````2(G:3(GN3(GGZ`````"$P'520<<'`@```+@!
+M````Z?`````/MLI!N`````!(B=I,B>Y,B>?H`````(3`=29!QP<"````N`$`
+M``#IQ````,9#)`1!QP<`````N`$```#IKP```$F-O"2@#P``Z`````"$P'01
+M0<<'`0```+@!````Z8T```"`>SCA=4Z`>SD!9F:0=46`>SH/=3^`>ST!9F9F
+MD'4U#[9S/,'F"`^V0SL!Q@^W]DR)Y^@`````2#M#:'4%2(7`=1+&0R0$0<<'
+M`````+@!````ZSFX`````.LR9I!!#[:$).4)``!(C12`2(T4D$F-M-3``0``
+M28N4)(@)``"X.+@/`.F4^___9F:09I!(BUPD"$B+;"003(MD)!A,BVPD($R+
+M="0H3(M\)#!(@\0XPV9F9I!F9I!F9I!F9I!(@^P(2(L_Z`````!(@\0(PV9F
+M9I!F9F:09F9FD&9FD$%7059!54%455-(@^Q828G]2(GU2(N?.!$``&;'1C+_
+M#TB-5"0LZ`````"$P'0)BT0D+.D."P``BT4X)?___P`]X0$0``^%Y0```+^(
+M$P``Z``````/MTT at 9H'YA0`/A[D*```/M\%!#[:T!6`(``")\$"`_O]T:V:#
+M^7]W(D`/MM9)BXTX"0``2(T$4DB-!()(P>`%2(M$"%`/MD`(ZT-F@?F!`'<=
+M0`^VQDF+E8@)``!(:<#(#P``2(M$$`@/MD`(ZQ]`#[;&28N58`D``$B-!,!(
+MP>`%2(N$$(@````/MD`(#[;`00^VA`7F"```2(T4@$B-%)!-C;35P`$``$F+
+ME8@)``!`#[;&2&G`R`\``$@!PDB)5"002,=$)`@`````2,=$)!@`````Z7(!
+M```/MU4 at OO\```!F@?J%`'<,#[?"00^VM`5@"```#[=].&:!_^$!=0\/MD4Z
+M@^@1/`$/AL8```!F@?J%`'=Z#[?"00^VA`5@"```//]T:F:#^G]W(0^VT$F+
+MC3@)``!(C0122(T$@DC!X`5(BT0(4`^V0`CK2&:!^H$`=QP/ML!)BY6("0``
+M2&G`R`\``$B+1!`(#[9`".LE#[;`28N58`D``$B-!,!(P>`%2(N$$(@````/
+MMD`(ZP6X_____P^VP$$/MH0%Y@@``$B-%(!(C12038VTU<`!```/M\9(C11`
+M2(T4D$C!X at 5)`Y4X"0``2(E4)`AF@?_A`75&ZS(/M\9(C03`2,'@!4D#A6`)
+M``!(B40D&$R+L(@```!(QT0D"`````!(QT0D$`````#K1`^V53J-0N\\`78G
+MC4+_/`%V(&:!_O\`=`M(BT0D"/9`2P1U#L9%)`:X`````.FV"```2,=$)!``
+M````2,=$)!@`````2(UT)$A,B>_H`````$&)QV:)13),B>_H`````$F)Q+@"
+M````387D#X1W"```3(FE@````$$/M]=(B10D2&G"L`0``$B-'!A(C4, at 22N%
+M.!$``$D#A4`1``!(BU0D2(E"($C!Z"!(BU0D2(E")$F+1"082(M4)$B)0BA(
+MP>@@2(M4)$B)0BQ(BT0D2&9$B7@(N`````#&!!@`2(/``4@]L`0``'7P9H%]
+M..$!=50/MD4Z@^@1/`%W24B-3"0P2(M$)$@/ME`(2(GN2(M\)`CH`````$B-
+M at R`$``!)*X4X$0``20.%0!$``$B+5"1(B4(02,'H($B+5"1(B4(4Z14!``!!
+M#[96"O;"`74LBT4X)?___P`]X0$0``^$G````$B+3"0(#[9!2*@!#X2+````
+MJ`0/A(,```#VA98````@=`](C70D,$B)[^@`````ZQM(C4PD,$B+1"1(#[90
+M"$B)[DB+?"0(Z`````!(C8,@!```22N%.!$``$D#A4`1``!(BU0D2(E"$$C!
+MZ"!(BU0D2(E"%$B)V$DKA3 at 1``!)`X5`$0``2(M4)$B)0AA(P>@@2(M4)$B)
+M0ASK7/;"`G172(G822N%.!$``$D#A4`1``!(BU0D2(E"&$C!Z"!(BU0D2(E"
+M'$B- at R`$``!)*X4X$0``20.%0!$``$B+5"1(B4(02,'H($B+5"1(B4(42(M$
+M)$B`2`$"#[9564B+1"1(9HE0`H!]60!T,[\`````B?A(C01`2,'@`DF+="00
+M2(M-8$B+%`A(B10&BU0("(E4!@B#QP$/MD59.?AWTHM5-$B+1"1(B5`,9H%]
+M..$!=3\/MD4Z@^@1/`%W-$$/M\](BU0D2$B)[DR)]^@`````2(U,)#!(B=I(
+MB>Y,B??H`````$&`9 at S^Z8L$``!F9I!!#[9&"J@"#X0B!```2(M$)$C&0`;^
+M2(M$)$B`8`?^2(-\)`@`#X2X````2(M$)`@/ME!(2(G0@^`&2(/X!@^%GP``
 M`/;"`0^$E@```$$/M\](BU0D2$B)[DR)]^@`````]H66`````7002(M$)$@/
 MMT`(P>`#B$0D,4B-3"0P2(G:2(GN3(GWZ`````#VA98````!=`=!@$X,`>L%
 M08!F#/[&`Z%(BU0D"`^V at NH```"#X`\/ME,!@^+P"<*(4P%(BTPD"`^W03B#
@@ -215,7 +215,7 @@ M2(!@!?Z`3"1#"$B+="1(#[9%)4$/MHWN````T^!
 M@\@@B$$!2(M%/DB)@S@$``!FP<((9HF31`0```^V13V(@T($``#&`Y%(BU0D
 M"`^W0CB#P`%FP<`(9HE#`DB+3"0(#[:1Z@```(/B#P^V0P&#X/`)T(A#`4F)
 MS$F!Q-0```#I:`(``$B+5"1(#[9%)4$/MHWN````T^!F"4((Q at .!9L=#`O__
-M2(M$)!`/MI"[````@^(/#[9#`8/@\`G0B$,!2(-]2`!U#L9%)"&X`````.G-
+M2(M$)!`/MI"[````@^(/#[9#`8/@\`G0B$,!2(-]2`!U#L9%)"&X`````.GN
 M`P``]D4[`70I3(ME4$V%Y'0 at 28N]L!```$R)YN@`````@^`/#[93`8/B\`G"
 MB%,!ZP5,BV0D$$B+54@/MD(!OA`````\@`^$A@```#R`=Q\\%7<2/!!F9I!F
 MD'-G@^@"/`%W1.M7/!=F9I!W.^M>/(5T+CR%9F:09F:0=Q`\@71#/()U(V9F
@@ -230,107 +230,109 @@ M````2(M%.$B)@T0$``!(BT5`2(F#3`0``$B+5"0
 M`Y%(BTPD"`^VD>H```"#X@\/MD,!@^#P"="(0P$/MT$X@\`!9L'`"&:)0P)-
 MA>1T8TF+!"1(B4,$ZUFH`71500^WSTB+5"1(2(GN3(GWZ`````#VA98````!
 M=!!(BT0D2`^W0`C!X`.(1"0Q2(U,)#!(B=I(B>Y,B??H`````/:%E@````%T
-M!T&`3 at P!ZP5!@&8,_DF+A;`)``!(BQ0D2(DLT$2)^F;!Z at 5!#[??@>+_!P``
-MB=F#X1^X`0```$C3X$$)A)6X"0``BT4X)?___P`]X0$0`'4H2(U,)$"Z````
-M`(G>3(GWZ``````/MD0D0X/@'X/(0(A$)$/II````&:!?3CA`74T#[9%.H/H
-M$3P!=RE(BW0D&$R)[^@`````2(U,)$!(BT0D&`^V4%")WDR)]^@`````ZVIF
-MD$B+="0(3(GOZ`````!(C4PD0$B+1"0(#[903(GWZ`````!(BTPD"`^V
-M44A(B="#X`9(@_@&=2[VP@%T*0^V1"1#@^`?@\A at B$0D0P^V47*#XG_!X at 0/
-MMT0D0F8E#_@)T&:)1"1"2(UT)$!,B>_H`````+@#````ZRE!#[:%Y0D``$B-
-M%(!(C12038VTU<`!``!)BY6("0``N#BX#P#IPO7__TB#Q%A;74%<05U!7D%?
-MPV9F9I!F9F:09F9FD$%505154TB#[`A(B?U!O0````!,C:?X````Z;$!``"0
-M3(GGZ`````!(B<-(@WAP`'4V2(GOZ`````!(B4-P2(7`=25(C97X````2(N%
-M^````$B)6`A(B0-(B5,(2(F=^````.F0`0``BT,X)?___P`]X0$0``^$U@``
-M``^W0R!F/8``#X3(````#[;09HE3(&:#^G]V&F:!>SCA`74I#[9#.H/H$3P!
-M=QYF9F:09F:09H'ZA0!W$`^WP@^VC`5@"```@/G_=1G&0R0&2(G>2(GOZ```
-M``#I]0```&9FD&:0#[=S.&:!_N$!=14/MGLZC4?O/`$/A^4```#K&F9F9I`/
-MML%(:<"8`0``28G%3`.M.`D``.L*C4?_/`%V-&9FD&:!^H``="IF@?[A`74+
-M#[9#.H/H$3P!=AA!]D5+!'41QD,D!DB)WDB)[^@`````ZW](B=Y(B>_H````
-M`(/X`I!W#H/X`7, at ZPYF9F:09F:0 at _@#=5OK2TB)WDB)[V9FD.@`````ZTE(
-M@[N``````'0/2(VS@````$B)[^@`````2(V5^````$B+A?@```!(B5@(2(D#
-M2(E3"$B)G?@```#K-DB)WDB)[^@`````9F:03#FE^`````^%0_[__^L9#[;!
-M2&G`F`$``$F)Q4P#K3@)``#I'O___TB#Q`A;74%<05W#9F9FD&9FD&9FD&9F
-MD$B#[$A(B5PD&$B);"0 at 3(ED)"A,B6PD,$R)="0X3(E\)$!(B?5)B?U,BV=0
-M38LT)$$/MD0D#*@0=`S&A^@````&Z7P"```/MI?H````@/H!#X2"````@/H!
-M\02(N5"!$`
-M`$B!PD`(``!!#[9$)'+!X`A(F$@!PHM"!(D%`````(A$)!")PL'J"(A4)!'!
-MZ!"(1"022(N5"!$``$B!PD`(``!!#[9$)'+!X`A(F$@!PHM""(D%`````(A$
-M)!.)PL'J"(A4)!3!Z!"(1"05QD0D%@#&1"07`(M,)!!!B?9!P>X800^VWT2+
-M1"041(GRB=Y(Q\<`````N`````#H`````(G8 at _`!B<*#X@%T%$6$_W0/0<9%
-M)`"X`````.F@`@``08!])(%U(4B-3"001(GRB=Y,B>_H`````$'&120"N```
-M``#I>`(``$&+13 at E____`#WA`0X`=0]!QD4D(;@`````Z5D"``!!]H66````
-M`74HA-)U)$&`?"1*_W0<2(U,)!!$B?*)WDR)[^@`````N`````#I)P(``$R)
-MYDB)[^@`````3(GF2(GOZ`````!(BU4`00^W13)FP>@%#[?`C02%``,``(F"
-M<`$``$B+10!!#[=-,H/A'[H!````2(G32-/CB9AT`0``00^W13)(P>`#2`.%
-ML`D``$C'``````!!#[=-,HG(9L'H!27_!P``@^$?2(G62-/F2(GQ]]$AC(6X
-M"0``00^W33*)R&;!Z`4E_P<``(/A'TC3XO?2(52%;$F+50!)BT4(2(E""$B)
-M$$$/MW4R2(V]H`\``.@`````08"L)(,````!0<9%)(%)@[V``````'0/28VU
-M@````$B)[^@`````28U$)"!).40D(`^$!`$``$F)QDB-A:`/``!(B40D"$R-
-MO?@```!FD$R)]^@`````2(G#2(M5``^W0#)FP>@%#[?`C02%``,``(F"<`$`
-M`$B+10`/MTLR@^$?N@$```!(B=9(T^:)L'0!```/MT,R2,'@`T@#A;`)``!(
-MQP``````#[=+,HG(9L'H!27_!P``@^$?2(G62-/F2(GQ]]$AC(6X"0``#[=+
-M,HG(9L'H!27_!P``@^$?2-/B]](A5(5L#[=S,DB+?"0(Z`````!!@*PD at P``
-M``%(@[N``````'0/2(VS@````$B)[^@`````2(N%^````$B)6`A(B0-,B7L(
-M2(F=^````$TY="0@#X44____08&EE````/___O]!QH0DZ`````1,B>Y,B>?H
-M`````+@!````2(/$*%M=05Q!74%>05_#D$B#[%A(B5PD*$B);"0P3(ED)#A,
-MB6PD0$R)="1(3(E\)%!(B50D$$B++TR+A3 at 1``!(A=(/A,8"```/M]9(:<*P
-M!```2HT,`/9!(0)T&$B-!-4`````2`.%L`D``$B+`,9`)`+K%DB-!-4`````
-M2`.%L`D``$B+`,9`)"%,C135`````$B+A;`)``!,`=!(BQ"+0C at E____`#WA
-M`1``#X2L`0``#[="(&8]A0!W$@^WP`^VA`5@"```//]U&69FD$R)T$@#A;`)
-M``!(BP#&0"0&Z;H(```/ML!(:<"8`0``3(N=.`D``$D!PX!\)!,`>6Y!#[93
-M2$B)T(/@!DB#^`9U(_;"`70>2(M%`(N06`$``(D5`````(72=`I(BT4`B9!8
-M`0``2(M%`(N`4`$``(D%`````(/(`DB+50")@E`!``!(BT4`BX`$`0``B04`
-M````@,S_2(M5`(F"!`$``&;W02`""`^$ZP```(!]0P`/A.$```"[`````$&Y
-M`````$6)R$$/MLD/MD<-2-/XJ`%T84&`^0-V*$B+10!(!=`!``"-%(T`````
-M2&/22`'0BP")!0````#!Z!2#X`'K)I!(BT4`2`70`0``C12-`````$ACTD@!
-MT(L`B04`````P>@4@^`!A,!T"K@!````2-/@"<-!@\$!08U``3A%0W>`A-MT
-M4CA?#75-B?!FP>@%)?\'``"+1(5LB?](T_BH`74R08"[Z`````)W"$'&
-M@^@````#3(G02`.%L`D``$B+,$R)W^@`````Z4`'``!!NP````#V1"03`0^$
-M+P<``$R)T$@#A;`)``!(BS#&1B0ABT8X)?___P`]X0$.``^$"P<``$B+E0 at 1
-M``!(@<)`"```00^V0W+!X`A(F$@!PHL"B04`````2(N5"!$``$B!PD0(``!!
-M#[9#`(2)A(
-M`<*+`HD%`````$B)[^@`````Z94&``!F9I!FD`^W]DB-'/4`````2(N%L`D`
-M`$@!V$B+$&:!>CCA`0^%#`$```^V>CI`@/\0#X=>!@``N`$```")^4C3X*G`
-M,```#X7,````J0```0!U5/;$@`^$.08``$AIQK`$``!*C0P`#[9!,XA")$B)
-MV$@#A;`)``!(BP#V0",$#X00!@``@'@D``^$!@8``$B+4%!(A=(/A/D%```/
-MMD$SB`+I[@4``$AIQK`$``!*C0P`3(UA*$B)V$@#A;`)``!(BQ!!#[9$)`*(
-M0B1(B=A(`X6P"0``2(L`2(-X2``/A+$%```/MKDA!```Z`````!(B=I(`Y6P
-M"0``2(L*BU$T.=`/1\*)PDB+>4A,B>;H`````.E]!0``2(G82`.%L`D``$B+
-M`,9`)`#I9P4``&9F9I!F9I!(B=A(`X6P"0``3(LH38M]:+C_____9D&!?2"%
-M`'<92(G82`.%L`D``$B+``^W0"`/MH0%8`@```^VP$AIP)@!``!,BZ4X"0``
-M20'$0<:$).@`````00^V5"1(2(G0@^`&2(/X!@^%EP$``/;"`0^$C@$``$'&
-M120`0?:%E@```"`/A-D$``!-A?\/A-`$``!!]H>Q`````@^$H0```$&+132%
-MP`^$E0```$F+OZ````!(A?]T#8G"28MU2.@`````ZWQ)@WU(`'1U28._N```
-M``!U"DF#O\``````=&%-BVU(28N'N````$B%P'0-2(G#0?:'L0````%T)DB+
-MM4`*``"Z`0```$R)_T'_E\````"[`````(7`=`=(BYU`"@``2(M["(L33(GN
-MZ`````"+`TD!Q8M#!$B#PQ"%P'3B2(N5"!$``$B!PD`(``!!#[9$)'+!X`A(
-MF$@!PHL"B04`````B<+!ZA!!B)>;````P>@89D&)AY````!(BY4($0``2('"
-M1`@``$$/MD0D6
-M````B=#!Z!`/ML!F08F'F````,'J&$&(EYH```!(BY4($0``2('"3`@``$$/
-MMD0D`P``2&G&L`0``$Z-
-M-`!!#[9&,X3`#X7,````2(G82`.%L`D``$B+`,9`)`!!]H66````$`^$)P,`
-M`$V%_P^$'@,``$$/MD8S08B'D@```$'VA[$````"#X0$`P``08-]-``/A/D"
-M``!)@[^X`````'4.28._P``````/A.$"``!-BV5(28N'N````$B%P'0-2(G#
-M0?:'L0````%T)DB+M4`*``"Z`0```$R)_T'_E\````"[`````(7`=`=(BYU`
-M"@``2(M["(L33(GFZ`````"+`TD!Q(M#!$B#PQ"%P`^%?`(``.O+_!P``
+M1(GA@^$?N`$```!(T^!!"825N`D``(M%."7___\`/>$!$`!U*4B-3"1`N@``
+M``!$B>9,B??H``````^V1"1#@^`?@\A`B$0D0^FD````9H%]..$!=3,/MD4Z
+M@^@1/`%W*$B+="083(GOZ`````!(C4PD0$B+1"08#[904$2)YDR)]^@`````
+MZVE(BW0D"$R)[^@`````2(U,)$!(BT0D"`^V4')$B>9,B??H`````$B+3"0(
+M#[912$B)T(/@!DB#^`9U+O;"`70I#[9$)$.#X!^#R&"(1"1##[91?H`````$B)PTB#
+M>'``=39(B>_H`````$B)0W!(A_H`````.G]````9F:09I`/
+MMW,X9H'^X0%U%0^V>SJ-1^\\`0^'[0```.L?9F9FD`^VPDB-%$!(C1202,'B
+M!4F)U4P#K3@)``#K!XU'_SP!=C9F@?F``'0O9H'^X0%FD'4+#[9#.H/H$3P!
+M=AM!]D5+!'44QD,D!DB)WDB)[^@`````Z8````!(B=Y(B>_H`````(/X`G<*
+M at _@!_H`````&9FD.M&2(.[
+M@`````!T#TB-LX````!(B>_H`````$B-E?@```!(BX7X````2(E8"$B)`TB)
+M4PA(B9WX````ZSA(B=Y(B>_H`````$PYI?@````/A3O^___K'@^VPDB-%$!(
+MC1202,'B!4F)U4P#K3@)``#I%O___TB#Q`A;74%<05W#2(/L2$B)7"082(EL
+M)"!,B60D*$R);"0P3(ET)#A,B7PD0$B)]4F)_4R+9U!-BS0D00^V1"0,J!!T
+M#,:'Z`````;IC`(```^VE^@```"`^@$/A((```"`^@%R&H#Z!`^$HP```(#Z
+M!@^%S0(``&9FD.E=`@``QH?H`````4B)_DR)]^@`````QD4D at 4&`3"0,"$B#
+MO8``````=`](C;6`````3(GWZ`````!)BX;X````2(EH"$B)10!)C8;X````
+M2(E%"$F)KO@```!,B??H`````.EB`@``@^#W08A$)`R`A^L````!QH?H````
+M`,9&)`),B??H`````$R)]^@`````Z3,"``#&A^L`````2(.^@`````!T#TB-
+MMH````!,B??H`````$F+34!(A?H`````.FH`0``00^V1"0,@^#W@\@008A$
+M)`Q)BW582(7V=11!@'PD#@!U+.GE````9F9FD&9FD$$/MI6!````0;@`````
+MN0(```!,B>?H`````.E:`0``0;\`````QD0D%P!)C40D8$B)1"0(2(M\)`CH
+M`````$B)Q4F+1"1H28EL)&A(BU0D"$B)50!(B44(2(DH2(M50$B%TG0528NV
+M\`@``+\%````Z`````"`34P"2(GJO at 8```!,B>?H`````("]@P````!T-D&-
+M7P%!@?]_EI@`=R9,B??H`````+\!````Z`````"`O8,`````=`N#PP&!^X&6
+MF`!UVD&)WX!$)!?H`````(#[_W4.3(GJ3(GF3(GWZ`````!,B??H
+M`````$B+7"082(ML)"!,BV0D*$R+;"0P3(MT)#A,BWPD0$B#Q$C#9F:005=!
+M5D%505154TB#["A(B?U)B?5(BX\X"0``N&">`0!F at 7X@A0!W&P^W1B`/MH0'
+M8`@``$B-%$!(C1202(G02,'@!4R-)`%(BY4($0``2('"0`@``$$/MD0D\02(N5"!$``$B!PD`(``!!#[9$)'+!X`A(
+MF$@!PHM"!(D%`````(A$)!")PL'J"(A4)!'!Z!"(1"022(N5"!$``$B!PD`(
+M``!!#[9$)'+!X`A(F$@!PHM""(D%`````(A$)!.)PL'J"(A4)!3!Z!"(1"05
+MQD0D%@#&1"07`(M,)!!!B?9!P>X800^VWT2+1"041(GRB=Y(Q\<`````N```
+M``#H`````(G8 at _`!B<*#X@%T%$6$_W0/0<9%)`"X`````.FH`@``08!])(%F
+M9I!U(4B-3"001(GRB=Y,B>_H`````$'&120"N`````#I?0(``$&+13 at E____
+M`#WA`0X`=0]!QD4D(;@`````Z5X"``!!]H66`````74HA-)U)$&`?"1*_W0<
+M2(U,)!!$B?*)WDR)[^@`````N`````#I+`(``$R)YDB)[^@`````3(GF2(GO
+MZ`````!(BU4`00^W13)FP>@%#[?`C02%``,``(F"<`$``$B+10!!#[=-,H/A
+M'[H!````2(G32-/CB9AT`0``00^W13)(P>`#2`.%L`D``$C'``````!!#[=-
+M,HG(9L'H!27_!P``@^$?2(G62-/F2(GQ]]$AC(6X"0``00^W33*)R&;!Z`4E
+M_P<``(/A'TC3XO?2(52%;$F+50!)BT4(2(E""$B)$$$/MW4R2(V]H`\``.@`
+M````08"L)(,````!0<9%)(%)@[V``````'0/28VU@````$B)[^@`````28U$
+M)"!).40D(`^$"0$``$F)QDB-A:`/``!(B40D"$R-O?@```!F9F:09F:03(GW
+MZ`````!(B<-(BU4`#[=`,F;!Z`4/M\"-!(4``P``B8)P`0``2(M%``^W2S*#
+MX1^Z`0```$B)UDC3YHFP=`$```^W0S)(P>`#2`.%L`D``$C'```````/MTLR
+MB@%)?\'``"#X1](B=9(T^9(B?'WT2&,A;@)```/MTLRB@%)?\'
+M``"#X1](T^+WTB%4A6P/MW,R2(M\)`CH`````$&`K"2#`````4B#NX``````
+M=`](C;.`````2(GOZ`````!(BX7X````2(E8"$B)`TR)>PA(B9WX````33ET
+M)"`/A13___]!@:64````___^_T'&A"3H````!$R)[DR)Y^@`````N`$```!(
+M@\0H6UU!7$%=05Y!7\.02(/L6$B)7"0H2(EL)#!,B60D.$R);"1`3(ET)$A,
+MB7PD4$B)5"002(LO3(N%.!$``$B%T@^$Q@(```^WUDAIPK`$``!*C0P`]D$A
+M`G082(T$U0````!(`X6P"0``2(L`QD`D`NL62(T$U0````!(`X6P"0``2(L`
+MQD`D(4R-%-4`````2(N%L`D``$P!T$B+$(M"."7___\`/>$!$``/A+`!```/
+MMT(@9CV%`'<2#[?`#[:$!6`(```\_W499F:03(G02`.%L`D``$B+`,9`)`;I
+MR@@```^VP$B-%$!(C1202,'B!4R+G3@)``!)`=.`?"03`'EN00^V4TA(B="#
+MX`9(@_@&=2/VP@%T'DB+10"+D%@!``")%0````"%TG0*2(M%`(F06`$``$B+
+M10"+@%`!``")!0````"#R`)(BU4`B8)0`0``2(M%`(N`!`$``(D%`````(#,
+M_TB+50")@@0!``!F]T$@`@@/A.H```"`?4,`#X3@````NP````!!N0````!%
+MB@4@^`!ZR5(BT4`2`70`0``C12-`````$ACTD@!T(L`B04`
+M````P>@4@^`!A,!T"K@!````2-/@"<-!@\$!08U``3A%0W>!A-MT4CA?#75-
+MB?!FP>@%)?\'``"+1(5LB?](T_BH`74R08"[Z`````)W"$'&@^@````#
+M3(G02`.%L`D``$B+,$R)W^@`````Z4P'``!!NP````#V1"03`0^$.P<``$R)
+MT$@#A;`)``!(BS#&1B0ABT8X)?___P`]X0$.``^$%P<``$B+E0 at 1``!(@<)`
+M"```00^V0W+!X`A(F$@!PHL"B04`````2(N5"!$``$B!PD0(``!!#[9#`(2)A(`<*+`HD%
+M`````$B)[^@`````Z:$&``"0#[?V2(T<]0````!(BX6P"0``2`'82(L09H%Z
+M..$!#X4,`0``#[9Z.D"`_Q`/AVX&``"X`0```(GY2-/@J<`P```/A"0`#X06!@``2(M04$B%T@^$"08```^V03.(`NG^!0``
+M2&G&L`0``$J-#`!,C6$H2(G82`.%L`D``$B+$$$/MD0D`HA")$B)V$@#A;`)
+M``!(BP!(@WA(``^$P04```^VN2$$``#H`````$B)VD@#E;`)``!(BPJ+430Y
+MT`]'PHG"2(MY2$R)YN@`````Z8T%``!(B=A(`X6P"0``2(L`QD`D`.EW!0``
+M9F9FD&9FD$B)V$@#A;`)``!,BRA-BWUHN/____]F08%]((4`=QE(B=A(`X6P
+M"0``2(L`#[=`(`^VA`5@"```#[;`2(T40$B-%)!(P>(%3(NE.`D``$D!U$'&
+MA"3H`````$$/ME0D2$B)T(/@!DB#^`8/A9PB+$TR)[N@`````
+MBP-)`<6+0P1(@\,0A`(2)A(`<*+
+M`HD%`````(G"P>H008B7FP```,'H&&9!B8>0````2(N5"!$``$B!PD0(``!!
+M#[9$)'+!X`A(F$@!PHL2B14`````#[;"9D&)AY0````/ML9F08F'E@```(G0
+MP>@0#[;`9D&)AY@```#!ZAA!B)>:````2(N5"!$``$B!PDP(``!!#[9$)'+!
+MX`A(F$@!PHL"B04`````#[;`9D&)AY(```#I:0,``$AIQK`$``!.C30`00^V
+M1C.$P`^%T0```$B)V$@#A;`)``!(BP#&0"0`0?:%E@```!`/A#(#``!-A?\/
+MA"D#``!!#[9&,T&(AY(```!!]H>Q`````@^$#P,``$&#?30`#X0$`P``28._
+MN`````!U#DF#O\``````#X3L`@``38ME2$F+A[@```!(APB+$TR)YN@`````BP-)`<2+0P1(@\,0A<`/A8<"``#KW&9FD&:0/`(/A2@"
 M``!!#[9.0$&+1CB)1"0D#[94)"`(08G400G$@^%_@/EQ=CS&1"0-`$&#_`%V#$$/MD9!@^`/B$0D#<9$)`X`
 M08/\`G8)00^V3D*(3"0.08/\`W9F00^V1D.(1"0/ZV#&1"0-`$&#_`)V#$$/
@@ -338,4490 +340,1720 @@ MMDY"@^$/B$PD#<9$)`X`QD0D#P!!@_P'=CE!#[9
 M`$&#_`QV"4$/MD9,B$0D#D&#_`UV"T$/MDY-B$PD#^L%QD0D#P!(B=A(`X6P
 M"0``2(L`@'@P`'1(187D=$/&0"0 at 2(G82`.%L`D``$B+``^V0#`/MM!$..!$
 M#T+B2(G82`.%L`D``$B+`$B+>%!(A?]T'T2)XDF-=D#H`````.L12(G82`.%
-ML`D``$B+`,9`)"*`?"0-!'412(G82`.%L`D``$B+`,9`)`)).6TH#X0,`0``
-M387_#X0#`0``0?:%E@```!!T0$$/MD8S08B'D@```$'VA[$````"="I!#[9%
+ML`D``$B+`,9`)"*`?"0-!'412(G82`.%L`D``$B+`,9`)`)).6TH#X02`0``
+M387_#X0)`0``0?:%E@```!!T0$$/MD8S08B'D@```$'VA[$````"="I!#[9%
 M,$2)XD$XQ`]'T(32=!A)B[^H````2(7_=`P/MM))C79`Z`````"`?"0-"W=<
-M#[9$)`W_),4`````0<:'L@````'IF0```(!\)`X$=12`?"0/`G4-0<:'L@``
-M`!'I?@```$'&A[(````"ZW1!QH>R````$.MJ0<:'L@````OK8$'&A[(````&
-MZU9!QH>R````#>M,/"AU)T$/MH0D at P```(/H`4&(A"2"````2(G82`.%L`D`
-M`$B+`,9`)('K(3P(=0J_$"<``.@`````2(G82`.%L`D``$B+`,9`)"%FD$B+
-M7"0H2(ML)#!,BV0D.$R+;"1`3(MT)$A,BWPD4$B#Q%C#9F9FD&9FD&9FD&9F
-MD$%7059!54%455-(@^PH2(G[2(E\)!A$#[>GLA(``$B+!XN`0`$``(D%````
-M`&8E_P]FB8>R$@``9D0YX'5.2(L'B[!0`0``B34`````2(L'B;!0`0``N```
-M``#WQ@#__P`/A-T&``!(Q\<`````N`````#H`````$B+?"08Z`````"X`0``
-M`.FX!@``9H&_LA(``/\/#X45!@``Z3X&``!(B[,X$0``08/$`69$.Z.V$@``
-MN`````!$#T/@2(N3F!$``$B#P at 1!#[?$BP2"08G`0<'H$$'VP`@/A+$```!(
-MBP.+D%`!``")%0````!(BP.)D%`!``#WP@#__P!T;8![0P!T9XG6]\8``0``
-M=3"_`````/?&```!`'1$ZR%FD`^WUXU*"$B)\$C3^*@!=12-2A!(B?!(T_BH
-M`74'ZR&_``````^WQTB-%(!(C1202(VLT\`!``!(A>UU'^L.9I"#QP$/MD-#
-M9CGX=[1(BWPD&.@`````Z54%``!(BWPD&.@`````B$4/Z4,%``!F9I")P6:!
-MX?\/#[?!2&G0L`0``$R+3!8 at 2(T\Q0````!(BX.P"0``2`'X2(LH2(7M#X0,
-M!0``0?;`(`^$?@$``(!])($/A5@!``#&120A#[=%,DC!X`-(`X.P"0``2,<`
-M``````^W33*)R&;!Z`4E_P<``(/A'[H!````2(G62-/F2(GQ]]$AC(.X"0``
-M#[=-,HG(9L'H!27_!P``@^$?2-/B]](A5(-L#[=U,DB+?"00Z`````!(@[V`
-M`````'0/2(VU@````$B)W^@`````#[=5(&:!^H4`#X?$````#[?"#[:$`V`(
-M```\_P^$L0```&:#^G]W'@^VP$AIP)@!``!(`X,X"0``2(M`4(!X"/\/E<#K
-M60^W12!F/8$`=R8/M\`/MH0#8`@``$AIP,@/``!(`X.("0``2(M`"(!X"/\/
-ME<#K*0^W12`/MH0#8`@``$B-!,!(P>`%2`.#8`D``$B+@(@```"`>`C_#Y7`
-MA,!T,$B)[DB)W^@`````2(N#^````$B):`A(B44`2(M$)`A(B44(2(FK^```
-M`.FA`P``D$F+5 at A(C44028E&"$R)=1!(B5`(2(D"Z80#``")R&;!Z`4/M\")
-M1"0 at 2)@/M_&)\H/B'XE4)"2+1(-LB=%(T_BH`0^%6`,``$B)^$@#@[`)``!(
-MBP`/MU`@9H'ZA0`/A[4````/M\(/MH0#8`@``#S_#X2B````9H/Z?W<;#[;`
-M2&G`F`$``$@#@S@)``!(BT!0#[9`".MM2(GX2`.#L`D``$B+``^W0"!F/8$`
-M=R,/M\`/MH0#8`@``$AIP,@/``!(`X.("0``2(M`"`^V0`CK,TB)^$@#@[`)
-M``!(BP`/MT`@#[:$`V`(``!(C03`2,'@!4@#@V`)``!(BX"(````#[9`"#S_
-M=!`/MM!(8\*`O`/F"```_W4_2&-$)""+1(-L#[9,)"1(T_BH`0^%;@(``,9%
-M)`:^`````$B)[^@`````N@````!(B>Y(B=_H`````.E(`@``2&/"#[:$`^8(
-M``!(C12`2(T4D$B-O-/``0``387)=`U!]L`"N`````!,#T3(]D<*`@^$4@$`
-M`$R)RN@`````2&-$)""+1(-L#[9,)"1(T_BH`0^%\`$``(!])($/A9`````/
-MMT4R2,'@`T@#@[`)``!(QP``````#[=-,HG*9L'J!8'B_P<``(/A'[@!````
-M2-/@]]`AA).X"0``#[=U,DB+?"00Z`````!(B>Y(B=_H`````$B#O8``````
-M=`](C;6`````2(G?Z`````!(BX/X````2(EH"$B)10!(BW0D"$B)=0A(B:OX
-M````Z58!``!(BX,(`0``3#GP=%9!O0````!!@\4!2(L`23G&=?1%A.UT/T&_
-M`````$R)]^@`````2(U(\$F+5 at A)B48(3(DP2(E0"$B)`D at YZ;@!````1`]$
-M^$&`[0%UT$6$_P^%]````$F+5 at A(C44028E&"$R)=1!(B5`(2(D"2&-4)""X
-M`0````^V3"0D2-/@"823K````.F_````3(G*Z`````!(BX,(`0``3#GP=%)!
-MO0````!!@\4!2(L`23G&=?1%A.UT.T&_`````$R)]^@`````2(U(\$F+5 at A)
-MB48(3(DP2(E0"$B)`D at YZ;@!````1`]$^$&`[0%UT$6$_W59@'TD at 71328M6
-M"$B-11!)B48(3(EU$$B)4`A(B0)(8U0D(+@!````#[9,)"1(T^`)A).L````
-MZR&03(VW"`$``$B-MZ`/``!(B70D$$B-A_@```!(B40D")!F1#FCLA(```^%
-MPOG__TB- at P@!``!(.8,(`0``=$E(B<5(B>_H`````$B-H%
-M@>+_!P``@^$?N`$```!(T^#WT"&$DZP```"Z`````$B)W^@`````2#FK"`$`
-M`'6Z2(G?Z`````"X`0```$B#Q"A;74%<05U!7D%?PV9F9I!F9I!F9I!F9I!(
-M@^PH2(E<)`A(B6PD$$R)9"083(EL)"!(BY_P"```2(M#"$2+*$2)+0````!!
-M]\4```"0='I(BT,(1(DHZW&02('#>!0``$B+`XN04`$``(D5`````$B+`XF0
-M4`$``(72=#SWP@```!!T'$B+`\>`4`$``````!!(BP.+@%`!``")!0````!(
-MBP/'@%`!```!````2(G?Z`````!!`<2#Q0&#_0)UF>L79F9FD&9FD$&\````
-M`+T`````ZXIF9I!%A.0/ET/E<()T`^VP$B+7"0(2(ML)!!,BV0D&$R+
-M;"0 at 2(/$*,-F9I!F9I!!5T%6055!5%532(/L*$F)_$B+!XN04`$``(D5````
-M`$B+!XF04`$``&9F9I!F9I#WP@#__P`/A"@)``!!@'PD0P`/A!P)``#&1"00
-M`(G22(E4)`A$#[9L)!!!C4T(2(M$)`A(T_BH`74408U-$$B+1"0(2-/XJ`$/
-MA-$(``"`?"00`W8K28L$)$@%@`$``$*-%.T`````2&/22`'0BP")!0````#!
-MZ!.#X`'K*69FD$F+!"1(!8`!``!"C13M`````$ACTD@!T(L`B04`````P>@3
-M@^`!A,!T)DR)Y^@`````26/52(T$4DB-!()!@8S$Z!(`````"`!F9F:09F:0
-M28L4)(!\)!`#=B5"C03M`````$B82(V$`H`!``"+`(D%`````"4```$`ZR-F
-M9F:00HT$[0````!(F$B-A`*``0``BP")!0`````E```!`(7`=$&`?"00`W8=
-M0HT$[0````!(F$B-A`*``0``QP````$`Z1D(``!"C03M`````$B82(V$`H`!
-M``#'`````0#I_`<``$&`?"11`0^%J`8``(!\)!`#=BE)BP0D2`6``0``0HT4
-M[0````!(8])(`="+`(D%`````(/@`>LG9F9FD$F+!"1(!8`!``!"C13M````
-M`$ACTD@!T(L`B04`````@^`!A,`/A%4!``!)8\5(C1Q`2(T$#2HTT(8F6\!(``$C'A@`3````
-M````#[9$)!!(C11`2(T4D$F-E-2X$@``2(F6"!,``$F-M`SP$@``28M\)"CH
-M`````&9FD(!\)!`#=CU"C13M`````$ACTDF+!"1(!8`!``!(`="+`(D%````
-M`$F+!"1(!8`!``!(`<*+`HD%`````,'H!X/@`>L[0HT4[0````!(8]))BP0D
-M2`6``0``2`'0BP")!0````!)BP0D2`6``0``2`'"BP*)!0````#!Z`>#X`&$
-MP'1U@'PD$`-V-T*-#.T`````2&/)28L$)$@%A`$``$@!R(L`B04`````28L4
-M)$B!PH0!``!(`=$-```!`(D!ZSY"C0SM`````$ACR4F+!"1(!80!``!(`LO@'PD$`-V*$F+!"1(!8`!
-M``!"C13M`````$ACTD@!T(L`B04`````P>@2@^`!ZR9)BP0D2`6``0``0HT4
-M[0````!(8])(`="+`(D%`````,'H$H/@`83`#X0B`@``@'PD$`-V-T*-#.T`
-M````2&/)28L$)$@%@`$``$@!R(L`B04`````#0``!`!)BQ0D2('"@`$``$@!
-MT8D!ZS5"C0SM`````$ACR4F+!"1(!8`!``!(`$``
-M#X6B````Z80!``"`?"00`W9*0HT4[0````!(8]))BP0D2`6``0``2`'0BPB)
-M#0````!)BP0D2`6``0``2(T$`HD(28L$)$@%@`$``$@!PHL"B04`````Z=`#
-M``!"C13M`````$ACTDF+!"1(!8`!``!(`="+"(D-`````$F+!"1(!8`!``!(
-MC00"B0A)BP0D2`6``0``2`'"BP*)!0````#IA@,``&:02(M(0`^W04X/M]#V
-MQ@$/A=,```!(B.QX7`````
-M0$M,`$C'A=``````````2(FMV````$B-M<````!)BWPD*.@`````@'PD$`-V
-M,DF+!"1(!8`!```/ME0D$$C!X at .!XO@'``!(`="+`(D%`````,'H"(/@`>LP
-M9F:09F:028L$)$@%@`$```^V5"002,'B`X'B^`<``$@!T(L`B04`````P>@(
-M@^`!A,`/A!8!``"`?"00`W8L28L$)$@%@`$```^V5"002,'B`X'B^`<``$@!
-MT(L`B04`````@_`!@^`!ZRI)BP0D2`6``0``#[94)!!(P>(#@>+X!P``2`'0
-MBP")!0````"#\`&#X`&$P`^$L0````^V1"002(T40$B-%)!)C934L!(``$R-
-M>@A)BT<(2(7`#X2+````28G&2(UR0$F+?"0HZ`````!!@'X.`'110;T`````
-M28UN8)!(B>_H`````$B)PTB+10A(B5T(2(DK2(E#"$B)&$B+4T!(A=)T%DF+
-MM"3P"```OP4```#H`````(!+3`)!@\4!13AN#G>Z0<='.("$'@!)QT=(````
-M`$V)?U!)C7,#@>/X!P``
-M28L$)$@%@`$``$@!V(L0B14`````28L$)$@%@`$``$B-!`.)$$F+!"1(!8`!
-M``!(C00#BP")!0````!)BP0D2`4P`@``2(T$`\<``````+\0)P``Z`````!)
-MBP0D2`4T`@``2`'#BP.)!0````#K?0^V7"002,'C`X'C^`<``$F+!"1(!8`!
-M``!(`=B+$(D5`````$F+!"1(!8`!``!(C00#B1!)BP0D2`6``0``2(T$`XL`
-MB04`````28L$)$@%4`(``$B-!`/'``````"_$"<``.@`````28L$)$@%5`(`
-M`$@!PXL#B04`````@$0D$`$/MD0D$$$X1"1##X?P]O__28L$)(N04`$``(D5
-M`````$F+!"2)D%`!``#WP@#__P!T)NFE]O__9F:09I!)8]5(C0122(T$@D&!
-MC,3H$@`````!`.GH]___N`````!(@\0H6UU!7$%=05Y!7\-!5T%6055!5%53
-M2(/L:$F)_4"(="1+0`^VQHE$)$Q(F$B-%$!(C1202(T4UTR+NL`2```/MJKA
-M$@``2(L'0(#^`W8,QX!P`0``Q`$``.L*QX!P`0``J`$``$B)1"1 at 2`5T`0``
-M2(E$)%!(BU0D8(N"=`$``(D%`````(M,)$R#X0.[!P```-/C08G<00G$1(FB
-M=`$``+_H`P``Z`````#WTT0AXTB+3"1 at B9ET`0``@'PD2P-V58M$)$S!X`)(
-MF$B-E`'0`0``BP*)!0````"#R`B)`HM<)$S!XP-(8]M(C809``(``,<`.```
-M`+\0)P``Z`````!(BU0D8$B-A!H$`@``QP``````ZUB+1"1,P>`"2)A(BTPD
-M8$B-E`'0`0``BP*)!0````"#R`B)`HM<)$S!XP-(8]M(C809``(``,<`.```
-M`+\0)P``Z`````!(BU0D8$B-A!H$`@``QP``````387_#X0V"```08!]0P!T
-M++L`````#[;+00^V1PU(T_BH`70/N@$```")SDR)[^@`````@\,!03A=0W?9
-M0?9'"@%T9TR)_DR)[^@`````BW0D3$R)[^@`````2&-$)$Q(C11`2(T4D$F-
-ME-70$@``BT(4J0``$`!T""7__^__B4(43(G^3(GOZ`````!(8T0D3$B-%$!(
-MC1202<>$U<`2````````Z94'``!!@']8`'0428N]L!```$R)_N@`````08!O
-M6`%(Q\#^____#[9,)$Q(T\!`(.B(1"1;#X2]`@``BW0D3$R)[^@`````2&-$
-M)$Q(C11`2(T4D$F-E-70$@``BT(4J0``$`!T""7__^__B4(4#[9$)%M!B$<-
-M08!]0P`/A.\!``#'1"1<``````^VT$B)5"0P2(M,)&!(@<$``@``2(E,)"A(
-MBT0D8$@%!`(``$B)1"0@#[94)%N)5"0<2(M,)&!(@<'0`0``2(E,)!!$#[9T
-M)%Q!#[;N2(M$)#")Z4C3^*@!#X1-`0``2&/%2(T40$B-%)`/MD0D6T&(A-7A
-M$@``08#^`P^&E0```(T<[0````!(8]M(BT0D*$@!V,<`.````+\0)P``Z```
-M``!(`UPD((M4)!R)$TB+3"1 at QX%P`0``Q`$``$B+5"10BP*)!0````")Z8/A
-M`[L'````T^-!B=Q!"<1$B2*_Z`,``.@`````]]-$(>-(BTPD4(D9C12M````
-M`$ACTD@#5"00BP*)!0````"#R`B)`NF6````C1SM`````$ACVTB+1"0H2`'8
-MQP`X````OQ`G``#H`````$@#7"0 at BT0D'(D#2(M4)&#'@G`!``"H`0``2(M,
-M)%"+`8D%`````(GI@^$#NP<```#3XT&)W$$)Q$B+1"101(D at O^@#``#H````
-M`/?302'<2(M4)%!$B2*-%*T`````2&/22`-4)!"+`HD%`````(/("(D"@T0D
-M7`%!C48!03A%0W8LZ8/^__](B=_H`````$B-<,A(BU,(2(E#"$B)&$B)4`A(
-MB0)(@WC8`'01ZPF^`````$F-7TA).5](=_H`````$B+#"1).4](#X4$_O__28U'8$DY1V`/A.\```"]`````$F)Q$R)
-MY^@`````2(G#@+B#`````'0ZC44!@?U_EI@`=@>)Q>LK9F:0B<5,B>_H````
-M`+\!````Z`````"`NX,`````=`N#Q0&!_8&6F`!UVDB+0T!(A_H`````$B+0T`/ME`"#[9P
-M`4C'QP````"X`````.@`````2(M30$F+M?`(``"_`0```.@`````2(M30$F+
-MM?`(``"_!@```.@`````2,=#0`````!!@&\.`4B)WDR)[^@`````33EG8`^%
-M&?___TR)_DR)[^@`````2&-$)$Q(C11`2(T4D$G'A-7`$@```````.EW_/__
-M0;\`````#[9$)%M(B40D0$B+5"1 at 2('"T`$``$B)5"0X18G^00^V[TB+1"1`
-MB>E(T_BH`74+1#A\)$L/A=4```!!@/X#=FA(BT0D8,>`<`$``,0!``!(BU0D
-M4(L"B04`````B>F#X0.-#$F[!P```-/C08G<00G$1(DBO^@#``#H`````/?3
-M1"'C2(M,)%")&8T4K0````!(8])(`U0D.(L"B04`````@\@(B0+K9TB+1"1@
-MQX!P`0``J`$``$B+5"10BP*)!0````")Z8/A`XT,2;L'````T^-!B=Q!"<1$
-MB2*_Z`,``.@`````]]-!(=Q(BTPD4$2)(8T4K0````!(8])(`U0D.(L"B04`
-M````@\@(B0)!@\_H`````(3`=%%,B>?H`````$B)QDB%P'1,2(M5:$B)16A(C45 at 2(D&2(E6
-M"$B),H!%#@%(B6Y0QD9(!<9&20#&AH$````/N0$```"Z`0```$B)[^@`````
-MZPL/MO-,B>?H`````%M=05S#9F:09I!!5D%505154TB)_4&)]40/MO9"C02U
-M`````$QCX+L`````OQ`G``#H`````$&`_0-V'DB+10!(!=`!``!,`>"+`(D%
-M`````,'H%(/@`>L=D$B+10!(!=`!``!)C00$BP")!0````#!Z!2#X`&$P'4*
-M@\,!9H'[+`%UJ$2)]DB)[^@`````2(GOZ`````!)8\9(C11`2(T4D$B-1-4`
-M]H#@$@```70/2(NPP!(``$B)[^@`````6UU!7$%=05[#9I!!5D%505154T&)
-M]4F)_$0/MO9)8\9(C11`2(T4D$B+K-?`$@``2(7M#X26`0``2,?`_O___T2)
-M\4C3P(1%#0^%@`$``$B-14A(.45(=15!O0````!(C5U@@'T.`'4CZ?,"``!`
-M#[;&2(T\0$B-/+A)C;S\N!(``.@`````Z=4"``!(B=_H`````$B)P4B+0PA(
-MB4L(2(D92(E!"$B)"(!Y20`/A0D!```/MT$X28.\Q&`$````=0M(@WE```^$
-MV0````^W03A)BX3$8`0``$B#N(``````#X2G````QH'H``````^V44A(B="#
-MX`9(@_@&=2WVP@%T*,9!2 at 7&04L$#[:1 at 0```$B+<5A(BWE0Z`````#IF```
-M`&9F9I!F9I`/ME%(2(G0@^`&2(/X!'4@]L(!=!O&04H#QD%+!$B)SDR)Y^@`
-M````ZV=F9I!F9I`/ME%(2(G0@^`&2(/X!G51]L(!=4S&04L&QD%*!6;'@<@`
-M`````$B)SDR)Y^@`````ZRY(BU%`28NT)/`(``"_!````.@`````ZQ8/MU$X
-M28NT)/`(``"_`@```.@`````08/%`40X;0X/AI@4@^`!ZQM)BP0D2`70`0``2`'HBP")!0````#!Z!2#X`&$P'4*@\,!9H'[
-M+`%UJD2)]DR)Y^@`````3(GGZ`````!)8\9(C11`2(T4D$F+K-3`$@``2(7M
-M#X3]````08!\)$,`="R[``````^VRP^V10U(T_BH`70/N@````")SDR)Y^@`
-M````@\,!03A<)$-WV4$/ML5(C11`2(T4D$F-E-2X$@``2(E5($B-14A(.45(
-M=3A(C45 at 2#E%8'4NZWMF9I!FD$B)W^@`````2(UPR$B+4PA(B4,(2(D82(E0
-M"$B)`DB#>-@`=!'K";X`````2(U=2$@Y74AURDB%]G1;QD9:`$&`?"1#`'1/
-MN0````"Z``````^V10U(T_BH`70.#[;"B$P&<(!&6@&#P@&#P0%!.$PD0W8B
-MZ]OV10H!=`U(B>Y,B>?H`````.L-O@````!(B>_H`````%M=05Q!74%>PY!(
-M@^P(3(L'1(M/,$$/MG!#0(3V=&))C8"X$@``N0````!(.?AU&NM/#[;!2(T4
-M0$B-%)!)C930N!(``$@Y^G0(@\$!0#CQ=>"`^0-V+TF+`$@%T`$``$B-%(T`
-M````@>+\`P``2`'0BP")!0````#!Z!2#X`'K+;D`````28L`2`70`0``2(T4
-MC0````"!XOP#``!(`="+`(D%`````,'H%(/@`83`=!`/MO%$B(````28LL)$'V1"0,$'0$QD=1!D$/MD91/`%T>3P!,"``!!@&0D#/=!@$92`4'&1E$`QD,D`DB)WDB)
-M[^@`````2(GOZ`````#IMP(``$$/MD0D#(/@]X/($$&(1"0,08N6"`$``(U"
-M`4&)A@@!``"#^@(/AP,!``!(@[N``````'0/2(VS@````$B)[^@`````2(V5
-M^````$B+A?@```!(B5@(2(D#2(E3"$B)G?@```!!@'Y"`'480;\`````38UL
-M)&!!@'PD#@!U'NF>````N@````"^`@```$R)Y^@`````9I#I&P(``$R)[^@`
-M````2(G#28M%"$F)70A,B2M(B4,(2(D82(M30$B%TG052(NU\`@``+\%````
-MZ`````"`2TP"2(G:O at 8```!,B>?H`````("[@P````!T(F9F9I!F9I!(B>_H
-M`````+\!````Z`````"`NX,`````=>5!@\&"`$```````!(@[N``````'0/2(VS@````$B)[^@`
-M````2(V5^````$B+A?@```!(B5@(2(D#2(E3"$B)G?@```"Z`````+X&````
-M3(GGZ`````!)C40D8$DY1"1@='Q)B<5,B>_H`````$B)PTB+0$!(A_H`````$B+4T!(B[7P"```OP$`
-M``#H`````$B+4T!(B[7P"```OP8```#H`````$C'0T``````2(G>2(GOZ```
-M``!-.6PD8'6'3(GV2(GOZ`````!)QT0D0`````!(BT4`BY!8`0``B14`````
-MA=)T"DB+10")D%@!``!!]D0D"@%T:X!]0P!T++D`````0?9$)`T!=!7K'69F
-MD&9FD$$/MD0D#4C3^*@!=0^#P0$X34-WZ^L%N0`````/MMF)WDB)[^@`````
-M3(GF2(GOZ`````!(8]M(C01;2(T$@TC'A,7`$@```````&9FD&:02(/$"%M=
-M05Q!74%>05_#D$B#["A(B5PD"$B);"003(ED)!A,B6PD($B)\TB)_4R+;U!-
-MBV4`#[=.,HG(9L'H!0^W\$ACQD&+1(1L@^$?2-/XJ`$/A6<#``!)BQ0DC02U
-M``,``(F"<`$``$F+!"2+D'0!``")%0````#&0R0ABT,X)?___P`]X0$/`'4C
-MO@````!(B=_H`````+H`````2(G>3(GGZ`````#I$0,``)")T`^W2S*#X1](
-MT_BH`705O@$```!(B=_H`````$R)Y^@`````#[:%Z````#P$#X?<`@``#[;`
-M_R3%`````,:%Z`````&Z`0```$B)WDR)[^@`````Z;8"``#&A>@````"N@@`
-M``!(B=Y,B>_H`````.F:`@``QH7H`````TB)ZKXA````3(GOZ`````!(BW58
-M2(7V=!\/MI6!````0;@`````N0$```!,B>_H`````.E;`@``00^V=0VZ````
-M`$R)Y^@`````Z40"``#&A>@````$2(-]6`!T,TB)ZKXA````3(GOZ``````/
-MMI6!````2(MU6$&X`````+D"````3(GOZ`````#I`P(``+H`````OB$```!,
-MB>_H`````$$/MG4-N@$```!,B>?H`````.G:`0``@'U*_W052(GJO at 8```!,
-MB>_H`````.F_`0``2(GJO at 8```!,B>_H`````$B+34!(A9F:03(GGZ`````"_`0```.@`
-M````@+V#`````'7E2(-]6`!T&4B+51!(BT482(E""$B)$$B+15B`:%@!ZQE(
-MBU5 at 2(72=!`/MH6!````2,=$PE@`````2(M5`$B+10A(B4((2(D008!M#@%(
-MB[T@`0``2(7_=!$/MK4-`0``N@$```#H`````$B+?5A(A?]T$0^VM8$```"Z
-M`0```.@`````2(M%0$B%P'1R2,=`8`````!,B>?H`````$B+=4"Z`0```$R)
-MY^@`````2(M%0`^V4`(/MG`!2,?'`````+@`````Z`````!(BU5`28NT)/`(
-M``"_`0```.@`````2(M50$F+M"3P"```OP8```#H`````$C'14``````2(GN
-M3(GGZ`````!!@'T)_W14O0````!!@'T.`'0RO0````!)C5U at 2(G?Z`````!(
-MBU,(2(E#"$B)&$B)4`A(B0*`>$K_=0F#Q0%!.&T.=]=!.&T.=Q!!QD4)_TR)
-M[DR)Y^@`````2(M<)`A(BVPD$$R+9"083(ML)"!(@\0HPV9F9I!F9I!!5T%6
-M055!5%532(/L&$F)_$R+OX@```!)BQ](BX.8$0``1(LH2(G^2(G?Z`````!!
-M@'PD4@%V!D'&1"11!$F-;"0H23EL)"@/A/\!``!(B>_H`````$F)QDF+1"0H
-M3(EP"$F)!DF);@A-B70D*&:#>V@`#X2T`0``O0````!(C8.@#P``2(E$)!!(
-MC;OX````2(E\)`@/M\5(P>`#2`.#L`D``$B+,$B%]@^$<`$```^W1B!F03E$
-M)$`/A6`!```/MY.R$@``03G5=$]F9F:0@\(!#[>#MA(``#G"N``````/0]"-
-M0@%(P>`"2`.#F!$``(L`J0``"`!U&V8E_P]F.>AU$DDY]G422(G?Z`````#I
-M-P$``$0YZG6U#[=&(&8]A0`/A_<````/M\"`O`-@"```_P^$Y@```$&`?U@`
-M#X7;````0?9'"@$/A-````!(BQ,/MT8R9L'H!0^WP(T$A0`#``")@G`!``!(
-MBP,/MTXR@^$?N@$```!(B==(T^>)N'0!```/MT8R2,'@`T@#@[`)``!(QP``
-M````#[=.,HG(9L'H!27_!P``@^$?2(G72-/G2(GY]]$AC(.X"0``#[=.,HG(
-M9L'H!27_!P``@^$?2-/B]](A5(-L3#GV="Q(BP9(BU8(2(E0"$B)`DB+ at _@`
-M``!(B7`(2(D&2(M$)`A(B48(2(FS^`````^W=C)(BWPD$.@`````08!L)$4!
-M@\4!9CEK:`^':?[__T'V1PH!=!E)BQ9)BT8(2(E""$B)$$R)]DR)Y^@`````
-M2(/$&%M=05Q!74%>05_#9F9FD$%505154TB#[`A(B10D3(LG#[?V2,'F`TD#
-MM"2P"0``2(L>9H%[..$!=28/MD,Z@^@1/`%W&TB+;T!!O0````!(A=)U4L9%
-M40!!O0````#K1DF+E"0X"0``N&B6`0!F at 7L@A0!W%`^W0R!!#[:$!&`(``!(
-M:<"8`0``3(TL`KT`````2(,\)`!U#4'&A>@`````O0````"`>R2!=02`9PSW
-M2(,\)``/A00!``#&0R0`]H.6````(`^$*@,``$B+0VA(A<`/A!T#``!(B<7V
-M at +$````"=!U(B[B@````2(7_=!%(BW-(2(7V=`B+4S3H`````$F+E"0($0``
-M2('"0`@``$$/MD5RP>`(2)A(`<*+`HD%`````(G"P>H0B)6;````P>@89HF%
-MD````$F+E"0($0``2('"1`@``$$/MD5RP>`(2)A(`<*+$HD5``````^VPF:)
-MA90````/ML9FB866````B=#!Z!`/ML!FB868````P>H8B)6:````28N4)`@1
-M``!(@<),"```00^V17+!X`A(F$@!PHL"B04`````#[;`9HF%D@```.DX`@``
-MD(![)(!U"L9#)"%F9I!F9I!(BS0D2,?'`````+@`````Z`````!F at 7LXX0%U
-M&`^V0SJ#Z!$\`7<-2(GOZ`````#I\@$``$B)X0^V5"0#]L(!#X1]`0``BT,X
-M)?___P`]X0$.``^$:@$``$F+E"0($0``2('"0`@``$$/MD5RP>`(2)A(`<*+
-M,HDU`````$F+E"0($0``2('"1`@``$$/MD5RP>`(2)A(`<)$BP)$B04`````
-M28N4)`@1``!(@<)("```00^V17+!X`A(F$@!PHL*B0T`````]H.6````(`^$
-MX@```$B+>VC&A[(````0QD,D((GPP>@0B(>;````B?#!Z!AFB8>0````B4````BH0P>((1(G`
-MP>@0#[;``<)FB9>8````28N4)`@1``!(@<),"```00^V17+!X`A(F$@!PHLR
-MB34`````0`^V]F:)MY(````/MX^6````#[>7F`````^W]D0/MX>4````2,?'
-M`````+@`````Z`````!)BY0D"!$``$B!PD`(``!!#[9%?H`````.MDA-)Y($F+!"2+B%@!``")#0````"%R71,28L$
-M)(F(6`$``.M`@#D`>#N`>0<`>35)BQ0D#[=#,F;!Z`4/M\"-!(4``P``B8)P
-M`0``28L4)`^W2S*#X1^X`0```$C3X(F"=`$``$B#Q`A;74%<05W#9F9FD&9F
-M9I!F9I!F9I!(@^P(#[9&.$@Y?BAU2CP(=&4\*'1A/*AT73R(9F9FD'15/`IT
-M43PJ=$T\JF9F9I!T13R*=$%(BX?X````2(EP"$B)!DB-A_@```!(B48(2(FW
-M^````.L?2(N7``$``$B)MP`!``!(C8?X````2(D&2(E6"$B),N@`````2(/$
-M",-F9F:09F9FD&9F9I!F9I!(@^P(Z`````!(@\0(PV:04TB#[&!(B?M(C4PD
-M74B-5"1>2(UT)%\/MW\\2(U$)%)(B40D.$B-1"142(E$)#!(C40D3$B)1"0H
-M2(U$)$Y(B40D($B-1"182(E$)!A(C40D6DB)1"002(U$)%M(B40D"$B-1"16
-M2(D$)$R-3"1<3(U$)%#H``````^V5"1?#[9T)%Y(C7PD2.@`````#[94)%](
-M:=*8`0``2(MS($B-NQ@)``"Y`0```.@`````#[94)%U(C1322,'B!4B+2&G2R`\``$B+(#2(MS($B-NV@*``"Y`0```.@`````#[94)%P/MT0D4$@/K]!(C112
-M2,'B`DB+(#
-M2(MS($B-NS`+``"Y`0```.@`````#[=4)%A(`=)(BW, at 2(V[>`\``+D!````
-MZ``````/ME0D7T@!TDB+(+2(MS($B-NZ at 1``!!N`$```"Y"````.@`````2(MS($B-N]@1``!!
-MN`$```"Y"````+H```@`Z``````/MU0D5DAITHP!``!(BW, at 2('#"!(``$&X
-M`0```+D(````2(G?Z`````"X`````$B#Q&!;PV9F9I!F9I!F9I!(@^PX2(E<
-M)`A(B6PD$$R)9"083(EL)"!,B70D*$R)?"0P28GW28G]2(L'2(D$)$R-9TA,
-MB>?H`````$B)PTR-<,A(BSPDZ`````!(B<5)BT5028E=4$V)9CA)B49`2(D8
-MN`$```!(A>UT>,9%..'&13D!QD4Z$(!-.P%)BX>@````2(E%:$B+17!,B7 at H
-M28V'D````$B)15#&127,00^V1EMFB44 at 28M%`$B)12C'1320````3(E]2$C'
-MA:``````````2(U]6+X`````Z`````!(B>Y(BSPDZ`````"X`````$B+7"0(
-M2(ML)!!,BV0D&$R+;"0 at 3(MT)"A,BWPD,$B#Q#C#9F9FD&9FD&9FD$%7059!
-M54%455-(@^P82(G]2,=$)!``````2(M$)!`/MI0HY@@``(#Z_P^$Z@````^V
-MRDB-!(E(C02!2(V$Q<`!``!(B40D"`^V\DACQDB-%(!(C120 at +S5S@$````/
-MA+8```!!O`````!(C02)2(T$@4C!X`-,C;0%(`(``$R-+"A(8\9(C12`2(T4
-MD$R-O-7``0``3(GWZ`````!(B<-)BX4H`@``28F=*`(``$R),TB)0PA(B1A(
-MBU-`2(72=!5(B[7P"```OP4```#H`````(!+3`)(B=J^`@```$B+?"0(Z```
-M``"`NX,`````=!M(B>_H`````+\!````Z`````"`NX,`````=>5!@\0!13AG
-M#@^'>____TB#1"00`4B#?"00!`^%[O[__TB)[^@`````2(/$&%M=05Q!74%>
-M05_#9F9FD&9FD&9FD&9FD$%7059!54%455-(@^QX2(G[QD=1`,9'4`#&1T\`
-MQH=I%````$B-E[@2``"X`````,8$$`!(@\`!2#V@`0``=?!(C8/X````2(F#
-M^````$B)@P`!``!(C8,(`0``2(F#"`$``$B)@Q`!``!,C:,8`0``3(FC&`$`
-M`$R)HR`!``!,C:LH`0``3(FK*`$``$R)JS`!``!(C8,X`0``2(E$)$A(B8,X
-M`0``2(F#0`$``$B-BT@!``!(B4PD4$B)BT@!``!(B8M0`0``3(VS:`$``$R)
-MLV@!``!,B;-P`0``2(VS>`$``$B)="1`2(FS>`$``$B)LX`!``!,C;M8`0``
-M3(F[6`$``$R)NV`!``!(C4PD;DB-5"1P2(UT)'$/MWL\2(U$)')(B40D.$B-
-M1"1T2(E$)#!(C40D9$B)1"0H2(U$)&I(B40D($B-1"1V2(E$)!A(C40D;$B)
-M1"002(U$)&U(B40D"$B-1"1H2(D$)$R-3"1O3(U$)&;H``````^V1"1QB$-&
-M#[9$)'"(0T(%2(72=!!(B`L``$B+DX`!``!(
-MB8.``0``2(M,)$!(B0A(B5`(2(D"@\4!#[9$)'%F.>AWPTB-NW@/``#H````
-M`$B)@Y@/``!(B8.@#P``#[=T)'9FB;.J#P``#[?V2(V[H`\``.@`````2(V[
-ML`\``.@`````2(F#T`\``$B)@]@/```/MG0D<6:)L^(/```/M_9(C;O8#P``
-MZ`````!(C;OH#P``Z`````!(B8,($```2(F#$!````^V="1N9HFS&A````^W
-M]DB-NQ`0``#H`````$B-NR`0``#H`````$B)@T`0``!(B8-($```#[9T)'!F
-MB;-2$```#[?V2(V[2!```.@`````2(V[6!```.@`````2(F#>!```$B)@X`0
-M```/MD,^9HF#BA````^V`A!QD`)`$B)F,`!``!!QD`.`,:`&`(```#&@.@!````QX!@`@``````
-M`$B-C!/P`0``2(F(\`$``$B)B/@!``!(C8P3"`(``$B)B`@"``!(B8 at 0`@``
-M2(V4$R`"``!(B9`@`@``2(F0*`(``$'&0`H"@\$`L@``````$C'A,M@!```````
-M`$B)T4@#BS@)``!(C4$@2(E!($@#DS@)``!(C4(@2(E"*(/&`0^V1"1Q9CGP
-M#X=T____9L>#[```````N`````!F9I!F9I#&A!A@"```_TB#P`%(/88```!U
-M[(!\)'``#X2]````O@`````/M\9(:<#(#P``2(N3B`D``,9$`E@`2(N3B`D`
-M`,9$$%D`2(N3B`D``$C'1!`0`````$B)P4@#BX@)``!(C5$82(E1&$B)P4@#
-MBX@)``!(C5$82(E1($B)P4@#BX@)``!(C5$H2(E1*$B)P4@#BX@)``!(C5$H
-M2(E1,$B+DX@)``!,B400"$B)P4@#BX@)``!(C5%(2(E12$@#@X@)``!(C5!(
-M2(E04(/&`0^V1"1P9CGP#X=(____QH/O````@(!\)&X`#X2"````O@`````/
-MM\9(C03`2,'@!4B+DV`)``!FQT0"3 at 0`2(N38`D``,9$$$(`2(N38`D``,9$
-M$$3_2(N38`D``,9$$%#_2(G!2`.+8`D``$B-42A(B5$H2(G!2`.+8`D``$B-
-M42A(B5$P2(N38`D``$R)A!"(````@\8!#[9$)&YF.?!W@\:#\````()(C;/@
-M$```2(V[N!```.@`````2(F#V!```$B-LQ`1``!(C;OH$```Z`````!(B8,(
-M$0``2(VS0!$``$B-NQ at 1``#H`````$B)@S at 1``!(C;-P$0``2(V[2!$``.@`
-M````2(F#:!$``$B-LZ`1``!(C;MX$0``Z`````!(B8.8$0``2(VST!$``$B-
-MNZ at 1``#H`````$F)Q$B)@\@1``!(BZO0$0``@'PD;0!T4D&]`````$B+?"1(
-MZ`````!,B6`02(EH&$B+DT`!``!(B8-``0``2(MT)$A(B3!(B5`(2(D"28'$
-M``@``$B!Q0`(``!!@\4!#[9$)&UF1#GH=[1(C;,`$@``2(V[V!$``.@`````
-M28G$2(F#^!$``$B+JP`2``!!O0````!(BWPD4.@`````3(E@$$B):!A(BY-0
-M`0``2(F#4`$``$B+3"102(D(2(E0"$B)`DF!Q````0!(@<4```$`08/%`69!
-M at _T(=;A(C;,P$@``2(V["!(``.@`````2(F#*!(``$R+HS`2``!F at WPD:`!T
-M2$B)Q4&U`$R)_^@`````2(EH$$R)8!A(BY-@`0``2(F#8`$``$R).$B)4`A(
-MB0)(@<6,`0``28'$C`$``$&#Q0%F1#EL)&AWODB#Q'A;74%<05U!7D%?PV9F
-M9I!F9F:0055!5%532(/L"$F)_4F)]$B+GH@````/ME9'2(G^2(G?Z`````!(
-MB<5F08-,)$X008!]0P!T6;D`````]D,-`70-ZTP/MD,-2-/XJ`%U#8/!`4$/
-MMD5#9CG(=^AF at _D#=C-)BT4`2`70`0``2(T4C0````"!XOS_`P!(`="+`(D%
-M`````,'H%(/P`8/@`>LQN0````!)BT4`2`70`0``2(T4C0````"!XOS_`P!(
-M`="+`(D%`````,'H%(/P`8/@`83`=!`/MO%,B>_H`````.F7`0``2(U#8$@Y
-M0V`/A!D!``!(A>T/A!`!```/MH6!````2<=$Q%@`````2(M5`$B+10A(B4((
-M2(D02(GJO at 8```!(B=_H`````("]@P````!T&TR)[^@`````OP$```#H````
-M`("]@P````!UY4B+14!(AY,B>_H`````$F+10"+D%@!``")%0````"%TG0*28M%`(F06`$`
-M`$'&1"1"`&9!@V0D3N]!@'PD.P!T*KH`````#[?"28M$Q%A(AM+3(GF
-M3(GOZ`````!FD.M*#[?%28M_H`````$F)QTF+1"0 at 3(EX"$F)!TF);PA-
-MB7PD(&:#>V@`#X0+`@``0;T`````2(VSH`\``$B)="002(V#^````$B)1"0(
-M00^WQ4C!X`-(`X.P"0``2(LH2(7M#X3#`0``#[=%(&9!.40D.`^%LP$```^W
-MD[(2``!!.=9T469FD&:0@\(!#[>#MA(``#G"N``````/0]"-0@%(P>`"2`.#
-MF!$``(L`J0``"`!U'&8E_P]F1#GH=1)).>]U$DB)W^@`````Z9D!``!$.?)U
-MM$B+="0@@'Y8``^%1P$```^W12!F/84`#X

Author: pluknet
Date: Fri Aug 29 13:41:21 2014
New Revision: 270817
URL: http://svnweb.freebsd.org/changeset/base/270817

Log:
  MFC r270728, tzdata2014f
  
  - Parts of Russia will change times on 2014-10-26.
  - Time zone name changes for Asia/Novokuznetsk and Xinjiang and Samoa
    and America/Metlakatla, new zones Asia/Chita and Asia/Srednekolymsk.
  - Australia will now use Axxx.
  - New zone tab data format.
  
  And lots of historical changes (See
  http://mm.icann.org/pipermail/tz-announce/2014-August/000023.html
  for the full details.)

Added:
  stable/10/contrib/tzdata/zone1970.tab
     - copied unchanged from r270728, head/contrib/tzdata/zone1970.tab
Modified:
  stable/10/contrib/tzdata/africa
  stable/10/contrib/tzdata/antarctica
  stable/10/contrib/tzdata/asia
  stable/10/contrib/tzdata/australasia
  stable/10/contrib/tzdata/backward
  stable/10/contrib/tzdata/etcetera
  stable/10/contrib/tzdata/europe
  stable/10/contrib/tzdata/factory
  stable/10/contrib/tzdata/leap-seconds.list   (contents, props changed)
  stable/10/contrib/tzdata/northamerica
  stable/10/contrib/tzdata/pacificnew
  stable/10/contrib/tzdata/southamerica
  stable/10/contrib/tzdata/systemv
  stable/10/contrib/tzdata/yearistype.sh
  stable/10/contrib/tzdata/zone.tab
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/tzdata/africa
==============================================================================
--- stable/10/contrib/tzdata/africa	Fri Aug 29 13:37:01 2014	(r270816)
+++ stable/10/contrib/tzdata/africa	Fri Aug 29 13:41:21 2014	(r270817)
@@ -1,4 +1,3 @@
-# 
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -35,13 +34,13 @@
 # Previous editions of this database used WAT, CAT, SAT, and EAT
 # for +0:00 through +3:00, respectively,
 # but Mark R V Murray reports that
-# `SAST' is the official abbreviation for +2:00 in the country of South Africa,
-# `CAT' is commonly used for +2:00 in countries north of South Africa, and
-# `WAT' is probably the best name for +1:00, as the common phrase for
-# the area that includes Nigeria is ``West Africa''.
-# He has heard of ``Western Sahara Time'' for +0:00 but can find no reference.
+# 'SAST' is the official abbreviation for +2:00 in the country of South Africa,
+# 'CAT' is commonly used for +2:00 in countries north of South Africa, and
+# 'WAT' is probably the best name for +1:00, as the common phrase for
+# the area that includes Nigeria is "West Africa".
+# He has heard of "Western Sahara Time" for +0:00 but can find no reference.
 #
-# To make things confusing, `WAT' seems to have been used for -1:00 long ago;
+# To make things confusing, 'WAT' seems to have been used for -1:00 long ago;
 # I'd guess that this was because people needed _some_ name for -1:00,
 # and at the time, far west Africa was the only major land area in -1:00.
 # This usage is now obsolete, as the last use of -1:00 on the African
@@ -54,7 +53,7 @@
 #	 2:00	SAST	South Africa Standard Time
 # and Murray suggests the following abbreviation:
 #	 1:00	WAT	West Africa Time
-# I realize that this leads to `WAT' being used for both -1:00 and 1:00
+# I realize that this leads to 'WAT' being used for both -1:00 and 1:00
 # for times before 1976, but this is the best I can think of
 # until we get more information.
 #
@@ -131,9 +130,7 @@ Zone	Africa/Gaborone	1:43:40 -	LMT	1885
 			2:00	-	CAT
 
 # Burkina Faso
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone Africa/Ouagadougou	-0:06:04 -	LMT	1912
-			 0:00	-	GMT
+# See Africa/Abidjan.
 
 # Burundi
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -161,7 +158,7 @@ Zone	Africa/Bangui	1:14:20	-	LMT	1912
 
 # Chad
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Ndjamena	1:00:12 -	LMT	1912
+Zone	Africa/Ndjamena	1:00:12 -	LMT	1912 # N'Djamena
 			1:00	-	WAT	1979 Oct 14
 			1:00	1:00	WAST	1980 Mar  8
 			1:00	-	WAT
@@ -183,10 +180,20 @@ Zone Africa/Lubumbashi	1:49:52 -	LMT	189
 Zone Africa/Brazzaville	1:01:08 -	LMT	1912
 			1:00	-	WAT
 
-# Cote D'Ivoire
+# C?te D'Ivoire / Ivory Coast
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Abidjan	-0:16:08 -	LMT	1912
 			 0:00	-	GMT
+Link Africa/Abidjan Africa/Bamako	# Mali
+Link Africa/Abidjan Africa/Banjul	# Gambia
+Link Africa/Abidjan Africa/Conakry	# Guinea
+Link Africa/Abidjan Africa/Dakar	# Senegal
+Link Africa/Abidjan Africa/Freetown	# Sierra Leone
+Link Africa/Abidjan Africa/Lome		# Togo
+Link Africa/Abidjan Africa/Nouakchott	# Mauritania
+Link Africa/Abidjan Africa/Ouagadougou	# Burkina Faso
+Link Africa/Abidjan Africa/Sao_Tome	# S?o Tom? and Pr?ncipe
+Link Africa/Abidjan Atlantic/St_Helena	# St Helena
 
 # Djibouti
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -231,13 +238,9 @@ Rule	Egypt	1990	1994	-	May	 1	1:00	1:00	
 # Egyptians would approve the cancellation."
 #
 # Egypt to cancel daylight saving time
-# 
 # http://www.almasryalyoum.com/en/node/407168
-# 
 # or
-# 
 # http://www.worldtimezone.com/dst_news/dst_news_egypt04.html
-# 
 Rule	Egypt	1995	2010	-	Apr	lastFri	 0:00s	1:00	S
 Rule	Egypt	1995	2005	-	Sep	lastThu	24:00	0	-
 # From Steffen Thorsen (2006-09-19):
@@ -249,7 +252,7 @@ Rule	Egypt	2006	only	-	Sep	21	24:00	0	-
 # From Dirk Losch (2007-08-14):
 # I received a mail from an airline which says that the daylight
 # saving time in Egypt will end in the night of 2007-09-06 to 2007-09-07.
-# From Jesper Norgaard Welen (2007-08-15): [The following agree:]
+# From Jesper N?rgaard Welen (2007-08-15): [The following agree:]
 # http://www.nentjes.info/Bill/bill5.htm
 # http://www.timeanddate.com/worldclock/city.html?n=53
 # From Steffen Thorsen (2007-09-04): The official information...:
@@ -288,15 +291,9 @@ Rule	Egypt	2007	only	-	Sep	Thu>=1	24:00	
 #
 # timeanddate[2] and another site I've found[3] also support that.
 #
-# [1] 
-# https://bugzilla.redhat.com/show_bug.cgi?id=492263
-# 
-# [2] 
-# http://www.timeanddate.com/worldclock/clockchange.html?n=53
-# 
-# [3] 
-# http://wwp.greenwichmeantime.com/time-zone/africa/egypt/
-# 
+# [1] https://bugzilla.redhat.com/show_bug.cgi?id=492263
+# [2] http://www.timeanddate.com/worldclock/clockchange.html?n=53
+# [3] http://wwp.greenwichmeantime.com/time-zone/africa/egypt/
 
 # From Arthur David Olson (2009-04-20):
 # In 2009 (and for the next several years), Ramadan ends before the fourth
@@ -306,14 +303,10 @@ Rule	Egypt	2007	only	-	Sep	Thu>=1	24:00	
 # From Steffen Thorsen (2009-08-11):
 # We have been able to confirm the August change with the Egyptian Cabinet
 # Information and Decision Support Center:
-# 
 # http://www.timeanddate.com/news/time/egypt-dst-ends-2009.html
-# 
 #
 # The Middle East News Agency
-# 
 # http://www.mena.org.eg/index.aspx
-# 
 # also reports "Egypt starts winter time on August 21"
 # today in article numbered "71, 11/08/2009 12:25 GMT."
 # Only the title above is available without a subscription to their service,
@@ -321,19 +314,14 @@ Rule	Egypt	2007	only	-	Sep	Thu>=1	24:00	
 # (at least today).
 
 # From Alexander Krivenyshev (2010-07-20):
-# According to News from Egypt -  Al-Masry Al-Youm Egypt's cabinet has
+# According to News from Egypt - Al-Masry Al-Youm Egypt's cabinet has
 # decided that Daylight Saving Time will not be used in Egypt during
 # Ramadan.
 #
 # Arabic translation:
-# "Clocks to go back during Ramadan--and then forward again"
-# 
+# "Clocks to go back during Ramadan - and then forward again"
 # http://www.almasryalyoum.com/en/news/clocks-go-back-during-ramadan-and-then-forward-again
-# 
-# or
-# 
 # http://www.worldtimezone.com/dst_news/dst_news_egypt02.html
-# 
 
 # From Ahmad El-Dardiry (2014-05-07):
 # Egypt is to change back to Daylight system on May 15
@@ -433,10 +421,15 @@ Zone	Africa/Asmara	2:35:32 -	LMT	1870
 			3:00	-	EAT
 
 # Ethiopia
-# From Paul Eggert (2006-03-22):
-# Shanks & Pottenger write that Ethiopia had six narrowly-spaced time zones
-# between 1870 and 1890, and that they merged to 38E50 (2:35:20) in 1890.
-# We'll guess that 38E50 is for Adis Dera.
+# From Paul Eggert (2014-07-31):
+# Like the Swahili of Kenya and Tanzania, many Ethiopians keep a
+# 12-hour clock starting at our 06:00, so their "8 o'clock" is our
+# 02:00 or 14:00.  Keep this in mind when you ask the time in Amharic.
+#
+# Shanks & Pottenger write that Ethiopia had six narrowly-spaced time
+# zones between 1870 and 1890, that they merged to 38E50 (2:35:20) in
+# 1890, and that they switched to 3:00 on 1936-05-05.  Perhaps 38E50
+# was for Adis Dera.  Quite likely the Shanks data are wrong anyway.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Africa/Addis_Ababa	2:34:48 -	LMT	1870
 			2:35:20	-	ADMT	1936 May 5    # Adis Dera MT
@@ -448,28 +441,24 @@ Zone Africa/Libreville	0:37:48 -	LMT	191
 			1:00	-	WAT
 
 # Gambia
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Banjul	-1:06:36 -	LMT	1912
-			-1:06:36 -	BMT	1935	# Banjul Mean Time
-			-1:00	-	WAT	1964
-			 0:00	-	GMT
+# See Africa/Abidjan.
 
 # Ghana
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-# Whitman says DST was observed from 1931 to ``the present'';
-# go with Shanks & Pottenger.
-Rule	Ghana	1936	1942	-	Sep	 1	0:00	0:20	GHST
-Rule	Ghana	1936	1942	-	Dec	31	0:00	0	GMT
+# Whitman says DST was observed from 1931 to "the present";
+# Shanks & Pottenger say 1936 to 1942;
+# and September 1 to January 1 is given by:
+# Scott Keltie J, Epstein M (eds), The Statesman's Year-Book,
+# 57th ed. Macmillan, London (1920), OCLC 609408015, pp xxviii.
+# For lack of better info, assume DST was observed from 1920 to 1942.
+Rule	Ghana	1920	1942	-	Sep	 1	0:00	0:20	GHST
+Rule	Ghana	1920	1942	-	Dec	31	0:00	0	GMT
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Accra	-0:00:52 -	LMT	1918
 			 0:00	Ghana	%s
 
 # Guinea
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Conakry	-0:54:52 -	LMT	1912
-			 0:00	-	GMT	1934 Feb 26
-			-1:00	-	WAT	1960
-			 0:00	-	GMT
+# See Africa/Abidjan.
 
 # Guinea-Bissau
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -577,18 +566,8 @@ Zone	Africa/Blantyre	2:20:00 -	LMT	1903 
 			2:00	-	CAT
 
 # Mali
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Bamako	-0:32:00 -	LMT	1912
-			 0:00	-	GMT	1934 Feb 26
-			-1:00	-	WAT	1960 Jun 20
-			 0:00	-	GMT
-
 # Mauritania
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone Africa/Nouakchott	-1:03:48 -	LMT	1912
-			 0:00	-	GMT	1934 Feb 26
-			-1:00	-	WAT	1960 Nov 28
-			 0:00	-	GMT
+# See Africa/Abidjan.
 
 # Mauritius
 
@@ -612,9 +591,7 @@ Zone Africa/Nouakchott	-1:03:48 -	LMT	19
 
 # From Steffen Thorsen (2008-07-10):
 # According to
-# 
 # http://www.lexpress.mu/display_article.php?news_id=111216
-# 
 # (in French), Mauritius will start and end their DST a few days earlier
 # than previously announced (2008-11-01 to 2009-03-31).  The new start
 # date is 2008-10-26 at 02:00 and the new end date is 2009-03-27 (no time
@@ -633,18 +610,13 @@ Zone Africa/Nouakchott	-1:03:48 -	LMT	19
 # published on Monday, June 30, 2008...
 #
 # I guess that article in French "Le gouvernement avance l'introduction
-# de l'heure d'ete" stating that DST in Mauritius starting on October 26
-# and ending on March 27, 2009 is the most recent one.
-# ...
-# 
+# de l'heure d'?t?" stating that DST in Mauritius starting on October 26
+# and ending on March 27, 2009 is the most recent one....
 # http://www.worldtimezone.com/dst_news/dst_news_mauritius02.html
-# 
 
 # From Riad M. Hossen Ally (2008-08-03):
 # The Government of Mauritius weblink
-# 
 # http://www.gov.mu/portal/site/pmosite/menuitem.4ca0efdee47462e7440a600248a521ca/?content_id=4728ca68b2a5b110VgnVCM1000000a04a8c0RCRD
-# 
 # Cabinet Decision of July 18th, 2008 states as follows:
 #
 # 4. ...Cabinet has agreed to the introduction into the National Assembly
@@ -654,33 +626,25 @@ Zone Africa/Nouakchott	-1:03:48 -	LMT	19
 # States of America. It will start at two o'clock in the morning on the
 # last Sunday of October and will end at two o'clock in the morning on
 # the last Sunday of March the following year. The summer time for the
-# year 2008 - 2009 will, therefore, be effective as from 26 October 2008
+# year 2008-2009 will, therefore, be effective as from 26 October 2008
 # and end on 29 March 2009.
 
 # From Ed Maste (2008-10-07):
 # THE TIME BILL (No. XXVII of 2008) Explanatory Memorandum states the
 # beginning / ending of summer time is 2 o'clock standard time in the
 # morning of the last Sunday of October / last Sunday of March.
-# 
 # http://www.gov.mu/portal/goc/assemblysite/file/bill2708.pdf
-# 
 
 # From Steffen Thorsen (2009-06-05):
 # According to several sources, Mauritius will not continue to observe
 # DST the coming summer...
 #
 # Some sources, in French:
-# 
 # http://www.defimedia.info/news/946/Rashid-Beebeejaun-:-%C2%AB-L%E2%80%99heure-d%E2%80%99%C3%A9t%C3%A9-ne-sera-pas-appliqu%C3%A9e-cette-ann%C3%A9e-%C2%BB
-# 
-# 
 # http://lexpress.mu/Story/3398~Beebeejaun---Les-objectifs-d-%C3%A9conomie-d-%C3%A9nergie-de-l-heure-d-%C3%A9t%C3%A9-ont-%C3%A9t%C3%A9-atteints-
-# 
 #
 # Our wrap-up:
-# 
 # http://www.timeanddate.com/news/time/mauritius-dst-will-not-repeat.html
-# 
 
 # From Arthur David Olson (2009-07-11):
 # The "mauritius-dst-will-not-repeat" wrapup includes this:
@@ -704,7 +668,7 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 			3:00	-	EAT
 
 # Morocco
-# See the `europe' file for Spanish Morocco (Africa/Ceuta).
+# See the 'europe' file for Spanish Morocco (Africa/Ceuta).
 
 # From Alex Krivenyshev (2008-05-09):
 # Here is an article that Morocco plan to introduce Daylight Saving Time between
@@ -712,60 +676,43 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 #
 # "... Morocco is to save energy by adjusting its clock during summer so it will
 # be one hour ahead of GMT between 1 June and 27 September, according to
-# Communication Minister and Gov ernment Spokesman, Khalid Naciri...."
+# Communication Minister and Government Spokesman, Khalid Naciri...."
 #
-# 
 # http://www.worldtimezone.net/dst_news/dst_news_morocco01.html
-# 
-# OR
-# 
 # http://en.afrik.com/news11892.html
-# 
 
 # From Alex Krivenyshev (2008-05-09):
 # The Morocco time change can be confirmed on Morocco web site Maghreb Arabe Presse:
-# 
 # http://www.map.ma/eng/sections/box3/morocco_shifts_to_da/view
-# 
 #
 # Morocco shifts to daylight time on June 1st through September 27, Govt.
 # spokesman.
 
 # From Patrice Scattolin (2008-05-09):
 # According to this article:
-# 
 # http://www.avmaroc.com/actualite/heure-dete-comment-a127896.html
-# 
-# (and republished here:
-# 
-# http://www.actu.ma/heure-dete-comment_i127896_0.html
-# 
-# )
-# the changes occurs at midnight:
-#
-# saturday night may 31st at midnight (which in french is to be
-# intrepreted as the night between saturday and sunday)
-# sunday night the 28th  at midnight
-#
-# Seeing that the 28th is monday, I am guessing that she intends to say
-# the midnight of the 28th which is the midnight between sunday and
-# monday, which jives with other sources that say that it's inclusive
-# june1st to sept 27th.
+# (and republished here: )
+# the changes occur at midnight:
+#
+# Saturday night May 31st at midnight (which in French is to be
+# interpreted as the night between Saturday and Sunday)
+# Sunday night the 28th at midnight
+#
+# Seeing that the 28th is Monday, I am guessing that she intends to say
+# the midnight of the 28th which is the midnight between Sunday and
+# Monday, which jives with other sources that say that it's inclusive
+# June 1st to Sept 27th.
 #
 # The decision was taken by decree *2-08-224 *but I can't find the decree
 # published on the web.
 #
 # It's also confirmed here:
-# 
 # http://www.maroc.ma/NR/exeres/FACF141F-D910-44B0-B7FA-6E03733425D1.htm
-# 
-# on a government portal as being  between june 1st and sept 27th (not yet
-# posted in english).
+# on a government portal as being between June 1st and Sept 27th (not yet
+# posted in English).
 #
-# The following google query will generate many relevant hits:
-# 
+# The following Google query will generate many relevant hits:
 # http://www.google.com/search?hl=en&q=Conseil+de+gouvernement+maroc+heure+avance&btnG=Search
-# 
 
 # From Steffen Thorsen (2008-08-27):
 # Morocco will change the clocks back on the midnight between August 31
@@ -773,47 +720,32 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 # of September:
 #
 # One article about it (in French):
-# 
 # http://www.menara.ma/fr/Actualites/Maroc/Societe/ci.retour_a_l_heure_gmt_a_partir_du_dimanche_31_aout_a_minuit_officiel_.default
-# 
 #
 # We have some further details posted here:
-# 
 # http://www.timeanddate.com/news/time/morocco-ends-dst-early-2008.html
-# 
 
 # From Steffen Thorsen (2009-03-17):
 # Morocco will observe DST from 2009-06-01 00:00 to 2009-08-21 00:00 according
 # to many sources, such as
-# 
 # http://news.marweb.com/morocco/entertainment/morocco-daylight-saving.html
-# 
-# 
 # http://www.medi1sat.ma/fr/depeche.aspx?idp=2312
-# 
 # (French)
 #
 # Our summary:
-# 
 # http://www.timeanddate.com/news/time/morocco-starts-dst-2009.html
-# 
 
 # From Alexander Krivenyshev (2009-03-17):
 # Here is a link to official document from Royaume du Maroc Premier Ministre,
-# Ministere de la Modernisation des Secteurs Publics
+# Minist?re de la Modernisation des Secteurs Publics
 #
 # Under Article 1 of Royal Decree No. 455-67 of Act 23 safar 1387 (2 june 1967)
 # concerning the amendment of the legal time, the Ministry of Modernization of
 # Public Sectors announced that the official time in the Kingdom will be
 # advanced 60 minutes from Sunday 31 May 2009 at midnight.
 #
-# 
 # http://www.mmsp.gov.ma/francais/Actualites_fr/PDF_Actualites_Fr/HeureEte_FR.pdf
-# 
-#
-# 
 # http://www.worldtimezone.com/dst_news/dst_news_morocco03.html
-# 
 
 # From Steffen Thorsen (2010-04-13):
 # Several news media in Morocco report that the Ministry of Modernization
@@ -821,14 +753,10 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 # 2010-05-02 to 2010-08-08.
 #
 # Example:
-# 
 # http://www.lavieeco.com/actualites/4099-le-maroc-passera-a-l-heure-d-ete-gmt1-le-2-mai.html
-# 
 # (French)
 # Our page:
-# 
 # http://www.timeanddate.com/news/time/morocco-starts-dst-2010.html
-# 
 
 # From Dan Abitol (2011-03-30):
 # ...Rules for Africa/Casablanca are the following (24h format)
@@ -838,34 +766,20 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 # The change was broadcast on the FM Radio
 # I ve called ANRT (telecom regulations in Morocco) at
 # +212.537.71.84.00
-# 
 # http://www.anrt.net.ma/fr/
-# 
 # They said that
-# 
 # http://www.map.ma/fr/sections/accueil/l_heure_legale_au_ma/view
-# 
 # is the official publication to look at.
 # They said that the decision was already taken.
 #
 # More articles in the press
-# 
-# http://www.yabiladi.com/articles/details/5058/secret-l-heure-d-ete-maroc-lev
-# 
-# e.html
-# 
+# http://www.yabiladi.com/articles/details/5058/secret-l-heure-d-ete-maroc-leve.html
 # http://www.lematin.ma/Actualite/Express/Article.asp?id=148923
-# 
-# 
 # http://www.lavieeco.com/actualite/Le-Maroc-passe-sur-GMT%2B1-a-partir-de-dim
-# anche-prochain-5538.html
-# 
 
 # From Petr Machata (2011-03-30):
 # They have it written in English here:
-# 
 # http://www.map.ma/eng/sections/home/morocco_to_spring_fo/view
-# 
 #
 # It says there that "Morocco will resume its standard time on July 31,
 # 2011 at midnight." Now they don't say whether they mean midnight of
@@ -873,20 +787,16 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 # also been like that in the past.
 
 # From Alexander Krivenyshev (2012-03-09):
-# According to Infomédiaire web site from Morocco (infomediaire.ma),
-# on March 9, 2012, (in French) Heure légale:
-# Le Maroc adopte officiellement l'heure d'été
-# 
+# According to Infom?diaire web site from Morocco (infomediaire.ma),
+# on March 9, 2012, (in French) Heure l?gale:
+# Le Maroc adopte officiellement l'heure d'?t?
 # http://www.infomediaire.ma/news/maroc/heure-l%C3%A9gale-le-maroc-adopte-officiellement-lheure-d%C3%A9t%C3%A9
-# 
 # Governing Council adopted draft decree, that Morocco DST starts on
 # the last Sunday of March (March 25, 2012) and ends on
 # last Sunday of September (September 30, 2012)
 # except the month of Ramadan.
 # or (brief)
-# 
 # http://www.worldtimezone.com/dst_news/dst_news_morocco06.html
-# 
 
 # From Arthur David Olson (2012-03-10):
 # The infomediaire.ma source indicates that the system is to be in
@@ -897,17 +807,13 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 
 # From Christophe Tropamer (2012-03-16):
 # Seen Morocco change again:
-# 
 # http://www.le2uminutes.com/actualite.php
-# 
-# "...à partir du dernier dimance d'avril et non fins mars,
-# comme annoncé précédemment."
+# "...? partir du dernier dimanche d'avril et non fins mars,
+# comme annonc? pr?c?demment."
 
 # From Milamber Space Network (2012-07-17):
 # The official return to GMT is announced by the Moroccan government:
-# 
 # http://www.mmsp.gov.ma/fr/actualites.aspx?id=288 [in French]
-# 
 #
 # Google translation, lightly edited:
 # Back to the standard time of the Kingdom (GMT)
@@ -1052,7 +958,7 @@ Zone Africa/Casablanca	-0:30:20 -	LMT	19
 # Assume that this has been true since Western Sahara switched to GMT,
 # since most of it was then controlled by Morocco.
 
-Zone Africa/El_Aaiun	-0:52:48 -	LMT	1934 Jan
+Zone Africa/El_Aaiun	-0:52:48 -	LMT	1934 Jan # El Aai?n
 			-1:00	-	WAT	1976 Apr 14
 			 0:00	Morocco	WE%sT
 
@@ -1102,15 +1008,17 @@ Zone	Africa/Niamey	 0:08:28 -	LMT	1912
 Zone	Africa/Lagos	0:13:36 -	LMT	1919 Sep
 			1:00	-	WAT
 
-# Reunion
+# R?union
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Indian/Reunion	3:41:52 -	LMT	1911 Jun	# Saint-Denis
-			4:00	-	RET	# Reunion Time
+			4:00	-	RET	# R?union Time
 #
-# Scattered Islands (Iles Eparses) administered from Reunion are as follows.
+# Crozet Islands also observes R?union time; see the 'antarctica' file.
+#
+# Scattered Islands (?les ?parses) administered from R?union are as follows.
 # The following information about them is taken from
-# Iles Eparses (www.outre-mer.gouv.fr/domtom/ile.htm, 1997-07-22, in French;
-# no longer available as of 1999-08-17).
+# ?les ?parses (, 1997-07-22,
+# in French; no longer available as of 1999-08-17).
 # We have no info about their time zone histories.
 #
 # Bassas da India - uninhabited
@@ -1125,28 +1033,17 @@ Zone	Africa/Kigali	2:00:16 -	LMT	1935 Ju
 			2:00	-	CAT
 
 # St Helena
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone Atlantic/St_Helena	-0:22:48 -	LMT	1890		# Jamestown
-			-0:22:48 -	JMT	1951	# Jamestown Mean Time
-			 0:00	-	GMT
+# See Africa/Abidjan.
 # The other parts of the St Helena territory are similar:
 #	Tristan da Cunha: on GMT, say Whitman and the CIA
-#	Ascension: on GMT, says usno1995 and the CIA
+#	Ascension: on GMT, say the USNO (1995-12-21) and the CIA
 #	Gough (scientific station since 1955; sealers wintered previously):
 #		on GMT, says the CIA
-#	Inaccessible, Nightingale: no information, but probably GMT
-
-# Sao Tome and Principe
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Sao_Tome	 0:26:56 -	LMT	1884
-			-0:36:32 -	LMT	1912	# Lisbon Mean Time
-			 0:00	-	GMT
+#	Inaccessible, Nightingale: uninhabited
 
+# S?o Tom? and Pr?ncipe
 # Senegal
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Dakar	-1:09:44 -	LMT	1912
-			-1:00	-	WAT	1941 Jun
-			 0:00	-	GMT
+# See Africa/Abidjan.
 
 # Seychelles
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -1160,17 +1057,7 @@ Zone	Indian/Mahe	3:41:48 -	LMT	1906 Jun	
 # Possibly the islands were uninhabited.
 
 # Sierra Leone
-# Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-# Whitman gives Mar 31 - Aug 31 for 1931 on; go with Shanks & Pottenger.
-Rule	SL	1935	1942	-	Jun	 1	0:00	0:40	SLST
-Rule	SL	1935	1942	-	Oct	 1	0:00	0	WAT
-Rule	SL	1957	1962	-	Jun	 1	0:00	1:00	SLST
-Rule	SL	1957	1962	-	Sep	 1	0:00	0	GMT
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Freetown	-0:53:00 -	LMT	1882
-			-0:53:00 -	FMT	1913 Jun # Freetown Mean Time
-			-1:00	SL	%s	1957
-			 0:00	SL	%s
+# See Africa/Abidjan.
 
 # Somalia
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -1193,9 +1080,9 @@ Zone Africa/Johannesburg 1:52:00 -	LMT	1
 
 # Sudan
 #
-# From 
-# Sudan News Agency (2000-01-13)
-# , also reported by Michael De Beukelaer-Dossche via Steffen Thorsen:
+# From 
+# Sudan News Agency (2000-01-13),
+# also reported by Micha?l De Beukelaer-Dossche via Steffen Thorsen:
 # Clocks will be moved ahead for 60 minutes all over the Sudan as of noon
 # Saturday....  This was announced Thursday by Caretaker State Minister for
 # Manpower Abdul-Rahman Nur-Eddin.
@@ -1226,14 +1113,12 @@ Zone Africa/Dar_es_Salaam 2:37:08 -	LMT	
 			3:00	-	EAT
 
 # Togo
-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Africa/Lome	0:04:52 -	LMT	1893
-			0:00	-	GMT
+# See Africa/Abidjan.
 
 # Tunisia
 
 # From Gwillim Law (2005-04-30):
-# My correspondent, Risto Nykanen, has alerted me to another adoption of DST,
+# My correspondent, Risto Nyk?nen, has alerted me to another adoption of DST,
 # this time in Tunisia.  According to Yahoo France News
 # , in a story attributed to AP
 # and dated 2005-04-26, "Tunisia has decided to advance its official time by
@@ -1242,7 +1127,7 @@ Zone	Africa/Lome	0:04:52 -	LMT	1893
 # Saturday."  (My translation)
 #
 # From Oscar van Vlijmen (2005-05-02):
-# LaPresse, the first national daily newspaper ...
+# La Presse, the first national daily newspaper ...
 # 
 # ... DST for 2005: on: Sun May 1 0h standard time, off: Fri Sept. 30,
 # 1h standard time.
@@ -1256,18 +1141,12 @@ Zone	Africa/Lome	0:04:52 -	LMT	1893
 # From Steffen Thorsen (2009-03-16):
 # According to several news sources, Tunisia will not observe DST this year.
 # (Arabic)
-# 
 # http://www.elbashayer.com/?page=viewn&nid=42546
-# 
-# 
 # http://www.babnet.net/kiwidetail-15295.asp
-# 
 #
 # We have also confirmed this with the US embassy in Tunisia.
 # We have a wrap-up about this on the following page:
-# 
 # http://www.timeanddate.com/news/time/tunisia-cancels-dst-2009.html
-# 
 
 # From Alexander Krivenyshev (2009-03-17):
 # Here is a link to Tunis Afrique Presse News Agency
@@ -1275,20 +1154,17 @@ Zone	Africa/Lome	0:04:52 -	LMT	1893
 # Standard time to be kept the whole year long (tap.info.tn):
 #
 # (in English)
-# 
 # http://www.tap.info.tn/en/index.php?option=com_content&task=view&id=26813&Itemid=157
-# 
 #
 # (in Arabic)
-# 
 # http://www.tap.info.tn/ar/index.php?option=com_content&task=view&id=61240&Itemid=1
-# 
 
-# From Arthur David Olson (2009--3-18):
-# The Tunis Afrique Presse News Agency notice contains this: "This measure is due to the fact
-# that the fasting month of ramadan coincides with the period concerned by summer time.
-# Therefore, the standard time will be kept unchanged the whole year long."
-# So foregoing DST seems to be an exception (albeit one that may be repeated in the  future).
+# From Arthur David Olson (2009-03-18):
+# The Tunis Afrique Presse News Agency notice contains this: "This measure is
+# due to the fact that the fasting month of Ramadan coincides with the period
+# concerned by summer time.  Therefore, the standard time will be kept
+# unchanged the whole year long."  So foregoing DST seems to be an exception
+# (albeit one that may be repeated in the future).
 
 # From Alexander Krivenyshev (2010-03-27):
 # According to some news reports Tunis confirmed not to use DST in 2010
@@ -1300,12 +1176,8 @@ Zone	Africa/Lome	0:04:52 -	LMT	1893
 # coincided with the month of Ramadan..."
 #
 # (in Arabic)
-# 
 # http://www.moheet.com/show_news.aspx?nid=358861&pg=1
-# 
 # http://www.almadenahnews.com/newss/news.php?c=118&id=38036
-# or
-# 
 # http://www.worldtimezone.com/dst_news/dst_news_tunis02.html
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S

Modified: stable/10/contrib/tzdata/antarctica
==============================================================================
--- stable/10/contrib/tzdata/antarctica	Fri Aug 29 13:37:01 2014	(r270816)
+++ stable/10/contrib/tzdata/antarctica	Fri Aug 29 13:41:21 2014	(r270817)
@@ -1,16 +1,13 @@
-# 
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
 # From Paul Eggert (1999-11-15):
 # To keep things manageable, we list only locations occupied year-round; see
-# 
 # COMNAP - Stations and Bases
-# 
+# 
 # and
-# 
 # Summary of the Peri-Antarctic Islands (1998-07-23)
-# 
+# 
 # for information.
 # Unless otherwise specified, we have no time zone information.
 #
@@ -55,19 +52,19 @@ Rule	ChileAQ	2012	max	-	Sep	Sun>=2	4:00u
 
 # Argentina - year-round bases
 # Belgrano II, Confin Coast, -770227-0343737, since 1972-02-05
-# Esperanza, San Martin Land, -6323-05659, since 1952-12-17
-# Jubany, Potter Peninsula, King George Island, -6414-0602320, since 1982-01
-# Marambio, Seymour I, -6414-05637, since 1969-10-29
+# Carlini, Potter Cove, King George Island, -6414-0602320, since 1982-01
+# Esperanza, Hope Bay, -6323-05659, since 1952-12-17
+# Marambio, -6414-05637, since 1969-10-29
 # Orcadas, Laurie I, -6016-04444, since 1904-02-22
-# San Martin, Debenham I, -6807-06708, since 1951-03-21
+# San Mart?n, Barry I, -6808-06706, since 1951-03-21
 #	(except 1960-03 / 1976-03-21)
 
 # Australia - territories
 # Heard Island, McDonald Islands (uninhabited)
 #	previously sealers and scientific personnel wintered
-#	
 #	Margaret Turner reports
-#	 (1999-09-30) that they're UTC+5, with no DST;
+#	
+#	(1999-09-30) that they're UTC+5, with no DST;
 #	presumably this is when they have visitors.
 #
 # year-round bases
@@ -84,14 +81,10 @@ Rule	ChileAQ	2012	max	-	Sep	Sun>=2	4:00u
 # The changes occurred on 2009-10-18 at 02:00 (local times).
 #
 # Government source: (Australian Antarctic Division)
-# 
 # http://www.aad.gov.au/default.asp?casid=37079
-# 
 #
 # We have more background information here:
-# 
 # http://www.timeanddate.com/news/time/antarctica-new-times.html
-# 
 
 # From Steffen Thorsen (2010-03-10):
 # We got these changes from the Australian Antarctic Division: ...
@@ -106,19 +99,17 @@ Rule	ChileAQ	2012	max	-	Sep	Sun>=2	4:00u
 # - Mawson station stays on UTC+5.
 #
 # Background:
-# 
 # http://www.timeanddate.com/news/time/antartica-time-changes-2010.html
-# 
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Antarctica/Casey	0	-	zzz	1969
-			8:00	-	WST	2009 Oct 18 2:00
-						# Western (Aus) Standard Time
+			8:00	-	AWST	2009 Oct 18 2:00
+						# Australian Western Std Time
 			11:00	-	CAST	2010 Mar 5 2:00
 						# Casey Time
-			8:00	-	WST	2011 Oct 28 2:00
+			8:00	-	AWST	2011 Oct 28 2:00
 			11:00	-	CAST	2012 Feb 21 17:00u
-			8:00	-	WST
+			8:00	-	AWST
 Zone Antarctica/Davis	0	-	zzz	1957 Jan 13
 			7:00	-	DAVT	1964 Nov # Davis Time
 			0	-	zzz	1969 Feb
@@ -132,24 +123,27 @@ Zone Antarctica/Mawson	0	-	zzz	1954 Feb 
 						# Mawson Time
 			5:00	-	MAWT
 # References:
-# 
 # Casey Weather (1998-02-26)
-# 
-# 
+# 
 # Davis Station, Antarctica (1998-02-26)
-# 
-# 
+# 
 # Mawson Station, Antarctica (1998-02-25)
-# 
+# 
+
+# Belgium - year-round base
+# Princess Elisabeth, Queen Maud Land, -713412+0231200, since 2007
 
 # Brazil - year-round base
-# Comandante Ferraz, King George Island, -6205+05824, since 1983/4
+# Ferraz, King George Island, -6205+05824, since 1983/4
+
+# Bulgaria - year-round base
+# St. Kliment Ohridski, Livingston Island, -623829-0602153, since 1988
 
 # Chile - year-round bases and towns
 # Escudero, South Shetland Is, -621157-0585735, since 1994
-# Presidente Eduadro Frei, King George Island, -6214-05848, since 1969-03-07
-# General Bernardo O'Higgins, Antarctic Peninsula, -6319-05704, since 1948-02
-# Capitan Arturo Prat, -6230-05941
+# Frei Montalva, King George Island, -6214-05848, since 1969-03-07
+# O'Higgins, Antarctic Peninsula, -6319-05704, since 1948-02
+# Prat, -6230-05941
 # Villa Las Estrellas (a town), around the Frei base, since 1984-04-09
 # These locations have always used Santiago time; use TZ='America/Santiago'.
 
@@ -157,31 +151,35 @@ Zone Antarctica/Mawson	0	-	zzz	1954 Feb 
 # Great Wall, King George Island, -6213-05858, since 1985-02-20
 # Zhongshan, Larsemann Hills, Prydz Bay, -6922+07623, since 1989-02-26
 
-# France - year-round bases
+# France - year-round bases (also see "France & Italy")
 #
 # From Antoine Leca (1997-01-20):
 # Time data are from Nicole Pailleau at the IFRTP
 # (French Institute for Polar Research and Technology).
-# She confirms that French Southern Territories and Terre Adelie bases
-# don't observe daylight saving time, even if Terre Adelie supplies came
+# She confirms that French Southern Territories and Terre Ad?lie bases
+# don't observe daylight saving time, even if Terre Ad?lie supplies came
 # from Tasmania.
 #
 # French Southern Territories with year-round inhabitants
 #
-# Martin-de-Vivies Base, Amsterdam Island, -374105+0773155, since 1950
-# Alfred-Faure Base, Crozet Islands, -462551+0515152, since 1964
-# Port-aux-Francais, Kerguelen Islands, -492110+0701303, since 1951;
+# Alfred Faure, Possession Island, Crozet Islands, -462551+0515152, since 1964;
+#	sealing & whaling stations operated variously 1802/1911+;
+#	see Indian/Reunion.
+#
+# Martin-de-Vivi?s, Amsterdam Island, -374105+0773155, since 1950
+# Port-aux-Fran?ais, Kerguelen Islands, -492110+0701303, since 1951;
 #	whaling & sealing station operated 1908/1914, 1920/1929, and 1951/1956
 #
 # St Paul Island - near Amsterdam, uninhabited
 #	fishing stations operated variously 1819/1931
 #
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone Indian/Kerguelen	0	-	zzz	1950	# Port-aux-Francais
+Zone Indian/Kerguelen	0	-	zzz	1950	# Port-aux-Fran?ais
 			5:00	-	TFT	# ISO code TF Time
 #
 # year-round base in the main continent
-# Dumont-d'Urville, Ile des Petrels, -6640+14001, since 1956-11
+# Dumont d'Urville, ?le des P?trels, -6640+14001, since 1956-11
+#  (2005-12-05)
 #
 # Another base at Port-Martin, 50km east, began operation in 1947.
 # It was destroyed by fire on 1952-01-14.
@@ -191,20 +189,22 @@ Zone Antarctica/DumontDUrville 0 -	zzz	1
 			10:00	-	PMT	1952 Jan 14 # Port-Martin Time
 			0	-	zzz	1956 Nov
 			10:00	-	DDUT	# Dumont-d'Urville Time
-# Reference:
-# 
-# Dumont d'Urville Station (2005-12-05)
-# 
+
+# France & Italy - year-round base
+# Concordia, -750600+1232000, since 2005
 
 # Germany - year-round base
-# Georg von Neumayer, -7039-00815
+# Neumayer III, -704080-0081602, since 2009
 
-# India - year-round base
-# Dakshin Gangotri, -7005+01200
+# India - year-round bases
+# Bharati, -692428+0761114, since 2012
+# Maitri, -704558+0114356, since 1989
+
+# Italy - year-round base (also see "France & Italy")
+# Zuchelli, Terra Nova Bay, -744140+1640647, since 1986
 
 # Japan - year-round bases
-# Dome Fuji, -7719+03942
-# Syowa, -690022+0393524
+# Syowa (also known as Showa), -690022+0393524, since 1957
 #
 # From Hideyuki Suzuki (1999-02-06):
 # In all Japanese stations, +0300 is used as the standard time.
@@ -216,11 +216,11 @@ Zone Antarctica/DumontDUrville 0 -	zzz	1
 Zone Antarctica/Syowa	0	-	zzz	1957 Jan 29
 			3:00	-	SYOT	# Syowa Time
 # See:
-# 
 # NIPR Antarctic Research Activities (1999-08-17)
-# 
+# 
 
 # S Korea - year-round base
+# Jang Bogo, Terra Nova Bay, -743700+1641205 since 2014
 # King Sejong, King George Island, -6213-05847, since 1988
 
 # New Zealand - claims
@@ -269,6 +269,9 @@ Zone Antarctica/Troll	0	-	zzz	2005 Feb 1
 # Poland - year-round base
 # Arctowski, King George Island, -620945-0582745, since 1977
 
+# Romania - year-bound base
+# Law-Racovi??, Larsemann Hills, -692319+0762251, since 1986
+
 # Russia - year-round bases
 # Bellingshausen, King George Island, -621159-0585337, since 1968-02-22
 # Mirny, Davis coast, -6633+09301, since 1956-02
@@ -278,8 +281,8 @@ Zone Antarctica/Troll	0	-	zzz	2005 Feb 1
 #	year-round from 1960/61 to 1992
 
 # Vostok, since 1957-12-16, temporarily closed 1994-02/1994-11
-# 
-# From Craig Mundell (1994-12-15):
+# From Craig Mundell (1994-12-15)
+# :
 # Vostok, which is one of the Russian stations, is set on the same
 # time as Moscow, Russia.
 #
@@ -294,7 +297,7 @@ Zone Antarctica/Troll	0	-	zzz	2005 Feb 1
 #
 # From Paul Eggert (2001-05-04):
 # This seems to be hopelessly confusing, so I asked Lee Hotz about it
-# in person.  He said that some Antartic locations set their local
+# in person.  He said that some Antarctic locations set their local
 # time so that noon is the warmest part of the day, and that this
 # changes during the year and does not necessarily correspond to mean
 # solar noon.  So the Vostok time might have been whatever the clocks
@@ -306,9 +309,12 @@ Zone Antarctica/Vostok	0	-	zzz	1957 Dec 
 
 # S Africa - year-round bases
 # Marion Island, -4653+03752
-# Sanae, -7141-00250
+# SANAE IV, Vesleskarvet, Queen Maud Land, -714022-0025026, since 1997
+
+# Ukraine - year-round base
+# Vernadsky (formerly Faraday), Galindez Island, -651445-0641526, since 1954
 
-# UK
+# United Kingdom
 #
 # British Antarctic Territories (BAT) claims
 # South Orkney Islands
@@ -364,7 +370,7 @@ Zone Antarctica/Palmer	0	-	zzz	1965
 # but that he found it more convenient to keep GMT+12
 # as supplies for the station were coming from McMurdo Sound,
 # which was on GMT+12 because New Zealand was on GMT+12 all year
-# at that time (1957).  (Source: Siple's book 90 degrees SOUTH.)
+# at that time (1957).  (Source: Siple's book 90 Degrees South.)
 #
 # From Susan Smith
 # http://www.cybertours.com/whs/pole10.html

Modified: stable/10/contrib/tzdata/asia
==============================================================================
--- stable/10/contrib/tzdata/asia	Fri Aug 29 13:37:01 2014	(r270816)
+++ stable/10/contrib/tzdata/asia	Fri Aug 29 13:41:21 2014	(r270817)
@@ -1,4 +1,3 @@
-# 
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -32,7 +31,7 @@
 # A reliable and entertaining source about time zones is
 # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997).
 #
-# I invented the abbreviations marked `*' in the following table;
+# I invented the abbreviations marked '*' in the following table;
 # the rest are from earlier versions of this file, or from other sources.
 # Corrections are welcome!
 #	     std  dst
@@ -47,13 +46,14 @@
 #	7:00 WIB	west Indonesia (Waktu Indonesia Barat)

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From pluknet at FreeBSD.org  Fri Aug 29 13:46:31 2014
From: pluknet at FreeBSD.org (Sergey Kandaurov)
Date: Fri, 29 Aug 2014 13:46:31 +0000 (UTC)
Subject: svn commit: r270818 - stable/10/release/doc/en_US.ISO8859-1/relnotes
Message-ID: <201408291346.s7TDkVri063606@svn.freebsd.org>

Author: pluknet
Date: Fri Aug 29 13:46:30 2014
New Revision: 270818
URL: http://svnweb.freebsd.org/changeset/base/270818

Log:
  Document r270817, tzdata2014f.

Modified:
  stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml

Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml
==============================================================================
--- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml	Fri Aug 29 13:41:21 2014	(r270817)
+++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml	Fri Aug 29 13:46:30 2014	(r270818)
@@ -1168,7 +1168,7 @@
 	has been updated to 8.14.9.
 
       The timezone database has been updated
-	to version tzdata2014e.
+	to version tzdata2014f.
 
       The &man.file.1; utility and
 	&man.libmagic.3; library have been updated to 5.19.

From gjb at FreeBSD.org  Fri Aug 29 13:56:11 2014
From: gjb at FreeBSD.org (Glen Barber)
Date: Fri, 29 Aug 2014 13:56:11 +0000 (UTC)
Subject: svn commit: r270819 - stable/10/release/doc/en_US.ISO8859-1/relnotes
Message-ID: <201408291356.s7TDuBFG068163@svn.freebsd.org>

Author: gjb
Date: Fri Aug 29 13:56:10 2014
New Revision: 270819
URL: http://svnweb.freebsd.org/changeset/base/270819

Log:
  Bump revision ID after r270817
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml

Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml
==============================================================================
--- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml	Fri Aug 29 13:46:30 2014	(r270818)
+++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml	Fri Aug 29 13:56:10 2014	(r270819)
@@ -1167,9 +1167,6 @@
       Sendmail
 	has been updated to 8.14.9.
 
-      The timezone database has been updated
-	to version tzdata2014f.
-
       The &man.file.1; utility and
 	&man.libmagic.3; library have been updated to 5.19.
 
@@ -1223,6 +1220,9 @@
       The lukemftpd
 	FTP server has been removed from the
 	&os; base system.
+
+      The timezone database has been updated
+	to version tzdata2014f.
     
 
     

From ngie at FreeBSD.org  Fri Aug 29 18:26:56 2014
From: ngie at FreeBSD.org (Garrett Cooper)
Date: Fri, 29 Aug 2014 18:26:56 +0000 (UTC)
Subject: svn commit: r270824 - in stable/10: . sbin/atm/atmconfig
Message-ID: <201408291826.s7TIQu7W099436@svn.freebsd.org>

Author: ngie
Date: Fri Aug 29 18:26:55 2014
New Revision: 270824
URL: http://svnweb.freebsd.org/changeset/base/270824

Log:
  MFC r270027:
  
  tmconfig 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

Modified:
  stable/10/Makefile.inc1
  stable/10/sbin/atm/atmconfig/Makefile
  stable/10/sbin/atm/atmconfig/main.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/Makefile.inc1
==============================================================================
--- stable/10/Makefile.inc1	Fri Aug 29 18:18:29 2014	(r270823)
+++ stable/10/Makefile.inc1	Fri Aug 29 18:26:55 2014	(r270824)
@@ -1257,7 +1257,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: stable/10/sbin/atm/atmconfig/Makefile
==============================================================================
--- stable/10/sbin/atm/atmconfig/Makefile	Fri Aug 29 18:18:29 2014	(r270823)
+++ stable/10/sbin/atm/atmconfig/Makefile	Fri Aug 29 18:26:55 2014	(r270824)
@@ -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: stable/10/sbin/atm/atmconfig/main.c
==============================================================================
--- stable/10/sbin/atm/atmconfig/main.c	Fri Aug 29 18:18:29 2014	(r270823)
+++ stable/10/sbin/atm/atmconfig/main.c	Fri Aug 29 18:26:55 2014	(r270824)
@@ -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 alc at FreeBSD.org  Sat Aug 30 03:41:48 2014
From: alc at FreeBSD.org (Alan Cox)
Date: Sat, 30 Aug 2014 03:41:47 +0000 (UTC)
Subject: svn commit: r270835 - stable/10/sys/ia64/ia64
Message-ID: <201408300341.s7U3flrI065279@svn.freebsd.org>

Author: alc
Date: Sat Aug 30 03:41:47 2014
New Revision: 270835
URL: http://svnweb.freebsd.org/changeset/base/270835

Log:
  Update an assertion to reflect the changes made in r270439.  This is a
  direct commit to stable/10 because ia64 is no longer supported by HEAD.
  
  Reported by:	marcel
  Sponsored by:	EMC / Isilon Storage Division

Modified:
  stable/10/sys/ia64/ia64/pmap.c

Modified: stable/10/sys/ia64/ia64/pmap.c
==============================================================================
--- stable/10/sys/ia64/ia64/pmap.c	Sat Aug 30 03:10:55 2014	(r270834)
+++ stable/10/sys/ia64/ia64/pmap.c	Sat Aug 30 03:41:47 2014	(r270835)
@@ -1713,8 +1713,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, 
 
 	va &= ~PAGE_MASK;
  	KASSERT(va <= VM_MAX_KERNEL_ADDRESS, ("pmap_enter: toobig"));
-	KASSERT((m->oflags & VPO_UNMANAGED) != 0 || vm_page_xbusied(m),
-	    ("pmap_enter: page %p is not busy", m));
+	if ((m->oflags & VPO_UNMANAGED) == 0 && !vm_page_xbusied(m))
+		VM_OBJECT_ASSERT_LOCKED(m->object);
 
 	/*
 	 * Find (or create) a pte for the given mapping.

From ume at FreeBSD.org  Sat Aug 30 09:55:39 2014
From: ume at FreeBSD.org (Hajimu UMEMOTO)
Date: Sat, 30 Aug 2014 09:55:39 +0000 (UTC)
Subject: svn commit: r270837 - in stable/10/lib/libc: . md
Message-ID: <201408300955.s7U9tdmC035655@svn.freebsd.org>

Author: ume
Date: Sat Aug 30 09:55:38 2014
New Revision: 270837
URL: http://svnweb.freebsd.org/changeset/base/270837

Log:
  MFC r269865:
  Bring the md5 functions into libc for internal use only.
  It is required to support ID randomization for our stub
  resolver.

Added:
  stable/10/lib/libc/md/
     - copied from r269865, head/lib/libc/md/
Modified:
  stable/10/lib/libc/Makefile
  stable/10/lib/libc/md/Makefile.inc
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/Makefile
==============================================================================
--- stable/10/lib/libc/Makefile	Sat Aug 30 07:08:10 2014	(r270836)
+++ stable/10/lib/libc/Makefile	Sat Aug 30 09:55:38 2014	(r270837)
@@ -74,6 +74,7 @@ NOASM=
 .include "${.CURDIR}/inet/Makefile.inc"
 .include "${.CURDIR}/isc/Makefile.inc"
 .include "${.CURDIR}/locale/Makefile.inc"
+.include "${.CURDIR}/md/Makefile.inc"
 .include "${.CURDIR}/nameser/Makefile.inc"
 .include "${.CURDIR}/net/Makefile.inc"
 .include "${.CURDIR}/nls/Makefile.inc"

Modified: stable/10/lib/libc/md/Makefile.inc
==============================================================================
--- head/lib/libc/md/Makefile.inc	Tue Aug 12 12:25:56 2014	(r269865)
+++ stable/10/lib/libc/md/Makefile.inc	Sat Aug 30 09:55:38 2014	(r270837)
@@ -1,5 +1,5 @@
 # $FreeBSD$
 
-.PATH: ${LIBC_SRCTOP}/../libmd
+.PATH: ${.CURDIR}/../libmd
 
 SRCS+=	md5c.c

From ume at FreeBSD.org  Sat Aug 30 10:16:30 2014
From: ume at FreeBSD.org (Hajimu UMEMOTO)
Date: Sat, 30 Aug 2014 10:16:25 +0000 (UTC)
Subject: svn commit: r270838 - in stable/10: include include/arpa
 lib/libc/include lib/libc/include/isc lib/libc/inet lib/libc/isc
 lib/libc/nameser lib/libc/resolv
Message-ID: <201408301016.s7UAGPLb045366@svn.freebsd.org>

Author: ume
Date: Sat Aug 30 10:16:25 2014
New Revision: 270838
URL: http://svnweb.freebsd.org/changeset/base/270838

Log:
  MFC r269867:
  Update our stub resolver to final version of libbind
  (libbind-6.0).
  
  Obtained from:  ISC

Modified:
  stable/10/include/arpa/inet.h
  stable/10/include/arpa/nameser.h
  stable/10/include/arpa/nameser_compat.h
  stable/10/include/res_update.h
  stable/10/include/resolv.h
  stable/10/lib/libc/include/isc/eventlib.h
  stable/10/lib/libc/include/isc/list.h
  stable/10/lib/libc/include/port_before.h
  stable/10/lib/libc/inet/inet_addr.c
  stable/10/lib/libc/inet/inet_cidr_ntop.c
  stable/10/lib/libc/inet/inet_cidr_pton.c
  stable/10/lib/libc/inet/inet_net_ntop.c
  stable/10/lib/libc/inet/inet_net_pton.c
  stable/10/lib/libc/inet/inet_neta.c
  stable/10/lib/libc/inet/inet_ntoa.c
  stable/10/lib/libc/inet/inet_ntop.c
  stable/10/lib/libc/inet/inet_pton.c
  stable/10/lib/libc/inet/nsap_addr.c
  stable/10/lib/libc/isc/ev_streams.c
  stable/10/lib/libc/isc/ev_timers.c
  stable/10/lib/libc/isc/eventlib_p.h
  stable/10/lib/libc/nameser/Symbol.map
  stable/10/lib/libc/nameser/ns_name.c
  stable/10/lib/libc/nameser/ns_netint.c
  stable/10/lib/libc/nameser/ns_parse.c
  stable/10/lib/libc/nameser/ns_print.c
  stable/10/lib/libc/nameser/ns_samedomain.c
  stable/10/lib/libc/nameser/ns_ttl.c
  stable/10/lib/libc/resolv/Makefile.inc
  stable/10/lib/libc/resolv/Symbol.map
  stable/10/lib/libc/resolv/herror.c
  stable/10/lib/libc/resolv/res_comp.c
  stable/10/lib/libc/resolv/res_data.c
  stable/10/lib/libc/resolv/res_debug.c
  stable/10/lib/libc/resolv/res_findzonecut.c
  stable/10/lib/libc/resolv/res_init.c
  stable/10/lib/libc/resolv/res_mkquery.c
  stable/10/lib/libc/resolv/res_mkupdate.c
  stable/10/lib/libc/resolv/res_query.c
  stable/10/lib/libc/resolv/res_send.c
  stable/10/lib/libc/resolv/res_update.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/include/arpa/inet.h
==============================================================================
--- stable/10/include/arpa/inet.h	Sat Aug 30 09:55:38 2014	(r270837)
+++ stable/10/include/arpa/inet.h	Sat Aug 30 10:16:25 2014	(r270838)
@@ -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: stable/10/include/arpa/nameser.h
==============================================================================
--- stable/10/include/arpa/nameser.h	Sat Aug 30 09:55:38 2014	(r270837)
+++ stable/10/include/arpa/nameser.h	Sat Aug 30 10:16:25 2014	(r270838)
@@ -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: stable/10/include/arpa/nameser_compat.h
==============================================================================
--- stable/10/include/arpa/nameser_compat.h	Sat Aug 30 09:55:38 2014	(r270837)
+++ stable/10/include/arpa/nameser_compat.h	Sat Aug 30 10:16:25 2014	(r270838)
@@ -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: stable/10/include/res_update.h
==============================================================================
--- stable/10/include/res_update.h	Sat Aug 30 09:55:38 2014	(r270837)
+++ stable/10/include/res_update.h	Sat Aug 30 10:16:25 2014	(r270838)
@@ -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: stable/10/include/resolv.h
==============================================================================
--- stable/10/include/resolv.h	Sat Aug 30 09:55:38 2014	(r270837)
+++ stable/10/include/resolv.h	Sat Aug 30 10:16:25 2014	(r270838)
@@ -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: stable/10/lib/libc/include/isc/eventlib.h
==============================================================================
--- stable/10/lib/libc/include/isc/eventlib.h	Sat Aug 30 09:55:38 2014	(r270837)
+++ stable/10/lib/libc/include/isc/eventlib.h	Sat Aug 30 10:16:25 2014	(r270838)
@@ -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: stable/10/lib/libc/include/isc/list.h
==============================================================================
--- stable/10/lib/libc/include/isc/list.h	Sat Aug 30 09:55:38 2014	(r270837)
+++ stable/10/lib/libc/include/isc/list.h	Sat Aug 30 10:16:25 2014	(r270838)
@@ -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: stable/10/lib/libc/include/port_before.h
==============================================================================
--- stable/10/lib/libc/include/port_before.h	Sat Aug 30 09:55:38 2014	(r270837)
+++ stable/10/lib/libc/include/port_before.h	Sat Aug 30 10:16:25 2014	(r270838)
@@ -6,6 +6,7 @@
 #define _LIBC		1
 #define DO_PTHREADS	1
 #define USE_KQUEUE	1
+#define HAVE_MD5	1
 
 #define ISC_SOCKLEN_T	socklen_t
 #define ISC_FORMAT_PRINTF(fmt, args) \

Modified: stable/10/lib/libc/inet/inet_addr.c
==============================================================================
--- stable/10/lib/libc/inet/inet_addr.c	Sat Aug 30 09:55:38 2014	(r270837)
+++ stable/10/lib/libc/inet/inet_addr.c	Sat Aug 30 10:16:25 2014	(r270838)
@@ -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: stable/10/lib/libc/inet/inet_cidr_ntop.c
==============================================================================
--- stable/10/lib/libc/inet/inet_cidr_ntop.c	Sat Aug 30 09:55:38 2014	(r270837)
+++ stable/10/lib/libc/inet/inet_cidr_ntop.c	Sat Aug 30 10:16:25 2014	(r270838)
@@ -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: stable/10/lib/libc/inet/inet_cidr_pton.c
==============================================================================
--- stable/10/lib/libc/inet/inet_cidr_pton.c	Sat Aug 30 09:55:38 2014	(r270837)
+++ stable/10/lib/libc/inet/inet_cidr_pton.c	Sat Aug 30 10:16:25 2014	(r270838)
@@ -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: stable/10/lib/libc/inet/inet_net_ntop.c
==============================================================================
--- stable/10/lib/libc/inet/inet_net_ntop.c	Sat Aug 30 09:55:38 2014	(r270837)
+++ stable/10/lib/libc/inet/inet_net_ntop.c	Sat Aug 30 10:16:25 2014	(r270838)
@@ -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: stable/10/lib/libc/inet/inet_net_pton.c
==============================================================================
--- stable/10/lib/libc/inet/inet_net_pton.c	Sat Aug 30 09:55:38 2014	(r270837)
+++ stable/10/lib/libc/inet/inet_net_pton.c	Sat Aug 30 10:16:25 2014	(r270838)
@@ -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: stable/10/lib/libc/inet/inet_neta.c
==============================================================================
--- stable/10/lib/libc/inet/inet_neta.c	Sat Aug 30 09:55:38 2014	(r270837)
+++ stable/10/lib/libc/inet/inet_neta.c	Sat Aug 30 10:16:25 2014	(r270838)
@@ -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: stable/10/lib/libc/inet/inet_ntoa.c
==============================================================================
--- stable/10/lib/libc/inet/inet_ntoa.c	Sat Aug 30 09:55:38 2014	(r270837)
+++ stable/10/lib/libc/inet/inet_ntoa.c	Sat Aug 30 10:16:25 2014	(r270838)
@@ -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: stable/10/lib/libc/inet/inet_ntop.c
==============================================================================
--- stable/10/lib/libc/inet/inet_ntop.c	Sat Aug 30 09:55:38 2014	(r270837)
+++ stable/10/lib/libc/inet/inet_ntop.c	Sat Aug 30 10:16:25 2014	(r270838)
@@ -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: stable/10/lib/libc/inet/inet_pton.c
==============================================================================
--- stable/10/lib/libc/inet/inet_pton.c	Sat Aug 30 09:55:38 2014	(r270837)
+++ stable/10/lib/libc/inet/inet_pton.c	Sat Aug 30 10:16:25 2014	(r270838)
@@ -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: stable/10/lib/libc/inet/nsap_addr.c
==============================================================================
--- stable/10/lib/libc/inet/nsap_addr.c	Sat Aug 30 09:55:38 2014	(r270837)
+++ stable/10/lib/libc/inet/nsap_addr.c	Sat Aug 30 10:16:25 2014	(r270838)
@@ -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: stable/10/lib/libc/isc/ev_streams.c
==============================================================================
--- stable/10/lib/libc/isc/ev_streams.c	Sat Aug 30 09:55:38 2014	(r270837)
+++ stable/10/lib/libc/isc/ev_streams.c	Sat Aug 30 10:16:25 2014	(r270838)
@@ -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: stable/10/lib/libc/isc/ev_timers.c
==============================================================================
--- stable/10/lib/libc/isc/ev_timers.c	Sat Aug 30 09:55:38 2014	(r270837)
+++ stable/10/lib/libc/isc/ev_timers.c	Sat Aug 30 10:16:25 2014	(r270838)
@@ -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: stable/10/lib/libc/isc/eventlib_p.h
==============================================================================
--- stable/10/lib/libc/isc/eventlib_p.h	Sat Aug 30 09:55:38 2014	(r270837)
+++ stable/10/lib/libc/isc/eventlib_p.h	Sat Aug 30 10:16:25 2014	(r270838)
@@ -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: stable/10/lib/libc/nameser/Symbol.map
==============================================================================
--- stable/10/lib/libc/nameser/Symbol.map	Sat Aug 30 09:55:38 2014	(r270837)
+++ stable/10/lib/libc/nameser/Symbol.map	Sat Aug 30 10:16:25 2014	(r270838)
@@ -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: stable/10/lib/libc/nameser/ns_name.c
==============================================================================
--- stable/10/lib/libc/nameser/ns_name.c	Sat Aug 30 09:55:38 2014	(r270837)
+++ stable/10/lib/libc/nameser/ns_name.c	Sat Aug 30 10:16:25 2014	(r270838)
@@ -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 ume at FreeBSD.org  Sat Aug 30 10:25:42 2014
From: ume at FreeBSD.org (Hajimu UMEMOTO)
Date: Sat, 30 Aug 2014 10:25:41 +0000 (UTC)
Subject: svn commit: r270839 - stable/10/lib/libc/nameser
Message-ID: <201408301025.s7UAPfvX050023@svn.freebsd.org>

Author: ume
Date: Sat Aug 30 10:25:41 2014
New Revision: 270839
URL: http://svnweb.freebsd.org/changeset/base/270839

Log:
  MFC r269873:
  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:
  stable/10/lib/libc/nameser/ns_name.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/nameser/ns_name.c
==============================================================================
--- stable/10/lib/libc/nameser/ns_name.c	Sat Aug 30 10:16:25 2014	(r270838)
+++ stable/10/lib/libc/nameser/ns_name.c	Sat Aug 30 10:25:41 2014	(r270839)
@@ -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 ume at FreeBSD.org  Sat Aug 30 10:29:47 2014
From: ume at FreeBSD.org (Hajimu UMEMOTO)
Date: Sat, 30 Aug 2014 10:29:47 +0000 (UTC)
Subject: svn commit: r270840 - stable/10/lib/libc/nameser
Message-ID: <201408301029.s7UATlKB050560@svn.freebsd.org>

Author: ume
Date: Sat Aug 30 10:29:47 2014
New Revision: 270840
URL: http://svnweb.freebsd.org/changeset/base/270840

Log:
  MFC r270215: Add missing break.

Modified:
  stable/10/lib/libc/nameser/ns_print.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/nameser/ns_print.c
==============================================================================
--- stable/10/lib/libc/nameser/ns_print.c	Sat Aug 30 10:25:41 2014	(r270839)
+++ stable/10/lib/libc/nameser/ns_print.c	Sat Aug 30 10:29:47 2014	(r270840)
@@ -911,6 +911,7 @@ ns_sprintrrf(const u_char *msg, size_t m
 			if (len > 15)
 				T(addstr(" )", 2, &buf, &buflen));
 		}
+		break;
 	}
 
 	case ns_t_ipseckey: {

From rmacklem at FreeBSD.org  Sat Aug 30 13:28:11 2014
From: rmacklem at FreeBSD.org (Rick Macklem)
Date: Sat, 30 Aug 2014 13:28:11 +0000 (UTC)
Subject: svn commit: r270841 - stable/9/sys/fs/nfsserver
Message-ID: <201408301328.s7UDSB1b033664@svn.freebsd.org>

Author: rmacklem
Date: Sat Aug 30 13:28:10 2014
New Revision: 270841
URL: http://svnweb.freebsd.org/changeset/base/270841

Log:
  MFC: r269771
  Change the NFS server's printf related to hitting
  the DRC cache's flood level so that it suggests
  increasing vfs.nfsd.tcphighwater.

Modified:
  stable/9/sys/fs/nfsserver/nfs_nfsdsocket.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/fs/   (props changed)

Modified: stable/9/sys/fs/nfsserver/nfs_nfsdsocket.c
==============================================================================
--- stable/9/sys/fs/nfsserver/nfs_nfsdsocket.c	Sat Aug 30 10:29:47 2014	(r270840)
+++ stable/9/sys/fs/nfsserver/nfs_nfsdsocket.c	Sat Aug 30 13:28:10 2014	(r270841)
@@ -675,10 +675,9 @@ nfsrvd_compound(struct nfsrv_descript *n
 		if (i == 0 && 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 kevlo at FreeBSD.org  Sat Aug 30 14:24:21 2014
From: kevlo at FreeBSD.org (Kevin Lo)
Date: Sat, 30 Aug 2014 14:24:20 +0000 (UTC)
Subject: svn commit: r270843 - stable/10/sys/dev/usb/wlan
Message-ID: <201408301424.s7UEOKB8061027@svn.freebsd.org>

Author: kevlo
Date: Sat Aug 30 14:24:20 2014
New Revision: 270843
URL: http://svnweb.freebsd.org/changeset/base/270843

Log:
  MFC r270643:
  Fix typo: s/mac_rev/mac_ver/
  
  Submitted by:	Stefan Sperling 

Modified:
  stable/10/sys/dev/usb/wlan/if_run.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/usb/wlan/if_run.c
==============================================================================
--- stable/10/sys/dev/usb/wlan/if_run.c	Sat Aug 30 13:47:05 2014	(r270842)
+++ stable/10/sys/dev/usb/wlan/if_run.c	Sat Aug 30 14:24:20 2014	(r270843)
@@ -5488,7 +5488,7 @@ run_rt3070_rf_init(struct run_softc *sc)
 		run_rt3070_rf_write(sc, 17, rf);
 	}
 
-	if (sc->mac_rev == 0x3071) {
+	if (sc->mac_ver == 0x3071) {
 		run_rt3070_rf_read(sc, 1, &rf);
 		rf &= ~(RT3070_RX0_PD | RT3070_TX0_PD);
 		rf |= RT3070_RF_BLOCK | RT3070_RX1_PD | RT3070_TX1_PD;

From ume at FreeBSD.org  Sat Aug 30 17:32:31 2014
From: ume at FreeBSD.org (Hajimu UMEMOTO)
Date: Sat, 30 Aug 2014 17:32:30 +0000 (UTC)
Subject: svn commit: r270848 - in stable/9/lib/libc: . md
Message-ID: <201408301732.s7UHWU6b053612@svn.freebsd.org>

Author: ume
Date: Sat Aug 30 17:32:30 2014
New Revision: 270848
URL: http://svnweb.freebsd.org/changeset/base/270848

Log:
  MFC r269865:
  Bring the md5 functions into libc for internal use only.
  It is required to support ID randomization for our stub
  resolver.

Added:
  stable/9/lib/libc/md/
     - copied from r270837, stable/10/lib/libc/md/
Modified:
  stable/9/lib/libc/Makefile
Directory Properties:
  stable/9/lib/libc/   (props changed)

Modified: stable/9/lib/libc/Makefile
==============================================================================
--- stable/9/lib/libc/Makefile	Sat Aug 30 17:31:53 2014	(r270847)
+++ stable/9/lib/libc/Makefile	Sat Aug 30 17:32:30 2014	(r270848)
@@ -63,6 +63,7 @@ NOASM=
 .include "${.CURDIR}/inet/Makefile.inc"
 .include "${.CURDIR}/isc/Makefile.inc"
 .include "${.CURDIR}/locale/Makefile.inc"
+.include "${.CURDIR}/md/Makefile.inc"
 .include "${.CURDIR}/nameser/Makefile.inc"
 .include "${.CURDIR}/net/Makefile.inc"
 .include "${.CURDIR}/nls/Makefile.inc"

From ume at FreeBSD.org  Sat Aug 30 17:39:29 2014
From: ume at FreeBSD.org (Hajimu UMEMOTO)
Date: Sat, 30 Aug 2014 17:39:29 +0000 (UTC)
Subject: svn commit: r270849 - stable/9/lib/libc
Message-ID: <201408301739.s7UHdTHM054593@svn.freebsd.org>

Author: ume
Date: Sat Aug 30 17:39:28 2014
New Revision: 270849
URL: http://svnweb.freebsd.org/changeset/base/270849

Log:
  MFC r264070 (partially), r264082:
  Add 11.x symbol version namespace for stub resolver update.

Modified:
  stable/9/lib/libc/Versions.def
Directory Properties:
  stable/9/lib/libc/   (props changed)

Modified: stable/9/lib/libc/Versions.def
==============================================================================
--- stable/9/lib/libc/Versions.def	Sat Aug 30 17:32:30 2014	(r270848)
+++ stable/9/lib/libc/Versions.def	Sat Aug 30 17:39:28 2014	(r270849)
@@ -23,6 +23,10 @@ FBSD_1.2 {
 FBSD_1.3 {
 } FBSD_1.2;
 
+# This version was first added to 11.0-current.
+FBSD_1.4 {
+} FBSD_1.3;
+
 # This is our private namespace.  Any global interfaces that are
 # strictly for use only by other FreeBSD applications and libraries
 # are listed here.  We use a separate namespace so we can write
@@ -30,4 +34,4 @@ FBSD_1.3 {
 #
 # Please do NOT increment the version of this namespace.
 FBSDprivate_1.0 {
-} FBSD_1.3;
+} FBSD_1.4;

From ume at FreeBSD.org  Sat Aug 30 17:57:03 2014
From: ume at FreeBSD.org (Hajimu UMEMOTO)
Date: Sat, 30 Aug 2014 17:56:58 +0000 (UTC)
Subject: svn commit: r270851 - in stable/9: include include/arpa
 lib/libc/include lib/libc/include/isc lib/libc/inet lib/libc/isc
 lib/libc/nameser lib/libc/resolv
Message-ID: <201408301756.s7UHuwsu064258@svn.freebsd.org>

Author: ume
Date: Sat Aug 30 17:56:58 2014
New Revision: 270851
URL: http://svnweb.freebsd.org/changeset/base/270851

Log:
  MFC r269867:
  Update our stub resolver to final version of libbind
  (libbind-6.0).
  
  Obtained from:	ISC

Modified:
  stable/9/include/arpa/inet.h
  stable/9/include/arpa/nameser.h
  stable/9/include/arpa/nameser_compat.h
  stable/9/include/res_update.h
  stable/9/include/resolv.h
  stable/9/lib/libc/include/isc/eventlib.h
  stable/9/lib/libc/include/isc/list.h
  stable/9/lib/libc/include/port_before.h
  stable/9/lib/libc/inet/inet_addr.c
  stable/9/lib/libc/inet/inet_cidr_ntop.c
  stable/9/lib/libc/inet/inet_cidr_pton.c
  stable/9/lib/libc/inet/inet_net_ntop.c
  stable/9/lib/libc/inet/inet_net_pton.c
  stable/9/lib/libc/inet/inet_neta.c
  stable/9/lib/libc/inet/inet_ntoa.c
  stable/9/lib/libc/inet/inet_ntop.c
  stable/9/lib/libc/inet/inet_pton.c
  stable/9/lib/libc/inet/nsap_addr.c
  stable/9/lib/libc/isc/ev_streams.c
  stable/9/lib/libc/isc/ev_timers.c
  stable/9/lib/libc/isc/eventlib_p.h
  stable/9/lib/libc/nameser/Symbol.map
  stable/9/lib/libc/nameser/ns_name.c
  stable/9/lib/libc/nameser/ns_netint.c
  stable/9/lib/libc/nameser/ns_parse.c
  stable/9/lib/libc/nameser/ns_print.c
  stable/9/lib/libc/nameser/ns_samedomain.c
  stable/9/lib/libc/nameser/ns_ttl.c
  stable/9/lib/libc/resolv/Makefile.inc
  stable/9/lib/libc/resolv/Symbol.map
  stable/9/lib/libc/resolv/herror.c
  stable/9/lib/libc/resolv/res_comp.c
  stable/9/lib/libc/resolv/res_data.c
  stable/9/lib/libc/resolv/res_debug.c
  stable/9/lib/libc/resolv/res_findzonecut.c
  stable/9/lib/libc/resolv/res_init.c
  stable/9/lib/libc/resolv/res_mkquery.c
  stable/9/lib/libc/resolv/res_mkupdate.c
  stable/9/lib/libc/resolv/res_query.c
  stable/9/lib/libc/resolv/res_send.c
  stable/9/lib/libc/resolv/res_update.c
Directory Properties:
  stable/9/include/   (props changed)
  stable/9/include/arpa/   (props changed)
  stable/9/lib/libc/   (props changed)

Modified: stable/9/include/arpa/inet.h
==============================================================================
--- stable/9/include/arpa/inet.h	Sat Aug 30 17:48:38 2014	(r270850)
+++ stable/9/include/arpa/inet.h	Sat Aug 30 17:56:58 2014	(r270851)
@@ -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: stable/9/include/arpa/nameser.h
==============================================================================
--- stable/9/include/arpa/nameser.h	Sat Aug 30 17:48:38 2014	(r270850)
+++ stable/9/include/arpa/nameser.h	Sat Aug 30 17:56:58 2014	(r270851)
@@ -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: stable/9/include/arpa/nameser_compat.h
==============================================================================
--- stable/9/include/arpa/nameser_compat.h	Sat Aug 30 17:48:38 2014	(r270850)
+++ stable/9/include/arpa/nameser_compat.h	Sat Aug 30 17:56:58 2014	(r270851)
@@ -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: stable/9/include/res_update.h
==============================================================================
--- stable/9/include/res_update.h	Sat Aug 30 17:48:38 2014	(r270850)
+++ stable/9/include/res_update.h	Sat Aug 30 17:56:58 2014	(r270851)
@@ -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: stable/9/include/resolv.h
==============================================================================
--- stable/9/include/resolv.h	Sat Aug 30 17:48:38 2014	(r270850)
+++ stable/9/include/resolv.h	Sat Aug 30 17:56:58 2014	(r270851)
@@ -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;	/*%< extention 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: stable/9/lib/libc/include/isc/eventlib.h
==============================================================================
--- stable/9/lib/libc/include/isc/eventlib.h	Sat Aug 30 17:48:38 2014	(r270850)
+++ stable/9/lib/libc/include/isc/eventlib.h	Sat Aug 30 17:56:58 2014	(r270851)
@@ -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: stable/9/lib/libc/include/isc/list.h
==============================================================================
--- stable/9/lib/libc/include/isc/list.h	Sat Aug 30 17:48:38 2014	(r270850)
+++ stable/9/lib/libc/include/isc/list.h	Sat Aug 30 17:56:58 2014	(r270851)
@@ -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: stable/9/lib/libc/include/port_before.h
==============================================================================
--- stable/9/lib/libc/include/port_before.h	Sat Aug 30 17:48:38 2014	(r270850)
+++ stable/9/lib/libc/include/port_before.h	Sat Aug 30 17:56:58 2014	(r270851)
@@ -6,6 +6,7 @@
 #define _LIBC		1
 #define DO_PTHREADS	1
 #define USE_KQUEUE	1
+#define HAVE_MD5	1
 
 #define ISC_SOCKLEN_T	socklen_t
 #define ISC_FORMAT_PRINTF(fmt, args) \

Modified: stable/9/lib/libc/inet/inet_addr.c
==============================================================================
--- stable/9/lib/libc/inet/inet_addr.c	Sat Aug 30 17:48:38 2014	(r270850)
+++ stable/9/lib/libc/inet/inet_addr.c	Sat Aug 30 17:56:58 2014	(r270851)
@@ -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: stable/9/lib/libc/inet/inet_cidr_ntop.c
==============================================================================
--- stable/9/lib/libc/inet/inet_cidr_ntop.c	Sat Aug 30 17:48:38 2014	(r270850)
+++ stable/9/lib/libc/inet/inet_cidr_ntop.c	Sat Aug 30 17:56:58 2014	(r270851)
@@ -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: stable/9/lib/libc/inet/inet_cidr_pton.c
==============================================================================
--- stable/9/lib/libc/inet/inet_cidr_pton.c	Sat Aug 30 17:48:38 2014	(r270850)
+++ stable/9/lib/libc/inet/inet_cidr_pton.c	Sat Aug 30 17:56:58 2014	(r270851)
@@ -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: stable/9/lib/libc/inet/inet_net_ntop.c
==============================================================================
--- stable/9/lib/libc/inet/inet_net_ntop.c	Sat Aug 30 17:48:38 2014	(r270850)
+++ stable/9/lib/libc/inet/inet_net_ntop.c	Sat Aug 30 17:56:58 2014	(r270851)
@@ -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: stable/9/lib/libc/inet/inet_net_pton.c
==============================================================================
--- stable/9/lib/libc/inet/inet_net_pton.c	Sat Aug 30 17:48:38 2014	(r270850)
+++ stable/9/lib/libc/inet/inet_net_pton.c	Sat Aug 30 17:56:58 2014	(r270851)
@@ -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: stable/9/lib/libc/inet/inet_neta.c
==============================================================================
--- stable/9/lib/libc/inet/inet_neta.c	Sat Aug 30 17:48:38 2014	(r270850)
+++ stable/9/lib/libc/inet/inet_neta.c	Sat Aug 30 17:56:58 2014	(r270851)
@@ -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: stable/9/lib/libc/inet/inet_ntoa.c
==============================================================================
--- stable/9/lib/libc/inet/inet_ntoa.c	Sat Aug 30 17:48:38 2014	(r270850)
+++ stable/9/lib/libc/inet/inet_ntoa.c	Sat Aug 30 17:56:58 2014	(r270851)
@@ -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: stable/9/lib/libc/inet/inet_ntop.c
==============================================================================
--- stable/9/lib/libc/inet/inet_ntop.c	Sat Aug 30 17:48:38 2014	(r270850)
+++ stable/9/lib/libc/inet/inet_ntop.c	Sat Aug 30 17:56:58 2014	(r270851)
@@ -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: stable/9/lib/libc/inet/inet_pton.c
==============================================================================
--- stable/9/lib/libc/inet/inet_pton.c	Sat Aug 30 17:48:38 2014	(r270850)
+++ stable/9/lib/libc/inet/inet_pton.c	Sat Aug 30 17:56:58 2014	(r270851)
@@ -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: stable/9/lib/libc/inet/nsap_addr.c
==============================================================================
--- stable/9/lib/libc/inet/nsap_addr.c	Sat Aug 30 17:48:38 2014	(r270850)
+++ stable/9/lib/libc/inet/nsap_addr.c	Sat Aug 30 17:56:58 2014	(r270851)
@@ -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: stable/9/lib/libc/isc/ev_streams.c
==============================================================================
--- stable/9/lib/libc/isc/ev_streams.c	Sat Aug 30 17:48:38 2014	(r270850)
+++ stable/9/lib/libc/isc/ev_streams.c	Sat Aug 30 17:56:58 2014	(r270851)
@@ -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: stable/9/lib/libc/isc/ev_timers.c
==============================================================================
--- stable/9/lib/libc/isc/ev_timers.c	Sat Aug 30 17:48:38 2014	(r270850)
+++ stable/9/lib/libc/isc/ev_timers.c	Sat Aug 30 17:56:58 2014	(r270851)
@@ -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: stable/9/lib/libc/isc/eventlib_p.h
==============================================================================
--- stable/9/lib/libc/isc/eventlib_p.h	Sat Aug 30 17:48:38 2014	(r270850)
+++ stable/9/lib/libc/isc/eventlib_p.h	Sat Aug 30 17:56:58 2014	(r270851)
@@ -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: stable/9/lib/libc/nameser/Symbol.map
==============================================================================
--- stable/9/lib/libc/nameser/Symbol.map	Sat Aug 30 17:48:38 2014	(r270850)
+++ stable/9/lib/libc/nameser/Symbol.map	Sat Aug 30 17:56:58 2014	(r270851)
@@ -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: stable/9/lib/libc/nameser/ns_name.c
==============================================================================
--- stable/9/lib/libc/nameser/ns_name.c	Sat Aug 30 17:48:38 2014	(r270850)
+++ stable/9/lib/libc/nameser/ns_name.c	Sat Aug 30 17:56:58 2014	(r270851)
@@ -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 ume at FreeBSD.org  Sat Aug 30 18:00:14 2014
From: ume at FreeBSD.org (Hajimu UMEMOTO)
Date: Sat, 30 Aug 2014 18:00:14 +0000 (UTC)
Subject: svn commit: r270852 - stable/9/lib/libc/nameser
Message-ID: <201408301800.s7UI0EK1065539@svn.freebsd.org>

Author: ume
Date: Sat Aug 30 18:00:13 2014
New Revision: 270852
URL: http://svnweb.freebsd.org/changeset/base/270852

Log:
  MFC r269873:
  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:
  stable/9/lib/libc/nameser/ns_name.c
Directory Properties:
  stable/9/lib/libc/   (props changed)

Modified: stable/9/lib/libc/nameser/ns_name.c
==============================================================================
--- stable/9/lib/libc/nameser/ns_name.c	Sat Aug 30 17:56:58 2014	(r270851)
+++ stable/9/lib/libc/nameser/ns_name.c	Sat Aug 30 18:00:13 2014	(r270852)
@@ -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 ume at FreeBSD.org  Sat Aug 30 18:01:37 2014
From: ume at FreeBSD.org (Hajimu UMEMOTO)
Date: Sat, 30 Aug 2014 18:01:37 +0000 (UTC)
Subject: svn commit: r270853 - stable/9/lib/libc/nameser
Message-ID: <201408301801.s7UI1bbt068626@svn.freebsd.org>

Author: ume
Date: Sat Aug 30 18:01:36 2014
New Revision: 270853
URL: http://svnweb.freebsd.org/changeset/base/270853

Log:
  MFC r270215: Add missing break.

Modified:
  stable/9/lib/libc/nameser/ns_print.c
Directory Properties:
  stable/9/lib/libc/   (props changed)

Modified: stable/9/lib/libc/nameser/ns_print.c
==============================================================================
--- stable/9/lib/libc/nameser/ns_print.c	Sat Aug 30 18:00:13 2014	(r270852)
+++ stable/9/lib/libc/nameser/ns_print.c	Sat Aug 30 18:01:36 2014	(r270853)
@@ -911,6 +911,7 @@ ns_sprintrrf(const u_char *msg, size_t m
 			if (len > 15)
 				T(addstr(" )", 2, &buf, &buflen));
 		}
+		break;
 	}
 
 	case ns_t_ipseckey: {

From rmacklem at FreeBSD.org  Sat Aug 30 20:26:31 2014
From: rmacklem at FreeBSD.org (Rick Macklem)
Date: Sat, 30 Aug 2014 20:26:31 +0000 (UTC)
Subject: svn commit: r270860 - stable/9/usr.sbin/nfsd
Message-ID: <201408302026.s7UKQVTE040228@svn.freebsd.org>

Author: rmacklem
Date: Sat Aug 30 20:26:30 2014
New Revision: 270860
URL: http://svnweb.freebsd.org/changeset/base/270860

Log:
  MFC: r269788
  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.

Modified:
  stable/9/usr.sbin/nfsd/nfsd.8
Directory Properties:
  stable/9/usr.sbin/nfsd/   (props changed)

Modified: stable/9/usr.sbin/nfsd/nfsd.8
==============================================================================
--- stable/9/usr.sbin/nfsd/nfsd.8	Sat Aug 30 20:18:47 2014	(r270859)
+++ stable/9/usr.sbin/nfsd/nfsd.8	Sat Aug 30 20:26:30 2014	(r270860)
@@ -28,7 +28,7 @@
 .\"	@(#)nfsd.8	8.4 (Berkeley) 3/29/95
 .\" $FreeBSD$
 .\"
-.Dd April 23, 2011
+.Dd August 10, 2014
 .Dt NFSD 8
 .Os
 .Sh NAME
@@ -164,6 +164,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 akiyama at FreeBSD.org  Sun Aug 31 10:42:52 2014
From: akiyama at FreeBSD.org (Shunsuke Akiyama)
Date: Sun, 31 Aug 2014 10:42:52 +0000 (UTC)
Subject: svn commit: r270873 - stable/10/sys/x86/acpica
Message-ID: <201408311042.s7VAgqcv061332@svn.freebsd.org>

Author: akiyama
Date: Sun Aug 31 10:42:52 2014
New Revision: 270873
URL: http://svnweb.freebsd.org/changeset/base/270873

Log:
  MFC r263859:
    Change default logic to CONFORM because this routine is shared
    with SCI polarity setting.
  
    Reviewed by: jhb
  
  MFC r269184:
    Add missing newline to output dmesg properly.

Modified:
  stable/10/sys/x86/acpica/madt.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/x86/acpica/madt.c
==============================================================================
--- stable/10/sys/x86/acpica/madt.c	Sun Aug 31 10:28:31 2014	(r270872)
+++ stable/10/sys/x86/acpica/madt.c	Sun Aug 31 10:42:52 2014	(r270873)
@@ -298,6 +298,9 @@ interrupt_polarity(UINT16 IntiFlags, UIN
 {
 
 	switch (IntiFlags & ACPI_MADT_POLARITY_MASK) {
+	default:
+		printf("WARNING: Bogus Interrupt Polarity. Assume CONFORMS\n");
+		/* FALLTHROUGH*/
 	case ACPI_MADT_POLARITY_CONFORMS:
 		if (Source == AcpiGbl_FADT.SciInterrupt)
 			return (INTR_POLARITY_LOW);
@@ -306,11 +309,8 @@ interrupt_polarity(UINT16 IntiFlags, UIN
 	case ACPI_MADT_POLARITY_ACTIVE_HIGH:
 		return (INTR_POLARITY_HIGH);
 	case ACPI_MADT_POLARITY_ACTIVE_LOW:
-		break;
-	default:
-		printf("WARNING: Bogus Interrupt Polarity. Assume POLALITY LOW");
+		return (INTR_POLARITY_LOW);
 	}
-	return (INTR_POLARITY_LOW);
 }
 
 static enum intr_trigger
@@ -318,6 +318,9 @@ interrupt_trigger(UINT16 IntiFlags, UINT
 {
 
 	switch (IntiFlags & ACPI_MADT_TRIGGER_MASK) {
+	default:
+		printf("WARNING: Bogus Interrupt Trigger Mode. Assume CONFORMS.\n");
+		/*FALLTHROUGH*/
 	case ACPI_MADT_TRIGGER_CONFORMS:
 		if (Source == AcpiGbl_FADT.SciInterrupt)
 			return (INTR_TRIGGER_LEVEL);
@@ -326,13 +329,8 @@ interrupt_trigger(UINT16 IntiFlags, UINT
 	case ACPI_MADT_TRIGGER_EDGE:
 		return (INTR_TRIGGER_EDGE);
 	case ACPI_MADT_TRIGGER_LEVEL:
-		break;
-	default:
-		printf("WARNING: Bogus Interrupt Trigger Mode. Assume Level trigger.");
-		
-		break;
+		return (INTR_TRIGGER_LEVEL);
 	}
-	return (INTR_TRIGGER_LEVEL);
 }
 
 /*

From rmacklem at FreeBSD.org  Sun Aug 31 12:21:41 2014
From: rmacklem at FreeBSD.org (Rick Macklem)
Date: Sun, 31 Aug 2014 12:21:41 +0000 (UTC)
Subject: svn commit: r270875 - stable/9/usr.sbin/mountd
Message-ID: <201408311221.s7VCLfpJ006625@svn.freebsd.org>

Author: rmacklem
Date: Sun Aug 31 12:21:40 2014
New Revision: 270875
URL: http://svnweb.freebsd.org/changeset/base/270875

Log:
  MFC: r270005
  Try to clarify how file systems are exported for NFSv4.
  This is a content change.

Modified:
  stable/9/usr.sbin/mountd/exports.5
Directory Properties:
  stable/9/usr.sbin/mountd/   (props changed)

Modified: stable/9/usr.sbin/mountd/exports.5
==============================================================================
--- stable/9/usr.sbin/mountd/exports.5	Sun Aug 31 11:33:19 2014	(r270874)
+++ stable/9/usr.sbin/mountd/exports.5	Sun Aug 31 12:21:40 2014	(r270875)
@@ -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 peter at FreeBSD.org  Sun Aug 31 20:11:27 2014
From: peter at FreeBSD.org (Peter Wemm)
Date: Sun, 31 Aug 2014 20:11:26 +0000 (UTC)
Subject: svn commit: r270886 - in stable/9: tools/build/mk usr.sbin
Message-ID: <201408312011.s7VKBR97042562@svn.freebsd.org>

Author: peter
Date: Sun Aug 31 20:11:26 2014
New Revision: 270886
URL: http://svnweb.freebsd.org/changeset/base/270886

Log:
  WITH/WITHOUT_PKGBOOTSTRAP were MFC'ed, but were never connected to the
  build.  As a result, the knob for disabling pkg_install also disabled
  the pkg bootstrap tool

Modified:
  stable/9/tools/build/mk/OptionalObsoleteFiles.inc
  stable/9/usr.sbin/Makefile

Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc
==============================================================================
--- stable/9/tools/build/mk/OptionalObsoleteFiles.inc	Sun Aug 31 17:56:54 2014	(r270885)
+++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc	Sun Aug 31 20:11:26 2014	(r270886)
@@ -3249,6 +3249,11 @@ OLD_FILES+=usr/share/man/man8/pflogd.8.g
 OLD_FILES+=usr/share/man/man8/tftp-proxy.8.gz
 .endif
 
+.if ${MK_PKGBOOTSTRAP} == no
+OLD_FILES+=usr/sbin/pkg
+OLD_FILES+=usr/share/man/man7/pkg.7.gz
+.endif
+
 .if ${MK_PKGTOOLS} == no
 OLD_FILES+=etc/periodic/daily/490.status-pkg-changes
 OLD_FILES+=etc/periodic/security/460.chkportsum

Modified: stable/9/usr.sbin/Makefile
==============================================================================
--- stable/9/usr.sbin/Makefile	Sun Aug 31 17:56:54 2014	(r270885)
+++ stable/9/usr.sbin/Makefile	Sun Aug 31 20:11:26 2014	(r270886)
@@ -265,9 +265,12 @@ _pc_sysinstall=	pc-sysinstall
 SUBDIR+=	ftp-proxy
 .endif
 
+.if ${MK_PKGBOOTSTRAP} != "no"
+SUBDIR+=	pkg
+.endif
+
 .if ${MK_PKGTOOLS} != "no"
 SUBDIR+=	pkg_install
-SUBDIR+=	pkg
 .endif
 
 # XXX MK_TOOLCHAIN?

From peter at FreeBSD.org  Sun Aug 31 20:14:24 2014
From: peter at FreeBSD.org (Peter Wemm)
Date: Sun, 31 Aug 2014 20:14:22 +0000 (UTC)
Subject: svn commit: r270887 - in stable/8: share/mk tools/build/mk
 tools/build/options usr.sbin
Message-ID: <201408312014.s7VKEMXE043461@svn.freebsd.org>

Author: peter
Date: Sun Aug 31 20:14:22 2014
New Revision: 270887
URL: http://svnweb.freebsd.org/changeset/base/270887

Log:
  Backport the separation of the knob that controls the legacy pkg_install
  tools (ie: WITH/WITHOUT_PKGTOOLS) and the pkg bootstrap tool.

Added:
  stable/8/tools/build/options/WITHOUT_PKGBOOTSTRAP
     - copied unchanged from r270885, head/tools/build/options/WITHOUT_PKGBOOTSTRAP
Modified:
  stable/8/share/mk/bsd.own.mk
  stable/8/tools/build/mk/OptionalObsoleteFiles.inc
  stable/8/usr.sbin/Makefile

Modified: stable/8/share/mk/bsd.own.mk
==============================================================================
--- stable/8/share/mk/bsd.own.mk	Sun Aug 31 20:11:26 2014	(r270886)
+++ stable/8/share/mk/bsd.own.mk	Sun Aug 31 20:14:22 2014	(r270887)
@@ -383,6 +383,7 @@ WITH_IDEA=
     OPENSSL \
     PAM \
     PF \
+    PKGBOOTSTRAP \
     PKGTOOLS \
     PMC \
     PORTSNAP \

Modified: stable/8/tools/build/mk/OptionalObsoleteFiles.inc
==============================================================================
--- stable/8/tools/build/mk/OptionalObsoleteFiles.inc	Sun Aug 31 20:11:26 2014	(r270886)
+++ stable/8/tools/build/mk/OptionalObsoleteFiles.inc	Sun Aug 31 20:14:22 2014	(r270887)
@@ -1216,6 +1216,11 @@ OLD_FILES+=usr/share/man/man1/nc.1.gz
 # to be filled in
 #.endif
 
+.if ${MK_PKGBOOTSTRAP} == no
+OLD_FILES+=usr/sbin/pkg
+OLD_FILES+=usr/share/man/man7/pkg.7.gz
+.endif
+
 .if ${MK_PKGTOOLS} == no
 OLD_FILES+=etc/periodic/security/460.chkportsum
 OLD_FILES+=etc/periodic/weekly/400.status-pkg

Copied: stable/8/tools/build/options/WITHOUT_PKGBOOTSTRAP (from r270885, head/tools/build/options/WITHOUT_PKGBOOTSTRAP)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/8/tools/build/options/WITHOUT_PKGBOOTSTRAP	Sun Aug 31 20:14:22 2014	(r270887, copy of r270885, head/tools/build/options/WITHOUT_PKGBOOTSTRAP)
@@ -0,0 +1,4 @@
+.\" $FreeBSD$
+Set to not build
+.Xr pkg 7
+bootstrap tool.

Modified: stable/8/usr.sbin/Makefile
==============================================================================
--- stable/8/usr.sbin/Makefile	Sun Aug 31 20:11:26 2014	(r270886)
+++ stable/8/usr.sbin/Makefile	Sun Aug 31 20:14:22 2014	(r270887)
@@ -361,9 +361,12 @@ _keyserv=	keyserv
 _ftp-proxy=	ftp-proxy
 .endif
 
+.if ${MK_PKGBOOTSTRAP} != "no"
+SUBDIR+=	pkg
+.endif
+
 .if ${MK_PKGTOOLS} != "no"
 _pkg_install=	pkg_install
-SUBDIR+=	pkg
 .endif
 
 # XXX MK_TOOLCHAIN?

From trasz at FreeBSD.org  Sun Aug 31 20:21:13 2014
From: trasz at FreeBSD.org (Edward Tomasz Napierala)
Date: Sun, 31 Aug 2014 20:21:09 +0000 (UTC)
Subject: svn commit: r270888 - in stable/10: sys/dev/iscsi usr.bin/iscsictl
 usr.sbin/ctld usr.sbin/iscsid
Message-ID: <201408312021.s7VKL9ZF047771@svn.freebsd.org>

Author: trasz
Date: Sun Aug 31 20:21:08 2014
New Revision: 270888
URL: http://svnweb.freebsd.org/changeset/base/270888

Log:
  MFC r270279:
  
  Make the iSCSI stack use __FBSDID() properly.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/sys/dev/iscsi/icl.c
  stable/10/sys/dev/iscsi/icl_proxy.c
  stable/10/sys/dev/iscsi/iscsi.c
  stable/10/usr.bin/iscsictl/iscsictl.c
  stable/10/usr.sbin/ctld/ctld.c
  stable/10/usr.sbin/ctld/discovery.c
  stable/10/usr.sbin/ctld/kernel.c
  stable/10/usr.sbin/ctld/keys.c
  stable/10/usr.sbin/ctld/log.c
  stable/10/usr.sbin/ctld/login.c
  stable/10/usr.sbin/ctld/pdu.c
  stable/10/usr.sbin/iscsid/discovery.c
  stable/10/usr.sbin/iscsid/iscsid.c
  stable/10/usr.sbin/iscsid/keys.c
  stable/10/usr.sbin/iscsid/log.c
  stable/10/usr.sbin/iscsid/login.c
  stable/10/usr.sbin/iscsid/pdu.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/iscsi/icl.c
==============================================================================
--- stable/10/sys/dev/iscsi/icl.c	Sun Aug 31 20:14:22 2014	(r270887)
+++ stable/10/sys/dev/iscsi/icl.c	Sun Aug 31 20:21:08 2014	(r270888)
@@ -26,7 +26,6 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
  */
 
 /*
@@ -34,6 +33,9 @@
  * and receive iSCSI PDUs.
  */
 
+#include 
+__FBSDID("$FreeBSD$");
+
 #include 
 #include 
 #include 

Modified: stable/10/sys/dev/iscsi/icl_proxy.c
==============================================================================
--- stable/10/sys/dev/iscsi/icl_proxy.c	Sun Aug 31 20:14:22 2014	(r270887)
+++ stable/10/sys/dev/iscsi/icl_proxy.c	Sun Aug 31 20:21:08 2014	(r270888)
@@ -26,7 +26,6 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
  */
 /*-
  * Copyright (c) 1982, 1986, 1989, 1990, 1993
@@ -68,6 +67,9 @@
 
 #ifdef ICL_KERNEL_PROXY
 
+#include 
+__FBSDID("$FreeBSD$");
+
 #include 
 #include 
 #include 

Modified: stable/10/sys/dev/iscsi/iscsi.c
==============================================================================
--- stable/10/sys/dev/iscsi/iscsi.c	Sun Aug 31 20:14:22 2014	(r270887)
+++ stable/10/sys/dev/iscsi/iscsi.c	Sun Aug 31 20:21:08 2014	(r270888)
@@ -26,9 +26,11 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
  */
 
+#include 
+__FBSDID("$FreeBSD$");
+
 #include 
 #include 
 #include 

Modified: stable/10/usr.bin/iscsictl/iscsictl.c
==============================================================================
--- stable/10/usr.bin/iscsictl/iscsictl.c	Sun Aug 31 20:14:22 2014	(r270887)
+++ stable/10/usr.bin/iscsictl/iscsictl.c	Sun Aug 31 20:21:08 2014	(r270888)
@@ -26,9 +26,11 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
  */
 
+#include 
+__FBSDID("$FreeBSD$");
+
 #include 
 #include 
 #include 

Modified: stable/10/usr.sbin/ctld/ctld.c
==============================================================================
--- stable/10/usr.sbin/ctld/ctld.c	Sun Aug 31 20:14:22 2014	(r270887)
+++ stable/10/usr.sbin/ctld/ctld.c	Sun Aug 31 20:21:08 2014	(r270888)
@@ -26,9 +26,11 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
  */
 
+#include 
+__FBSDID("$FreeBSD$");
+
 #include 
 #include 
 #include 

Modified: stable/10/usr.sbin/ctld/discovery.c
==============================================================================
--- stable/10/usr.sbin/ctld/discovery.c	Sun Aug 31 20:14:22 2014	(r270887)
+++ stable/10/usr.sbin/ctld/discovery.c	Sun Aug 31 20:21:08 2014	(r270888)
@@ -26,9 +26,11 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
  */
 
+#include 
+__FBSDID("$FreeBSD$");
+
 #include 
 #include 
 #include 

Modified: stable/10/usr.sbin/ctld/kernel.c
==============================================================================
--- stable/10/usr.sbin/ctld/kernel.c	Sun Aug 31 20:14:22 2014	(r270887)
+++ stable/10/usr.sbin/ctld/kernel.c	Sun Aug 31 20:21:08 2014	(r270888)
@@ -32,9 +32,11 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGES.
  *
- * $FreeBSD$
  */
 
+#include 
+__FBSDID("$FreeBSD$");
+
 #include 
 #include 
 #include 

Modified: stable/10/usr.sbin/ctld/keys.c
==============================================================================
--- stable/10/usr.sbin/ctld/keys.c	Sun Aug 31 20:14:22 2014	(r270887)
+++ stable/10/usr.sbin/ctld/keys.c	Sun Aug 31 20:21:08 2014	(r270888)
@@ -26,9 +26,11 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
  */
 
+#include 
+__FBSDID("$FreeBSD$");
+
 #include 
 #include 
 #include 

Modified: stable/10/usr.sbin/ctld/log.c
==============================================================================
--- stable/10/usr.sbin/ctld/log.c	Sun Aug 31 20:14:22 2014	(r270887)
+++ stable/10/usr.sbin/ctld/log.c	Sun Aug 31 20:21:08 2014	(r270888)
@@ -26,9 +26,11 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
  */
 
+#include 
+__FBSDID("$FreeBSD$");
+
 #include 
 #include 
 #include 

Modified: stable/10/usr.sbin/ctld/login.c
==============================================================================
--- stable/10/usr.sbin/ctld/login.c	Sun Aug 31 20:14:22 2014	(r270887)
+++ stable/10/usr.sbin/ctld/login.c	Sun Aug 31 20:21:08 2014	(r270888)
@@ -26,9 +26,11 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
  */
 
+#include 
+__FBSDID("$FreeBSD$");
+
 #include 
 #include 
 #include 

Modified: stable/10/usr.sbin/ctld/pdu.c
==============================================================================
--- stable/10/usr.sbin/ctld/pdu.c	Sun Aug 31 20:14:22 2014	(r270887)
+++ stable/10/usr.sbin/ctld/pdu.c	Sun Aug 31 20:21:08 2014	(r270888)
@@ -26,9 +26,11 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
  */
 
+#include 
+__FBSDID("$FreeBSD$");
+
 #include 
 #include 
 #include 

Modified: stable/10/usr.sbin/iscsid/discovery.c
==============================================================================
--- stable/10/usr.sbin/iscsid/discovery.c	Sun Aug 31 20:14:22 2014	(r270887)
+++ stable/10/usr.sbin/iscsid/discovery.c	Sun Aug 31 20:21:08 2014	(r270888)
@@ -26,9 +26,11 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
  */
 
+#include 
+__FBSDID("$FreeBSD$");
+
 #include 
 #include 
 #include 

Modified: stable/10/usr.sbin/iscsid/iscsid.c
==============================================================================
--- stable/10/usr.sbin/iscsid/iscsid.c	Sun Aug 31 20:14:22 2014	(r270887)
+++ stable/10/usr.sbin/iscsid/iscsid.c	Sun Aug 31 20:21:08 2014	(r270888)
@@ -26,9 +26,11 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
  */
 
+#include 
+__FBSDID("$FreeBSD$");
+
 #include 
 #include 
 #include 

Modified: stable/10/usr.sbin/iscsid/keys.c
==============================================================================
--- stable/10/usr.sbin/iscsid/keys.c	Sun Aug 31 20:14:22 2014	(r270887)
+++ stable/10/usr.sbin/iscsid/keys.c	Sun Aug 31 20:21:08 2014	(r270888)
@@ -26,9 +26,11 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
  */
 
+#include 
+__FBSDID("$FreeBSD$");
+
 #include 
 #include 
 #include 

Modified: stable/10/usr.sbin/iscsid/log.c
==============================================================================
--- stable/10/usr.sbin/iscsid/log.c	Sun Aug 31 20:14:22 2014	(r270887)
+++ stable/10/usr.sbin/iscsid/log.c	Sun Aug 31 20:21:08 2014	(r270888)
@@ -26,9 +26,11 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
  */
 
+#include 
+__FBSDID("$FreeBSD$");
+
 #include 
 #include 
 #include 

Modified: stable/10/usr.sbin/iscsid/login.c
==============================================================================
--- stable/10/usr.sbin/iscsid/login.c	Sun Aug 31 20:14:22 2014	(r270887)
+++ stable/10/usr.sbin/iscsid/login.c	Sun Aug 31 20:21:08 2014	(r270888)
@@ -26,9 +26,11 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
  */
 
+#include 
+__FBSDID("$FreeBSD$");
+
 #include 
 #include 
 #include 

Modified: stable/10/usr.sbin/iscsid/pdu.c
==============================================================================
--- stable/10/usr.sbin/iscsid/pdu.c	Sun Aug 31 20:14:22 2014	(r270887)
+++ stable/10/usr.sbin/iscsid/pdu.c	Sun Aug 31 20:21:08 2014	(r270888)
@@ -26,9 +26,11 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
  */
 
+#include 
+__FBSDID("$FreeBSD$");
+
 #include 
 #include 
 #include 

From peter at FreeBSD.org  Sun Aug 31 20:23:57 2014
From: peter at FreeBSD.org (Peter Wemm)
Date: Sun, 31 Aug 2014 20:23:56 +0000 (UTC)
Subject: svn commit: r270889 - stable/8/share/man/man5
Message-ID: <201408312023.s7VKNu8x048714@svn.freebsd.org>

Author: peter
Date: Sun Aug 31 20:23:56 2014
New Revision: 270889
URL: http://svnweb.freebsd.org/changeset/base/270889

Log:
  Regenerate

Modified:
  stable/8/share/man/man5/src.conf.5

Modified: stable/8/share/man/man5/src.conf.5
==============================================================================
--- stable/8/share/man/man5/src.conf.5	Sun Aug 31 20:21:08 2014	(r270888)
+++ stable/8/share/man/man5/src.conf.5	Sun Aug 31 20:23:56 2014	(r270889)
@@ -1,7 +1,7 @@
 .\" DO NOT EDIT-- this file is automatically generated.
 .\" from FreeBSD: stable/8/tools/build/options/makeman 236431 2012-06-02 02:26:49Z gjb
 .\" $FreeBSD$
-.Dd March  1, 2013
+.Dd August 31, 2014
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -668,7 +668,7 @@ Set to not build Objective C support.
 .\" from FreeBSD: stable/8/tools/build/options/WITHOUT_OPENSSH 156932 2006-03-21 07:50:50Z ru
 Set to not build OpenSSH.
 .It Va WITH_OPENSSH_NONE_CIPHER
-.\" $FreeBSD$
+.\" from FreeBSD: stable/8/tools/build/options/WITH_OPENSSH_NONE_CIPHER 247521 2013-03-01 02:06:04Z des
 Set to include the "None" cipher support in OpenSSH and its libraries.
 Additional adjustments may need to be done to system configuration
 files, such as
@@ -721,6 +721,11 @@ When set, it also enforces the following
 .It
 .Va WITHOUT_AUTHPF
 .El
+.It Va WITHOUT_PKGBOOTSTRAP
+.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_PKGBOOTSTRAP 270887 2014-08-31 20:14:22Z peter
+Set to not build
+.Xr pkg 7
+bootstrap tool.
 .It Va WITHOUT_PKGTOOLS
 .\" from FreeBSD: stable/8/tools/build/options/WITHOUT_PKGTOOLS 183242 2008-09-21 22:02:26Z sam
 Set to not build

From jilles at FreeBSD.org  Sun Aug 31 20:34:07 2014
From: jilles at FreeBSD.org (Jilles Tjoelker)
Date: Sun, 31 Aug 2014 20:34:07 +0000 (UTC)
Subject: svn commit: r270890 - stable/10/usr.bin/pathchk
Message-ID: <201408312034.s7VKY7PG053863@svn.freebsd.org>

Author: jilles
Date: Sun Aug 31 20:34:06 2014
New Revision: 270890
URL: http://svnweb.freebsd.org/changeset/base/270890

Log:
  MFC r256800: pathchk: Ensure bytes >= 128 are considered non-portable
  characters.
  
  This was not broken on architectures such as ARM where char is unsigned.
  
  Also, remove the first non-portable character from the output. POSIX does
  not require this, and printing the first byte may yield an invalid byte
  sequence with UTF-8.
  
  PR:		165988
  Reported by:	Nicolas Rachinsky
  Relnotes:	yes

Modified:
  stable/10/usr.bin/pathchk/pathchk.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/pathchk/pathchk.c
==============================================================================
--- stable/10/usr.bin/pathchk/pathchk.c	Sun Aug 31 20:23:56 2014	(r270889)
+++ stable/10/usr.bin/pathchk/pathchk.c	Sun Aug 31 20:34:06 2014	(r270890)
@@ -98,7 +98,7 @@ check(const char *path)
 {
 	struct stat sb;
 	long complen, namemax, pathmax, svnamemax;
-	int badch, last;
+	int last;
 	char *end, *p, *pathd;
 
 	if ((pathd = strdup(path)) == NULL)
@@ -142,9 +142,9 @@ check(const char *path)
 			goto bad;
 		}
 
-		if (pflag && (badch = portable(p)) >= 0) {
+		if (pflag && !portable(p)) {
 			warnx("%s: %s: component contains non-portable "
-			    "character `%c'", path, p, badch);
+			    "character", path, p);
 			goto bad;
 		}
 
@@ -183,8 +183,7 @@ bad:	free(pathd);
 }
 
 /*
- * Check whether a path component contains only portable characters. Return
- * the first non-portable character found.
+ * Check whether a path component contains only portable characters.
  */
 static int
 portable(const char *path)
@@ -197,7 +196,7 @@ portable(const char *path)
 
 	s = strspn(path, charset);
 	if (path[s] != '\0')
-		return (path[s]);
+		return (0);
 
-	return (-1);
+	return (1);
 }

From trasz at FreeBSD.org  Sun Aug 31 20:47:12 2014
From: trasz at FreeBSD.org (Edward Tomasz Napierala)
Date: Sun, 31 Aug 2014 20:47:11 +0000 (UTC)
Subject: svn commit: r270891 - in stable/10/sys: cam/ctl dev/iscsi
Message-ID: <201408312047.s7VKlBkX058974@svn.freebsd.org>

Author: trasz
Date: Sun Aug 31 20:47:10 2014
New Revision: 270891
URL: http://svnweb.freebsd.org/changeset/base/270891

Log:
  MFC r270282:
  
  Use proper include paths in kernel iSCSI code.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/sys/cam/ctl/ctl_frontend_iscsi.c
  stable/10/sys/dev/iscsi/icl.c
  stable/10/sys/dev/iscsi/icl_proxy.c
  stable/10/sys/dev/iscsi/iscsi.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c
==============================================================================
--- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c	Sun Aug 31 20:34:06 2014	(r270890)
+++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c	Sun Aug 31 20:47:10 2014	(r270891)
@@ -67,9 +67,9 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#include "../../dev/iscsi/icl.h"
-#include "../../dev/iscsi/iscsi_proto.h"
-#include "ctl_frontend_iscsi.h"
+#include 
+#include 
+#include 
 
 #ifdef ICL_KERNEL_PROXY
 #include 

Modified: stable/10/sys/dev/iscsi/icl.c
==============================================================================
--- stable/10/sys/dev/iscsi/icl.c	Sun Aug 31 20:34:06 2014	(r270890)
+++ stable/10/sys/dev/iscsi/icl.c	Sun Aug 31 20:47:10 2014	(r270891)
@@ -58,8 +58,8 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#include "icl.h"
-#include "iscsi_proto.h"
+#include 
+#include 
 
 SYSCTL_NODE(_kern, OID_AUTO, icl, CTLFLAG_RD, 0, "iSCSI Common Layer");
 static int debug = 1;

Modified: stable/10/sys/dev/iscsi/icl_proxy.c
==============================================================================
--- stable/10/sys/dev/iscsi/icl_proxy.c	Sun Aug 31 20:34:06 2014	(r270890)
+++ stable/10/sys/dev/iscsi/icl_proxy.c	Sun Aug 31 20:47:10 2014	(r270891)
@@ -87,7 +87,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#include "icl.h"
+#include 
 
 static int debug = 1;
 

Modified: stable/10/sys/dev/iscsi/iscsi.c
==============================================================================
--- stable/10/sys/dev/iscsi/iscsi.c	Sun Aug 31 20:34:06 2014	(r270890)
+++ stable/10/sys/dev/iscsi/iscsi.c	Sun Aug 31 20:47:10 2014	(r270891)
@@ -58,10 +58,10 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#include "iscsi_ioctl.h"
-#include "iscsi.h"
-#include "icl.h"
-#include "iscsi_proto.h"
+#include 
+#include 
+#include 
+#include 
 
 #ifdef ICL_KERNEL_PROXY
 #include 

From trasz at FreeBSD.org  Sun Aug 31 21:18:28 2014
From: trasz at FreeBSD.org (Edward Tomasz Napierala)
Date: Sun, 31 Aug 2014 21:18:23 +0000 (UTC)
Subject: svn commit: r270892 - in stable/10: etc etc/autofs etc/defaults
 etc/mtree etc/rc.d sbin/mount share/man/man5 sys/conf sys/fs/autofs sys/kern
 sys/libkern sys/modules sys/modules/autofs sys/sys usr.s...
Message-ID: <201408312118.s7VLINnW073272@svn.freebsd.org>

Author: trasz
Date: Sun Aug 31 21:18:23 2014
New Revision: 270892
URL: http://svnweb.freebsd.org/changeset/base/270892

Log:
  MFC r270096:
  
  Bring in the new automounter, similar to what's provided in most other
  UNIX systems, eg. MacOS X and Solaris.  It uses Sun-compatible map format,
  has proper kernel support, and LDAP integration.
  
  There are still a few outstanding problems; they will be fixed shortly.
  
  Reviewed by:	allanjude@, emaste@, kib@, wblock@ (earlier versions)
  Phabric:	D523
  Relnotes:	yes
  Sponsored by:	The FreeBSD Foundation

Added:
  stable/10/etc/auto_master
     - copied unchanged from r270096, head/etc/auto_master
  stable/10/etc/autofs/
     - copied from r270096, head/etc/autofs/
  stable/10/etc/rc.d/automount
     - copied unchanged from r270096, head/etc/rc.d/automount
  stable/10/etc/rc.d/automountd
     - copied unchanged from r270096, head/etc/rc.d/automountd
  stable/10/etc/rc.d/autounmountd
     - copied unchanged from r270096, head/etc/rc.d/autounmountd
  stable/10/share/man/man5/autofs.5
     - copied unchanged from r270096, head/share/man/man5/autofs.5
  stable/10/sys/fs/autofs/
     - copied from r270096, head/sys/fs/autofs/
  stable/10/sys/libkern/strndup.c
     - copied unchanged from r270096, head/sys/libkern/strndup.c
  stable/10/sys/modules/autofs/
     - copied from r270096, head/sys/modules/autofs/
  stable/10/usr.sbin/autofs/
     - copied from r270096, head/usr.sbin/autofs/
Modified:
  stable/10/etc/Makefile
  stable/10/etc/defaults/rc.conf
  stable/10/etc/mtree/BSD.root.dist
  stable/10/etc/rc.d/Makefile
  stable/10/sbin/mount/mntopts.h
  stable/10/sbin/mount/mount.c
  stable/10/share/man/man5/Makefile
  stable/10/sys/conf/NOTES
  stable/10/sys/conf/files
  stable/10/sys/conf/options
  stable/10/sys/kern/vfs_mount.c
  stable/10/sys/modules/Makefile
  stable/10/sys/sys/libkern.h
  stable/10/sys/sys/mount.h
  stable/10/usr.sbin/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/etc/Makefile
==============================================================================
--- stable/10/etc/Makefile	Sun Aug 31 20:47:10 2014	(r270891)
+++ stable/10/etc/Makefile	Sun Aug 31 21:18:23 2014	(r270892)
@@ -11,7 +11,8 @@ SUBDIR=	sendmail
 SUBDIR+=tests
 .endif
 
-BIN1=	crontab \
+BIN1=	auto_master \
+	crontab \
 	devd.conf \
 	devfs.conf \
 	ddb.conf \
@@ -225,6 +226,7 @@ distribution:
 		echo "./etc/spwd.db type=file mode=0600 uname=root gname=wheel"; \
 	) | ${METALOG.add}
 .endif
+	${_+_}cd ${.CURDIR}/autofs; ${MAKE} install
 .if ${MK_BLUETOOTH} != "no"
 	${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install
 .endif

Copied: stable/10/etc/auto_master (from r270096, head/etc/auto_master)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/10/etc/auto_master	Sun Aug 31 21:18:23 2014	(r270892, copy of r270096, head/etc/auto_master)
@@ -0,0 +1,5 @@
+# $FreeBSD$
+#
+# Automounter master map, see auto_master(5) for details.
+#
+/net		-hosts		-nosuid

Modified: stable/10/etc/defaults/rc.conf
==============================================================================
--- stable/10/etc/defaults/rc.conf	Sun Aug 31 20:47:10 2014	(r270891)
+++ stable/10/etc/defaults/rc.conf	Sun Aug 31 21:18:23 2014	(r270892)
@@ -311,6 +311,7 @@ amd_enable="NO"			# Run amd service with
 amd_program="/usr/sbin/amd"	# path to amd, if you want a different one.
 amd_flags="-a /.amd_mnt -l syslog /host /etc/amd.map /net /etc/amd.map"
 amd_map_program="NO"		# Can be set to "ypcat -k amd.master"
+autofs_enable="NO"		# Run automountd(8)
 nfs_client_enable="NO"		# This host is an NFS client (or NO).
 nfs_access_cache="60"		# Client cache timeout in seconds
 nfs_server_enable="NO"		# This host is an NFS server (or NO).

Modified: stable/10/etc/mtree/BSD.root.dist
==============================================================================
--- stable/10/etc/mtree/BSD.root.dist	Sun Aug 31 20:47:10 2014	(r270891)
+++ stable/10/etc/mtree/BSD.root.dist	Sun Aug 31 21:18:23 2014	(r270892)
@@ -24,6 +24,8 @@
     etc
         X11
         ..
+        autofs
+        ..
         bluetooth
         ..
         defaults

Modified: stable/10/etc/rc.d/Makefile
==============================================================================
--- stable/10/etc/rc.d/Makefile	Sun Aug 31 20:47:10 2014	(r270891)
+++ stable/10/etc/rc.d/Makefile	Sun Aug 31 21:18:23 2014	(r270892)
@@ -20,6 +20,9 @@ FILES=	DAEMON \
 	atm3 \
 	auditd \
 	auditdistd \
+	automount \
+	automountd \
+	autounmountd \
 	bgfsck \
 	${_bluetooth} \
 	bootparams \

Copied: stable/10/etc/rc.d/automount (from r270096, head/etc/rc.d/automount)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/10/etc/rc.d/automount	Sun Aug 31 21:18:23 2014	(r270892, copy of r270096, head/etc/rc.d/automount)
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: automount
+# REQUIRE: nfsclient
+# KEYWORD: nojail shutdown
+
+. /etc/rc.subr
+
+name="automount"
+rcvar="autofs_enable"
+start_cmd="automount_start"
+stop_cmd="automount_stop"
+required_modules="autofs"
+
+automount_start()
+{
+
+	/usr/sbin/automount
+}
+
+automount_stop()
+{
+
+	/sbin/umount -At autofs
+}
+
+load_rc_config $name
+run_rc_command "$1"

Copied: stable/10/etc/rc.d/automountd (from r270096, head/etc/rc.d/automountd)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/10/etc/rc.d/automountd	Sun Aug 31 21:18:23 2014	(r270892, copy of r270096, head/etc/rc.d/automountd)
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: automountd
+# REQUIRE: automount
+# KEYWORD: nojail
+
+. /etc/rc.subr
+
+name="automountd"
+rcvar="autofs_enable"
+pidfile="/var/run/${name}.pid"
+command="/usr/sbin/${name}"
+required_modules="autofs"
+
+load_rc_config $name
+run_rc_command "$1"

Copied: stable/10/etc/rc.d/autounmountd (from r270096, head/etc/rc.d/autounmountd)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/10/etc/rc.d/autounmountd	Sun Aug 31 21:18:23 2014	(r270892, copy of r270096, head/etc/rc.d/autounmountd)
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: autounmountd
+# REQUIRE: nfsclient
+# KEYWORD: nojail
+
+. /etc/rc.subr
+
+name="autounmountd"
+rcvar="autofs_enable"
+pidfile="/var/run/${name}.pid"
+command="/usr/sbin/${name}"
+
+load_rc_config $name
+run_rc_command "$1"

Modified: stable/10/sbin/mount/mntopts.h
==============================================================================
--- stable/10/sbin/mount/mntopts.h	Sun Aug 31 20:47:10 2014	(r270891)
+++ stable/10/sbin/mount/mntopts.h	Sun Aug 31 21:18:23 2014	(r270892)
@@ -33,7 +33,7 @@
 struct mntopt {
 	const char *m_option;	/* option name */
 	int m_inverse;		/* if a negative option, e.g. "atime" */
-	int m_flag;		/* bit to set, e.g. MNT_RDONLY */
+	long long m_flag;	/* bit to set, e.g. MNT_RDONLY */
 	int m_altloc;		/* 1 => set bit in altflags */
 };
 
@@ -55,6 +55,7 @@ struct mntopt {
 #define MOPT_MULTILABEL		{ "multilabel",	0, MNT_MULTILABEL, 0 }
 #define MOPT_ACLS		{ "acls",	0, MNT_ACLS, 0 }
 #define MOPT_NFS4ACLS		{ "nfsv4acls",	0, MNT_NFS4ACLS, 0 }
+#define MOPT_AUTOMOUNTED	{ "automounted",0, MNT_AUTOMOUNTED, 0 }
 
 /* Control flags. */
 #define MOPT_FORCE		{ "force",	0, MNT_FORCE, 0 }
@@ -89,7 +90,8 @@ struct mntopt {
 	MOPT_NOCLUSTERW,						\
 	MOPT_MULTILABEL,						\
 	MOPT_ACLS,							\
-	MOPT_NFS4ACLS
+	MOPT_NFS4ACLS,							\
+	MOPT_AUTOMOUNTED
 
 void getmntopts(const char *, const struct mntopt *, int *, int *);
 void rmslashes(char *, char *);

Modified: stable/10/sbin/mount/mount.c
==============================================================================
--- stable/10/sbin/mount/mount.c	Sun Aug 31 20:47:10 2014	(r270891)
+++ stable/10/sbin/mount/mount.c	Sun Aug 31 21:18:23 2014	(r270892)
@@ -114,6 +114,7 @@ static struct opt {
 	{ MNT_ACLS,		"acls" },
 	{ MNT_NFS4ACLS,		"nfsv4acls" },
 	{ MNT_GJOURNAL,		"gjournal" },
+	{ MNT_AUTOMOUNTED,	"automounted" },
 	{ 0, NULL }
 };
 

Modified: stable/10/share/man/man5/Makefile
==============================================================================
--- stable/10/share/man/man5/Makefile	Sun Aug 31 20:47:10 2014	(r270891)
+++ stable/10/share/man/man5/Makefile	Sun Aug 31 21:18:23 2014	(r270892)
@@ -7,6 +7,7 @@
 MAN=	acct.5 \
 	ar.5 \
 	a.out.5 \
+	autofs.5 \
 	bluetooth.device.conf.5 \
 	bluetooth.hosts.5 \
 	bluetooth.protocols.5 \

Copied: stable/10/share/man/man5/autofs.5 (from r270096, head/share/man/man5/autofs.5)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/10/share/man/man5/autofs.5	Sun Aug 31 21:18:23 2014	(r270892, copy of r270096, head/share/man/man5/autofs.5)
@@ -0,0 +1,99 @@
+.\" Copyright (c) 2014 The FreeBSD Foundation
+.\" All rights reserved.
+.\"
+.\" This software was developed by Edward Tomasz Napierala under sponsorship
+.\" from the FreeBSD Foundation.
+.\"
+.\" 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 AUTHORS 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 AUTHORS 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$
+.\"
+.Dd July 14, 2014
+.Dt AUTOFS 5
+.Os
+.Sh NAME
+.Nm autofs
+.Nd "automounter filesystem"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in the
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "options AUTOFS"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+autofs_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver is the kernel component of the automounter infrastructure.
+Its job is to pass mount requests to the
+.Xr automountd 8
+daemon, and pause the processes trying to access the automounted filesystem
+until the mount is completed.
+It is mounted by the
+.Xr automount 8 .
+.Sh OPTIONS
+These options are available when
+mounting
+.Nm
+file systems:
+.Bl -tag -width indent
+.It Cm master_options
+Mount options for all filesystems specified in the map entry.
+.It Cm master_prefix
+Filesystem mountpoint prefix.
+.El
+.Sh EXAMPLES
+To unmount all mounted
+.Nm
+filesystems:
+.Pp
+.Dl "umount -At autofs"
+.Pp
+To mount
+.Nm
+filesystems specified in
+.Xr auto_master 5 :
+.Pp
+.Dl "automount"
+.Sh SEE ALSO
+.Xr auto_master 5 ,
+.Xr automount 8 ,
+.Xr automountd 8 ,
+.Xr autounmountd 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 10.2 .
+.Sh AUTHORS
+The
+.Nm
+was developed by
+.An Edward Tomasz Napierala Aq Mt trasz at FreeBSD.org
+under sponsorship from the FreeBSD Foundation.

Modified: stable/10/sys/conf/NOTES
==============================================================================
--- stable/10/sys/conf/NOTES	Sun Aug 31 20:47:10 2014	(r270891)
+++ stable/10/sys/conf/NOTES	Sun Aug 31 21:18:23 2014	(r270892)
@@ -1017,6 +1017,7 @@ options 	FFS			#Fast filesystem
 options 	NFSCLIENT		#Network File System client
 
 # The rest are optional:
+options 	AUTOFS			#Automounter filesystem
 options 	CD9660			#ISO 9660 filesystem
 options 	FDESCFS			#File descriptor filesystem
 options 	FUSE			#FUSE support module

Modified: stable/10/sys/conf/files
==============================================================================
--- stable/10/sys/conf/files	Sun Aug 31 20:47:10 2014	(r270891)
+++ stable/10/sys/conf/files	Sun Aug 31 21:18:23 2014	(r270892)
@@ -2589,6 +2589,9 @@ dev/xen/xenpci/xenpci.c		optional xenpci
 dev/xen/timer/timer.c		optional xen | xenhvm
 dev/xl/if_xl.c			optional xl pci
 dev/xl/xlphy.c			optional xl pci
+fs/autofs/autofs.c		optional autofs
+fs/autofs/autofs_vfsops.c	optional autofs
+fs/autofs/autofs_vnops.c	optional autofs
 fs/deadfs/dead_vnops.c		standard
 fs/devfs/devfs_devs.c		standard
 fs/devfs/devfs_dir.c		standard
@@ -3125,6 +3128,7 @@ libkern/strcmp.c		standard
 libkern/strcpy.c		standard
 libkern/strcspn.c		standard
 libkern/strdup.c		standard
+libkern/strndup.c		standard
 libkern/strlcat.c		standard
 libkern/strlcpy.c		standard
 libkern/strlen.c		standard

Modified: stable/10/sys/conf/options
==============================================================================
--- stable/10/sys/conf/options	Sun Aug 31 20:47:10 2014	(r270891)
+++ stable/10/sys/conf/options	Sun Aug 31 21:18:23 2014	(r270892)
@@ -218,6 +218,7 @@ INCLUDE_CONFIG_FILE	opt_config.h
 # time, since the corresponding lkms cannot work if there are any static
 # dependencies.  Unusability is enforced by hiding the defines for the
 # options in a never-included header.
+AUTOFS		opt_dontuse.h
 CD9660		opt_dontuse.h
 EXT2FS		opt_dontuse.h
 FDESCFS		opt_dontuse.h

Modified: stable/10/sys/kern/vfs_mount.c
==============================================================================
--- stable/10/sys/kern/vfs_mount.c	Sun Aug 31 20:47:10 2014	(r270891)
+++ stable/10/sys/kern/vfs_mount.c	Sun Aug 31 21:18:23 2014	(r270892)
@@ -649,6 +649,10 @@ vfs_donmount(struct thread *td, uint64_t
 			fsflags |= MNT_SYNCHRONOUS;
 		else if (strcmp(opt->name, "union") == 0)
 			fsflags |= MNT_UNION;
+		else if (strcmp(opt->name, "automounted") == 0) {
+			fsflags |= MNT_AUTOMOUNTED;
+			vfs_freeopt(optlist, opt);
+		}
 	}
 
 	/*

Copied: stable/10/sys/libkern/strndup.c (from r270096, head/sys/libkern/strndup.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/10/sys/libkern/strndup.c	Sun Aug 31 21:18:23 2014	(r270892, copy of r270096, head/sys/libkern/strndup.c)
@@ -0,0 +1,51 @@
+/*-
+ * Copyright (c) 2003 Networks Associates Technology, Inc.
+ * All rights reserved.
+ *
+ * This software was developed for the FreeBSD Project by Network
+ * Associates Laboratories, the Security Research Division of Network
+ * Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035
+ * ("CBOSS"), as part of the DARPA CHATS research program.
+ *
+ * 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.
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include 
+#include 
+#include 
+#include 
+
+char *
+strndup(const char *string, size_t maxlen, struct malloc_type *type)
+{
+	size_t len;
+	char *copy;
+
+	len = strnlen(string, maxlen) + 1;
+	copy = malloc(len, type, M_WAITOK);
+	bcopy(string, copy, len);
+	copy[len - 1] = '\0';
+	return (copy);
+}

Modified: stable/10/sys/modules/Makefile
==============================================================================
--- stable/10/sys/modules/Makefile	Sun Aug 31 20:47:10 2014	(r270891)
+++ stable/10/sys/modules/Makefile	Sun Aug 31 21:18:23 2014	(r270892)
@@ -44,6 +44,7 @@ SUBDIR=	\
 	ata \
 	ath \
 	ath_pci \
+	autofs \
 	${_auxio} \
 	${_bce} \
 	bfe \

Modified: stable/10/sys/sys/libkern.h
==============================================================================
--- stable/10/sys/sys/libkern.h	Sun Aug 31 20:47:10 2014	(r270891)
+++ stable/10/sys/sys/libkern.h	Sun Aug 31 21:18:23 2014	(r270892)
@@ -117,6 +117,7 @@ int	 strcmp(const char *, const char *);
 char	*strcpy(char * __restrict, const char * __restrict);
 size_t	 strcspn(const char * __restrict, const char * __restrict) __pure;
 char	*strdup(const char *__restrict, struct malloc_type *);
+char	*strndup(const char *__restrict, size_t, struct malloc_type *);
 size_t	 strlcat(char *, const char *, size_t);
 size_t	 strlcpy(char *, const char *, size_t);
 size_t	 strlen(const char *);

Modified: stable/10/sys/sys/mount.h
==============================================================================
--- stable/10/sys/sys/mount.h	Sun Aug 31 20:47:10 2014	(r270891)
+++ stable/10/sys/sys/mount.h	Sun Aug 31 21:18:23 2014	(r270892)
@@ -260,6 +260,7 @@ void          __mnt_vnode_markerfree_act
 #define	MNT_NOCLUSTERR	0x0000000040000000ULL /* disable cluster read */
 #define	MNT_NOCLUSTERW	0x0000000080000000ULL /* disable cluster write */
 #define	MNT_SUJ		0x0000000100000000ULL /* using journaled soft updates */
+#define	MNT_AUTOMOUNTED	0x0000000200000000ULL /* mounted by automountd(8) */
 
 /*
  * NFS export related mount flags.
@@ -296,7 +297,7 @@ void          __mnt_vnode_markerfree_act
 			MNT_NOCLUSTERW	| MNT_SUIDDIR	| MNT_SOFTDEP	| \
 			MNT_IGNORE	| MNT_EXPUBLIC	| MNT_NOSYMFOLLOW | \
 			MNT_GJOURNAL	| MNT_MULTILABEL | MNT_ACLS	| \
-			MNT_NFS4ACLS)
+			MNT_NFS4ACLS	| MNT_AUTOMOUNTED)
 
 /* Mask of flags that can be updated. */
 #define	MNT_UPDATEMASK (MNT_NOSUID	| MNT_NOEXEC	| \
@@ -304,7 +305,8 @@ void          __mnt_vnode_markerfree_act
 			MNT_NOATIME | \
 			MNT_NOSYMFOLLOW	| MNT_IGNORE	| \
 			MNT_NOCLUSTERR	| MNT_NOCLUSTERW | MNT_SUIDDIR	| \
-			MNT_ACLS	| MNT_USER | MNT_NFS4ACLS)
+			MNT_ACLS	| MNT_USER	| MNT_NFS4ACLS	| \
+			MNT_AUTOMOUNTED)
 
 /*
  * External filesystem command modifier flags.

Modified: stable/10/usr.sbin/Makefile
==============================================================================
--- stable/10/usr.sbin/Makefile	Sun Aug 31 20:47:10 2014	(r270891)
+++ stable/10/usr.sbin/Makefile	Sun Aug 31 21:18:23 2014	(r270892)
@@ -5,6 +5,7 @@
 
 SUBDIR=	adduser \
 	arp \
+	autofs \
 	binmiscctl \
 	bootparamd \
 	bsdconfig \

From trasz at FreeBSD.org  Sun Aug 31 21:43:29 2014
From: trasz at FreeBSD.org (Edward Tomasz Napierala)
Date: Sun, 31 Aug 2014 21:43:28 +0000 (UTC)
Subject: svn commit: r270894 - stable/10/sys/fs/autofs
Message-ID: <201408312143.s7VLhSFV086754@svn.freebsd.org>

Author: trasz
Date: Sun Aug 31 21:43:28 2014
New Revision: 270894
URL: http://svnweb.freebsd.org/changeset/base/270894

Log:
  MFC r270207:
  
  Rework ".." lookup; previous one failed to properly busy the mountpoint.
  
  Reviewed by:	kib@
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/sys/fs/autofs/autofs_vnops.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/autofs/autofs_vnops.c
==============================================================================
--- stable/10/sys/fs/autofs/autofs_vnops.c	Sun Aug 31 21:38:03 2014	(r270893)
+++ stable/10/sys/fs/autofs/autofs_vnops.c	Sun Aug 31 21:43:28 2014	(r270894)
@@ -198,6 +198,15 @@ mounted:
 }
 
 static int
+autofs_vget_callback(struct mount *mp, void *arg, int lkflags __unused,
+    struct vnode **vpp)
+{
+
+
+	return (autofs_node_vn(arg, mp, vpp));
+}
+
+static int
 autofs_lookup(struct vop_lookup_args *ap)
 {
 	struct vnode *dvp, *newvp, **vpp;
@@ -217,24 +226,19 @@ autofs_lookup(struct vop_lookup_args *ap
 	if (cnp->cn_flags & ISDOTDOT) {
 		KASSERT(anp->an_parent != NULL, ("NULL parent"));
 		/*
-		 * Note that in this case, dvp is the child vnode, and we are
-		 * looking up the parent vnode - exactly reverse from normal
-		 * operation.  To preserve lock order, we unlock the child
-		 * (dvp), obtain the lock on parent (*vpp) in autofs_node_vn(),
-		 * then relock the child.  We use vhold()/vdrop() to prevent
-		 * dvp from being freed in the meantime.
+		 * Note that in this case, dvp is the child vnode, and we
+		 * are looking up the parent vnode - exactly reverse from
+		 * normal operation.  Unlocking dvp requires some rather
+		 * tricky unlock/relock dance to prevent mp from being freed;
+		 * use vn_vget_ino_gen() which takes care of all that.
 		 */
-		lock_flags = VOP_ISLOCKED(dvp);
-		vhold(dvp);
-		VOP_UNLOCK(dvp, 0);
-		error = autofs_node_vn(anp->an_parent, mp, vpp);
+		error = vn_vget_ino_gen(dvp, autofs_vget_callback,
+		    anp->an_parent, 0, vpp);
 		if (error != 0) {
-			AUTOFS_WARN("autofs_node_vn() failed with error %d",
+			AUTOFS_WARN("vn_vget_ino_gen() failed with error %d",
 			    error);
+			return (error);
 		}
-		vn_lock(dvp, lock_flags | LK_RETRY);
-		vdrop(dvp);
-
 		return (error);
 	}
 

From trasz at FreeBSD.org  Sun Aug 31 21:45:08 2014
From: trasz at FreeBSD.org (Edward Tomasz Napierala)
Date: Sun, 31 Aug 2014 21:45:07 +0000 (UTC)
Subject: svn commit: r270895 - stable/10/sbin/mount
Message-ID: <201408312145.s7VLj77F087096@svn.freebsd.org>

Author: trasz
Date: Sun Aug 31 21:45:07 2014
New Revision: 270895
URL: http://svnweb.freebsd.org/changeset/base/270895

Log:
  MFC r270209:
  
  Add description for the "automounted" mount flag.
  
  Reviewed by:	emaste@
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/sbin/mount/mount.8
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/mount/mount.8
==============================================================================
--- stable/10/sbin/mount/mount.8	Sun Aug 31 21:43:28 2014	(r270894)
+++ stable/10/sbin/mount/mount.8	Sun Aug 31 21:45:07 2014	(r270895)
@@ -28,7 +28,7 @@
 .\"     @(#)mount.8	8.8 (Berkeley) 6/16/94
 .\" $FreeBSD$
 .\"
-.Dd June 6, 2011
+.Dd August 20, 2014
 .Dt MOUNT 8
 .Os
 .Sh NAME
@@ -150,6 +150,11 @@ For this reason, the
 .Cm async
 flag should be used sparingly, and only when some data recovery
 mechanism is present.
+.It Cm automounted
+This flag indicates that the file system was mounted by
+.Xr automountd 8 .
+Automounted file systems are automatically unmounted by
+.Xr autounmountd 8 .
 .It Cm current
 When used with the
 .Fl u

From trasz at FreeBSD.org  Sun Aug 31 21:46:33 2014
From: trasz at FreeBSD.org (Edward Tomasz Napierala)
Date: Sun, 31 Aug 2014 21:46:33 +0000 (UTC)
Subject: svn commit: r270896 - stable/10/usr.sbin/autofs
Message-ID: <201408312146.s7VLkXTD087329@svn.freebsd.org>

Author: trasz
Date: Sun Aug 31 21:46:32 2014
New Revision: 270896
URL: http://svnweb.freebsd.org/changeset/base/270896

Log:
  MFC r270210:
  
  Remove useless - and buggy, it resulted in spurious warnings in logs - code.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/usr.sbin/autofs/autounmountd.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/autofs/autounmountd.c
==============================================================================
--- stable/10/usr.sbin/autofs/autounmountd.c	Sun Aug 31 21:45:07 2014	(r270895)
+++ stable/10/usr.sbin/autofs/autounmountd.c	Sun Aug 31 21:46:32 2014	(r270896)
@@ -182,7 +182,6 @@ expire_automounted(double expiration_tim
 	time_t now;
 	double mounted_for, mounted_max = 0;
 	int error;
-	bool unmounted = false;
 
 	now = time(NULL);
 
@@ -211,20 +210,9 @@ expire_automounted(double expiration_tim
 		if (error != 0) {
 			if (mounted_for > mounted_max)
 				mounted_max = mounted_for;
-		} else {
-			unmounted = true;
 		}
 	}
 
-	if (unmounted) {
-		/*
-		 * Successful unmount of a filesystem could unbusy its parent
-		 * filesystem that can now be unmounted.
-		 */
-		log_debugx("filesystem got unmounted; go around");
-		return (expire_automounted(expiration_time));
-	}
-
 	return (mounted_max);
 }
 

From trasz at FreeBSD.org  Sun Aug 31 21:48:15 2014
From: trasz at FreeBSD.org (Edward Tomasz Napierala)
Date: Sun, 31 Aug 2014 21:48:13 +0000 (UTC)
Subject: svn commit: r270897 - in stable/10: sys/fs/autofs usr.sbin/autofs
Message-ID: <201408312148.s7VLmDCb087604@svn.freebsd.org>

Author: trasz
Date: Sun Aug 31 21:48:12 2014
New Revision: 270897
URL: http://svnweb.freebsd.org/changeset/base/270897

Log:
  MFC r270276:
  
  Use __FBSDID() properly.
  
  Suggested by:	pluknet@
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/sys/fs/autofs/autofs.c
  stable/10/sys/fs/autofs/autofs.h
  stable/10/sys/fs/autofs/autofs_vfsops.c
  stable/10/sys/fs/autofs/autofs_vnops.c
  stable/10/usr.sbin/autofs/automount.c
  stable/10/usr.sbin/autofs/automountd.c
  stable/10/usr.sbin/autofs/autounmountd.c
  stable/10/usr.sbin/autofs/common.c
  stable/10/usr.sbin/autofs/defined.c
  stable/10/usr.sbin/autofs/log.c
  stable/10/usr.sbin/autofs/popen.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/autofs/autofs.c
==============================================================================
--- stable/10/sys/fs/autofs/autofs.c	Sun Aug 31 21:46:32 2014	(r270896)
+++ stable/10/sys/fs/autofs/autofs.c	Sun Aug 31 21:48:12 2014	(r270897)
@@ -26,7 +26,6 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
  */
 /*-
  * Copyright (c) 1989, 1991, 1993, 1995
@@ -61,6 +60,9 @@
  *
  */
 
+#include 
+ __FBSDID("$FreeBSD$");
+
 #include 
 #include 
 #include 

Modified: stable/10/sys/fs/autofs/autofs.h
==============================================================================
--- stable/10/sys/fs/autofs/autofs.h	Sun Aug 31 21:46:32 2014	(r270896)
+++ stable/10/sys/fs/autofs/autofs.h	Sun Aug 31 21:48:12 2014	(r270897)
@@ -32,9 +32,6 @@
 #ifndef AUTOFS_H
 #define	AUTOFS_H
 
-#include 
-__FBSDID("$FreeBSD$");
-
 #define VFSTOAUTOFS(mp)    ((struct autofs_mount *)((mp)->mnt_data))
 
 MALLOC_DECLARE(M_AUTOFS);

Modified: stable/10/sys/fs/autofs/autofs_vfsops.c
==============================================================================
--- stable/10/sys/fs/autofs/autofs_vfsops.c	Sun Aug 31 21:46:32 2014	(r270896)
+++ stable/10/sys/fs/autofs/autofs_vfsops.c	Sun Aug 31 21:48:12 2014	(r270897)
@@ -26,9 +26,11 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
  */
 
+#include 
+ __FBSDID("$FreeBSD$");
+
 #include 
 #include 
 #include 

Modified: stable/10/sys/fs/autofs/autofs_vnops.c
==============================================================================
--- stable/10/sys/fs/autofs/autofs_vnops.c	Sun Aug 31 21:46:32 2014	(r270896)
+++ stable/10/sys/fs/autofs/autofs_vnops.c	Sun Aug 31 21:48:12 2014	(r270897)
@@ -26,7 +26,6 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
  */
 
 #include 

Modified: stable/10/usr.sbin/autofs/automount.c
==============================================================================
--- stable/10/usr.sbin/autofs/automount.c	Sun Aug 31 21:46:32 2014	(r270896)
+++ stable/10/usr.sbin/autofs/automount.c	Sun Aug 31 21:48:12 2014	(r270897)
@@ -26,9 +26,11 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
  */
 
+#include 
+__FBSDID("$FreeBSD$");
+
 #include 
 #include 
 #include 

Modified: stable/10/usr.sbin/autofs/automountd.c
==============================================================================
--- stable/10/usr.sbin/autofs/automountd.c	Sun Aug 31 21:46:32 2014	(r270896)
+++ stable/10/usr.sbin/autofs/automountd.c	Sun Aug 31 21:48:12 2014	(r270897)
@@ -26,9 +26,11 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
  */
 
+#include 
+__FBSDID("$FreeBSD$");
+
 #include 
 #include 
 #include 

Modified: stable/10/usr.sbin/autofs/autounmountd.c
==============================================================================
--- stable/10/usr.sbin/autofs/autounmountd.c	Sun Aug 31 21:46:32 2014	(r270896)
+++ stable/10/usr.sbin/autofs/autounmountd.c	Sun Aug 31 21:48:12 2014	(r270897)
@@ -26,9 +26,11 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
  */
 
+#include 
+__FBSDID("$FreeBSD$");
+
 #include 
 #include 
 #include 

Modified: stable/10/usr.sbin/autofs/common.c
==============================================================================
--- stable/10/usr.sbin/autofs/common.c	Sun Aug 31 21:46:32 2014	(r270896)
+++ stable/10/usr.sbin/autofs/common.c	Sun Aug 31 21:48:12 2014	(r270897)
@@ -26,9 +26,11 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
  */
 
+#include 
+__FBSDID("$FreeBSD$");
+
 #include 
 #include 
 #include 

Modified: stable/10/usr.sbin/autofs/defined.c
==============================================================================
--- stable/10/usr.sbin/autofs/defined.c	Sun Aug 31 21:46:32 2014	(r270896)
+++ stable/10/usr.sbin/autofs/defined.c	Sun Aug 31 21:48:12 2014	(r270897)
@@ -26,7 +26,6 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
  */
 
 /*
@@ -34,6 +33,9 @@
  * such as ${OSNAME}, in maps.
  */
 
+#include 
+__FBSDID("$FreeBSD$");
+
 #include 
 #include 
 #include 

Modified: stable/10/usr.sbin/autofs/log.c
==============================================================================
--- stable/10/usr.sbin/autofs/log.c	Sun Aug 31 21:46:32 2014	(r270896)
+++ stable/10/usr.sbin/autofs/log.c	Sun Aug 31 21:48:12 2014	(r270897)
@@ -26,9 +26,11 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
  */
 
+#include 
+__FBSDID("$FreeBSD$");
+
 #include 
 #include 
 #include 

Modified: stable/10/usr.sbin/autofs/popen.c
==============================================================================
--- stable/10/usr.sbin/autofs/popen.c	Sun Aug 31 21:46:32 2014	(r270896)
+++ stable/10/usr.sbin/autofs/popen.c	Sun Aug 31 21:48:12 2014	(r270897)
@@ -34,9 +34,11 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
  */
 
+#include 
+__FBSDID("$FreeBSD$");
+
 #include 
 #include 
 #include 

From trasz at FreeBSD.org  Sun Aug 31 21:49:46 2014
From: trasz at FreeBSD.org (Edward Tomasz Napierala)
Date: Sun, 31 Aug 2014 21:49:45 +0000 (UTC)
Subject: svn commit: r270898 - stable/10/sys/fs/autofs
Message-ID: <201408312149.s7VLnjab087998@svn.freebsd.org>

Author: trasz
Date: Sun Aug 31 21:49:45 2014
New Revision: 270898
URL: http://svnweb.freebsd.org/changeset/base/270898

Log:
  MFC r270281:
  
  Fix includes.
  
  Suggested by:	pluknet@
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/sys/fs/autofs/autofs.c
  stable/10/sys/fs/autofs/autofs_vfsops.c
  stable/10/sys/fs/autofs/autofs_vnops.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/autofs/autofs.c
==============================================================================
--- stable/10/sys/fs/autofs/autofs.c	Sun Aug 31 21:48:12 2014	(r270897)
+++ stable/10/sys/fs/autofs/autofs.c	Sun Aug 31 21:49:45 2014	(r270898)
@@ -80,8 +80,8 @@
 #include 
 #include 
 
-#include "autofs.h"
-#include "autofs_ioctl.h"
+#include 
+#include 
 
 MALLOC_DEFINE(M_AUTOFS, "autofs", "Automounter filesystem");
 

Modified: stable/10/sys/fs/autofs/autofs_vfsops.c
==============================================================================
--- stable/10/sys/fs/autofs/autofs_vfsops.c	Sun Aug 31 21:48:12 2014	(r270897)
+++ stable/10/sys/fs/autofs/autofs_vfsops.c	Sun Aug 31 21:49:45 2014	(r270898)
@@ -42,7 +42,7 @@
 #include 
 #include 
 
-#include "autofs.h"
+#include 
 
 static const char *autofs_opts[] = {
 	"from", "master_options", "master_prefix", NULL

Modified: stable/10/sys/fs/autofs/autofs_vnops.c
==============================================================================
--- stable/10/sys/fs/autofs/autofs_vnops.c	Sun Aug 31 21:48:12 2014	(r270897)
+++ stable/10/sys/fs/autofs/autofs_vnops.c	Sun Aug 31 21:49:45 2014	(r270898)
@@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#include "autofs.h"
+#include 
 
 static int	autofs_trigger_vn(struct vnode *vp, const char *path,
 		    int pathlen, struct vnode **newvp);

From trasz at FreeBSD.org  Sun Aug 31 21:51:02 2014
From: trasz at FreeBSD.org (Edward Tomasz Napierala)
Date: Sun, 31 Aug 2014 21:51:01 +0000 (UTC)
Subject: svn commit: r270899 - stable/10/sys/fs/autofs
Message-ID: <201408312151.s7VLp1Ka088739@svn.freebsd.org>

Author: trasz
Date: Sun Aug 31 21:51:01 2014
New Revision: 270899
URL: http://svnweb.freebsd.org/changeset/base/270899

Log:
  MFC r270399:
  
  Add comment explaining one of the quirks in autofs.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/sys/fs/autofs/autofs.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/autofs/autofs.c
==============================================================================
--- stable/10/sys/fs/autofs/autofs.c	Sun Aug 31 21:49:45 2014	(r270898)
+++ stable/10/sys/fs/autofs/autofs.c	Sun Aug 31 21:51:01 2014	(r270899)
@@ -595,6 +595,14 @@ autofs_open(struct cdev *dev, int flags,
 {
 
 	sx_xlock(&sc->sc_lock);
+	/*
+	 * We must never block automountd(8) and its descendants, and we use
+	 * session ID to determine that: we store session id of the process
+	 * that opened the device, and then compare it with session ids
+	 * of triggering processes.  This means running a second automountd(8)
+	 * instance would break the previous one.  The check below prevents
+	 * it from happening.
+	 */
 	if (sc->sc_dev_opened) {
 		sx_xunlock(&sc->sc_lock);
 		return (EBUSY);

From trasz at FreeBSD.org  Sun Aug 31 21:52:27 2014
From: trasz at FreeBSD.org (Edward Tomasz Napierala)
Date: Sun, 31 Aug 2014 21:52:26 +0000 (UTC)
Subject: svn commit: r270900 - stable/10/sys/fs/autofs
Message-ID: <201408312152.s7VLqQX0091808@svn.freebsd.org>

Author: trasz
Date: Sun Aug 31 21:52:26 2014
New Revision: 270900
URL: http://svnweb.freebsd.org/changeset/base/270900

Log:
  MFC r270402:
  
  Autofs softc needs to be global anyway, so don't pass it as a local
  variable, and don't store in autofs_mount.  Also rename it from 'sc'
  to 'autofs_softc', since it's global and extern.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/sys/fs/autofs/autofs.c
  stable/10/sys/fs/autofs/autofs.h
  stable/10/sys/fs/autofs/autofs_vfsops.c
  stable/10/sys/fs/autofs/autofs_vnops.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/autofs/autofs.c
==============================================================================
--- stable/10/sys/fs/autofs/autofs.c	Sun Aug 31 21:51:01 2014	(r270899)
+++ stable/10/sys/fs/autofs/autofs.c	Sun Aug 31 21:52:26 2014	(r270900)
@@ -115,7 +115,7 @@ int autofs_sig_set[] = {
 	SIGQUIT
 };
 
-struct autofs_softc	*sc;
+struct autofs_softc	*autofs_softc;
 
 SYSCTL_NODE(_vfs, OID_AUTO, autofs, CTLFLAG_RD, 0, "Automounter filesystem");
 int autofs_debug = 1;
@@ -153,7 +153,11 @@ autofs_init(struct vfsconf *vfsp)
 {
 	int error;
 
-	sc = malloc(sizeof(*sc), M_AUTOFS, M_WAITOK | M_ZERO);
+	KASSERT(autofs_softc == NULL,
+	    ("softc %p, should be NULL", autofs_softc));
+
+	autofs_softc = malloc(sizeof(*autofs_softc), M_AUTOFS,
+	    M_WAITOK | M_ZERO);
 
 	autofs_request_zone = uma_zcreate("autofs_request",
 	    sizeof(struct autofs_request), NULL, NULL, NULL, NULL,
@@ -162,18 +166,21 @@ autofs_init(struct vfsconf *vfsp)
 	    sizeof(struct autofs_node), NULL, NULL, NULL, NULL,
 	    UMA_ALIGN_PTR, 0);
 
-	TAILQ_INIT(&sc->sc_requests);
-	cv_init(&sc->sc_cv, "autofscv");
-	sx_init(&sc->sc_lock, "autofslk");
+	TAILQ_INIT(&autofs_softc->sc_requests);
+	cv_init(&autofs_softc->sc_cv, "autofscv");
+	sx_init(&autofs_softc->sc_lock, "autofslk");
 
-	error = make_dev_p(MAKEDEV_CHECKNAME, &sc->sc_cdev, &autofs_cdevsw,
-	    NULL, UID_ROOT, GID_WHEEL, 0600, "autofs");
+	error = make_dev_p(MAKEDEV_CHECKNAME, &autofs_softc->sc_cdev,
+	    &autofs_cdevsw, NULL, UID_ROOT, GID_WHEEL, 0600, "autofs");
 	if (error != 0) {
 		AUTOFS_WARN("failed to create device node, error %d", error);
-		free(sc, M_AUTOFS);
+		uma_zdestroy(autofs_request_zone);
+		uma_zdestroy(autofs_node_zone);
+		free(autofs_softc, M_AUTOFS);
+
 		return (error);
 	}
-	sc->sc_cdev->si_drv1 = sc;
+	autofs_softc->sc_cdev->si_drv1 = autofs_softc;
 
 	return (0);
 }
@@ -182,22 +189,22 @@ int
 autofs_uninit(struct vfsconf *vfsp)
 {
 
-	sx_xlock(&sc->sc_lock);
-	if (sc->sc_dev_opened) {
-		sx_xunlock(&sc->sc_lock);
+	sx_xlock(&autofs_softc->sc_lock);
+	if (autofs_softc->sc_dev_opened) {
+		sx_xunlock(&autofs_softc->sc_lock);
 		return (EBUSY);
 	}
-	if (sc->sc_cdev != NULL)
-		destroy_dev(sc->sc_cdev);
+	if (autofs_softc->sc_cdev != NULL)
+		destroy_dev(autofs_softc->sc_cdev);
 
 	uma_zdestroy(autofs_request_zone);
 	uma_zdestroy(autofs_node_zone);
 
-	sx_xunlock(&sc->sc_lock);
+	sx_xunlock(&autofs_softc->sc_lock);
 	/*
 	 * XXX: Race with open?
 	 */
-	free(sc, M_AUTOFS);
+	free(autofs_softc, M_AUTOFS);
 
 	return (0);
 }
@@ -209,11 +216,11 @@ autofs_ignore_thread(const struct thread
 
 	p = td->td_proc;
 
-	if (sc->sc_dev_opened == false)
+	if (autofs_softc->sc_dev_opened == false)
 		return (false);
 
 	PROC_LOCK(p);
-	if (p->p_session->s_sid == sc->sc_dev_sid) {
+	if (p->p_session->s_sid == autofs_softc->sc_dev_sid) {
 		PROC_UNLOCK(p);
 		return (true);
 	}
@@ -256,12 +263,10 @@ static void
 autofs_callout(void *context)
 {
 	struct autofs_request *ar;
-	struct autofs_softc *sc;
 
 	ar = context;
-	sc = ar->ar_mount->am_softc;
 
-	sx_xlock(&sc->sc_lock);
+	sx_xlock(&autofs_softc->sc_lock);
 	AUTOFS_WARN("request %d for %s timed out after %d seconds",
 	    ar->ar_id, ar->ar_path, autofs_timeout);
 	/*
@@ -270,8 +275,8 @@ autofs_callout(void *context)
 	ar->ar_error = ETIMEDOUT;
 	ar->ar_done = true;
 	ar->ar_in_progress = false;
-	cv_broadcast(&sc->sc_cv);
-	sx_xunlock(&sc->sc_lock);
+	cv_broadcast(&autofs_softc->sc_cv);
+	sx_xunlock(&autofs_softc->sc_lock);
 }
 
 bool
@@ -356,16 +361,14 @@ autofs_trigger_one(struct autofs_node *a
 {
 	sigset_t oldset;
 	struct autofs_mount *amp;
-	struct autofs_softc *sc;
 	struct autofs_node *firstanp;
 	struct autofs_request *ar;
 	char *key, *path;
 	int error = 0, request_error, last;
 
 	amp = VFSTOAUTOFS(anp->an_vnode->v_mount);
-	sc = amp->am_softc;
 
-	sx_assert(&sc->sc_lock, SA_XLOCKED);
+	sx_assert(&autofs_softc->sc_lock, SA_XLOCKED);
 
 	if (anp->an_parent == NULL) {
 		key = strndup(component, componentlen, M_AUTOFS);
@@ -378,7 +381,7 @@ autofs_trigger_one(struct autofs_node *a
 
 	path = autofs_path(anp);
 
-	TAILQ_FOREACH(ar, &sc->sc_requests, ar_next) {
+	TAILQ_FOREACH(ar, &autofs_softc->sc_requests, ar_next) {
 		if (strcmp(ar->ar_path, path) != 0)
 			continue;
 		if (strcmp(ar->ar_key, key) != 0)
@@ -402,7 +405,8 @@ autofs_trigger_one(struct autofs_node *a
 		ar = uma_zalloc(autofs_request_zone, M_WAITOK | M_ZERO);
 		ar->ar_mount = amp;
 
-		ar->ar_id = atomic_fetchadd_int(&sc->sc_last_request_id, 1);
+		ar->ar_id =
+		    atomic_fetchadd_int(&autofs_softc->sc_last_request_id, 1);
 		strlcpy(ar->ar_from, amp->am_from, sizeof(ar->ar_from));
 		strlcpy(ar->ar_path, path, sizeof(ar->ar_path));
 		strlcpy(ar->ar_prefix, amp->am_prefix, sizeof(ar->ar_prefix));
@@ -414,14 +418,15 @@ autofs_trigger_one(struct autofs_node *a
 		callout_reset(&ar->ar_callout,
 		    autofs_timeout * hz, autofs_callout, ar);
 		refcount_init(&ar->ar_refcount, 1);
-		TAILQ_INSERT_TAIL(&sc->sc_requests, ar, ar_next);
+		TAILQ_INSERT_TAIL(&autofs_softc->sc_requests, ar, ar_next);
 	}
 
-	cv_broadcast(&sc->sc_cv);
+	cv_broadcast(&autofs_softc->sc_cv);
 	while (ar->ar_done == false) {
 		if (autofs_interruptible != 0) {
 			autofs_set_sigmask(&oldset);
-			error = cv_wait_sig(&sc->sc_cv, &sc->sc_lock);
+			error = cv_wait_sig(&autofs_softc->sc_cv,
+			    &autofs_softc->sc_lock);
 			autofs_restore_sigmask(&oldset);
 			if (error != 0) {
 				/*
@@ -434,7 +439,7 @@ autofs_trigger_one(struct autofs_node *a
 				break;
 			}
 		} else {
-			cv_wait(&sc->sc_cv, &sc->sc_lock);
+			cv_wait(&autofs_softc->sc_cv, &autofs_softc->sc_lock);
 		}
 	}
 
@@ -446,13 +451,13 @@ autofs_trigger_one(struct autofs_node *a
 
 	last = refcount_release(&ar->ar_refcount);
 	if (last) {
-		TAILQ_REMOVE(&sc->sc_requests, ar, ar_next);
+		TAILQ_REMOVE(&autofs_softc->sc_requests, ar, ar_next);
 		/*
 		 * XXX: Is it safe?
 		 */
-		sx_xunlock(&sc->sc_lock);
+		sx_xunlock(&autofs_softc->sc_lock);
 		callout_drain(&ar->ar_callout);
-		sx_xlock(&sc->sc_lock);
+		sx_xlock(&autofs_softc->sc_lock);
 		uma_zfree(autofs_request_zone, ar);
 	}
 
@@ -507,21 +512,21 @@ autofs_trigger(struct autofs_node *anp,
 		AUTOFS_DEBUG("trigger failed with error %d; will retry in "
 		    "%d seconds, %d attempts left", error, autofs_retry_delay,
 		    autofs_retry_attempts - anp->an_retries);
-		sx_xunlock(&sc->sc_lock);
+		sx_xunlock(&autofs_softc->sc_lock);
 		pause("autofs_retry", autofs_retry_delay * hz);
-		sx_xlock(&sc->sc_lock);
+		sx_xlock(&autofs_softc->sc_lock);
 	}
 }
 
 static int
-autofs_ioctl_request(struct autofs_softc *sc, struct autofs_daemon_request *adr)
+autofs_ioctl_request(struct autofs_daemon_request *adr)
 {
 	struct autofs_request *ar;
 	int error;
 
-	sx_xlock(&sc->sc_lock);
+	sx_xlock(&autofs_softc->sc_lock);
 	for (;;) {
-		TAILQ_FOREACH(ar, &sc->sc_requests, ar_next) {
+		TAILQ_FOREACH(ar, &autofs_softc->sc_requests, ar_next) {
 			if (ar->ar_done)
 				continue;
 			if (ar->ar_in_progress)
@@ -533,21 +538,22 @@ autofs_ioctl_request(struct autofs_softc
 		if (ar != NULL)
 			break;
 
-		error = cv_wait_sig(&sc->sc_cv, &sc->sc_lock);
+		error = cv_wait_sig(&autofs_softc->sc_cv,
+		    &autofs_softc->sc_lock);
 		if (error != 0) {
 			/*
 			 * XXX: For some reson this returns -1 instead
 			 * 	of EINTR, wtf?!
 			 */
 			error = EINTR;
-			sx_xunlock(&sc->sc_lock);
+			sx_xunlock(&autofs_softc->sc_lock);
 			AUTOFS_DEBUG("failed with error %d", error);
 			return (error);
 		}
 	}
 
 	ar->ar_in_progress = true;
-	sx_xunlock(&sc->sc_lock);
+	sx_xunlock(&autofs_softc->sc_lock);
 
 	adr->adr_id = ar->ar_id;
 	strlcpy(adr->adr_from, ar->ar_from, sizeof(adr->adr_from));
@@ -557,25 +563,25 @@ autofs_ioctl_request(struct autofs_softc
 	strlcpy(adr->adr_options, ar->ar_options, sizeof(adr->adr_options));
 
 	PROC_LOCK(curproc);
-	sc->sc_dev_sid = curproc->p_session->s_sid;
+	autofs_softc->sc_dev_sid = curproc->p_session->s_sid;
 	PROC_UNLOCK(curproc);
 
 	return (0);
 }
 
 static int
-autofs_ioctl_done(struct autofs_softc *sc, struct autofs_daemon_done *add)
+autofs_ioctl_done(struct autofs_daemon_done *add)
 {
 	struct autofs_request *ar;
 
-	sx_xlock(&sc->sc_lock);
-	TAILQ_FOREACH(ar, &sc->sc_requests, ar_next) {
+	sx_xlock(&autofs_softc->sc_lock);
+	TAILQ_FOREACH(ar, &autofs_softc->sc_requests, ar_next) {
 		if (ar->ar_id == add->add_id)
 			break;
 	}
 
 	if (ar == NULL) {
-		sx_xunlock(&sc->sc_lock);
+		sx_xunlock(&autofs_softc->sc_lock);
 		AUTOFS_DEBUG("id %d not found", add->add_id);
 		return (ESRCH);
 	}
@@ -583,9 +589,9 @@ autofs_ioctl_done(struct autofs_softc *s
 	ar->ar_error = add->add_error;
 	ar->ar_done = true;
 	ar->ar_in_progress = false;
-	cv_broadcast(&sc->sc_cv);
+	cv_broadcast(&autofs_softc->sc_cv);
 
-	sx_xunlock(&sc->sc_lock);
+	sx_xunlock(&autofs_softc->sc_lock);
 
 	return (0);
 }
@@ -594,7 +600,7 @@ static int
 autofs_open(struct cdev *dev, int flags, int fmt, struct thread *td)
 {
 
-	sx_xlock(&sc->sc_lock);
+	sx_xlock(&autofs_softc->sc_lock);
 	/*
 	 * We must never block automountd(8) and its descendants, and we use
 	 * session ID to determine that: we store session id of the process
@@ -603,13 +609,13 @@ autofs_open(struct cdev *dev, int flags,
 	 * instance would break the previous one.  The check below prevents
 	 * it from happening.
 	 */
-	if (sc->sc_dev_opened) {
-		sx_xunlock(&sc->sc_lock);
+	if (autofs_softc->sc_dev_opened) {
+		sx_xunlock(&autofs_softc->sc_lock);
 		return (EBUSY);
 	}
 
-	sc->sc_dev_opened = true;
-	sx_xunlock(&sc->sc_lock);
+	autofs_softc->sc_dev_opened = true;
+	sx_xunlock(&autofs_softc->sc_lock);
 
 	return (0);
 }
@@ -618,10 +624,10 @@ static int
 autofs_close(struct cdev *dev, int flag, int fmt, struct thread *td)
 {
 
-	sx_xlock(&sc->sc_lock);
-	KASSERT(sc->sc_dev_opened, ("not opened?"));
-	sc->sc_dev_opened = false;
-	sx_xunlock(&sc->sc_lock);
+	sx_xlock(&autofs_softc->sc_lock);
+	KASSERT(autofs_softc->sc_dev_opened, ("not opened?"));
+	autofs_softc->sc_dev_opened = false;
+	sx_xunlock(&autofs_softc->sc_lock);
 
 	return (0);
 }
@@ -631,14 +637,14 @@ autofs_ioctl(struct cdev *dev, u_long cm
     struct thread *td)
 {
 
-	KASSERT(sc->sc_dev_opened, ("not opened?"));
+	KASSERT(autofs_softc->sc_dev_opened, ("not opened?"));
 
 	switch (cmd) {
 	case AUTOFSREQUEST:
-		return (autofs_ioctl_request(sc,
+		return (autofs_ioctl_request(
 		    (struct autofs_daemon_request *)arg));
 	case AUTOFSDONE:
-		return (autofs_ioctl_done(sc,
+		return (autofs_ioctl_done(
 		    (struct autofs_daemon_done *)arg));
 	default:
 		AUTOFS_DEBUG("invalid cmd %lx", cmd);

Modified: stable/10/sys/fs/autofs/autofs.h
==============================================================================
--- stable/10/sys/fs/autofs/autofs.h	Sun Aug 31 21:51:01 2014	(r270899)
+++ stable/10/sys/fs/autofs/autofs.h	Sun Aug 31 21:52:26 2014	(r270900)
@@ -75,7 +75,6 @@ struct autofs_node {
 
 struct autofs_mount {
 	TAILQ_ENTRY(autofs_mount)	am_next;
-	struct autofs_softc		*am_softc;
 	struct autofs_node		*am_root;
 	struct mount			*am_mp;
 	struct sx			am_lock;

Modified: stable/10/sys/fs/autofs/autofs_vfsops.c
==============================================================================
--- stable/10/sys/fs/autofs/autofs_vfsops.c	Sun Aug 31 21:51:01 2014	(r270899)
+++ stable/10/sys/fs/autofs/autofs_vfsops.c	Sun Aug 31 21:52:26 2014	(r270900)
@@ -48,7 +48,7 @@ static const char *autofs_opts[] = {
 	"from", "master_options", "master_prefix", NULL
 };
 
-extern struct autofs_softc	*sc;
+extern struct autofs_softc	*autofs_softc;
 
 static int
 autofs_mount(struct mount *mp)
@@ -78,7 +78,6 @@ autofs_mount(struct mount *mp)
 	amp = malloc(sizeof(*amp), M_AUTOFS, M_WAITOK | M_ZERO);
 	mp->mnt_data = amp;
 	amp->am_mp = mp;
-	amp->am_softc = sc;
 	strlcpy(amp->am_from, from, sizeof(amp->am_from));
 	strlcpy(amp->am_mountpoint, fspath, sizeof(amp->am_mountpoint));
 	strlcpy(amp->am_options, options, sizeof(amp->am_options));
@@ -129,8 +128,8 @@ autofs_unmount(struct mount *mp, int mnt
 	 */
 	for (;;) {
 		found = false;
-		sx_xlock(&sc->sc_lock);
-		TAILQ_FOREACH(ar, &sc->sc_requests, ar_next) {
+		sx_xlock(&autofs_softc->sc_lock);
+		TAILQ_FOREACH(ar, &autofs_softc->sc_requests, ar_next) {
 			if (ar->ar_mount != amp)
 				continue;
 			ar->ar_error = ENXIO;
@@ -138,11 +137,11 @@ autofs_unmount(struct mount *mp, int mnt
 			ar->ar_in_progress = false;
 			found = true;
 		}
-		sx_xunlock(&sc->sc_lock);
+		sx_xunlock(&autofs_softc->sc_lock);
 		if (found == false)
 			break;
 
-		cv_broadcast(&sc->sc_cv);
+		cv_broadcast(&autofs_softc->sc_cv);
 		pause("autofs_umount", 1);
 	}
 

Modified: stable/10/sys/fs/autofs/autofs_vnops.c
==============================================================================
--- stable/10/sys/fs/autofs/autofs_vnops.c	Sun Aug 31 21:51:01 2014	(r270899)
+++ stable/10/sys/fs/autofs/autofs_vnops.c	Sun Aug 31 21:52:26 2014	(r270900)
@@ -51,6 +51,8 @@ __FBSDID("$FreeBSD$");
 static int	autofs_trigger_vn(struct vnode *vp, const char *path,
 		    int pathlen, struct vnode **newvp);
 
+extern struct autofs_softc	*autofs_softc;
+
 static int
 autofs_access(struct vop_access_args *ap)
 {
@@ -134,12 +136,10 @@ autofs_trigger_vn(struct vnode *vp, cons
 {
 	struct autofs_node *anp;
 	struct autofs_mount *amp;
-	struct autofs_softc *sc;
 	int error, lock_flags;
 
 	anp = vp->v_data;
 	amp = VFSTOAUTOFS(vp->v_mount);
-	sc = amp->am_softc;
 
 	/*
 	 * Release the vnode lock, so that other operations, in partcular
@@ -151,7 +151,7 @@ autofs_trigger_vn(struct vnode *vp, cons
 	vref(vp);
 	VOP_UNLOCK(vp, 0);
 
-	sx_xlock(&sc->sc_lock);
+	sx_xlock(&autofs_softc->sc_lock);
 
 	/*
 	 * XXX: Workaround for mounting the same thing multiple times; revisit.
@@ -163,7 +163,7 @@ autofs_trigger_vn(struct vnode *vp, cons
 
 	error = autofs_trigger(anp, path, pathlen);
 mounted:
-	sx_xunlock(&sc->sc_lock);
+	sx_xunlock(&autofs_softc->sc_lock);
 	vn_lock(vp, lock_flags | LK_RETRY);
 	vunref(vp);
 	if ((vp->v_iflag & VI_DOOMED) != 0) {

From trasz at FreeBSD.org  Sun Aug 31 21:53:43 2014
From: trasz at FreeBSD.org (Edward Tomasz Napierala)
Date: Sun, 31 Aug 2014 21:53:42 +0000 (UTC)
Subject: svn commit: r270901 - stable/10/usr.sbin/autofs
Message-ID: <201408312153.s7VLrgQl092020@svn.freebsd.org>

Author: trasz
Date: Sun Aug 31 21:53:42 2014
New Revision: 270901
URL: http://svnweb.freebsd.org/changeset/base/270901

Log:
  MFC r270405:
  
  Don't fail on executable maps that return no entries.  This turns useless
  error message into useful one.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/usr.sbin/autofs/common.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/autofs/common.c
==============================================================================
--- stable/10/usr.sbin/autofs/common.c	Sun Aug 31 21:52:26 2014	(r270900)
+++ stable/10/usr.sbin/autofs/common.c	Sun Aug 31 21:53:42 2014	(r270901)
@@ -716,7 +716,13 @@ parse_map_yyin(struct node *parent, cons
 	for (;;) {
 		ret = yylex();
 		if (ret == 0 || ret == NEWLINE) {
-			if (key != NULL || options != NULL) {
+			/*
+			 * In case of executable map, the key is always
+			 * non-NULL, even if the map is empty.  So, make sure
+			 * we don't fail empty maps here.
+			 */
+			if ((key != NULL && executable_key == NULL) ||
+			    options != NULL) {
 				log_errx(1, "truncated entry at %s, line %d",
 				    map, lineno);
 			}

From trasz at FreeBSD.org  Sun Aug 31 21:55:10 2014
From: trasz at FreeBSD.org (Edward Tomasz Napierala)
Date: Sun, 31 Aug 2014 21:55:09 +0000 (UTC)
Subject: svn commit: r270902 - in stable/10: etc usr.sbin/autofs
Message-ID: <201408312155.s7VLt9Wf092323@svn.freebsd.org>

Author: trasz
Date: Sun Aug 31 21:55:08 2014
New Revision: 270902
URL: http://svnweb.freebsd.org/changeset/base/270902

Log:
  MFC r270406:
  
  Add "nobrowse" option.  Previously automountd(8) always behaved as if
  it was set, now it's conditional.
  
  PR:		192862
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/etc/auto_master
  stable/10/usr.sbin/autofs/auto_master.5
  stable/10/usr.sbin/autofs/automountd.c
  stable/10/usr.sbin/autofs/common.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/etc/auto_master
==============================================================================
--- stable/10/etc/auto_master	Sun Aug 31 21:53:42 2014	(r270901)
+++ stable/10/etc/auto_master	Sun Aug 31 21:55:08 2014	(r270902)
@@ -2,4 +2,4 @@
 #
 # Automounter master map, see auto_master(5) for details.
 #
-/net		-hosts		-nosuid
+/net		-hosts		-nobrowse,nosuid

Modified: stable/10/usr.sbin/autofs/auto_master.5
==============================================================================
--- stable/10/usr.sbin/autofs/auto_master.5	Sun Aug 31 21:53:42 2014	(r270901)
+++ stable/10/usr.sbin/autofs/auto_master.5	Sun Aug 31 21:55:08 2014	(r270902)
@@ -27,7 +27,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd July 31, 2014
+.Dd August 23, 2014
 .Dt AUTO_MASTER 5
 .Os
 .Sh NAME
@@ -134,6 +134,10 @@ is used to specify filesystem type.
 It is not passed to the mount program as an option.
 Instead, it is passed as argument to
 .Cm "mount -t".
+The special option
+.Li nobrowse
+is used to disable creation of top-level directories for special
+and executable maps.
 .Pp
 The optional
 .Pa mountpoint

Modified: stable/10/usr.sbin/autofs/automountd.c
==============================================================================
--- stable/10/usr.sbin/autofs/automountd.c	Sun Aug 31 21:53:42 2014	(r270901)
+++ stable/10/usr.sbin/autofs/automountd.c	Sun Aug 31 21:55:08 2014	(r270902)
@@ -182,7 +182,7 @@ handle_request(const struct autofs_daemo
 	const char *map;
 	struct node *root, *parent, *node;
 	FILE *f;
-	char *options, *fstype, *retrycnt, *tmp;
+	char *options, *fstype, *nobrowse, *retrycnt, *tmp;
 	int error;
 
 	log_debugx("got request %d: from %s, path %s, prefix \"%s\", "
@@ -222,6 +222,28 @@ handle_request(const struct autofs_daemo
 		log_debugx("found node defined at %s:%d; not a mountpoint",
 		    node->n_config_file, node->n_config_line);
 
+		options = node_options(node);
+
+		/*
+		 * Prepend options passed via automountd(8) command line.
+		 */
+		if (cmdline_options != NULL) {
+			options =
+			    separated_concat(cmdline_options, options, ',');
+		}
+
+		nobrowse = pick_option("nobrowse", &options);
+		if (nobrowse != NULL && adr->adr_key[0] == '\0') {
+			log_debugx("skipping map %s due to \"nobrowse\" "
+			    "option; exiting", map);
+			done(0);
+
+			/*
+			 * Exit without calling exit_callback().
+			 */
+			quick_exit(0);
+		}
+
 		/*
 		 * Not a mountpoint; create directories in the autofs mount
 		 * and complete the request.
@@ -239,9 +261,9 @@ handle_request(const struct autofs_daemo
 			if (node != NULL)
 				create_subtree(node, false);
 		}
-		done(0);
 
 		log_debugx("nothing to mount; exiting");
+		done(0);
 
 		/*
 		 * Exit without calling exit_callback().
@@ -274,6 +296,11 @@ handle_request(const struct autofs_daemo
 	options = separated_concat(options, "automounted", ',');
 
 	/*
+	 * Remove "nobrowse", mount(8) doesn't understand it.
+	 */
+	pick_option("nobrowse", &options);
+
+	/*
 	 * Figure out fstype.
 	 */
 	fstype = pick_option("fstype=", &options);
@@ -309,8 +336,8 @@ handle_request(const struct autofs_daemo
 	if (error != 0)
 		log_errx(1, "mount failed");
 
-	done(0);
 	log_debugx("mount done; exiting");
+	done(0);
 
 	/*
 	 * Exit without calling exit_callback().

Modified: stable/10/usr.sbin/autofs/common.c
==============================================================================
--- stable/10/usr.sbin/autofs/common.c	Sun Aug 31 21:53:42 2014	(r270901)
+++ stable/10/usr.sbin/autofs/common.c	Sun Aug 31 21:55:08 2014	(r270902)
@@ -856,6 +856,36 @@ again:
 	}
 }
 
+/*
+ * Parse output of a special map called without argument.  This is just
+ * a list of keys.
+ */
+static void
+parse_map_keys_yyin(struct node *parent, const char *map)
+{
+	char *key = NULL;
+	int ret;
+
+	lineno = 1;
+
+	for (;;) {
+		ret = yylex();
+
+		if (ret == NEWLINE)
+			continue;
+
+		if (ret == 0) {
+			/*
+			 * End of file.
+			 */
+			break;
+		}
+
+		key = checked_strdup(yytext);
+		node_new(parent, key, NULL, NULL, map, lineno);
+	}
+}
+
 static bool
 file_is_executable(const char *path)
 {
@@ -882,11 +912,6 @@ parse_special_map(struct node *parent, c
 
 	assert(map[0] == '-');
 
-	if (key == NULL) {
-		log_debugx("skipping map %s due to forced -nobrowse", map);
-		return;
-	}
-
 	/*
 	 * +1 to skip leading "-" in map name.
 	 */
@@ -897,7 +922,11 @@ parse_special_map(struct node *parent, c
 	yyin = auto_popen(path, key, NULL);
 	assert(yyin != NULL);
 
-	parse_map_yyin(parent, map, key);
+	if (key == NULL) {
+		parse_map_keys_yyin(parent, map);
+	} else {
+		parse_map_yyin(parent, map, key);
+	}
 
 	error = auto_pclose(yyin);
 	yyin = NULL;

From trasz at FreeBSD.org  Sun Aug 31 21:56:42 2014
From: trasz at FreeBSD.org (Edward Tomasz Napierala)
Date: Sun, 31 Aug 2014 21:56:42 +0000 (UTC)
Subject: svn commit: r270903 - stable/10/usr.sbin/autofs
Message-ID: <201408312156.s7VLugr1092580@svn.freebsd.org>

Author: trasz
Date: Sun Aug 31 21:56:42 2014
New Revision: 270903
URL: http://svnweb.freebsd.org/changeset/base/270903

Log:
  MFC r270454:
  
  Fix handling of keys in executable maps.  Previously it was broken for keys
  containing whitespace.
  
  PR:		192947
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/usr.sbin/autofs/common.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/autofs/common.c
==============================================================================
--- stable/10/usr.sbin/autofs/common.c	Sun Aug 31 21:55:08 2014	(r270902)
+++ stable/10/usr.sbin/autofs/common.c	Sun Aug 31 21:56:42 2014	(r270903)
@@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#define	_WITH_GETLINE
 #include 
 #include 
 #include 
@@ -213,6 +214,7 @@ node_new(struct node *parent, char *key,
 
 	TAILQ_INIT(&n->n_children);
 	assert(key != NULL);
+	assert(key[0] != '\0');
 	n->n_key = key;
 	if (options != NULL)
 		n->n_options = options;
@@ -243,6 +245,7 @@ node_new_map(struct node *parent, char *
 
 	TAILQ_INIT(&n->n_children);
 	assert(key != NULL);
+	assert(key[0] != '\0');
 	n->n_key = key;
 	if (options != NULL)
 		n->n_options = options;
@@ -565,6 +568,7 @@ node_path_x(const struct node *n, char *
 		return (x);
 	}
 
+	assert(n->n_key[0] != '\0');
 	path = separated_concat(n->n_key, x, '/');
 	free(x);
 
@@ -857,33 +861,44 @@ again:
 }
 
 /*
- * Parse output of a special map called without argument.  This is just
- * a list of keys.
+ * Parse output of a special map called without argument.  It is a list
+ * of keys, separated by newlines.  They can contain whitespace, so use
+ * getline(3) instead of lexer used for maps.
  */
 static void
 parse_map_keys_yyin(struct node *parent, const char *map)
 {
-	char *key = NULL;
-	int ret;
+	char *line = NULL, *key;
+	size_t linecap = 0;
+	ssize_t linelen;
 
 	lineno = 1;
 
 	for (;;) {
-		ret = yylex();
-
-		if (ret == NEWLINE)
-			continue;
-
-		if (ret == 0) {
+		linelen = getline(&line, &linecap, yyin);
+		if (linelen < 0) {
 			/*
 			 * End of file.
 			 */
 			break;
 		}
+		if (linelen <= 1) {
+			/*
+			 * Empty line, consisting of just the newline.
+			 */
+			continue;
+		}
+
+		/*
+		 * "-1" to strip the trailing newline.
+		 */
+		key = strndup(line, linelen - 1);
 
-		key = checked_strdup(yytext);
+		log_debugx("adding key \"%s\"", key);
 		node_new(parent, key, NULL, NULL, map, lineno);
+		lineno++;
 	}
+	free(line);
 }
 
 static bool

From trasz at FreeBSD.org  Sun Aug 31 21:58:08 2014
From: trasz at FreeBSD.org (Edward Tomasz Napierala)
Date: Sun, 31 Aug 2014 21:58:08 +0000 (UTC)
Subject: svn commit: r270904 - stable/10/sys/fs/autofs
Message-ID: <201408312158.s7VLw8ZE092841@svn.freebsd.org>

Author: trasz
Date: Sun Aug 31 21:58:07 2014
New Revision: 270904
URL: http://svnweb.freebsd.org/changeset/base/270904

Log:
  MFC r270507:
  
  Fix bug that, assuming a/ is a root of NFS filesystem mounted on autofs,
  prevented "mv a/from a/to" from working, while "cd a && mv from to" was ok.
  
  PR:		192948
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/sys/fs/autofs/autofs_vnops.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/autofs/autofs_vnops.c
==============================================================================
--- stable/10/sys/fs/autofs/autofs_vnops.c	Sun Aug 31 21:56:42 2014	(r270903)
+++ stable/10/sys/fs/autofs/autofs_vnops.c	Sun Aug 31 21:58:07 2014	(r270904)
@@ -276,9 +276,6 @@ autofs_lookup(struct vop_lookup_args *ap
 		}
 	}
 
-	if (cnp->cn_nameiop == RENAME)
-		return (EOPNOTSUPP);
-
 	AUTOFS_LOCK(amp);
 	error = autofs_node_find(anp, cnp->cn_nameptr, cnp->cn_namelen, &child);
 	if (error != 0) {

From ngie at FreeBSD.org  Sun Aug 31 23:09:26 2014
From: ngie at FreeBSD.org (Garrett Cooper)
Date: Sun, 31 Aug 2014 23:09:23 +0000 (UTC)
Subject: svn commit: r270905 - in stable/10: . contrib/atf contrib/atf/atf-c
 contrib/atf/atf-c++ contrib/atf/atf-sh etc/mtree lib/atf/libatf-c
 lib/atf/libatf-c++ lib/atf/libatf-c++/tests lib/atf/libatf-c/te...
Message-ID: <201408312309.s7VN9NuI026535@svn.freebsd.org>

Author: ngie
Date: Sun Aug 31 23:09:23 2014
New Revision: 270905
URL: http://svnweb.freebsd.org/changeset/base/270905

Log:
  MFC r266650, r267172 (both by jmmv):
  
  r266650:
  
    Change libatf-c and libatf-c++ to be private libraries.
  
    We should not be leaking these interfaces to the outside world given
    that it's much easier for third-party components to use the devel/atf
    package from ports.
  
    As a side-effect, we can also drop the ATF pkgconfig and aclocal files
    from the base system.  Nothing in the base system needs these, and it
    was quite ugly to have to get them installed only so that a few ports
    could build.  The offending ports have been fixed to depend on
    devel/atf explicitly.
  
    Reviewed by:  bapt
  
  r267172:
  
    Homogenize libatf-* version numbers with upstream.
  
    The libatf-* major version numbers in FreeBSD were one version ahead of
    upstream because, when atf was first imported into FreeBSD, the upstream
    numbers were not respected.  This is just confusing and bound to cause
    problems down the road.
  
    Fix this by taking advantage of the fact that libatf-* are now private
    and that atf is not yet built by default.  However, and unfortunately, a
    clean build is needed for tests to continue working once "make
    delete-old-libs" has been run; hence the note in UPDATING.
  
  Phabric: D701
  Approved by: jmmv (maintainer, mentor)

Deleted:
  stable/10/contrib/atf/atf-c++/atf-c++.m4
  stable/10/contrib/atf/atf-c++/atf-c++.pc.in
  stable/10/contrib/atf/atf-c/atf-c.m4
  stable/10/contrib/atf/atf-c/atf-c.pc.in
  stable/10/contrib/atf/atf-c/atf-common.m4
  stable/10/contrib/atf/atf-sh/atf-sh.m4
  stable/10/contrib/atf/atf-sh/atf-sh.pc.in
Modified:
  stable/10/UPDATING
  stable/10/contrib/atf/FREEBSD-Xlist
  stable/10/etc/mtree/BSD.tests.dist
  stable/10/lib/atf/libatf-c++/Makefile
  stable/10/lib/atf/libatf-c++/tests/Makefile
  stable/10/lib/atf/libatf-c/Makefile
  stable/10/lib/atf/libatf-c/tests/Makefile
  stable/10/libexec/atf/atf-check/Makefile
  stable/10/share/mk/atf.test.mk
  stable/10/share/mk/bsd.libnames.mk
  stable/10/tools/build/mk/OptionalObsoleteFiles.inc
  stable/10/usr.bin/atf/atf-sh/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/UPDATING
==============================================================================
--- stable/10/UPDATING	Sun Aug 31 21:58:07 2014	(r270904)
+++ stable/10/UPDATING	Sun Aug 31 23:09:23 2014	(r270905)
@@ -16,6 +16,22 @@ from older versions of FreeBSD, try WITH
 stable/10, and then rebuild without this option. The bootstrap process from
 older version of current is a bit fragile.
 
+20140831:
+	The libatf-c and libatf-c++ major versions were downgraded to 0 and
+	1 respectively to match the upstream numbers.  They were out of
+	sync because, when they were originally added to FreeBSD, the
+	upstream versions were not respected.  These libraries are private
+	and not yet built by default, so renumbering them should be a
+	non-issue.  However, unclean source trees will yield broken test
+	programs once the operator executes "make delete-old-libs" after a
+	"make installworld".
+
+	If you are using WITH_TESTS=yes (not the default), wipe the object
+	tree and rebuild from scratch to prevent spurious test failures.
+	This is only needed once: the old, misnumbered libraries have been
+	added to OptionalObsoleteFiles.inc so they will be removed during a
+	clean upgrade.
+
 20140814:
 	The ixgbe tunables now match their sysctl counterparts, for example:
 	hw.ixgbe.enable_aim => hw.ix.enable_aim

Modified: stable/10/contrib/atf/FREEBSD-Xlist
==============================================================================
--- stable/10/contrib/atf/FREEBSD-Xlist	Sun Aug 31 21:58:07 2014	(r270904)
+++ stable/10/contrib/atf/FREEBSD-Xlist	Sun Aug 31 23:09:23 2014	(r270905)
@@ -2,6 +2,8 @@
 */*/Makefile*
 */Atffile
 */Makefile*
+*/*.m4
+*/*.pc.in
 Atffile
 INSTALL
 Makefile*

Modified: stable/10/etc/mtree/BSD.tests.dist
==============================================================================
--- stable/10/etc/mtree/BSD.tests.dist	Sun Aug 31 21:58:07 2014	(r270904)
+++ stable/10/etc/mtree/BSD.tests.dist	Sun Aug 31 23:09:23 2014	(r270905)
@@ -12,8 +12,6 @@
         ..
     ..
     share
-        aclocal
-        ..
         atf
         ..
         doc

Modified: stable/10/lib/atf/libatf-c++/Makefile
==============================================================================
--- stable/10/lib/atf/libatf-c++/Makefile	Sun Aug 31 21:58:07 2014	(r270904)
+++ stable/10/lib/atf/libatf-c++/Makefile	Sun Aug 31 23:09:23 2014	(r270905)
@@ -28,7 +28,8 @@
 .include 
 
 LIB=		atf-c++
-SHLIB_MAJOR=	2
+PRIVATELIB=	true
+SHLIB_MAJOR=	1
 
 # libatf-c++ depends on the C version of the ATF library to build.
 DPADD=		${LIBATF_C}
@@ -72,20 +73,6 @@ INCSDIR_atf-c++.hpp= ${INCLUDEDIR}
 
 MAN=		atf-c++-api.3
 
-all: atf-c++.pc
-atf-c++.pc: atf-c++.pc.in atf-version
-	sed -e 's,__CXX__,${CXX},g' \
-	    -e 's,__INCLUDEDIR__,${INCLUDEDIR},g' \
-	    -e 's,__LIBDIR__,${LIBDIR},g' \
-	    -e "s,__ATF_VERSION__,$$(cat atf-version),g" \
-	    <${ATF}/atf-c++/atf-c++.pc.in >atf-c++.pc
-
-beforeinstall:
-	${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
-		atf-c++.pc ${DESTDIR}${LIBDATADIR}/pkgconfig
-	${INSTALL} -C -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \
-		${ATF}/atf-c++/atf-c++.m4 ${DESTDIR}${SHAREDIR}/aclocal
-
 .if ${MK_TESTS} != "no"
 SUBDIR=		tests
 .endif

Modified: stable/10/lib/atf/libatf-c++/tests/Makefile
==============================================================================
--- stable/10/lib/atf/libatf-c++/tests/Makefile	Sun Aug 31 21:58:07 2014	(r270904)
+++ stable/10/lib/atf/libatf-c++/tests/Makefile	Sun Aug 31 23:09:23 2014	(r270905)
@@ -26,6 +26,4 @@ ATF_TESTS_CXX+=	${_T}
 SRCS.${_T}=	${_T}.cpp test_helpers.cpp
 .endfor
 
-ATF_TESTS_SH=	pkg_config_test
-
 .include 

Modified: stable/10/lib/atf/libatf-c/Makefile
==============================================================================
--- stable/10/lib/atf/libatf-c/Makefile	Sun Aug 31 21:58:07 2014	(r270904)
+++ stable/10/lib/atf/libatf-c/Makefile	Sun Aug 31 23:09:23 2014	(r270905)
@@ -28,7 +28,8 @@
 .include 
 
 LIB=		atf-c
-SHLIB_MAJOR=	1
+PRIVATELIB=	true
+SHLIB_MAJOR=	0
 
 ATF=		${.CURDIR:H:H:H}/contrib/atf
 .PATH:		${ATF}
@@ -74,22 +75,6 @@ INCSDIR_atf-c.h= ${INCLUDEDIR}
 
 MAN=		atf-c-api.3
 
-all: atf-c.pc
-atf-c.pc: atf-c.pc.in atf-version
-	sed -e 's,__CC__,${CC},g' \
-	    -e 's,__INCLUDEDIR__,${INCLUDEDIR},g' \
-	    -e 's,__LIBDIR__,${LIBDIR},g' \
-	    -e "s,__ATF_VERSION__,$$(cat atf-version),g" \
-	    <${ATF}/atf-c/atf-c.pc.in >atf-c.pc
-
-beforeinstall:
-	${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
-		atf-c.pc ${DESTDIR}${LIBDATADIR}/pkgconfig
-	${INSTALL} -C -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \
-		${ATF}/atf-c/atf-common.m4 ${DESTDIR}${SHAREDIR}/aclocal
-	${INSTALL} -C -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \
-		${ATF}/atf-c/atf-c.m4 ${DESTDIR}${SHAREDIR}/aclocal
-
 .if ${MK_TESTS} != "no"
 SUBDIR=		tests
 .endif

Modified: stable/10/lib/atf/libatf-c/tests/Makefile
==============================================================================
--- stable/10/lib/atf/libatf-c/tests/Makefile	Sun Aug 31 21:58:07 2014	(r270904)
+++ stable/10/lib/atf/libatf-c/tests/Makefile	Sun Aug 31 23:09:23 2014	(r270905)
@@ -33,6 +33,4 @@ ATF_TESTS_C+=	${_T}
 SRCS.${_T}=	${_T}.c test_helpers.c
 .endfor
 
-ATF_TESTS_SH=	pkg_config_test
-
 .include 

Modified: stable/10/libexec/atf/atf-check/Makefile
==============================================================================
--- stable/10/libexec/atf/atf-check/Makefile	Sun Aug 31 21:58:07 2014	(r270904)
+++ stable/10/libexec/atf/atf-check/Makefile	Sun Aug 31 23:09:23 2014	(r270905)
@@ -37,11 +37,11 @@ MAN=		atf-check.1
 
 CFLAGS+=	-I${ATF}
 
-DPADD+=		${LIBATF_CXX} ${LIBATF_C}
-
 LDFLAGS+=	-L${.OBJDIR}/../../../lib/atf/libatf-c++
 LDFLAGS+=	-L${.OBJDIR}/../../../lib/atf/libatf-c
+DPADD+=		${LIBATF_CXX} ${LIBATF_C}
 LDADD+=		-latf-c++ -latf-c
+USEPRIVATELIB=	atf-c++ atf-c
 
 .if ${MK_TESTS} != "no"
 SUBDIR+=	tests

Modified: stable/10/share/mk/atf.test.mk
==============================================================================
--- stable/10/share/mk/atf.test.mk	Sun Aug 31 21:58:07 2014	(r270904)
+++ stable/10/share/mk/atf.test.mk	Sun Aug 31 23:09:23 2014	(r270905)
@@ -72,6 +72,7 @@ MAN.${_T}?= # empty
 SRCS.${_T}?= ${_T}.c
 DPADD.${_T}+= ${LIBATF_C}
 LDADD.${_T}+= -latf-c
+USEPRIVATELIB+= atf-c
 TEST_INTERFACE.${_T}= atf
 .endfor
 .endif
@@ -85,6 +86,7 @@ MAN.${_T}?= # empty
 SRCS.${_T}?= ${_T}${CXX_SUFFIX:U.cc}
 DPADD.${_T}+= ${LIBATF_CXX} ${LIBATF_C}
 LDADD.${_T}+= -latf-c++ -latf-c
+USEPRIVATELIB+= atf-c++
 TEST_INTERFACE.${_T}= atf
 .endfor
 .endif

Modified: stable/10/share/mk/bsd.libnames.mk
==============================================================================
--- stable/10/share/mk/bsd.libnames.mk	Sun Aug 31 21:58:07 2014	(r270904)
+++ stable/10/share/mk/bsd.libnames.mk	Sun Aug 31 23:09:23 2014	(r270905)
@@ -13,8 +13,8 @@ LIBCRT0?=	${DESTDIR}${LIBDIR}/crt0.o
 LIBALIAS?=	${DESTDIR}${LIBDIR}/libalias.a
 LIBARCHIVE?=	${DESTDIR}${LIBDIR}/libarchive.a
 LIBASN1?=	${DESTDIR}${LIBDIR}/libasn1.a
-LIBATF_C?=	${DESTDIR}${LIBDIR}/libatf-c.a
-LIBATF_CXX?=	${DESTDIR}${LIBDIR}/libatf-c++.a
+LIBATF_C?=	${DESTDIR}${LIBPRIVATEDIR}/libatf-c.a
+LIBATF_CXX?=	${DESTDIR}${LIBPRIVATEDIR}/libatf-c++.a
 LIBATM?=	${DESTDIR}${LIBDIR}/libatm.a
 LIBAUDITD?=	${DESTDIR}${LIBDIR}/libauditd.a
 LIBAVL?=	${DESTDIR}${LIBDIR}/libavl.a

Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc
==============================================================================
--- stable/10/tools/build/mk/OptionalObsoleteFiles.inc	Sun Aug 31 21:58:07 2014	(r270904)
+++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc	Sun Aug 31 23:09:23 2014	(r270905)
@@ -4070,7 +4070,38 @@ OLD_FILES+=usr/share/man/man8/telnetd.8.
 .endif
 
 .if ${MK_TESTS} == yes
+OLD_LIBS+=usr/lib/libatf-c++.a
+OLD_LIBS+=usr/lib/libatf-c++.so
 OLD_LIBS+=usr/lib/libatf-c++.so.1
+OLD_LIBS+=usr/lib/libatf-c++.so.2
+OLD_LIBS+=usr/lib/libatf-c++_p.a
+OLD_LIBS+=usr/lib/libatf-c.a
+OLD_LIBS+=usr/lib/libatf-c.so
+OLD_LIBS+=usr/lib/libatf-c.so.1
+OLD_LIBS+=usr/lib/libatf-c_p.a
+OLD_LIBS+=usr/lib/private/libatf-c.so.1
+OLD_LIBS+=usr/lib/private/libatf-c++.so.2
+.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64"
+OLD_LIBS+=usr/lib32/libatf-c++.a
+OLD_LIBS+=usr/lib32/libatf-c++.so
+OLD_LIBS+=usr/lib32/libatf-c++.so.1
+OLD_LIBS+=usr/lib32/libatf-c++.so.2
+OLD_LIBS+=usr/lib32/libatf-c++_p.a
+OLD_LIBS+=usr/lib32/libatf-c.a
+OLD_LIBS+=usr/lib32/libatf-c.so
+OLD_LIBS+=usr/lib32/libatf-c.so.1
+OLD_LIBS+=usr/lib32/libatf-c_p.a
+OLD_LIBS+=usr/lib32/private/libatf-c.so.1
+OLD_LIBS+=usr/lib32/private/libatf-c++.so.2
+.endif
+OLD_FILES+=usr/libdata/pkgconfig/atf-c++.pc
+OLD_FILES+=usr/libdata/pkgconfig/atf-c.pc
+OLD_FILES+=usr/libdata/pkgconfig/atf-sh.pc
+OLD_FILES+=usr/share/aclocal/atf-c++.m4
+OLD_FILES+=usr/share/aclocal/atf-c.m4
+OLD_FILES+=usr/share/aclocal/atf-common.m4
+OLD_FILES+=usr/share/aclocal/atf-sh.m4
+OLD_DIRS+=usr/share/aclocal
 OLD_FILES+=usr/tests/bin/date/legacy_test
 OLD_FILES+=usr/tests/lib/atf/libatf-c/test_helpers_test
 OLD_FILES+=usr/tests/lib/atf/test-programs/fork_test
@@ -4085,6 +4116,7 @@ OLD_FILES+=usr/tests/lib/atf/libatf-c++/
 OLD_FILES+=usr/tests/lib/atf/libatf-c++/parser_test
 OLD_FILES+=usr/tests/lib/atf/libatf-c++/process_test
 OLD_FILES+=usr/tests/lib/atf/libatf-c++/sanity_test
+OLD_FILES+=usr/tests/lib/atf/libatf-c++/pkg_config_test
 OLD_FILES+=usr/tests/lib/atf/libatf-c++/text_test
 OLD_FILES+=usr/tests/lib/atf/libatf-c++/ui_test
 OLD_FILES+=usr/tests/lib/atf/libatf-c/dynstr_test
@@ -4092,6 +4124,7 @@ OLD_FILES+=usr/tests/lib/atf/libatf-c/en
 OLD_FILES+=usr/tests/lib/atf/libatf-c/fs_test
 OLD_FILES+=usr/tests/lib/atf/libatf-c/list_test
 OLD_FILES+=usr/tests/lib/atf/libatf-c/map_test
+OLD_FILES+=usr/tests/lib/atf/libatf-c/pkg_config_test
 OLD_FILES+=usr/tests/lib/atf/libatf-c/process_helpers
 OLD_FILES+=usr/tests/lib/atf/libatf-c/process_test
 OLD_FILES+=usr/tests/lib/atf/libatf-c/sanity_test

Modified: stable/10/usr.bin/atf/atf-sh/Makefile
==============================================================================
--- stable/10/usr.bin/atf/atf-sh/Makefile	Sun Aug 31 21:58:07 2014	(r270904)
+++ stable/10/usr.bin/atf/atf-sh/Makefile	Sun Aug 31 23:09:23 2014	(r270905)
@@ -39,24 +39,13 @@ CFLAGS+=	-I${ATF}
 
 DPADD+=		${LIBATF_C} ${LIBATF_CXX}
 LDADD+=		-latf-c++ -latf-c
+USEPRIVATELIB=	atf-c++ atf-c
 
 FILESGROUPS=	SUBR
 
 SUBRDIR=	${SHAREDIR}/atf
 SUBR=		libatf-sh.subr
 
-all: atf-sh.pc
-atf-sh.pc: atf-sh.pc.in atf-version
-	sed -e 's,__EXEC_PREFIX__,/usr,g' \
-	    -e "s,__ATF_VERSION__,$$(cat atf-version),g" \
-	    <${ATF}/atf-sh/atf-sh.pc.in >atf-sh.pc
-
-beforeinstall:
-	${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
-		atf-sh.pc ${DESTDIR}${LIBDATADIR}/pkgconfig
-	${INSTALL} -C -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \
-		${ATF}/atf-sh/atf-sh.m4 ${DESTDIR}${SHAREDIR}/aclocal
-
 .if ${MK_TESTS} != "no"
 SUBDIR+=	tests
 .endif