From owner-svn-src-all@FreeBSD.ORG Sun Aug 17 00:52:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C0073FA; Sun, 17 Aug 2014 00:52:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C41B20A8; Sun, 17 Aug 2014 00:52:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7H0qAOF067026; Sun, 17 Aug 2014 00:52:10 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7H0q8nn067016; Sun, 17 Aug 2014 00:52:08 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <201408170052.s7H0q8nn067016@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Sun, 17 Aug 2014 00:52:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org 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 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 00:52:10 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Aug 17 01:00:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E373658D; Sun, 17 Aug 2014 01:00:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CDB352144; Sun, 17 Aug 2014 01:00:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7H10i1M069664; Sun, 17 Aug 2014 01:00:44 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7H10hcY069652; Sun, 17 Aug 2014 01:00:43 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <201408170100.s7H10hcY069652@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Sun, 17 Aug 2014 01:00:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270071 - in stable/10: lib/libvmmapi sys/amd64/include sys/amd64/vmm usr.sbin/bhyveload X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 01:00:45 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Aug 17 01:15:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 881EB7AC; Sun, 17 Aug 2014 01:15:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7360D2216; Sun, 17 Aug 2014 01:15:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7H1FZxA076514; Sun, 17 Aug 2014 01:15:35 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7H1FZmg076512; Sun, 17 Aug 2014 01:15:35 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201408170115.s7H1FZmg076512@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 17 Aug 2014 01:15:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270072 - stable/10/contrib/llvm/tools/clang/lib/Driver X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 01:15:35 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Aug 17 01:16:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EA89C8DE; Sun, 17 Aug 2014 01:16:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D52DD2224; Sun, 17 Aug 2014 01:16:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7H1GfAI076712; Sun, 17 Aug 2014 01:16:41 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7H1Gfgh076709; Sun, 17 Aug 2014 01:16:41 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <201408170116.s7H1Gfgh076709@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Sun, 17 Aug 2014 01:16:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270073 - in stable/10/sys/amd64/vmm: intel io X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 01:16:42 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Aug 17 01:23:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C34B1A93; Sun, 17 Aug 2014 01:23:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 940F322CE; Sun, 17 Aug 2014 01:23:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7H1NtZe080882; Sun, 17 Aug 2014 01:23:55 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7H1Nr4s080866; Sun, 17 Aug 2014 01:23:53 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <201408170123.s7H1Nr4s080866@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Sun, 17 Aug 2014 01:23:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org 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 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 01:23:56 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Aug 17 01:28:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E7F94CFA; Sun, 17 Aug 2014 01:28:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C79DE23E8; Sun, 17 Aug 2014 01:28:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7H1S54q081459; Sun, 17 Aug 2014 01:28:05 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7H1S344081448; Sun, 17 Aug 2014 01:28:03 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201408170128.s7H1S344081448@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 17 Aug 2014 01:28:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270075 - in stable/10/sys: arm/arm arm/include conf dev/fdt dev/ofw sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 01:28:06 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Aug 17 01:32:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6EDA1F1C; Sun, 17 Aug 2014 01:32:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 406E3247D; Sun, 17 Aug 2014 01:32:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7H1WYaQ085362; Sun, 17 Aug 2014 01:32:34 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7H1WXUn085360; Sun, 17 Aug 2014 01:32:33 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201408170132.s7H1WXUn085360@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 17 Aug 2014 01:32:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270076 - stable/10/sys/arm/freescale/imx X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 01:32:34 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Aug 17 01:48:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C787D2B7; Sun, 17 Aug 2014 01:48:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B292F2555; Sun, 17 Aug 2014 01:48:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7H1mDgw090594; Sun, 17 Aug 2014 01:48:13 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7H1mD00090592; Sun, 17 Aug 2014 01:48:13 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201408170148.s7H1mD00090592@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 17 Aug 2014 01:48:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270077 - stable/10/sys/arm/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 01:48:13 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Aug 17 01:59:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B91443E; Sun, 17 Aug 2014 01:59:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1666D2604; Sun, 17 Aug 2014 01:59:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7H1xsEg095197; Sun, 17 Aug 2014 01:59:54 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7H1xsZc095196; Sun, 17 Aug 2014 01:59:54 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201408170159.s7H1xsZc095196@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 17 Aug 2014 01:59:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270078 - stable/10/sys/dev/ofw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 01:59:55 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Aug 17 02:40:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2231183D; Sun, 17 Aug 2014 02:40:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D38728C2; Sun, 17 Aug 2014 02:40:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7H2eiJo015452; Sun, 17 Aug 2014 02:40:44 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7H2eiYq015451; Sun, 17 Aug 2014 02:40:44 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201408170240.s7H2eiYq015451@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 17 Aug 2014 02:40:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270079 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 02:40:45 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Aug 17 02:53:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7624D9D4; Sun, 17 Aug 2014 02:53:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6200429FC; Sun, 17 Aug 2014 02:53:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7H2rbow021468; Sun, 17 Aug 2014 02:53:37 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7H2rbN1021467; Sun, 17 Aug 2014 02:53:37 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201408170253.s7H2rbN1021467@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 17 Aug 2014 02:53:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270080 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 02:53:37 -0000 Author: ian Date: Sun Aug 17 02:53:36 2014 New Revision: 270080 URL: http://svnweb.freebsd.org/changeset/base/270080 Log: Rename the old initarm_* functions to the new platform_* names. Also move the registration of the static device map table into the function intended to do devmap init stuff. Modified: head/sys/arm/at91/at91_common.c Modified: head/sys/arm/at91/at91_common.c ============================================================================== --- head/sys/arm/at91/at91_common.c Sun Aug 17 02:40:44 2014 (r270079) +++ head/sys/arm/at91/at91_common.c Sun Aug 17 02:53:36 2014 (r270080) @@ -7,6 +7,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -55,36 +56,37 @@ at91_eoi(void *unused) vm_offset_t -initarm_lastaddr(void) +platform_lastaddr(void) { return (arm_devmap_lastaddr()); } void -initarm_early_init(void) +platform_probe_and_attach(void) { arm_post_filter = at91_eoi; at91_soc_id(); - arm_devmap_register_table(at91_devmap); } int -initarm_devmap_init(void) +platform_devmap_init(void) { // arm_devmap_add_entry(0xfff00000, 0x00100000); /* 1MB - uart, aic and timers*/ + arm_devmap_register_table(at91_devmap); + return (0); } void -initarm_gpio_init(void) +platform_gpio_init(void) { } void -initarm_late_init(void) +platform_late_init(void) { } From owner-svn-src-all@FreeBSD.ORG Sun Aug 17 02:56:59 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4567CB25; Sun, 17 Aug 2014 02:56:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 173BA2A0F; Sun, 17 Aug 2014 02:56:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7H2uwH2022328; Sun, 17 Aug 2014 02:56:58 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7H2uwoq022327; Sun, 17 Aug 2014 02:56:58 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201408170256.s7H2uwoq022327@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 17 Aug 2014 02:56:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270081 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 02:56:59 -0000 Author: ian Date: Sun Aug 17 02:56:58 2014 New Revision: 270081 URL: http://svnweb.freebsd.org/changeset/base/270081 Log: When the initarm_* routines were renamed to platform_* and moved to their own header file, the lovely block of comments explaining what the generic init code expects of the soc implementations got lost, restore it. Modified: head/sys/arm/include/platform.h Modified: head/sys/arm/include/platform.h ============================================================================== --- head/sys/arm/include/platform.h Sun Aug 17 02:53:36 2014 (r270080) +++ head/sys/arm/include/platform.h Sun Aug 17 02:56:58 2014 (r270081) @@ -29,6 +29,34 @@ #ifndef _MACHINE_PLATFORM_H_ #define _MACHINE_PLATFORM_H_ +/* + * Initialization functions called by the common initarm() function in + * arm/machdep.c (but not necessarily from the custom initarm() functions of + * older code). + * + * - platform_probe_and_attach() is called very early, after parsing the boot + * params and after physical memory has been located and sized. + * + * - platform_devmap_init() is called as one of the last steps of early virtual + * memory initialization, shortly before the new page tables are installed. + * + * - platform_lastaddr() is called after platform_devmap_init(), and must return + * the address of the first byte of unusable KVA space. This allows a + * platform to carve out of the top of the KVA space whatever reserves it + * needs for things like static device mapping, and this is called to get the + * value before calling pmap_bootstrap() which uses the value to size the + * available KVA. + * + * - platform_gpio_init() is called after the static device mappings are + * established and just before cninit(). The intention is that the routine + * can do any hardware setup (such as gpio or pinmux) necessary to make the + * console functional. + * + * - platform_late_init() is called just after cninit(). This is the first of + * the init routines that can use printf() and expect the output to appear on + * a standard console. + * + */ void platform_probe_and_attach(void); int platform_devmap_init(void); vm_offset_t platform_lastaddr(void); From owner-svn-src-all@FreeBSD.ORG Sun Aug 17 03:01:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F357AE1D; Sun, 17 Aug 2014 03:01:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D3E9A2B75; Sun, 17 Aug 2014 03:01:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7H31uFa026968; Sun, 17 Aug 2014 03:01:56 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7H31unI026967; Sun, 17 Aug 2014 03:01:56 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <201408170301.s7H31unI026967@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Sun, 17 Aug 2014 03:01:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270082 - stable/10/sys/amd64/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 03:01:57 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Aug 17 06:28:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60CC37F4; Sun, 17 Aug 2014 06:28:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D0012DF9; Sun, 17 Aug 2014 06:28:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7H6SwuD015916; Sun, 17 Aug 2014 06:28:58 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7H6SwCm015915; Sun, 17 Aug 2014 06:28:58 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201408170628.s7H6SwCm015915@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 17 Aug 2014 06:28:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270083 - head/lib/libcuse X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 06:28:58 -0000 Author: hselasky Date: Sun Aug 17 06:28:57 2014 New Revision: 270083 URL: http://svnweb.freebsd.org/changeset/base/270083 Log: Add missing DPADD to Makefile. PR: 192733 Modified: head/lib/libcuse/Makefile Modified: head/lib/libcuse/Makefile ============================================================================== --- head/lib/libcuse/Makefile Sun Aug 17 03:01:56 2014 (r270082) +++ head/lib/libcuse/Makefile Sun Aug 17 06:28:57 2014 (r270083) @@ -36,6 +36,7 @@ CFLAGS+= -D_GNU_SOURCE CFLAGS+= -g CFLAGS+= -DHAVE_DEBUG .endif +DPADD+= ${LIBPTHREAD} LDADD+= ${PTHREAD_LIBS} MLINKS= From owner-svn-src-all@FreeBSD.ORG Sun Aug 17 06:52:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0E624B62; Sun, 17 Aug 2014 06:52:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EDF4C20C6; Sun, 17 Aug 2014 06:52:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7H6qZuL028467; Sun, 17 Aug 2014 06:52:35 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7H6qZeH028464; Sun, 17 Aug 2014 06:52:35 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201408170652.s7H6qZeH028464@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 17 Aug 2014 06:52:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270084 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 06:52:36 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Aug 17 06:54:49 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1294CA6; Sun, 17 Aug 2014 06:54:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92A2D20D4; Sun, 17 Aug 2014 06:54:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7H6snit031091; Sun, 17 Aug 2014 06:54:49 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7H6snCW031090; Sun, 17 Aug 2014 06:54:49 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201408170654.s7H6snCW031090@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 17 Aug 2014 06:54:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270085 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 06:54:49 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Aug 17 06:56:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EFE8ADD9; Sun, 17 Aug 2014 06:56:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB75B20E0; Sun, 17 Aug 2014 06:56:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7H6uMoZ031394; Sun, 17 Aug 2014 06:56:22 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7H6uMDj031393; Sun, 17 Aug 2014 06:56:22 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201408170656.s7H6uMDj031393@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 17 Aug 2014 06:56:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270086 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 06:56:23 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Aug 17 06:58:15 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2FB49F56; Sun, 17 Aug 2014 06:58:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B63F20EB; Sun, 17 Aug 2014 06:58:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7H6wEZY031676; Sun, 17 Aug 2014 06:58:14 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7H6wEEI031675; Sun, 17 Aug 2014 06:58:14 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201408170658.s7H6wEEI031675@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 17 Aug 2014 06:58:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270087 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 06:58:15 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Aug 17 07:00:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98B3D124; Sun, 17 Aug 2014 07:00:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A5BF20FB; Sun, 17 Aug 2014 07:00:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7H70mgM034362; Sun, 17 Aug 2014 07:00:48 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7H70m4d034361; Sun, 17 Aug 2014 07:00:48 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201408170700.s7H70m4d034361@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 17 Aug 2014 07:00:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270088 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 07:00:48 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Aug 17 07:05:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 100E4278; Sun, 17 Aug 2014 07:05:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EFEB8218B; Sun, 17 Aug 2014 07:05:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7H75Ufo035959; Sun, 17 Aug 2014 07:05:30 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7H75U0N035958; Sun, 17 Aug 2014 07:05:30 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201408170705.s7H75U0N035958@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 17 Aug 2014 07:05:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270089 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 07:05:31 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Aug 17 07:06:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42C683AF; Sun, 17 Aug 2014 07:06:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E25D2197; Sun, 17 Aug 2014 07:06:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7H76u4h036177; Sun, 17 Aug 2014 07:06:56 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7H76uin036176; Sun, 17 Aug 2014 07:06:56 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201408170706.s7H76uin036176@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 17 Aug 2014 07:06:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270090 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 07:06:56 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Aug 17 07:16:04 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89AD2636; Sun, 17 Aug 2014 07:16:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 692F22243; Sun, 17 Aug 2014 07:16:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7H7G4pv040703; Sun, 17 Aug 2014 07:16:04 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7H7G4h5040702; Sun, 17 Aug 2014 07:16:04 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201408170716.s7H7G4h5040702@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 17 Aug 2014 07:16:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270091 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 07:16:04 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Aug 17 07:20:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17D9C7CB; Sun, 17 Aug 2014 07:20:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02F0F23DC; Sun, 17 Aug 2014 07:20:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7H7Kb65041739; Sun, 17 Aug 2014 07:20:37 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7H7Kbsl041737; Sun, 17 Aug 2014 07:20:37 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201408170720.s7H7Kbsl041737@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 17 Aug 2014 07:20:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270092 - in stable/10/sys: kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 07:20:38 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Aug 17 07:22:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 525E2919; Sun, 17 Aug 2014 07:22:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D9CE23FC; Sun, 17 Aug 2014 07:22:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7H7MfWe044786; Sun, 17 Aug 2014 07:22:41 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7H7Mff8044785; Sun, 17 Aug 2014 07:22:41 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201408170722.s7H7Mff8044785@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 17 Aug 2014 07:22:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270093 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 07:22:41 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Aug 17 07:24:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 15251A4E; Sun, 17 Aug 2014 07:24:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00CBE2402; Sun, 17 Aug 2014 07:24:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7H7ON2F045045; Sun, 17 Aug 2014 07:24:23 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7H7ONCM045044; Sun, 17 Aug 2014 07:24:23 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201408170724.s7H7ONCM045044@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 17 Aug 2014 07:24:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270094 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 07:24:24 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Aug 17 09:07:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F0B4CF4; Sun, 17 Aug 2014 09:07:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 887AE2B6E; Sun, 17 Aug 2014 09:07:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7H97M9i090490; Sun, 17 Aug 2014 09:07:22 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7H97LKn090483; Sun, 17 Aug 2014 09:07:21 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201408170907.s7H97LKn090483@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 17 Aug 2014 09:07:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270095 - in stable/10/sys: kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 09:07:22 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Aug 17 09:44:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 18DD54C3; Sun, 17 Aug 2014 09:44:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F3FE32001; Sun, 17 Aug 2014 09:44:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7H9ikQS008183; Sun, 17 Aug 2014 09:44:46 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7H9igDr008156; Sun, 17 Aug 2014 09:44:42 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408170944.s7H9igDr008156@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 17 Aug 2014 09:44:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270096 - in head: 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.sbin u... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 09:44:47 -0000 Author: trasz Date: Sun Aug 17 09:44:42 2014 New Revision: 270096 URL: http://svnweb.freebsd.org/changeset/base/270096 Log: 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 MFC after: 2 weeks Relnotes: yes Sponsored by: The FreeBSD Foundation Added: head/etc/auto_master (contents, props changed) head/etc/autofs/ head/etc/autofs/Makefile (contents, props changed) head/etc/autofs/include_ldap (contents, props changed) head/etc/autofs/special_hosts (contents, props changed) head/etc/autofs/special_null (contents, props changed) head/etc/rc.d/automount (contents, props changed) head/etc/rc.d/automountd (contents, props changed) head/etc/rc.d/autounmountd (contents, props changed) head/share/man/man5/autofs.5 (contents, props changed) head/sys/fs/autofs/ head/sys/fs/autofs/autofs.c (contents, props changed) head/sys/fs/autofs/autofs.h (contents, props changed) head/sys/fs/autofs/autofs_ioctl.h (contents, props changed) head/sys/fs/autofs/autofs_vfsops.c (contents, props changed) head/sys/fs/autofs/autofs_vnops.c (contents, props changed) head/sys/libkern/strndup.c (contents, props changed) head/sys/modules/autofs/ head/sys/modules/autofs/Makefile (contents, props changed) head/usr.sbin/autofs/ head/usr.sbin/autofs/Makefile (contents, props changed) head/usr.sbin/autofs/auto_master.5 (contents, props changed) head/usr.sbin/autofs/automount.8 (contents, props changed) head/usr.sbin/autofs/automount.c (contents, props changed) head/usr.sbin/autofs/automountd.8 (contents, props changed) head/usr.sbin/autofs/automountd.c (contents, props changed) head/usr.sbin/autofs/autounmountd.8 (contents, props changed) head/usr.sbin/autofs/autounmountd.c (contents, props changed) head/usr.sbin/autofs/common.c (contents, props changed) head/usr.sbin/autofs/common.h (contents, props changed) head/usr.sbin/autofs/defined.c (contents, props changed) head/usr.sbin/autofs/log.c (contents, props changed) head/usr.sbin/autofs/popen.c (contents, props changed) head/usr.sbin/autofs/token.l (contents, props changed) Modified: head/etc/Makefile head/etc/defaults/rc.conf head/etc/mtree/BSD.root.dist head/etc/rc.d/Makefile head/sbin/mount/mntopts.h head/sbin/mount/mount.c head/share/man/man5/Makefile head/sys/conf/NOTES head/sys/conf/files head/sys/conf/options head/sys/kern/vfs_mount.c head/sys/modules/Makefile head/sys/sys/libkern.h head/sys/sys/mount.h head/usr.sbin/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Sun Aug 17 09:07:21 2014 (r270095) +++ head/etc/Makefile Sun Aug 17 09:44:42 2014 (r270096) @@ -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 Added: head/etc/auto_master ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/auto_master Sun Aug 17 09:44:42 2014 (r270096) @@ -0,0 +1,5 @@ +# $FreeBSD$ +# +# Automounter master map, see auto_master(5) for details. +# +/net -hosts -nosuid Added: head/etc/autofs/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/autofs/Makefile Sun Aug 17 09:44:42 2014 (r270096) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +FILES= include_ldap special_hosts special_null + +NO_OBJ= +FILESDIR= /etc/autofs +FILESMODE= 755 + +.include Added: head/etc/autofs/include_ldap ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/autofs/include_ldap Sun Aug 17 09:44:42 2014 (r270096) @@ -0,0 +1,38 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# Modify this to suit your needs. The "$1" is the map name, eg. "auto_master". +# To debug, simply run this script with map name as the only parameter. It's +# supposed to output map contents ("key location" pairs) to standard output. +SEARCHBASE="ou=$1,dc=example,dc=com" +ENTRY_ATTRIBUTE="cn" +VALUE_ATTRIBUTE="automountInformation" + +/usr/local/bin/ldapsearch -LLL -x -o ldif-wrap=no -b "$SEARCHBASE" "$ENTRY_ATTRIBUTE" "$VALUE_ATTRIBUTE" | awk ' +$1 == "'$ENTRY_ATTRIBUTE':" { + key = $2 +} + +$1 == "'$VALUE_ATTRIBUTE':" && key { + printf "%s%s", key, OFS + key = "" + for (i=2; i 1 { printf "%s\t%s:%s ", $1, host, $1 } END { printf "\n" }' + Added: head/etc/autofs/special_null ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/autofs/special_null Sun Aug 17 09:44:42 2014 (r270096) @@ -0,0 +1,4 @@ +#!/usr/bin/true +# +# $FreeBSD$ +# Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Sun Aug 17 09:07:21 2014 (r270095) +++ head/etc/defaults/rc.conf Sun Aug 17 09:44:42 2014 (r270096) @@ -306,6 +306,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: head/etc/mtree/BSD.root.dist ============================================================================== --- head/etc/mtree/BSD.root.dist Sun Aug 17 09:07:21 2014 (r270095) +++ head/etc/mtree/BSD.root.dist Sun Aug 17 09:44:42 2014 (r270096) @@ -24,6 +24,8 @@ etc X11 .. + autofs + .. bluetooth .. casper Modified: head/etc/rc.d/Makefile ============================================================================== --- head/etc/rc.d/Makefile Sun Aug 17 09:07:21 2014 (r270095) +++ head/etc/rc.d/Makefile Sun Aug 17 09:44:42 2014 (r270096) @@ -20,6 +20,9 @@ FILES= DAEMON \ atm3 \ auditd \ auditdistd \ + automount \ + automountd \ + autounmountd \ bgfsck \ ${_bluetooth} \ bootparams \ Added: head/etc/rc.d/automount ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/rc.d/automount Sun Aug 17 09:44:42 2014 (r270096) @@ -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" Added: head/etc/rc.d/automountd ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/rc.d/automountd Sun Aug 17 09:44:42 2014 (r270096) @@ -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" Added: head/etc/rc.d/autounmountd ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/rc.d/autounmountd Sun Aug 17 09:44:42 2014 (r270096) @@ -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: head/sbin/mount/mntopts.h ============================================================================== --- head/sbin/mount/mntopts.h Sun Aug 17 09:07:21 2014 (r270095) +++ head/sbin/mount/mntopts.h Sun Aug 17 09:44:42 2014 (r270096) @@ -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: head/sbin/mount/mount.c ============================================================================== --- head/sbin/mount/mount.c Sun Aug 17 09:07:21 2014 (r270095) +++ head/sbin/mount/mount.c Sun Aug 17 09:44:42 2014 (r270096) @@ -114,6 +114,7 @@ static struct opt { { MNT_ACLS, "acls" }, { MNT_NFS4ACLS, "nfsv4acls" }, { MNT_GJOURNAL, "gjournal" }, + { MNT_AUTOMOUNTED, "automounted" }, { 0, NULL } }; Modified: head/share/man/man5/Makefile ============================================================================== --- head/share/man/man5/Makefile Sun Aug 17 09:07:21 2014 (r270095) +++ head/share/man/man5/Makefile Sun Aug 17 09:44:42 2014 (r270096) @@ -7,6 +7,7 @@ MAN= acct.5 \ ar.5 \ a.out.5 \ + autofs.5 \ bluetooth.device.conf.5 \ bluetooth.hosts.5 \ bluetooth.protocols.5 \ Added: head/share/man/man5/autofs.5 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man5/autofs.5 Sun Aug 17 09:44:42 2014 (r270096) @@ -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@FreeBSD.org +under sponsorship from the FreeBSD Foundation. Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Sun Aug 17 09:07:21 2014 (r270095) +++ head/sys/conf/NOTES Sun Aug 17 09:44:42 2014 (r270096) @@ -1012,6 +1012,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: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun Aug 17 09:07:21 2014 (r270095) +++ head/sys/conf/files Sun Aug 17 09:44:42 2014 (r270096) @@ -2627,6 +2627,9 @@ dev/xen/timer/timer.c optional xen | xe dev/xen/pvcpu/pvcpu.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 @@ -3164,6 +3167,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: head/sys/conf/options ============================================================================== --- head/sys/conf/options Sun Aug 17 09:07:21 2014 (r270095) +++ head/sys/conf/options Sun Aug 17 09:44:42 2014 (r270096) @@ -221,6 +221,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 Added: head/sys/fs/autofs/autofs.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/fs/autofs/autofs.c Sun Aug 17 09:44:42 2014 (r270096) @@ -0,0 +1,637 @@ +/*- + * 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 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$ + */ +/*- + * Copyright (c) 1989, 1991, 1993, 1995 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Rick Macklem at The University of Guelph. + * + * 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. + * 4. 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 + * 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. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "autofs.h" +#include "autofs_ioctl.h" + +MALLOC_DEFINE(M_AUTOFS, "autofs", "Automounter filesystem"); + +uma_zone_t autofs_request_zone; +uma_zone_t autofs_node_zone; + +static int autofs_open(struct cdev *dev, int flags, int fmt, + struct thread *td); +static int autofs_close(struct cdev *dev, int flag, int fmt, + struct thread *td); +static int autofs_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, + int mode, struct thread *td); + +static struct cdevsw autofs_cdevsw = { + .d_version = D_VERSION, + .d_open = autofs_open, + .d_close = autofs_close, + .d_ioctl = autofs_ioctl, + .d_name = "autofs", +}; + +/* + * List of signals that can interrupt an autofs trigger. Might be a good + * idea to keep it synchronised with list in sys/fs/nfs/nfs_commonkrpc.c. + */ +int autofs_sig_set[] = { + SIGINT, + SIGTERM, + SIGHUP, + SIGKILL, + SIGQUIT +}; + +struct autofs_softc *sc; + +SYSCTL_NODE(_vfs, OID_AUTO, autofs, CTLFLAG_RD, 0, "Automounter filesystem"); +int autofs_debug = 1; +TUNABLE_INT("vfs.autofs.debug", &autofs_debug); +SYSCTL_INT(_vfs_autofs, OID_AUTO, debug, CTLFLAG_RWTUN, + &autofs_debug, 1, "Enable debug messages"); +int autofs_mount_on_stat = 0; +TUNABLE_INT("vfs.autofs.mount_on_stat", &autofs_mount_on_stat); +SYSCTL_INT(_vfs_autofs, OID_AUTO, mount_on_stat, CTLFLAG_RWTUN, + &autofs_mount_on_stat, 0, "Trigger mount on stat(2) on mountpoint"); +int autofs_timeout = 30; +TUNABLE_INT("vfs.autofs.timeout", &autofs_timeout); +SYSCTL_INT(_vfs_autofs, OID_AUTO, timeout, CTLFLAG_RWTUN, + &autofs_timeout, 30, "Number of seconds to wait for automountd(8)"); +int autofs_cache = 600; +TUNABLE_INT("vfs.autofs.cache", &autofs_cache); +SYSCTL_INT(_vfs_autofs, OID_AUTO, cache, CTLFLAG_RWTUN, + &autofs_cache, 600, "Number of seconds to wait before reinvoking " + "automountd(8) for any given file or directory"); +int autofs_retry_attempts = 3; +TUNABLE_INT("vfs.autofs.retry_attempts", &autofs_retry_attempts); +SYSCTL_INT(_vfs_autofs, OID_AUTO, retry_attempts, CTLFLAG_RWTUN, + &autofs_retry_attempts, 3, "Number of attempts before failing mount"); +int autofs_retry_delay = 1; +TUNABLE_INT("vfs.autofs.retry_delay", &autofs_retry_delay); +SYSCTL_INT(_vfs_autofs, OID_AUTO, retry_delay, CTLFLAG_RWTUN, + &autofs_retry_delay, 1, "Number of seconds before retrying"); +int autofs_interruptible = 1; +TUNABLE_INT("vfs.autofs.interruptible", &autofs_interruptible); +SYSCTL_INT(_vfs_autofs, OID_AUTO, interruptible, CTLFLAG_RWTUN, + &autofs_interruptible, 1, "Allow requests to be interrupted by signal"); + +int +autofs_init(struct vfsconf *vfsp) +{ + int error; + + sc = malloc(sizeof(*sc), M_AUTOFS, M_WAITOK | M_ZERO); + + autofs_request_zone = uma_zcreate("autofs_request", + sizeof(struct autofs_request), NULL, NULL, NULL, NULL, + UMA_ALIGN_PTR, 0); + autofs_node_zone = uma_zcreate("autofs_node", + 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"); + + error = make_dev_p(MAKEDEV_CHECKNAME, &sc->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); + return (error); + } + sc->sc_cdev->si_drv1 = sc; + + return (0); +} + +int +autofs_uninit(struct vfsconf *vfsp) +{ + + sx_xlock(&sc->sc_lock); + if (sc->sc_dev_opened) { + sx_xunlock(&sc->sc_lock); + return (EBUSY); + } + if (sc->sc_cdev != NULL) + destroy_dev(sc->sc_cdev); + + uma_zdestroy(autofs_request_zone); + uma_zdestroy(autofs_node_zone); + + sx_xunlock(&sc->sc_lock); + /* + * XXX: Race with open? + */ + free(sc, M_AUTOFS); + + return (0); +} + +bool +autofs_ignore_thread(const struct thread *td) +{ + struct proc *p; + + p = td->td_proc; + + if (sc->sc_dev_opened == false) + return (false); + + PROC_LOCK(p); + if (p->p_session->s_sid == sc->sc_dev_sid) { + PROC_UNLOCK(p); + return (true); + } + PROC_UNLOCK(p); + + return (false); +} + +static char * +autofs_path(struct autofs_node *anp) +{ + struct autofs_mount *amp; + char *path, *tmp; + + amp = anp->an_mount; + + path = strdup("", M_AUTOFS); + for (; anp->an_parent != NULL; anp = anp->an_parent) { + tmp = malloc(strlen(anp->an_name) + strlen(path) + 2, + M_AUTOFS, M_WAITOK); + strcpy(tmp, anp->an_name); + strcat(tmp, "/"); + strcat(tmp, path); + free(path, M_AUTOFS); + path = tmp; + } + + tmp = malloc(strlen(amp->am_mountpoint) + strlen(path) + 2, + M_AUTOFS, M_WAITOK); + strcpy(tmp, amp->am_mountpoint); + strcat(tmp, "/"); + strcat(tmp, path); + free(path, M_AUTOFS); + path = tmp; + + return (path); +} + +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); + AUTOFS_WARN("request %d for %s timed out after %d seconds", + ar->ar_id, ar->ar_path, autofs_timeout); + /* + * XXX: EIO perhaps? + */ + ar->ar_error = ETIMEDOUT; + ar->ar_done = true; + ar->ar_in_progress = false; + cv_broadcast(&sc->sc_cv); + sx_xunlock(&sc->sc_lock); +} + +bool +autofs_cached(struct autofs_node *anp, const char *component, int componentlen) +{ + int error; + struct autofs_mount *amp; + + amp = anp->an_mount; + + AUTOFS_ASSERT_UNLOCKED(amp); + + /* + * For top-level nodes we need to request automountd(8) + * assistance even if the node is marked as cached, + * but the requested subdirectory does not exist. This + * is necessary for wildcard indirect map keys to work. + */ + if (anp->an_parent == NULL && componentlen != 0) { + AUTOFS_LOCK(amp); + error = autofs_node_find(anp, component, componentlen, NULL); + AUTOFS_UNLOCK(amp); + if (error != 0) + return (false); + } + + return (anp->an_cached); +} + +static void +autofs_cache_callout(void *context) +{ + struct autofs_node *anp; + + anp = context; + anp->an_cached = false; +} + +/* + * The set/restore sigmask functions are used to (temporarily) overwrite + * the thread td_sigmask during triggering. + */ +static void +autofs_set_sigmask(sigset_t *oldset) +{ + sigset_t newset; + int i; + + SIGFILLSET(newset); + /* Remove the autofs set of signals from newset */ + PROC_LOCK(curproc); + mtx_lock(&curproc->p_sigacts->ps_mtx); + for (i = 0 ; i < sizeof(autofs_sig_set)/sizeof(int) ; i++) { + /* + * But make sure we leave the ones already masked + * by the process, i.e. remove the signal from the + * temporary signalmask only if it wasn't already + * in p_sigmask. + */ + if (!SIGISMEMBER(curthread->td_sigmask, autofs_sig_set[i]) && + !SIGISMEMBER(curproc->p_sigacts->ps_sigignore, + autofs_sig_set[i])) { + SIGDELSET(newset, autofs_sig_set[i]); + } + } + mtx_unlock(&curproc->p_sigacts->ps_mtx); + kern_sigprocmask(curthread, SIG_SETMASK, &newset, oldset, + SIGPROCMASK_PROC_LOCKED); + PROC_UNLOCK(curproc); +} + +static void +autofs_restore_sigmask(sigset_t *set) +{ + + kern_sigprocmask(curthread, SIG_SETMASK, set, NULL, 0); +} + +static int +autofs_trigger_one(struct autofs_node *anp, + const char *component, int componentlen) +{ + 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); + + if (anp->an_parent == NULL) { + key = strndup(component, componentlen, M_AUTOFS); + } else { + for (firstanp = anp; firstanp->an_parent->an_parent != NULL; + firstanp = firstanp->an_parent) + continue; + key = strdup(firstanp->an_name, M_AUTOFS); + } + + path = autofs_path(anp); + + TAILQ_FOREACH(ar, &sc->sc_requests, ar_next) { + if (strcmp(ar->ar_path, path) != 0) + continue; + if (strcmp(ar->ar_key, key) != 0) + continue; + + KASSERT(strcmp(ar->ar_from, amp->am_from) == 0, + ("from changed; %s != %s", ar->ar_from, amp->am_from)); + KASSERT(strcmp(ar->ar_prefix, amp->am_prefix) == 0, + ("prefix changed; %s != %s", + ar->ar_prefix, amp->am_prefix)); + KASSERT(strcmp(ar->ar_options, amp->am_options) == 0, + ("options changed; %s != %s", + ar->ar_options, amp->am_options)); + + break; + } + + if (ar != NULL) { + refcount_acquire(&ar->ar_refcount); + } else { + 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); + 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)); + strlcpy(ar->ar_key, key, sizeof(ar->ar_key)); + strlcpy(ar->ar_options, + amp->am_options, sizeof(ar->ar_options)); + + callout_init(&ar->ar_callout, 1); + 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); + } + + cv_broadcast(&sc->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); + autofs_restore_sigmask(&oldset); + if (error != 0) { + /* + * XXX: For some reson this returns -1 + * instead of EINTR, wtf?! + */ + error = EINTR; + AUTOFS_WARN("cv_wait_sig for %s failed " + "with error %d", ar->ar_path, error); + break; + } + } else { + cv_wait(&sc->sc_cv, &sc->sc_lock); + } + } + + request_error = ar->ar_error; + if (request_error != 0) { + AUTOFS_WARN("request for %s completed with error %d", + ar->ar_path, request_error); + } + + last = refcount_release(&ar->ar_refcount); + if (last) { + TAILQ_REMOVE(&sc->sc_requests, ar, ar_next); + /* + * XXX: Is it safe? + */ + sx_xunlock(&sc->sc_lock); + callout_drain(&ar->ar_callout); + sx_xlock(&sc->sc_lock); + uma_zfree(autofs_request_zone, ar); + } + + /* + * Note that we do not do negative caching on purpose. This + * way the user can retry access at any time, e.g. after fixing + * the failure reason, without waiting for cache timer to expire. + */ + if (error == 0 && request_error == 0 && autofs_cache > 0) { + anp->an_cached = true; + callout_reset(&anp->an_callout, autofs_cache * hz, + autofs_cache_callout, anp); + } + + free(key, M_AUTOFS); + free(path, M_AUTOFS); + + if (error != 0) + return (error); + return (request_error); +} + +/* + * Send request to automountd(8) and wait for completion. + */ +int +autofs_trigger(struct autofs_node *anp, + const char *component, int componentlen) +{ + int error; + + for (;;) { + error = autofs_trigger_one(anp, component, componentlen); + if (error == 0) { + anp->an_retries = 0; + return (0); + } + if (error == EINTR) { + AUTOFS_DEBUG("trigger interrupted by signal, " + "not retrying"); + anp->an_retries = 0; + return (error); + } + anp->an_retries++; + if (anp->an_retries >= autofs_retry_attempts) { + AUTOFS_DEBUG("trigger failed %d times; returning " + "error %d", anp->an_retries, error); + anp->an_retries = 0; + return (error); + + } + 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); + pause("autofs_retry", autofs_retry_delay * hz); + sx_xlock(&sc->sc_lock); + } +} + +static int +autofs_ioctl_request(struct autofs_softc *sc, struct autofs_daemon_request *adr) +{ + struct autofs_request *ar; + int error; + + sx_xlock(&sc->sc_lock); + for (;;) { + TAILQ_FOREACH(ar, &sc->sc_requests, ar_next) { + if (ar->ar_done) + continue; + if (ar->ar_in_progress) + continue; + + break; + } + + if (ar != NULL) + break; + + error = cv_wait_sig(&sc->sc_cv, &sc->sc_lock); + if (error != 0) { + /* + * XXX: For some reson this returns -1 instead + * of EINTR, wtf?! + */ + error = EINTR; + sx_xunlock(&sc->sc_lock); + AUTOFS_DEBUG("failed with error %d", error); + return (error); + } + } + + ar->ar_in_progress = true; + sx_xunlock(&sc->sc_lock); + + adr->adr_id = ar->ar_id; + strlcpy(adr->adr_from, ar->ar_from, sizeof(adr->adr_from)); + strlcpy(adr->adr_path, ar->ar_path, sizeof(adr->adr_path)); + strlcpy(adr->adr_prefix, ar->ar_prefix, sizeof(adr->adr_prefix)); + strlcpy(adr->adr_key, ar->ar_key, sizeof(adr->adr_key)); + strlcpy(adr->adr_options, ar->ar_options, sizeof(adr->adr_options)); + + PROC_LOCK(curproc); + sc->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) +{ + struct autofs_request *ar; + + sx_xlock(&sc->sc_lock); + TAILQ_FOREACH(ar, &sc->sc_requests, ar_next) { + if (ar->ar_id == add->add_id) + break; + } + + if (ar == NULL) { + sx_xunlock(&sc->sc_lock); + AUTOFS_DEBUG("id %d not found", add->add_id); + return (ESRCH); + } + + ar->ar_error = add->add_error; + ar->ar_done = true; + ar->ar_in_progress = false; + cv_broadcast(&sc->sc_cv); + + sx_xunlock(&sc->sc_lock); + + return (0); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Aug 17 09:48:15 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 36C6A66B; Sun, 17 Aug 2014 09:48:15 +0000 (UTC) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id DFB3D202A; Sun, 17 Aug 2014 09:48:14 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 0B48925D3A81; Sun, 17 Aug 2014 09:48:11 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 02E68C27A17; Sun, 17 Aug 2014 09:48:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id nL8DKgrbaln7; Sun, 17 Aug 2014 09:48:09 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:5815:cabe:ca21:ab7e] (unknown [IPv6:fde9:577b:c1a9:4410:5815:cabe:ca21:ab7e]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id CE3C6C27746; Sun, 17 Aug 2014 09:48:07 +0000 (UTC) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r270096 - in head: 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.sbin u... From: "Bjoern A. Zeeb" In-Reply-To: <201408170944.s7H9igDr008156@svn.freebsd.org> Date: Sun, 17 Aug 2014 09:47:46 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <7B8554C6-A270-49F8-9AC8-2BA086FD47EA@FreeBSD.org> References: <201408170944.s7H9igDr008156@svn.freebsd.org> To: Edward Tomasz Napierala X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 09:48:15 -0000 On 17 Aug 2014, at 09:44 , Edward Tomasz Napierala = wrote: > Author: trasz > Date: Sun Aug 17 09:44:42 2014 > New Revision: 270096 > URL: http://svnweb.freebsd.org/changeset/base/270096 >=20 > Log: > 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. >=20 > There are still a few outstanding problems; they will be fixed = shortly. >=20 > Reviewed by: allanjude@, emaste@, kib@, wblock@ (earlier versions) > Phabric: D523 > MFC after: 2 weeks > Relnotes: yes > Sponsored by: The FreeBSD Foundation Yabadabadoooo! Thanks a lot! =97=20 Bjoern A. Zeeb "Come on. Learn, goddamn it.", WarGames, 1983 From owner-svn-src-all@FreeBSD.ORG Sun Aug 17 10:25:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 555FBA6; Sun, 17 Aug 2014 10:25:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 40E4D2442; Sun, 17 Aug 2014 10:25:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7HAPSnQ026844; Sun, 17 Aug 2014 10:25:28 GMT (envelope-from luigi@FreeBSD.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7HAPSj4026843; Sun, 17 Aug 2014 10:25:28 GMT (envelope-from luigi@FreeBSD.org) Message-Id: <201408171025.s7HAPSj4026843@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: luigi set sender to luigi@FreeBSD.org using -f From: Luigi Rizzo Date: Sun, 17 Aug 2014 10:25:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270097 - head/sys/dev/netmap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 10:25:28 -0000 Author: luigi Date: Sun Aug 17 10:25:27 2014 New Revision: 270097 URL: http://svnweb.freebsd.org/changeset/base/270097 Log: staticize two functions, and use proper format for a struct sglist (reported by bz) Modified: head/sys/dev/netmap/if_vtnet_netmap.h Modified: head/sys/dev/netmap/if_vtnet_netmap.h ============================================================================== --- head/sys/dev/netmap/if_vtnet_netmap.h Sun Aug 17 09:44:42 2014 (r270096) +++ head/sys/dev/netmap/if_vtnet_netmap.h Sun Aug 17 10:25:27 2014 (r270097) @@ -42,7 +42,7 @@ * and need to be freed; * - buffers queued by netmap return the txq/rxq, and do not need work */ -void +static void vtnet_netmap_free_bufs(struct SOFTC_T* sc) { int i, nmb = 0, n = 0, last; @@ -80,7 +80,7 @@ vtnet_netmap_free_bufs(struct SOFTC_T* s } /* Register and unregister. */ -int +static int vtnet_netmap_reg(struct netmap_adapter *na, int onoff) { struct ifnet *ifp = na->ifp; @@ -237,7 +237,7 @@ vtnet_refill_rxq(struct netmap_kring *kr /* use a local sglist, default might be short */ struct sglist_seg ss[2]; - struct sglist sg[1] = { ss, 0, 0, 2}; + struct sglist sg = { ss, 0, 0, 2 }; for (n = 0; nm_i != head; n++) { static struct virtio_net_hdr_mrg_rxbuf hdr; @@ -252,11 +252,11 @@ vtnet_refill_rxq(struct netmap_kring *kr } slot->flags &= ~NS_BUF_CHANGED; - sglist_reset(sg); // cheap - err = sglist_append(sg, &hdr, sc->vtnet_hdr_size); - err = sglist_append_phys(sg, paddr, NETMAP_BUF_SIZE(na)); + sglist_reset(&sg); // cheap + err = sglist_append(&sg, &hdr, sc->vtnet_hdr_size); + err = sglist_append_phys(&sg, paddr, NETMAP_BUF_SIZE(na)); /* writable for the host */ - err = virtqueue_enqueue(vq, rxq, sg, 0, sg->sg_nseg); + err = virtqueue_enqueue(vq, rxq, &sg, 0, sg.sg_nseg); if (err < 0) { D("virtqueue_enqueue failed"); break; From owner-svn-src-all@FreeBSD.ORG Sun Aug 17 11:59:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D78FF985; Sun, 17 Aug 2014 11:59:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7DFF2E8C; Sun, 17 Aug 2014 11:59:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7HBxNbx067570; Sun, 17 Aug 2014 11:59:23 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7HBxN8x067569; Sun, 17 Aug 2014 11:59:23 GMT (envelope-from se@FreeBSD.org) Message-Id: <201408171159.s7HBxN8x067569@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Sun, 17 Aug 2014 11:59:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270098 - head/share/syscons/keymaps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 11:59:24 -0000 Author: se Date: Sun Aug 17 11:59:23 2014 New Revision: 270098 URL: http://svnweb.freebsd.org/changeset/base/270098 Log: Add a few missing entries and fix entries that are obviously wrong. The use of the old ISO language code "iw" for Hebrew was inconsistent and it is replaced by the new language code "he" (which was already used for the keyboard menu entry, but not for the menu heading or the default font). These changes are in preparation of the conversion of this file and the keymap definitions to Unicode for use with NEWCONS. Modified: head/share/syscons/keymaps/INDEX.keymaps Modified: head/share/syscons/keymaps/INDEX.keymaps ============================================================================== --- head/share/syscons/keymaps/INDEX.keymaps Sun Aug 17 10:25:27 2014 (r270097) +++ head/share/syscons/keymaps/INDEX.keymaps Sun Aug 17 11:59:23 2014 (r270098) @@ -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) From owner-svn-src-all@FreeBSD.ORG Sun Aug 17 13:08:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A88C9C4; Sun, 17 Aug 2014 13:08:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB0F12619; Sun, 17 Aug 2014 13:08:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7HD8FYv099155; Sun, 17 Aug 2014 13:08:15 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7HD8FPf099154; Sun, 17 Aug 2014 13:08:15 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201408171308.s7HD8FPf099154@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 17 Aug 2014 13:08:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270099 - in stable: 10/contrib/gcc/config/i386 9/contrib/gcc/config/i386 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 13:08:16 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Aug 17 13:08:15 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF1CC99D; Sun, 17 Aug 2014 13:08:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9AB8D2618; Sun, 17 Aug 2014 13:08:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7HD8Fse099148; Sun, 17 Aug 2014 13:08:15 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7HD8Fnh099147; Sun, 17 Aug 2014 13:08:15 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201408171308.s7HD8Fnh099147@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 17 Aug 2014 13:08:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r270099 - in stable: 10/contrib/gcc/config/i386 9/contrib/gcc/config/i386 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 13:08:15 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Aug 17 13:12:08 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 759A7319; Sun, 17 Aug 2014 13:12:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46DA22700; Sun, 17 Aug 2014 13:12:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7HDC8SR004742; Sun, 17 Aug 2014 13:12:08 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7HDC7Kt004740; Sun, 17 Aug 2014 13:12:07 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201408171312.s7HDC7Kt004740@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 17 Aug 2014 13:12:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org 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 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 13:12:08 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Aug 17 13:12:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E52CA2F9; Sun, 17 Aug 2014 13:12:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B574226FF; Sun, 17 Aug 2014 13:12:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7HDC7k7004735; Sun, 17 Aug 2014 13:12:07 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7HDC7Gr004733; Sun, 17 Aug 2014 13:12:07 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201408171312.s7HDC7Gr004733@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 17 Aug 2014 13:12:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org 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 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 13:12:08 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Aug 17 13:19:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 6671A8F5; Sun, 17 Aug 2014 13:19:42 +0000 (UTC) Date: Sun, 17 Aug 2014 13:19:42 +0000 From: Alexey Dokuchaev To: Dimitry Andric Subject: Re: svn commit: r270099 - in stable: 10/contrib/gcc/config/i386 9/contrib/gcc/config/i386 Message-ID: <20140817131942.GA38672@FreeBSD.org> References: <201408171308.s7HD8Fnh099147@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201408171308.s7HD8Fnh099147@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 13:19:42 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Aug 17 13:30:05 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7477FDC4; Sun, 17 Aug 2014 13:30:05 +0000 (UTC) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "tensor.andric.com", Issuer "CAcert Class 3 Root" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2E7FF2838; Sun, 17 Aug 2014 13:30:04 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::cc76:2de1:6f93:f455] (unknown [IPv6:2001:7b8:3a7:0:cc76:2de1:6f93:f455]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 355C55C44; Sun, 17 Aug 2014 15:29:55 +0200 (CEST) Content-Type: multipart/signed; boundary="Apple-Mail=_83098D7F-10E5-4121-948D-CB8EF60B44EC"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r270099 - in stable: 10/contrib/gcc/config/i386 9/contrib/gcc/config/i386 From: Dimitry Andric In-Reply-To: <20140817131942.GA38672@FreeBSD.org> Date: Sun, 17 Aug 2014 15:29:42 +0200 Message-Id: <8CA269F6-BCD2-4E78-947F-682214367F36@FreeBSD.org> References: <201408171308.s7HD8Fnh099147@svn.freebsd.org> <20140817131942.GA38672@FreeBSD.org> To: Alexey Dokuchaev X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 13:30:05 -0000 --Apple-Mail=_83098D7F-10E5-4121-948D-CB8EF60B44EC Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii 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 --Apple-Mail=_83098D7F-10E5-4121-948D-CB8EF60B44EC Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iEYEARECAAYFAlPwrk8ACgkQsF6jCi4glqOt5gCfUreIXWdC0ECpKEMPu8R9MFVZ +vMAnAnoGbupo3Ix7mMwvM0Tj2DvEP5n =P9Bn -----END PGP SIGNATURE----- --Apple-Mail=_83098D7F-10E5-4121-948D-CB8EF60B44EC-- From owner-svn-src-all@FreeBSD.ORG Sun Aug 17 13:45:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 0BA27258; Sun, 17 Aug 2014 13:45:09 +0000 (UTC) Date: Sun, 17 Aug 2014 13:45:09 +0000 From: Alexey Dokuchaev To: Dimitry Andric Subject: Re: svn commit: r270099 - in stable: 10/contrib/gcc/config/i386 9/contrib/gcc/config/i386 Message-ID: <20140817134509.GA47327@FreeBSD.org> References: <201408171308.s7HD8Fnh099147@svn.freebsd.org> <20140817131942.GA38672@FreeBSD.org> <8CA269F6-BCD2-4E78-947F-682214367F36@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8CA269F6-BCD2-4E78-947F-682214367F36@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 13:45:09 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Aug 17 14:26:15 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F319D1D; Sun, 17 Aug 2014 14:26:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F6A62DBB; Sun, 17 Aug 2014 14:26:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7HEQFx8038616; Sun, 17 Aug 2014 14:26:15 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7HEQCmb038602; Sun, 17 Aug 2014 14:26:12 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201408171426.s7HEQCmb038602@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 17 Aug 2014 14:26:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270101 - in head/bin/sh/tests: . errors X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 14:26:15 -0000 Author: jilles Date: Sun Aug 17 14:26:12 2014 New Revision: 270101 URL: http://svnweb.freebsd.org/changeset/base/270101 Log: sh: Don't hardcode relative paths in the tests stderr files. These paths have had to be adjusted to changes in the testsuite runner several times, so modify the tests to remove the need for such adjustment. A cp in functional_test.sh is now unneeded, but this matters little in performance. Modified: head/bin/sh/tests/errors/bad-parm-exp2.2 head/bin/sh/tests/errors/bad-parm-exp2.2.stderr head/bin/sh/tests/errors/bad-parm-exp3.2 head/bin/sh/tests/errors/bad-parm-exp3.2.stderr head/bin/sh/tests/errors/bad-parm-exp4.2 head/bin/sh/tests/errors/bad-parm-exp4.2.stderr head/bin/sh/tests/errors/bad-parm-exp5.2 head/bin/sh/tests/errors/bad-parm-exp5.2.stderr head/bin/sh/tests/errors/bad-parm-exp6.2 head/bin/sh/tests/errors/bad-parm-exp6.2.stderr head/bin/sh/tests/functional_test.sh Modified: head/bin/sh/tests/errors/bad-parm-exp2.2 ============================================================================== --- head/bin/sh/tests/errors/bad-parm-exp2.2 Sun Aug 17 13:12:07 2014 (r270100) +++ head/bin/sh/tests/errors/bad-parm-exp2.2 Sun Aug 17 14:26:12 2014 (r270101) @@ -1,2 +1,2 @@ # $FreeBSD$ -${} +eval '${}' Modified: head/bin/sh/tests/errors/bad-parm-exp2.2.stderr ============================================================================== --- head/bin/sh/tests/errors/bad-parm-exp2.2.stderr Sun Aug 17 13:12:07 2014 (r270100) +++ head/bin/sh/tests/errors/bad-parm-exp2.2.stderr Sun Aug 17 14:26:12 2014 (r270101) @@ -1 +1 @@ -./bad-parm-exp2.2: ${}: Bad substitution +eval: ${}: Bad substitution Modified: head/bin/sh/tests/errors/bad-parm-exp3.2 ============================================================================== --- head/bin/sh/tests/errors/bad-parm-exp3.2 Sun Aug 17 13:12:07 2014 (r270100) +++ head/bin/sh/tests/errors/bad-parm-exp3.2 Sun Aug 17 14:26:12 2014 (r270101) @@ -1,2 +1,2 @@ # $FreeBSD$ -${foo/} +eval '${foo/}' Modified: head/bin/sh/tests/errors/bad-parm-exp3.2.stderr ============================================================================== --- head/bin/sh/tests/errors/bad-parm-exp3.2.stderr Sun Aug 17 13:12:07 2014 (r270100) +++ head/bin/sh/tests/errors/bad-parm-exp3.2.stderr Sun Aug 17 14:26:12 2014 (r270101) @@ -1 +1 @@ -./bad-parm-exp3.2: ${foo/}: Bad substitution +eval: ${foo/}: Bad substitution Modified: head/bin/sh/tests/errors/bad-parm-exp4.2 ============================================================================== --- head/bin/sh/tests/errors/bad-parm-exp4.2 Sun Aug 17 13:12:07 2014 (r270100) +++ head/bin/sh/tests/errors/bad-parm-exp4.2 Sun Aug 17 14:26:12 2014 (r270101) @@ -1,2 +1,2 @@ # $FreeBSD$ -${foo:@abc} +eval '${foo:@abc}' Modified: head/bin/sh/tests/errors/bad-parm-exp4.2.stderr ============================================================================== --- head/bin/sh/tests/errors/bad-parm-exp4.2.stderr Sun Aug 17 13:12:07 2014 (r270100) +++ head/bin/sh/tests/errors/bad-parm-exp4.2.stderr Sun Aug 17 14:26:12 2014 (r270101) @@ -1 +1 @@ -./bad-parm-exp4.2: ${foo:@...}: Bad substitution +eval: ${foo:@...}: Bad substitution Modified: head/bin/sh/tests/errors/bad-parm-exp5.2 ============================================================================== --- head/bin/sh/tests/errors/bad-parm-exp5.2 Sun Aug 17 13:12:07 2014 (r270100) +++ head/bin/sh/tests/errors/bad-parm-exp5.2 Sun Aug 17 14:26:12 2014 (r270101) @@ -1,2 +1,2 @@ # $FreeBSD$ -${/} +eval '${/}' Modified: head/bin/sh/tests/errors/bad-parm-exp5.2.stderr ============================================================================== --- head/bin/sh/tests/errors/bad-parm-exp5.2.stderr Sun Aug 17 13:12:07 2014 (r270100) +++ head/bin/sh/tests/errors/bad-parm-exp5.2.stderr Sun Aug 17 14:26:12 2014 (r270101) @@ -1 +1 @@ -./bad-parm-exp5.2: ${/}: Bad substitution +eval: ${/}: Bad substitution Modified: head/bin/sh/tests/errors/bad-parm-exp6.2 ============================================================================== --- head/bin/sh/tests/errors/bad-parm-exp6.2 Sun Aug 17 13:12:07 2014 (r270100) +++ head/bin/sh/tests/errors/bad-parm-exp6.2 Sun Aug 17 14:26:12 2014 (r270101) @@ -1,2 +1,2 @@ # $FreeBSD$ -${#foo^} +eval '${#foo^}' Modified: head/bin/sh/tests/errors/bad-parm-exp6.2.stderr ============================================================================== --- head/bin/sh/tests/errors/bad-parm-exp6.2.stderr Sun Aug 17 13:12:07 2014 (r270100) +++ head/bin/sh/tests/errors/bad-parm-exp6.2.stderr Sun Aug 17 14:26:12 2014 (r270101) @@ -1 +1 @@ -./bad-parm-exp6.2: ${foo...}: Bad substitution +eval: ${foo...}: Bad substitution Modified: head/bin/sh/tests/functional_test.sh ============================================================================== --- head/bin/sh/tests/functional_test.sh Sun Aug 17 13:12:07 2014 (r270100) +++ head/bin/sh/tests/functional_test.sh Sun Aug 17 14:26:12 2014 (r270101) @@ -39,13 +39,7 @@ check() local out_file="${SRCDIR}/${tc}.stdout" [ -f "${out_file}" ] && out_flag="-o file:${out_file}" - # We need to copy the testcase scenario file because some of the - # testcases hardcode relative paths in the stderr/stdout. - # - # TODO: we might be able to generate this path at build time - cp ${SRCDIR}/${tc} . - - atf_check -s exit:${tc##*.} ${err_flag} ${out_flag} ${SH} "./${tc}" + atf_check -s exit:${tc##*.} ${err_flag} ${out_flag} ${SH} "${SRCDIR}/${tc}" } add_testcase() From owner-svn-src-all@FreeBSD.ORG Sun Aug 17 16:40:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A938A68; Sun, 17 Aug 2014 16:40:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66A1B2AD4; Sun, 17 Aug 2014 16:40:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7HGeUd5000859; Sun, 17 Aug 2014 16:40:30 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7HGeUut000858; Sun, 17 Aug 2014 16:40:30 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201408171640.s7HGeUut000858@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 17 Aug 2014 16:40:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270102 - head/bin/sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 16:40:30 -0000 Author: jilles Date: Sun Aug 17 16:40:29 2014 New Revision: 270102 URL: http://svnweb.freebsd.org/changeset/base/270102 Log: sh: Reject integer overflow in number and is_number. Modified: head/bin/sh/mystring.c Modified: head/bin/sh/mystring.c ============================================================================== --- head/bin/sh/mystring.c Sun Aug 17 14:26:12 2014 (r270101) +++ head/bin/sh/mystring.c Sun Aug 17 16:40:29 2014 (r270102) @@ -82,9 +82,17 @@ number(const char *s) int is_number(const char *p) { - do { - if (! is_digit(*p)) + const char *q; + + if (*p == '\0') + return 0; + while (*p == '0') + p++; + for (q = p; *q != '\0'; q++) + if (! is_digit(*q)) return 0; - } while (*++p != '\0'); + if (q - p > 10 || + (q - p == 10 && memcmp(p, "2147483647", 10) > 0)) + return 0; return 1; } From owner-svn-src-all@FreeBSD.ORG Sun Aug 17 16:53:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AC3A1E7; Sun, 17 Aug 2014 16:53:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7EA202CF5; Sun, 17 Aug 2014 16:53:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7HGrABT007180; Sun, 17 Aug 2014 16:53:10 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7HGrAPC007179; Sun, 17 Aug 2014 16:53:10 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201408171653.s7HGrAPC007179@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 17 Aug 2014 16:53:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270103 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 16:53:10 -0000 Author: imp Date: Sun Aug 17 16:53:10 2014 New Revision: 270103 URL: http://svnweb.freebsd.org/changeset/base/270103 Log: Convert the HL201 config file to use FDT. Modified: head/sys/arm/conf/HL201 Modified: head/sys/arm/conf/HL201 ============================================================================== --- head/sys/arm/conf/HL201 Sun Aug 17 16:40:29 2014 (r270102) +++ head/sys/arm/conf/HL201 Sun Aug 17 16:53:10 2014 (r270103) @@ -23,8 +23,6 @@ ident HL201 include "../at91/std.hl201" -#To statically compile in device wiring instead of /boot/device.hints -hints "HL201.hints" makeoptions MODULES_OVERRIDE="" makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols @@ -76,8 +74,14 @@ device loop device ether device uart device ate +device at91_wdt device mii -#device lxtphy +device lxtphy + +# I2C +device at91_twi # Atmel AT91 Two-wire Interface +device iic # I2C generic I/O device driver +device iicbus # I2C bus system # Debugging for use in -current #options INVARIANTS # Enable calls of extra sanity checking @@ -105,7 +109,7 @@ device miibus #device cue # CATC USB Ethernet #device kue # Kawasaki LSI USB Ethernet #device rue # RealTek RTL8150 USB Ethernet -device udav # Davicom DM9601E USB +#device udav # Davicom DM9601E USB # USB Wireless #device rum # Ralink Technology RT2501USB wireless NICs #device uath # Atheros AR5523 wireless NICs @@ -127,10 +131,16 @@ options ROOTDEVNAME=\"ufs:da0s1a\" # NAND Flash - my board as 128MB Samsung part, YMMV. device nand # NAND interface on CS3 +# SPI: Data Flash +device at91_spi # SPI: +device spibus +device at45d # at45db642 and maybe others + + # Coming soon, but not yet -#options FDT -#options FDT_DTB_STATIC -#makeoptions FDT_DTS_FILE=hl201.dts +options FDT +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=hl201.dts options EARLY_PRINTF options SOCDEV_PA=0xfc000000 From owner-svn-src-all@FreeBSD.ORG Sun Aug 17 16:53:15 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A29A229; Sun, 17 Aug 2014 16:53:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 76CAC2CF7; Sun, 17 Aug 2014 16:53:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7HGrFYg007248; Sun, 17 Aug 2014 16:53:15 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7HGrFuK007247; Sun, 17 Aug 2014 16:53:15 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201408171653.s7HGrFuK007247@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 17 Aug 2014 16:53:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270104 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 16:53:15 -0000 Author: imp Date: Sun Aug 17 16:53:14 2014 New Revision: 270104 URL: http://svnweb.freebsd.org/changeset/base/270104 Log: Define at91_master_clock in only one file to eliminate warnings about it multiply defined commons. Modified: head/sys/arm/at91/at91_machdep.c Modified: head/sys/arm/at91/at91_machdep.c ============================================================================== --- head/sys/arm/at91/at91_machdep.c Sun Aug 17 16:53:10 2014 (r270103) +++ head/sys/arm/at91/at91_machdep.c Sun Aug 17 16:53:14 2014 (r270104) @@ -117,7 +117,7 @@ extern struct bus_space at91_bs_tag; struct pv_addr kernel_pt_table[NUM_KERNEL_PTS]; -uint32_t at91_master_clock; +extern uint32_t at91_master_clock; /* Static device mappings. */ const struct arm_devmap_entry at91_devmap[] = { From owner-svn-src-all@FreeBSD.ORG Sun Aug 17 16:53:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 814FA362; Sun, 17 Aug 2014 16:53:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53A282CFA; Sun, 17 Aug 2014 16:53:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7HGrKZV007311; Sun, 17 Aug 2014 16:53:20 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7HGrKib007310; Sun, 17 Aug 2014 16:53:20 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201408171653.s7HGrKib007310@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 17 Aug 2014 16:53:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270105 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 16:53:20 -0000 Author: imp Date: Sun Aug 17 16:53:19 2014 New Revision: 270105 URL: http://svnweb.freebsd.org/changeset/base/270105 Log: Add missing license to at91_common.c. It was committed w/o a license. Pointy hat to: imp@ Modified: head/sys/arm/at91/at91_common.c Modified: head/sys/arm/at91/at91_common.c ============================================================================== --- head/sys/arm/at91/at91_common.c Sun Aug 17 16:53:14 2014 (r270104) +++ head/sys/arm/at91/at91_common.c Sun Aug 17 16:53:19 2014 (r270105) @@ -1,3 +1,28 @@ +/*- + * Copyright (c) 2014 M. Warner Losh. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + #include __FBSDID("$FreeBSD$"); @@ -39,7 +64,7 @@ fdt_aic_decode_ic(phandle_t node, pcell_ *pol = INTR_POLARITY_CONFORM; return (0); -} +u} fdt_pic_decode_t fdt_pic_table[] = { &fdt_aic_decode_ic, From owner-svn-src-all@FreeBSD.ORG Sun Aug 17 17:08:04 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 744BAB87; Sun, 17 Aug 2014 17:08:04 +0000 (UTC) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47FAC2E71; Sun, 17 Aug 2014 17:08:03 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1XJ3vw-0007KC-1n; Sun, 17 Aug 2014 17:07:56 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id s7HH7tGR047340; Sun, 17 Aug 2014 11:07:55 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1/0cJUVGvwmEPfA8GLpiS3q X-Authentication-Warning: paranoia.hippie.lan: Host revolution.hippie.lan [172.22.42.240] claimed to be [172.22.42.240] Subject: Re: svn commit: r270105 - head/sys/arm/at91 From: Ian Lepore To: Warner Losh In-Reply-To: <201408171653.s7HGrKib007310@svn.freebsd.org> References: <201408171653.s7HGrKib007310@svn.freebsd.org> Content-Type: text/plain; charset="us-ascii" Date: Sun, 17 Aug 2014 11:07:54 -0600 Message-ID: <1408295274.56408.616.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 17:08:04 -0000 On Sun, 2014-08-17 at 16:53 +0000, Warner Losh wrote: > Author: imp > Date: Sun Aug 17 16:53:19 2014 > New Revision: 270105 > URL: http://svnweb.freebsd.org/changeset/base/270105 > > Log: > Add missing license to at91_common.c. It was committed w/o a license. > > Pointy hat to: imp@ > > Modified: > head/sys/arm/at91/at91_common.c > > Modified: head/sys/arm/at91/at91_common.c > ============================================================================== > --- head/sys/arm/at91/at91_common.c Sun Aug 17 16:53:14 2014 (r270104) > +++ head/sys/arm/at91/at91_common.c Sun Aug 17 16:53:19 2014 (r270105) > @@ -1,3 +1,28 @@ > +/*- > + * Copyright (c) 2014 M. Warner Losh. All rights reserved. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + */ > + > #include > __FBSDID("$FreeBSD$"); > > @@ -39,7 +64,7 @@ fdt_aic_decode_ic(phandle_t node, pcell_ > *pol = INTR_POLARITY_CONFORM; > > return (0); > -} > +u} > This looks like a bit of keyboard entropy. -- Ian > fdt_pic_decode_t fdt_pic_table[] = { > &fdt_aic_decode_ic, > From owner-svn-src-all@FreeBSD.ORG Sun Aug 17 18:20:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2C287F8 for ; Sun, 17 Aug 2014 18:20:39 +0000 (UTC) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com [209.85.215.42]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5F4B02725 for ; Sun, 17 Aug 2014 18:20:38 +0000 (UTC) Received: by mail-la0-f42.google.com with SMTP id pv20so3813504lab.29 for ; Sun, 17 Aug 2014 11:20:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=DFGa97UUExvkgWOWF4X0BBoELAEjKz/xgfcEhMlTuTk=; b=kAg2hqlPeEs4czEpIHzGgCAkmw3DtnkY8SYCIbEn5fuvRS7e3+AxEfF/sJd6hMpTWA /EM9oFjU4+K5CGFYFxj/rzH7GRThKwfAwWnFH5ZJAvcJiH/7uycG0SVqTg4MOBPmsmH7 zc9TBxJF6RSBK1GCBNNxRa+xjEogIf1p/6vw8TJnBW+9Uq7GxUfHkakMDx9u/NgqW+TT ms/ImRp6DU81KMtVnOrRa/X/OUPfHc1alGp01POXmgxhIwdgNe+64qifUYS9we6tkLCm w6L2ZT/NC32dcOUA/U9trfYTVjeQTfplHniQY8nPN6fEjzi59+9lyfSxt9XGQ/fM8jfm Yudg== X-Gm-Message-State: ALoCoQl8MP9KG4IJNIm/ZAYnQwat/hrZAMZ2SpW2gkdFkcejYGamF52LiwJrTrP4SZnXaBixNvHJ X-Received: by 10.112.35.138 with SMTP id h10mr10235390lbj.65.1408299631419; Sun, 17 Aug 2014 11:20:31 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by mx.google.com with ESMTPSA id j20sm23318398lbo.3.2014.08.17.11.20.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 Aug 2014 11:20:30 -0700 (PDT) Message-ID: <53F0F263.7040202@freebsd.org> Date: Sun, 17 Aug 2014 22:20:19 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: "Pedro F. Giffuni" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r270035 - stable/10/lib/libc/stdio References: <201408160129.s7G1TojV024013@svn.freebsd.org> In-Reply-To: <201408160129.s7G1TojV024013@svn.freebsd.org> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 18:20:40 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Aug 17 18:22:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 283C1940; Sun, 17 Aug 2014 18:22:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 118872742; Sun, 17 Aug 2014 18:22:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7HIMiEh049361; Sun, 17 Aug 2014 18:22:44 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7HIMhE1049355; Sun, 17 Aug 2014 18:22:43 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201408171822.s7HIMhE1049355@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 17 Aug 2014 18:22:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270106 - in stable/10/sys/cam: ctl scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 18:22:44 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Aug 17 18:23:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3160BA76; Sun, 17 Aug 2014 18:23:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11255274B; Sun, 17 Aug 2014 18:23:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7HINhVB049556; Sun, 17 Aug 2014 18:23:43 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7HINhjt049553; Sun, 17 Aug 2014 18:23:43 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201408171823.s7HINhjt049553@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 17 Aug 2014 18:23:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270107 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 18:23:44 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Aug 17 18:25:00 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD9FABB6; Sun, 17 Aug 2014 18:25:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C84402753; Sun, 17 Aug 2014 18:25:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7HIP0EG049795; Sun, 17 Aug 2014 18:25:00 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7HIP0u5049771; Sun, 17 Aug 2014 18:25:00 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201408171825.s7HIP0u5049771@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 17 Aug 2014 18:25:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270108 - in stable/10/sys/cam: ctl scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 18:25:01 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Aug 17 18:26:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 855ADDB8; Sun, 17 Aug 2014 18:26:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C2BE276B; Sun, 17 Aug 2014 18:26:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7HIQZES050050; Sun, 17 Aug 2014 18:26:35 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7HIQZfJ050049; Sun, 17 Aug 2014 18:26:35 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201408171826.s7HIQZfJ050049@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 17 Aug 2014 18:26:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270109 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 18:26:35 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Aug 17 18:27:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CEF66EEB; Sun, 17 Aug 2014 18:27:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BAED1277A; Sun, 17 Aug 2014 18:27:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7HIR25W050155; Sun, 17 Aug 2014 18:27:02 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7HIR2rT050154; Sun, 17 Aug 2014 18:27:02 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201408171827.s7HIR2rT050154@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Sun, 17 Aug 2014 18:27:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270110 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 18:27:02 -0000 Author: bz Date: Sun Aug 17 18:27:02 2014 New Revision: 270110 URL: http://svnweb.freebsd.org/changeset/base/270110 Log: Remove keyboard entropy [1] from r270105. Reported by: ian [1] (Pointy hat)^2 to: imp Modified: head/sys/arm/at91/at91_common.c Modified: head/sys/arm/at91/at91_common.c ============================================================================== --- head/sys/arm/at91/at91_common.c Sun Aug 17 18:26:34 2014 (r270109) +++ head/sys/arm/at91/at91_common.c Sun Aug 17 18:27:02 2014 (r270110) @@ -64,7 +64,7 @@ fdt_aic_decode_ic(phandle_t node, pcell_ *pol = INTR_POLARITY_CONFORM; return (0); -u} +} fdt_pic_decode_t fdt_pic_table[] = { &fdt_aic_decode_ic, From owner-svn-src-all@FreeBSD.ORG Sun Aug 17 19:06:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5C35BC7B; Sun, 17 Aug 2014 19:06:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4657D2446; Sun, 17 Aug 2014 19:06:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7HJ6SmK072820; Sun, 17 Aug 2014 19:06:28 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7HJ6Rs1072814; Sun, 17 Aug 2014 19:06:27 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201408171906.s7HJ6Rs1072814@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Sun, 17 Aug 2014 19:06:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270111 - in head: libexec/getty libexec/rshd sbin/init usr.bin/lock usr.bin/login usr.sbin/timed/timedc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 19:06:28 -0000 Author: neel Date: Sun Aug 17 19:06:26 2014 New Revision: 270111 URL: http://svnweb.freebsd.org/changeset/base/270111 Log: Remove LOG_ODELAY because it does nothing. Reviewed by: jilles CR: https://reviews.freebsd.org/D611 Modified: head/libexec/getty/main.c head/libexec/rshd/rshd.c head/sbin/init/init.c head/usr.bin/lock/lock.c head/usr.bin/login/login.c head/usr.sbin/timed/timedc/timedc.c Modified: head/libexec/getty/main.c ============================================================================== --- head/libexec/getty/main.c Sun Aug 17 18:27:02 2014 (r270110) +++ head/libexec/getty/main.c Sun Aug 17 19:06:26 2014 (r270111) @@ -187,7 +187,7 @@ main(int argc, char *argv[]) signal(SIGINT, SIG_IGN); signal(SIGQUIT, SIG_IGN); - openlog("getty", LOG_ODELAY|LOG_CONS|LOG_PID, LOG_AUTH); + openlog("getty", LOG_CONS|LOG_PID, LOG_AUTH); gethostname(hostname, sizeof(hostname) - 1); hostname[sizeof(hostname) - 1] = '\0'; if (hostname[0] == '\0') Modified: head/libexec/rshd/rshd.c ============================================================================== --- head/libexec/rshd/rshd.c Sun Aug 17 18:27:02 2014 (r270110) +++ head/libexec/rshd/rshd.c Sun Aug 17 19:06:26 2014 (r270111) @@ -127,7 +127,7 @@ main(int argc, char *argv[]) int ch, on = 1; struct sockaddr_storage from; - openlog("rshd", LOG_PID | LOG_ODELAY, LOG_DAEMON); + openlog("rshd", LOG_PID, LOG_DAEMON); opterr = 0; while ((ch = getopt(argc, argv, OPTIONS)) != -1) Modified: head/sbin/init/init.c ============================================================================== --- head/sbin/init/init.c Sun Aug 17 18:27:02 2014 (r270110) +++ head/sbin/init/init.c Sun Aug 17 19:06:26 2014 (r270111) @@ -242,7 +242,7 @@ invalid: * Note that this does NOT open a file... * Does 'init' deserve its own facility number? */ - openlog("init", LOG_CONS|LOG_ODELAY, LOG_AUTH); + openlog("init", LOG_CONS, LOG_AUTH); /* * Create an initial session. Modified: head/usr.bin/lock/lock.c ============================================================================== --- head/usr.bin/lock/lock.c Sun Aug 17 18:27:02 2014 (r270110) +++ head/usr.bin/lock/lock.c Sun Aug 17 19:06:26 2014 (r270111) @@ -97,7 +97,7 @@ main(int argc, char **argv) char *ap, *cryptpw, *mypw, *ttynam, *tzn; char hostname[MAXHOSTNAMELEN], s[BUFSIZ], s1[BUFSIZ]; - openlog("lock", LOG_ODELAY, LOG_AUTH); + openlog("lock", 0, LOG_AUTH); sectimeout = TIMEOUT; pw = NULL; Modified: head/usr.bin/login/login.c ============================================================================== --- head/usr.bin/login/login.c Sun Aug 17 18:27:02 2014 (r270110) +++ head/usr.bin/login/login.c Sun Aug 17 19:06:26 2014 (r270111) @@ -198,7 +198,7 @@ main(int argc, char *argv[]) (void)alarm(timeout); (void)setpriority(PRIO_PROCESS, 0, 0); - openlog("login", LOG_ODELAY, LOG_AUTH); + openlog("login", 0, LOG_AUTH); uid = getuid(); euid = geteuid(); Modified: head/usr.sbin/timed/timedc/timedc.c ============================================================================== --- head/usr.sbin/timed/timedc/timedc.c Sun Aug 17 18:27:02 2014 (r270110) +++ head/usr.sbin/timed/timedc/timedc.c Sun Aug 17 19:06:26 2014 (r270111) @@ -66,7 +66,7 @@ main(int argc, char *argv[]) { register struct cmd *c; - openlog("timedc", LOG_ODELAY, LOG_AUTH); + openlog("timedc", 0, LOG_AUTH); /* * security dictates! From owner-svn-src-all@FreeBSD.ORG Sun Aug 17 19:11:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C5DD5E29 for ; Sun, 17 Aug 2014 19:11:23 +0000 (UTC) Received: from nm10-vm0.bullet.mail.bf1.yahoo.com (nm10-vm0.bullet.mail.bf1.yahoo.com [98.139.213.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 682E7247D for ; Sun, 17 Aug 2014 19:11:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1408302681; bh=uAXE9Vyyeq+cAv/tilMKibk0z2ugylUHG2CH42yAbbM=; h=Received:Received:Received:X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=qJp8Prl5pP90f8qZ2oJ6nbCaBdd+/m42AcGWkiIW6qPLEk9zOfKb4Kan2i151FwFwHUpxohYuwF4riT3r72xbo0DliFSg/P/EGxIte7wHZWv+MXfr6GYBtjMPwId97UDL5L7MrIGaDr4pO6AC33EStHBSEamZR6C/85FPphkl0YXhTXaG+LlP49WBj0WfJPfbnUI+QgIzGx6jryz2vrRNk+kdHKnoICGuEph0wnh4Ofm09XKhd2whMGQjtsZGBeBCY178ZUcgUfq5qcBo91rOgVRCf6+POzf4OR6N4dZd61XPAVufszayVOy+i2kx9k7ahd5vvyHDCVroLKgV3z05A== DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s2048; d=yahoo.com; b=AanV9AmidEx1r+rjvyqUrIM8tH/YdIqltl9Gbd7TLSj/8vYz6fWNLHlUNV5CnF8j5RmjINQqzhrNW+Q/r6QRrZLpCCVtu+2BwGO5qFYDwFhQG7msqNnX6UEckutUi4ymXQQzoDaiTvG0v/Z/FxxlCTC1gmRlOLoHLLoEUTTDw88s31DSWxJxrvm4ldhZmaVvI8WKnS2CGSDEOirO0TZomeX0HleUmGTa79d2qqhsoc3r2sDcGC7JVSTluuQKLBRx8eNI5luiq26y4sDKmddgQh3dAJK8mIIZL2/v4WeJL4zFlBDm0Nck5UBtl6ONvlZ/TYzP/4Xu6Ao803YFecHklw==; Received: from [66.196.81.171] by nm10.bullet.mail.bf1.yahoo.com with NNFMP; 17 Aug 2014 19:11:21 -0000 Received: from [68.142.230.70] by tm17.bullet.mail.bf1.yahoo.com with NNFMP; 17 Aug 2014 19:11:21 -0000 Received: from [127.0.0.1] by smtp227.mail.bf1.yahoo.com with NNFMP; 17 Aug 2014 19:11:21 -0000 X-Yahoo-Newman-Id: 137672.67343.bm@smtp227.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: tnXI4CoVM1lkMXYPMqNeZyWnnTYcd0f49idQsT9P4flfp99 35MqGP5sEkitD9gq_h06up88okIhAyxZy7gjGEF_bndNL.guloq3JzXnKx_7 OAHFvRjHA7smI8TeqfmPbtmO7W2g3Htm8QDRtow38_dtNAoXH1NuGj03utWz vBWNS_Saqlyc4PDfB986d.gfJI1eoeeqYj5jvV2pPdy6YfZR3rkYZuZIjJDR gpfMxtqrwpJE_E.Hm17Bho6Llvcx9UgrtDBzg3HsKLsnGv3YwGQEgtDDusCT q.BkHulQ6P0XVZr9A6Ijs94wwmGFOPq6WihjTPywAnNutQ5PqZm39JKC.tYh Dg1KWjW5h5o8SI_rj80JEcBkuW7NevlZOT8IqVkOtP6g6YCbPrIo1_5xCStF 0IvcNl6HyneySkfydhrkAtoK7zZ5X_XCj9yUA_vQJ2P22Sv65Mm.zt5x_yXv 7E9miL5GmPXHInS_iOYWsZHl0A7RnJapJSSas4KxG1pswz7bYLt30l4tvcx1 MoXLoDfdPjXhadWnPxHIKPbu49Z.WEaB8DNLTX_1qBcpNwRBeb8g16h8hjm9 zLYcaCidfJ297vgfuq3HaC6Qy8Xk3cbJ8lut7eplEmbtBvHbF86MqnNqXzhY qKOBoPaI- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <53F0FE68.6080501@freebsd.org> Date: Sun, 17 Aug 2014 14:11:36 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Andrey Chernov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r270035 - stable/10/lib/libc/stdio References: <201408160129.s7G1TojV024013@svn.freebsd.org> <53F0F263.7040202@freebsd.org> In-Reply-To: <53F0F263.7040202@freebsd.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 19:11:24 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Aug 17 19:19:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ADEBD235; Sun, 17 Aug 2014 19:19:31 +0000 (UTC) Received: from mail-pd0-x234.google.com (mail-pd0-x234.google.com [IPv6:2607:f8b0:400e:c02::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6CCD0253D; Sun, 17 Aug 2014 19:19:31 +0000 (UTC) Received: by mail-pd0-f180.google.com with SMTP id v10so6180223pde.11 for ; Sun, 17 Aug 2014 12:19:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=qpkdlgUcsNqaTaiLhknbJq+kadLwTjvN6VaeGfaVMQE=; b=Wf/DTbHG3O/bknOEipej6KZ3uBd7EJ86y+1kumuq02yruqEnBwK1K/VckECFF9Gux3 2iau9DqTrxUD+/j8d1dm5GUKRRmxjJhhH6TEtXazW6P17aVDswCrEccMSA0pLH3uhSjw hhdZ+HV/vIzbnTYgvljIM9zzK8lqQx19V9GlC7PxdCwOgDXhBx3QV6D80nHxRkX00dSZ lH+PbbMniskE68CIDo5QyDBtbKxYUtUS0NTTI2aaCbwKIgAmo/hWDf/QnEUtb21wU/zk lmB/HwHnK9+n1Xb6PBd90kwQgw/shDn+9uCSJx3jvRreLFHRB7LkuwrIJT3+cvHeRvUF TD2A== X-Received: by 10.68.69.109 with SMTP id d13mr29690107pbu.111.1408303170889; Sun, 17 Aug 2014 12:19:30 -0700 (PDT) Received: from [192.168.20.5] (c-98-247-240-204.hsd1.wa.comcast.net. [98.247.240.204]) by mx.google.com with ESMTPSA id t5sm14041418pbs.4.2014.08.17.12.19.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 17 Aug 2014 12:19:28 -0700 (PDT) Content-Type: multipart/signed; boundary="Apple-Mail=_B1B7AB72-E60E-4559-AE5E-31D16EE3C5F2"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r269505 - head/libexec/rtld-elf/tests/target From: yaneurabeya@gmail.com In-Reply-To: Date: Sun, 17 Aug 2014 12:19:28 -0700 Message-Id: <3AC76F65-8A5A-407C-B24C-267DB489EF0E@gmail.com> References: <53df1ed9.5830.34b38bca@svn.freebsd.org> <20140804185707.P7764@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Garrett Cooper X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 19:19:31 -0000 --Apple-Mail=_B1B7AB72-E60E-4559-AE5E-31D16EE3C5F2 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Aug 4, 2014, at 10:24 AM, Garrett Cooper = wrote: > Hi Bruce! >=20 > On Aug 4, 2014, at 2:23 AM, Bruce Evans wrote: >=20 >> On Mon, 4 Aug 2014, Garrett Cooper wrote: >=20 > ... >=20 >> I hope this fixes the error found by "make checkdpadd". -L is too = hard >> for the current "make checkdpadd" to handle. Old aout versions = worked >> better using linker support. They also found the correct = dependencies >> (on shared libraries for shared linkage, not the pseudo-dependenci on >> the hard-coded static librar for shared linkage). >=20 > Thank you for the reminder about that make target :). And this still fails make checkdpadd :(... >> "make checkdpadd" currently finds broken 143 makefiles with = inconsistent >> DPADD. 62 of them are for clang. Most of these misuse DPADD for >> headers. The next largest source of errors is libtermcapw. = LIBTERMCAPW >> is missing in bsd.libnames.mk. This breaks about 29 makefiles where >> LIBTERMCAP was blindly replaced by LIBTERMCAPW. bsd.libnames.mk and >> DPADD were unnecessary with the old aout versions. >=20 > I=92ll file bugs for any issues I find and work with maintainers to = fix the issues. I=92m not sure if you=92re on Phabricator, but I=92d be = happy to add you to the reviews if you would like. I filed bugs for the bulk majority of the issues I found with make = checkdpadd. Thanks! -Garrett --Apple-Mail=_B1B7AB72-E60E-4559-AE5E-31D16EE3C5F2 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJT8QBAAAoJEMZr5QU6S73e51cIAIJ4GL2n/R5gH3aMmETuVo9S /QZ7QIU9c8NtU+OWBxdo1KCZWY/6FUbOfaHXCkqsXm+EcWXCrpAPhBMhRdB5PKGc 8pP7CMarSXhsjFjE0oeBPS9+AafawavNXBH645hnPPhf1E9E/VSoPRFjokQ3jOTN Pp6ZeKqes53q16wMJcgcS/UWj6rUoTxu1n5Xqdb9umf5ALfkeHjRATo6tLdnaCWQ NskHTe2Aid241JHTJ0VqdwXxrecfbD7SgIpILP9YdPnhkf5dvLkC5g6dbMNsGYFD UWwiN4ElYCISI/YIXJEjXfIKtRHmVj/iUPFLt4dGy4IyUPglZfthv0jWHtjI5TU= =qphx -----END PGP SIGNATURE----- --Apple-Mail=_B1B7AB72-E60E-4559-AE5E-31D16EE3C5F2-- From owner-svn-src-all@FreeBSD.ORG Sun Aug 17 19:24:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84AAD4D3; Sun, 17 Aug 2014 19:24:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F0F925EA; Sun, 17 Aug 2014 19:24:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7HJORWn081873; Sun, 17 Aug 2014 19:24:27 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7HJORSQ081872; Sun, 17 Aug 2014 19:24:27 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201408171924.s7HJORSQ081872@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 17 Aug 2014 19:24:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270112 - stable/10/usr.sbin/nfsd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 19:24:27 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Aug 17 19:36:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E0876CE0; Sun, 17 Aug 2014 19:36:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CBC9A26E5; Sun, 17 Aug 2014 19:36:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7HJauXA089644; Sun, 17 Aug 2014 19:36:56 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7HJauxo089643; Sun, 17 Aug 2014 19:36:56 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201408171936.s7HJauxo089643@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 17 Aug 2014 19:36:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270113 - head/bin/sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 19:36:57 -0000 Author: jilles Date: Sun Aug 17 19:36:56 2014 New Revision: 270113 URL: http://svnweb.freebsd.org/changeset/base/270113 Log: sh: Avoid overflow in atoi() when parsing HISTSIZE. Side effect: a non-numeric HISTSIZE now results in the default size (100) instead of 0. Modified: head/bin/sh/histedit.c Modified: head/bin/sh/histedit.c ============================================================================== --- head/bin/sh/histedit.c Sun Aug 17 19:24:26 2014 (r270112) +++ head/bin/sh/histedit.c Sun Aug 17 19:36:56 2014 (r270113) @@ -166,9 +166,10 @@ sethistsize(const char *hs) HistEvent he; if (hist != NULL) { - if (hs == NULL || *hs == '\0' || - (histsize = atoi(hs)) < 0) + if (hs == NULL || !is_number(hs)) histsize = 100; + else + histsize = atoi(hs); history(hist, &he, H_SETSIZE, histsize); history(hist, &he, H_SETUNIQUE, 1); } From owner-svn-src-all@FreeBSD.ORG Sun Aug 17 19:54:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 81C7C912; Sun, 17 Aug 2014 19:54:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69B5728C5; Sun, 17 Aug 2014 19:54:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7HJsMlM099244; Sun, 17 Aug 2014 19:54:22 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7HJsLmX099240; Sun, 17 Aug 2014 19:54:21 GMT (envelope-from se@FreeBSD.org) Message-Id: <201408171954.s7HJsLmX099240@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Sun, 17 Aug 2014 19:54:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270114 - head/share/vt/keymaps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 19:54:22 -0000 Author: se Date: Sun Aug 17 19:54:21 2014 New Revision: 270114 URL: http://svnweb.freebsd.org/changeset/base/270114 Log: Attempt at converting the SYSCONS keymaps to Unicode for use with NEWCONS. I have spent many hours comparing source and destination formats, and hope to have caught the most severe conversion errors. Files were converted with a Perl script which I'll shortly commit to the tools directory. This script is a much enhanced version of the one provided by ray@ and is expected to support the full kbdmap(5) syntax. The naming convention used is: <2-letter country code>..kbd Only if there are multiple layouts for different languages: <2-letter country code>-<2-letter language code>..kbd In nearly all cases, the keyboards are country specific, only. Currently there is only one case where the language was added ("ch-fr.kbd" for the Swiss-French keyboard layout). I choose to write Unicode character codes as hex numbers. While this increases the diff to the SYSCONS keymap files for the trivial cases (conversion from ISO8859-1), it really helps to verify the more complex cases against a Unicode table (which is indexed by hex numbers). This commit does not cover all files that have been converted, since I need to sort out which ones to use, if there were several with different source encodings to choose from. Review and test of the keymap files is highly desirable before 10.1 is released. I'd also appreciate educated opinions regarding the optimum variant (to be made available as the default for each language). Since there are no NEWCONS keymaps in 10-STABLE, I plan to MFC after the minimum allowed delay of 3 days, to allow at least a few weeks to test and improve what will be in the next release. MFC after: 3 days Added: head/share/vt/keymaps/INDEX.keymaps (contents, props changed) head/share/vt/keymaps/am.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/hy.armscii-8.kbd head/share/vt/keymaps/be.acc.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/be.iso.acc.kbd head/share/vt/keymaps/bg.bds.ctrlcaps.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/bg.phonetic.ctrlcaps.kbd head/share/vt/keymaps/bg.bds.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/bg.bds.ctrlcaps.kbd head/share/vt/keymaps/br.acc.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/br275.iso.acc.kbd head/share/vt/keymaps/br.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/br275.iso.kbd head/share/vt/keymaps/ca.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/fr_CA.iso.acc.kbd head/share/vt/keymaps/centraleuropean.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/ce.iso2.kbd head/share/vt/keymaps/ch-fr.acc.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/swissfrench.iso.acc.kbd head/share/vt/keymaps/ch-fr.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/swissfrench.iso.kbd head/share/vt/keymaps/ch.acc.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/swissgerman.iso.acc.kbd head/share/vt/keymaps/ch.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/swissgerman.iso.kbd head/share/vt/keymaps/ch.macbook.acc.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/swissgerman.macbook.acc.kbd head/share/vt/keymaps/colemak.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/colemak.iso15.acc.kbd head/share/vt/keymaps/cz.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/cs.latin2.qwertz.kbd head/share/vt/keymaps/de.acc.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/german.iso.acc.kbd head/share/vt/keymaps/de.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/german.iso.kbd head/share/vt/keymaps/dk.acc.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/danish.iso.acc.kbd head/share/vt/keymaps/dk.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/danish.iso.kbd head/share/vt/keymaps/dk.macbook.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/danish.iso.macbook.kbd head/share/vt/keymaps/ee.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/estonian.iso15.kbd head/share/vt/keymaps/es.acc.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/spanish.iso.acc.kbd head/share/vt/keymaps/es.dvorak.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/spanish.dvorak.kbd head/share/vt/keymaps/es.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/spanish.iso15.acc.kbd head/share/vt/keymaps/fi.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/finnish.iso.kbd head/share/vt/keymaps/fr.acc.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/fr.iso.acc.kbd head/share/vt/keymaps/fr.dvorak.acc.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/fr.dvorak.acc.kbd head/share/vt/keymaps/fr.dvorak.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/fr.dvorak.kbd head/share/vt/keymaps/fr.macbook.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/fr.macbook.acc.kbd head/share/vt/keymaps/gr.101.acc.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/gr.us101.acc.kbd head/share/vt/keymaps/gr.elot.acc.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/gr.elot.acc.kbd head/share/vt/keymaps/gr.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/el.iso07.kbd head/share/vt/keymaps/hu.101.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/hu.iso2.101keys.kbd head/share/vt/keymaps/hu.102.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/hu.iso2.102keys.kbd head/share/vt/keymaps/il.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/iw.iso8.kbd head/share/vt/keymaps/is.acc.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/icelandic.iso.acc.kbd head/share/vt/keymaps/is.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/icelandic.iso.kbd - copied unchanged from r270082, head/share/syscons/keymaps/jp.106x.kbd - copied unchanged from r270082, head/share/syscons/keymaps/jp.106.kbd - copied unchanged from r270082, head/share/syscons/keymaps/jp.pc98.iso.kbd - copied unchanged from r270082, head/share/syscons/keymaps/jp.pc98.kbd head/share/vt/keymaps/kz.io.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/kk.pt154.io.kbd head/share/vt/keymaps/kz.kst.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/kk.pt154.kst.kbd head/share/vt/keymaps/latinamerican.acc.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/latinamerican.iso.acc.kbd head/share/vt/keymaps/latinamerican.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/latinamerican.kbd head/share/vt/keymaps/lt.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/lt.iso4.kbd head/share/vt/keymaps/nl.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/dutch.iso.acc.kbd head/share/vt/keymaps/no.dvorak.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/norwegian.dvorak.kbd head/share/vt/keymaps/no.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/norwegian.iso.kbd head/share/vt/keymaps/nordic.asus-eee.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/eee_nordic.kbd head/share/vt/keymaps/pl.dvorak.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/pl_PL.dvorak.kbd head/share/vt/keymaps/pt.acc.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/pt.iso.acc.kbd head/share/vt/keymaps/ru.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/ru.koi8-r.kbd head/share/vt/keymaps/ru.shift.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/ru.koi8-r.shift.kbd head/share/vt/keymaps/ru.win.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/ru.koi8-r.win.kbd head/share/vt/keymaps/se.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/swedish.iso.kbd head/share/vt/keymaps/sk.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/sk.iso2.kbd head/share/vt/keymaps/tr.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/tr.iso9.q.kbd head/share/vt/keymaps/uk.capsctrl.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/uk.iso-ctrl.kbd head/share/vt/keymaps/uk.dvorak.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/uk.dvorak.kbd head/share/vt/keymaps/us.acc.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/us.iso.acc.kbd - copied unchanged from r270082, head/share/syscons/keymaps/us.pc-ctrl.kbd head/share/vt/keymaps/us.dvorak.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/us.dvorak.kbd head/share/vt/keymaps/us.dvorakl.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/us.dvorakl.kbd head/share/vt/keymaps/us.dvorakp.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/us.dvorakp.kbd head/share/vt/keymaps/us.dvorakr.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/us.dvorakr.kbd head/share/vt/keymaps/us.dvorakx.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/us.dvorakx.kbd head/share/vt/keymaps/us.emacs.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/us.emacs.kbd - copied unchanged from r270082, head/share/syscons/keymaps/us.unix.kbd Directory Properties: head/share/vt/keymaps/jp.capsctrl.kbd (props changed) head/share/vt/keymaps/jp.kbd (props changed) head/share/vt/keymaps/jp.pc98.iso.kbd (props changed) head/share/vt/keymaps/jp.pc98.kbd (props changed) head/share/vt/keymaps/us.ctrl.kbd (props changed) head/share/vt/keymaps/us.unix.kbd (props changed) Modified: head/share/vt/keymaps/Makefile head/share/vt/keymaps/be.kbd (contents, props changed) head/share/vt/keymaps/fr.kbd (contents, props changed) head/share/vt/keymaps/hr.kbd (contents, props changed) head/share/vt/keymaps/it.kbd (contents, props changed) head/share/vt/keymaps/pl.kbd (contents, props changed) head/share/vt/keymaps/pt.kbd (contents, props changed) head/share/vt/keymaps/si.kbd (contents, props changed) head/share/vt/keymaps/ua.kbd (contents, props changed) head/share/vt/keymaps/ua.shift.alt.kbd (contents, props changed) head/share/vt/keymaps/uk.kbd (contents, props changed) Directory Properties: head/share/vt/keymaps/us.kbd (props changed) Added: head/share/vt/keymaps/INDEX.keymaps ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/vt/keymaps/INDEX.keymaps Sun Aug 17 19:54:21 2014 (r270114) @@ -0,0 +1,604 @@ +# $FreeBSD$ +# +# database for kbdmap(8) +# +# Format :: +# +# 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 +# +# If lang empty use 'en' (us-english) as default. +# +# Example: +# german.iso.kbd:de:deutsch +# german.iso.kbd:en:german +# +# See also setlocal +# /usr/share/locale, /usr/X11/lib/X11/locale/locale.alias +# +# +# Language support: MENU, FONT +# +MENU:en:Choose your keyboard language +MENU:da,no,sv:Vælg dit keyboard layout +MENU:de:Wählen Sie Ihre Tastaturbelegung +MENU:fr:Choisissez la nationalité de votre clavier +MENU:pl:Wybierz ukÅ‚ad klawiatury +MENU:pt:Escolha o layout do teclado +MENU:es:Seleccione el idioma de su teclado +MENU::ךלש תדלקמה תפש ×ª× ×¨×—×‘ +MENU:uk:Bиберіть розкладку клавіатури +MENU:el:Επιλέξτε το πληκτÏολόγιο της κονσόλας +MENU:hy:Ô¸Õ¶Õ¿Ö€Õ¥Ö„ Õ½Õ¿Õ¥Õ²Õ¶Õ¡Õ·Õ¡Ö€Õ« Õ¤Õ¡Õ½Õ¡Õ¾Õ¸Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨ + +# +# The font definition for "en" is the fall-back font for +# all languages. +# Add language specific font definitions only where required! +# +FONT:en:vgarom-8x16.hex + +# +be.kbd:en:Belgian +be.kbd:de:Belgisch +be.kbd:fr:Belge +be.kbd:pt,es:Belga + +be.acc.kbd:en:Belgian (accent keys) +be.acc.kbd:de:Belgisch (mit Akzenten) +be.acc.kbd:fr:Belge (avec accents) +be.acc.kbd:pt:Belga (com acentos) +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 + +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 + +cz.kbd:en:Czech (QWERTZ, accent keys) +cz.kbd:de:Tschechisch (QWERTZ, mit Akzenten) +cz.kbd:fr:Tchèque (QWERTZ, avec accents) +cz.kbd:es:Checo (QWERTZ, con acentos) + +cz.kbd.from-ce:en:Czech +cz.kbd.from-ce:de:Tschechisch +cz.kbd.from-ce:fr:Tchèque +cz.kbd.from-ce:es:Checo + +dk.kbd:en:Danish +dk.kbd:da:Dansk +dk.kbd:de:Dänisch +dk.kbd:fr:Danois +dk.kbd:pt:Dinamarquês +dk.kbd:es:Danés + +dk.acc.kbd:en:Danish (accent keys) +dk.acc.kbd:da:Dansk (accent taster) +dk.acc.kbd:de:Dänisch (mit Akzenten) +dk.acc.kbd:fr:Danois (avec accents) +dk.acc.kbd:pt:Dinamarquês (com acentos) +dk.acc.kbd:es:Danés (con acentos) + +dk.kbd.from-cp865:en:Danish +dk.kbd.from-cp865:da:Dansk +dk.kbd.from-cp865:de:Dänisch +dk.kbd.from-cp865:fr:Danois +dk.kbd.from-cp865:pt:Dinamarquês +dk.kbd.from-cp865:es:Danés + +dk.macbook.kbd:da:Danish (macbook) +dk.macbook.kbd:da:Dansk (macbook) +dk.macbook.kbd:de:Dänisch (Macbook) +dk.macbook.kbd:fr:Danois (macbook) +dk.macbook.kbd:pt:Dinamarquês (macbook) +dk.macbook.kbd:es:Danés (macbook) + +nl.kbd:en:Dutch (accent keys) +nl.kbd:de:Holländisch (mit Akzenten) + +nordic.asus-eee.kbd:en:Nordic layout on Asus eeePC +nordic.asus-eee.kbd:fr:Norvégien phonétique sur Asus eeePC + +gr.kbd:en:Greek (104 keys) +gr.kbd:fr:Grec (104 touches) +gr.kbd:el:Ελληνικό (104 πλήκτÏων) + +ee.kbd.from-iso1:en:Estonian +ee.kbd.from-iso1:de:Estnisch +ee.kbd.from-iso1:fr:Estonien +ee.kbd.from-iso1:es:Estonio + +ee.kbd:en:Estonian +ee.kbd:de:Estnisch +ee.kbd:fr:Estonien +ee.kbd:es:Estonio + +ee.kbd.from-cp850:en:Estonian +ee.kbd.from-cp850:de:Estnisch +ee.kbd.from-cp850:fr:Estonien +ee.kbd.from-cp850:es:Estonio + +fi.kbd:en:Finnish +fi.kbd:de:Finnisch +fi.kbd:fr:Finlandais +fi.kbd:es:Finlandés + +fi.kbd.from-cp850:en:Finnish +fi.kbd.from-cp850:de:Finnisch +fi.kbd.from-cp850:fr:Finlandais +fi.kbd.from-cp850:es:Finlandés + +fr.kbd:en:French +fr.kbd:de:Französisch +fr.kbd:fr:Français +fr.kbd:pt:Francês +fr.kbd:es:Francés +fr.kbd:uk:Французька + +fr.acc.kbd:en:French (accent keys) +fr.acc.kbd:de:Französisch (mit Akzenten) +fr.acc.kbd:fr:Français (avec accents) +fr.acc.kbd:pt:Francês (com acentos) +fr.acc.kbd:es:Francés (con acentos) +fr.acc.kbd:uk:Французька (accent keys) + +fr.macbook.kbd:en:French Macbook/Macbook Pro (accent keys) +fr.macbook.kbd:de:Französisch Macbook/Macbook Pro (mit Aksenten) +fr.macbook.kbd:fr:Français Macbook/Macbook Pro (accent keys) +fr.macbook.kbd:pt:Francês Macbook/Macbook Pro (com acentos) +fr.macbook.kbd:es:Francés Macbook/Macbook Pro (con acentos) + +fr.dvorak.kbd:en:French Dvorak-like +fr.dvorak.kbd:de:Französisch Dvorak +fr.dvorak.kbd:fr:Français Dvorak +fr.dvorak.kbd:pt:Francês Dvorak +fr.dvorak.kbd:es:Francés Dvorak +fr.dvorak.kbd:uk:French Dvorak-like + +fr.dvorak.acc.kbd:en:French Dvorak-like (accent keys) +fr.dvorak.acc.kbd:de:Französisch Dvorak (mit Akzenten) +fr.dvorak.acc.kbd:fr:Français Dvorak (accent keys) +fr.dvorak.acc.kbd:pt:Francês Dvorak (com acentos) +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) + +de.kbd:en:German +de.kbd:de:Deutsch +de.kbd:fr:Allemand +de.kbd:pt:Alemão +de.kbd:es:Alemán +de.kbd:uk:Ðімецька + +de.acc.kbd:en:German (accent keys) +de.acc.kbd:de:Deutsch (mit Akzenten) +de.acc.kbd:fr:Allemand (avec accents) +de.acc.kbd:pt:Alemão (com acentos) +de.acc.kbd:es:Alemán (con acentos) +de.acc.kbd:uk:Ðімецька (accent keys) + +de.kbd.from-cp850:en:German +de.kbd.from-cp850:de:Deutsch +de.kbd.from-cp850:fr:Allemand +de.kbd.from-cp850:pt:Alemão +de.kbd.from-cp850:es:Alemán +de.kbd.from-cp850:uk:Ðімецька + +gr.elot.acc.kbd:en:Greek ELOT +gr.elot.acc.kbd:de:Grieschisch ELOT +gr.elot.acc.kbd:fr:Grec ELOT +gr.elot.acc.kbd:el:Ελληνικό ΕΛΟΤ + +gr.101.acc.kbd:en:Greek (101 keys) +gr.101.acc.kbd:de:Grieschisch (101 Tasten) +gr.101.acc.kbd:fr:Grec (101 touches) +gr.101.acc.kbd:el:Ελληνικό (101 πλήκτÏων) + +il.kbd:en:Hebrew +il.kbd:de:Hebräisch +il.kbd:fr:Hébreu +il.kbd::תירבע + +hr.kbd:en:Croatian +hr.kbd:de:Kroatisch +hr.kbd:fr:Croate +hr.kbd:es:Croata + +hu.101.kbd:en:Hungarian (101 keys) +hu.101.kbd:de:Ungarisch (101 Tasten) +hu.101.kbd:fr:Hongrois (101 touches) +hu.101.kbd:es:Húngaro (101) + +hu.102.kbd:en:Hungarian (102 keys) +hu.102.kbd:de:Ungarisch (102 Tasten) +hu.102.kbd:fr:Hongrois (102 touches) +hu.102.kbd:es:Húngaro (102) + +am.kbd:hy:Õ€Õ¡ÕµÕ¥Ö€Õ¥Õ¶ Õ°Õ¶Õ¹ÕµÕ¸Ö‚Õ¶Õ¡ÕµÕ«Õ¶ (Phonetic) Õ¤Õ¡Õ½Õ¡Õ¾Õ¸Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶ +am.kbd:ru:ÐрмÑнÑÐºÐ°Ñ Ñ„Ð¾Ð½ÐµÑ‚Ð¸Ñ‡ÐµÑÐºÐ°Ñ Ñ€Ð°Ñкладка +am.kbd:en:Armenian phonetic layout +am.kbd:fr:Arménien phonétique +am.kbd:de:Armenische phonetische Tastenbelegung + +is.kbd:en:Icelandic +is.kbd:de:Isländisch +is.kbd:fr:Islandais +is.kbd:pt:Islandês +is.kbd:es:Islandés + +is.acc.kbd:en:Icelandic (accent keys) +is.acc.kbd:de:Isländisch (mit Akzenten) +is.acc.kbd:fr:Islandais (avec accents) +is.acc.kbd:pt:Islandês (com acentos) +is.acc.kbd:es:Islandés (con acentos) + +it.kbd:en:Italian +it.kbd:de:Italienisch +it.kbd:fr:Italien +it.kbd:pt,es:Italiano +it.kbd:uk:ІталійÑька + +jp.kbd:en:Japanese 106 +jp.kbd:de:Japanisch 106 +jp.kbd:fr:Japonais 106 +jp.kbd:pt:Japonês 106 +jp.kbd:es:Japonés 106 +jp.kbd:uk:ЯпонÑька 106 + +jp.capsctrl.kbd:en:Japanese 106x +jp.capsctrl.kbd:de:Japanisch 106x +jp.capsctrl.kbd:fr:Japonais 106x +jp.capsctrl.kbd:pt:Japonês 106x +jp.capsctrl.kbd:es:Japonés 106x +jp.capsctrl.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) + +kz.kst.kbd:en:Kazakh +kz.kst.kbd:de:Kasachisch +kz.kst.kbd:fr:Kazakh + +kz.io.kbd:en:Kazakh +kz.io.kbd:de:Kasachisch +kz.io.kbd:fr:Kazakh + +latinamerican.kbd:en:Latin American +latinamerican.kbd:de:Latein Amerikanisch +latinamerican.kbd:fr:Amérique latine +latinamerican.kbd:pt,es:América Latina + +latinamerican.acc.kbd:en:Latin American (accent keys) +latinamerican.acc.kbd:de:Latein Amerikanisch (mit Akzenten) +latinamerican.acc.kbd:fr:Amérique latine (avec accents) +latinamerican.acc.kbd:pt,es:América Latina (com acentos) + +lt.kbd:en:Lithuanian +lt.kbd:de:Litauisch +lt.kbd:fr:Lithuanien +lt.kbd:es:Lituano + +no.kbd:en:Norwegian +no.kbd:no:Norsk +no.kbd:de:Norwegisch +no.kbd:fr:Norvégien +no.kbd:pt:Norueguês +no.kbd:es:Noruego + +no.dvorak.kbd:en:Norwegian dvorak +no.dvorak.kbd:no:Norsk dvorak +no.dvorak.kbd:de:Norwegisch dvorak +no.dvorak.kbd:fr:Norvégien dvorak +no.dvorak.kbd:pt:Norueguês dvorak +no.dvorak.kbd:es:Noruego Idvorak + +pl.kbd:en:Polish (programmer's) +pl.kbd:de:Polnisch (für Programmierer) +pl.kbd:fr:Polonais (pour programmeurs) +pl.kbd:pl:Polska (programisty) +pl.kbd:pt:Polonês (para programadores) +pl.kbd:es:Polaco (para programadores) + +pl.dvorak.kbd:en:Polish Dvorak +pl.dvorak.kbd:de:Polnisch Dvorak +pl.dvorak.kbd:fr:Polonais Dvorak +pl.dvorak.kbd:pl:Polska Dvorak +pl.dvorak.kbd:pt:Polonês Dvorak +pl.dvorak.kbd:es:Polaco Dvorak + +pt.kbd:en:Portuguese +pt.kbd:de:Portugisisch +pt.kbd:fr:Portugais +pt.kbd:pt:Português +pt.kbd:es:Portugués + +pt.acc.kbd:en:Portuguese (accent keys) +pt.acc.kbd:de:Portugisisch (mit Akzenten) +pt.acc.kbd:fr:Portugais (avec accents) +pt.acc.kbd:pt:Português (com acentos) +pt.acc.kbd:es:Portugués (con acentos) + +ru.kbd.from-cp866:en:Russian (alternative) +ru.kbd.from-cp866:de:Russisch (alternativ) +ru.kbd.from-cp866:ru:РуÑÑкий (alternative) +ru.kbd.from-cp866:fr:Russe (alternative) +ru.kbd.from-cp866:pt:Russo (alternativo) +ru.kbd.from-cp866:es:Ruso (alternativo) +ru.kbd.from-cp866:uk:РоÑійÑька (альтернативна) + +ru.kbd.from-iso5:en:Russian +ru.kbd.from-iso5:de:Russisch +ru.kbd.from-iso5:fr:Russe +ru.kbd.from-iso5:ru:РуÑÑкий +ru.kbd.from-iso5:pt:Russo +ru.kbd.from-iso5:es:Ruso +ru.kbd.from-iso5:uk:РоÑійÑький + +ru.kbd:en:Russian +ru.kbd:de:Russisch +ru.kbd:ru:РуÑÑкий +ru.kbd:fr:Russe +ru.kbd:pt:Russo +ru.kbd:es:Ruso +ru.kbd:uk:РоÑійÑька + +ru.shift.kbd:en:Russian (shift) +ru.shift.kbd:de:Russisch (shift) +ru.shift.kbd:ru:РуÑÑкий (shift) +ru.shift.kbd:fr:Russe (shift) +ru.shift.kbd:pt:Russo (shift) +ru.shift.kbd:es:Ruso (shift) +ru.shift.kbd:uk:РоÑійÑька (shift) + +ru.win.kbd:en:Russian (winkeys) +ru.win.kbd:de:Russisch (winkeys) +ru.win.kbd:ru:РуÑÑкий (winkeys) +ru.win.kbd:fr:Russe (winkeys) +ru.win.kbd:pt:Russo (winkeys) +ru.win.kbd:es:Ruso (winkeys) +ru.win.kbd:uk:РоÑійÑька (winkeys) + +es.dvorak.kbd:en:Spanish Dvorak +es.dvorak.kbd:de:Spanisch Dvorak +es.dvorak.kbd:fr:Espagnol Dvorak +es.dvorak.kbd:pt:Espanhol Dvorak +es.dvorak.kbd:es:Español Dvorak + +es.kbd.from-iso1:en:Spanish +es.kbd.from-iso1:de:Spanisch +es.kbd.from-iso1:fr:Espagnol +es.kbd.from-iso1:pt:Espanhol +es.kbd.from-iso1:es:Español + +es.acc.kbd:en:Spanish (accent keys) +es.acc.kbd:de:Spanisch (accent keys) +es.acc.kbd:fr:Espagnol (avec accents) +es.acc.kbd:pt:Espanhol (com acentos) +es.acc.kbd:es:Español (con acentos) + +es.kbd:en:Spanish (accent keys) +es.kbd:de:Spanisch (accent keys) +es.kbd:fr:Espagnol (avec accents) +es.kbd:pt:Espanhol (com acentos) +es.kbd:es:Español (con acentos) + +si.kbd:en:Slovenian +si.kbd:de:Slovenisch +si.kbd:fr:Slovène +si.kbd:pt:Eslovênio +si.kbd:es:Esloveno + +sk.kbd:en:Slovak +sk.kbd:de:Slovakisch +sk.kbd:fr:Slovène +sk.kbd:es:Eslovaco + +se.kbd:en:Swedish +se.kbd:de:Schwedisch +se.kbd:fr:Suédois +se.kbd:pt,es:Sueco + +se.kbd.from-cp850:en:Swedish +se.kbd.from-cp850:de:Schwedisch +se.kbd.from-cp850:fr:Suédois +se.kbd.from-cp850:pt,es:Sueco + +ch-fr.kbd:en:Swiss-French +ch-fr.kbd:de:Schweiz-Französisch +ch-fr.kbd:fr:Suisse-Français +ch-fr.kbd:es:Francosuizo + +ch-fr.acc.kbd:en:Swiss-French (accent keys) +ch-fr.acc.kbd:de:Schweiz-Französisch (mit Akzenten) +ch-fr.acc.kbd:fr:Suisse-Français (avec accents) +ch-fr.acc.kbd:es:Francosuizo (con acentos) + +ch-fr.kbd.from-cp850:en:Swiss-French +ch-fr.kbd.from-cp850:de:Schweiz-Französisch +ch-fr.kbd.from-cp850:fr:Suisse-Français +ch-fr.kbd.from-cp850:es:Francosuizo + +ch.kbd:en:Swiss-German +ch.kbd:de:Schweiz-Deutsch +ch.kbd:fr:Suisse-Allemand +ch.kbd:pt:Suiço-Alemão +ch.kbd:es:Germanosuizo + +ch.acc.kbd:en:Swiss-German (accent keys) +ch.acc.kbd:de:Schweiz-Deutsch (mit Akzenten) +ch.acc.kbd:fr:Suisse-Allemand (avec accents) +ch.acc.kbd:pt:Suiço-Alemão (com acentos) +ch.acc.kbd:es:Germanosuizo (con acentos) + +ch.kbd.from-cp850:en:Swiss-German +ch.kbd.from-cp850:de:Schweiz-Deutsch +ch.kbd.from-cp850:fr:Suisse-Allemand +ch.kbd.from-cp850:pt:Suiço-Alemão +ch.kbd.from-cp850:es:Germanosuizo + +ch.macbook.acc.kbd:en:Swiss-German Macbook/Macbook Pro (accent keys) +ch.macbook.acc.kbd:de:Schweiz-Deutsch Macbook/Macbook Pro (mit Akzenten) +ch.macbook.acc.kbd:fr:Suisse-Allemand Macbook/Macbook Pro (avec accents) +ch.macbook.acc.kbd:pt:Suiço-Alemão Macbook/Macbook Pro (com acentos) +ch.macbook.acc.kbd:es:Germanosuizo Macbook/Macbook Pro (con acentos) + +tr.kbd:en:Turkish +tr.kbd:de:Türkisch +tr.kbd:fr:Turc +tr.kbd:uk:Турецька + +uk.kbd:en:United Kingdom +uk.kbd:de:Vereinigtes Königreich +uk.kbd:fr:Royaume Uni +uk.kbd:pt:Reino Unido +uk.kbd:es:Británico + +uk.capsctrl.kbd:en:United Kingdom (Caps Lock acts as Left Ctrl) +uk.capsctrl.kbd:de:Vereinigtes Königreich (Caps Lock als linke Strg) +#uk.iso-ctrl.kbd:fr:Royaume Uni (caps lock acts as Left Ctrl) +#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 +uk.dvorak.kbd:pt:Reino Unido Dvorak +uk.dvorak.kbd:es:Británico Dvorak + +us.kbd:en:United States of America +us.kbd:de:US-amerikanisch +us.kbd:fr:États Unis d'Amérique +us.kbd:pt:Estados Unidos da América +us.kbd:es:Estadounidense + +us.acc.kbd:en:United States of America (accent keys) +us.acc.kbd:de:US-amerikanisch (mit Akzenten) +us.acc.kbd:fr:États Unis d'Amérique (avec accents) +us.acc.kbd:pt:Estados Unidos da América (com acentos) +us.acc.kbd:es:Estadounidense (con acentos) + +us.dvorak.kbd:en:United States of America dvorak +us.dvorak.kbd:de:US-amerikanisch dvorak +us.dvorak.kbd:fr:États Unis d'Amérique dvorak +us.dvorak.kbd:pt:Estados Unidos da América dvorak +us.dvorak.kbd:es:Estadounidense dvorak + +us.dvorakr.kbd:en:United States of America righthand dvorak +us.dvorakr.kbd:de:US-amerikanisch dvorak rechte Hand +us.dvorakr.kbd:fr:États Unis d'Amérique dvorakr +us.dvorakr.kbd:pt:Estados Unidos da América dvorakr +us.dvorakr.kbd:es:Estadounidense dvorak diestro + +us.dvorakl.kbd:en:United States of America lefthand dvorak +us.dvorakl.kbd:de:US-amerikanisch dvorak linke Hand +us.dvorakl.kbd:fr:États Unis d'Amérique dvorakl +us.dvorakl.kbd:pt:Estados Unidos da América dvorakl +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 +us.dvorakx.kbd:fr:États Unis d'Amérique dvorakx +us.dvorakx.kbd:pt:Estados Unidos da América dvorakx +us.dvorakx.kbd:es:Estadounidense dvorakx + +us.emacs.kbd:en:United States of America Emacs optimized layout +us.emacs.kbd:de:US-amerikanisch für Emacs optimiert +us.emacs.kbd:fr:États Unis d'Amérique emacs +us.emacs.kbd:pt:Estados Unidos da América emacs +us.emacs.kbd:es:Estadounidense optimizado para Emacs + +us.ctrl.kbd:en:United States of America (Caps Lock acts as Left Ctrl) + +us.unix.kbd:en:United States of America Traditional Unix Workstation +us.unix.kbd:de:US-amerikanisch traditionelles Unix Layout +us.unix.kbd:fr:États Unis d'Amérique unix +us.unix.kbd:pt:Estados Unidos da América unix +us.unix.kbd:es:Estadounidense Unix tradicional + +ua.kbd.from-iso5:en:Ukrainian +ua.kbd.from-iso5:de:Ukrainisch +ua.kbd.from-iso5:fr:Ukrainien +ua.kbd.from-iso5:ru:УкраинÑкий +ua.kbd.from-iso5:uk:УкраїнÑька + +ua.kbd:en:Ukrainian +ua.kbd:de:Ukrainisch +ua.kbd:fr:Ukrainien +ua.kbd:uk:УкраїнÑька + +ua.shift.alt.kbd:en:Ukrainian (with Russian) (shift) +ua.shift.alt.kbd:de:Ukrainisch (mit Russisch) (shift) +ua.shift.alt.kbd:fr:Ukrainien (koi8-u avec koi8-r) (shift) +ua.shift.alt.kbd:uk:УкраїнÑька (koi8-u з) koi8-r (shift) Modified: head/share/vt/keymaps/Makefile ============================================================================== --- head/share/vt/keymaps/Makefile Sun Aug 17 19:36:56 2014 (r270113) +++ head/share/vt/keymaps/Makefile Sun Aug 17 19:54:21 2014 (r270114) @@ -1,16 +1,79 @@ # $FreeBSD$ -FILES= be.kbd \ - fr.kbd \ +FILES= INDEX.keymaps \ + am.kbd \ + bg.bds.ctrlcaps.kbd \ + bg.bds.kbd \ + br.acc.kbd \ + br.kbd \ + ca.kbd \ + centraleuropean.kbd \ + ch-fr.acc.kbd \ + ch-fr.kbd \ + ch.acc.kbd \ + ch.kbd \ + ch.macbook.acc.kbd \ + colemak.kbd \ + cz.kbd \ + de.acc.kbd \ + de.kbd \ + dk.acc.kbd \ + dk.kbd \ + dk.macbook.kbd \ + ee.kbd \ + es.acc.kbd \ + es.dvorak.kbd \ + es.kbd \ + fi.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.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: head/share/vt/keymaps/am.kbd (from r270082, head/share/syscons/keymaps/hy.armscii-8.kbd) ============================================================================== --- head/share/syscons/keymaps/hy.armscii-8.kbd Sun Aug 17 03:01:56 2014 (r270082, copy source) +++ head/share/vt/keymaps/am.kbd Sun Aug 17 19:54:21 2014 (r270114) @@ -8,240 +8,240 @@ # 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 nop nop debug esc O - 002 '1' '!' nop nop 0xBF 0xBE nop nop O - 003 '2' '@' nul nul 0xC3 0xC2 nul nul O - 004 '3' '#' nop nop 0xF7 0xF6 nop nop O - 005 '4' '$' nop nop 0xD3 0xD2 nop nop O - 006 '5' '%' nop nop 0xE7 0xE6 nop nop O - 007 '6' '^' rs rs 0xA4 0xA5 rs rs O - 008 '7' '&' nop nop 0xA2 '%' nop nop O - 009 '8' '*' nop nop 0xE9 0xE8 nop nop O - 010 '9' '(' nop nop 0xE3 0xE2 nop nop O - 011 '0' ')' nop nop 0xD7 0xD6 nop nop O - 012 '-' '_' us us 0xA8 0xAC us us O - 013 '=' '+' nop nop 0xC5 0xC4 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 0xF9 0xF8 dc1 dc1 C - 017 'w' 'W' etb etb 0xE1 0xE0 etb etb C - 018 'e' 'E' enq enq 0xBB 0xBA enq enq C - 019 'r' 'R' dc2 dc2 0xF1 0xF0 dc2 dc2 C - 020 't' 'T' dc4 dc4 0xEF 0xEE dc4 dc4 C - 021 'y' 'Y' em em 0xC1 0xC0 em em C - 022 'u' 'U' nak nak 0xF5 0xF4 nak nak C - 023 'i' 'I' ht ht 0xC7 0xC6 ht ht C - 024 'o' 'O' si si 0xFB 0xFA si si C - 025 'p' 'P' dle dle 0xE5 0xE4 dle dle C - 026 '[' '{' esc esc 0xCB 0xCA esc esc O - 027 ']' '}' gs gs 0xCD 0xCC gs gs O - 028 cr cr nl nl cr cr nl nl O + 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 + 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 + 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 0xB3 0xB2 soh soh C - 031 's' 'S' dc3 dc3 0xEB 0xEA dc3 dc3 C - 032 'd' 'D' eot eot 0xB9 0xB8 eot eot C - 033 'f' 'F' ack ack 0xFD 0xFC ack ack C - 034 'g' 'G' bel bel 0xB7 0xB6 bel bel C - 035 'h' 'H' bs bs 0xD1 0xD0 bs bs C - 036 'j' 'J' nl nl 0xDB 0xDA nl nl C - 037 'k' 'K' vt vt 0xCF 0xCE vt vt C - 038 'l' 'L' ff ff 0xC9 0xC8 ff ff C - 039 ';' ':' nop nop 0xA3 0xAE nop nop O - 040 ''' '"' nop nop 0xB0 0xFE nop nop O - 041 '`' '~' nop nop 0xAA 0xAF nop nop 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 042 lshift lshift lshift lshift lshift lshift alock alock O - 043 '\' '|' fs fs 0xDF 0xDE fs fs O - 044 'z' 'Z' sub sub 0xBD 0xBC sub sub C - 045 'x' 'X' can can 0xD5 0xD4 can can C - 046 'c' 'C' etx etx 0xF3 0xF2 etx etx C - 047 'v' 'V' syn syn 0xED 0xEC syn syn C - 048 'b' 'B' stx stx 0xB5 0xB4 stx stx C - 049 'n' 'N' so so 0xDD 0xDC so so C - 050 'm' 'M' cr cr 0xD9 0xD8 cr cr C - 051 ',' '<' nop nop 0xAB 0xA7 nop nop O - 052 '.' '>' nop nop 0xA9 0xA6 nop nop O - 053 '/' '?' nop nop 0xA1 0xB1 nop nop O - 054 rshift rshift rshift rshift rshift rshift rshift rshift O - 055 '*' '*' '*' '*' nop nop '*' '*' 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 + 054 rshift rshift rshift rshift rshift rshift rshift rshift O + 055 '*' '*' '*' '*' nop nop '*' '*' O 056 lalt lalt lalt alock lalt lalt lalt alock O - 057 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O - 058 clock clock clock clock clock clock clock clock O - 059 fkey01 fkey13 fkey25 fkey37 scr01 scr11 scr01 scr11 O - 060 fkey02 fkey14 fkey26 fkey38 scr02 scr12 scr02 scr12 O - 061 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O - 062 fkey04 fkey16 fkey28 fkey40 scr04 scr14 scr04 scr14 O - 063 fkey05 fkey17 fkey29 fkey41 scr05 scr15 scr05 scr15 O - 064 fkey06 fkey18 fkey30 fkey42 scr06 scr16 scr06 scr16 O - 065 fkey07 fkey19 fkey31 fkey43 scr07 scr07 scr07 scr07 O - 066 fkey08 fkey20 fkey32 fkey44 scr08 scr08 scr08 scr08 O - 067 fkey09 fkey21 fkey33 fkey45 scr09 scr09 scr09 scr09 O - 068 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O - 069 nlock nlock nlock nlock nlock nlock nlock nlock O - 070 slock slock slock slock slock slock slock slock O - 071 fkey49 '7' '7' '7' '7' '7' '7' '7' N - 072 fkey50 '8' '8' '8' '8' '8' '8' '8' N - 073 fkey51 '9' '9' '9' '9' '9' '9' '9' N - 074 fkey52 '-' '-' '-' '-' '-' '-' '-' N - 075 fkey53 '4' '4' '4' '4' '4' '4' '4' N - 076 fkey54 '5' '5' '5' '5' '5' '5' '5' N - 077 fkey55 '6' '6' '6' '6' '6' '6' '6' N - 078 fkey56 '+' '+' '+' '+' '+' '+' '+' N - 079 fkey57 '1' '1' '1' '1' '1' '1' '1' N - 080 fkey58 '2' '2' '2' '2' '2' '2' '2' N - 081 fkey59 '3' '3' '3' '3' '3' '3' '3' N - 082 fkey60 '0' '0' '0' '0' '0' '0' '0' N - 083 del '.' '.' '.' '.' '.' boot boot N - 084 nop nop nop nop nop nop nop nop O - 085 nop nop nop nop nop nop nop nop O - 086 nop nop nop nop nop nop nop nop O - 087 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O - 088 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O - 089 cr cr nl nl cr cr nl nl O - 090 rctrl rctrl rctrl rctrl rctrl rctrl rctrl rctrl O - 091 '/' '/' '/' '/' '/' '/' '/' '/' N - 092 nscr nscr debug debug nop nop nop nop O - 093 ralt ralt ralt ralt ralt ralt ralt ralt O - 094 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 O - 095 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 O - 096 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 O - 097 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 O - 098 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 O - 099 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 O - 100 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 O - 101 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 O - 102 fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 O - 103 fkey61 fkey61 fkey61 fkey61 fkey61 fkey61 boot 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 nop nop esc esc esc esc debug esc O - 130 0xBF 0xBE nop nop '1' '!' nop nop O - 131 0xC3 0xC2 nul nul '2' '@' nul nul O - 132 0xF7 0xF6 nop nop '3' '#' nop nop O - 133 0xD3 0xD2 nop nop '4' '$' nop nop O - 134 0xE7 0xE6 nop nop '5' '%' nop nop O - 135 0xA4 0xA5 rs rs '6' '^' rs rs O - 136 0xA2 '%' nop nop '7' '&' nop nop O - 137 0xE9 0xE8 nop nop '8' '*' nop nop O - 138 0xE3 0xE2 nop nop '9' '(' nop nop O - 139 0xD7 0xD6 nop nop '0' ')' nop nop O - 140 0xA8 0xAC us us '-' '_' us us O - 141 0xC5 0xC4 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 0xF9 0xF8 dc1 dc1 'q' 'Q' dc1 dc1 C - 145 0xE1 0xE0 etb etb 'w' 'W' etb etb C - 146 0xBB 0xBA enq enq 'e' 'E' enq enq C - 147 0xF1 0xF0 dc2 dc2 'r' 'R' dc2 dc2 C - 148 0xEF 0xEE dc4 dc4 't' 'T' dc4 dc4 C - 149 0xC1 0xC0 em em 'y' 'Y' em em C - 150 0xF5 0xF4 nak nak 'u' 'U' nak nak C - 151 0xC7 0xC6 ht ht 'i' 'I' ht ht C - 152 0xFB 0xFA si si 'o' 'O' si si C - 153 0xE5 0xE4 dle dle 'p' 'P' dle dle C - 154 0xCB 0xCA esc esc '[' '{' esc esc O - 155 0xCD 0xCC gs gs ']' '}' gs gs O - 156 cr cr nl nl cr cr nl nl O + 057 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O + 058 clock clock clock clock clock clock clock clock O + 059 fkey01 fkey13 fkey25 fkey37 scr01 scr11 scr01 scr11 O + 060 fkey02 fkey14 fkey26 fkey38 scr02 scr12 scr02 scr12 O + 061 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O + 062 fkey04 fkey16 fkey28 fkey40 scr04 scr14 scr04 scr14 O + 063 fkey05 fkey17 fkey29 fkey41 scr05 scr15 scr05 scr15 O + 064 fkey06 fkey18 fkey30 fkey42 scr06 scr16 scr06 scr16 O + 065 fkey07 fkey19 fkey31 fkey43 scr07 scr07 scr07 scr07 O + 066 fkey08 fkey20 fkey32 fkey44 scr08 scr08 scr08 scr08 O + 067 fkey09 fkey21 fkey33 fkey45 scr09 scr09 scr09 scr09 O + 068 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O + 069 nlock nlock nlock nlock nlock nlock nlock nlock O + 070 slock slock slock slock slock slock slock slock O + 071 fkey49 '7' '7' '7' '7' '7' '7' '7' N + 072 fkey50 '8' '8' '8' '8' '8' '8' '8' N + 073 fkey51 '9' '9' '9' '9' '9' '9' '9' N + 074 fkey52 '-' '-' '-' '-' '-' '-' '-' N + 075 fkey53 '4' '4' '4' '4' '4' '4' '4' N + 076 fkey54 '5' '5' '5' '5' '5' '5' '5' N + 077 fkey55 '6' '6' '6' '6' '6' '6' '6' N + 078 fkey56 '+' '+' '+' '+' '+' '+' '+' N + 079 fkey57 '1' '1' '1' '1' '1' '1' '1' N + 080 fkey58 '2' '2' '2' '2' '2' '2' '2' N + 081 fkey59 '3' '3' '3' '3' '3' '3' '3' N + 082 fkey60 '0' '0' '0' '0' '0' '0' '0' N + 083 del '.' '.' '.' '.' '.' boot boot N + 084 nop nop nop nop nop nop nop nop O + 085 nop nop nop nop nop nop nop nop O + 086 nop nop nop nop nop nop nop nop O + 087 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O + 088 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O + 089 cr cr nl nl cr cr nl nl O + 090 rctrl rctrl rctrl rctrl rctrl rctrl rctrl rctrl O + 091 '/' '/' '/' '/' '/' '/' '/' '/' N + 092 nscr nscr debug debug nop nop nop nop O + 093 ralt ralt ralt ralt ralt ralt ralt ralt O + 094 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 O + 095 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 O + 096 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 O + 097 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 O + 098 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 O + 099 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 O + 100 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 O + 101 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 O + 102 fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 O + 103 fkey61 fkey61 fkey61 fkey61 fkey61 fkey61 boot 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 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 + 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 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Aug 17 20:06:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2BBFFFF7; Sun, 17 Aug 2014 20:06:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 170E829E7; Sun, 17 Aug 2014 20:06:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7HK6lAh005049; Sun, 17 Aug 2014 20:06:47 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7HK6ldn005048; Sun, 17 Aug 2014 20:06:47 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201408172006.s7HK6ldn005048@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sun, 17 Aug 2014 20:06:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270115 - head/sbin/ifconfig X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 20:06:48 -0000 Author: melifaro Date: Sun Aug 17 20:06:47 2014 New Revision: 270115 URL: http://svnweb.freebsd.org/changeset/base/270115 Log: Add forgotten DPADD to ifconfig(8). PR: 192760 Submitted by: yaneurabeya at gmail.com MFC after: 2 weeks Modified: head/sbin/ifconfig/Makefile Modified: head/sbin/ifconfig/Makefile ============================================================================== --- head/sbin/ifconfig/Makefile Sun Aug 17 19:54:21 2014 (r270114) +++ head/sbin/ifconfig/Makefile Sun Aug 17 20:06:47 2014 (r270115) @@ -34,6 +34,7 @@ SRCS+= ifgre.c # GRE keys etc SRCS+= ifgif.c # GIF reversed header workaround SRCS+= sfp.c # SFP/SFP+ information +DPADD+= ${LIBM} LDADD+= -lm SRCS+= ifieee80211.c regdomain.c # SIOC[GS]IEEE80211 support From owner-svn-src-all@FreeBSD.ORG Sun Aug 17 20:20:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D367366B for ; Sun, 17 Aug 2014 20:20:30 +0000 (UTC) Received: from nm40-vm6.bullet.mail.bf1.yahoo.com (nm40-vm6.bullet.mail.bf1.yahoo.com [72.30.239.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 739DD2B22 for ; Sun, 17 Aug 2014 20:20:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1408306821; bh=qIUmmpSgVGuLAIGVZc36XK38oJy00Ll17/tnsFCD5HY=; h=Received:Received:Received:X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=X3958vHgrp1RUXKqiPJ5vfAA0j+5iw/uUWn2tXaZt35xd3DFlaco5tLvWhrKLtIhSZYsVIS/9DRc2LmXo3esjdXLXyxqV6+tJ5zka7Bnj61VXlQvdLiAxGd0+9Tbj55Nstf2YvW6Xujqrc2h+mTDuTIW7a1Oh8TcIn2CPHsU6Yhg20AqKTzWp5+34WhAndNmKGUQ+ExaVP669C+tg/J7sR9Qg7VuHqkC1UBaYBRw26ae0qM1pCr0Lm9ABU7Yfr4iQMhbCn8qRkdYfXcXe3YHg3XvthY3iRX6hxz4wUzRyNKBtFgJkT1lzcMk0rvV7mBXGsPqBfukQvMGHHocgFs7GQ== DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s2048; d=yahoo.com; b=PIe0pJXBQRn2qFb2b1WssF2LyYCxbPDFm7/youWV9gj1DaKs6GueESCPrDE0dX18dPvPk4AZet1MQ+zvTfJiq+mWRGc9j2BFi6iTUuc2G51f5Qw7uG/9feas0SWGQdwk85ygD+Ig3W0Ntu1IdcWDfRj60yVnWEATJrfFWIvM3gZfzGocIdOGRHcDQeP2OUlkvEspfozromyiggTtzMLPOScdIYWDTTUPjj9ahz143wshxbPeZrQ3EUHcKd4823X1hr9ALVxGeZFcTUe7JHjL38aHZaSlWe2ahJ630MDzHP/RzeR2VaHvZ8Nlgr6wv1fyKmsq3Op47Xpb1cvU9V6OHA==; Received: from [98.139.212.151] by nm40.bullet.mail.bf1.yahoo.com with NNFMP; 17 Aug 2014 20:20:21 -0000 Received: from [98.139.211.203] by tm8.bullet.mail.bf1.yahoo.com with NNFMP; 17 Aug 2014 20:20:21 -0000 Received: from [127.0.0.1] by smtp212.mail.bf1.yahoo.com with NNFMP; 17 Aug 2014 20:20:21 -0000 X-Yahoo-Newman-Id: 246516.38906.bm@smtp212.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: K31uEbYVM1lGtprhIbQszQvtgRyb27Sg.YeX5mO359L8E.b fmrdSCaqKIoK2Vcoa4aa8Z_3N_AuOR1KUxmfT6fTT0qDkLovYC8wd.bkA35j UBjZfdG6VxrtE0DNAGRRxbZSGb2_wWJL8d2UgLcxSx8UbLmT81Y8vg.dCtva cJnwWFR5sOazrtB5qFNtxNmuJHcHcIz8btGk4XtYnaGxF1bPRdmbYy61Hzpd 6XwBwLz6y_17mZtVTEwGjkWhWeYbrg.yeNWzvW2OwWrB1PsnGMc5DuFAO.7g 4ioEPQrE9X1emrDDmbdpECBvaDEAI4nz2FmnAnsXgaNHrambO3OqYY4bKVY7 p7kJRiQ9L.zHlxPRysEGjKf0yqfLFeNsnGF6l0O5ftXPmPZTLuSg3FTepmw7 zLi2XAsmZ8fIK9jSJjO03j5PteSYRvw3w1H9ZoVyqoPuX.mw1aKY32UIakQx lTLnPTvPYZEcYon.txIpyCaYFkjTZaaOwSBsMQO7gjJOR_tCbIg6iXaH7miw 30X1DEULcmcL40Z7l6bDT7HK061sSaHghwvK2uN.wAv66hEtjiURx6Wj_n9r FMffvv7ZNvX154FJJFbzBOU3W4tvfr5o.wviHKnhgG3fYE6IJxKYpzJXrvz2 .raLP_RA- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <53F10E95.30108@freebsd.org> Date: Sun, 17 Aug 2014 15:20:37 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Stefan Esser , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r270114 - head/share/vt/keymaps References: <201408171954.s7HJsLmX099240@svn.freebsd.org> In-Reply-To: <201408171954.s7HJsLmX099240@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 20:20:30 -0000 On 08/17/14 14:54, Stefan Esser wrote: > Author: se > Date: Sun Aug 17 19:54:21 2014 > New Revision: 270114 > URL: http://svnweb.freebsd.org/changeset/base/270114 > > Log: > Attempt at converting the SYSCONS keymaps to Unicode for use with NEWCONS. > I have spent many hours comparing source and destination formats, and hope > to have caught the most severe conversion errors. > > Files were converted with a Perl script which I'll shortly commit to the > tools directory. This script is a much enhanced version of the one > provided by ray@ and is expected to support the full kbdmap(5) syntax. > > The naming convention used is: > > <2-letter country code>..kbd > > Only if there are multiple layouts for different languages: > > <2-letter country code>-<2-letter language code>..kbd > > In nearly all cases, the keyboards are country specific, only. Currently > there is only one case where the language was added ("ch-fr.kbd" for > the Swiss-French keyboard layout). My $0.02 I think es-la could/should be used for the latin-american keyboard. es is basically used only in Spain so it should be es-es This is just IMHO, and could easily divert into a bikeshed though. > > I choose to write Unicode character codes as hex numbers. While this > increases the diff to the SYSCONS keymap files for the trivial cases > (conversion from ISO8859-1), it really helps to verify the more complex > cases against a Unicode table (which is indexed by hex numbers). > > This commit does not cover all files that have been converted, since I > need to sort out which ones to use, if there were several with different > source encodings to choose from. > > Review and test of the keymap files is highly desirable before 10.1 is > released. I'd also appreciate educated opinions regarding the optimum > variant (to be made available as the default for each language). > > Since there are no NEWCONS keymaps in 10-STABLE, I plan to MFC after > the minimum allowed delay of 3 days, to allow at least a few weeks to > test and improve what will be in the next release. > > MFC after: 3 days > > Regards, Pedro. From owner-svn-src-all@FreeBSD.ORG Sun Aug 17 21:07:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E7267B90 for ; Sun, 17 Aug 2014 21:07:22 +0000 (UTC) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com [209.85.217.173]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6AAF03274 for ; Sun, 17 Aug 2014 21:07:21 +0000 (UTC) Received: by mail-lb0-f173.google.com with SMTP id u10so3488905lbd.32 for ; Sun, 17 Aug 2014 14:07:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=4Bk3E3n3CpS3IVDEJyhG0gAq1oIxpTg/V9I8q5z9mBw=; b=MN1c+uuAa7KnOb4x72iZL1ixrtAjYjxvehQDskEJ6GtnKBMqnEtg9A71elpCp9qGib nlCd71PRjjDJQMt3oKV7lWOVW4N4s5vZYjNTDzf4KpWx+53LwurasM0dZEPOJ7BmY2wm jqdbDxp6iowmNgxdKO1pmRXJhW4C6Qn3W9PZzdSlr+fWH6eSuNhicsAvqpGNr9LpVD5E G1MI0FeN77YjwxJsQSuaoJEZU95Lc7jYwdwwGf+jeHARTY04wSOlLEsGzI5Bd0tcyAf/ 5QxwUh4zl7EHPCo3tsIwhsKLCONbWc1/8JqZR7QMZNws7s53CPS0r/pRWNPLY+59zeAI cOgw== X-Gm-Message-State: ALoCoQnJt7uFzRMn7+fR9Utsi+SINphvR/OahNduGgx6Eu2CB9u0imdzsQCatOIrplCZA6EWVRll X-Received: by 10.112.242.162 with SMTP id wr2mr24074823lbc.10.1408309633525; Sun, 17 Aug 2014 14:07:13 -0700 (PDT) Received: from raynote.ddteam.net (116-69-133-95.pool.ukrtel.net. [95.133.69.116]) by mx.google.com with ESMTPSA id yn1sm23875431lbb.25.2014.08.17.14.07.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 Aug 2014 14:07:12 -0700 (PDT) Date: Mon, 18 Aug 2014 00:04:58 +0300 From: Aleksandr Rybalko To: Stefan Esser Subject: Re: svn commit: r270114 - head/share/vt/keymaps Message-Id: <20140818000458.6eac42a440660464a7db525e@ddteam.net> In-Reply-To: <201408171954.s7HJsLmX099240@svn.freebsd.org> References: <201408171954.s7HJsLmX099240@svn.freebsd.org> X-Mailer: Sylpheed 3.4.2 (GTK+ 2.24.22; amd64-portbld-freebsd11.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 21:07:23 -0000 On Sun, 17 Aug 2014 19:54:21 +0000 (UTC) Stefan Esser wrote: > Author: se > Date: Sun Aug 17 19:54:21 2014 > New Revision: 270114 > URL: http://svnweb.freebsd.org/changeset/base/270114 > > Log: > Attempt at converting the SYSCONS keymaps to Unicode for use with NEWCONS. > I have spent many hours comparing source and destination formats, and hope > to have caught the most severe conversion errors. > > Files were converted with a Perl script which I'll shortly commit to the > tools directory. This script is a much enhanced version of the one > provided by ray@ and is expected to support the full kbdmap(5) syntax. > > The naming convention used is: > > <2-letter country code>..kbd > > Only if there are multiple layouts for different languages: > > <2-letter country code>-<2-letter language code>..kbd > > In nearly all cases, the keyboards are country specific, only. Currently > there is only one case where the language was added ("ch-fr.kbd" for > the Swiss-French keyboard layout). > > I choose to write Unicode character codes as hex numbers. While this > increases the diff to the SYSCONS keymap files for the trivial cases > (conversion from ISO8859-1), it really helps to verify the more complex > cases against a Unicode table (which is indexed by hex numbers). > > This commit does not cover all files that have been converted, since I > need to sort out which ones to use, if there were several with different > source encodings to choose from. > > Review and test of the keymap files is highly desirable before 10.1 is > released. I'd also appreciate educated opinions regarding the optimum > variant (to be made available as the default for each language). > > Since there are no NEWCONS keymaps in 10-STABLE, I plan to MFC after > the minimum allowed delay of 3 days, to allow at least a few weeks to > test and improve what will be in the next release. > > MFC after: 3 days > Thank you very much Stefan for such great help!!! WBW -- Aleksandr Rybalko From owner-svn-src-all@FreeBSD.ORG Sun Aug 17 21:09:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F0FF1D91; Sun, 17 Aug 2014 21:09:35 +0000 (UTC) Received: from mailout12.t-online.de (mailout12.t-online.de [194.25.134.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailout00.t-online.de", Issuer "TeleSec ServerPass DE-1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7C38E3292; Sun, 17 Aug 2014 21:09:35 +0000 (UTC) Received: from fwd41.aul.t-online.de (fwd41.aul.t-online.de [172.20.27.139]) by mailout12.t-online.de (Postfix) with SMTP id D83E44796BB; Sun, 17 Aug 2014 23:09:26 +0200 (CEST) Received: from [192.168.119.33] (EY23ncZJQh2rpGwd9f8qLZMtiPPjWq5zbM7ZWt7uuRNVsrxKI3ppkMi9Ski6ykaZuY@[84.154.101.219]) by fwd41.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1XJ7he-1XJN1E0; Sun, 17 Aug 2014 23:09:26 +0200 Message-ID: <53F11A04.504@freebsd.org> Date: Sun, 17 Aug 2014 23:09:24 +0200 From: Stefan Esser User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Pedro Giffuni , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r270114 - head/share/vt/keymaps References: <201408171954.s7HJsLmX099240@svn.freebsd.org> <53F10E95.30108@freebsd.org> In-Reply-To: <53F10E95.30108@freebsd.org> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit X-ID: EY23ncZJQh2rpGwd9f8qLZMtiPPjWq5zbM7ZWt7uuRNVsrxKI3ppkMi9Ski6ykaZuY X-TOI-MSGID: 59bd996e-01ab-45bc-86ec-be289b4a6430 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 21:09:36 -0000 Am 17.08.2014 um 22:20 schrieb Pedro Giffuni: > > On 08/17/14 14:54, Stefan Esser wrote: >> Author: se >> Date: Sun Aug 17 19:54:21 2014 >> New Revision: 270114 >> URL: http://svnweb.freebsd.org/changeset/base/270114 >> >> Log: >> Attempt at converting the SYSCONS keymaps to Unicode for use with >> NEWCONS. >> I have spent many hours comparing source and destination formats, >> and hope >> to have caught the most severe conversion errors. >> Files were converted with a Perl script which I'll shortly >> commit to the >> tools directory. This script is a much enhanced version of the one >> provided by ray@ and is expected to support the full kbdmap(5) syntax. >> The naming convention used is: >> <2-letter country code>..kbd >> Only if there are multiple layouts for different languages: >> <2-letter country code>-<2-letter language code>..kbd >> In nearly all cases, the keyboards are country specific, only. >> Currently >> there is only one case where the language was added ("ch-fr.kbd" for >> the Swiss-French keyboard layout). > > My $0.02 > I think es-la could/should be used for the latin-american keyboard. > es is basically used only in Spain so it should be es-es This has been discussed in the mail-list over quite a few days, and in the end I think that Ed Maste was right with his suggestion to just use country codes. My idea was to use the locale IDs, which are of the form _. But keyboard maps depend more on national standards than on languages. If you start with the language, then you need to add the country, but if you start with the country, you hardly ever need to support language specific layouts. (The Swiss-French keyboard differs only in two keys which have the shifted and unshifted characters exchanged.) > This is just IMHO, and could easily divert into a bikeshed > though. It already kind of did, over the last few days ;-) I spent quite some time discussing the naming scheme and that time could have been spent on the conversion and review process, instead ... But I really think that the scheme suggested be Ed is a good one - it is simple and uses the selector everybody knows (the country code as used in domain names), while the language codes are often hard to remember (and SYSCONS keymaps existed with either one used to name them, as a result). Therefore, what you'd name "es_LA" (or es-la) is now latinamerican (it could be "latinamerican-es" if you wanted to make the language visible in the name). The country comes first, and if there is no country code (e.g. because the keymap is used in many countries), a longer name is used. Sorry, if this is not what you'd have used. Up until two days ago, I also was in favour of the locale based names. But (just) the country is much more intuitive selector (and it works for nearly all countries - and it is easy to support those few that need both country and language ...) Best regards, STefan From owner-svn-src-all@FreeBSD.ORG Sun Aug 17 21:41:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 477F5CAF for ; Sun, 17 Aug 2014 21:41:02 +0000 (UTC) Received: from nm50-vm2.bullet.mail.bf1.yahoo.com (nm50-vm2.bullet.mail.bf1.yahoo.com [216.109.115.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC4653516 for ; Sun, 17 Aug 2014 21:41:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1408311659; bh=JSPLKZ8rBTkSHrqW/IIaDkzsX+vsmWytnrO2AxW/fXE=; h=Received:Received:Received:X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc:Message-Id:References:To:X-Mailer; b=ccJ8nksuynthHhA0z0mzdhO5tCzqLeJ4nNebJmbNNHwfshpxPi3X/FO105b/kC+tveqez7omiV/wf3c7fc528DliBwRvREVmXTnirGGK/yxWspVoHx0eSMKF5J+E3rUm1k5+xdteHF0lML7YesDqzXyak9DPwB3LGw1F0oM9gChgDN5NshViVT5a0guljPrukc4MYxa7x80Bmco24h8s8WFoaEDlMdffco0TjSut5JmhFqYjEQV2l7hKA/6gCpdqN9IXo2PtbejL6/deZJUk7eLjwRgE8Iq5t292y3YGN3s7G80BbmW7sYocTG8RMTR66a51tKFhTTM7Bre9AgpBug== DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s2048; d=yahoo.com; b=Hrco3oRtRUkB+xrMMuBJmRJZBmDjKB96L1vj9llmJpvu6dv1Ans6jAtJaTeEQKrf6nCUlax8tKYf+B6xqu/lpC9HnjgWWfgHgwQuRlJ23dVVwjgXSmcXFi2Y3CmJymJ0xC9rIHKXotabgsm28lEB+sMxXd6HnEkYJyxrm4GPg9j1j9FZrKqhYLXBlIeAjPU7ellPfjxCJwZIhhwXpH16Ypq06Vu3MjU5UaFaX/BEMNGsBxaHma/al7C3jLFlK744rGnxiga7tXu3d4tjwpUj4U8SSdYMjNctmBxbQAtTRgM3RoRAEG8kLF6jvs2/SRmNeJkqJG0shXsojA+b/ZRyIg==; Received: from [98.139.212.150] by nm50.bullet.mail.bf1.yahoo.com with NNFMP; 17 Aug 2014 21:40:59 -0000 Received: from [98.139.213.9] by tm7.bullet.mail.bf1.yahoo.com with NNFMP; 17 Aug 2014 21:40:59 -0000 Received: from [127.0.0.1] by smtp109.mail.bf1.yahoo.com with NNFMP; 17 Aug 2014 21:40:59 -0000 X-Yahoo-Newman-Id: 842094.350.bm@smtp109.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: KaAVlbkVM1lCNLUkX0NTpDb8lKBOQPb5i1HoIEYd2iTXts9 zyW1_gpMkOp3QYicGVYYY3K_Sah_svfvGhIUHKnxCc3RrEREVqrqcepErJWH FrS9hfbHADPsOwwqjChwOrkToUE0KVUDTmUKZc3xBnwrnHjx.z7srqBG_BzE V06_Af7u92WJSI8v6XBT6Ycv.XvWyiHTKcij0.4pBGlXd.4yyS_6EHIk76ir buvkvlzt6dRME05_BPe3a.HTbiWiTYHQp7z6Y1cSVxC5OukPUcV1fgRotlC3 DxYeLDww02juEBzEuDkEE3luvhAEGn8Z2GaWY6Z67oi05olRzNDZ9QXaZlzQ xDeeJSvLGhbjzvuPKLjEFZrX9c38D6PhqzmT1IZzv8U6NH8xXKnlHS0lVIfc mKiQIj1E7oMQ2Z2uXiwlpX.Hc77Co4mTMBMd4w9GhYxlG.IhEevS1rbZLq_F Xc6I3yrl04bBifDVZ.QsOiuPF4ZZS221WVyhMwFGQkuXvEK1g3ZTkOylF25A 4a4V2oiSSnyjvo3qS25_fOI0PIsr3CoXxng-- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r270114 - head/share/vt/keymaps From: Pedro Giffuni In-Reply-To: <53F11A04.504@freebsd.org> Date: Sun, 17 Aug 2014 16:40:56 -0500 Message-Id: References: <201408171954.s7HJsLmX099240@svn.freebsd.org> <53F10E95.30108@freebsd.org> <53F11A04.504@freebsd.org> To: Stefan Esser X-Mailer: Apple Mail (2.1878.6) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 21:41:02 -0000 Il giorno 17/ago/2014, alle ore 16:09, Stefan Esser ha = scritto: > Am 17.08.2014 um 22:20 schrieb Pedro Giffuni: >>=20 >> On 08/17/14 14:54, Stefan Esser wrote: >>> Author: se >>> Date: Sun Aug 17 19:54:21 2014 >>> New Revision: 270114 >>> URL: http://svnweb.freebsd.org/changeset/base/270114 >>>=20 >>> Log: >>> Attempt at converting the SYSCONS keymaps to Unicode for use with >>> NEWCONS. >>> I have spent many hours comparing source and destination formats, >>> and hope >>> to have caught the most severe conversion errors. >>> Files were converted with a Perl script which I'll shortly >>> commit to the >>> tools directory. This script is a much enhanced version of the one >>> provided by ray@ and is expected to support the full kbdmap(5) = syntax. >>> The naming convention used is: >>> <2-letter country code>..kbd >>> Only if there are multiple layouts for different languages: >>> <2-letter country code>-<2-letter language code>..kbd >>> In nearly all cases, the keyboards are country specific, only. >>> Currently >>> there is only one case where the language was added ("ch-fr.kbd" = for >>> the Swiss-French keyboard layout). >>=20 >> My $0.02 >> I think es-la could/should be used for the latin-american keyboard. >> es is basically used only in Spain so it should be es-es >=20 > This has been discussed in the mail-list over quite a few days, > and in the end I think that Ed Maste was right with his suggestion > to just use country codes. >=20 > My idea was to use the locale IDs, which are of the form > _. But keyboard maps depend more on national > standards than on languages. If you start with the language, > then you need to add the country, but if you start with the > country, you hardly ever need to support language specific > layouts. (The Swiss-French keyboard differs only in two keys > which have the shifted and unshifted characters exchanged.) >=20 >> This is just IMHO, and could easily divert into a bikeshed >> though. >=20 > It already kind of did, over the last few days ;-) >=20 > I spent quite some time discussing the naming scheme and that > time could have been spent on the conversion and review process, > instead ... But I really think that the scheme suggested be Ed > is a good one - it is simple and uses the selector everybody > knows (the country code as used in domain names), while the > language codes are often hard to remember (and SYSCONS keymaps > existed with either one used to name them, as a result). >=20 > Therefore, what you'd name "es_LA" (or es-la) is now latinamerican > (it could be "latinamerican-es" if you wanted to make the language > visible in the name). The country comes first, and if there is no > country code (e.g. because the keymap is used in many countries), > a longer name is used. >=20 That would, IMHO, be fine. What I dislike is that all other files are = using two letter codes and meanwhile the latinamerican thing has the long name :-P. FWIW, I tried to change that in syscons but the reduced nomenclature came too late and changing names caused too much trouble in sysinstall.. Pedro. >=20 > Sorry, if this is not what you'd have used. Up until two days > ago, I also was in favour of the locale based names. But (just) > the country is much more intuitive selector (and it works for > nearly all countries - and it is easy to support those few that > need both country and language ...) >=20 > Best regards, STefan From owner-svn-src-all@FreeBSD.ORG Sun Aug 17 22:46:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1461DB09; Sun, 17 Aug 2014 22:46:37 +0000 (UTC) Received: from tensor.andric.com (unknown [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "tensor.andric.com", Issuer "CAcert Class 3 Root" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C288C3C8C; Sun, 17 Aug 2014 22:46:36 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::84ae:f3d9:3fda:e0d2] (unknown [IPv6:2001:7b8:3a7:0:84ae:f3d9:3fda:e0d2]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id D73985C43; Mon, 18 Aug 2014 00:46:31 +0200 (CEST) Content-Type: multipart/signed; boundary="Apple-Mail=_C83297FD-146A-46B2-9B6B-8A9FE967E121"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r270099 - in stable: 10/contrib/gcc/config/i386 9/contrib/gcc/config/i386 From: Dimitry Andric In-Reply-To: <20140817134509.GA47327@FreeBSD.org> Date: Mon, 18 Aug 2014 00:45:52 +0200 Message-Id: <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> To: Alexey Dokuchaev X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 22:46:37 -0000 --Apple-Mail=_C83297FD-146A-46B2-9B6B-8A9FE967E121 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii 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 --Apple-Mail=_C83297FD-146A-46B2-9B6B-8A9FE967E121 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iEYEARECAAYFAlPxMMUACgkQsF6jCi4glqOzTgCfSWlos/pA4l9XzksU4X659yf4 IPYAoMlpUIvUERHn5T2JgSwV3872cXKO =uqz+ -----END PGP SIGNATURE----- --Apple-Mail=_C83297FD-146A-46B2-9B6B-8A9FE967E121-- From owner-svn-src-all@FreeBSD.ORG Sun Aug 17 23:30:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A9E6C622; Sun, 17 Aug 2014 23:30:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 960F43049; Sun, 17 Aug 2014 23:30:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7HNUjNx099366; Sun, 17 Aug 2014 23:30:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7HNUjf6099365; Sun, 17 Aug 2014 23:30:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201408172330.s7HNUjf6099365@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 17 Aug 2014 23:30:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270116 - head/lib/atf/libatf-c++ X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 23:30:45 -0000 Author: ngie Date: Sun Aug 17 23:30:45 2014 New Revision: 270116 URL: http://svnweb.freebsd.org/changeset/base/270116 Log: 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: head/lib/atf/libatf-c++/Makefile Modified: head/lib/atf/libatf-c++/Makefile ============================================================================== --- head/lib/atf/libatf-c++/Makefile Sun Aug 17 20:06:47 2014 (r270115) +++ head/lib/atf/libatf-c++/Makefile Sun Aug 17 23:30:45 2014 (r270116) @@ -33,7 +33,7 @@ PRIVATELIB= true SHLIB_MAJOR= 1 # 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 owner-svn-src-all@FreeBSD.ORG Mon Aug 18 00:50:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 28F212A9; Mon, 18 Aug 2014 00:50:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1577D3679; Mon, 18 Aug 2014 00:50:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7I0o91N035178; Mon, 18 Aug 2014 00:50:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7I0o9uk035177; Mon, 18 Aug 2014 00:50:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201408180050.s7I0o9uk035177@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 18 Aug 2014 00:50:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270117 - head/sbin/hastd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 00:50:10 -0000 Author: ngie Date: Mon Aug 18 00:50:09 2014 New Revision: 270117 URL: http://svnweb.freebsd.org/changeset/base/270117 Log: Add -ll to LDADD to fix "make checkdpadd" Phabric: D622 MFC after: 2 weeks Approved by: rpaulo (mentor) Modified: head/sbin/hastd/Makefile Modified: head/sbin/hastd/Makefile ============================================================================== --- head/sbin/hastd/Makefile Sun Aug 17 23:30:45 2014 (r270116) +++ head/sbin/hastd/Makefile Mon Aug 18 00:50:09 2014 (r270117) @@ -31,7 +31,7 @@ CFLAGS+=-DINET6 .endif DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} ${LIBL} ${LIBPTHREAD} ${LIBUTIL} -LDADD= -lgeom -lbsdxml -lsbuf -lpthread -lutil +LDADD= -lgeom -lbsdxml -lsbuf -ll -lpthread -lutil .if ${MK_OPENSSL} != "no" DPADD+= ${LIBCRYPTO} LDADD+= -lcrypto From owner-svn-src-all@FreeBSD.ORG Mon Aug 18 01:21:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B3975669; Mon, 18 Aug 2014 01:21:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9FFAF390C; Mon, 18 Aug 2014 01:21:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7I1LfDc050567; Mon, 18 Aug 2014 01:21:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7I1LfSX050566; Mon, 18 Aug 2014 01:21:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201408180121.s7I1LfSX050566@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 18 Aug 2014 01:21:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270118 - head/sbin/dhclient/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 01:21:41 -0000 Author: ngie Date: Mon Aug 18 01:21:41 2014 New Revision: 270118 URL: http://svnweb.freebsd.org/changeset/base/270118 Log: Add LIBUTIL to DPADD This will fix "make checkdpadd" MFC after: 5 days PR: 192759 Approved by: rpaulo (mentor) Modified: head/sbin/dhclient/tests/Makefile Modified: head/sbin/dhclient/tests/Makefile ============================================================================== --- head/sbin/dhclient/tests/Makefile Mon Aug 18 00:50:09 2014 (r270117) +++ head/sbin/dhclient/tests/Makefile Mon Aug 18 01:21:41 2014 (r270118) @@ -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 owner-svn-src-all@FreeBSD.ORG Mon Aug 18 01:49:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C24FC8AC; Mon, 18 Aug 2014 01:49:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A40113A86; Mon, 18 Aug 2014 01:49:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7I1nhrt061364; Mon, 18 Aug 2014 01:49:43 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7I1nh6L061359; Mon, 18 Aug 2014 01:49:43 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201408180149.s7I1nh6L061359@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 18 Aug 2014 01:49:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270119 - head/share/vt/keymaps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 01:49:44 -0000 Author: emaste Date: Mon Aug 18 01:49:42 2014 New Revision: 270119 URL: http://svnweb.freebsd.org/changeset/base/270119 Log: Rename ca keyboard to ca-fr "ca" will shortly be used for the Canadian Multilingual keyboard. Added: head/share/vt/keymaps/ca-fr.kbd - copied unchanged from r270118, head/share/vt/keymaps/ca.kbd Deleted: head/share/vt/keymaps/ca.kbd Modified: head/share/vt/keymaps/INDEX.keymaps head/share/vt/keymaps/Makefile Modified: head/share/vt/keymaps/INDEX.keymaps ============================================================================== --- head/share/vt/keymaps/INDEX.keymaps Mon Aug 18 01:21:41 2014 (r270118) +++ head/share/vt/keymaps/INDEX.keymaps Mon Aug 18 01:49:42 2014 (r270119) @@ -200,11 +200,11 @@ 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-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 Modified: head/share/vt/keymaps/Makefile ============================================================================== --- head/share/vt/keymaps/Makefile Mon Aug 18 01:21:41 2014 (r270118) +++ head/share/vt/keymaps/Makefile Mon Aug 18 01:49:42 2014 (r270119) @@ -6,7 +6,7 @@ FILES= INDEX.keymaps \ bg.bds.kbd \ br.acc.kbd \ br.kbd \ - ca.kbd \ + ca-fr.kbd \ centraleuropean.kbd \ ch-fr.acc.kbd \ ch-fr.kbd \ Copied: head/share/vt/keymaps/ca-fr.kbd (from r270118, head/share/vt/keymaps/ca.kbd) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/vt/keymaps/ca-fr.kbd Mon Aug 18 01:49:42 2014 (r270119, copy of r270118, head/share/vt/keymaps/ca.kbd) @@ -0,0 +1,143 @@ +# French Canadian keyboard +# by Alexandre Normand (outcast@globetretrotter.net) +# with the help of Demis (demis@club-internet.fr) +# +# July 4, 1999 +# +# $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 0xb1 '!' nop nop O + 003 '2' '"' nul nul '@' '"' nul nul O + 004 '3' '/' nop nop 0xa3 '/' nop nop O + 005 '4' '$' nop nop 0xa2 '$' nop nop O + 006 '5' '%' nop nop 0x20ac '%' nop nop O + 007 '6' '?' nop nop 0xac '?' nop nop O + 008 '7' '&' nop nop '|' '&' nop nop O + 009 '8' '*' nop nop 0xb2 '*' nop nop O + 010 '9' '(' nop nop 0xb3 '(' nop nop O + 011 '0' ')' nop nop 0x0152 ')' nop nop O + 012 '-' '_' nop nop 0x0153 '_' nop nop O + 013 '=' '+' nop nop 0x0178 '+' 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 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 + 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 dcir dcir esc esc '[' dcir esc esc O + 027 dced duml gs gs ']' duml 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 dgra dgra nop nop '{' dgra 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 nop O + 053 0xe9 0xc9 nop nop dacu 0xc9 nop nop C + 054 rshift rshift rshift rshift rshift rshift rshift rshift O + 055 '*' '*' '*' '*' '*' '*' '*' '*' O + 056 lalt lalt lalt lalt lalt lalt lalt lalt O + 057 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O + 058 clock clock clock clock clock clock clock clock O + 059 fkey01 fkey13 fkey25 fkey37 scr01 scr11 scr01 scr11 O + 060 fkey02 fkey14 fkey26 fkey38 scr02 scr12 scr02 scr12 O + 061 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O + 062 fkey04 fkey16 fkey28 fkey40 scr04 scr14 scr04 scr14 O + 063 fkey05 fkey17 fkey29 fkey41 scr05 scr15 scr05 scr15 O + 064 fkey06 fkey18 fkey30 fkey42 scr06 scr16 scr06 scr16 O + 065 fkey07 fkey19 fkey31 fkey43 scr07 scr07 scr07 scr07 O + 066 fkey08 fkey20 fkey32 fkey44 scr08 scr08 scr08 scr08 O + 067 fkey09 fkey21 fkey33 fkey45 scr09 scr09 scr09 scr09 O + 068 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O + 069 nlock nlock nlock nlock nlock nlock nlock nlock O + 070 slock slock slock slock slock slock slock slock O + 071 fkey49 '7' '7' '7' '7' '7' '7' '7' N + 072 fkey50 '8' '8' '8' '8' '8' '8' '8' N + 073 fkey51 '9' '9' '9' '9' '9' '9' '9' N + 074 fkey52 '-' '-' '-' '-' '-' '-' '-' N + 075 fkey53 '4' '4' '4' '4' '4' '4' '4' N + 076 fkey54 '5' '5' '5' '5' '5' '5' '5' N + 077 fkey55 '6' '6' '6' '6' '6' '6' '6' N + 078 fkey56 '+' '+' '+' '+' '+' '+' '+' N + 079 fkey57 '1' '1' '1' '1' '1' '1' '1' N + 080 fkey58 '2' '2' '2' '2' '2' '2' '2' N + 081 fkey59 '3' '3' '3' '3' '3' '3' '3' N + 082 fkey60 '0' '0' '0' '0' '0' '0' '0' N + 083 del '.' '.' '.' '.' '.' boot boot N + 084 nop nop nop nop nop nop nop nop O + 085 nop nop nop nop nop nop nop nop O + 086 0xab 0xbb nop nop 0xb0 0xbb nop nop O + 087 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O + 088 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O + 089 cr cr nl nl cr cr nl nl O + 090 rctrl rctrl rctrl rctrl rctrl rctrl rctrl rctrl O + 091 '/' '/' '/' '/' '/' '/' '/' '/' O + 092 nscr 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 + + dgra '`' ( 'a' 0xe0 ) ( 'A' 0xc0 ) ( 'e' 0xe8 ) ( 'E' 0xc8 ) + ( 'i' 0xec ) ( 'I' 0xcc ) ( 'o' 0xf2 ) ( 'O' 0xd2 ) + ( 'u' 0xf9 ) ( 'U' 0xd9 ) + + dacu 0xb4 ( 'a' 0xe1 ) ( 'A' 0xc1 ) ( 'e' 0xe9 ) ( 'E' 0xc9 ) + ( 'i' 0xed ) ( 'I' 0xcd ) ( 'o' 0xf3 ) ( 'O' 0xd3 ) + ( 'u' 0xfa ) ( 'U' 0xda ) ( 'y' 0xfd ) ( 'Y' 0xdd ) + + dcir '^' ( 'a' 0xe2 ) ( 'A' 0xc2 ) ( 'e' 0xea ) ( 'E' 0xca ) + ( 'i' 0xee ) ( 'I' 0xce ) ( 'o' 0xf4 ) ( 'O' 0xd4 ) + ( 'u' 0xfb ) ( 'U' 0xdb ) + + dtil '~' ( 'a' 0xe3 ) ( 'A' 0xc3 ) ( 'n' 0xf1 ) ( 'N' 0xd1 ) + ( 'o' 0xf5 ) ( 'O' 0xd5 ) + + duml 0xa8 ( 'a' 0xe4 ) ( 'A' 0xc4 ) ( 'e' 0xeb ) ( 'E' 0xcb ) + ( 'i' 0xef ) ( 'I' 0xcf ) ( 'o' 0xf6 ) ( 'O' 0xd6 ) + ( 'u' 0xfc ) ( 'U' 0xdc ) ( 'y' 0xff ) + + drin 0xb0 ( 'a' 0xe5 ) ( 'A' 0xc5 ) + + dced 0xb8 ( 'c' 0xe7 ) ( 'C' 0xc7 ) From owner-svn-src-all@FreeBSD.ORG Mon Aug 18 01:55:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9B98AA2E; Mon, 18 Aug 2014 01:55:29 +0000 (UTC) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 2BD553B24; Mon, 18 Aug 2014 01:55:28 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 7899D780034; Mon, 18 Aug 2014 11:26:41 +1000 (EST) Date: Mon, 18 Aug 2014 11:26:40 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Pedro Giffuni Subject: Re: svn commit: r270035 - stable/10/lib/libc/stdio In-Reply-To: <53F0FE68.6080501@freebsd.org> Message-ID: <20140818102031.C948@besplex.bde.org> References: <201408160129.s7G1TojV024013@svn.freebsd.org> <53F0F263.7040202@freebsd.org> <53F0FE68.6080501@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=AOuw8Gd4 c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=1X1P_PyM_ckA:10 a=fvBf6jG08a8A:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=6I5d2MoRAAAA:8 a=Azl0AK08aHdxr6gQQFcA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Andrey Chernov , svn-src-stable-10@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 01:55:29 -0000 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 owner-svn-src-all@FreeBSD.ORG Mon Aug 18 01:58:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D354CB7A; Mon, 18 Aug 2014 01:58:47 +0000 (UTC) Received: from mail-ig0-x22a.google.com (mail-ig0-x22a.google.com [IPv6:2607:f8b0:4001:c05::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 868113B3A; Mon, 18 Aug 2014 01:58:47 +0000 (UTC) Received: by mail-ig0-f170.google.com with SMTP id h3so6675240igd.5 for ; Sun, 17 Aug 2014 18:58:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=YY+/n3E752THrt1aTEqdC1X4ovnlispNi62AaKn3xzw=; b=rwUsOz+0q6g37KsH3eUoSnt3I1MpYtGuda60BMuOn5Pi6cnEqVmGIO/GNLpWz1TkLY Eej71ivgF4JUzxs6J712QQz+OzpjkNvmtlyqGN8FvgtFe5xQ/m3dfnwGG/j1rW7PQqpV 1L9dfclItvW6RA+OkrX8IY7N3uqxAmb9uXnVlBU6hFj+/2G4jp/hYbfMn8E4OuL6Hzih xwThDX1v56VeV0ZbzP2IAYk3ZjhrKLR6mpR73BHI0W9PkKwAkInL8jn5SpsZ3HjXUBhR Q+ZpB8PDRnskBQnGSNDw7nt3+5rCjZXST0LaLEwuFwmG4beK8dSipO23XSv0nvQ3vTut 4NHg== X-Received: by 10.50.88.37 with SMTP id bd5mr11360233igb.1.1408327126507; Sun, 17 Aug 2014 18:58:46 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.131.38 with HTTP; Sun, 17 Aug 2014 18:58:26 -0700 (PDT) In-Reply-To: <201408171954.s7HJsLmX099240@svn.freebsd.org> References: <201408171954.s7HJsLmX099240@svn.freebsd.org> From: Ed Maste Date: Sun, 17 Aug 2014 21:58:26 -0400 X-Google-Sender-Auth: 2-JGKcUsZgL3Y5zlF03uqVxhaZY Message-ID: Subject: Re: svn commit: r270114 - head/share/vt/keymaps To: Stefan Esser Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 01:58:47 -0000 On 17 August 2014 15:54, Stefan Esser wrote: > Author: se > Date: Sun Aug 17 19:54:21 2014 > New Revision: 270114 > URL: http://svnweb.freebsd.org/changeset/base/270114 > > Log: > Attempt at converting the SYSCONS keymaps to Unicode for use with NEWCONS. > I have spent many hours comparing source and destination formats, and hope > to have caught the most severe conversion errors. Stefan, Thank you very much for taking this on. > <2-letter country code>..kbd > > Only if there are multiple layouts for different languages: > > <2-letter country code>-<2-letter language code>..kbd > > In nearly all cases, the keyboards are country specific, only. Currently > there is only one case where the language was added ("ch-fr.kbd" for > the Swiss-French keyboard layout). I've just temporarily broken this rule by renaming ca.kbd to ca-fr.kbd, but will add a "Canadian Multilingual" ca.kbd soon; I think it's better to get this set up in advance of the MFC. > I choose to write Unicode character codes as hex numbers. While this > increases the diff to the SYSCONS keymap files for the trivial cases > (conversion from ISO8859-1), it really helps to verify the more complex > cases against a Unicode table (which is indexed by hex numbers). Thanks for this too, I agree that being able to look up Unicode code points directly is much more important than reducing syscons diffs. From owner-svn-src-all@FreeBSD.ORG Mon Aug 18 02:13:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4AB3FD3E; Mon, 18 Aug 2014 02:13:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 353A73C74; Mon, 18 Aug 2014 02:13:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7I2DkHM073905; Mon, 18 Aug 2014 02:13:46 GMT (envelope-from ache@FreeBSD.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7I2Djxe073901; Mon, 18 Aug 2014 02:13:45 GMT (envelope-from ache@FreeBSD.org) Message-Id: <201408180213.s7I2Djxe073901@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ache set sender to ache@FreeBSD.org using -f From: "Andrey A. Chernov" Date: Mon, 18 Aug 2014 02:13:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270120 - in stable/10: contrib/opie contrib/opie/libopie usr.bin/opiekey X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 02:13:46 -0000 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@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 owner-svn-src-all@FreeBSD.ORG Mon Aug 18 02:32:49 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89929FA7; Mon, 18 Aug 2014 02:32:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74FA53DCD; Mon, 18 Aug 2014 02:32:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7I2Wn58082658; Mon, 18 Aug 2014 02:32:49 GMT (envelope-from ache@FreeBSD.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7I2WnOv082657; Mon, 18 Aug 2014 02:32:49 GMT (envelope-from ache@FreeBSD.org) Message-Id: <201408180232.s7I2WnOv082657@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ache set sender to ache@FreeBSD.org using -f From: "Andrey A. Chernov" Date: Mon, 18 Aug 2014 02:32:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270121 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 02:32:49 -0000 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 owner-svn-src-all@FreeBSD.ORG Mon Aug 18 02:42:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0828A1A6; Mon, 18 Aug 2014 02:42:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E758D3EB6; Mon, 18 Aug 2014 02:42:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7I2gNIw087097; Mon, 18 Aug 2014 02:42:23 GMT (envelope-from ache@FreeBSD.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7I2gNaq087095; Mon, 18 Aug 2014 02:42:23 GMT (envelope-from ache@FreeBSD.org) Message-Id: <201408180242.s7I2gNaq087095@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ache set sender to ache@FreeBSD.org using -f From: "Andrey A. Chernov" Date: Mon, 18 Aug 2014 02:42:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270122 - in stable/10: . lib/libopie X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 02:42:24 -0000 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 owner-svn-src-all@FreeBSD.ORG Mon Aug 18 02:44:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2B822F4; Mon, 18 Aug 2014 02:44:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2F6C3EC9; Mon, 18 Aug 2014 02:44:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7I2ivB5087452; Mon, 18 Aug 2014 02:44:57 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7I2iuYA087448; Mon, 18 Aug 2014 02:44:56 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201408180244.s7I2iuYA087448@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 18 Aug 2014 02:44:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270123 - in head/sys: arm/arm arm/include kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 02:44:58 -0000 Author: imp Date: Mon Aug 18 02:44:56 2014 New Revision: 270123 URL: http://svnweb.freebsd.org/changeset/base/270123 Log: Expand the elf brandelf infrastructure to give access to the whole ELF header (Elf_Ehdr) to determine if a particular interpretor wants to accept it or not. Use this mechanism to filter EABI arm on OABI arm kernels, and vice versa. This method could also be used to implement OABI on EABI arm kernels, if desired, or to allow a single mips kernel to run o32, n32 and n64 binaries. Differential Revision: https://reviews.freebsd.org/D609 Modified: head/sys/arm/arm/elf_machdep.c head/sys/arm/include/elf.h head/sys/kern/imgact_elf.c head/sys/sys/imgact_elf.h Modified: head/sys/arm/arm/elf_machdep.c ============================================================================== --- head/sys/arm/arm/elf_machdep.c Mon Aug 18 02:42:23 2014 (r270122) +++ head/sys/arm/arm/elf_machdep.c Mon Aug 18 02:44:56 2014 (r270123) @@ -46,6 +46,8 @@ __FBSDID("$FreeBSD$"); #include #include +static boolean_t elf32_arm_abi_supported(struct image_params *); + struct sysentvec elf32_freebsd_sysvec = { .sv_size = SYS_MAXSYSCALL, .sv_table = sysent, @@ -90,7 +92,8 @@ static Elf32_Brandinfo freebsd_brand_inf .sysvec = &elf32_freebsd_sysvec, .interp_newpath = NULL, .brand_note = &elf32_freebsd_brandnote, - .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE + .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE, + .header_supported= elf32_arm_abi_supported, }; SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST, @@ -106,13 +109,42 @@ static Elf32_Brandinfo freebsd_brand_oin .sysvec = &elf32_freebsd_sysvec, .interp_newpath = NULL, .brand_note = &elf32_freebsd_brandnote, - .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE + .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE, + .header_supported= elf32_arm_abi_supported, }; SYSINIT(oelf32, SI_SUB_EXEC, SI_ORDER_ANY, (sysinit_cfunc_t) elf32_insert_brand_entry, &freebsd_brand_oinfo); +static boolean_t +elf32_arm_abi_supported(struct image_params *imgp) +{ + const Elf_Ehdr *hdr = (const Elf_Ehdr *)imgp->image_header; + +#ifdef __ARM_EABI__ + /* + * When configured for EABI, FreeBSD supports EABI vesions 4 and 5. + */ + if (EF_ARM_EABI_VERSION(hdr->e_flags) < EF_ARM_EABI_FREEBSD_MIN) { + if (bootverbose) + uprintf("Attempting to execute non EABI binary (rev %d) image %s", + EF_ARM_EABI_VERSION(hdr->e_flags), imgp->args->fname); + return (FALSE); + } +#else + /* + * When configured for OABI, that's all we do, so reject EABI binaries. + */ + if (EF_ARM_EABI_VERSION(hdr->e_flags) != EF_ARM_EABI_VERSION_UNKNOWN) { + if (bootverbose) + uprintf("Attempting to execute EABI binary (rev %d) image %s", + EF_ARM_EABI_VERSION(hdr->e_flags), imgp->args->fname); + return (FALSE); + } +#endif + return (TRUE); +} void elf32_dump_thread(struct thread *td __unused, void *dst __unused, Modified: head/sys/arm/include/elf.h ============================================================================== --- head/sys/arm/include/elf.h Mon Aug 18 02:42:23 2014 (r270122) +++ head/sys/arm/include/elf.h Mon Aug 18 02:44:56 2014 (r270123) @@ -103,6 +103,12 @@ __ElfType(Auxinfo); #define ELF_TARG_MACH EM_ARM #define ELF_TARG_VER 1 +/* Defines specific for arm headers */ +#define EF_ARM_EABIMASK 0xff000000 +#define EF_ARM_EABI_VERSION(x) (((x) & EF_ARM_EABIMASK) >> 24) +#define EF_ARM_EABI_VERSION_UNKNOWN 0 +#define EF_ARM_EABI_FREEBSD_MIN 4 + /* * Magic number for the elf trampoline, chosen wisely to be an immediate * value. Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Mon Aug 18 02:42:23 2014 (r270122) +++ head/sys/kern/imgact_elf.c Mon Aug 18 02:44:56 2014 (r270123) @@ -294,6 +294,19 @@ __elfN(get_brandinfo)(struct image_param return (bi); } + /* No known brand, see if the header is recognized by any brand */ + for (i = 0; i < MAX_BRANDS; i++) { + bi = elf_brand_list[i]; + if (bi == NULL || bi->flags & BI_BRAND_NOTE_MANDATORY || + bi->header_supported == NULL) + continue; + if (hdr->e_machine == bi->machine) { + ret = bi->header_supported(imgp); + if (ret) + return (bi); + } + } + /* Lacking a known brand, search for a recognized interpreter. */ if (interp != NULL) { for (i = 0; i < MAX_BRANDS; i++) { Modified: head/sys/sys/imgact_elf.h ============================================================================== --- head/sys/sys/imgact_elf.h Mon Aug 18 02:42:23 2014 (r270122) +++ head/sys/sys/imgact_elf.h Mon Aug 18 02:44:56 2014 (r270123) @@ -74,6 +74,7 @@ typedef struct { const char *interp_newpath; int flags; Elf_Brandnote *brand_note; + boolean_t (*header_supported)(struct image_params *); #define BI_CAN_EXEC_DYN 0x0001 #define BI_BRAND_NOTE 0x0002 /* May have note.ABI-tag section. */ #define BI_BRAND_NOTE_MANDATORY 0x0004 /* Must have note.ABI-tag section. */ From owner-svn-src-all@FreeBSD.ORG Mon Aug 18 02:45:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C6451435; Mon, 18 Aug 2014 02:45:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B1FAD3ECF; Mon, 18 Aug 2014 02:45:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7I2j6Jk087599; Mon, 18 Aug 2014 02:45:06 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7I2j6Ex087598; Mon, 18 Aug 2014 02:45:06 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201408180245.s7I2j6Ex087598@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 18 Aug 2014 02:45:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270124 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 02:45:06 -0000 Author: imp Date: Mon Aug 18 02:45:06 2014 New Revision: 270124 URL: http://svnweb.freebsd.org/changeset/base/270124 Log: /usr/libexec/ld.so.1 never was a thing on FreeBSD/arm. This was the FreeBSD 3.x and 4.x run time linker. FreeBSD/arm's first release was 5.0. Retire this long-dead code. Modified: head/sys/arm/arm/elf_machdep.c Modified: head/sys/arm/arm/elf_machdep.c ============================================================================== --- head/sys/arm/arm/elf_machdep.c Mon Aug 18 02:44:56 2014 (r270123) +++ head/sys/arm/arm/elf_machdep.c Mon Aug 18 02:45:06 2014 (r270124) @@ -100,23 +100,6 @@ SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIR (sysinit_cfunc_t) elf32_insert_brand_entry, &freebsd_brand_info); -static Elf32_Brandinfo freebsd_brand_oinfo = { - .brand = ELFOSABI_FREEBSD, - .machine = EM_ARM, - .compat_3_brand = "FreeBSD", - .emul_path = NULL, - .interp_path = "/usr/libexec/ld-elf.so.1", - .sysvec = &elf32_freebsd_sysvec, - .interp_newpath = NULL, - .brand_note = &elf32_freebsd_brandnote, - .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE, - .header_supported= elf32_arm_abi_supported, -}; - -SYSINIT(oelf32, SI_SUB_EXEC, SI_ORDER_ANY, - (sysinit_cfunc_t) elf32_insert_brand_entry, - &freebsd_brand_oinfo); - static boolean_t elf32_arm_abi_supported(struct image_params *imgp) { From owner-svn-src-all@FreeBSD.ORG Mon Aug 18 03:06:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D577C8DE; Mon, 18 Aug 2014 03:06:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C046F3100; Mon, 18 Aug 2014 03:06:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7I36o8a097679; Mon, 18 Aug 2014 03:06:50 GMT (envelope-from ache@FreeBSD.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7I36oie097678; Mon, 18 Aug 2014 03:06:50 GMT (envelope-from ache@FreeBSD.org) Message-Id: <201408180306.s7I36oie097678@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ache set sender to ache@FreeBSD.org using -f From: "Andrey A. Chernov" Date: Mon, 18 Aug 2014 03:06:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270125 - stable/10/lib/libpam/modules/pam_opie X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 03:06:51 -0000 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 owner-svn-src-all@FreeBSD.ORG Mon Aug 18 05:13:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C5D9D46C; Mon, 18 Aug 2014 05:13:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A857E3A7D; Mon, 18 Aug 2014 05:13:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7I5DkKQ054585; Mon, 18 Aug 2014 05:13:46 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7I5Dk6C054584; Mon, 18 Aug 2014 05:13:46 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201408180513.s7I5Dk6C054584@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 18 Aug 2014 05:13:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270126 - stable/10/cddl/contrib/opensolaris/cmd/ztest X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 05:13:46 -0000 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 owner-svn-src-all@FreeBSD.ORG Mon Aug 18 05:17:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 477496BF; Mon, 18 Aug 2014 05:17:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1836E3A9C; Mon, 18 Aug 2014 05:17:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7I5HOjL055141; Mon, 18 Aug 2014 05:17:24 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7I5HOWw055138; Mon, 18 Aug 2014 05:17:24 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201408180517.s7I5HOWw055138@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 18 Aug 2014 05:17:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270127 - in stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 05:17:25 -0000 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 owner-svn-src-all@FreeBSD.ORG Mon Aug 18 05:22:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BACB393D; Mon, 18 Aug 2014 05:22:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A5A753B39; Mon, 18 Aug 2014 05:22:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7I5M9qI059005; Mon, 18 Aug 2014 05:22:09 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7I5M9ox059004; Mon, 18 Aug 2014 05:22:09 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201408180522.s7I5M9ox059004@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 18 Aug 2014 05:22:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270128 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 05:22:09 -0000 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 owner-svn-src-all@FreeBSD.ORG Mon Aug 18 08:07:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 241AE5B3; Mon, 18 Aug 2014 08:07:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10661387C; Mon, 18 Aug 2014 08:07:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7I87orX031748; Mon, 18 Aug 2014 08:07:50 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7I87oQ1031747; Mon, 18 Aug 2014 08:07:50 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201408180807.s7I87oQ1031747@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Mon, 18 Aug 2014 08:07:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270129 - head/sbin/ifconfig X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 08:07:51 -0000 Author: melifaro Date: Mon Aug 18 08:07:50 2014 New Revision: 270129 URL: http://svnweb.freebsd.org/changeset/base/270129 Log: Zero buffer before request. Modified: head/sbin/ifconfig/sfp.c Modified: head/sbin/ifconfig/sfp.c ============================================================================== --- head/sbin/ifconfig/sfp.c Mon Aug 18 05:22:09 2014 (r270128) +++ head/sbin/ifconfig/sfp.c Mon Aug 18 08:07:50 2014 (r270129) @@ -451,6 +451,7 @@ read_i2c_ixgbe(struct i2c_info *ii, uint for (i = 0; i < len; i += 1) { ixreq.offset = off + i; ixreq.len = 1; + ixreq.data[0] = '\0'; if (ioctl(ii->s, SIOCGI2C, ii->ifr) != 0) { ii->error = errno; From owner-svn-src-all@FreeBSD.ORG Mon Aug 18 08:50:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F071D2D4; Mon, 18 Aug 2014 08:50:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC4913BFC; Mon, 18 Aug 2014 08:50:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7I8o5w2050144; Mon, 18 Aug 2014 08:50:05 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7I8o53Q050143; Mon, 18 Aug 2014 08:50:05 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201408180850.s7I8o53Q050143@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: Roger Pau Monné Date: Mon, 18 Aug 2014 08:50:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270130 - stable/10/sys/dev/xen/blkfront X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 08:50:06 -0000 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 owner-svn-src-all@FreeBSD.ORG Mon Aug 18 09:40:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3C6A6EB2; Mon, 18 Aug 2014 09:40:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26800306A; Mon, 18 Aug 2014 09:40:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7I9eLNQ073329; Mon, 18 Aug 2014 09:40:21 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7I9eKMC073323; Mon, 18 Aug 2014 09:40:20 GMT (envelope-from se@FreeBSD.org) Message-Id: <201408180940.s7I9eKMC073323@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Mon, 18 Aug 2014 09:40:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270131 - head/tools/tools/vt/keymaps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 09:40:21 -0000 Author: se Date: Mon Aug 18 09:40:19 2014 New Revision: 270131 URL: http://svnweb.freebsd.org/changeset/base/270131 Log: Import the tools used to convert the keymap files from SYSCONS (in locale dependent encoding) to NEWCONS (Unicode). The file "LANG.map" is used to convert INDEX.keymaps. It has 3 columns: - the language ID as used in the source file - the language ID to be used in the generated file (e.g. "iw" -> "he") - the encoding of the menu texts for this language The conversion result is written to STDOUT. The file "KBDFILES.map" is used to batch convert keymap files. It's columns are: - the encoding used for the keymap sounce file - the name of the source file - the name of the generated file The output files are created in the TEMP sub-directory of the vt keymap directory, in order to preserve (possibly uncommitted) keymap files in /usr/src/share/vt/keymaps. The convert-keymap.pl script can be directly executed by passing the source file name and the encoding on the command line. It writes to STDOUT and generates hex Unicode codepoints by default. (This can be changed to decimal in the script.) While written for the one-time conversion of the SYSCONS keymaps into the format required for NEWCONS, I think these tools may be useful for easy conversion of possible further SYSCONS keymap files, that have not been committed to the source tree. Added: head/tools/tools/vt/keymaps/ head/tools/tools/vt/keymaps/KBDFILES.map (contents, props changed) head/tools/tools/vt/keymaps/LANG.map (contents, props changed) head/tools/tools/vt/keymaps/convert-INDEX.pl (contents, props changed) head/tools/tools/vt/keymaps/convert-keymap.pl (contents, props changed) head/tools/tools/vt/keymaps/convert-keymaps.pl (contents, props changed) Added: head/tools/tools/vt/keymaps/KBDFILES.map ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/vt/keymaps/KBDFILES.map Mon Aug 18 09:40:19 2014 (r270131) @@ -0,0 +1,141 @@ +# $FreeBSD$ + +ISO8859-15 be.iso.kbd be.kbd +ISO8859-15 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-1 br275.iso.kbd br.kbd +ISO8859-1 br275.iso.acc.kbd br.acc.kbd +CP850 br275.cp850.kbd br.kbd.from-cp850 + +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 + +ISO8859-2 ce.iso2.kbd centraleuropean.kbd + +ISO8859-1 colemak.iso15.acc.kbd colemak.kbd + +ISO8859-2 cs.latin2.qwertz.kbd cz.kbd +ISO8859-2 cz.iso2.kbd cz.kbd.from-ce + +ISO8859-15 danish.iso.kbd dk.kbd +ISO8859-15 danish.iso.acc.kbd dk.acc.kbd +CP865 danish.cp865.kbd dk.kbd.from-cp865 +ISO8859-1 danish.iso.macbook.kbd dk.macbook.kbd + +ISO8859-1 dutch.iso.acc.kbd nl.kbd + +ISO8859-15 eee_nordic.kbd nordic.asus-eee.kbd + +ISO8859-7 el.iso07.kbd gr.kbd + +ISO8859-1 estonian.iso.kbd ee.kbd.from-iso1 +ISO8859-15 estonian.iso15.kbd ee.kbd +CP850 estonian.cp850.kbd ee.kbd.from-cp850 + +ISO8859-15 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-15 fr_CA.iso.acc.kbd ca-fr.kbd + +ISO8859-15 german.iso.kbd de.kbd +ISO8859-15 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 +ISO8859-7 gr.us101.acc.kbd gr.101.acc.kbd + +ISO8859-8 iw.iso8.kbd il.kbd + +ISO8859-2 hr.iso.kbd hr.kbd + +ISO8859-2 hu.iso2.101keys.kbd hu.101.kbd +ISO8859-2 hu.iso2.102keys.kbd hu.102.kbd + +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 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 + +PT154 kk.pt154.kst.kbd kz.kst.kbd +PT154 kk.pt154.io.kbd kz.io.kbd + +ISO8859-1 latinamerican.kbd latinamerican.kbd +ISO8859-1 latinamerican.iso.acc.kbd latinamerican.acc.kbd + +ISO8859-4 lt.iso4.kbd lt.kbd + +ISO8859-1 norwegian.iso.kbd no.kbd +ISO8859-1 norwegian.dvorak.kbd no.dvorak.kbd + +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 + +CP866 ru.cp866.kbd ru.kbd.from-cp866 +ISO8859-5 ru.iso5.kbd ru.kbd.from-iso5 +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-2 si.iso.kbd si.kbd + +ISO8859-2 sk.iso2.kbd sk.kbd + +ISO8859-1 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 +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 +CP850 swissgerman.cp850.kbd ch.kbd.from-cp850 +ISO8859-1 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 us.iso.kbd us.kbd +ISO8859-1 us.iso.acc.kbd us.acc.kbd +ISO8859-1 us.dvorak.kbd us.dvorak.kbd +ISO8859-1 us.dvorakr.kbd us.dvorakr.kbd +ISO8859-1 us.dvorakl.kbd us.dvorakl.kbd +ISO8859-1 us.dvorakp.kbd us.dvorakp.kbd +ISO8859-1 us.dvorakx.kbd us.dvorakx.kbd +ISO8859-1 us.emacs.kbd us.emacs.kbd +ISO8859-1 us.pc-ctrl.kbd us.ctrl.kbd +ISO8859-1 us.unix.kbd us.unix.kbd + +ISO8859-5 ua.iso5.kbd ua.kbd.from-iso5 +KOI8-U ua.koi8-u.kbd ua.kbd +KOI8-U ua.koi8-u.shift.alt.kbd ua.shift.alt.kbd Added: head/tools/tools/vt/keymaps/LANG.map ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/vt/keymaps/LANG.map Mon Aug 18 09:40:19 2014 (r270131) @@ -0,0 +1,29 @@ +# $FreeBSD$ +bg bg ISO8859-5 +cs cs ISO8859-2 +da da ISO8859-15 +de de ISO8859-15 +el el ISO8859-7 +en en ISO8859-1 +es es ISO8859-1 +fi fi ISO8859-1 +fr fr ISO8859-1 +hr hr ISO8859-2 +hu hu ISO8859-2 +hy hy ARMSCII-8 +is is ISO8859-1 +it it ISO8859-15 +iw he ISO8859-8 +ja ja ISO8859-1 +kk kk PT154 +nl nl ISO8859-15 +no no ISO8859-1 +pl pl ISO8859-2 +pt pt ISO8859-15 +ro ro ISO8859-1 +ru ru KOI8-R +sk sk ISO8859-2 +sl sl ISO8859-2 +sv sv ISO8859-1 +tr tr ISO8859-9 +uk uk KOI8-U Added: head/tools/tools/vt/keymaps/convert-INDEX.pl ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/vt/keymaps/convert-INDEX.pl Mon Aug 18 09:40:19 2014 (r270131) @@ -0,0 +1,94 @@ +#!/usr/local/bin/perl +# $FreeBSD$ + +use Text::Iconv; +use Encode; +use strict; +use utf8; + +# directories and filenames +$0 =~ m:^(.*)/:; +my $dir_convtool = $1 || "."; + +my $dir_keymaps_syscons = "/usr/src/share/syscons/keymaps"; +my $dir_keymaps_config = "$dir_convtool"; + +my $dir_keymaps_vt = "/usr/src/share/vt/keymaps"; +my $dir_keymaps_output = "$dir_keymaps_vt/OUTPUT"; + +my $keymap_index = "$dir_keymaps_syscons/INDEX.keymaps"; + +my $language_map = "$dir_keymaps_config/LANG.map"; +my $keymapfile_map = "$dir_keymaps_config/KBDFILES.map"; + +# global variables +my %LANG_NEW; # index: lang_old +my %ENCODING; # index: lang_old, file_old +my %FILE_NEW; # index: file_old + +# subroutines +sub local_to_UCS_string +{ + my ($string, $old_enc) = @_; + my $converter = Text::Iconv->new($old_enc, "UTF-8"); + my $result = $converter->convert($string); + printf "!!! conversion failed for '$string' ($old_enc)\n" + unless $result; + return $result; +} + +sub lang_fixup { + my ($langlist) = @_; + my $result; + my $lang; + for $lang (split(/,/, $langlist)) { + $result .= "," + if $result; + $result .= $LANG_NEW{$lang}; + } + return $result; +} + +# main program +open LANGMAP, "<$language_map" + or die "$!"; +while () { + next + if m/^#/; + my ($lang_old, $lang_new, $encoding) = split(" "); +# print "$lang_old|$lang_new|$encoding\n"; + $LANG_NEW{$lang_old} = $lang_new; + $ENCODING{$lang_old} = $encoding; + $ENCODING{$lang_new} = $encoding; +} +close LANGMAP; + +$FILE_NEW{"MENU"} = "MENU"; # dummy identity mapping +$FILE_NEW{"FONT"} = "FONT"; # dummy identity mapping +open FILEMAP, "<$keymapfile_map" + or die "$!"; +while () { + next + if m/^#/; + my ($encoding, $file_old, $file_new) = split(" "); +# print "--> ", join("|", $encoding, $file_old, $file_new, $file_locale), "\n"; + if ($encoding and $file_old and $file_new) { + $ENCODING{$file_old} = $encoding; + $FILE_NEW{$file_old} = $file_new; + } +} +close FILEMAP; + +open MENUFILE, "<$keymap_index" + or die "$!"; +while () { + if (m/^$/ or m/^#/) { + print; + } else { + my ($file_old, $langlist, $menutext) = split(/:/); + my ($lang) = split(/,/, $langlist); # first language in list selects encoding + $menutext = local_to_UCS_string($menutext, $ENCODING{$lang}) + unless $file_old eq "FONT"; + printf "%s:%s:%s", $FILE_NEW{$file_old}, lang_fixup($langlist), $menutext; + } +} Added: head/tools/tools/vt/keymaps/convert-keymap.pl ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/vt/keymaps/convert-keymap.pl Mon Aug 18 09:40:19 2014 (r270131) @@ -0,0 +1,106 @@ +#!/usr/bin/perl +# $FreeBSD$ + +use Text::Iconv; +use Encode; +use strict; +use utf8; + +die "Usage: $0 filename.kbd CHARSET" unless ($ARGV[1]); +my $converter = Text::Iconv->new($ARGV[1], "UTF-8"); + +sub local_to_UCS_string +{ + my ($string) = @_; + + return $converter->convert($string); +} + +sub prettyprint_token +{ + my ($code) = @_; + + 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; +} + +sub local_to_UCS_code +{ + my ($char) = @_; + + return prettyprint_token(ord(Encode::decode("UTF-8", local_to_UCS_string($char)))); +} + + +sub convert_token +{ + my ($C) = @_; + + return $1 + if $C =~ m/^([a-z][a-z0-9]*)$/; # key token + return local_to_UCS_code(chr($1)) + 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 +} + +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/([()])/ $1 /g; # insert blanks around remaining parentheses + my @KEYTOKEN = split (" ", $line); + grep(s/_spc_/' '/, @KEYTOKEN); + grep(s/_lpar_/'('/, @KEYTOKEN); + grep(s/_rpar_/')'/, @KEYTOKEN); + return @KEYTOKEN; +} + +# main program +open FH, "<$ARGV[0]"; +while () { + if (m/^#/) { + print local_to_UCS_string($_); + } elsif (m/^\s*$/) { + print "\n"; + } else { + my @KEYTOKEN = tokenize($_); + my $at_bol = 1; + my $C; + foreach $C (@KEYTOKEN) { + if ($at_bol) { + if ($C =~ m/^\s*\d/) { # line begins with key code number + 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: $_"; + } + $at_bol = 0; + } else { + if ($C =~ m/^([BCNO])$/) { + print " $1"; # special case: effect of Caps Lock/Num Lock + } elsif ($C eq "(") { + print " ( "; + } elsif ($C eq ")") { + print " )"; + } else { + printf "%-6s ", convert_token($C); + } + } + } + print "\n"; + } +} +close FH; Added: head/tools/tools/vt/keymaps/convert-keymaps.pl ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/vt/keymaps/convert-keymaps.pl Mon Aug 18 09:40:19 2014 (r270131) @@ -0,0 +1,99 @@ +#!/usr/local/bin/perl +# $FreeBSD$ + +use Text::Iconv; +use Encode; +use strict; +use utf8; + +# directories and filenames +$0 =~ m:^(.*)/:; +my $dir_convtool = $1 || "."; + +my $dir_keymaps_syscons = "/usr/src/share/syscons/keymaps"; +my $dir_keymaps_config = "$dir_convtool"; + +my $dir_keymaps_vt = "/usr/src/share/vt/keymaps"; +my $dir_keymaps_output = "$dir_keymaps_vt/OUTPUT"; + +my $keymap_index = "$dir_keymaps_syscons/INDEX.keymaps"; + +my $language_map = "$dir_keymaps_config/LANG.map"; +my $keymapfile_map = "$dir_keymaps_config/KBDFILES.map"; + +# global variables +my %LANG_NEW; # index: lang_old +my %ENCODING; # index: lang_old, file_old +my %FILE_NEW; # index: file_old + +# subroutines +sub local_to_UCS_string +{ + my ($string, $old_enc) = @_; + my $converter = Text::Iconv->new($old_enc, "UTF-8"); + my $result = $converter->convert($string); + printf "!!! conversion failed for '$string' ($old_enc)\n" + unless $result; + return $result; +} + +sub lang_fixup { + my ($langlist) = @_; + my $result; + my $lang; + for $lang (split(/,/, $langlist)) { + $result .= "," + if $result; + $result .= $LANG_NEW{$lang}; + } + return $result; +} + +# main program +open LANGMAP, "<$language_map" + or die "$!"; +while () { + next + if m/^#/; + my ($lang_old, $lang_new, $encoding) = split(" "); +# print "$lang_old|$lang_new|$encoding\n"; + $LANG_NEW{$lang_old} = $lang_new; + $ENCODING{$lang_old} = $encoding; + $ENCODING{$lang_new} = $encoding; +} +close LANGMAP; + +$FILE_NEW{"MENU"} = "MENU"; # dummy identity mapping +$FILE_NEW{"FONT"} = "FONT"; # dummy identity mapping +open FILEMAP, "<$keymapfile_map" + or die "$!"; +while () { + next + if m/^#/; + my ($encoding, $file_old, $file_new) = split(" "); +# print "--> ", join("|", $encoding, $file_old, $file_new, $file_locale), "\n"; + if ($encoding and $file_old and $file_new) { + $ENCODING{$file_old} = $encoding; + $FILE_NEW{$file_old} = $file_new; + } +} +close FILEMAP; + +my $kbdfile; +foreach $kbdfile (glob("$dir_keymaps_syscons/*.kbd")) { + my $basename; + ($basename = $kbdfile) =~ s:.*/::; + my $encoding = $ENCODING{$basename}; + 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"; + system "$cmdline"; + } else { + print "$kbdfile not found\n"; + } + } else { + print "Unknown input file: $basename\n"; + } +} From owner-svn-src-all@FreeBSD.ORG Mon Aug 18 10:38:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EECDA842; Mon, 18 Aug 2014 10:38:12 +0000 (UTC) Received: from mailout05.t-online.de (mailout05.t-online.de [194.25.134.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailout00.t-online.de", Issuer "TeleSec ServerPass DE-1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ACE0F363E; Mon, 18 Aug 2014 10:38:12 +0000 (UTC) Received: from fwd18.aul.t-online.de (fwd18.aul.t-online.de [172.20.26.244]) by mailout05.t-online.de (Postfix) with SMTP id EA6294A910; Mon, 18 Aug 2014 12:38:09 +0200 (CEST) Received: from [192.168.119.33] (Jr211eZCQh2yRfDTsWNWuTrQpUXbUXq4Iffn7e+UCfwNnebx4jyNCDTk1kO6ImpQJM@[84.154.101.219]) by fwd18.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1XJKKF-0JhkIK0; Mon, 18 Aug 2014 12:38:07 +0200 Message-ID: <53F1D78B.7070606@freebsd.org> Date: Mon, 18 Aug 2014 12:38:03 +0200 From: Stefan Esser User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Pedro Giffuni , Stefan Esser Subject: Re: svn commit: r270114 - head/share/vt/keymaps References: <201408171954.s7HJsLmX099240@svn.freebsd.org> <53F10E95.30108@freebsd.org> <53F11A04.504@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-ID: Jr211eZCQh2yRfDTsWNWuTrQpUXbUXq4Iffn7e+UCfwNnebx4jyNCDTk1kO6ImpQJM X-TOI-MSGID: fdb40e26-e7b7-4924-b24f-c1a95bcbbc05 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 10:38:13 -0000 Am 17.08.2014 um 23:40 schrieb Pedro Giffuni: > > Il giorno 17/ago/2014, alle ore 16:09, Stefan Esser > ha scritto: >> Therefore, what you'd name "es_LA" (or es-la) is now latinamerican >> (it could be "latinamerican-es" if you wanted to make the language >> visible in the name). The country comes first, and if there is no >> country code (e.g. because the keymap is used in many countries), >> a longer name is used. > > That would, IMHO, be fine. What I dislike is that all other files are using > two letter codes and meanwhile the latinamerican thing has the long > name :-P. Ahh, I see. Well, this long name is meant to stand out when looking at the keymap files. If you use kbdmap to select a keymap, then it does not matter how long the name is. And if you select the file by name from within the keymaps directory, then a short name could easily be overlooked. And se-la would mean "Spain using the latinamerican language" ;-) since the first part is the country, not the language. But you are not suffering alone: there is "centraleuropean.iso", too. > FWIW, I tried to change that in syscons but the reduced nomenclature > came too late and changing names caused too much trouble in > sysinstall.. I thought it was a good time since nearly all files needed to change anyway, because of the removal of the encoding from the names. Names in syscons are probably encoded in lots of rc.conf files, and changing them might have been a big POLA. one thing that I'm thinking about is whether we should have an optional keymap_sc and keymap_vt in rc.conf, which allows to have different keymap files when running under SYSCONS vs. NEWCONS. This would be easy to implement, with keymap still being used, unless the more specific variable for the console driver used has an override. I think I'll just implement this for -CURRENT and wait for opinions, whether this should be merged to -STABLE ... Best regards, Stefan From owner-svn-src-all@FreeBSD.ORG Mon Aug 18 12:29:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB0462D8; Mon, 18 Aug 2014 12:29:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C656E328B; Mon, 18 Aug 2014 12:29:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7ICTSbw049536; Mon, 18 Aug 2014 12:29:28 GMT (envelope-from gabor@FreeBSD.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7ICTS9M049535; Mon, 18 Aug 2014 12:29:28 GMT (envelope-from gabor@FreeBSD.org) Message-Id: <201408181229.s7ICTS9M049535@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gabor set sender to gabor@FreeBSD.org using -f From: Gabor Kovesdan Date: Mon, 18 Aug 2014 12:29:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270132 - head/usr.bin/grep X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 12:29:29 -0000 Author: gabor Date: Mon Aug 18 12:29:28 2014 New Revision: 270132 URL: http://svnweb.freebsd.org/changeset/base/270132 Log: - Do not look for more matching lines if -L is specified Submitted by: eadler (based on) MFC after: 2 weeks Modified: head/usr.bin/grep/util.c Modified: head/usr.bin/grep/util.c ============================================================================== --- head/usr.bin/grep/util.c Mon Aug 18 09:40:19 2014 (r270131) +++ head/usr.bin/grep/util.c Mon Aug 18 12:29:28 2014 (r270132) @@ -336,7 +336,7 @@ procline(struct str *l, int nottext) } /* One pass if we are not recording matches */ - if (!wflag && ((color == NULL && !oflag) || qflag || lflag)) + if (!wflag && ((color == NULL && !oflag) || qflag || lflag || Lflag)) break; if (st == (size_t)pmatch.rm_so) From owner-svn-src-all@FreeBSD.ORG Mon Aug 18 14:23:08 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17187E9F; Mon, 18 Aug 2014 14:23:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 01EB83D9C; Mon, 18 Aug 2014 14:23:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7IEN7aG006315; Mon, 18 Aug 2014 14:23:07 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7IEN7Bb006314; Mon, 18 Aug 2014 14:23:07 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201408181423.s7IEN7Bb006314@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 18 Aug 2014 14:23:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270133 - head/lib/libusb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 14:23:08 -0000 Author: hselasky Date: Mon Aug 18 14:23:07 2014 New Revision: 270133 URL: http://svnweb.freebsd.org/changeset/base/270133 Log: Add more USB class codes. Obtained from: libusb project at SourceForge MFC after: 1 week Modified: head/lib/libusb/libusb.h Modified: head/lib/libusb/libusb.h ============================================================================== --- head/lib/libusb/libusb.h Mon Aug 18 12:29:28 2014 (r270132) +++ head/lib/libusb/libusb.h Mon Aug 18 14:23:07 2014 (r270133) @@ -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 owner-svn-src-all@FreeBSD.ORG Mon Aug 18 14:30:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7C9B6381; Mon, 18 Aug 2014 14:30:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6719D3E46; Mon, 18 Aug 2014 14:30:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7IEUiJw007912; Mon, 18 Aug 2014 14:30:44 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7IEUiEV007911; Mon, 18 Aug 2014 14:30:44 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201408181430.s7IEUiEV007911@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 18 Aug 2014 14:30:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270134 - head/sys/dev/sound/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 14:30:44 -0000 Author: hselasky Date: Mon Aug 18 14:30:43 2014 New Revision: 270134 URL: http://svnweb.freebsd.org/changeset/base/270134 Log: 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 MFC after: 1 week Modified: head/sys/dev/sound/usb/uaudio.c Modified: head/sys/dev/sound/usb/uaudio.c ============================================================================== --- head/sys/dev/sound/usb/uaudio.c Mon Aug 18 14:23:07 2014 (r270133) +++ head/sys/dev/sound/usb/uaudio.c Mon Aug 18 14:30:43 2014 (r270134) @@ -1659,21 +1659,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)) { @@ -1720,7 +1709,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 owner-svn-src-all@FreeBSD.ORG Mon Aug 18 14:35:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B719A7A0 for ; Mon, 18 Aug 2014 14:35:45 +0000 (UTC) Received: from nm13-vm0.bullet.mail.bf1.yahoo.com (nm13-vm0.bullet.mail.bf1.yahoo.com [98.139.213.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 578C53F25 for ; Mon, 18 Aug 2014 14:35:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1408372537; bh=97mzz0m5lHu07LKnOpbqqCE5WbJFF3bW+s5zpM1GKzY=; h=Received:Received:Received:X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc:Content-Transfer-Encoding:Message-Id:References:To:X-Mailer; b=L2RoKbYYIxeOEfFXdvRPMHn6PNjk0rVtU1ikAPVsJapBeHxPnDGmpzsPGgCDoKIimD0zLpGr8LJ/ReyKV1T7pV13xeMxxd4IiBM18cC1as8fF1usfdgVK0Aphljnjhunc/EamvxpQ6p7D64Py6tH6U718OnumydYO5cpHaUpdnQqF02bNNBAFskJx/6b8j9F8TlUhXjmXgHtbBVh4zPsQ0XJ3EMhSstRgXrtVYpiyoss8yVrqlGAftaxin3QXZ6sFvH6CxoDRqF3fjR31IHNIdq9BfYANjo85V/LXMVMa7Y9CWDPck6Kgsra06C7+NlB8B5tXQhmm6PXgENeeDInbg== DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s2048; d=yahoo.com; b=hDk/GUZ03CufddwHnVmAtr8KR4pab8F5yGdDRT1yJASgOkCWrC85V6glCYfSxIOhQ3KQ++ChJaGOe9JTHKB0RzUnm2brNISEGzjwXtuC/8kRlYyRH8GP2XGha4Ipn8W3vNn0BemWdAihQborJG0iqC8znFwBim6+S7yeqgfBiOG+hKlB2xLrSrMg1YHifVDWX7Qv3j6B9B1yroSuRxo94bb6Ks9s/ch7u+r8ySgtQeaStXw0y48KGvoDDqIUBckcPURbhIyxl07vJ7VTfIKKz2mIB7iImxEJ5bAd+nMQ4LD9tckGSNRQXcxOjhiJwe1CenlSGOneBvquLk4/qWBIiQ==; Received: from [98.139.214.32] by nm13.bullet.mail.bf1.yahoo.com with NNFMP; 18 Aug 2014 14:35:37 -0000 Received: from [98.139.211.201] by tm15.bullet.mail.bf1.yahoo.com with NNFMP; 18 Aug 2014 14:35:37 -0000 Received: from [127.0.0.1] by smtp210.mail.bf1.yahoo.com with NNFMP; 18 Aug 2014 14:35:37 -0000 X-Yahoo-Newman-Id: 459201.79027.bm@smtp210.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: evfLblIVM1kwLmzrZQdLx74z_HKnqVieadl7wAJ0..WuSMs jzSSqyuwGfpSktgEx0d5uIwMZ.u.oWBGjXMO_2ydcRA3rZkdZPeylYifhtzY qn6Z91ghYF4SWPwEucZJMFS_2wYAn36DmGd3whI8QWWyxspQpskvPH2X3_XY FpycSMiW2VLXEwEf1OBN3dlxQMZ7Sr.hjuPfXegUC4dL7dwKupvG_Gh97g3N 5zbb3Ed1F9s.fdVDemzz5RmQMI62XIr1FzkfCnoz6rhpoOQMvAHxhUoDGOky RZUSwxtxSFUSVLLxGZ_lwaKxcqL.bjUBRVYyWsIYduo5sNP3oe4JgZH1AsG6 F85HeV9bI74Pm8zX_cm0V3kzmtB7gdL7UI.ZW.OVPAR7KHr9TagaGwaisftC O1ypr1rBFrk2svWnEXcZP0dObFS7MoFlxSN5YSYaBaGNNvIcxW5Ptr1BVVH5 iJ4mK6cN2SRPcR6jLhA0K7AevCrDg1dp490OSVWudqy70GHzmFLXc1XrFTZs AdgBNrpu7yyMLc7YDsWQydi4OhAo- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r270114 - head/share/vt/keymaps From: Pedro Giffuni In-Reply-To: <53F1D78B.7070606@freebsd.org> Date: Mon, 18 Aug 2014 09:35:32 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <16F39FE4-93FE-4C43-AE3F-88DDC34A8796@freebsd.org> References: <201408171954.s7HJsLmX099240@svn.freebsd.org> <53F10E95.30108@freebsd.org> <53F11A04.504@freebsd.org> <53F1D78B.7070606@freebsd.org> To: Stefan Esser X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Stefan Esser X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 14:35:45 -0000 Il giorno 18/ago/2014, alle ore 05:38, Stefan Esser ha = scritto: > Am 17.08.2014 um 23:40 schrieb Pedro Giffuni: >>=20 >> Il giorno 17/ago/2014, alle ore 16:09, Stefan Esser > > ha scritto: >>> Therefore, what you'd name "es_LA" (or es-la) is now latinamerican >>> (it could be "latinamerican-es" if you wanted to make the language >>> visible in the name). The country comes first, and if there is no >>> country code (e.g. because the keymap is used in many countries), >>> a longer name is used. >>=20 >> That would, IMHO, be fine. What I dislike is that all other files are = using >> two letter codes and meanwhile the latinamerican thing has the long >> name :-P. >=20 > Ahh, I see. Well, this long name is meant to stand out when looking at > the keymap files. If you use kbdmap to select a keymap, then it does > not matter how long the name is. And if you select the file by name > from within the keymaps directory, then a short name could easily be > overlooked. >=20 > And se-la would mean "Spain using the latinamerican language" ;-) > since the first part is the country, not the language. >=20 I should have been clearer: I meant la-es would be fine. > But you are not suffering alone: there is "centraleuropean.iso", too. >=20 Funny thing is almost all latin-american countries speak Spanish but in = Spain there is Catalan and other languages as well so when looking at the = directories (ls -la) the keyboards will look unordered. Sorting the keyboards by = language would be more natural, but I guess that as an exercise for the = installer. >> FWIW, I tried to change that in syscons but the reduced nomenclature >> came too late and changing names caused too much trouble in >> sysinstall.. >=20 > I thought it was a good time since nearly all files needed to change > anyway, because of the removal of the encoding from the names. >=20 > Names in syscons are probably encoded in lots of rc.conf files, and > changing them might have been a big POLA. >=20 Yes, we renamed the latin-american keyboard once (before I was a = commiter) and the related bug report remained open for some years. Pedro. > one thing that I'm thinking about is whether we should have an > optional keymap_sc and keymap_vt in rc.conf, which allows to have > different keymap files when running under SYSCONS vs. NEWCONS. >=20 > This would be easy to implement, with keymap still being used, > unless the more specific variable for the console driver used has > an override. >=20 > I think I'll just implement this for -CURRENT and wait for opinions, > whether this should be merged to -STABLE ... >=20 > Best regards, Stefan From owner-svn-src-all@FreeBSD.ORG Mon Aug 18 14:47:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 92A03B02; Mon, 18 Aug 2014 14:47:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63A0C3031; Mon, 18 Aug 2014 14:47:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7IElEsL016049; Mon, 18 Aug 2014 14:47:14 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7IElElw016048; Mon, 18 Aug 2014 14:47:14 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408181447.s7IElElw016048@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 18 Aug 2014 14:47:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270135 - head/share/examples/autofs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 14:47:14 -0000 Author: trasz Date: Mon Aug 18 14:47:13 2014 New Revision: 270135 URL: http://svnweb.freebsd.org/changeset/base/270135 Log: Remove vestiges of previous autofs. Discussed with: alfred@ MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Deleted: head/share/examples/autofs/ From owner-svn-src-all@FreeBSD.ORG Mon Aug 18 15:54:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7847DCD9; Mon, 18 Aug 2014 15:54:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5797F369C; Mon, 18 Aug 2014 15:54:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7IFsal5048878; Mon, 18 Aug 2014 15:54:36 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7IFsZOl048875; Mon, 18 Aug 2014 15:54:35 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201408181554.s7IFsZOl048875@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 18 Aug 2014 15:54:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270136 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 15:54:36 -0000 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 owner-svn-src-all@FreeBSD.ORG Mon Aug 18 16:06:05 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C01CA312; Mon, 18 Aug 2014 16:06:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA38A379F; Mon, 18 Aug 2014 16:06:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7IG650H054225; Mon, 18 Aug 2014 16:06:05 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7IG64eD054219; Mon, 18 Aug 2014 16:06:04 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201408181606.s7IG64eD054219@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 18 Aug 2014 16:06:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270137 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 16:06:06 -0000 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 owner-svn-src-all@FreeBSD.ORG Mon Aug 18 17:10:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA85050F; Mon, 18 Aug 2014 17:10:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB6FA3DA9; Mon, 18 Aug 2014 17:10:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7IHAu3l085386; Mon, 18 Aug 2014 17:10:56 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7IHAu3R085383; Mon, 18 Aug 2014 17:10:56 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201408181710.s7IHAu3R085383@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 18 Aug 2014 17:10:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270142 - head/share/vt/keymaps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 17:10:57 -0000 Author: emaste Date: Mon Aug 18 17:10:55 2014 New Revision: 270142 URL: http://svnweb.freebsd.org/changeset/base/270142 Log: Add Canadian Bilingual keyboard Added: head/share/vt/keymaps/ca.kbd (contents, props changed) Modified: head/share/vt/keymaps/INDEX.keymaps head/share/vt/keymaps/Makefile Modified: head/share/vt/keymaps/INDEX.keymaps ============================================================================== --- head/share/vt/keymaps/INDEX.keymaps Mon Aug 18 17:08:11 2014 (r270141) +++ head/share/vt/keymaps/INDEX.keymaps Mon Aug 18 17:10:55 2014 (r270142) @@ -200,6 +200,8 @@ 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: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) Modified: head/share/vt/keymaps/Makefile ============================================================================== --- head/share/vt/keymaps/Makefile Mon Aug 18 17:08:11 2014 (r270141) +++ head/share/vt/keymaps/Makefile Mon Aug 18 17:10:55 2014 (r270142) @@ -6,6 +6,7 @@ FILES= INDEX.keymaps \ bg.bds.kbd \ br.acc.kbd \ br.kbd \ + ca.kbd \ ca-fr.kbd \ centraleuropean.kbd \ ch-fr.acc.kbd \ Added: head/share/vt/keymaps/ca.kbd ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/vt/keymaps/ca.kbd Mon Aug 18 17:10:55 2014 (r270142) @@ -0,0 +1,139 @@ +# Canadian Bilingual keyboard +# +# $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 0xb1 '!' nop nop O + 003 '2' '@' nul nul '@' '"' nul nul O + 004 '3' '#' nop nop 0xa3 '/' nop nop O + 005 '4' '$' nop nop 0xa2 '$' nop nop O + 006 '5' '%' nop nop 0xa4 '%' nop nop O + 007 '6' '^' nop nop 0xac '?' nop nop O + 008 '7' '&' nop nop '|' '&' nop nop O + 009 '8' '*' nop nop 0xb2 '*' nop nop O + 010 '9' '(' nop nop 0xb3 '(' nop nop O + 011 '0' ')' nop nop 0xbc ')' nop nop O + 012 '-' '_' nop nop 0xbd '_' nop nop O + 013 '=' '+' nop nop 0xbe '+' 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 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 + 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 0xa7 'O' si si C + 025 'p' 'P' dle dle 0xb6 'P' dle dle C + 026 '[' '{' nop nop dcir dcir nop nop O + 027 ']' '}' nop nop dced duml 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 dgra dgra nop nop O + 041 0x60 0x7e nop nop 0x60 0x7e nop nop O + 042 lshift lshift lshift lshift lshift lshift lshift lshift O + 043 '\' '|' fs fs '<' '>' nop nop O + 044 'z' 'Z' sub sub 'z' 'Z' sub sub C + 045 'x' 'X' can can 'x' 'X' can can C + 046 'c' 'C' etx etx 'c' 'C' etx etx C + 047 'v' 'V' syn syn 'v' 'V' syn syn C + 048 'b' 'B' stx stx 'b' 'B' stx stx C + 049 'n' 'N' so so 'n' 'N' so so C + 050 'm' 'M' cr cr 'm' 'M' cr cr C + 051 ',' 0x3c nop nop 0x3c ''' nop nop O + 052 '.' 0x3e nop nop 0x3e '.' nop nop O + 053 '/' '?' nop nop dacu 0xc9 nop nop C + 054 rshift rshift rshift rshift rshift rshift rshift rshift O + 055 '*' '*' '*' '*' '*' '*' '*' '*' O + 056 lalt lalt lalt lalt lalt lalt lalt lalt O + 057 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O + 058 clock clock clock clock clock clock clock clock O + 059 fkey01 fkey13 fkey25 fkey37 scr01 scr11 scr01 scr11 O + 060 fkey02 fkey14 fkey26 fkey38 scr02 scr12 scr02 scr12 O + 061 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O + 062 fkey04 fkey16 fkey28 fkey40 scr04 scr14 scr04 scr14 O + 063 fkey05 fkey17 fkey29 fkey41 scr05 scr15 scr05 scr15 O + 064 fkey06 fkey18 fkey30 fkey42 scr06 scr16 scr06 scr16 O + 065 fkey07 fkey19 fkey31 fkey43 scr07 scr07 scr07 scr07 O + 066 fkey08 fkey20 fkey32 fkey44 scr08 scr08 scr08 scr08 O + 067 fkey09 fkey21 fkey33 fkey45 scr09 scr09 scr09 scr09 O + 068 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O + 069 nlock nlock nlock nlock nlock nlock nlock nlock O + 070 slock slock slock slock slock slock slock slock O + 071 fkey49 '7' '7' '7' '7' '7' '7' '7' N + 072 fkey50 '8' '8' '8' '8' '8' '8' '8' N + 073 fkey51 '9' '9' '9' '9' '9' '9' '9' N + 074 fkey52 '-' '-' '-' '-' '-' '-' '-' N + 075 fkey53 '4' '4' '4' '4' '4' '4' '4' N + 076 fkey54 '5' '5' '5' '5' '5' '5' '5' N + 077 fkey55 '6' '6' '6' '6' '6' '6' '6' N + 078 fkey56 '+' '+' '+' '+' '+' '+' '+' N + 079 fkey57 '1' '1' '1' '1' '1' '1' '1' N + 080 fkey58 '2' '2' '2' '2' '2' '2' '2' N + 081 fkey59 '3' '3' '3' '3' '3' '3' '3' N + 082 fkey60 '0' '0' '0' '0' '0' '0' '0' N + 083 del '.' '.' '.' '.' '.' boot boot N + 084 nop nop nop nop nop nop nop nop O + 085 nop nop nop nop nop nop nop nop O + 086 '\' '|' nop nop 0xab 0xbb nop nop O + 087 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O + 088 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O + 089 cr cr nl nl cr cr nl nl O + 090 rctrl rctrl rctrl rctrl rctrl rctrl rctrl rctrl O + 091 '/' '/' '/' '/' '/' '/' '/' '/' O + 092 nscr 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 + + dgra '`' ( 'a' 0xe0 ) ( 'A' 0xc0 ) ( 'e' 0xe8 ) ( 'E' 0xc8 ) + ( 'i' 0xec ) ( 'I' 0xcc ) ( 'o' 0xf2 ) ( 'O' 0xd2 ) + ( 'u' 0xf9 ) ( 'U' 0xd9 ) + + dacu 0xb4 ( 'a' 0xe1 ) ( 'A' 0xc1 ) ( 'e' 0xe9 ) ( 'E' 0xc9 ) + ( 'i' 0xed ) ( 'I' 0xcd ) ( 'o' 0xf3 ) ( 'O' 0xd3 ) + ( 'u' 0xfa ) ( 'U' 0xda ) ( 'y' 0xfd ) ( 'Y' 0xdd ) + + dcir '^' ( 'a' 0xe2 ) ( 'A' 0xc2 ) ( 'e' 0xea ) ( 'E' 0xca ) + ( 'i' 0xee ) ( 'I' 0xce ) ( 'o' 0xf4 ) ( 'O' 0xd4 ) + ( 'u' 0xfb ) ( 'U' 0xdb ) + + dtil '~' ( 'a' 0xe3 ) ( 'A' 0xc3 ) ( 'n' 0xf1 ) ( 'N' 0xd1 ) + ( 'o' 0xf5 ) ( 'O' 0xd5 ) + + duml 0xa8 ( 'a' 0xe4 ) ( 'A' 0xc4 ) ( 'e' 0xeb ) ( 'E' 0xcb ) + ( 'i' 0xef ) ( 'I' 0xcf ) ( 'o' 0xf6 ) ( 'O' 0xd6 ) + ( 'u' 0xfc ) ( 'U' 0xdc ) ( 'y' 0xff ) + + drin 0xb0 ( 'a' 0xe5 ) ( 'A' 0xc5 ) + + dced 0xb8 ( 'c' 0xe7 ) ( 'C' 0xc7 ) From owner-svn-src-all@FreeBSD.ORG Mon Aug 18 17:35:40 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 18D4CDAA; Mon, 18 Aug 2014 17:35:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 04C4B3FDA; Mon, 18 Aug 2014 17:35:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7IHZdI4096148; Mon, 18 Aug 2014 17:35:39 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7IHZdbB096147; Mon, 18 Aug 2014 17:35:39 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201408181735.s7IHZdbB096147@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 18 Aug 2014 17:35:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270144 - head/lib/libcrypt/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 17:35:40 -0000 Author: ngie Date: Mon Aug 18 17:35:39 2014 New Revision: 270144 URL: http://svnweb.freebsd.org/changeset/base/270144 Log: 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 MFC after: 5 days Modified: head/lib/libcrypt/tests/Makefile Modified: head/lib/libcrypt/tests/Makefile ============================================================================== --- head/lib/libcrypt/tests/Makefile Mon Aug 18 17:35:33 2014 (r270143) +++ head/lib/libcrypt/tests/Makefile Mon Aug 18 17:35:39 2014 (r270144) @@ -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 owner-svn-src-all@FreeBSD.ORG Mon Aug 18 17:38:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0DA5106; Mon, 18 Aug 2014 17:38:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C9DB301C; Mon, 18 Aug 2014 17:38:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7IHcoVS096587; Mon, 18 Aug 2014 17:38:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7IHcoaE096586; Mon, 18 Aug 2014 17:38:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201408181738.s7IHcoaE096586@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 18 Aug 2014 17:38:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270145 - head/lib/clang X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 17:38:50 -0000 Author: ngie Date: Mon Aug 18 17:38:50 2014 New Revision: 270145 URL: http://svnweb.freebsd.org/changeset/base/270145 Log: Replace DPADD with DPSRCS to fix "make checkdpadd" Phabric: D625 Approved by: jmmv (mentor) Reviewed by: dim PR: 192734 MFC after: 2 weeks Modified: head/lib/clang/clang.build.mk Modified: head/lib/clang/clang.build.mk ============================================================================== --- head/lib/clang/clang.build.mk Mon Aug 18 17:35:39 2014 (r270144) +++ head/lib/clang/clang.build.mk Mon Aug 18 17:38:50 2014 (r270145) @@ -237,5 +237,5 @@ Checkers.inc.h: ${CLANG_SRCS}/lib/Static .endfor SRCS+= ${TGHDRS:C/$/.inc.h/} -DPADD+= ${TGHDRS:C/$/.inc.h/} +DPSRCS+= ${TGHDRS:C/$/.inc.h/} CLEANFILES+= ${TGHDRS:C/$/.inc.h/} ${TGHDRS:C/$/.inc.d/} From owner-svn-src-all@FreeBSD.ORG Mon Aug 18 18:01:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1393908; Mon, 18 Aug 2014 18:01:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC72B324F; Mon, 18 Aug 2014 18:01:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7II1ILd007425; Mon, 18 Aug 2014 18:01:18 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7II1IrE007423; Mon, 18 Aug 2014 18:01:18 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201408181801.s7II1IrE007423@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 18 Aug 2014 18:01:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270146 - head/usr.sbin/iscsid X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 18:01:19 -0000 Author: ngie Date: Mon Aug 18 18:01:18 2014 New Revision: 270146 URL: http://svnweb.freebsd.org/changeset/base/270146 Log: Add LIBCRYPTO and LIBSSL to DPADD This fixes "make checkdpadd" Phabric: D621 PR: 192761 Approved by: rpaulo (mentor) MFC after: 2 weeks Modified: head/usr.sbin/iscsid/Makefile Modified: head/usr.sbin/iscsid/Makefile ============================================================================== --- head/usr.sbin/iscsid/Makefile Mon Aug 18 17:38:50 2014 (r270145) +++ head/usr.sbin/iscsid/Makefile Mon Aug 18 18:01:18 2014 (r270146) @@ -8,7 +8,7 @@ CFLAGS+= -I${.CURDIR}/../../sys/dev/iscs #CFLAGS+= -DICL_KERNEL_PROXY MAN= iscsid.8 -DPADD= ${LIBUTIL} +DPADD= ${LIBCRYPTO} ${LIBSSL} ${LIBUTIL} LDADD= -lcrypto -lssl -lutil WARNS= 6 From owner-svn-src-all@FreeBSD.ORG Mon Aug 18 18:05:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A9DCE2A; Mon, 18 Aug 2014 18:05:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 231DB3357; Mon, 18 Aug 2014 18:05:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7II5wXN010433; Mon, 18 Aug 2014 18:05:58 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7II5tJo010416; Mon, 18 Aug 2014 18:05:55 GMT (envelope-from rdivacky@FreeBSD.org) Message-Id: <201408181805.s7II5tJo010416@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rdivacky set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky Date: Mon, 18 Aug 2014 18:05:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270147 - in head/contrib/llvm: include/llvm/Support lib/Object lib/Target/PowerPC lib/Target/PowerPC/InstPrinter lib/Target/PowerPC/MCTargetDesc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 18:05:58 -0000 Author: rdivacky Date: Mon Aug 18 18:05:55 2014 New Revision: 270147 URL: http://svnweb.freebsd.org/changeset/base/270147 Log: Backport r197824, r213427 and r213960 from LLVM trunk: r197824 | rdivacky | 2013-12-20 19:08:54 +0100 (Fri, 20 Dec 2013) | 2 lines Implement initial-exec TLS for PPC32. r213427 | hfinkel | 2014-07-19 01:29:49 +0200 (Sat, 19 Jul 2014) | 7 lines [PowerPC] 32-bit ELF PIC support This adds initial support for PPC32 ELF PIC (Position Independent Code; the -fPIC variety), thus rectifying a long-standing deficiency in the PowerPC backend. Patch by Justin Hibbits! r213960 | hfinkel | 2014-07-25 19:47:22 +0200 (Fri, 25 Jul 2014) | 3 lines [PowerPC] Support TLS on PPC32/ELF Patch by Justin Hibbits! Reviewed by: jhibbits Approved by: dim Modified: head/contrib/llvm/include/llvm/Support/ELF.h head/contrib/llvm/lib/Object/ELF.cpp head/contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp head/contrib/llvm/lib/Target/PowerPC/PPC.h head/contrib/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp head/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp head/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.h head/contrib/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp head/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp head/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.h head/contrib/llvm/lib/Target/PowerPC/PPCInstr64Bit.td head/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.td head/contrib/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp head/contrib/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.cpp head/contrib/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h head/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp head/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.h Modified: head/contrib/llvm/include/llvm/Support/ELF.h ============================================================================== --- head/contrib/llvm/include/llvm/Support/ELF.h Mon Aug 18 18:01:18 2014 (r270146) +++ head/contrib/llvm/include/llvm/Support/ELF.h Mon Aug 18 18:05:55 2014 (r270147) @@ -437,6 +437,7 @@ enum { R_PPC_GOT16_LO = 15, R_PPC_GOT16_HI = 16, R_PPC_GOT16_HA = 17, + R_PPC_PLTREL24 = 18, R_PPC_REL32 = 26, R_PPC_TLS = 67, R_PPC_DTPMOD32 = 68, Modified: head/contrib/llvm/lib/Object/ELF.cpp ============================================================================== --- head/contrib/llvm/lib/Object/ELF.cpp Mon Aug 18 18:01:18 2014 (r270146) +++ head/contrib/llvm/lib/Object/ELF.cpp Mon Aug 18 18:05:55 2014 (r270147) @@ -507,6 +507,7 @@ StringRef getELFRelocationTypeName(uint3 LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT16_LO); LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT16_HI); LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT16_HA); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_PLTREL24); LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_REL32); LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_TLS); LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_DTPMOD32); Modified: head/contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp ============================================================================== --- head/contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp Mon Aug 18 18:01:18 2014 (r270146) +++ head/contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp Mon Aug 18 18:05:55 2014 (r270147) @@ -18,6 +18,7 @@ #include "llvm/MC/MCExpr.h" #include "llvm/MC/MCInst.h" #include "llvm/MC/MCInstrInfo.h" +#include "llvm/MC/MCSymbol.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Target/TargetOpcodes.h" @@ -294,10 +295,16 @@ void PPCInstPrinter::printMemRegReg(cons void PPCInstPrinter::printTLSCall(const MCInst *MI, unsigned OpNo, raw_ostream &O) { - printBranchOperand(MI, OpNo, O); + // On PPC64, VariantKind is VK_None, but on PPC32, it's VK_PLT, and it must + // come at the _end_ of the expression. + const MCOperand &Op = MI->getOperand(OpNo); + const MCSymbolRefExpr &refExp = cast(*Op.getExpr()); + O << refExp.getSymbol().getName(); O << '('; printOperand(MI, OpNo+1, O); O << ')'; + if (refExp.getKind() != MCSymbolRefExpr::VK_None) + O << '@' << MCSymbolRefExpr::getVariantKindName(refExp.getKind()); } Modified: head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp ============================================================================== --- head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp Mon Aug 18 18:01:18 2014 (r270146) +++ head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp Mon Aug 18 18:05:55 2014 (r270147) @@ -64,7 +64,15 @@ unsigned PPCELFObjectWriter::getRelocTyp llvm_unreachable("Unimplemented"); case PPC::fixup_ppc_br24: case PPC::fixup_ppc_br24abs: - Type = ELF::R_PPC_REL24; + switch (Modifier) { + default: llvm_unreachable("Unsupported Modifier"); + case MCSymbolRefExpr::VK_None: + Type = ELF::R_PPC_REL24; + break; + case MCSymbolRefExpr::VK_PLT: + Type = ELF::R_PPC_PLTREL24; + break; + } break; case PPC::fixup_ppc_brcond14: case PPC::fixup_ppc_brcond14abs: @@ -205,7 +213,10 @@ unsigned PPCELFObjectWriter::getRelocTyp Type = ELF::R_PPC64_DTPREL16_HIGHESTA; break; case MCSymbolRefExpr::VK_PPC_GOT_TLSGD: - Type = ELF::R_PPC64_GOT_TLSGD16; + if (is64Bit()) + Type = ELF::R_PPC64_GOT_TLSGD16; + else + Type = ELF::R_PPC_GOT_TLSGD16; break; case MCSymbolRefExpr::VK_PPC_GOT_TLSGD_LO: Type = ELF::R_PPC64_GOT_TLSGD16_LO; @@ -217,7 +228,10 @@ unsigned PPCELFObjectWriter::getRelocTyp Type = ELF::R_PPC64_GOT_TLSGD16_HA; break; case MCSymbolRefExpr::VK_PPC_GOT_TLSLD: - Type = ELF::R_PPC64_GOT_TLSLD16; + if (is64Bit()) + Type = ELF::R_PPC64_GOT_TLSLD16; + else + Type = ELF::R_PPC_GOT_TLSLD16; break; case MCSymbolRefExpr::VK_PPC_GOT_TLSLD_LO: Type = ELF::R_PPC64_GOT_TLSLD16_LO; @@ -313,13 +327,22 @@ unsigned PPCELFObjectWriter::getRelocTyp switch (Modifier) { default: llvm_unreachable("Unsupported Modifier"); case MCSymbolRefExpr::VK_PPC_TLSGD: - Type = ELF::R_PPC64_TLSGD; + if (is64Bit()) + Type = ELF::R_PPC64_TLSGD; + else + Type = ELF::R_PPC_TLSGD; break; case MCSymbolRefExpr::VK_PPC_TLSLD: - Type = ELF::R_PPC64_TLSLD; + if (is64Bit()) + Type = ELF::R_PPC64_TLSLD; + else + Type = ELF::R_PPC_TLSLD; break; case MCSymbolRefExpr::VK_PPC_TLS: - Type = ELF::R_PPC64_TLS; + if (is64Bit()) + Type = ELF::R_PPC64_TLS; + else + Type = ELF::R_PPC_TLS; break; } break; Modified: head/contrib/llvm/lib/Target/PowerPC/PPC.h ============================================================================== --- head/contrib/llvm/lib/Target/PowerPC/PPC.h Mon Aug 18 18:01:18 2014 (r270146) +++ head/contrib/llvm/lib/Target/PowerPC/PPC.h Mon Aug 18 18:05:55 2014 (r270147) @@ -53,10 +53,11 @@ namespace llvm { // PPC Specific MachineOperand flags. MO_NO_FLAG, - /// MO_DARWIN_STUB - On a symbol operand "FOO", this indicates that the - /// reference is actually to the "FOO$stub" symbol. This is used for calls - /// and jumps to external functions on Tiger and earlier. - MO_DARWIN_STUB = 1, + /// MO_PLT_OR_STUB - On a symbol operand "FOO", this indicates that the + /// reference is actually to the "FOO$stub" or "FOO@plt" symbol. This is + /// used for calls and jumps to external functions on Tiger and earlier, and + /// for PIC calls on Linux and ELF systems. + MO_PLT_OR_STUB = 1, /// MO_PIC_FLAG - If this bit is set, the symbol reference is relative to /// the function's picbase, e.g. lo16(symbol-picbase). Modified: head/contrib/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp ============================================================================== --- head/contrib/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp Mon Aug 18 18:01:18 2014 (r270146) +++ head/contrib/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp Mon Aug 18 18:05:55 2014 (r270147) @@ -19,6 +19,7 @@ #define DEBUG_TYPE "asmprinter" #include "PPC.h" #include "InstPrinter/PPCInstPrinter.h" +#include "PPCMachineFunctionInfo.h" #include "MCTargetDesc/PPCPredicates.h" #include "MCTargetDesc/PPCMCExpr.h" #include "PPCSubtarget.h" @@ -29,6 +30,7 @@ #include "llvm/ADT/StringExtras.h" #include "llvm/Assembly/Writer.h" #include "llvm/CodeGen/AsmPrinter.h" +#include "llvm/CodeGen/MachineConstantPool.h" #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineInstr.h" #include "llvm/CodeGen/MachineInstrBuilder.h" @@ -100,6 +102,7 @@ namespace { } bool doFinalization(Module &M); + void EmitStartOfAsmFile(Module &M); virtual void EmitFunctionEntryLabel(); @@ -325,6 +328,7 @@ MCSymbol *PPCAsmPrinter::lookUpOrCreateT /// void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) { MCInst TmpInst; + bool isPPC64 = Subtarget.isPPC64(); // Lower multi-instruction pseudo operations. switch (MI->getOpcode()) { @@ -349,6 +353,66 @@ void PPCAsmPrinter::EmitInstruction(cons OutStreamer.EmitLabel(PICBase); return; } + case PPC::GetGBRO: { + // Get the offset from the GOT Base Register to the GOT + LowerPPCMachineInstrToMCInst(MI, TmpInst, *this, Subtarget.isDarwin()); + MCSymbol *PICOffset = MF->getInfo()->getPICOffsetSymbol(); + TmpInst.setOpcode(PPC::LWZ); + const MCExpr *Exp = + MCSymbolRefExpr::Create(PICOffset, MCSymbolRefExpr::VK_None, OutContext); + const MCExpr *PB = + MCSymbolRefExpr::Create(MF->getPICBaseSymbol(), + MCSymbolRefExpr::VK_None, + OutContext); + const MCOperand MO = TmpInst.getOperand(1); + TmpInst.getOperand(1) = MCOperand::CreateExpr(MCBinaryExpr::CreateSub(Exp, + PB, + OutContext)); + TmpInst.addOperand(MO); + OutStreamer.EmitInstruction(TmpInst); + return; + } + case PPC::UpdateGBR: { + // Update the GOT Base Register to point to the GOT. It may be possible to + // merge this with the PPC::GetGBRO, doing it all in one step. + LowerPPCMachineInstrToMCInst(MI, TmpInst, *this, Subtarget.isDarwin()); + TmpInst.setOpcode(PPC::ADD4); + TmpInst.addOperand(TmpInst.getOperand(0)); + OutStreamer.EmitInstruction(TmpInst); + return; + } + case PPC::LWZtoc: { + // Transform %X3 = LWZtoc , %X2 + LowerPPCMachineInstrToMCInst(MI, TmpInst, *this, Subtarget.isDarwin()); + + // Change the opcode to LWZ, and the global address operand to be a + // reference to the GOT entry we will synthesize later. + TmpInst.setOpcode(PPC::LWZ); + const MachineOperand &MO = MI->getOperand(1); + + // Map symbol -> label of TOC entry + assert(MO.isGlobal() || MO.isCPI() || MO.isJTI()); + MCSymbol *MOSymbol = NULL; + if (MO.isGlobal()) + MOSymbol = getSymbol(MO.getGlobal()); + else if (MO.isCPI()) + MOSymbol = GetCPISymbol(MO.getIndex()); + else if (MO.isJTI()) + MOSymbol = GetJTISymbol(MO.getIndex()); + + MCSymbol *TOCEntry = lookUpOrCreateTOCEntry(MOSymbol); + + const MCExpr *Exp = + MCSymbolRefExpr::Create(TOCEntry, MCSymbolRefExpr::VK_None, + OutContext); + const MCExpr *PB = + MCSymbolRefExpr::Create(OutContext.GetOrCreateSymbol(Twine(".L.TOC.")), + OutContext); + Exp = MCBinaryExpr::CreateSub(Exp, PB, OutContext); + TmpInst.getOperand(1) = MCOperand::CreateExpr(Exp); + OutStreamer.EmitInstruction(TmpInst); + return; + } case PPC::LDtocJTI: case PPC::LDtocCPT: case PPC::LDtoc: { @@ -518,12 +582,13 @@ void PPCAsmPrinter::EmitInstruction(cons .addExpr(SymGotTprel)); return; } - case PPC::LDgotTprelL: { + case PPC::LDgotTprelL: + case PPC::LDgotTprelL32: { // Transform %Xd = LDgotTprelL , %Xs LowerPPCMachineInstrToMCInst(MI, TmpInst, *this, Subtarget.isDarwin()); // Change the opcode to LD. - TmpInst.setOpcode(PPC::LD); + TmpInst.setOpcode(isPPC64 ? PPC::LD : PPC::LWZ); const MachineOperand &MO = MI->getOperand(1); const GlobalValue *GValue = MO.getGlobal(); MCSymbol *MOSymbol = getSymbol(GValue); @@ -534,6 +599,52 @@ void PPCAsmPrinter::EmitInstruction(cons OutStreamer.EmitInstruction(TmpInst); return; } + + case PPC::PPC32PICGOT: { + MCSymbol *GOTSymbol = OutContext.GetOrCreateSymbol(StringRef("_GLOBAL_OFFSET_TABLE_")); + MCSymbol *GOTRef = OutContext.CreateTempSymbol(); + MCSymbol *NextInstr = OutContext.CreateTempSymbol(); + + OutStreamer.EmitInstruction(MCInstBuilder(PPC::BL) + // FIXME: We would like an efficient form for this, so we don't have to do + // a lot of extra uniquing. + .addExpr(MCSymbolRefExpr::Create(NextInstr, OutContext))); + const MCExpr *OffsExpr = + MCBinaryExpr::CreateSub(MCSymbolRefExpr::Create(GOTSymbol, OutContext), + MCSymbolRefExpr::Create(GOTRef, OutContext), + OutContext); + OutStreamer.EmitLabel(GOTRef); + OutStreamer.EmitValue(OffsExpr, 4); + OutStreamer.EmitLabel(NextInstr); + OutStreamer.EmitInstruction(MCInstBuilder(PPC::MFLR) + .addReg(MI->getOperand(0).getReg())); + OutStreamer.EmitInstruction(MCInstBuilder(PPC::LWZ) + .addReg(MI->getOperand(1).getReg()) + .addImm(0) + .addReg(MI->getOperand(0).getReg())); + OutStreamer.EmitInstruction(MCInstBuilder(PPC::ADD4) + .addReg(MI->getOperand(0).getReg()) + .addReg(MI->getOperand(1).getReg()) + .addReg(MI->getOperand(0).getReg())); + return; + } + case PPC::PPC32GOT: { + MCSymbol *GOTSymbol = OutContext.GetOrCreateSymbol(StringRef("_GLOBAL_OFFSET_TABLE_")); + const MCExpr *SymGotTlsL = + MCSymbolRefExpr::Create(GOTSymbol, MCSymbolRefExpr::VK_PPC_LO, + OutContext); + const MCExpr *SymGotTlsHA = + MCSymbolRefExpr::Create(GOTSymbol, MCSymbolRefExpr::VK_PPC_HA, + OutContext); + OutStreamer.EmitInstruction(MCInstBuilder(PPC::LI) + .addReg(MI->getOperand(0).getReg()) + .addExpr(SymGotTlsL)); + OutStreamer.EmitInstruction(MCInstBuilder(PPC::ADDIS) + .addReg(MI->getOperand(0).getReg()) + .addReg(MI->getOperand(0).getReg()) + .addExpr(SymGotTlsHA)); + return; + } case PPC::ADDIStlsgdHA: { // Transform: %Xd = ADDIStlsgdHA %X2, // Into: %Xd = ADDIS8 %X2, sym@got@tlsgd@ha @@ -550,38 +661,50 @@ void PPCAsmPrinter::EmitInstruction(cons .addExpr(SymGotTlsGD)); return; } - case PPC::ADDItlsgdL: { + case PPC::ADDItlsgdL: // Transform: %Xd = ADDItlsgdL %Xs, // Into: %Xd = ADDI8 %Xs, sym@got@tlsgd@l - assert(Subtarget.isPPC64() && "Not supported for 32-bit PowerPC"); + case PPC::ADDItlsgdL32: { + // Transform: %Rd = ADDItlsgdL32 %Rs, + // Into: %Rd = ADDI %Rs, sym@got@tlsgd const MachineOperand &MO = MI->getOperand(2); const GlobalValue *GValue = MO.getGlobal(); MCSymbol *MOSymbol = getSymbol(GValue); const MCExpr *SymGotTlsGD = - MCSymbolRefExpr::Create(MOSymbol, MCSymbolRefExpr::VK_PPC_GOT_TLSGD_LO, + MCSymbolRefExpr::Create(MOSymbol, Subtarget.isPPC64() ? + MCSymbolRefExpr::VK_PPC_GOT_TLSGD_LO : + MCSymbolRefExpr::VK_PPC_GOT_TLSGD, OutContext); - OutStreamer.EmitInstruction(MCInstBuilder(PPC::ADDI8) - .addReg(MI->getOperand(0).getReg()) - .addReg(MI->getOperand(1).getReg()) - .addExpr(SymGotTlsGD)); + OutStreamer.EmitInstruction(MCInstBuilder(Subtarget.isPPC64() ? PPC::ADDI8 : PPC::ADDI) + .addReg(MI->getOperand(0).getReg()) + .addReg(MI->getOperand(1).getReg()) + .addExpr(SymGotTlsGD)); return; } - case PPC::GETtlsADDR: { + case PPC::GETtlsADDR: // Transform: %X3 = GETtlsADDR %X3, // Into: BL8_NOP_TLS __tls_get_addr(sym@tlsgd) - assert(Subtarget.isPPC64() && "Not supported for 32-bit PowerPC"); + case PPC::GETtlsADDR32: { + // Transform: %R3 = GETtlsADDR32 %R3, + // Into: BL_TLS __tls_get_addr(sym@tlsgd)@PLT StringRef Name = "__tls_get_addr"; MCSymbol *TlsGetAddr = OutContext.GetOrCreateSymbol(Name); + MCSymbolRefExpr::VariantKind Kind = MCSymbolRefExpr::VK_None; + + if (!Subtarget.isPPC64() && !Subtarget.isDarwin() && + TM.getRelocationModel() == Reloc::PIC_) + Kind = MCSymbolRefExpr::VK_PLT; const MCSymbolRefExpr *TlsRef = - MCSymbolRefExpr::Create(TlsGetAddr, MCSymbolRefExpr::VK_None, OutContext); + MCSymbolRefExpr::Create(TlsGetAddr, Kind, OutContext); const MachineOperand &MO = MI->getOperand(2); const GlobalValue *GValue = MO.getGlobal(); MCSymbol *MOSymbol = getSymbol(GValue); const MCExpr *SymVar = MCSymbolRefExpr::Create(MOSymbol, MCSymbolRefExpr::VK_PPC_TLSGD, OutContext); - OutStreamer.EmitInstruction(MCInstBuilder(PPC::BL8_NOP_TLS) + OutStreamer.EmitInstruction(MCInstBuilder(Subtarget.isPPC64() ? + PPC::BL8_NOP_TLS : PPC::BL_TLS) .addExpr(TlsRef) .addExpr(SymVar)); return; @@ -602,69 +725,88 @@ void PPCAsmPrinter::EmitInstruction(cons .addExpr(SymGotTlsLD)); return; } - case PPC::ADDItlsldL: { + case PPC::ADDItlsldL: // Transform: %Xd = ADDItlsldL %Xs, // Into: %Xd = ADDI8 %Xs, sym@got@tlsld@l - assert(Subtarget.isPPC64() && "Not supported for 32-bit PowerPC"); + case PPC::ADDItlsldL32: { + // Transform: %Rd = ADDItlsldL32 %Rs, + // Into: %Rd = ADDI %Rs, sym@got@tlsld + const MachineOperand &MO = MI->getOperand(2); const GlobalValue *GValue = MO.getGlobal(); MCSymbol *MOSymbol = getSymbol(GValue); const MCExpr *SymGotTlsLD = - MCSymbolRefExpr::Create(MOSymbol, MCSymbolRefExpr::VK_PPC_GOT_TLSLD_LO, + MCSymbolRefExpr::Create(MOSymbol, Subtarget.isPPC64() ? + MCSymbolRefExpr::VK_PPC_GOT_TLSLD_LO : + MCSymbolRefExpr::VK_PPC_GOT_TLSLD, OutContext); - OutStreamer.EmitInstruction(MCInstBuilder(PPC::ADDI8) + OutStreamer.EmitInstruction(MCInstBuilder(Subtarget.isPPC64() ? PPC::ADDI8 : PPC::ADDI) .addReg(MI->getOperand(0).getReg()) .addReg(MI->getOperand(1).getReg()) .addExpr(SymGotTlsLD)); return; } - case PPC::GETtlsldADDR: { + case PPC::GETtlsldADDR: // Transform: %X3 = GETtlsldADDR %X3, // Into: BL8_NOP_TLS __tls_get_addr(sym@tlsld) - assert(Subtarget.isPPC64() && "Not supported for 32-bit PowerPC"); + case PPC::GETtlsldADDR32: { + // Transform: %R3 = GETtlsldADDR32 %R3, + // Into: BL_TLS __tls_get_addr(sym@tlsld)@PLT StringRef Name = "__tls_get_addr"; MCSymbol *TlsGetAddr = OutContext.GetOrCreateSymbol(Name); + MCSymbolRefExpr::VariantKind Kind = MCSymbolRefExpr::VK_None; + + if (!Subtarget.isPPC64() && !Subtarget.isDarwin() && + TM.getRelocationModel() == Reloc::PIC_) + Kind = MCSymbolRefExpr::VK_PLT; + const MCSymbolRefExpr *TlsRef = - MCSymbolRefExpr::Create(TlsGetAddr, MCSymbolRefExpr::VK_None, OutContext); + MCSymbolRefExpr::Create(TlsGetAddr, Kind, OutContext); const MachineOperand &MO = MI->getOperand(2); const GlobalValue *GValue = MO.getGlobal(); MCSymbol *MOSymbol = getSymbol(GValue); const MCExpr *SymVar = MCSymbolRefExpr::Create(MOSymbol, MCSymbolRefExpr::VK_PPC_TLSLD, OutContext); - OutStreamer.EmitInstruction(MCInstBuilder(PPC::BL8_NOP_TLS) + OutStreamer.EmitInstruction(MCInstBuilder(Subtarget.isPPC64() ? + PPC::BL8_NOP_TLS : PPC::BL_TLS) .addExpr(TlsRef) .addExpr(SymVar)); return; } - case PPC::ADDISdtprelHA: { + case PPC::ADDISdtprelHA: // Transform: %Xd = ADDISdtprelHA %X3, // Into: %Xd = ADDIS8 %X3, sym@dtprel@ha - assert(Subtarget.isPPC64() && "Not supported for 32-bit PowerPC"); + case PPC::ADDISdtprelHA32: { + // Transform: %Rd = ADDISdtprelHA32 %R3, + // Into: %Rd = ADDIS %R3, sym@dtprel@ha + const MachineOperand &MO = MI->getOperand(2); const GlobalValue *GValue = MO.getGlobal(); MCSymbol *MOSymbol = getSymbol(GValue); const MCExpr *SymDtprel = MCSymbolRefExpr::Create(MOSymbol, MCSymbolRefExpr::VK_PPC_DTPREL_HA, OutContext); - OutStreamer.EmitInstruction(MCInstBuilder(PPC::ADDIS8) + OutStreamer.EmitInstruction(MCInstBuilder(Subtarget.isPPC64() ? PPC::ADDIS8 : PPC::ADDIS) .addReg(MI->getOperand(0).getReg()) .addReg(PPC::X3) .addExpr(SymDtprel)); return; } - case PPC::ADDIdtprelL: { + case PPC::ADDIdtprelL: // Transform: %Xd = ADDIdtprelL %Xs, // Into: %Xd = ADDI8 %Xs, sym@dtprel@l - assert(Subtarget.isPPC64() && "Not supported for 32-bit PowerPC"); + case PPC::ADDIdtprelL32: { + // Transform: %Rd = ADDIdtprelL32 %Rs, + // Into: %Rd = ADDI %Rs, sym@dtprel@l const MachineOperand &MO = MI->getOperand(2); const GlobalValue *GValue = MO.getGlobal(); MCSymbol *MOSymbol = getSymbol(GValue); const MCExpr *SymDtprel = MCSymbolRefExpr::Create(MOSymbol, MCSymbolRefExpr::VK_PPC_DTPREL_LO, OutContext); - OutStreamer.EmitInstruction(MCInstBuilder(PPC::ADDI8) + OutStreamer.EmitInstruction(MCInstBuilder(Subtarget.isPPC64() ? PPC::ADDI8 : PPC::ADDI) .addReg(MI->getOperand(0).getReg()) .addReg(MI->getOperand(1).getReg()) .addExpr(SymDtprel)); @@ -726,9 +868,60 @@ void PPCAsmPrinter::EmitInstruction(cons OutStreamer.EmitInstruction(TmpInst); } +void PPCLinuxAsmPrinter::EmitStartOfAsmFile(Module &M) { + if (Subtarget.isPPC64() || TM.getRelocationModel() != Reloc::PIC_) + return AsmPrinter::EmitStartOfAsmFile(M); + + // FIXME: The use of .got2 assumes large GOT model (-fPIC), which is not + // optimal for some cases. We should consider supporting small model (-fpic) + // as well in the future. + assert(TM.getCodeModel() != CodeModel::Small && + "Small code model PIC is currently unsupported."); + OutStreamer.SwitchSection(OutContext.getELFSection(".got2", + ELF::SHT_PROGBITS, ELF::SHF_WRITE | ELF::SHF_ALLOC, + SectionKind::getReadOnly())); + + MCSymbol *TOCSym = OutContext.GetOrCreateSymbol(Twine(".L.TOC.")); + MCSymbol *CurrentPos = OutContext.CreateTempSymbol(); + + OutStreamer.EmitLabel(CurrentPos); + + // The GOT pointer points to the middle of the GOT, in order to reference the + // entire 64kB range. 0x8000 is the midpoint. + const MCExpr *tocExpr = + MCBinaryExpr::CreateAdd(MCSymbolRefExpr::Create(CurrentPos, OutContext), + MCConstantExpr::Create(0x8000, OutContext), + OutContext); + + OutStreamer.EmitAssignment(TOCSym, tocExpr); + + OutStreamer.SwitchSection(getObjFileLowering().getTextSection()); +} + void PPCLinuxAsmPrinter::EmitFunctionEntryLabel() { - if (!Subtarget.isPPC64()) // linux/ppc32 - Normal entry label. + // linux/ppc32 - Normal entry label. + if (!Subtarget.isPPC64() && TM.getRelocationModel() != Reloc::PIC_) return AsmPrinter::EmitFunctionEntryLabel(); + + if (!Subtarget.isPPC64()) { + const PPCFunctionInfo *PPCFI = MF->getInfo(); + if (PPCFI->usesPICBase()) { + MCSymbol *RelocSymbol = PPCFI->getPICOffsetSymbol(); + MCSymbol *PICBase = MF->getPICBaseSymbol(); + OutStreamer.EmitLabel(RelocSymbol); + + const MCExpr *OffsExpr = + MCBinaryExpr::CreateSub( + MCSymbolRefExpr::Create(OutContext.GetOrCreateSymbol(Twine(".L.TOC.")), + OutContext), + MCSymbolRefExpr::Create(PICBase, OutContext), + OutContext); + OutStreamer.EmitValue(OffsExpr, 4); + OutStreamer.EmitLabel(CurrentFnSym); + return; + } else + return AsmPrinter::EmitFunctionEntryLabel(); + } // Emit an official procedure descriptor. MCSectionSubPair Current = OutStreamer.getCurrentSection(); @@ -768,8 +961,15 @@ bool PPCLinuxAsmPrinter::doFinalization( PPCTargetStreamer &TS = static_cast(OutStreamer.getTargetStreamer()); - if (isPPC64 && !TOC.empty()) { - const MCSectionELF *Section = OutStreamer.getContext().getELFSection(".toc", + if (!TOC.empty()) { + const MCSectionELF *Section; + + if (isPPC64) + Section = OutStreamer.getContext().getELFSection(".toc", + ELF::SHT_PROGBITS, ELF::SHF_WRITE | ELF::SHF_ALLOC, + SectionKind::getReadOnly()); + else + Section = OutStreamer.getContext().getELFSection(".got2", ELF::SHT_PROGBITS, ELF::SHF_WRITE | ELF::SHF_ALLOC, SectionKind::getReadOnly()); OutStreamer.SwitchSection(Section); @@ -778,7 +978,10 @@ bool PPCLinuxAsmPrinter::doFinalization( E = TOC.end(); I != E; ++I) { OutStreamer.EmitLabel(I->second); MCSymbol *S = OutContext.GetOrCreateSymbol(I->first->getName()); - TS.emitTCEntry(*S); + if (isPPC64) + TS.emitTCEntry(*S); + else + OutStreamer.EmitSymbolValue(S, 4); } } Modified: head/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp ============================================================================== --- head/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp Mon Aug 18 18:01:18 2014 (r270146) +++ head/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp Mon Aug 18 18:05:55 2014 (r270147) @@ -299,7 +299,7 @@ void PPCFrameLowering::replaceFPWithReal const PPCRegisterInfo *RegInfo = static_cast(MF.getTarget().getRegisterInfo()); bool HasBP = RegInfo->hasBasePointer(MF); - unsigned BPReg = HasBP ? (unsigned) PPC::R30 : FPReg; + unsigned BPReg = HasBP ? (unsigned) RegInfo->getBaseRegister(MF): FPReg; unsigned BP8Reg = HasBP ? (unsigned) PPC::X30 : FPReg; for (MachineFunction::iterator BI = MF.begin(), BE = MF.end(); @@ -344,6 +344,7 @@ void PPCFrameLowering::emitPrologue(Mach DebugLoc dl; bool needsFrameMoves = MMI.hasDebugInfo() || MF.getFunction()->needsUnwindTableEntry(); + bool isPIC = MF.getTarget().getRelocationModel() == Reloc::PIC_; // Get processor type. bool isPPC64 = Subtarget.isPPC64(); @@ -387,7 +388,7 @@ void PPCFrameLowering::emitPrologue(Mach bool HasBP = RegInfo->hasBasePointer(MF); unsigned SPReg = isPPC64 ? PPC::X1 : PPC::R1; - unsigned BPReg = isPPC64 ? PPC::X30 : PPC::R30; + unsigned BPReg = RegInfo->getBaseRegister(MF); unsigned FPReg = isPPC64 ? PPC::X31 : PPC::R31; unsigned LRReg = isPPC64 ? PPC::LR8 : PPC::LR; unsigned ScratchReg = isPPC64 ? PPC::X0 : PPC::R0; @@ -442,7 +443,9 @@ void PPCFrameLowering::emitPrologue(Mach BPOffset = FFI->getObjectOffset(BPIndex); } else { BPOffset = - PPCFrameLowering::getBasePointerSaveOffset(isPPC64, isDarwinABI); + PPCFrameLowering::getBasePointerSaveOffset(isPPC64, + isDarwinABI, + isPIC); } } @@ -675,6 +678,7 @@ void PPCFrameLowering::emitEpilogue(Mach // Get the ABI. bool isDarwinABI = Subtarget.isDarwinABI(); bool isSVR4ABI = Subtarget.isSVR4ABI(); + bool isPIC = MF.getTarget().getRelocationModel() == Reloc::PIC_; // Check if the link register (LR) has been saved. PPCFunctionInfo *FI = MF.getInfo(); @@ -685,7 +689,7 @@ void PPCFrameLowering::emitEpilogue(Mach bool HasBP = RegInfo->hasBasePointer(MF); unsigned SPReg = isPPC64 ? PPC::X1 : PPC::R1; - unsigned BPReg = isPPC64 ? PPC::X30 : PPC::R30; + unsigned BPReg = RegInfo->getBaseRegister(MF); unsigned FPReg = isPPC64 ? PPC::X31 : PPC::R31; unsigned ScratchReg = isPPC64 ? PPC::X0 : PPC::R0; unsigned TempReg = isPPC64 ? PPC::X12 : PPC::R12; // another scratch reg @@ -725,7 +729,9 @@ void PPCFrameLowering::emitEpilogue(Mach BPOffset = FFI->getObjectOffset(BPIndex); } else { BPOffset = - PPCFrameLowering::getBasePointerSaveOffset(isPPC64, isDarwinABI); + PPCFrameLowering::getBasePointerSaveOffset(isPPC64, + isDarwinABI, + isPIC); } } @@ -902,6 +908,7 @@ PPCFrameLowering::processFunctionBeforeC int FPSI = FI->getFramePointerSaveIndex(); bool isPPC64 = Subtarget.isPPC64(); bool isDarwinABI = Subtarget.isDarwinABI(); + bool isPIC = MF.getTarget().getRelocationModel() == Reloc::PIC_; MachineFrameInfo *MFI = MF.getFrameInfo(); // If the frame pointer save index hasn't been defined yet. @@ -916,7 +923,7 @@ PPCFrameLowering::processFunctionBeforeC int BPSI = FI->getBasePointerSaveIndex(); if (!BPSI && RegInfo->hasBasePointer(MF)) { - int BPOffset = getBasePointerSaveOffset(isPPC64, isDarwinABI); + int BPOffset = getBasePointerSaveOffset(isPPC64, isDarwinABI, isPIC); // Allocate the frame index for the base pointer save area. BPSI = MFI->CreateFixedObject(isPPC64? 8 : 4, BPOffset, true); // Save the result. Modified: head/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.h ============================================================================== --- head/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.h Mon Aug 18 18:01:18 2014 (r270146) +++ head/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.h Mon Aug 18 18:05:55 2014 (r270147) @@ -96,12 +96,14 @@ public: /// getBasePointerSaveOffset - Return the previous frame offset to save the /// base pointer. - static unsigned getBasePointerSaveOffset(bool isPPC64, bool isDarwinABI) { + static unsigned getBasePointerSaveOffset(bool isPPC64, + bool isDarwinABI, + bool isPIC) { if (isDarwinABI) return isPPC64 ? -16U : -8U; // SVR4 ABI: First slot in the general register save area. - return isPPC64 ? -16U : -8U; + return isPPC64 ? -16U : isPIC ? -12U : -8U; } /// getLinkageSize - Return the size of the PowerPC ABI linkage area. Modified: head/contrib/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp ============================================================================== --- head/contrib/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp Mon Aug 18 18:01:18 2014 (r270146) +++ head/contrib/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp Mon Aug 18 18:05:55 2014 (r270147) @@ -15,6 +15,7 @@ #define DEBUG_TYPE "ppc-codegen" #include "PPC.h" #include "MCTargetDesc/PPCPredicates.h" +#include "PPCMachineFunctionInfo.h" #include "PPCTargetMachine.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineInstrBuilder.h" @@ -261,9 +262,21 @@ SDNode *PPCDAGToDAGISel::getGlobalBaseRe DebugLoc dl; if (PPCLowering.getPointerTy() == MVT::i32) { - GlobalBaseReg = RegInfo->createVirtualRegister(&PPC::GPRC_NOR0RegClass); + if (PPCSubTarget.isTargetELF()) + GlobalBaseReg = PPC::R30; + else + GlobalBaseReg = + RegInfo->createVirtualRegister(&PPC::GPRC_NOR0RegClass); BuildMI(FirstMBB, MBBI, dl, TII.get(PPC::MovePCtoLR)); BuildMI(FirstMBB, MBBI, dl, TII.get(PPC::MFLR), GlobalBaseReg); + if (PPCSubTarget.isTargetELF()) { + unsigned TempReg = RegInfo->createVirtualRegister(&PPC::GPRCRegClass); + BuildMI(FirstMBB, MBBI, dl, + TII.get(PPC::GetGBRO), TempReg).addReg(GlobalBaseReg); + BuildMI(FirstMBB, MBBI, dl, + TII.get(PPC::UpdateGBR)).addReg(GlobalBaseReg).addReg(TempReg); + MF->getInfo()->setUsesPICBase(true); + } } else { GlobalBaseReg = RegInfo->createVirtualRegister(&PPC::G8RC_NOX0RegClass); BuildMI(FirstMBB, MBBI, dl, TII.get(PPC::MovePCtoLR8)); @@ -1260,7 +1273,13 @@ SDNode *PPCDAGToDAGISel::Select(SDNode * return CurDAG->SelectNodeTo(N, Reg, MVT::Other, Chain); } case PPCISD::TOC_ENTRY: { - assert (PPCSubTarget.isPPC64() && "Only supported for 64-bit ABI"); + if (PPCSubTarget.isSVR4ABI() && !PPCSubTarget.isPPC64()) { + SDValue GA = N->getOperand(0); + return CurDAG->getMachineNode(PPC::LWZtoc, dl, MVT::i32, GA, + N->getOperand(1)); + } + assert (PPCSubTarget.isPPC64() && + "Only supported for 64-bit ABI and 32-bit SVR4"); // For medium and large code model, we generate two instructions as // described below. Otherwise we allow SelectCodeCommon to handle this, @@ -1306,6 +1325,12 @@ SDNode *PPCDAGToDAGISel::Select(SDNode * return CurDAG->getMachineNode(PPC::ADDItocL, dl, MVT::i64, SDValue(Tmp, 0), GA); } + case PPCISD::PPC32_PICGOT: { + // Generate a PIC-safe GOT reference. + assert(!PPCSubTarget.isPPC64() && PPCSubTarget.isSVR4ABI() && + "PPCISD::PPC32_PICGOT is only supported for 32-bit SVR4"); + return CurDAG->SelectNodeTo(N, PPC::PPC32PICGOT, PPCLowering.getPointerTy(), MVT::i32); + } case PPCISD::VADD_SPLAT: { // This expands into one of three sequences, depending on whether // the first operand is odd or even, positive or negative. Modified: head/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp ============================================================================== --- head/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp Mon Aug 18 18:01:18 2014 (r270146) +++ head/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp Mon Aug 18 18:05:55 2014 (r270147) @@ -670,6 +670,7 @@ const char *PPCTargetLowering::getTarget case PPCISD::ADDIS_TOC_HA: return "PPCISD::ADDIS_TOC_HA"; case PPCISD::LD_TOC_L: return "PPCISD::LD_TOC_L"; case PPCISD::ADDI_TOC_L: return "PPCISD::ADDI_TOC_L"; + case PPCISD::PPC32_GOT: return "PPCISD::PPC32_GOT"; case PPCISD::ADDIS_GOT_TPREL_HA: return "PPCISD::ADDIS_GOT_TPREL_HA"; case PPCISD::LD_GOT_TPREL_L: return "PPCISD::LD_GOT_TPREL_L"; case PPCISD::ADD_TLS: return "PPCISD::ADD_TLS"; @@ -1307,10 +1308,7 @@ static bool GetLabelAccessInfo(const Tar HiOpFlags = PPCII::MO_HA; LoOpFlags = PPCII::MO_LO; - // Don't use the pic base if not in PIC relocation model. Or if we are on a - // non-darwin platform. We don't support PIC on other platforms yet. - bool isPIC = TM.getRelocationModel() == Reloc::PIC_ && - TM.getSubtarget().isDarwin(); + bool isPIC = TM.getRelocationModel() == Reloc::PIC_; if (isPIC) { HiOpFlags |= PPCII::MO_PIC_FLAG; LoOpFlags |= PPCII::MO_PIC_FLAG; @@ -1366,6 +1364,15 @@ SDValue PPCTargetLowering::LowerConstant unsigned MOHiFlag, MOLoFlag; bool isPIC = GetLabelAccessInfo(DAG.getTarget(), MOHiFlag, MOLoFlag); + + if (isPIC && PPCSubTarget.isSVR4ABI()) { + SDValue GA = DAG.getTargetConstantPool(C, PtrVT, CP->getAlignment(), + PPCII::MO_PIC_FLAG); + SDLoc DL(CP); + return DAG.getNode(PPCISD::TOC_ENTRY, SDLoc(CP), MVT::i32, GA, + DAG.getNode(PPCISD::GlobalBaseReg, DL, PtrVT)); + } + SDValue CPIHi = DAG.getTargetConstantPool(C, PtrVT, CP->getAlignment(), 0, MOHiFlag); SDValue CPILo = @@ -1387,6 +1394,15 @@ SDValue PPCTargetLowering::LowerJumpTabl unsigned MOHiFlag, MOLoFlag; bool isPIC = GetLabelAccessInfo(DAG.getTarget(), MOHiFlag, MOLoFlag); + + if (isPIC && PPCSubTarget.isSVR4ABI()) { + SDValue GA = DAG.getTargetJumpTable(JT->getIndex(), PtrVT, + PPCII::MO_PIC_FLAG); + SDLoc DL(GA); + return DAG.getNode(PPCISD::TOC_ENTRY, SDLoc(JT), PtrVT, GA, + DAG.getNode(PPCISD::GlobalBaseReg, DL, PtrVT)); + } + SDValue JTIHi = DAG.getTargetJumpTable(JT->getIndex(), PtrVT, MOHiFlag); SDValue JTILo = DAG.getTargetJumpTable(JT->getIndex(), PtrVT, MOLoFlag); return LowerLabelRef(JTIHi, JTILo, isPIC, DAG); @@ -1400,6 +1416,7 @@ SDValue PPCTargetLowering::LowerBlockAdd unsigned MOHiFlag, MOLoFlag; bool isPIC = GetLabelAccessInfo(DAG.getTarget(), MOHiFlag, MOLoFlag); + SDValue TgtBAHi = DAG.getTargetBlockAddress(BA, PtrVT, 0, MOHiFlag); SDValue TgtBALo = DAG.getTargetBlockAddress(BA, PtrVT, 0, MOLoFlag); return LowerLabelRef(TgtBAHi, TgtBALo, isPIC, DAG); @@ -1431,64 +1448,79 @@ SDValue PPCTargetLowering::LowerGlobalTL return DAG.getNode(PPCISD::Lo, dl, PtrVT, TGALo, Hi); } - if (!is64bit) - llvm_unreachable("only local-exec is currently supported for ppc32"); - if (Model == TLSModel::InitialExec) { SDValue TGA = DAG.getTargetGlobalAddress(GV, dl, PtrVT, 0, 0); SDValue TGATLS = DAG.getTargetGlobalAddress(GV, dl, PtrVT, 0, PPCII::MO_TLS); - SDValue GOTReg = DAG.getRegister(PPC::X2, MVT::i64); - SDValue TPOffsetHi = DAG.getNode(PPCISD::ADDIS_GOT_TPREL_HA, dl, - PtrVT, GOTReg, TGA); + SDValue GOTPtr; + if (is64bit) { + SDValue GOTReg = DAG.getRegister(PPC::X2, MVT::i64); + GOTPtr = DAG.getNode(PPCISD::ADDIS_GOT_TPREL_HA, dl, + PtrVT, GOTReg, TGA); + } else + GOTPtr = DAG.getNode(PPCISD::PPC32_GOT, dl, PtrVT); SDValue TPOffset = DAG.getNode(PPCISD::LD_GOT_TPREL_L, dl, - PtrVT, TGA, TPOffsetHi); + PtrVT, TGA, GOTPtr); return DAG.getNode(PPCISD::ADD_TLS, dl, PtrVT, TPOffset, TGATLS); } if (Model == TLSModel::GeneralDynamic) { SDValue TGA = DAG.getTargetGlobalAddress(GV, dl, PtrVT, 0, 0); - SDValue GOTReg = DAG.getRegister(PPC::X2, MVT::i64); - SDValue GOTEntryHi = DAG.getNode(PPCISD::ADDIS_TLSGD_HA, dl, PtrVT, - GOTReg, TGA); + SDValue GOTPtr; + if (is64bit) { + SDValue GOTReg = DAG.getRegister(PPC::X2, MVT::i64); + GOTPtr = DAG.getNode(PPCISD::ADDIS_TLSGD_HA, dl, PtrVT, + GOTReg, TGA); + } else { + GOTPtr = DAG.getNode(PPCISD::PPC32_PICGOT, dl, PtrVT); + } SDValue GOTEntry = DAG.getNode(PPCISD::ADDI_TLSGD_L, dl, PtrVT, - GOTEntryHi, TGA); + GOTPtr, TGA); // We need a chain node, and don't have one handy. The underlying // call has no side effects, so using the function entry node // suffices. SDValue Chain = DAG.getEntryNode(); - Chain = DAG.getCopyToReg(Chain, dl, PPC::X3, GOTEntry); - SDValue ParmReg = DAG.getRegister(PPC::X3, MVT::i64); + Chain = DAG.getCopyToReg(Chain, dl, + is64bit ? PPC::X3 : PPC::R3, GOTEntry); + SDValue ParmReg = DAG.getRegister(is64bit ? PPC::X3 : PPC::R3, + is64bit ? MVT::i64 : MVT::i32); SDValue TLSAddr = DAG.getNode(PPCISD::GET_TLS_ADDR, dl, PtrVT, ParmReg, TGA); // The return value from GET_TLS_ADDR really is in X3 already, but // some hacks are needed here to tie everything together. The extra // copies dissolve during subsequent transforms. - Chain = DAG.getCopyToReg(Chain, dl, PPC::X3, TLSAddr); - return DAG.getCopyFromReg(Chain, dl, PPC::X3, PtrVT); + Chain = DAG.getCopyToReg(Chain, dl, is64bit ? PPC::X3 : PPC::R3, TLSAddr); + return DAG.getCopyFromReg(Chain, dl, is64bit ? PPC::X3 : PPC::R3, PtrVT); } if (Model == TLSModel::LocalDynamic) { SDValue TGA = DAG.getTargetGlobalAddress(GV, dl, PtrVT, 0, 0); - SDValue GOTReg = DAG.getRegister(PPC::X2, MVT::i64); - SDValue GOTEntryHi = DAG.getNode(PPCISD::ADDIS_TLSLD_HA, dl, PtrVT, - GOTReg, TGA); + SDValue GOTPtr; + if (is64bit) { + SDValue GOTReg = DAG.getRegister(PPC::X2, MVT::i64); + GOTPtr = DAG.getNode(PPCISD::ADDIS_TLSLD_HA, dl, PtrVT, + GOTReg, TGA); + } else { + GOTPtr = DAG.getNode(PPCISD::PPC32_PICGOT, dl, PtrVT); + } SDValue GOTEntry = DAG.getNode(PPCISD::ADDI_TLSLD_L, dl, PtrVT, - GOTEntryHi, TGA); + GOTPtr, TGA); // We need a chain node, and don't have one handy. The underlying // call has no side effects, so using the function entry node // suffices. SDValue Chain = DAG.getEntryNode(); - Chain = DAG.getCopyToReg(Chain, dl, PPC::X3, GOTEntry); - SDValue ParmReg = DAG.getRegister(PPC::X3, MVT::i64); + Chain = DAG.getCopyToReg(Chain, dl, + is64bit ? PPC::X3 : PPC::R3, GOTEntry); + SDValue ParmReg = DAG.getRegister(is64bit ? PPC::X3 : PPC::R3, + is64bit ? MVT::i64 : MVT::i32); SDValue TLSAddr = DAG.getNode(PPCISD::GET_TLSLD_ADDR, dl, PtrVT, ParmReg, TGA); // The return value from GET_TLSLD_ADDR really is in X3 already, but // some hacks are needed here to tie everything together. The extra // copies dissolve during subsequent transforms. - Chain = DAG.getCopyToReg(Chain, dl, PPC::X3, TLSAddr); + Chain = DAG.getCopyToReg(Chain, dl, is64bit ? PPC::X3 : PPC::R3, TLSAddr); SDValue DtvOffsetHi = DAG.getNode(PPCISD::ADDIS_DTPREL_HA, dl, PtrVT, Chain, ParmReg, TGA); return DAG.getNode(PPCISD::ADDI_DTPREL_L, dl, PtrVT, DtvOffsetHi, TGA); @@ -1515,6 +1547,14 @@ SDValue PPCTargetLowering::LowerGlobalAd unsigned MOHiFlag, MOLoFlag; bool isPIC = GetLabelAccessInfo(DAG.getTarget(), MOHiFlag, MOLoFlag, GV); + if (isPIC && PPCSubTarget.isSVR4ABI()) { + SDValue GA = DAG.getTargetGlobalAddress(GV, DL, PtrVT, + GSDN->getOffset(), + PPCII::MO_PIC_FLAG); + return DAG.getNode(PPCISD::TOC_ENTRY, DL, MVT::i32, GA, + DAG.getNode(PPCISD::GlobalBaseReg, DL, MVT::i32)); + } + SDValue GAHi = DAG.getTargetGlobalAddress(GV, DL, PtrVT, GSDN->getOffset(), MOHiFlag); SDValue GALo = @@ -3214,15 +3254,18 @@ unsigned PrepareCall(SelectionDAG &DAG, // far-call stubs may be outside relocation limits for a BL instruction. if (!DAG.getTarget().getSubtarget().isJITCodeModel()) { unsigned OpFlags = 0; - if (DAG.getTarget().getRelocationModel() != Reloc::Static && + if ((DAG.getTarget().getRelocationModel() != Reloc::Static && (PPCSubTarget.getTargetTriple().isMacOSX() && PPCSubTarget.getTargetTriple().isMacOSXVersionLT(10, 5)) && (G->getGlobal()->isDeclaration() || - G->getGlobal()->isWeakForLinker())) { + G->getGlobal()->isWeakForLinker())) || + (PPCSubTarget.isTargetELF() && !isPPC64 && + !G->getGlobal()->hasLocalLinkage() && + DAG.getTarget().getRelocationModel() == Reloc::PIC_)) { // PC-relative references to external symbols should go through $stub, // unless we're building with the leopard linker or later, which // automatically synthesizes these stubs. - OpFlags = PPCII::MO_DARWIN_STUB; + OpFlags = PPCII::MO_PLT_OR_STUB; } // If the callee is a GlobalAddress/ExternalSymbol node (quite common, @@ -3244,7 +3287,7 @@ unsigned PrepareCall(SelectionDAG &DAG, // PC-relative references to external symbols should go through $stub, // unless we're building with the leopard linker or later, which // automatically synthesizes these stubs. - OpFlags = PPCII::MO_DARWIN_STUB; + OpFlags = PPCII::MO_PLT_OR_STUB; } Callee = DAG.getTargetExternalSymbol(S->getSymbol(), Callee.getValueType(), @@ -6255,7 +6298,10 @@ PPCTargetLowering::emitEHSjLjLongJmp(Mac // Since FP is only updated here but NOT referenced, it's treated as GPR. unsigned FP = (PVT == MVT::i64) ? PPC::X31 : PPC::R31; unsigned SP = (PVT == MVT::i64) ? PPC::X1 : PPC::R1; - unsigned BP = (PVT == MVT::i64) ? PPC::X30 : PPC::R30; + unsigned BP = (PVT == MVT::i64) ? PPC::X30 : + (PPCSubTarget.isSVR4ABI() && + MF->getTarget().getRelocationModel() == Reloc::PIC_ ? + PPC::R29 : PPC::R30); MachineInstrBuilder MIB; Modified: head/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.h ============================================================================== --- head/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.h Mon Aug 18 18:01:18 2014 (r270146) +++ head/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.h Mon Aug 18 18:05:55 2014 (r270147) @@ -177,6 +177,12 @@ namespace llvm { CR6SET, CR6UNSET, + PPC32_GOT, + + /// GPRC = address of _GLOBAL_OFFSET_TABLE_. Used by general dynamic and + /// local dynamic TLS on PPC32. + PPC32_PICGOT, + /// G8RC = ADDIS_GOT_TPREL_HA %X2, Symbol - Used by the initial-exec /// TLS model, produces an ADDIS8 instruction that adds the GOT /// base to sym\@got\@tprel\@ha. Modified: head/contrib/llvm/lib/Target/PowerPC/PPCInstr64Bit.td ============================================================================== --- head/contrib/llvm/lib/Target/PowerPC/PPCInstr64Bit.td Mon Aug 18 18:01:18 2014 (r270146) +++ head/contrib/llvm/lib/Target/PowerPC/PPCInstr64Bit.td Mon Aug 18 18:05:55 2014 (r270147) @@ -36,10 +36,6 @@ def s17imm64 : Operand { def tocentry : Operand { let MIOperandInfo = (ops i64imm:$imm); } -def PPCTLSRegOperand : AsmOperandClass { - let Name = "TLSReg"; let PredicateMethod = "isTLSReg"; - let RenderMethod = "addTLSRegOperands"; -} def tlsreg : Operand { let EncoderMethod = "getTLSRegEncoding"; let ParserMatchClass = PPCTLSRegOperand; Modified: head/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.td ============================================================================== --- head/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.td Mon Aug 18 18:01:18 2014 (r270146) +++ head/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.td Mon Aug 18 18:05:55 2014 (r270147) @@ -57,6 +57,9 @@ def SDT_PPCTC_ret : SDTypeProfile<0, 2, SDTCisPtrTy<0>, SDTCisVT<1, i32> ]>; +def tocentry32 : Operand { + let MIOperandInfo = (ops i32imm:$imm); +} //===----------------------------------------------------------------------===// // PowerPC specific DAG Nodes. @@ -99,6 +102,8 @@ def PPCtoc_entry: SDNode<"PPCISD::TOC_EN def PPCvmaddfp : SDNode<"PPCISD::VMADDFP", SDTFPTernaryOp, []>; def PPCvnmsubfp : SDNode<"PPCISD::VNMSUBFP", SDTFPTernaryOp, []>; +def PPCppc32GOT : SDNode<"PPCISD::PPC32_GOT", SDTIntLeaf, []>; + def PPCaddisGotTprelHA : SDNode<"PPCISD::ADDIS_GOT_TPREL_HA", SDTIntBinOp>; def PPCldGotTprelL : SDNode<"PPCISD::LD_GOT_TPREL_L", SDTIntBinOp, [SDNPMayLoad]>; @@ -555,6 +560,20 @@ def memrix : Operand { // memri def memr : Operand { let MIOperandInfo = (ops ptr_rc:$ptrreg); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Aug 18 18:07:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D0149F8A; Mon, 18 Aug 2014 18:07:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA0273375; Mon, 18 Aug 2014 18:07:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7II7SwI010674; Mon, 18 Aug 2014 18:07:28 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7II7S7t010673; Mon, 18 Aug 2014 18:07:28 GMT (envelope-from rdivacky@FreeBSD.org) Message-Id: <201408181807.s7II7S7t010673@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rdivacky set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky Date: Mon, 18 Aug 2014 18:07:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270148 - head/contrib/llvm/patches X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 18:07:28 -0000 Author: rdivacky Date: Mon Aug 18 18:07:28 2014 New Revision: 270148 URL: http://svnweb.freebsd.org/changeset/base/270148 Log: Add the patch commited in r270147. Added: head/contrib/llvm/patches/patch-r270147-llvm-r197824-r213427-r213960.diff Added: head/contrib/llvm/patches/patch-r270147-llvm-r197824-r213427-r213960.diff ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/patches/patch-r270147-llvm-r197824-r213427-r213960.diff Mon Aug 18 18:07:28 2014 (r270148) @@ -0,0 +1,1303 @@ +Index: contrib/llvm/include/llvm/Support/ELF.h +=================================================================== +--- contrib/llvm/include/llvm/Support/ELF.h (revision 270019) ++++ contrib/llvm/include/llvm/Support/ELF.h (working copy) +@@ -437,6 +437,7 @@ + R_PPC_GOT16_LO = 15, + R_PPC_GOT16_HI = 16, + R_PPC_GOT16_HA = 17, ++ R_PPC_PLTREL24 = 18, + R_PPC_REL32 = 26, + R_PPC_TLS = 67, + R_PPC_DTPMOD32 = 68, +Index: contrib/llvm/lib/Object/ELF.cpp +=================================================================== +--- contrib/llvm/lib/Object/ELF.cpp (revision 270019) ++++ contrib/llvm/lib/Object/ELF.cpp (working copy) +@@ -507,6 +507,7 @@ + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT16_LO); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT16_HI); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT16_HA); ++ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_PLTREL24); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_REL32); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_TLS); + LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_DTPMOD32); +Index: contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp +=================================================================== +--- contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp (revision 270019) ++++ contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp (working copy) +@@ -18,6 +18,7 @@ + #include "llvm/MC/MCExpr.h" + #include "llvm/MC/MCInst.h" + #include "llvm/MC/MCInstrInfo.h" ++#include "llvm/MC/MCSymbol.h" + #include "llvm/Support/CommandLine.h" + #include "llvm/Support/raw_ostream.h" + #include "llvm/Target/TargetOpcodes.h" +@@ -294,10 +295,16 @@ + + void PPCInstPrinter::printTLSCall(const MCInst *MI, unsigned OpNo, + raw_ostream &O) { +- printBranchOperand(MI, OpNo, O); ++ // On PPC64, VariantKind is VK_None, but on PPC32, it's VK_PLT, and it must ++ // come at the _end_ of the expression. ++ const MCOperand &Op = MI->getOperand(OpNo); ++ const MCSymbolRefExpr &refExp = cast(*Op.getExpr()); ++ O << refExp.getSymbol().getName(); + O << '('; + printOperand(MI, OpNo+1, O); + O << ')'; ++ if (refExp.getKind() != MCSymbolRefExpr::VK_None) ++ O << '@' << MCSymbolRefExpr::getVariantKindName(refExp.getKind()); + } + + +Index: contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp +=================================================================== +--- contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp (revision 270019) ++++ contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp (working copy) +@@ -64,7 +64,15 @@ + llvm_unreachable("Unimplemented"); + case PPC::fixup_ppc_br24: + case PPC::fixup_ppc_br24abs: +- Type = ELF::R_PPC_REL24; ++ switch (Modifier) { ++ default: llvm_unreachable("Unsupported Modifier"); ++ case MCSymbolRefExpr::VK_None: ++ Type = ELF::R_PPC_REL24; ++ break; ++ case MCSymbolRefExpr::VK_PLT: ++ Type = ELF::R_PPC_PLTREL24; ++ break; ++ } + break; + case PPC::fixup_ppc_brcond14: + case PPC::fixup_ppc_brcond14abs: +@@ -205,7 +213,10 @@ + Type = ELF::R_PPC64_DTPREL16_HIGHESTA; + break; + case MCSymbolRefExpr::VK_PPC_GOT_TLSGD: +- Type = ELF::R_PPC64_GOT_TLSGD16; ++ if (is64Bit()) ++ Type = ELF::R_PPC64_GOT_TLSGD16; ++ else ++ Type = ELF::R_PPC_GOT_TLSGD16; + break; + case MCSymbolRefExpr::VK_PPC_GOT_TLSGD_LO: + Type = ELF::R_PPC64_GOT_TLSGD16_LO; +@@ -217,7 +228,10 @@ + Type = ELF::R_PPC64_GOT_TLSGD16_HA; + break; + case MCSymbolRefExpr::VK_PPC_GOT_TLSLD: +- Type = ELF::R_PPC64_GOT_TLSLD16; ++ if (is64Bit()) ++ Type = ELF::R_PPC64_GOT_TLSLD16; ++ else ++ Type = ELF::R_PPC_GOT_TLSLD16; + break; + case MCSymbolRefExpr::VK_PPC_GOT_TLSLD_LO: + Type = ELF::R_PPC64_GOT_TLSLD16_LO; +@@ -313,13 +327,22 @@ + switch (Modifier) { + default: llvm_unreachable("Unsupported Modifier"); + case MCSymbolRefExpr::VK_PPC_TLSGD: +- Type = ELF::R_PPC64_TLSGD; ++ if (is64Bit()) ++ Type = ELF::R_PPC64_TLSGD; ++ else ++ Type = ELF::R_PPC_TLSGD; + break; + case MCSymbolRefExpr::VK_PPC_TLSLD: +- Type = ELF::R_PPC64_TLSLD; ++ if (is64Bit()) ++ Type = ELF::R_PPC64_TLSLD; ++ else ++ Type = ELF::R_PPC_TLSLD; + break; + case MCSymbolRefExpr::VK_PPC_TLS: +- Type = ELF::R_PPC64_TLS; ++ if (is64Bit()) ++ Type = ELF::R_PPC64_TLS; ++ else ++ Type = ELF::R_PPC_TLS; + break; + } + break; +Index: contrib/llvm/lib/Target/PowerPC/PPC.h +=================================================================== +--- contrib/llvm/lib/Target/PowerPC/PPC.h (revision 270019) ++++ contrib/llvm/lib/Target/PowerPC/PPC.h (working copy) +@@ -53,10 +53,11 @@ + // PPC Specific MachineOperand flags. + MO_NO_FLAG, + +- /// MO_DARWIN_STUB - On a symbol operand "FOO", this indicates that the +- /// reference is actually to the "FOO$stub" symbol. This is used for calls +- /// and jumps to external functions on Tiger and earlier. +- MO_DARWIN_STUB = 1, ++ /// MO_PLT_OR_STUB - On a symbol operand "FOO", this indicates that the ++ /// reference is actually to the "FOO$stub" or "FOO@plt" symbol. This is ++ /// used for calls and jumps to external functions on Tiger and earlier, and ++ /// for PIC calls on Linux and ELF systems. ++ MO_PLT_OR_STUB = 1, + + /// MO_PIC_FLAG - If this bit is set, the symbol reference is relative to + /// the function's picbase, e.g. lo16(symbol-picbase). +Index: contrib/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp +=================================================================== +--- contrib/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp (revision 270019) ++++ contrib/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp (working copy) +@@ -19,6 +19,7 @@ + #define DEBUG_TYPE "asmprinter" + #include "PPC.h" + #include "InstPrinter/PPCInstPrinter.h" ++#include "PPCMachineFunctionInfo.h" + #include "MCTargetDesc/PPCPredicates.h" + #include "MCTargetDesc/PPCMCExpr.h" + #include "PPCSubtarget.h" +@@ -29,6 +30,7 @@ + #include "llvm/ADT/StringExtras.h" + #include "llvm/Assembly/Writer.h" + #include "llvm/CodeGen/AsmPrinter.h" ++#include "llvm/CodeGen/MachineConstantPool.h" + #include "llvm/CodeGen/MachineFunctionPass.h" + #include "llvm/CodeGen/MachineInstr.h" + #include "llvm/CodeGen/MachineInstrBuilder.h" +@@ -100,6 +102,7 @@ + } + + bool doFinalization(Module &M); ++ void EmitStartOfAsmFile(Module &M); + + virtual void EmitFunctionEntryLabel(); + +@@ -325,6 +328,7 @@ + /// + void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) { + MCInst TmpInst; ++ bool isPPC64 = Subtarget.isPPC64(); + + // Lower multi-instruction pseudo operations. + switch (MI->getOpcode()) { +@@ -349,6 +353,66 @@ + OutStreamer.EmitLabel(PICBase); + return; + } ++ case PPC::GetGBRO: { ++ // Get the offset from the GOT Base Register to the GOT ++ LowerPPCMachineInstrToMCInst(MI, TmpInst, *this, Subtarget.isDarwin()); ++ MCSymbol *PICOffset = MF->getInfo()->getPICOffsetSymbol(); ++ TmpInst.setOpcode(PPC::LWZ); ++ const MCExpr *Exp = ++ MCSymbolRefExpr::Create(PICOffset, MCSymbolRefExpr::VK_None, OutContext); ++ const MCExpr *PB = ++ MCSymbolRefExpr::Create(MF->getPICBaseSymbol(), ++ MCSymbolRefExpr::VK_None, ++ OutContext); ++ const MCOperand MO = TmpInst.getOperand(1); ++ TmpInst.getOperand(1) = MCOperand::CreateExpr(MCBinaryExpr::CreateSub(Exp, ++ PB, ++ OutContext)); ++ TmpInst.addOperand(MO); ++ OutStreamer.EmitInstruction(TmpInst); ++ return; ++ } ++ case PPC::UpdateGBR: { ++ // Update the GOT Base Register to point to the GOT. It may be possible to ++ // merge this with the PPC::GetGBRO, doing it all in one step. ++ LowerPPCMachineInstrToMCInst(MI, TmpInst, *this, Subtarget.isDarwin()); ++ TmpInst.setOpcode(PPC::ADD4); ++ TmpInst.addOperand(TmpInst.getOperand(0)); ++ OutStreamer.EmitInstruction(TmpInst); ++ return; ++ } ++ case PPC::LWZtoc: { ++ // Transform %X3 = LWZtoc , %X2 ++ LowerPPCMachineInstrToMCInst(MI, TmpInst, *this, Subtarget.isDarwin()); ++ ++ // Change the opcode to LWZ, and the global address operand to be a ++ // reference to the GOT entry we will synthesize later. ++ TmpInst.setOpcode(PPC::LWZ); ++ const MachineOperand &MO = MI->getOperand(1); ++ ++ // Map symbol -> label of TOC entry ++ assert(MO.isGlobal() || MO.isCPI() || MO.isJTI()); ++ MCSymbol *MOSymbol = NULL; ++ if (MO.isGlobal()) ++ MOSymbol = getSymbol(MO.getGlobal()); ++ else if (MO.isCPI()) ++ MOSymbol = GetCPISymbol(MO.getIndex()); ++ else if (MO.isJTI()) ++ MOSymbol = GetJTISymbol(MO.getIndex()); ++ ++ MCSymbol *TOCEntry = lookUpOrCreateTOCEntry(MOSymbol); ++ ++ const MCExpr *Exp = ++ MCSymbolRefExpr::Create(TOCEntry, MCSymbolRefExpr::VK_None, ++ OutContext); ++ const MCExpr *PB = ++ MCSymbolRefExpr::Create(OutContext.GetOrCreateSymbol(Twine(".L.TOC.")), ++ OutContext); ++ Exp = MCBinaryExpr::CreateSub(Exp, PB, OutContext); ++ TmpInst.getOperand(1) = MCOperand::CreateExpr(Exp); ++ OutStreamer.EmitInstruction(TmpInst); ++ return; ++ } + case PPC::LDtocJTI: + case PPC::LDtocCPT: + case PPC::LDtoc: { +@@ -518,12 +582,13 @@ + .addExpr(SymGotTprel)); + return; + } +- case PPC::LDgotTprelL: { ++ case PPC::LDgotTprelL: ++ case PPC::LDgotTprelL32: { + // Transform %Xd = LDgotTprelL , %Xs + LowerPPCMachineInstrToMCInst(MI, TmpInst, *this, Subtarget.isDarwin()); + + // Change the opcode to LD. +- TmpInst.setOpcode(PPC::LD); ++ TmpInst.setOpcode(isPPC64 ? PPC::LD : PPC::LWZ); + const MachineOperand &MO = MI->getOperand(1); + const GlobalValue *GValue = MO.getGlobal(); + MCSymbol *MOSymbol = getSymbol(GValue); +@@ -534,6 +599,52 @@ + OutStreamer.EmitInstruction(TmpInst); + return; + } ++ ++ case PPC::PPC32PICGOT: { ++ MCSymbol *GOTSymbol = OutContext.GetOrCreateSymbol(StringRef("_GLOBAL_OFFSET_TABLE_")); ++ MCSymbol *GOTRef = OutContext.CreateTempSymbol(); ++ MCSymbol *NextInstr = OutContext.CreateTempSymbol(); ++ ++ OutStreamer.EmitInstruction(MCInstBuilder(PPC::BL) ++ // FIXME: We would like an efficient form for this, so we don't have to do ++ // a lot of extra uniquing. ++ .addExpr(MCSymbolRefExpr::Create(NextInstr, OutContext))); ++ const MCExpr *OffsExpr = ++ MCBinaryExpr::CreateSub(MCSymbolRefExpr::Create(GOTSymbol, OutContext), ++ MCSymbolRefExpr::Create(GOTRef, OutContext), ++ OutContext); ++ OutStreamer.EmitLabel(GOTRef); ++ OutStreamer.EmitValue(OffsExpr, 4); ++ OutStreamer.EmitLabel(NextInstr); ++ OutStreamer.EmitInstruction(MCInstBuilder(PPC::MFLR) ++ .addReg(MI->getOperand(0).getReg())); ++ OutStreamer.EmitInstruction(MCInstBuilder(PPC::LWZ) ++ .addReg(MI->getOperand(1).getReg()) ++ .addImm(0) ++ .addReg(MI->getOperand(0).getReg())); ++ OutStreamer.EmitInstruction(MCInstBuilder(PPC::ADD4) ++ .addReg(MI->getOperand(0).getReg()) ++ .addReg(MI->getOperand(1).getReg()) ++ .addReg(MI->getOperand(0).getReg())); ++ return; ++ } ++ case PPC::PPC32GOT: { ++ MCSymbol *GOTSymbol = OutContext.GetOrCreateSymbol(StringRef("_GLOBAL_OFFSET_TABLE_")); ++ const MCExpr *SymGotTlsL = ++ MCSymbolRefExpr::Create(GOTSymbol, MCSymbolRefExpr::VK_PPC_LO, ++ OutContext); ++ const MCExpr *SymGotTlsHA = ++ MCSymbolRefExpr::Create(GOTSymbol, MCSymbolRefExpr::VK_PPC_HA, ++ OutContext); ++ OutStreamer.EmitInstruction(MCInstBuilder(PPC::LI) ++ .addReg(MI->getOperand(0).getReg()) ++ .addExpr(SymGotTlsL)); ++ OutStreamer.EmitInstruction(MCInstBuilder(PPC::ADDIS) ++ .addReg(MI->getOperand(0).getReg()) ++ .addReg(MI->getOperand(0).getReg()) ++ .addExpr(SymGotTlsHA)); ++ return; ++ } + case PPC::ADDIStlsgdHA: { + // Transform: %Xd = ADDIStlsgdHA %X2, + // Into: %Xd = ADDIS8 %X2, sym@got@tlsgd@ha +@@ -550,31 +661,42 @@ + .addExpr(SymGotTlsGD)); + return; + } +- case PPC::ADDItlsgdL: { ++ case PPC::ADDItlsgdL: + // Transform: %Xd = ADDItlsgdL %Xs, + // Into: %Xd = ADDI8 %Xs, sym@got@tlsgd@l +- assert(Subtarget.isPPC64() && "Not supported for 32-bit PowerPC"); ++ case PPC::ADDItlsgdL32: { ++ // Transform: %Rd = ADDItlsgdL32 %Rs, ++ // Into: %Rd = ADDI %Rs, sym@got@tlsgd + const MachineOperand &MO = MI->getOperand(2); + const GlobalValue *GValue = MO.getGlobal(); + MCSymbol *MOSymbol = getSymbol(GValue); + const MCExpr *SymGotTlsGD = +- MCSymbolRefExpr::Create(MOSymbol, MCSymbolRefExpr::VK_PPC_GOT_TLSGD_LO, ++ MCSymbolRefExpr::Create(MOSymbol, Subtarget.isPPC64() ? ++ MCSymbolRefExpr::VK_PPC_GOT_TLSGD_LO : ++ MCSymbolRefExpr::VK_PPC_GOT_TLSGD, + OutContext); +- OutStreamer.EmitInstruction(MCInstBuilder(PPC::ADDI8) +- .addReg(MI->getOperand(0).getReg()) +- .addReg(MI->getOperand(1).getReg()) +- .addExpr(SymGotTlsGD)); ++ OutStreamer.EmitInstruction(MCInstBuilder(Subtarget.isPPC64() ? PPC::ADDI8 : PPC::ADDI) ++ .addReg(MI->getOperand(0).getReg()) ++ .addReg(MI->getOperand(1).getReg()) ++ .addExpr(SymGotTlsGD)); + return; + } +- case PPC::GETtlsADDR: { ++ case PPC::GETtlsADDR: + // Transform: %X3 = GETtlsADDR %X3, + // Into: BL8_NOP_TLS __tls_get_addr(sym@tlsgd) +- assert(Subtarget.isPPC64() && "Not supported for 32-bit PowerPC"); ++ case PPC::GETtlsADDR32: { ++ // Transform: %R3 = GETtlsADDR32 %R3, ++ // Into: BL_TLS __tls_get_addr(sym@tlsgd)@PLT + + StringRef Name = "__tls_get_addr"; + MCSymbol *TlsGetAddr = OutContext.GetOrCreateSymbol(Name); ++ MCSymbolRefExpr::VariantKind Kind = MCSymbolRefExpr::VK_None; ++ ++ if (!Subtarget.isPPC64() && !Subtarget.isDarwin() && ++ TM.getRelocationModel() == Reloc::PIC_) ++ Kind = MCSymbolRefExpr::VK_PLT; + const MCSymbolRefExpr *TlsRef = +- MCSymbolRefExpr::Create(TlsGetAddr, MCSymbolRefExpr::VK_None, OutContext); ++ MCSymbolRefExpr::Create(TlsGetAddr, Kind, OutContext); + const MachineOperand &MO = MI->getOperand(2); + const GlobalValue *GValue = MO.getGlobal(); + MCSymbol *MOSymbol = getSymbol(GValue); +@@ -581,7 +703,8 @@ + const MCExpr *SymVar = + MCSymbolRefExpr::Create(MOSymbol, MCSymbolRefExpr::VK_PPC_TLSGD, + OutContext); +- OutStreamer.EmitInstruction(MCInstBuilder(PPC::BL8_NOP_TLS) ++ OutStreamer.EmitInstruction(MCInstBuilder(Subtarget.isPPC64() ? ++ PPC::BL8_NOP_TLS : PPC::BL_TLS) + .addExpr(TlsRef) + .addExpr(SymVar)); + return; +@@ -602,31 +725,44 @@ + .addExpr(SymGotTlsLD)); + return; + } +- case PPC::ADDItlsldL: { ++ case PPC::ADDItlsldL: + // Transform: %Xd = ADDItlsldL %Xs, + // Into: %Xd = ADDI8 %Xs, sym@got@tlsld@l +- assert(Subtarget.isPPC64() && "Not supported for 32-bit PowerPC"); ++ case PPC::ADDItlsldL32: { ++ // Transform: %Rd = ADDItlsldL32 %Rs, ++ // Into: %Rd = ADDI %Rs, sym@got@tlsld ++ + const MachineOperand &MO = MI->getOperand(2); + const GlobalValue *GValue = MO.getGlobal(); + MCSymbol *MOSymbol = getSymbol(GValue); + const MCExpr *SymGotTlsLD = +- MCSymbolRefExpr::Create(MOSymbol, MCSymbolRefExpr::VK_PPC_GOT_TLSLD_LO, ++ MCSymbolRefExpr::Create(MOSymbol, Subtarget.isPPC64() ? ++ MCSymbolRefExpr::VK_PPC_GOT_TLSLD_LO : ++ MCSymbolRefExpr::VK_PPC_GOT_TLSLD, + OutContext); +- OutStreamer.EmitInstruction(MCInstBuilder(PPC::ADDI8) ++ OutStreamer.EmitInstruction(MCInstBuilder(Subtarget.isPPC64() ? PPC::ADDI8 : PPC::ADDI) + .addReg(MI->getOperand(0).getReg()) + .addReg(MI->getOperand(1).getReg()) + .addExpr(SymGotTlsLD)); + return; + } +- case PPC::GETtlsldADDR: { ++ case PPC::GETtlsldADDR: + // Transform: %X3 = GETtlsldADDR %X3, + // Into: BL8_NOP_TLS __tls_get_addr(sym@tlsld) +- assert(Subtarget.isPPC64() && "Not supported for 32-bit PowerPC"); ++ case PPC::GETtlsldADDR32: { ++ // Transform: %R3 = GETtlsldADDR32 %R3, ++ // Into: BL_TLS __tls_get_addr(sym@tlsld)@PLT + + StringRef Name = "__tls_get_addr"; + MCSymbol *TlsGetAddr = OutContext.GetOrCreateSymbol(Name); ++ MCSymbolRefExpr::VariantKind Kind = MCSymbolRefExpr::VK_None; ++ ++ if (!Subtarget.isPPC64() && !Subtarget.isDarwin() && ++ TM.getRelocationModel() == Reloc::PIC_) ++ Kind = MCSymbolRefExpr::VK_PLT; ++ + const MCSymbolRefExpr *TlsRef = +- MCSymbolRefExpr::Create(TlsGetAddr, MCSymbolRefExpr::VK_None, OutContext); ++ MCSymbolRefExpr::Create(TlsGetAddr, Kind, OutContext); + const MachineOperand &MO = MI->getOperand(2); + const GlobalValue *GValue = MO.getGlobal(); + MCSymbol *MOSymbol = getSymbol(GValue); +@@ -633,15 +769,19 @@ + const MCExpr *SymVar = + MCSymbolRefExpr::Create(MOSymbol, MCSymbolRefExpr::VK_PPC_TLSLD, + OutContext); +- OutStreamer.EmitInstruction(MCInstBuilder(PPC::BL8_NOP_TLS) ++ OutStreamer.EmitInstruction(MCInstBuilder(Subtarget.isPPC64() ? ++ PPC::BL8_NOP_TLS : PPC::BL_TLS) + .addExpr(TlsRef) + .addExpr(SymVar)); + return; + } +- case PPC::ADDISdtprelHA: { ++ case PPC::ADDISdtprelHA: + // Transform: %Xd = ADDISdtprelHA %X3, + // Into: %Xd = ADDIS8 %X3, sym@dtprel@ha +- assert(Subtarget.isPPC64() && "Not supported for 32-bit PowerPC"); ++ case PPC::ADDISdtprelHA32: { ++ // Transform: %Rd = ADDISdtprelHA32 %R3, ++ // Into: %Rd = ADDIS %R3, sym@dtprel@ha ++ + const MachineOperand &MO = MI->getOperand(2); + const GlobalValue *GValue = MO.getGlobal(); + MCSymbol *MOSymbol = getSymbol(GValue); +@@ -648,16 +788,18 @@ + const MCExpr *SymDtprel = + MCSymbolRefExpr::Create(MOSymbol, MCSymbolRefExpr::VK_PPC_DTPREL_HA, + OutContext); +- OutStreamer.EmitInstruction(MCInstBuilder(PPC::ADDIS8) ++ OutStreamer.EmitInstruction(MCInstBuilder(Subtarget.isPPC64() ? PPC::ADDIS8 : PPC::ADDIS) + .addReg(MI->getOperand(0).getReg()) + .addReg(PPC::X3) + .addExpr(SymDtprel)); + return; + } +- case PPC::ADDIdtprelL: { ++ case PPC::ADDIdtprelL: + // Transform: %Xd = ADDIdtprelL %Xs, + // Into: %Xd = ADDI8 %Xs, sym@dtprel@l +- assert(Subtarget.isPPC64() && "Not supported for 32-bit PowerPC"); ++ case PPC::ADDIdtprelL32: { ++ // Transform: %Rd = ADDIdtprelL32 %Rs, ++ // Into: %Rd = ADDI %Rs, sym@dtprel@l + const MachineOperand &MO = MI->getOperand(2); + const GlobalValue *GValue = MO.getGlobal(); + MCSymbol *MOSymbol = getSymbol(GValue); +@@ -664,7 +806,7 @@ + const MCExpr *SymDtprel = + MCSymbolRefExpr::Create(MOSymbol, MCSymbolRefExpr::VK_PPC_DTPREL_LO, + OutContext); +- OutStreamer.EmitInstruction(MCInstBuilder(PPC::ADDI8) ++ OutStreamer.EmitInstruction(MCInstBuilder(Subtarget.isPPC64() ? PPC::ADDI8 : PPC::ADDI) + .addReg(MI->getOperand(0).getReg()) + .addReg(MI->getOperand(1).getReg()) + .addExpr(SymDtprel)); +@@ -726,9 +868,60 @@ + OutStreamer.EmitInstruction(TmpInst); + } + ++void PPCLinuxAsmPrinter::EmitStartOfAsmFile(Module &M) { ++ if (Subtarget.isPPC64() || TM.getRelocationModel() != Reloc::PIC_) ++ return AsmPrinter::EmitStartOfAsmFile(M); ++ ++ // FIXME: The use of .got2 assumes large GOT model (-fPIC), which is not ++ // optimal for some cases. We should consider supporting small model (-fpic) ++ // as well in the future. ++ assert(TM.getCodeModel() != CodeModel::Small && ++ "Small code model PIC is currently unsupported."); ++ OutStreamer.SwitchSection(OutContext.getELFSection(".got2", ++ ELF::SHT_PROGBITS, ELF::SHF_WRITE | ELF::SHF_ALLOC, ++ SectionKind::getReadOnly())); ++ ++ MCSymbol *TOCSym = OutContext.GetOrCreateSymbol(Twine(".L.TOC.")); ++ MCSymbol *CurrentPos = OutContext.CreateTempSymbol(); ++ ++ OutStreamer.EmitLabel(CurrentPos); ++ ++ // The GOT pointer points to the middle of the GOT, in order to reference the ++ // entire 64kB range. 0x8000 is the midpoint. ++ const MCExpr *tocExpr = ++ MCBinaryExpr::CreateAdd(MCSymbolRefExpr::Create(CurrentPos, OutContext), ++ MCConstantExpr::Create(0x8000, OutContext), ++ OutContext); ++ ++ OutStreamer.EmitAssignment(TOCSym, tocExpr); ++ ++ OutStreamer.SwitchSection(getObjFileLowering().getTextSection()); ++} ++ + void PPCLinuxAsmPrinter::EmitFunctionEntryLabel() { +- if (!Subtarget.isPPC64()) // linux/ppc32 - Normal entry label. ++ // linux/ppc32 - Normal entry label. ++ if (!Subtarget.isPPC64() && TM.getRelocationModel() != Reloc::PIC_) + return AsmPrinter::EmitFunctionEntryLabel(); ++ ++ if (!Subtarget.isPPC64()) { ++ const PPCFunctionInfo *PPCFI = MF->getInfo(); ++ if (PPCFI->usesPICBase()) { ++ MCSymbol *RelocSymbol = PPCFI->getPICOffsetSymbol(); ++ MCSymbol *PICBase = MF->getPICBaseSymbol(); ++ OutStreamer.EmitLabel(RelocSymbol); ++ ++ const MCExpr *OffsExpr = ++ MCBinaryExpr::CreateSub( ++ MCSymbolRefExpr::Create(OutContext.GetOrCreateSymbol(Twine(".L.TOC.")), ++ OutContext), ++ MCSymbolRefExpr::Create(PICBase, OutContext), ++ OutContext); ++ OutStreamer.EmitValue(OffsExpr, 4); ++ OutStreamer.EmitLabel(CurrentFnSym); ++ return; ++ } else ++ return AsmPrinter::EmitFunctionEntryLabel(); ++ } + + // Emit an official procedure descriptor. + MCSectionSubPair Current = OutStreamer.getCurrentSection(); +@@ -768,10 +961,17 @@ + PPCTargetStreamer &TS = + static_cast(OutStreamer.getTargetStreamer()); + +- if (isPPC64 && !TOC.empty()) { +- const MCSectionELF *Section = OutStreamer.getContext().getELFSection(".toc", ++ if (!TOC.empty()) { ++ const MCSectionELF *Section; ++ ++ if (isPPC64) ++ Section = OutStreamer.getContext().getELFSection(".toc", + ELF::SHT_PROGBITS, ELF::SHF_WRITE | ELF::SHF_ALLOC, + SectionKind::getReadOnly()); ++ else ++ Section = OutStreamer.getContext().getELFSection(".got2", ++ ELF::SHT_PROGBITS, ELF::SHF_WRITE | ELF::SHF_ALLOC, ++ SectionKind::getReadOnly()); + OutStreamer.SwitchSection(Section); + + for (MapVector::iterator I = TOC.begin(), +@@ -778,7 +978,10 @@ + E = TOC.end(); I != E; ++I) { + OutStreamer.EmitLabel(I->second); + MCSymbol *S = OutContext.GetOrCreateSymbol(I->first->getName()); +- TS.emitTCEntry(*S); ++ if (isPPC64) ++ TS.emitTCEntry(*S); ++ else ++ OutStreamer.EmitSymbolValue(S, 4); + } + } + +Index: contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp +=================================================================== +--- contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp (revision 270019) ++++ contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp (working copy) +@@ -299,7 +299,7 @@ + const PPCRegisterInfo *RegInfo = + static_cast(MF.getTarget().getRegisterInfo()); + bool HasBP = RegInfo->hasBasePointer(MF); +- unsigned BPReg = HasBP ? (unsigned) PPC::R30 : FPReg; ++ unsigned BPReg = HasBP ? (unsigned) RegInfo->getBaseRegister(MF): FPReg; + unsigned BP8Reg = HasBP ? (unsigned) PPC::X30 : FPReg; + + for (MachineFunction::iterator BI = MF.begin(), BE = MF.end(); +@@ -344,6 +344,7 @@ + DebugLoc dl; + bool needsFrameMoves = MMI.hasDebugInfo() || + MF.getFunction()->needsUnwindTableEntry(); ++ bool isPIC = MF.getTarget().getRelocationModel() == Reloc::PIC_; + + // Get processor type. + bool isPPC64 = Subtarget.isPPC64(); +@@ -387,7 +388,7 @@ + bool HasBP = RegInfo->hasBasePointer(MF); + + unsigned SPReg = isPPC64 ? PPC::X1 : PPC::R1; +- unsigned BPReg = isPPC64 ? PPC::X30 : PPC::R30; ++ unsigned BPReg = RegInfo->getBaseRegister(MF); + unsigned FPReg = isPPC64 ? PPC::X31 : PPC::R31; + unsigned LRReg = isPPC64 ? PPC::LR8 : PPC::LR; + unsigned ScratchReg = isPPC64 ? PPC::X0 : PPC::R0; +@@ -442,7 +443,9 @@ + BPOffset = FFI->getObjectOffset(BPIndex); + } else { + BPOffset = +- PPCFrameLowering::getBasePointerSaveOffset(isPPC64, isDarwinABI); ++ PPCFrameLowering::getBasePointerSaveOffset(isPPC64, ++ isDarwinABI, ++ isPIC); + } + } + +@@ -675,6 +678,7 @@ + // Get the ABI. + bool isDarwinABI = Subtarget.isDarwinABI(); + bool isSVR4ABI = Subtarget.isSVR4ABI(); ++ bool isPIC = MF.getTarget().getRelocationModel() == Reloc::PIC_; + + // Check if the link register (LR) has been saved. + PPCFunctionInfo *FI = MF.getInfo(); +@@ -685,7 +689,7 @@ + bool HasBP = RegInfo->hasBasePointer(MF); + + unsigned SPReg = isPPC64 ? PPC::X1 : PPC::R1; +- unsigned BPReg = isPPC64 ? PPC::X30 : PPC::R30; ++ unsigned BPReg = RegInfo->getBaseRegister(MF); + unsigned FPReg = isPPC64 ? PPC::X31 : PPC::R31; + unsigned ScratchReg = isPPC64 ? PPC::X0 : PPC::R0; + unsigned TempReg = isPPC64 ? PPC::X12 : PPC::R12; // another scratch reg +@@ -725,7 +729,9 @@ + BPOffset = FFI->getObjectOffset(BPIndex); + } else { + BPOffset = +- PPCFrameLowering::getBasePointerSaveOffset(isPPC64, isDarwinABI); ++ PPCFrameLowering::getBasePointerSaveOffset(isPPC64, ++ isDarwinABI, ++ isPIC); + } + } + +@@ -902,6 +908,7 @@ + int FPSI = FI->getFramePointerSaveIndex(); + bool isPPC64 = Subtarget.isPPC64(); + bool isDarwinABI = Subtarget.isDarwinABI(); ++ bool isPIC = MF.getTarget().getRelocationModel() == Reloc::PIC_; + MachineFrameInfo *MFI = MF.getFrameInfo(); + + // If the frame pointer save index hasn't been defined yet. +@@ -916,7 +923,7 @@ + + int BPSI = FI->getBasePointerSaveIndex(); + if (!BPSI && RegInfo->hasBasePointer(MF)) { +- int BPOffset = getBasePointerSaveOffset(isPPC64, isDarwinABI); ++ int BPOffset = getBasePointerSaveOffset(isPPC64, isDarwinABI, isPIC); + // Allocate the frame index for the base pointer save area. + BPSI = MFI->CreateFixedObject(isPPC64? 8 : 4, BPOffset, true); + // Save the result. +Index: contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.h +=================================================================== +--- contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.h (revision 270019) ++++ contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.h (working copy) +@@ -96,12 +96,14 @@ + + /// getBasePointerSaveOffset - Return the previous frame offset to save the + /// base pointer. +- static unsigned getBasePointerSaveOffset(bool isPPC64, bool isDarwinABI) { ++ static unsigned getBasePointerSaveOffset(bool isPPC64, ++ bool isDarwinABI, ++ bool isPIC) { + if (isDarwinABI) + return isPPC64 ? -16U : -8U; + + // SVR4 ABI: First slot in the general register save area. +- return isPPC64 ? -16U : -8U; ++ return isPPC64 ? -16U : isPIC ? -12U : -8U; + } + + /// getLinkageSize - Return the size of the PowerPC ABI linkage area. +Index: contrib/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp +=================================================================== +--- contrib/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp (revision 270019) ++++ contrib/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp (working copy) +@@ -15,6 +15,7 @@ + #define DEBUG_TYPE "ppc-codegen" + #include "PPC.h" + #include "MCTargetDesc/PPCPredicates.h" ++#include "PPCMachineFunctionInfo.h" + #include "PPCTargetMachine.h" + #include "llvm/CodeGen/MachineFunction.h" + #include "llvm/CodeGen/MachineInstrBuilder.h" +@@ -261,9 +262,21 @@ + DebugLoc dl; + + if (PPCLowering.getPointerTy() == MVT::i32) { +- GlobalBaseReg = RegInfo->createVirtualRegister(&PPC::GPRC_NOR0RegClass); ++ if (PPCSubTarget.isTargetELF()) ++ GlobalBaseReg = PPC::R30; ++ else ++ GlobalBaseReg = ++ RegInfo->createVirtualRegister(&PPC::GPRC_NOR0RegClass); + BuildMI(FirstMBB, MBBI, dl, TII.get(PPC::MovePCtoLR)); + BuildMI(FirstMBB, MBBI, dl, TII.get(PPC::MFLR), GlobalBaseReg); ++ if (PPCSubTarget.isTargetELF()) { ++ unsigned TempReg = RegInfo->createVirtualRegister(&PPC::GPRCRegClass); ++ BuildMI(FirstMBB, MBBI, dl, ++ TII.get(PPC::GetGBRO), TempReg).addReg(GlobalBaseReg); ++ BuildMI(FirstMBB, MBBI, dl, ++ TII.get(PPC::UpdateGBR)).addReg(GlobalBaseReg).addReg(TempReg); ++ MF->getInfo()->setUsesPICBase(true); ++ } + } else { + GlobalBaseReg = RegInfo->createVirtualRegister(&PPC::G8RC_NOX0RegClass); + BuildMI(FirstMBB, MBBI, dl, TII.get(PPC::MovePCtoLR8)); +@@ -1260,7 +1273,13 @@ + return CurDAG->SelectNodeTo(N, Reg, MVT::Other, Chain); + } + case PPCISD::TOC_ENTRY: { +- assert (PPCSubTarget.isPPC64() && "Only supported for 64-bit ABI"); ++ if (PPCSubTarget.isSVR4ABI() && !PPCSubTarget.isPPC64()) { ++ SDValue GA = N->getOperand(0); ++ return CurDAG->getMachineNode(PPC::LWZtoc, dl, MVT::i32, GA, ++ N->getOperand(1)); ++ } ++ assert (PPCSubTarget.isPPC64() && ++ "Only supported for 64-bit ABI and 32-bit SVR4"); + + // For medium and large code model, we generate two instructions as + // described below. Otherwise we allow SelectCodeCommon to handle this, +@@ -1306,6 +1325,12 @@ + return CurDAG->getMachineNode(PPC::ADDItocL, dl, MVT::i64, + SDValue(Tmp, 0), GA); + } ++ case PPCISD::PPC32_PICGOT: { ++ // Generate a PIC-safe GOT reference. ++ assert(!PPCSubTarget.isPPC64() && PPCSubTarget.isSVR4ABI() && ++ "PPCISD::PPC32_PICGOT is only supported for 32-bit SVR4"); ++ return CurDAG->SelectNodeTo(N, PPC::PPC32PICGOT, PPCLowering.getPointerTy(), MVT::i32); ++ } + case PPCISD::VADD_SPLAT: { + // This expands into one of three sequences, depending on whether + // the first operand is odd or even, positive or negative. +Index: contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +=================================================================== +--- contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp (revision 270019) ++++ contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp (working copy) +@@ -670,6 +670,7 @@ + case PPCISD::ADDIS_TOC_HA: return "PPCISD::ADDIS_TOC_HA"; + case PPCISD::LD_TOC_L: return "PPCISD::LD_TOC_L"; + case PPCISD::ADDI_TOC_L: return "PPCISD::ADDI_TOC_L"; ++ case PPCISD::PPC32_GOT: return "PPCISD::PPC32_GOT"; + case PPCISD::ADDIS_GOT_TPREL_HA: return "PPCISD::ADDIS_GOT_TPREL_HA"; + case PPCISD::LD_GOT_TPREL_L: return "PPCISD::LD_GOT_TPREL_L"; + case PPCISD::ADD_TLS: return "PPCISD::ADD_TLS"; +@@ -1307,10 +1308,7 @@ + HiOpFlags = PPCII::MO_HA; + LoOpFlags = PPCII::MO_LO; + +- // Don't use the pic base if not in PIC relocation model. Or if we are on a +- // non-darwin platform. We don't support PIC on other platforms yet. +- bool isPIC = TM.getRelocationModel() == Reloc::PIC_ && +- TM.getSubtarget().isDarwin(); ++ bool isPIC = TM.getRelocationModel() == Reloc::PIC_; + if (isPIC) { + HiOpFlags |= PPCII::MO_PIC_FLAG; + LoOpFlags |= PPCII::MO_PIC_FLAG; +@@ -1366,6 +1364,15 @@ + + unsigned MOHiFlag, MOLoFlag; + bool isPIC = GetLabelAccessInfo(DAG.getTarget(), MOHiFlag, MOLoFlag); ++ ++ if (isPIC && PPCSubTarget.isSVR4ABI()) { ++ SDValue GA = DAG.getTargetConstantPool(C, PtrVT, CP->getAlignment(), ++ PPCII::MO_PIC_FLAG); ++ SDLoc DL(CP); ++ return DAG.getNode(PPCISD::TOC_ENTRY, SDLoc(CP), MVT::i32, GA, ++ DAG.getNode(PPCISD::GlobalBaseReg, DL, PtrVT)); ++ } ++ + SDValue CPIHi = + DAG.getTargetConstantPool(C, PtrVT, CP->getAlignment(), 0, MOHiFlag); + SDValue CPILo = +@@ -1387,6 +1394,15 @@ + + unsigned MOHiFlag, MOLoFlag; + bool isPIC = GetLabelAccessInfo(DAG.getTarget(), MOHiFlag, MOLoFlag); ++ ++ if (isPIC && PPCSubTarget.isSVR4ABI()) { ++ SDValue GA = DAG.getTargetJumpTable(JT->getIndex(), PtrVT, ++ PPCII::MO_PIC_FLAG); ++ SDLoc DL(GA); ++ return DAG.getNode(PPCISD::TOC_ENTRY, SDLoc(JT), PtrVT, GA, ++ DAG.getNode(PPCISD::GlobalBaseReg, DL, PtrVT)); ++ } ++ + SDValue JTIHi = DAG.getTargetJumpTable(JT->getIndex(), PtrVT, MOHiFlag); + SDValue JTILo = DAG.getTargetJumpTable(JT->getIndex(), PtrVT, MOLoFlag); + return LowerLabelRef(JTIHi, JTILo, isPIC, DAG); +@@ -1400,6 +1416,7 @@ + + unsigned MOHiFlag, MOLoFlag; + bool isPIC = GetLabelAccessInfo(DAG.getTarget(), MOHiFlag, MOLoFlag); ++ + SDValue TgtBAHi = DAG.getTargetBlockAddress(BA, PtrVT, 0, MOHiFlag); + SDValue TgtBALo = DAG.getTargetBlockAddress(BA, PtrVT, 0, MOLoFlag); + return LowerLabelRef(TgtBAHi, TgtBALo, isPIC, DAG); +@@ -1431,64 +1448,79 @@ + return DAG.getNode(PPCISD::Lo, dl, PtrVT, TGALo, Hi); + } + +- if (!is64bit) +- llvm_unreachable("only local-exec is currently supported for ppc32"); +- + if (Model == TLSModel::InitialExec) { + SDValue TGA = DAG.getTargetGlobalAddress(GV, dl, PtrVT, 0, 0); + SDValue TGATLS = DAG.getTargetGlobalAddress(GV, dl, PtrVT, 0, + PPCII::MO_TLS); +- SDValue GOTReg = DAG.getRegister(PPC::X2, MVT::i64); +- SDValue TPOffsetHi = DAG.getNode(PPCISD::ADDIS_GOT_TPREL_HA, dl, +- PtrVT, GOTReg, TGA); ++ SDValue GOTPtr; ++ if (is64bit) { ++ SDValue GOTReg = DAG.getRegister(PPC::X2, MVT::i64); ++ GOTPtr = DAG.getNode(PPCISD::ADDIS_GOT_TPREL_HA, dl, ++ PtrVT, GOTReg, TGA); ++ } else ++ GOTPtr = DAG.getNode(PPCISD::PPC32_GOT, dl, PtrVT); + SDValue TPOffset = DAG.getNode(PPCISD::LD_GOT_TPREL_L, dl, +- PtrVT, TGA, TPOffsetHi); ++ PtrVT, TGA, GOTPtr); + return DAG.getNode(PPCISD::ADD_TLS, dl, PtrVT, TPOffset, TGATLS); + } + + if (Model == TLSModel::GeneralDynamic) { + SDValue TGA = DAG.getTargetGlobalAddress(GV, dl, PtrVT, 0, 0); +- SDValue GOTReg = DAG.getRegister(PPC::X2, MVT::i64); +- SDValue GOTEntryHi = DAG.getNode(PPCISD::ADDIS_TLSGD_HA, dl, PtrVT, +- GOTReg, TGA); ++ SDValue GOTPtr; ++ if (is64bit) { ++ SDValue GOTReg = DAG.getRegister(PPC::X2, MVT::i64); ++ GOTPtr = DAG.getNode(PPCISD::ADDIS_TLSGD_HA, dl, PtrVT, ++ GOTReg, TGA); ++ } else { ++ GOTPtr = DAG.getNode(PPCISD::PPC32_PICGOT, dl, PtrVT); ++ } + SDValue GOTEntry = DAG.getNode(PPCISD::ADDI_TLSGD_L, dl, PtrVT, +- GOTEntryHi, TGA); ++ GOTPtr, TGA); + + // We need a chain node, and don't have one handy. The underlying + // call has no side effects, so using the function entry node + // suffices. + SDValue Chain = DAG.getEntryNode(); +- Chain = DAG.getCopyToReg(Chain, dl, PPC::X3, GOTEntry); +- SDValue ParmReg = DAG.getRegister(PPC::X3, MVT::i64); ++ Chain = DAG.getCopyToReg(Chain, dl, ++ is64bit ? PPC::X3 : PPC::R3, GOTEntry); ++ SDValue ParmReg = DAG.getRegister(is64bit ? PPC::X3 : PPC::R3, ++ is64bit ? MVT::i64 : MVT::i32); + SDValue TLSAddr = DAG.getNode(PPCISD::GET_TLS_ADDR, dl, + PtrVT, ParmReg, TGA); + // The return value from GET_TLS_ADDR really is in X3 already, but + // some hacks are needed here to tie everything together. The extra + // copies dissolve during subsequent transforms. +- Chain = DAG.getCopyToReg(Chain, dl, PPC::X3, TLSAddr); +- return DAG.getCopyFromReg(Chain, dl, PPC::X3, PtrVT); ++ Chain = DAG.getCopyToReg(Chain, dl, is64bit ? PPC::X3 : PPC::R3, TLSAddr); ++ return DAG.getCopyFromReg(Chain, dl, is64bit ? PPC::X3 : PPC::R3, PtrVT); + } + + if (Model == TLSModel::LocalDynamic) { + SDValue TGA = DAG.getTargetGlobalAddress(GV, dl, PtrVT, 0, 0); +- SDValue GOTReg = DAG.getRegister(PPC::X2, MVT::i64); +- SDValue GOTEntryHi = DAG.getNode(PPCISD::ADDIS_TLSLD_HA, dl, PtrVT, +- GOTReg, TGA); ++ SDValue GOTPtr; ++ if (is64bit) { ++ SDValue GOTReg = DAG.getRegister(PPC::X2, MVT::i64); ++ GOTPtr = DAG.getNode(PPCISD::ADDIS_TLSLD_HA, dl, PtrVT, ++ GOTReg, TGA); ++ } else { ++ GOTPtr = DAG.getNode(PPCISD::PPC32_PICGOT, dl, PtrVT); ++ } + SDValue GOTEntry = DAG.getNode(PPCISD::ADDI_TLSLD_L, dl, PtrVT, +- GOTEntryHi, TGA); ++ GOTPtr, TGA); + + // We need a chain node, and don't have one handy. The underlying + // call has no side effects, so using the function entry node + // suffices. + SDValue Chain = DAG.getEntryNode(); +- Chain = DAG.getCopyToReg(Chain, dl, PPC::X3, GOTEntry); +- SDValue ParmReg = DAG.getRegister(PPC::X3, MVT::i64); ++ Chain = DAG.getCopyToReg(Chain, dl, ++ is64bit ? PPC::X3 : PPC::R3, GOTEntry); ++ SDValue ParmReg = DAG.getRegister(is64bit ? PPC::X3 : PPC::R3, ++ is64bit ? MVT::i64 : MVT::i32); + SDValue TLSAddr = DAG.getNode(PPCISD::GET_TLSLD_ADDR, dl, + PtrVT, ParmReg, TGA); + // The return value from GET_TLSLD_ADDR really is in X3 already, but + // some hacks are needed here to tie everything together. The extra + // copies dissolve during subsequent transforms. +- Chain = DAG.getCopyToReg(Chain, dl, PPC::X3, TLSAddr); ++ Chain = DAG.getCopyToReg(Chain, dl, is64bit ? PPC::X3 : PPC::R3, TLSAddr); + SDValue DtvOffsetHi = DAG.getNode(PPCISD::ADDIS_DTPREL_HA, dl, PtrVT, + Chain, ParmReg, TGA); + return DAG.getNode(PPCISD::ADDI_DTPREL_L, dl, PtrVT, DtvOffsetHi, TGA); +@@ -1515,6 +1547,14 @@ + unsigned MOHiFlag, MOLoFlag; + bool isPIC = GetLabelAccessInfo(DAG.getTarget(), MOHiFlag, MOLoFlag, GV); + ++ if (isPIC && PPCSubTarget.isSVR4ABI()) { ++ SDValue GA = DAG.getTargetGlobalAddress(GV, DL, PtrVT, ++ GSDN->getOffset(), ++ PPCII::MO_PIC_FLAG); ++ return DAG.getNode(PPCISD::TOC_ENTRY, DL, MVT::i32, GA, ++ DAG.getNode(PPCISD::GlobalBaseReg, DL, MVT::i32)); ++ } ++ + SDValue GAHi = + DAG.getTargetGlobalAddress(GV, DL, PtrVT, GSDN->getOffset(), MOHiFlag); + SDValue GALo = +@@ -3214,15 +3254,18 @@ + // far-call stubs may be outside relocation limits for a BL instruction. + if (!DAG.getTarget().getSubtarget().isJITCodeModel()) { + unsigned OpFlags = 0; +- if (DAG.getTarget().getRelocationModel() != Reloc::Static && ++ if ((DAG.getTarget().getRelocationModel() != Reloc::Static && + (PPCSubTarget.getTargetTriple().isMacOSX() && + PPCSubTarget.getTargetTriple().isMacOSXVersionLT(10, 5)) && + (G->getGlobal()->isDeclaration() || +- G->getGlobal()->isWeakForLinker())) { ++ G->getGlobal()->isWeakForLinker())) || ++ (PPCSubTarget.isTargetELF() && !isPPC64 && ++ !G->getGlobal()->hasLocalLinkage() && ++ DAG.getTarget().getRelocationModel() == Reloc::PIC_)) { + // PC-relative references to external symbols should go through $stub, + // unless we're building with the leopard linker or later, which + // automatically synthesizes these stubs. +- OpFlags = PPCII::MO_DARWIN_STUB; ++ OpFlags = PPCII::MO_PLT_OR_STUB; + } + + // If the callee is a GlobalAddress/ExternalSymbol node (quite common, +@@ -3244,7 +3287,7 @@ + // PC-relative references to external symbols should go through $stub, + // unless we're building with the leopard linker or later, which + // automatically synthesizes these stubs. +- OpFlags = PPCII::MO_DARWIN_STUB; ++ OpFlags = PPCII::MO_PLT_OR_STUB; + } + + Callee = DAG.getTargetExternalSymbol(S->getSymbol(), Callee.getValueType(), +@@ -6255,7 +6298,10 @@ + // Since FP is only updated here but NOT referenced, it's treated as GPR. + unsigned FP = (PVT == MVT::i64) ? PPC::X31 : PPC::R31; + unsigned SP = (PVT == MVT::i64) ? PPC::X1 : PPC::R1; +- unsigned BP = (PVT == MVT::i64) ? PPC::X30 : PPC::R30; ++ unsigned BP = (PVT == MVT::i64) ? PPC::X30 : ++ (PPCSubTarget.isSVR4ABI() && ++ MF->getTarget().getRelocationModel() == Reloc::PIC_ ? ++ PPC::R29 : PPC::R30); + + MachineInstrBuilder MIB; + +Index: contrib/llvm/lib/Target/PowerPC/PPCISelLowering.h +=================================================================== +--- contrib/llvm/lib/Target/PowerPC/PPCISelLowering.h (revision 270019) ++++ contrib/llvm/lib/Target/PowerPC/PPCISelLowering.h (working copy) +@@ -177,6 +177,12 @@ + CR6SET, + CR6UNSET, + ++ PPC32_GOT, ++ ++ /// GPRC = address of _GLOBAL_OFFSET_TABLE_. Used by general dynamic and ++ /// local dynamic TLS on PPC32. ++ PPC32_PICGOT, ++ + /// G8RC = ADDIS_GOT_TPREL_HA %X2, Symbol - Used by the initial-exec + /// TLS model, produces an ADDIS8 instruction that adds the GOT + /// base to sym\@got\@tprel\@ha. +Index: contrib/llvm/lib/Target/PowerPC/PPCInstr64Bit.td +=================================================================== +--- contrib/llvm/lib/Target/PowerPC/PPCInstr64Bit.td (revision 270019) ++++ contrib/llvm/lib/Target/PowerPC/PPCInstr64Bit.td (working copy) +@@ -36,10 +36,6 @@ + def tocentry : Operand { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Aug 18 19:27:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E8605A4C for ; Mon, 18 Aug 2014 19:27:32 +0000 (UTC) Received: from nm8-vm0.bullet.mail.bf1.yahoo.com (nm8-vm0.bullet.mail.bf1.yahoo.com [98.139.213.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 877D03BDB for ; Mon, 18 Aug 2014 19:27:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1408390044; bh=kV/FT6R8mpByBuWhYd00+IrXEu0c8SPYDFdN7i/em3s=; h=Received:Received:Received:X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=tH5jQmG7bT+YkaIt83CALQeDg8z44zi9zWEef3Q/mnuR4lfVn1PaTHpu2dS0jcpwFexa1DJvMjrzeB8QGbiNEEj8c7uK/774LnjSKVzvVYF+En7UjCD0JS4I/cuFNAuHtM93YvFAG/mcGSgYoIBcQbaEJ1tAz/v0Fr10Q44t2DI7LcS6O9kDhbN29q8pvtgTm2id6FTs2UR6VZNjGr07gmdClz3ByIyJWohj/MjmdtZxioPmW2RPwTq2EGXkSQV9gCYs99j/jvherz4xlibQpSe5j8Zcyvm2GgUr8Hs2vpALTm7bTvM/Osi6ZrnWH9ZBdgGOM+W8qxPrD7FIu4WieQ== DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s2048; d=yahoo.com; b=Mla3bClQV86afFlPA7LFdlK8mRgD1Wpj+U/Pfvtao/YwcH4NRmgeZFBNLz/CHK9Qy57llACoQZ4jz/QNp8uQP5rJDfFzNmRD16svUf1K2ttagGE8bITmqdi9qRJsy0rOD0SsiKTgOgPmFPfFj+mx9nqRHBSE+FCs7+47D9ZtCVUNfFvUdj7nvM5npLQr9u7me1qYVVewA6l6ocdxWBWTSr1mFWADWOb38KZ96vA28pj43YYsONse4pMnviccHws1iqgaqLIsJN53cr3LNxlv+apEjDWVQIcKzIdHejvJ3BEvhQ2GSi29pfE4ryVj+bQAAAvH5BK8TaYEvYtdQfsa9g==; Received: from [66.196.81.171] by nm8.bullet.mail.bf1.yahoo.com with NNFMP; 18 Aug 2014 19:27:24 -0000 Received: from [98.139.213.9] by tm17.bullet.mail.bf1.yahoo.com with NNFMP; 18 Aug 2014 19:27:24 -0000 Received: from [127.0.0.1] by smtp109.mail.bf1.yahoo.com with NNFMP; 18 Aug 2014 19:27:24 -0000 X-Yahoo-Newman-Id: 723978.36447.bm@smtp109.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 4tpeMsEVM1kPB1ZEEiV_i.1GHIh8EgFAeVegL91mtTboJFm W9VOZTrxvwcf7ChQpbXet0bJxbelWOeYm7UiPyDoN.7t0KPW.6wbCKjblM49 _F82wsF6beU6aj6XmPWsDsoy0qDtAtRiAELPzjDGf_uc9nCL4G4z_IQvDYaG xiwufNWakqr4e41QAuvtXXgOf3HdMf1HHs7HkUFu3.aitnpQ3327TJtiajKk M3FuzQxiw8vP.tsAPPaDvuozDEyDRnKFbAS_lqAm4qFg45.HVaSB9mo7bIRa 9LHUJmlA0W9nAoiIt8AVUgY1raLDryX_UD7u0mbKUhFfmkBjyACwjdyF6W6t 1WnuJMjPab30Csl01puZMk9QFGvuQhnfmuFnljwD7ksC1a6LXFkDZbg0fQcI lWQR7STFDp34LZ6hUAqzXaIivqwNN5JT9ln5UGozUErxJcBzc3EnAblJ8aW0 ODEbZsRAg71Lt6P6i4UwIGGGxgKaSutFSRuCKMPYt7.yb.nf_ytg5I9dQm3i fR9u.b4VOaIrUoiar.IdzfdAM8xUeCSA9WRlwaP37AzC_r4gz1kswxZLm0N9 pO4oe1z7TAAl5_Hcfw5ZCQmwu8916F0pOyUHdLlpSJwa7FTl8o5ikVI9Jbg4 AYxLZ17W2kZ9LZQJejBelYAkil3k- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <53F25399.40204@freebsd.org> Date: Mon, 18 Aug 2014 14:27:21 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Dimitry Andric , Alexey Dokuchaev Subject: Re: svn commit: r270099 - in stable: 10/contrib/gcc/config/i386 9/contrib/gcc/config/i386 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> In-Reply-To: <9181921C-43BB-48C9-B63D-7C6F99D7A763@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 19:27:33 -0000 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 owner-svn-src-all@FreeBSD.ORG Mon Aug 18 19:27:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6B14EB76; Mon, 18 Aug 2014 19:27:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56F6E3BE2; Mon, 18 Aug 2014 19:27:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7IJRmlW048887; Mon, 18 Aug 2014 19:27:48 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7IJRm9P048886; Mon, 18 Aug 2014 19:27:48 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201408181927.s7IJRm9P048886@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Mon, 18 Aug 2014 19:27:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270149 - head/sys/geom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 19:27:48 -0000 Author: scottl Date: Mon Aug 18 19:27:47 2014 New Revision: 270149 URL: http://svnweb.freebsd.org/changeset/base/270149 Log: Deal explicitly with possible failures of make_dev_alias_p() in GEOM. Submitted by: Mariusz Zaborski MFC after: 3 days Modified: head/sys/geom/geom_dev.c Modified: head/sys/geom/geom_dev.c ============================================================================== --- head/sys/geom/geom_dev.c Mon Aug 18 18:07:28 2014 (r270148) +++ head/sys/geom/geom_dev.c Mon Aug 18 19:27:47 2014 (r270149) @@ -251,9 +251,10 @@ g_dev_taste(struct g_class *mp, struct g snprintf(buf, sizeof(buf), "%s%s", val, gp->name + len); freeenv(val); - make_dev_alias_p(MAKEDEV_CHECKNAME | MAKEDEV_WAITOK, - &adev, dev, "%s", buf); - adev->si_flags |= SI_UNMAPPED; + if ((make_dev_alias_p(MAKEDEV_CHECKNAME|MAKEDEV_WAITOK, + &adev, dev, "%s", buf)) != 0) + printf("Warning: unable to create device " + "alias %s\n", buf); break; } } @@ -263,6 +264,7 @@ g_dev_taste(struct g_class *mp, struct g if (adev != NULL) { adev->si_iosize_max = MAXPHYS; adev->si_drv2 = cp; + adev->si_flags |= SI_UNMAPPED; } g_dev_attrchanged(cp, "GEOM::physpath"); From owner-svn-src-all@FreeBSD.ORG Mon Aug 18 19:51:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E983D923; Mon, 18 Aug 2014 19:51:34 +0000 (UTC) Received: from mail-we0-x22d.google.com (mail-we0-x22d.google.com [IPv6:2a00:1450:400c:c03::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1AB093E90; Mon, 18 Aug 2014 19:51:33 +0000 (UTC) Received: by mail-we0-f173.google.com with SMTP id q58so5545528wes.32 for ; Mon, 18 Aug 2014 12:51:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=cRr5FczNAi2oRLtwaXxCXxbxkkgVTb9nEmHNitROVSw=; b=ZAnyeRwpQ6GPugaRGImsbHPpQUQWRBxyWnwkGkp/aaMNASGnzt4X3gFeKGD2lBYfBG xqp4uctbK9JOckPTXzB20dYPLOpxXnReIXRwJWnyDBvGjEAbQPqC2ZfDMst25oQVJ/tH FC53NIWY+y52L2VB67XYO0U9jS04npgvSrVfBoGVemcs/hmXoY7b4auVEb/+5K0QT+yH Jmc9b15P98w0pLjyZdSq07N/YudWOYu2PnO26G5L2JVyV0RamZ4cX9d7Gs3qtIla+Ddr UU/eM58yKanqF7ugUA1UsU1hGtYWvAR2YItSRgL3teGM0cQLwZcgf0sjMJVf+uLq0wBS Y7Zg== MIME-Version: 1.0 X-Received: by 10.194.110.7 with SMTP id hw7mr44902948wjb.38.1408391492187; Mon, 18 Aug 2014 12:51:32 -0700 (PDT) Sender: pluknet@gmail.com Received: by 10.217.157.137 with HTTP; Mon, 18 Aug 2014 12:51:32 -0700 (PDT) In-Reply-To: <201408181927.s7IJRm9P048886@svn.freebsd.org> References: <201408181927.s7IJRm9P048886@svn.freebsd.org> Date: Mon, 18 Aug 2014 23:51:32 +0400 X-Google-Sender-Auth: t1KCmbeg0PmhPyIugHMK6O0Ag50 Message-ID: Subject: Re: svn commit: r270149 - head/sys/geom From: Sergey Kandaurov To: Scott Long Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 19:51:35 -0000 On 18 August 2014 23:27, Scott Long wrote: > Author: scottl > Date: Mon Aug 18 19:27:47 2014 > New Revision: 270149 > URL: http://svnweb.freebsd.org/changeset/base/270149 > > Log: > Deal explicitly with possible failures of make_dev_alias_p() in GEOM. > > Submitted by: Mariusz Zaborski > MFC after: 3 days > > Modified: > head/sys/geom/geom_dev.c > > Modified: head/sys/geom/geom_dev.c > ============================================================================== > --- head/sys/geom/geom_dev.c Mon Aug 18 18:07:28 2014 (r270148) > +++ head/sys/geom/geom_dev.c Mon Aug 18 19:27:47 2014 (r270149) [...] > @@ -263,6 +264,7 @@ g_dev_taste(struct g_class *mp, struct g > if (adev != NULL) { > adev->si_iosize_max = MAXPHYS; > adev->si_drv2 = cp; > + adev->si_flags |= SI_UNMAPPED; > } > > g_dev_attrchanged(cp, "GEOM::physpath"); > This part looks unrelated. -- wbr, pluknet From owner-svn-src-all@FreeBSD.ORG Mon Aug 18 20:06:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D3F14D81; Mon, 18 Aug 2014 20:06:02 +0000 (UTC) Received: from mail-qc0-x235.google.com (mail-qc0-x235.google.com [IPv6:2607:f8b0:400d:c01::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4AC2C304B; Mon, 18 Aug 2014 20:06:02 +0000 (UTC) Received: by mail-qc0-f181.google.com with SMTP id x13so5312952qcv.40 for ; Mon, 18 Aug 2014 13:06:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type; bh=1R7B/aJ8tdPu9MHEqZe2dQafgVUJylt2hpSNgVzK4Aw=; b=IXQIYA0BKZP9Ulot7bqv+Oyw6/kI4IhFyvWCMz1uo5jAfXqi/t/XQvjRdNa03liMwN +DhtXVjCkltUQk0oU81owbZMQ7E2WD+7WjErdJ3h9pLAIoF8B80jQB2FMYOZltUzGCqa M6FGo0xIJJhI5OYqE6oOz4N7DYUra+lrm8CcdzjdxyC0xOiEU7/dhkIKwiIn5JsrMTta rXPVLbJy8DfWmVDrkktOAJaeYKKUSwKKoQ5a2AIo+lJbGtVtB58ZNpGtG67RcDkLAUpe vLN/H6RFiATQU+w+mjxciVfVQPZAFBkYQpByG2HkupfpDFnlBJx1x1rkist/tKBjARUi sWmg== X-Received: by 10.224.51.197 with SMTP id e5mr7529536qag.48.1408392360787; Mon, 18 Aug 2014 13:06:00 -0700 (PDT) Received: from kan ([2601:6:6780:7d0:226:18ff:fe00:232e]) by mx.google.com with ESMTPSA id j47sm19614368qge.46.2014.08.18.13.05.59 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Mon, 18 Aug 2014 13:06:00 -0700 (PDT) Date: Mon, 18 Aug 2014 16:05:54 -0400 From: Alexander Kabaev To: Sergey Kandaurov Subject: Re: svn commit: r270149 - head/sys/geom Message-ID: <20140818160554.121e16e7@kan> In-Reply-To: References: <201408181927.s7IJRm9P048886@svn.freebsd.org> X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.22; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/wuk0Ge=9Fkog6ad5NJY+K_r"; protocol="application/pgp-signature" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Scott Long X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 20:06:03 -0000 --Sig_/wuk0Ge=9Fkog6ad5NJY+K_r Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Mon, 18 Aug 2014 23:51:32 +0400 Sergey Kandaurov wrote: > On 18 August 2014 23:27, Scott Long wrote: > > Author: scottl > > Date: Mon Aug 18 19:27:47 2014 > > New Revision: 270149 > > URL: http://svnweb.freebsd.org/changeset/base/270149 > > > > Log: > > Deal explicitly with possible failures of make_dev_alias_p() in > > GEOM. > > > > Submitted by: Mariusz Zaborski > > MFC after: 3 days > > > > Modified: > > head/sys/geom/geom_dev.c > > > > Modified: head/sys/geom/geom_dev.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/sys/geom/geom_dev.c Mon Aug 18 18:07:28 2014 > > (r270148) +++ head/sys/geom/geom_dev.c Mon Aug 18 19:27:47 > > 2014 (r270149) > [...] > > @@ -263,6 +264,7 @@ g_dev_taste(struct g_class *mp, struct g > > if (adev !=3D NULL) { > > adev->si_iosize_max =3D MAXPHYS; > > adev->si_drv2 =3D cp; > > + adev->si_flags |=3D SI_UNMAPPED; > > } > > > > g_dev_attrchanged(cp, "GEOM::physpath"); > > >=20 > This part looks unrelated. >=20 Commit says that it deals with consequences of make_dev_alias_p failing. Preventing trap happening on said failure seems to be pretty much related to the stated goal. --=20 Alexander Kabaev --Sig_/wuk0Ge=9Fkog6ad5NJY+K_r Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iD8DBQFT8lymQ6z1jMm+XZYRAnMZAJ9ayTNO8+RXLO1KqqHMIp4OrjYK1QCaAkDQ QRUR5Kf0e3gOfk/0qE81IJc= =WcCr -----END PGP SIGNATURE----- --Sig_/wuk0Ge=9Fkog6ad5NJY+K_r-- From owner-svn-src-all@FreeBSD.ORG Mon Aug 18 20:21:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 56D7043F; Mon, 18 Aug 2014 20:21:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41B4431E9; Mon, 18 Aug 2014 20:21:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7IKLCuC073241; Mon, 18 Aug 2014 20:21:12 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7IKLCbd073240; Mon, 18 Aug 2014 20:21:12 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201408182021.s7IKLCbd073240@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 18 Aug 2014 20:21:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270150 - stable/10/bin/pkill/tests X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 20:21:13 -0000 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 owner-svn-src-all@FreeBSD.ORG Mon Aug 18 20:28:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6D9E0A61; Mon, 18 Aug 2014 20:28:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5987533C6; Mon, 18 Aug 2014 20:28:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7IKS9eM076922; Mon, 18 Aug 2014 20:28:09 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7IKS9vQ076920; Mon, 18 Aug 2014 20:28:09 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201408182028.s7IKS9vQ076920@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Mon, 18 Aug 2014 20:28:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270151 - head/sys/amd64/amd64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 20:28:09 -0000 Author: alc Date: Mon Aug 18 20:28:08 2014 New Revision: 270151 URL: http://svnweb.freebsd.org/changeset/base/270151 Log: There exists a possible sequence of page table page allocation failures starting with a superpage demotion by pmap_enter() that could result in a PV list lock being held when pmap_enter() is just about to return KERN_RESOURCE_SHORTAGE. Consequently, the KASSERT that no PV list locks are held needs to be replaced with a conditional unlock. Discussed with: kib X-MFC with: r269728 Sponsored by: EMC / Isilon Storage Division Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Mon Aug 18 20:21:12 2014 (r270150) +++ head/sys/amd64/amd64/pmap.c Mon Aug 18 20:28:08 2014 (r270151) @@ -4201,9 +4201,10 @@ retry: mpte = _pmap_allocpte(pmap, pmap_pde_pindex(va), nosleep ? NULL : &lock); if (mpte == NULL && nosleep) { - KASSERT(lock == NULL, ("lock leaked for nosleep")); - PMAP_UNLOCK(pmap); + if (lock != NULL) + rw_wunlock(lock); rw_runlock(&pvh_global_lock); + PMAP_UNLOCK(pmap); return (KERN_RESOURCE_SHORTAGE); } goto retry; From owner-svn-src-all@FreeBSD.ORG Mon Aug 18 20:55:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46A1444F; Mon, 18 Aug 2014 20:55:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 18088365E; Mon, 18 Aug 2014 20:55:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7IKtBHp090099; Mon, 18 Aug 2014 20:55:11 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7IKtBGA090097; Mon, 18 Aug 2014 20:55:11 GMT (envelope-from se@FreeBSD.org) Message-Id: <201408182055.s7IKtBGA090097@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Mon, 18 Aug 2014 20:55:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270152 - head/tools/tools/vt/keymaps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 20:55:12 -0000 Author: se Date: Mon Aug 18 20:55:11 2014 New Revision: 270152 URL: http://svnweb.freebsd.org/changeset/base/270152 Log: Minor fixes to convert-keymap.pl (conversion of 8bit characters in the form 'x' with high bit set) and to KBDFILES.map (fix encodings and comment out a few redundant keymap files). MFC after: 3 days Modified: head/tools/tools/vt/keymaps/KBDFILES.map head/tools/tools/vt/keymaps/convert-keymap.pl Modified: head/tools/tools/vt/keymaps/KBDFILES.map ============================================================================== --- head/tools/tools/vt/keymaps/KBDFILES.map Mon Aug 18 20:28:08 2014 (r270151) +++ head/tools/tools/vt/keymaps/KBDFILES.map Mon Aug 18 20:55:11 2014 (r270152) @@ -6,13 +6,13 @@ ISO8859-15 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-1 br275.iso.kbd br.kbd -ISO8859-1 br275.iso.acc.kbd br.acc.kbd -CP850 br275.cp850.kbd br.kbd.from-cp850 - -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 +#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 (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 @@ -119,11 +119,11 @@ ISO8859-1 swissgerman.macbook.acc.kbd ch 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-15 uk.iso.kbd uk.kbd +ISO8859-15 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: head/tools/tools/vt/keymaps/convert-keymap.pl ============================================================================== --- head/tools/tools/vt/keymaps/convert-keymap.pl Mon Aug 18 20:28:08 2014 (r270151) +++ head/tools/tools/vt/keymaps/convert-keymap.pl Mon Aug 18 20:55:11 2014 (r270152) @@ -46,7 +46,7 @@ sub convert_token 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) + return local_to_UCS_code(chr(ord($1))) if $C =~ m/^'(.)'$/; # character return ""; # uncovered case } From owner-svn-src-all@FreeBSD.ORG Mon Aug 18 20:58:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84F975BC; Mon, 18 Aug 2014 20:58:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70BC4367F; Mon, 18 Aug 2014 20:58:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7IKwIOg090578; Mon, 18 Aug 2014 20:58:18 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7IKwHWZ090572; Mon, 18 Aug 2014 20:58:17 GMT (envelope-from se@FreeBSD.org) Message-Id: <201408182058.s7IKwHWZ090572@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Mon, 18 Aug 2014 20:58:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270153 - head/share/syscons/keymaps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 20:58:18 -0000 Author: se Date: Mon Aug 18 20:58:17 2014 New Revision: 270153 URL: http://svnweb.freebsd.org/changeset/base/270153 Log: Fix minor problems found while converting to NEWCONS format. MFC after: 3 days Modified: head/share/syscons/keymaps/be.iso.acc.kbd head/share/syscons/keymaps/cs.latin2.qwertz.kbd head/share/syscons/keymaps/uk.iso-ctrl.kbd head/share/syscons/keymaps/uk.iso.kbd Modified: head/share/syscons/keymaps/be.iso.acc.kbd ============================================================================== --- head/share/syscons/keymaps/be.iso.acc.kbd Mon Aug 18 20:55:11 2014 (r270152) +++ head/share/syscons/keymaps/be.iso.acc.kbd Mon Aug 18 20:58:17 2014 (r270153) @@ -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: head/share/syscons/keymaps/cs.latin2.qwertz.kbd ============================================================================== --- head/share/syscons/keymaps/cs.latin2.qwertz.kbd Mon Aug 18 20:55:11 2014 (r270152) +++ head/share/syscons/keymaps/cs.latin2.qwertz.kbd Mon Aug 18 20:58:17 2014 (r270153) @@ -1,5 +1,5 @@ # Czech Standard Typewriter QWERTZ Keyboard -# by Rudolf Cejka +# by Rudolf Cejka # # $FreeBSD$ # Modified: head/share/syscons/keymaps/uk.iso-ctrl.kbd ============================================================================== --- head/share/syscons/keymaps/uk.iso-ctrl.kbd Mon Aug 18 20:55:11 2014 (r270152) +++ head/share/syscons/keymaps/uk.iso-ctrl.kbd Mon Aug 18 20:58:17 2014 (r270153) @@ -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: head/share/syscons/keymaps/uk.iso.kbd ============================================================================== --- head/share/syscons/keymaps/uk.iso.kbd Mon Aug 18 20:55:11 2014 (r270152) +++ head/share/syscons/keymaps/uk.iso.kbd Mon Aug 18 20:58:17 2014 (r270153) @@ -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 owner-svn-src-all@FreeBSD.ORG Mon Aug 18 21:04:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 230528A9; Mon, 18 Aug 2014 21:04:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F29C3740; Mon, 18 Aug 2014 21:04:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7IL4ZFV094874; Mon, 18 Aug 2014 21:04:35 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7IL4Z6C094873; Mon, 18 Aug 2014 21:04:35 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201408182104.s7IL4Z6C094873@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 18 Aug 2014 21:04:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270154 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 21:04:36 -0000 Author: imp Date: Mon Aug 18 21:04:35 2014 New Revision: 270154 URL: http://svnweb.freebsd.org/changeset/base/270154 Log: Make note about reset vs RTOE actions... Modified: head/sys/arm/at91/at91_mci.c Modified: head/sys/arm/at91/at91_mci.c ============================================================================== --- head/sys/arm/at91/at91_mci.c Mon Aug 18 20:58:17 2014 (r270153) +++ head/sys/arm/at91/at91_mci.c Mon Aug 18 21:04:35 2014 (r270154) @@ -1214,6 +1214,7 @@ at91_mci_intr(void *arg) sr, MCI_SR_BITSTRING, cmd->opcode, (cmd->opcode != 12) ? "" : (sc->flags & CMD_MULTIREAD) ? " after read" : " after write"); + /* XXX not sure RTOE needs a full reset, just a retry */ at91_mci_reset(sc); } at91_mci_next_operation(sc); From owner-svn-src-all@FreeBSD.ORG Mon Aug 18 21:04:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 716B39E6; Mon, 18 Aug 2014 21:04:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DDA43743; Mon, 18 Aug 2014 21:04:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7IL4jvx094956; Mon, 18 Aug 2014 21:04:45 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7IL4j9J094954; Mon, 18 Aug 2014 21:04:45 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201408182104.s7IL4j9J094954@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 18 Aug 2014 21:04:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270155 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 21:04:45 -0000 Author: imp Date: Mon Aug 18 21:04:44 2014 New Revision: 270155 URL: http://svnweb.freebsd.org/changeset/base/270155 Log: Create the native-xtools target. This target creates only the cross building toolchain for the host computer. This toolchain produces TARGET_ARCH and assumes the rest of the system contains libraries for the target. It is intended to be used in a "qemu-user jail" where all the binaries would otherwise be the target architecture's to build ports. However, emulation of the compilers is too slow, so we build native binaries for that. Rather than use the xdev produced binaries, with all their weird links and paths, these binaries use the native paths. They will not work unless installed into the qemu-user jail. Differential Revision: https://phabric.freebsd.org/D518 Reviewed by: sbruno@ Modified: head/Makefile head/Makefile.inc1 Modified: head/Makefile ============================================================================== --- head/Makefile Mon Aug 18 21:04:35 2014 (r270154) +++ head/Makefile Mon Aug 18 21:04:44 2014 (r270155) @@ -37,6 +37,8 @@ # xdev-build - Build cross-development tools. # xdev-install - Install cross-development tools. # xdev-links - Create traditional links in /usr/bin for cc, etc +# native-xtools - Create host binaries that produce target objects +# for use in qemu user-mode jails. # # "quick" way to test all kernel builds: # _jflag=`sysctl -n hw.ncpu` @@ -111,7 +113,7 @@ TGTS= all all-man buildenv buildenvvars _worldtmp _legacy _bootstrap-tools _cleanobj _obj \ _build-tools _cross-tools _includes _libraries _depend \ build32 builddtb distribute32 install32 xdev xdev-build xdev-install \ - xdev-links \ + xdev-links native-xtools \ TGTS+= ${SUBDIR_TARGETS} Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Mon Aug 18 21:04:35 2014 (r270154) +++ head/Makefile.inc1 Mon Aug 18 21:04:44 2014 (r270155) @@ -1243,7 +1243,7 @@ _awk= usr.bin/awk _gensnmptree= usr.sbin/bsnmpd/gensnmptree .endif -# We need to build tlbgen when we're building clang either as +# We need to build tblgen when we're building clang either as # the bootstrap compiler, or as the part of the normal build. .if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_CLANG} != "no" _clang_tblgen= \ @@ -1418,6 +1418,48 @@ cross-tools: .MAKE ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX} install .endfor +NXBENV= MAKEOBJDIRPREFIX=${OBJTREE}/nxb \ + INSTALL="sh ${.CURDIR}/tools/install.sh" \ + VERSION="${VERSION}" +NXBMAKE= ${NXBENV} ${MAKE} \ + TBLGEN=${OBJTREE}/nxb-bin/usr/bin/tblgen \ + CLANG_TBLGEN=${OBJTREE}/nxb-bin/usr/bin/clang-tblgen \ + MACHINE=${TARGET} MACHINE_ARCH=${TARGET_ARCH} \ + MK_GDB=no MK_TESTS=no \ + SSP_CFLAGS= MK_PIE=no \ + MK_HTML=no MK_INFO=no NO_LINT=yes MK_MAN=no \ + -DNO_PIC MK_PROFILE=no -DNO_SHARED \ + -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \ + MK_CLANG_FULL=no MK_LLDB=no + +native-xtools: .MAKE + mkdir -p ${OBJTREE}/nxb-bin/usr + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ + -p ${OBJTREE}/nxb-bin/usr >/dev/null + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ + -p ${OBJTREE}/nxb-bin/usr/include >/dev/null +.for _tool in \ + ${_clang_tblgen} \ + usr.bin/ar \ + ${_binutils} \ + ${_cc} \ + ${_gcc_tools} \ + ${_clang_libs} \ + ${_clang} \ + usr.bin/awk \ + usr.bin/bmake \ + usr.bin/lex \ + usr.bin/lorder \ + usr.bin/sed \ + usr.bin/yacc + ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ + cd ${.CURDIR}/${_tool} && \ + ${NXBMAKE} DIRPRFX=${_tool}/ obj && \ + ${NXBMAKE} DIRPRFX=${_tool}/ depend && \ + ${NXBMAKE} DIRPRFX=${_tool}/ all && \ + ${NXBMAKE} DIRPRFX=${_tool}/ DESTDIR=${OBJTREE}/nxb-bin install +.endfor + # # hierarchy - ensure that all the needed directories are present # From owner-svn-src-all@FreeBSD.ORG Mon Aug 18 21:07:15 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 72170BCD; Mon, 18 Aug 2014 21:07:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CF3F3774; Mon, 18 Aug 2014 21:07:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7IL7FPb095366; Mon, 18 Aug 2014 21:07:15 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7IL7CMh095352; Mon, 18 Aug 2014 21:07:12 GMT (envelope-from se@FreeBSD.org) Message-Id: <201408182107.s7IL7CMh095352@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Mon, 18 Aug 2014 21:07:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270156 - head/share/vt/keymaps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 21:07:15 -0000 Author: se Date: Mon Aug 18 21:07:12 2014 New Revision: 270156 URL: http://svnweb.freebsd.org/changeset/base/270156 Log: Fix a few conversion problems (e.g. when a keymap is derived from ISO8859-1, but shall provide an Euro sign - similar for Japanese Yen). The Brazilian keymap "br.kbd" now has accents, by default - the no-accents version has been renamed to "br.noacc.kbd". MFC after: 3 days Added: head/share/vt/keymaps/br.noacc.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/br275.cp850.kbd head/share/vt/keymaps/by.kbd (contents, props changed) - copied, changed from r270082, head/share/syscons/keymaps/by.cp1251.kbd Replaced: head/share/vt/keymaps/br.kbd - copied, changed from r270149, head/share/vt/keymaps/br.acc.kbd Deleted: head/share/vt/keymaps/br.acc.kbd Modified: head/share/vt/keymaps/INDEX.keymaps head/share/vt/keymaps/Makefile head/share/vt/keymaps/ch.acc.kbd head/share/vt/keymaps/ch.kbd head/share/vt/keymaps/cz.kbd head/share/vt/keymaps/hr.kbd head/share/vt/keymaps/jp.capsctrl.kbd head/share/vt/keymaps/jp.kbd head/share/vt/keymaps/si.kbd head/share/vt/keymaps/uk.capsctrl.kbd Modified: head/share/vt/keymaps/INDEX.keymaps ============================================================================== --- head/share/vt/keymaps/INDEX.keymaps Mon Aug 18 21:04:44 2014 (r270155) +++ head/share/vt/keymaps/INDEX.keymaps Mon Aug 18 21:07:12 2014 (r270156) @@ -56,35 +56,21 @@ 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 +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 Modified: head/share/vt/keymaps/Makefile ============================================================================== --- head/share/vt/keymaps/Makefile Mon Aug 18 21:04:44 2014 (r270155) +++ head/share/vt/keymaps/Makefile Mon Aug 18 21:07:12 2014 (r270156) @@ -4,7 +4,6 @@ FILES= INDEX.keymaps \ am.kbd \ bg.bds.ctrlcaps.kbd \ bg.bds.kbd \ - br.acc.kbd \ br.kbd \ ca.kbd \ ca-fr.kbd \ Copied and modified: head/share/vt/keymaps/br.kbd (from r270149, head/share/vt/keymaps/br.acc.kbd) ============================================================================== --- head/share/vt/keymaps/br.acc.kbd Mon Aug 18 19:27:47 2014 (r270149, copy source) +++ head/share/vt/keymaps/br.kbd Mon Aug 18 21:07:12 2014 (r270156) @@ -149,7 +149,3 @@ duml 0xa8 ( 'a' 0xe4 ) ( 'A' 0xc4 ) ( 'e' 0xeb ) ( 'E' 0xcb ) ( 'i' 0xef ) ( 'I' 0xcf ) ( 'o' 0xf6 ) ( 'O' 0xd6 ) ( 'u' 0xfc ) ( 'U' 0xdc ) ( 'y' 0xff ) - - drin 0xb0 ( 'a' 0xe5 ) ( 'A' 0xc5 ) - - dced 0xb8 ( 'c' 0xe7 ) ( 'C' 0xc7 ) Copied and modified: head/share/vt/keymaps/br.noacc.kbd (from r270082, head/share/syscons/keymaps/br275.cp850.kbd) ============================================================================== --- head/share/syscons/keymaps/br275.cp850.kbd Sun Aug 17 03:01:56 2014 (r270082, copy source) +++ head/share/vt/keymaps/br.noacc.kbd Mon Aug 18 21:07:12 2014 (r270156) @@ -5,18 +5,18 @@ # ------------------------------------------------------------------ 000 nop nop nop nop nop nop nop nop O 001 esc esc esc esc esc esc debug esc O - 002 '1' '!' nop nop 251 '!' nop nop O - 003 '2' '@' nul nul 253 '@' nul nul O - 004 '3' '#' nop nop 252 '#' nop nop O - 005 '4' '$' nop nop 156 '$' nop nop O - 006 '5' '%' nop nop 189 '%' nop nop O - 007 '6' 249 rs rs 170 168 rs rs O + 002 '1' '!' nop nop 0xb9 '!' nop nop O + 003 '2' '@' nul nul 0xb2 '@' nul nul O + 004 '3' '#' nop nop 0xb3 '#' nop nop O + 005 '4' '$' nop nop 0xa3 '$' nop nop O + 006 '5' '%' nop nop 0xa2 '%' nop nop O + 007 '6' 0xa8 rs rs 0xac 0xbf 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 245 '+' nop nop O + 013 '=' '+' nop nop 0xa7 '+' 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 @@ -29,8 +29,8 @@ 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 239 '`' nop nop 239 '`' nop nop O - 027 '[' '{' esc esc 166 '{' esc esc O + 026 0xb4 '`' nop nop 0xb4 '`' nop nop O + 027 '[' '{' esc esc 0xaa '{' esc esc 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 @@ -42,11 +42,11 @@ 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 135 128 nop nop 135 128 nop nop C + 039 0xe7 0xc7 nop nop 0xe7 0xc7 nop nop C 040 '~' '^' nop nop '~' '^' nop nop O 041 ''' '"' nop nop ''' '"' nop nop O 042 lshift lshift lshift lshift lshift lshift lshift lshift O - 043 ']' '}' gs gs 167 '}' gs gs O + 043 ']' '}' gs gs 0xba '}' gs gs 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 @@ -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 @@ -118,7 +118,7 @@ 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 248 '?' nop nop O + 115 '/' '?' nop nop 0xb0 '?' 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 Copied and modified: head/share/vt/keymaps/by.kbd (from r270082, head/share/syscons/keymaps/by.cp1251.kbd) ============================================================================== --- head/share/syscons/keymaps/by.cp1251.kbd Sun Aug 17 03:01:56 2014 (r270082, copy source) +++ head/share/vt/keymaps/by.kbd Mon Aug 18 21:07:12 2014 (r270156) @@ -87,7 +87,7 @@ 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 alock alock alock alock alock alock alock alock O + 084 alock alock alock alock alock alock alock alock 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 @@ -117,7 +117,7 @@ 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 + 132 '3' 0x2116 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 @@ -129,43 +129,43 @@ 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 'é' 'É' dc1 dc1 'q' 'Q' dc1 dc1 C - 145 'ö' 'Ö' etb etb 'w' 'W' etb etb C - 146 'ó' 'Ó' enq enq 'e' 'E' enq enq C - 147 'ê' 'Ê' dc2 dc2 'r' 'R' dc2 dc2 C - 148 'å' 'Å' dc4 dc4 't' 'T' dc4 dc4 C - 149 'í' 'Í' em em 'y' 'Y' em em C - 150 'ã' 'Ã' nak nak 'u' 'U' nak nak C - 151 'ø' 'Ø' ht ht 'i' 'I' ht ht C - 152 '¢' '¡' si si 'o' 'O' si si C - 153 'ç' 'Ç' dle dle 'p' 'P' dle dle C - 154 'õ' 'Õ' esc esc '[' '{' esc esc C + 144 0x0439 0x0419 dc1 dc1 'q' 'Q' dc1 dc1 C + 145 0x0446 0x0426 etb etb 'w' 'W' etb etb C + 146 0x0443 0x0423 enq enq 'e' 'E' enq enq C + 147 0x043a 0x041a dc2 dc2 'r' 'R' dc2 dc2 C + 148 0x0435 0x0415 dc4 dc4 't' 'T' dc4 dc4 C + 149 0x043d 0x041d em em 'y' 'Y' em em C + 150 0x0433 0x0413 nak nak 'u' 'U' nak nak C + 151 0x0448 0x0428 ht ht 'i' 'I' ht ht C + 152 0x045e 0x040e si si 'o' 'O' si si C + 153 0x0437 0x0417 dle dle 'p' 'P' dle dle C + 154 0x0445 0x0425 esc esc '[' '{' esc esc C 155 ''' ''' gs gs ']' '}' gs gs O 156 cr cr nl nl cr cr nl nl O 157 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O - 158 'ô' 'Ô' soh soh 'a' 'A' soh soh C - 159 'û' 'Û' dc3 dc3 's' 'S' dc3 dc3 C - 160 'â' 'Â' eot eot 'd' 'D' eot eot C - 161 'à' 'À' ack ack 'f' 'F' ack ack C - 162 'ï' 'Ï' bel bel 'g' 'G' bel bel C - 163 'ð' 'Ð' bs bs 'h' 'H' bs bs C - 164 'î' 'Î' nl nl 'j' 'J' nl nl C - 165 'ë' 'Ë' vt vt 'k' 'K' vt vt C - 166 'ä' 'Ä' ff ff 'l' 'L' ff ff C - 167 'æ' 'Æ' nop nop ';' ':' nop nop C - 168 'ý' 'Ý' nop nop ''' '"' nop nop C - 169 '¸' '¨' nop nop '`' '~' nop nop C + 158 0x0444 0x0424 soh soh 'a' 'A' soh soh C + 159 0x044b 0x042b dc3 dc3 's' 'S' dc3 dc3 C + 160 0x0432 0x0412 eot eot 'd' 'D' eot eot C + 161 0x0430 0x0410 ack ack 'f' 'F' ack ack C + 162 0x043f 0x041f bel bel 'g' 'G' bel bel C + 163 0x0440 0x0420 bs bs 'h' 'H' bs bs C + 164 0x043e 0x041e nl nl 'j' 'J' nl nl C + 165 0x043b 0x041b vt vt 'k' 'K' vt vt C + 166 0x0434 0x0414 ff ff 'l' 'L' ff ff C + 167 0x0436 0x0416 nop nop ';' ':' nop nop C + 168 0x044d 0x042d nop nop ''' '"' nop nop C + 169 0x0451 0x0401 nop nop '`' '~' nop nop C 170 lshift lshift lshift lshift lshift lshift lshift lshift O 171 '\' '|' fs fs '\' '|' fs fs O - 172 'ÿ' 'ß' sub sub 'z' 'Z' sub sub C - 173 '÷' '×' can can 'x' 'X' can can C - 174 'ñ' 'Ñ' etx etx 'c' 'C' etx etx C - 175 'ì' 'Ì' syn syn 'v' 'V' syn syn C - 176 '³' '²' stx stx 'b' 'B' stx stx C - 177 'ò' 'Ò' so so 'n' 'N' so so C - 178 'ü' 'Ü' cr cr 'm' 'M' cr cr C - 179 'á' 'Á' nop nop ',' '<' nop nop C - 180 'þ' 'Þ' nop nop '.' '>' nop nop C + 172 0x044f 0x042f sub sub 'z' 'Z' sub sub C + 173 0x0447 0x0427 can can 'x' 'X' can can C + 174 0x0441 0x0421 etx etx 'c' 'C' etx etx C + 175 0x043c 0x041c syn syn 'v' 'V' syn syn C + 176 0x0456 0x0406 stx stx 'b' 'B' stx stx C + 177 0x0442 0x0422 so so 'n' 'N' so so C + 178 0x044c 0x042c cr cr 'm' 'M' cr cr C + 179 0x0431 0x0411 nop nop ',' '<' nop nop C + 180 0x044e 0x042e nop nop '.' '>' nop nop C 181 '.' ',' nop nop '/' '?' nop nop O 182 rshift rshift rshift rshift rshift rshift rshift rshift O 183 '*' '*' '*' '*' '*' '*' '*' '*' O @@ -197,7 +197,7 @@ 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 alock alock alock alock alock alock alock alock O + 212 alock alock alock alock alock alock alock alock 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 Modified: head/share/vt/keymaps/ch.acc.kbd ============================================================================== --- head/share/vt/keymaps/ch.acc.kbd Mon Aug 18 21:04:44 2014 (r270155) +++ head/share/vt/keymaps/ch.acc.kbd Mon Aug 18 21:07:12 2014 (r270156) @@ -14,7 +14,7 @@ 005 '4' 0xe7 nop nop '4' 0xe7 nop nop O 006 '5' '%' nop nop '5' '%' nop nop O 007 '6' '&' nop nop 0xac 0xac nop nop O - 008 '7' '/' nop nop 0x0160 0x0160 nop nop O + 008 '7' '/' nop nop 0xa6 0xa6 nop nop O 009 '8' '(' esc esc 0xde 0xde esc esc O 010 '9' ')' gs gs '9' ')' gs gs O 011 '0' '=' nop nop '0' '=' nop nop O Modified: head/share/vt/keymaps/ch.kbd ============================================================================== --- head/share/vt/keymaps/ch.kbd Mon Aug 18 21:04:44 2014 (r270155) +++ head/share/vt/keymaps/ch.kbd Mon Aug 18 21:07:12 2014 (r270156) @@ -14,7 +14,7 @@ 005 '4' 0xe7 nop nop '4' 0xe7 nop nop O 006 '5' '%' nop nop '5' '%' nop nop O 007 '6' '&' nop nop 0xac 0xac nop nop O - 008 '7' '/' nop nop 0x0160 0x0160 nop nop O + 008 '7' '/' nop nop 0xa6 0xa6 nop nop O 009 '8' '(' esc esc 0xde 0xde esc esc O 010 '9' ')' gs gs '9' ')' gs gs O 011 '0' '=' nop nop '0' '=' nop nop O @@ -33,7 +33,7 @@ 024 'o' 'O' si si 'o' 'O' si si C 025 'p' 'P' dle dle 'p' 'P' dle dle C 026 0xfc 0xe8 esc esc '[' 0xdc esc esc C - 027 0x0161 '!' gs gs ']' ']' gs gs O + 027 0xa8 '!' 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 Modified: head/share/vt/keymaps/cz.kbd ============================================================================== --- head/share/vt/keymaps/cz.kbd Mon Aug 18 21:04:44 2014 (r270155) +++ head/share/vt/keymaps/cz.kbd Mon Aug 18 21:07:12 2014 (r270156) @@ -1,5 +1,5 @@ # Czech Standard Typewriter QWERTZ Keyboard -# by Rudolf Cejka +# by Rudolf Cejka # # $FreeBSD$ # Modified: head/share/vt/keymaps/hr.kbd ============================================================================== --- head/share/vt/keymaps/hr.kbd Mon Aug 18 21:04:44 2014 (r270155) +++ head/share/vt/keymaps/hr.kbd Mon Aug 18 21:07:12 2014 (r270156) @@ -9,17 +9,17 @@ 000 nop nop nop nop nop nop nop nop O 001 esc esc esc esc esc esc debug esc O 002 '1' '!' nop nop '~' '~' nop nop O - 003 '2' '"' nul nul 183 183 nul nul O + 003 '2' '"' nul nul 0x02c7 0x02c7 nul nul O 004 '3' '#' nop nop '^' '^' nop nop O - 005 '4' '$' nop nop 162 162 nop nop O - 006 '5' '%' nop nop 176 176 nop nop O - 007 '6' '&' rs rs 178 178 rs rs O + 005 '4' '$' nop nop 0x02d8 0x02d8 nop nop O + 006 '5' '%' nop nop 0xb0 0xb0 nop nop O + 007 '6' '&' rs rs 0x02db 0x02db rs rs O 008 '7' '/' nop nop '`' '`' nop nop O - 009 '8' '(' nop nop 255 255 nop nop O + 009 '8' '(' nop nop 0x02d9 0x02d9 nop nop O 010 '9' ')' nop nop ''' ''' nop nop O - 011 '0' '=' nop nop 189 189 nop nop O - 012 ''' '?' us us 168 168 us us O - 013 '+' '*' nop nop 184 184 nop nop O + 011 '0' '=' nop nop 0x02dd 0x02dd nop nop O + 012 ''' '?' us us 0xa8 0xa8 us us O + 013 '+' '*' nop nop 0xb8 0xb8 nop nop O 014 bs bs del del bs bs del del O 015 ht btab nop nop ht btab nop nop O 016 'q' 'Q' dc1 dc1 '\' '\' dc1 dc1 C @@ -32,8 +32,8 @@ 023 'i' 'I' ht ht 'i' 'I' ht ht C 024 'o' 'O' si si 'o' 'O' si si C 025 'p' 'P' dle dle 'p' 'P' dle dle C - 026 185 169 esc esc 247 247 esc esc C - 027 240 208 gs gs 215 215 gs gs C + 026 0x0161 0x0160 esc esc 0xf7 0xf7 esc esc C + 027 0x0111 0x0110 gs gs 0xd7 0xd7 gs gs C 028 cr cr nl nl cr cr nl nl O 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O 030 'a' 'A' soh soh 'a' 'A' soh soh C @@ -43,20 +43,20 @@ 034 'g' 'G' bel bel ']' ']' bel bel C 035 'h' 'H' bs bs 'h' 'H' bs bs C 036 'j' 'J' nl nl 'j' 'J' nl nl C - 037 'k' 'K' vt vt 179 179 vt vt C - 038 'l' 'L' ff ff 163 163 ff ff C - 039 232 200 nop nop 232 200 nop nop C - 040 230 198 nop nop 223 223 nop nop C - 041 184 168 nop nop 184 168 nop nop O + 037 'k' 'K' vt vt 0x0142 0x0142 vt vt C + 038 'l' 'L' ff ff 0x0141 0x0141 ff ff C + 039 0x010d 0x010c nop nop 0x010d 0x010c nop nop C + 040 0x0107 0x0106 nop nop 0xdf 0xdf nop nop C + 041 0xb8 0xa8 nop nop 0xb8 0xa8 nop nop O 042 lshift lshift lshift lshift lshift lshift lshift lshift O - 043 190 174 fs fs 8364 8364 fs fs C + 043 0x017e 0x017d fs fs 0xa4 0xa4 fs fs C 044 'y' 'Y' em em 'y' 'Y' em em C 045 'x' 'X' can can 'x' 'X' can can C 046 'c' 'C' etx etx 'c' 'C' etx etx C 047 'v' 'V' syn syn '@' '@' syn syn C 048 'b' 'B' stx stx '{' '{' stx stx C 049 'n' 'N' so so '}' '}' so so C - 050 'm' 'M' cr cr 167 167 cr cr C + 050 'm' 'M' cr cr 0xa7 0xa7 cr cr C 051 ',' ';' nop nop '<' ';' '<' nop O 052 '.' ':' nop nop '>' ':' '>' nop O 053 '-' '_' nop nop '-' '_' nop nop O @@ -109,7 +109,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 Modified: head/share/vt/keymaps/jp.capsctrl.kbd ============================================================================== --- head/share/vt/keymaps/jp.capsctrl.kbd Mon Aug 18 21:04:44 2014 (r270155) +++ head/share/vt/keymaps/jp.capsctrl.kbd Mon Aug 18 21:07:12 2014 (r270156) @@ -117,4 +117,4 @@ 115 '\' '_' fs us '\' '_' fs us O 121 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O 123 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O - 125 '\' '|' fs fs '\' '|' fs fs O + 125 0xa5 '|' fs us 0xa5 '|' fs us O Modified: head/share/vt/keymaps/jp.kbd ============================================================================== --- head/share/vt/keymaps/jp.kbd Mon Aug 18 21:04:44 2014 (r270155) +++ head/share/vt/keymaps/jp.kbd Mon Aug 18 21:07:12 2014 (r270156) @@ -115,4 +115,4 @@ 115 '\' '_' fs us '\' '_' fs us O 121 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O 123 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O - 125 '\' '|' fs fs '\' '|' fs fs O + 125 0xa5 '|' fs us 0xa5 '|' fs us O Modified: head/share/vt/keymaps/si.kbd ============================================================================== --- head/share/vt/keymaps/si.kbd Mon Aug 18 21:04:44 2014 (r270155) +++ head/share/vt/keymaps/si.kbd Mon Aug 18 21:07:12 2014 (r270156) @@ -9,15 +9,15 @@ 000 nop nop nop nop nop nop nop nop O 001 esc esc esc esc esc esc debug esc O 002 '1' '!' nop nop '~' '~' nop nop O - 003 '2' '"' nul nul 0xb7 0xb7 nul nul O + 003 '2' '"' nul nul 0x02c7 0x02c7 nul nul O 004 '3' '#' nop nop '^' '^' nop nop O - 005 '4' '$' nop nop 0xa2 0xa2 nop nop O + 005 '4' '$' nop nop 0x02d8 0x02d8 nop nop O 006 '5' '%' nop nop 0xb0 0xb0 nop nop O - 007 '6' '&' rs rs 0xb2 0xb2 rs rs O + 007 '6' '&' rs rs 0x02db 0x02db rs rs O 008 '7' '/' nop nop '`' '`' nop nop O - 009 '8' '(' nop nop 0xff 0xff nop nop O + 009 '8' '(' nop nop 0x02d9 0x02d9 nop nop O 010 '9' ')' nop nop ''' ''' nop nop O - 011 '0' '=' nop nop 0x0266 0x0266 nop nop O + 011 '0' '=' nop nop 0x02dd 0x02dd nop nop O 012 ''' '?' us us 0xa8 0xa8 us us O 013 '+' '*' nop nop 0xb8 0xb8 nop nop O 014 bs bs del del bs bs del del O @@ -32,8 +32,8 @@ 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 0xb9 0xa9 esc esc 0xf7 0xf7 esc esc C - 027 0xf0 0xd0 gs gs 0xd7 0xd7 gs gs C + 026 0x0161 0x0160 esc esc 0xf7 0xf7 esc esc C + 027 0x0111 0x0110 gs gs 0xd7 0xd7 gs gs C 028 cr cr nl nl cr cr nl nl O 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O 030 'a' 'A' soh soh 'a' 'A' soh soh C @@ -43,13 +43,13 @@ 034 'g' 'G' bel bel ']' ']' bel bel C 035 'h' 'H' bs bs 'h' 'H' bs bs C 036 'j' 'J' nl nl 'j' 'J' nl nl C - 037 'k' 'K' vt vt 0xb3 0xb3 vt vt C - 038 'l' 'L' ff ff 0xa3 0xa3 ff ff C - 039 0xe8 0xc8 nop nop 0xe8 0xc8 nop nop C - 040 0xe6 0xc6 nop nop 0xdf 0xdf nop nop C + 037 'k' 'K' vt vt 0x0142 0x0142 vt vt C + 038 'l' 'L' ff ff 0x0141 0x0141 ff ff C + 039 0x010d 0x010c nop nop 0x010d 0x010c nop nop C + 040 0x0107 0x0106 nop nop 0xdf 0xdf nop nop C 041 0xb8 0xa8 nop nop 0xb8 0xa8 nop nop O 042 lshift lshift lshift lshift lshift lshift lshift lshift O - 043 0x017e 0x017d fs fs 0xa4 0xa4 fs fs C + 043 0x017e 0x017d fs fs 0xa4 0xa4 fs fs C 044 'y' 'Y' em em 'y' 'Y' em em C 045 'x' 'X' can can 'x' 'X' can can C 046 'c' 'C' etx etx 'c' 'C' etx etx C Modified: head/share/vt/keymaps/uk.capsctrl.kbd ============================================================================== --- head/share/vt/keymaps/uk.capsctrl.kbd Mon Aug 18 21:04:44 2014 (r270155) +++ head/share/vt/keymaps/uk.capsctrl.kbd Mon Aug 18 21:07:12 2014 (r270156) @@ -46,7 +46,7 @@ 040 ''' '@' nul nul ''' '@' nul nul O 041 '`' 0xac 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 owner-svn-src-all@FreeBSD.ORG Mon Aug 18 21:12:15 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D41AEF4; Mon, 18 Aug 2014 21:12:15 +0000 (UTC) Received: from mail-wi0-x22a.google.com (mail-wi0-x22a.google.com [IPv6:2a00:1450:400c:c05::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B0DC73827; Mon, 18 Aug 2014 21:12:14 +0000 (UTC) Received: by mail-wi0-f170.google.com with SMTP id f8so4297834wiw.3 for ; Mon, 18 Aug 2014 14:12:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=38QGDx4ph54hc9DHiudufCUQPgXfXknT6IC7QzEkAok=; b=VY+XcBtULMvZfCKfvo02xLSTnfZsRExa+puQUvjkw9qUU1qWyUBRZ61cPBPsoRbKpi gqmXDWA6qUFdmOe1zhIH7F0DlVcvDVu5rGhgN+kOZzj+XwP3nh3vlmiWaqWRIDPPrDvN nXMYmjT8wXPt62BfDXkEx+i4DlYCr/5fPLPQN3BfjhRjrs/hqcy9BaBtEs7If19bSs9q 2VycUNcR0MjeeXoMZ85bhU/1m+5+5YBPMS5kvdKilYsXXGRnuSzqwLZL2RWz4OuabHz3 PCwLNdAE4Uf/FNpqSWr5EG4zjDwz5J5V2srjoagTEy7rwROrQ9hW9ukifyGUFf/yq0zm YHdA== MIME-Version: 1.0 X-Received: by 10.180.75.49 with SMTP id z17mr1609756wiv.80.1408396332506; Mon, 18 Aug 2014 14:12:12 -0700 (PDT) Sender: pluknet@gmail.com Received: by 10.217.157.137 with HTTP; Mon, 18 Aug 2014 14:12:12 -0700 (PDT) In-Reply-To: <20140818160554.121e16e7@kan> References: <201408181927.s7IJRm9P048886@svn.freebsd.org> <20140818160554.121e16e7@kan> Date: Tue, 19 Aug 2014 01:12:12 +0400 X-Google-Sender-Auth: Cc4fYOLb5mRATgFaDLsAlfQOiBM Message-ID: Subject: Re: svn commit: r270149 - head/sys/geom From: Sergey Kandaurov To: Alexander Kabaev Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Scott Long X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 21:12:15 -0000 On 19 August 2014 00:05, Alexander Kabaev wrote: > On Mon, 18 Aug 2014 23:51:32 +0400 > Sergey Kandaurov wrote: > >> On 18 August 2014 23:27, Scott Long wrote: >> > Author: scottl >> > Date: Mon Aug 18 19:27:47 2014 >> > New Revision: 270149 >> > URL: http://svnweb.freebsd.org/changeset/base/270149 >> > >> > Log: >> > Deal explicitly with possible failures of make_dev_alias_p() in >> > GEOM. >> > >> > Submitted by: Mariusz Zaborski >> > MFC after: 3 days >> > >> > Modified: >> > head/sys/geom/geom_dev.c >> > >> > Modified: head/sys/geom/geom_dev.c >> > ============================================================================== >> > --- head/sys/geom/geom_dev.c Mon Aug 18 18:07:28 2014 >> > (r270148) +++ head/sys/geom/geom_dev.c Mon Aug 18 19:27:47 >> > 2014 (r270149) >> [...] >> > @@ -263,6 +264,7 @@ g_dev_taste(struct g_class *mp, struct g >> > if (adev != NULL) { >> > adev->si_iosize_max = MAXPHYS; >> > adev->si_drv2 = cp; >> > + adev->si_flags |= SI_UNMAPPED; >> > } >> > >> > g_dev_attrchanged(cp, "GEOM::physpath"); >> > >> >> This part looks unrelated. >> > > Commit says that it deals with consequences of make_dev_alias_p > failing. Preventing trap happening on said failure seems to be > pretty much related to the stated goal. I missed setting SI_UNMAPPED was already there, nevermind. -- wbr, pluknet From owner-svn-src-all@FreeBSD.ORG Mon Aug 18 22:53:49 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8340E221; Mon, 18 Aug 2014 22:53:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6CF1830B1; Mon, 18 Aug 2014 22:53:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7IMrnf2044494; Mon, 18 Aug 2014 22:53:49 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7IMrmSF044491; Mon, 18 Aug 2014 22:53:48 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201408182253.s7IMrmSF044491@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Mon, 18 Aug 2014 22:53:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270157 - in stable/10/sys: kern ufs/ffs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 22:53:49 -0000 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 owner-svn-src-all@FreeBSD.ORG Mon Aug 18 23:45:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5E01E9B1; Mon, 18 Aug 2014 23:45:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4917C350F; Mon, 18 Aug 2014 23:45:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7INjfgC066905; Mon, 18 Aug 2014 23:45:41 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7INjeWX066897; Mon, 18 Aug 2014 23:45:40 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201408182345.s7INjeWX066897@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Mon, 18 Aug 2014 23:45:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270158 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 23:45:41 -0000 Author: marcel Date: Mon Aug 18 23:45:40 2014 New Revision: 270158 URL: http://svnweb.freebsd.org/changeset/base/270158 Log: For vendors like Juniper, extensibility for sockets is important. A good example is socket options that aren't necessarily generic. To this end, OSD is added to the socket structure and hooks are defined for key operations on sockets. These are: o soalloc() and sodealloc() o Get and set socket options o Socket related kevent filters. One aspect about hhook that appears to be not fully baked is the return semantics (the return value from the hook is ignored in hhook_run_hooks() at the time of commit). To support return values, the socket_hhook_data structure contains a 'status' field to hold return values. Submitted by: Anuranjan Shukla Obtained from: Juniper Networks, Inc. Modified: head/sys/kern/uipc_socket.c head/sys/sys/hhook.h head/sys/sys/khelp.h head/sys/sys/socketvar.h Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Mon Aug 18 22:53:48 2014 (r270157) +++ head/sys/kern/uipc_socket.c Mon Aug 18 23:45:40 2014 (r270158) @@ -118,7 +118,9 @@ __FBSDID("$FreeBSD$"); #include #include #include /* for struct knote */ +#include #include +#include #include #include #include @@ -157,6 +159,7 @@ static int filt_soread(struct knote *kn, static void filt_sowdetach(struct knote *kn); static int filt_sowrite(struct knote *kn, long hint); static int filt_solisten(struct knote *kn, long hint); +static int inline hhook_run_socket(struct socket *so, void *hctx, int32_t h_id); static struct filterops solisten_filtops = { .f_isfd = 1, @@ -183,6 +186,9 @@ MALLOC_DEFINE(M_PCB, "pcb", "protocol co VNET_ASSERT(curvnet != NULL, \ ("%s:%d curvnet is NULL, so=%p", __func__, __LINE__, (so))); +VNET_DEFINE(struct hhook_head *, socket_hhh[HHOOK_SOCKET_LAST + 1]); +#define V_socket_hhh VNET(socket_hhh) + /* * Limit on the number of connections in the listen queue waiting * for accept(2). @@ -255,8 +261,19 @@ socket_zone_change(void *tag) } static void +socket_hhook_register(int subtype) +{ + + if (hhook_head_register(HHOOK_TYPE_SOCKET, subtype, + &V_socket_hhh[subtype], + HHOOK_NOWAIT|HHOOK_HEADISINVNET) != 0) + printf("%s: WARNING: unable to register hook\n", __func__); +} + +static void socket_init(void *tag) { + int i; socket_zone = uma_zcreate("socket", sizeof(struct socket), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); @@ -264,6 +281,11 @@ socket_init(void *tag) uma_zone_set_warning(socket_zone, "kern.ipc.maxsockets limit reached"); EVENTHANDLER_REGISTER(maxsockets_change, socket_zone_change, NULL, EVENTHANDLER_PRI_FIRST); + + /* We expect a contiguous range */ + for (i = 0; i <= HHOOK_SOCKET_LAST; i++) { + socket_hhook_register(i); + } } SYSINIT(socket, SI_SUB_PROTO_DOMAININIT, SI_ORDER_ANY, socket_init, NULL); @@ -333,6 +355,11 @@ soalloc(struct vnet *vnet) return (NULL); } #endif + if (khelp_init_osd(HELPER_CLASS_SOCKET, &so->osd)) { + uma_zfree(socket_zone, so); + return (NULL); + } + SOCKBUF_LOCK_INIT(&so->so_snd, "so_snd"); SOCKBUF_LOCK_INIT(&so->so_rcv, "so_rcv"); sx_init(&so->so_snd.sb_sx, "so_snd_sx"); @@ -348,6 +375,13 @@ soalloc(struct vnet *vnet) so->so_vnet = vnet; #endif mtx_unlock(&so_global_mtx); + + /* We shouldn't need the so_global_mtx */ + if (V_socket_hhh[HHOOK_SOCKET_CREATE]->hhh_nhooks > 0) { + if (hhook_run_socket(so, NULL, HHOOK_SOCKET_CREATE)) + /* Do we need more comprehensive error returns? */ + return (NULL); + } return (so); } @@ -384,7 +418,11 @@ sodealloc(struct socket *so) #ifdef MAC mac_socket_destroy(so); #endif + if (V_socket_hhh[HHOOK_SOCKET_CLOSE]->hhh_nhooks > 0) + hhook_run_socket(so, NULL, HHOOK_SOCKET_CLOSE); + crfree(so->so_cred); + khelp_destroy_osd(&so->osd); sx_destroy(&so->so_snd.sb_sx); sx_destroy(&so->so_rcv.sb_sx); SOCKBUF_LOCK_DESTROY(&so->so_snd); @@ -2328,6 +2366,25 @@ sorflush(struct socket *so) } /* + * Wrapper for Socket established helper hook. + * Parameters: socket, context of the hook point, hook id. + */ +static int inline +hhook_run_socket(struct socket *so, void *hctx, int32_t h_id) +{ + struct socket_hhook_data hhook_data = { + .so = so, + .hctx = hctx, + .m = NULL + }; + + hhook_run_hooks(V_socket_hhh[h_id], &hhook_data, &so->osd); + + /* Ugly but needed, since hhooks return void for now */ + return (hhook_data.status); +} + +/* * Perhaps this routine, and sooptcopyout(), below, ought to come in an * additional variant to handle the case where the option value needs to be * some kind of integer, but not a specific size. In addition to their use @@ -2572,7 +2629,11 @@ sosetopt(struct socket *so, struct socko break; default: - error = ENOPROTOOPT; + if (V_socket_hhh[HHOOK_SOCKET_OPT]->hhh_nhooks > 0) + error = hhook_run_socket(so, sopt, + HHOOK_SOCKET_OPT); + else + error = ENOPROTOOPT; break; } if (error == 0 && so->so_proto->pr_ctloutput != NULL) @@ -2755,7 +2816,11 @@ integer: goto integer; default: - error = ENOPROTOOPT; + if (V_socket_hhh[HHOOK_SOCKET_OPT]->hhh_nhooks > 0) + error = hhook_run_socket(so, sopt, + HHOOK_SOCKET_OPT); + else + error = ENOPROTOOPT; break; } } @@ -3160,10 +3225,20 @@ filt_soread(struct knote *kn, long hint) return (1); } else if (so->so_error) /* temporary udp error */ return (1); - else if (kn->kn_sfflags & NOTE_LOWAT) - return (kn->kn_data >= kn->kn_sdata); - else - return (so->so_rcv.sb_cc >= so->so_rcv.sb_lowat); + + if (kn->kn_sfflags & NOTE_LOWAT) { + if (kn->kn_data >= kn->kn_sdata) + return 1; + } else { + if (so->so_rcv.sb_cc >= so->so_rcv.sb_lowat) + return 1; + } + + if (V_socket_hhh[HHOOK_FILT_SOREAD]->hhh_nhooks > 0) + /* This hook returning non-zero indicates an event, not error */ + return (hhook_run_socket(so, NULL, HHOOK_FILT_SOREAD)); + + return (0); } static void @@ -3187,6 +3262,10 @@ filt_sowrite(struct knote *kn, long hint so = kn->kn_fp->f_data; SOCKBUF_LOCK_ASSERT(&so->so_snd); kn->kn_data = sbspace(&so->so_snd); + + if (V_socket_hhh[HHOOK_FILT_SOWRITE]->hhh_nhooks > 0) + hhook_run_socket(so, kn, HHOOK_FILT_SOWRITE); + if (so->so_snd.sb_state & SBS_CANTSENDMORE) { kn->kn_flags |= EV_EOF; kn->kn_fflags = so->so_error; Modified: head/sys/sys/hhook.h ============================================================================== --- head/sys/sys/hhook.h Mon Aug 18 22:53:48 2014 (r270157) +++ head/sys/sys/hhook.h Mon Aug 18 23:45:40 2014 (r270158) @@ -64,6 +64,7 @@ /* Helper hook types. */ #define HHOOK_TYPE_TCP 1 +#define HHOOK_TYPE_SOCKET 2 struct helper; struct osd; Modified: head/sys/sys/khelp.h ============================================================================== --- head/sys/sys/khelp.h Mon Aug 18 22:53:48 2014 (r270157) +++ head/sys/sys/khelp.h Mon Aug 18 23:45:40 2014 (r270158) @@ -55,6 +55,7 @@ struct osd; /* Helper classes. */ #define HELPER_CLASS_TCP 0x00000001 +#define HELPER_CLASS_SOCKET 0x00000002 /* Public KPI functions. */ int khelp_register_helper(struct helper *h); Modified: head/sys/sys/socketvar.h ============================================================================== --- head/sys/sys/socketvar.h Mon Aug 18 22:53:48 2014 (r270157) +++ head/sys/sys/socketvar.h Mon Aug 18 23:45:40 2014 (r270158) @@ -38,6 +38,7 @@ #include /* for struct selinfo */ #include #include +#include #include #include #include @@ -117,6 +118,7 @@ struct socket { void *so_accept_filter_arg; /* saved filter args */ char *so_accept_filter_str; /* saved user args */ } *so_accf; + struct osd osd; /* Object Specific extensions */ /* * so_fibnum, so_user_cookie and friends can be used to attach * some user-specified metadata to a socket, which then can be @@ -292,6 +294,26 @@ MALLOC_DECLARE(M_PCB); MALLOC_DECLARE(M_SONAME); #endif +/* + * Socket specific helper hook point identifiers + * Do not leave holes in the sequence, hook registration is a loop. + */ +#define HHOOK_SOCKET_OPT 0 +#define HHOOK_SOCKET_CREATE 1 +#define HHOOK_SOCKET_RCV 2 +#define HHOOK_SOCKET_SND 3 +#define HHOOK_FILT_SOREAD 4 +#define HHOOK_FILT_SOWRITE 5 +#define HHOOK_SOCKET_CLOSE 6 +#define HHOOK_SOCKET_LAST HHOOK_SOCKET_CLOSE + +struct socket_hhook_data { + struct socket *so; + struct mbuf *m; + void *hctx; /* hook point specific data*/ + int status; +}; + extern int maxsockets; extern u_long sb_max; extern so_gen_t so_gencnt; From owner-svn-src-all@FreeBSD.ORG Tue Aug 19 01:20:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3606B514; Tue, 19 Aug 2014 01:20:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D9B63C40; Tue, 19 Aug 2014 01:20:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7J1KR5C011536; Tue, 19 Aug 2014 01:20:27 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7J1KP93011521; Tue, 19 Aug 2014 01:20:25 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <201408190120.s7J1KP93011521@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Tue, 19 Aug 2014 01:20:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org 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... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 01:20:27 -0000 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 owner-svn-src-all@FreeBSD.ORG Tue Aug 19 01:31:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id C3F6A6D4; Tue, 19 Aug 2014 01:31:12 +0000 (UTC) Date: Tue, 19 Aug 2014 01:31:12 +0000 From: Alexey Dokuchaev To: Pedro Giffuni Subject: Re: svn commit: r270099 - in stable: 10/contrib/gcc/config/i386 9/contrib/gcc/config/i386 Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53F25399.40204@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 01:31:12 -0000 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 owner-svn-src-all@FreeBSD.ORG Tue Aug 19 02:19:54 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79E11C13; Tue, 19 Aug 2014 02:19:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6508330DA; Tue, 19 Aug 2014 02:19:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7J2JsN1035285; Tue, 19 Aug 2014 02:19:54 GMT (envelope-from lstewart@FreeBSD.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7J2JsF0035284; Tue, 19 Aug 2014 02:19:54 GMT (envelope-from lstewart@FreeBSD.org) Message-Id: <201408190219.s7J2JsF0035284@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: lstewart set sender to lstewart@FreeBSD.org using -f From: Lawrence Stewart Date: Tue, 19 Aug 2014 02:19:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270160 - head/sys/netinet/cc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 02:19:54 -0000 Author: lstewart Date: Tue Aug 19 02:19:53 2014 New Revision: 270160 URL: http://svnweb.freebsd.org/changeset/base/270160 Log: Destroy the "qdiffsample_zone" UMA zone on unload to avoid a use-after-unload panic easily triggered by running "sysctl -a" after unload. Reported and tested by: Grenville Armitage MFC after: 1 week Modified: head/sys/netinet/cc/cc_cdg.c Modified: head/sys/netinet/cc/cc_cdg.c ============================================================================== --- head/sys/netinet/cc/cc_cdg.c Tue Aug 19 01:20:24 2014 (r270159) +++ head/sys/netinet/cc/cc_cdg.c Tue Aug 19 02:19:53 2014 (r270160) @@ -221,6 +221,7 @@ static VNET_DEFINE(uint32_t, cdg_hold_ba /* Function prototypes. */ static int cdg_mod_init(void); +static int cdg_mod_destroy(void); static void cdg_conn_init(struct cc_var *ccv); static int cdg_cb_init(struct cc_var *ccv); static void cdg_cb_destroy(struct cc_var *ccv); @@ -234,7 +235,8 @@ struct cc_algo cdg_cc_algo = { .cb_destroy = cdg_cb_destroy, .cb_init = cdg_cb_init, .conn_init = cdg_conn_init, - .cong_signal = cdg_cong_signal + .cong_signal = cdg_cong_signal, + .mod_destroy = cdg_mod_destroy }; /* Vnet created and being initialised. */ @@ -278,6 +280,14 @@ cdg_mod_init(void) } static int +cdg_mod_destroy(void) +{ + + uma_zdestroy(qdiffsample_zone); + return (0); +} + +static int cdg_cb_init(struct cc_var *ccv) { struct cdg *cdg_data; From owner-svn-src-all@FreeBSD.ORG Tue Aug 19 03:51:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A20F8E0; Tue, 19 Aug 2014 03:51:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1BA6438F8; Tue, 19 Aug 2014 03:51:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7J3p51U075779; Tue, 19 Aug 2014 03:51:05 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7J3p5YP075777; Tue, 19 Aug 2014 03:51:05 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201408190351.s7J3p5YP075777@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 19 Aug 2014 03:51:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270161 - in head/sys: boot/fdt/dts/arm gnu/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 03:51:06 -0000 Author: imp Date: Tue Aug 19 03:51:05 2014 New Revision: 270161 URL: http://svnweb.freebsd.org/changeset/base/270161 Log: New DTS files to suppport the SAM9260EK eval board. Derived, in part, from the SAM9G20EK dts files (so that file is GPL'd). Added: head/sys/boot/fdt/dts/arm/sam9260ek.dts (contents, props changed) head/sys/gnu/dts/arm/sam9260ek_common.dtsi (contents, props changed) Added: head/sys/boot/fdt/dts/arm/sam9260ek.dts ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/fdt/dts/arm/sam9260ek.dts Tue Aug 19 03:51:05 2014 (r270161) @@ -0,0 +1,37 @@ +/* + * SAM9260EK eval board - Warner Losh public domain + * + * $FreeBSD$ + */ +/dts-v1/; +#include "sam9260ek_common.dtsi" + +/ { + model = "Atmel at91sam9260ek"; + compatible = "atmel,at91sam9260ek", "atmel,at91sam9260", "atmel,at91sam9"; + + leds { + compatible = "gpio-leds"; + + ds1 { + label = "ds1"; + gpios = <&pioA 9 0>; + linux,default-trigger = "heartbeat"; + }; + + ds5 { + label = "ds5"; + gpios = <&pioA 6 1>; + }; + }; + + aliases { + dbgu = &dbgu; + }; + + + chosen { + stdin = "dbgu"; + stdout = "dbgu"; + }; +}; Added: head/sys/gnu/dts/arm/sam9260ek_common.dtsi ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/arm/sam9260ek_common.dtsi Tue Aug 19 03:51:05 2014 (r270161) @@ -0,0 +1,217 @@ +/* + * at91sam9260ek_common.dtsi - Device Tree file for Atmel sam9260ek board + * Copyright (C) 2014 M. Warner losh + * + * Derived from: + * at91sam9g20ek_common.dtsi - Device Tree file for Atmel at91sam9g20ek board + * + * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD + * + * Licensed under GPLv2. + * + * $FreeBSD$ + */ +#include "at91sam9260.dtsi" + +/ { + + chosen { + bootargs = "mem=64M console=ttyS0,115200 root=/dev/mtdblock5 rw rootfstype=ubifs"; + }; + + memory { + reg = <0x20000000 0x4000000>; + }; + + clocks { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + main_clock: clock@0 { + compatible = "atmel,osc", "fixed-clock"; + clock-frequency = <18432000>; + }; + }; + + ahb { + apb { + pinctrl@fffff400 { + board { + pinctrl_pck0_as_mck: pck0_as_mck { + atmel,pins = + ; /* PC1 periph B */ + }; + + }; + + mmc0_slot1 { + pinctrl_board_mmc0_slot1: mmc0_slot1-board { + atmel,pins = + ; /* PC9 gpio CD pin pull up and deglitch */ + }; + }; + }; + + dbgu: serial@fffff200 { + status = "okay"; + }; + + usart0: serial@fffb0000 { + pinctrl-0 = + <&pinctrl_usart0 + &pinctrl_usart0_rts + &pinctrl_usart0_cts + &pinctrl_usart0_dtr_dsr + &pinctrl_usart0_dcd + &pinctrl_usart0_ri>; + status = "okay"; + }; + + usart1: serial@fffb4000 { + status = "okay"; + }; + + macb0: ethernet@fffc4000 { + phy-mode = "rmii"; + status = "okay"; + }; + + usb1: gadget@fffa4000 { + atmel,vbus-gpio = <&pioC 5 GPIO_ACTIVE_HIGH>; + status = "okay"; + }; + + mmc0: mmc@fffa8000 { + pinctrl-0 = < + &pinctrl_board_mmc0_slot1 + &pinctrl_mmc0_clk + &pinctrl_mmc0_slot1_cmd_dat0 + &pinctrl_mmc0_slot1_dat1_3>; + status = "okay"; + slot@1 { + reg = <1>; + bus-width = <4>; + cd-gpios = <&pioC 9 GPIO_ACTIVE_HIGH>; + }; + }; + + ssc0: ssc@fffbc000 { + status = "okay"; + pinctrl-0 = <&pinctrl_ssc0_tx>; + }; + + spi0: spi@fffc8000 { + cs-gpios = <0>, <&pioC 11 0>, <0>, <0>; + mtd_dataflash@0 { + compatible = "atmel,at45", "atmel,dataflash"; + spi-max-frequency = <50000000>; + reg = <1>; + }; + }; + + watchdog@fffffd40 { + status = "okay"; + }; + }; + + nand0: nand@40000000 { + nand-bus-width = <8>; + nand-ecc-mode = "soft"; + nand-on-flash-bbt; + status = "okay"; + + at91bootstrap@0 { + label = "at91bootstrap"; + reg = <0x0 0x20000>; + }; + + barebox@20000 { + label = "barebox"; + reg = <0x20000 0x40000>; + }; + + bareboxenv@60000 { + label = "bareboxenv"; + reg = <0x60000 0x20000>; + }; + + bareboxenv2@80000 { + label = "bareboxenv2"; + reg = <0x80000 0x20000>; + }; + + oftree@80000 { + label = "oftree"; + reg = <0xa0000 0x20000>; + }; + + kernel@a0000 { + label = "kernel"; + reg = <0xc0000 0x400000>; + }; + + rootfs@4a0000 { + label = "rootfs"; + reg = <0x4c0000 0x7800000>; + }; + + data@7ca0000 { + label = "data"; + reg = <0x7cc0000 0x8340000>; + }; + }; + + usb0: ohci@00500000 { + num-ports = <2>; + status = "okay"; + }; + }; + + i2c@0 { + status = "okay"; + + 24c512@50 { + compatible = "24c512"; + reg = <0x50>; + }; + + wm8731: wm8731@1b { + compatible = "wm8731"; + reg = <0x1b>; + }; + }; + + gpio_keys { + compatible = "gpio-keys"; + + btn3 { + label = "Button 3"; + gpios = <&pioA 30 GPIO_ACTIVE_LOW>; + linux,code = <0x103>; + gpio-key,wakeup; + }; + + btn4 { + label = "Button 4"; + gpios = <&pioA 31 GPIO_ACTIVE_LOW>; + linux,code = <0x104>; + gpio-key,wakeup; + }; + }; + + sound { + compatible = "atmel,at91sam9g20ek-wm8731-audio"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_pck0_as_mck>; + + atmel,model = "wm8731 @ AT91SAMG20EK"; + + atmel,audio-routing = + "Ext Spk", "LHPOUT", + "Int Mic", "MICIN"; + + atmel,ssc-controller = <&ssc0>; + atmel,audio-codec = <&wm8731>; + }; +}; From owner-svn-src-all@FreeBSD.ORG Tue Aug 19 03:51:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 404C1A1B; Tue, 19 Aug 2014 03:51:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2BB0838FA; Tue, 19 Aug 2014 03:51:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7J3pBik076215; Tue, 19 Aug 2014 03:51:11 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7J3pBFF076214; Tue, 19 Aug 2014 03:51:11 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201408190351.s7J3pBFF076214@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 19 Aug 2014 03:51:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270162 - head/tools/tools/nanobsd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 03:51:11 -0000 Author: imp Date: Tue Aug 19 03:51:10 2014 New Revision: 270162 URL: http://svnweb.freebsd.org/changeset/base/270162 Log: Add support for -X, which installs the native cross tools for qemu operations. Doesn't install qemu nor setup the jail, yet. Modified: head/tools/tools/nanobsd/nanobsd.sh Modified: head/tools/tools/nanobsd/nanobsd.sh ============================================================================== --- head/tools/tools/nanobsd/nanobsd.sh Tue Aug 19 03:51:05 2014 (r270161) +++ head/tools/tools/nanobsd/nanobsd.sh Tue Aug 19 03:51:10 2014 (r270162) @@ -347,6 +347,18 @@ install_kernel ( ) ( ) > ${NANO_OBJ}/_.ik 2>&1 ) +native_xtools ( ) ( + print 2 "Installing the optimized native build tools for cross env" + pprint 3 "log: ${NANO_OBJ}/_.native_xtools" + + cd ${NANO_SRC} + env TARGET_ARCH=${NANO_ARCH} \ + ${NANO_MAKE} SRCCONF=${SRCCONF} \ + __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} native-xtools \ + DESTDIR=${NANO_WORLDDIR} \ + > ${NANO_OBJ}/_.native_xtools 2>&1 +) + run_customize() ( pprint 2 "run customize scripts" @@ -920,9 +932,10 @@ do_installkernel=true do_world=true do_image=true do_copyout_partition=true +do_native_xtools=false set +e -args=`getopt Kbc:fhiknqvw $*` +args=`getopt KXbc:fhiknqvw $*` if [ $? -ne 0 ] ; then usage exit 2 @@ -938,6 +951,10 @@ do do_installkernel=false shift ;; + -X) + do_native_xtools=true + shift + ;; -b) do_world=false do_kernel=false @@ -1089,6 +1106,9 @@ clean_world make_conf_install install_world install_etc +if $do_native_xtools ; then + native_xtools +fi setup_nanobsd_etc if $do_installkernel ; then install_kernel From owner-svn-src-all@FreeBSD.ORG Tue Aug 19 04:06:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 13AE8CC8 for ; Tue, 19 Aug 2014 04:06:07 +0000 (UTC) Received: from nm25-vm1.bullet.mail.bf1.yahoo.com (nm25-vm1.bullet.mail.bf1.yahoo.com [98.139.212.155]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A92BF3A46 for ; Tue, 19 Aug 2014 04:06:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1408421162; bh=Nu2T8G3mNRFQhFttdVQk9mxeOLnhS/bKAOSbgwL4+sI=; h=Received:Received:Received:X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc:Content-Transfer-Encoding:Message-Id:References:To:X-Mailer; b=smNg78XrmrwsOJW2W7Xa6KQAmMrnXrs14zbmRuv0YoHY8sVBXyuHpvRPkCe4q+hAVPmozc3s42KuReLpRDBHHquyJs35LEiglIAcUJd8iMGxzQohMMdhEm9KftQ8gp6rpoH9qwE+U96Z0+tTSh3nW+sWzwwW3dqmD8wxzmWesT5YooY/lNmDZGyhhK9AMADbhJgxAfewrb4e1j4yH0VYB8nPfFpmCtgWL++DC401nnk2ni+lXwyKRSw2lhu7NEe3lCR12ROxg4G1ZXF7jP37IhPcLuFjDdeJYV4Y5LavvoXfoLvHHBFjVBBpGcUllLmr+0/2XaJUhCRVf5WzcKkcyg== DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s2048; d=yahoo.com; b=mqUl2reXvJpMCE5OsIsMXZygsqWPY2ZkDrZT/dfh2Q3YTC1AQb7vjYRfvxDQEU8do/aTWO/IFjHcLaz5vvK59WnI2WcnCn38hLwc39NHnNR80WQsjYdbmyUevw8DUjSKCPS+Zu1zNR28SvzpDCBHB3ABaSDqbHCAmAb8KAFLESZZMKS6bhbRP6NehkFnXrt84FtPldVHs/ucBpG+bOwhJv9rvjTOT/lPam9bYXVlDaQuztbT/TJRIek5WSMYZ9nGhjafsRBXUAS45ZE3Pc+xXA3bjEcctpLynwkmQ12QMlBOYeMrdpjB3Pf5wMVETBvnunjRobfydM6OIArteN38gQ==; Received: from [98.139.212.150] by nm25.bullet.mail.bf1.yahoo.com with NNFMP; 19 Aug 2014 04:06:02 -0000 Received: from [98.139.211.203] by tm7.bullet.mail.bf1.yahoo.com with NNFMP; 19 Aug 2014 04:06:02 -0000 Received: from [127.0.0.1] by smtp212.mail.bf1.yahoo.com with NNFMP; 19 Aug 2014 04:06:02 -0000 X-Yahoo-Newman-Id: 753276.17919.bm@smtp212.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: avF3vMcVM1kuEJ55eKOw4bjwP3.m45feVMBAAfYHHR6gXqo kfgcMdPs96eZD.OFv5CAHm4NU73wL_htpKRpGP2KVwDcOs826AXy4HYa7j27 ugQIQrlHU9rs.I8vdIc9P_T6k.x_F0X4jta1l_s5tV0Sb3ceJsGX2AfAgW.1 .yvheFbbluuZTyf3O.e0XQMC.zL9CdAaBG9xuX7fskGLgHNXDlitDv38u6m6 twqMkC2rRCG7FqO2eWjuy2L9Xqd7K52ALI69nVbPT6DI3UapKm_Zrwj7Em39 ExW4TiJLaPfFUQx3KMMKVXIFg4oOmTMstbRkxSQk1goU.45YKU11kJveENbA 56Zylmzyi9Kg59qOCTGpltaN3vE6NXBmA3u0iBOGgVl_x04coyj.pvu_G7u1 td28hh54kjIYSVnKazuiFFpqEIe9aIt4GX7a9X7blPpn1.2UjYZl.8utJsP1 gva0_pszthJFBZBmn6gyA1UpeyazD8CbpUkP9ucClvH02IEpPg2lWtQn7F9c ofH095IA8qESHXMjAoNPBqZfpuySivpRAeQ-- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r270099 - in stable: 10/contrib/gcc/config/i386 9/contrib/gcc/config/i386 From: Pedro Giffuni In-Reply-To: <20140819013112.GA5938@FreeBSD.org> Date: Mon, 18 Aug 2014 23:05:59 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <38DE0BE3-EE01-4B9C-A604-74F95FD5F084@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> To: Alexey Dokuchaev X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 04:06:07 -0000 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. >=20 > 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. >=20 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=92t 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. >=20 > 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. >=20 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 owner-svn-src-all@FreeBSD.ORG Tue Aug 19 09:02:59 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8AA0436A; Tue, 19 Aug 2014 09:02:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7666D3348; Tue, 19 Aug 2014 09:02:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7J92xRY019654; Tue, 19 Aug 2014 09:02:59 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7J92xPe019653; Tue, 19 Aug 2014 09:02:59 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201408190902.s7J92xPe019653@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Tue, 19 Aug 2014 09:02:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270165 - head/sys/dev/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 09:02:59 -0000 Author: kevlo Date: Tue Aug 19 09:02:58 2014 New Revision: 270165 URL: http://svnweb.freebsd.org/changeset/base/270165 Log: Sort ASUS section and add USB device ID of ASUS USB-AC51. Modified: head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Tue Aug 19 06:50:54 2014 (r270164) +++ head/sys/dev/usb/usbdevs Tue Aug 19 09:02:58 2014 (r270165) @@ -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 AC51 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 From owner-svn-src-all@FreeBSD.ORG Tue Aug 19 11:04:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8BC115B5; Tue, 19 Aug 2014 11:04:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7773A3D6B; Tue, 19 Aug 2014 11:04:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7JB4P1O074120; Tue, 19 Aug 2014 11:04:25 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7JB4Pp0074119; Tue, 19 Aug 2014 11:04:25 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201408191104.s7JB4Pp0074119@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 19 Aug 2014 11:04:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270166 - stable/10/sys/ofed/include/linux X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 11:04:25 -0000 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 owner-svn-src-all@FreeBSD.ORG Tue Aug 19 11:06:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4799E6F7; Tue, 19 Aug 2014 11:06:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32FEA3D81; Tue, 19 Aug 2014 11:06:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7JB6MQh074460; Tue, 19 Aug 2014 11:06:22 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7JB6Mfo074459; Tue, 19 Aug 2014 11:06:22 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201408191106.s7JB6Mfo074459@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 19 Aug 2014 11:06:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r270167 - stable/9/sys/ofed/include/linux X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 11:06:22 -0000 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 owner-svn-src-all@FreeBSD.ORG Tue Aug 19 15:04:53 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4642710F; Tue, 19 Aug 2014 15:04:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D8D238F6; Tue, 19 Aug 2014 15:04:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7JF4rP6083477; Tue, 19 Aug 2014 15:04:53 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7JF4XJq083360; Tue, 19 Aug 2014 15:04:33 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201408191504.s7JF4XJq083360@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 19 Aug 2014 15:04:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270168 - in head: . bin/rmail gnu/usr.bin/binutils/addr2line gnu/usr.bin/binutils/nm gnu/usr.bin/binutils/objcopy gnu/usr.bin/binutils/objdump gnu/usr.bin/binutils/readelf gnu/usr.bin/... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 15:04:53 -0000 Author: bdrewery Date: Tue Aug 19 15:04:32 2014 New Revision: 270168 URL: http://svnweb.freebsd.org/changeset/base/270168 Log: Revert r267233 for now. PIE support needs to be reworked. 1. 50+% of NO_PIE use is fixed by adding -fPIC to INTERNALLIB and other build-only utility libraries. 2. Another 40% is fixed by generating _pic.a variants of various libraries. 3. Some of the NO_PIE use is a bit absurd as it is disabling PIE (and ASLR) where it never would work anyhow, such as csu or loader. This suggests there may be better ways of adding support to the tree. Many of these cases can be fixed such that -fPIE will work but there is really no reason to have it in those cases. 4. Some of the uses are working around hacks done to some Makefiles that are really building libraries but have been using bsd.prog.mk because the code is cleaner. Had they been using bsd.lib.mk then NO_PIE would not have been needed. We likely do want to enable PIE by default (opt-out) for non-tree consumers (such as ports). For in-tree though we probably want to only enable PIE (opt-in) for common attack targets such as remote service daemons and setuid utilities. This is also a great performance compromise since ASLR is expected to reduce performance. As such it does not make sense to enable it in all utilities such as ls(1) that have little benefit to having it enabled. Reported by: kib Deleted: head/tools/build/options/WITH_PIE Modified: head/Makefile.inc1 head/bin/rmail/Makefile head/gnu/usr.bin/binutils/addr2line/Makefile head/gnu/usr.bin/binutils/nm/Makefile head/gnu/usr.bin/binutils/objcopy/Makefile head/gnu/usr.bin/binutils/objdump/Makefile head/gnu/usr.bin/binutils/readelf/Makefile head/gnu/usr.bin/binutils/size/Makefile head/gnu/usr.bin/binutils/strings/Makefile head/gnu/usr.bin/binutils/strip/Makefile head/gnu/usr.bin/gdb/gdb/Makefile head/gnu/usr.bin/gdb/gdbtui/Makefile head/gnu/usr.bin/gdb/kgdb/Makefile head/gnu/usr.bin/groff/src/devices/grodvi/Makefile head/gnu/usr.bin/groff/src/devices/grohtml/Makefile head/gnu/usr.bin/groff/src/devices/grolbp/Makefile head/gnu/usr.bin/groff/src/devices/grolj4/Makefile head/gnu/usr.bin/groff/src/devices/grops/Makefile head/gnu/usr.bin/groff/src/devices/grotty/Makefile head/gnu/usr.bin/groff/src/preproc/eqn/Makefile head/gnu/usr.bin/groff/src/preproc/grn/Makefile head/gnu/usr.bin/groff/src/preproc/html/Makefile head/gnu/usr.bin/groff/src/preproc/pic/Makefile head/gnu/usr.bin/groff/src/preproc/refer/Makefile head/gnu/usr.bin/groff/src/preproc/soelim/Makefile head/gnu/usr.bin/groff/src/preproc/tbl/Makefile head/gnu/usr.bin/groff/src/roff/groff/Makefile head/gnu/usr.bin/groff/src/roff/troff/Makefile head/gnu/usr.bin/groff/src/utils/addftinfo/Makefile head/gnu/usr.bin/groff/src/utils/hpftodit/Makefile head/gnu/usr.bin/groff/src/utils/indxbib/Makefile head/gnu/usr.bin/groff/src/utils/lkbib/Makefile head/gnu/usr.bin/groff/src/utils/lookbib/Makefile head/gnu/usr.bin/groff/src/utils/tfmtodit/Makefile head/gnu/usr.bin/rcs/Makefile.inc head/gnu/usr.bin/texinfo/info/Makefile head/gnu/usr.bin/texinfo/infokey/Makefile head/gnu/usr.bin/texinfo/install-info/Makefile head/gnu/usr.bin/texinfo/makeinfo/Makefile head/gnu/usr.bin/texinfo/texindex/Makefile head/kerberos5/libexec/digest-service/Makefile head/kerberos5/libexec/hprop/Makefile head/kerberos5/libexec/hpropd/Makefile head/kerberos5/libexec/ipropd-master/Makefile head/kerberos5/libexec/ipropd-slave/Makefile head/kerberos5/libexec/kadmind/Makefile head/kerberos5/libexec/kcm/Makefile head/kerberos5/libexec/kdc/Makefile head/kerberos5/libexec/kdigest/Makefile head/kerberos5/libexec/kfd/Makefile head/kerberos5/libexec/kimpersonate/Makefile head/kerberos5/libexec/kpasswdd/Makefile head/kerberos5/tools/asn1_compile/Makefile head/kerberos5/tools/slc/Makefile head/kerberos5/usr.bin/hxtool/Makefile head/kerberos5/usr.bin/kadmin/Makefile head/kerberos5/usr.bin/kcc/Makefile head/kerberos5/usr.bin/kdestroy/Makefile head/kerberos5/usr.bin/kf/Makefile head/kerberos5/usr.bin/kgetcred/Makefile head/kerberos5/usr.bin/kinit/Makefile head/kerberos5/usr.bin/kpasswd/Makefile head/kerberos5/usr.bin/ksu/Makefile head/kerberos5/usr.bin/string2key/Makefile head/kerberos5/usr.bin/verify_krb5_conf/Makefile head/kerberos5/usr.sbin/iprop-log/Makefile head/kerberos5/usr.sbin/kstash/Makefile head/kerberos5/usr.sbin/ktutil/Makefile head/lib/csu/amd64/Makefile head/lib/csu/i386-elf/Makefile head/libexec/mail.local/Makefile head/libexec/rtld-elf/Makefile head/libexec/smrsh/Makefile head/libexec/telnetd/Makefile head/sbin/fsck/Makefile head/sbin/ipf/ipf/Makefile head/sbin/ipf/ipfstat/Makefile head/sbin/ipf/ipftest/Makefile head/sbin/ipf/ipmon/Makefile head/sbin/ipf/ipnat/Makefile head/sbin/ipf/ippool/Makefile head/sbin/ipf/ipresend/Makefile head/sbin/rcorder/Makefile head/share/mk/bsd.opts.mk head/share/mk/bsd.prog.mk head/sys/boot/i386/boot2/Makefile head/sys/boot/i386/btx/btx/Makefile head/sys/boot/i386/btx/btxldr/Makefile head/sys/boot/i386/btx/lib/Makefile head/sys/boot/i386/loader/Makefile head/sys/boot/mips/beri/boot2/Makefile head/sys/boot/mips/beri/loader/Makefile head/sys/boot/pc98/boot2/Makefile head/sys/boot/pc98/btx/lib/Makefile head/sys/boot/pc98/loader/Makefile head/sys/boot/sparc64/boot1/Makefile head/sys/boot/sparc64/loader/Makefile head/usr.bin/clang/clang-tblgen/Makefile head/usr.bin/clang/clang.prog.mk head/usr.bin/clang/tblgen/Makefile head/usr.bin/compile_et/Makefile head/usr.bin/mandoc/Makefile head/usr.bin/svn/svn/Makefile head/usr.bin/svn/svnadmin/Makefile head/usr.bin/svn/svndumpfilter/Makefile head/usr.bin/svn/svnlook/Makefile head/usr.bin/svn/svnmucc/Makefile head/usr.bin/svn/svnrdump/Makefile head/usr.bin/svn/svnserve/Makefile head/usr.bin/svn/svnsync/Makefile head/usr.bin/svn/svnversion/Makefile head/usr.bin/telnet/Makefile head/usr.bin/vacation/Makefile head/usr.sbin/amd/amd/Makefile head/usr.sbin/amd/amq/Makefile head/usr.sbin/amd/fixmount/Makefile head/usr.sbin/amd/fsinfo/Makefile head/usr.sbin/amd/hlfsd/Makefile head/usr.sbin/amd/mk-amd-map/Makefile head/usr.sbin/amd/pawd/Makefile head/usr.sbin/amd/wire-test/Makefile head/usr.sbin/btxld/Makefile head/usr.sbin/cron/cron/Makefile head/usr.sbin/cron/crontab/Makefile head/usr.sbin/crunch/crunchgen/Makefile head/usr.sbin/crunch/crunchide/Makefile head/usr.sbin/editmap/Makefile head/usr.sbin/fifolog/fifolog_create/Makefile head/usr.sbin/fifolog/fifolog_reader/Makefile head/usr.sbin/fifolog/fifolog_writer/Makefile head/usr.sbin/ftp-proxy/ftp-proxy/Makefile head/usr.sbin/lpr/chkprintcap/Makefile head/usr.sbin/lpr/lpc/Makefile head/usr.sbin/lpr/lpd/Makefile head/usr.sbin/lpr/lpq/Makefile head/usr.sbin/lpr/lpr/Makefile head/usr.sbin/lpr/lprm/Makefile head/usr.sbin/lpr/pac/Makefile head/usr.sbin/mailstats/Makefile head/usr.sbin/makefs/Makefile head/usr.sbin/makemap/Makefile head/usr.sbin/nmtree/Makefile head/usr.sbin/ntp/ntp-keygen/Makefile head/usr.sbin/ntp/ntpd/Makefile head/usr.sbin/ntp/ntpdate/Makefile head/usr.sbin/ntp/ntpdc/Makefile head/usr.sbin/ntp/ntpq/Makefile head/usr.sbin/ntp/ntptime/Makefile head/usr.sbin/praliases/Makefile head/usr.sbin/sendmail/Makefile Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Aug 19 11:06:21 2014 (r270167) +++ head/Makefile.inc1 Tue Aug 19 15:04:32 2014 (r270168) @@ -246,7 +246,7 @@ BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \ ${BMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \ DESTDIR= \ BOOTSTRAPPING=${OSRELDATE} \ - SSP_CFLAGS= MK_PIE=no \ + SSP_CFLAGS= \ MK_HTML=no MK_INFO=no NO_LINT=yes MK_MAN=no \ -DNO_PIC MK_PROFILE=no -DNO_SHARED \ -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \ @@ -258,7 +258,7 @@ TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \ TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ DESTDIR= \ BOOTSTRAPPING=${OSRELDATE} \ - SSP_CFLAGS= MK_PIE=no \ + SSP_CFLAGS= \ -DNO_LINT \ -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no MK_CLANG_FULL=no MK_LLDB=no MK_TESTS=no @@ -276,7 +276,7 @@ KTMAKE= TOOLS_PREFIX=${WORLDTMP} MAKEOB ${KTMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \ DESTDIR= \ BOOTSTRAPPING=${OSRELDATE} \ - SSP_CFLAGS= MK_PIE=no \ + SSP_CFLAGS= \ MK_HTML=no MK_INFO=no -DNO_LINT MK_MAN=no \ -DNO_PIC MK_PROFILE=no -DNO_SHARED \ -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no @@ -1426,7 +1426,7 @@ NXBMAKE= ${NXBENV} ${MAKE} \ CLANG_TBLGEN=${OBJTREE}/nxb-bin/usr/bin/clang-tblgen \ MACHINE=${TARGET} MACHINE_ARCH=${TARGET_ARCH} \ MK_GDB=no MK_TESTS=no \ - SSP_CFLAGS= MK_PIE=no \ + SSP_CFLAGS= \ MK_HTML=no MK_INFO=no NO_LINT=yes MK_MAN=no \ -DNO_PIC MK_PROFILE=no -DNO_SHARED \ -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \ Modified: head/bin/rmail/Makefile ============================================================================== --- head/bin/rmail/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/bin/rmail/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -14,8 +14,6 @@ MAN= rmail.8 WARNS?= 2 CFLAGS+=-I${SENDMAIL_DIR}/include -I. -NO_PIE= yes - LIBSMDIR= ${.OBJDIR}/../../lib/libsm LIBSM= ${LIBSMDIR}/libsm.a Modified: head/gnu/usr.bin/binutils/addr2line/Makefile ============================================================================== --- head/gnu/usr.bin/binutils/addr2line/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/binutils/addr2line/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -14,6 +14,4 @@ DPADD+= ${RELTOP}/libbfd/libbfd.a DPADD+= ${RELTOP}/libiberty/libiberty.a LDADD= ${DPADD} -NO_PIE= yes - .include Modified: head/gnu/usr.bin/binutils/nm/Makefile ============================================================================== --- head/gnu/usr.bin/binutils/nm/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/binutils/nm/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -15,6 +15,4 @@ DPADD+= ${RELTOP}/libbfd/libbfd.a DPADD+= ${RELTOP}/libiberty/libiberty.a LDADD= ${DPADD} -NO_PIE= yes - .include Modified: head/gnu/usr.bin/binutils/objcopy/Makefile ============================================================================== --- head/gnu/usr.bin/binutils/objcopy/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/binutils/objcopy/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -14,6 +14,4 @@ DPADD+= ${RELTOP}/libbfd/libbfd.a DPADD+= ${RELTOP}/libiberty/libiberty.a LDADD= ${DPADD} -NO_PIE= yes - .include Modified: head/gnu/usr.bin/binutils/objdump/Makefile ============================================================================== --- head/gnu/usr.bin/binutils/objdump/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/binutils/objdump/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -16,6 +16,4 @@ DPADD+= ${RELTOP}/libbfd/libbfd.a DPADD+= ${RELTOP}/libiberty/libiberty.a LDADD= ${DPADD} -NO_PIE= yes - .include Modified: head/gnu/usr.bin/binutils/readelf/Makefile ============================================================================== --- head/gnu/usr.bin/binutils/readelf/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/binutils/readelf/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -17,6 +17,4 @@ DPADD+= ${RELTOP}/libbfd/libbfd.a DPADD+= ${RELTOP}/libiberty/libiberty.a LDADD= ${DPADD} -NO_PIE= yes - .include Modified: head/gnu/usr.bin/binutils/size/Makefile ============================================================================== --- head/gnu/usr.bin/binutils/size/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/binutils/size/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -14,6 +14,4 @@ DPADD+= ${RELTOP}/libbfd/libbfd.a DPADD+= ${RELTOP}/libiberty/libiberty.a LDADD= ${DPADD} -NO_PIE= yes - .include Modified: head/gnu/usr.bin/binutils/strings/Makefile ============================================================================== --- head/gnu/usr.bin/binutils/strings/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/binutils/strings/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -14,6 +14,4 @@ DPADD+= ${RELTOP}/libbfd/libbfd.a DPADD+= ${RELTOP}/libiberty/libiberty.a LDADD= ${DPADD} -NO_PIE= yes - .include Modified: head/gnu/usr.bin/binutils/strip/Makefile ============================================================================== --- head/gnu/usr.bin/binutils/strip/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/binutils/strip/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -15,6 +15,4 @@ DPADD+= ${RELTOP}/libiberty/libiberty.a LDADD= ${DPADD} INSTALLFLAGS= -S -NO_PIE= yes - .include Modified: head/gnu/usr.bin/gdb/gdb/Makefile ============================================================================== --- head/gnu/usr.bin/gdb/gdb/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/gdb/gdb/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -14,7 +14,5 @@ LDFLAGS+= -Wl,-E DPADD= ${GDBLIBS} ${BULIBS} ${LIBM} ${LIBREADLINE} ${LIBTERMCAPW} ${LIBGNUREGEX} LDADD= ${GDBLIBS} ${BULIBS} -lm ${LDREADLINE} -ltermcapw -lgnuregex -NO_PIE= yes - .include CFLAGS+= -DDEBUGDIR=\"${DEBUGDIR}\" Modified: head/gnu/usr.bin/gdb/gdbtui/Makefile ============================================================================== --- head/gnu/usr.bin/gdb/gdbtui/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/gdb/gdbtui/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -15,6 +15,4 @@ LDFLAGS+= -Wl,-E DPADD= ${GDBLIBS} ${BULIBS} ${LIBM} ${LIBREADLINE} ${LIBTERMCAPW} ${LIBGNUREGEX} LDADD= ${GDBLIBS} ${BULIBS} -lm ${LDREADLINE} -ltermcapw -lgnuregex -NO_PIE= yes - .include Modified: head/gnu/usr.bin/gdb/kgdb/Makefile ============================================================================== --- head/gnu/usr.bin/gdb/kgdb/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/gdb/kgdb/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -17,6 +17,4 @@ LDADD= ${GDBLIBS} ${BULIBS} -lkvm${GDB_S CFLAGS+= -Wl,-export-dynamic .endif -NO_PIE= yes - .include Modified: head/gnu/usr.bin/groff/src/devices/grodvi/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/devices/grodvi/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/groff/src/devices/grodvi/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -6,6 +6,4 @@ DPADD= ${LIBDRIVER} ${LIBGROFF} ${LIBM} LDADD= ${LIBDRIVER} ${LIBGROFF} -lm CLEANFILES= ${MAN} -NO_PIE= yes - .include Modified: head/gnu/usr.bin/groff/src/devices/grohtml/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/devices/grohtml/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/groff/src/devices/grohtml/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -6,6 +6,4 @@ DPADD= ${LIBDRIVER} ${LIBGROFF} ${LIBM} LDADD= ${LIBDRIVER} ${LIBGROFF} -lm MAN= -NO_PIE= yes - .include Modified: head/gnu/usr.bin/groff/src/devices/grolbp/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/devices/grolbp/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/groff/src/devices/grolbp/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -6,6 +6,4 @@ DPADD= ${LIBDRIVER} ${LIBGROFF} ${LIBM} LDADD= ${LIBDRIVER} ${LIBGROFF} -lm CLEANFILES= ${MAN} -NO_PIE= yes - .include Modified: head/gnu/usr.bin/groff/src/devices/grolj4/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/devices/grolj4/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/groff/src/devices/grolj4/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -7,6 +7,4 @@ DPADD= ${LIBDRIVER} ${LIBGROFF} ${LIBM} LDADD= ${LIBDRIVER} ${LIBGROFF} -lm CLEANFILES= ${MAN} -NO_PIE= yes - .include Modified: head/gnu/usr.bin/groff/src/devices/grops/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/devices/grops/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/groff/src/devices/grops/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -6,6 +6,4 @@ DPADD= ${LIBDRIVER} ${LIBGROFF} ${LIBM} LDADD= ${LIBDRIVER} ${LIBGROFF} -lm CLEANFILES= ${MAN} -NO_PIE= yes - .include Modified: head/gnu/usr.bin/groff/src/devices/grotty/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/devices/grotty/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/groff/src/devices/grotty/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -6,6 +6,4 @@ DPADD= ${LIBDRIVER} ${LIBGROFF} ${LIBM} LDADD= ${LIBDRIVER} ${LIBGROFF} -lm CLEANFILES= ${MAN} -NO_PIE= yes - .include Modified: head/gnu/usr.bin/groff/src/preproc/eqn/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/preproc/eqn/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/groff/src/preproc/eqn/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -11,8 +11,6 @@ SCRIPTS= neqn MAN= eqn.1 neqn.1 CLEANFILES= eqn.cpp eqn_tab.h ${SCRIPTS} ${MAN} y.tab.c y.tab.h -NO_PIE= yes - eqn_tab.h: eqn.cpp .include Modified: head/gnu/usr.bin/groff/src/preproc/grn/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/preproc/grn/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/groff/src/preproc/grn/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -6,6 +6,4 @@ DPADD= ${LIBGROFF} ${LIBM} LDADD= ${LIBGROFF} -lm CLEANFILES= ${MAN} -NO_PIE= yes - .include Modified: head/gnu/usr.bin/groff/src/preproc/html/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/preproc/html/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/groff/src/preproc/html/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -6,6 +6,4 @@ DPADD= ${LIBGROFF} LDADD= ${LIBGROFF} MAN= -NO_PIE= yes - .include Modified: head/gnu/usr.bin/groff/src/preproc/pic/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/preproc/pic/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/groff/src/preproc/pic/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -8,8 +8,6 @@ DPADD= ${LIBGROFF} ${LIBM} LDADD= ${LIBGROFF} -lm CLEANFILES= ${MAN} pic.cpp pic_tab.h y.tab.c y.tab.h -NO_PIE= yes - pic_tab.h: pic.cpp .include Modified: head/gnu/usr.bin/groff/src/preproc/refer/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/preproc/refer/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/groff/src/preproc/refer/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -7,6 +7,4 @@ DPADD= ${LIBBIB} ${LIBGROFF} ${LIBM} LDADD= ${LIBBIB} ${LIBGROFF} -lm CLEANFILES= label.cpp label_tab.h ${MAN} y.tab.c y.tab.h -NO_PIE= yes - .include Modified: head/gnu/usr.bin/groff/src/preproc/soelim/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/preproc/soelim/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/groff/src/preproc/soelim/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -6,6 +6,4 @@ DPADD= ${LIBGROFF} LDADD= ${LIBGROFF} CLEANFILES= ${MAN} -NO_PIE= yes - .include Modified: head/gnu/usr.bin/groff/src/preproc/tbl/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/preproc/tbl/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/groff/src/preproc/tbl/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -6,6 +6,4 @@ DPADD= ${LIBGROFF} ${LIBM} LDADD= ${LIBGROFF} -lm CLEANFILES= ${MAN} -NO_PIE= yes - .include Modified: head/gnu/usr.bin/groff/src/roff/groff/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/roff/groff/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/groff/src/roff/groff/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -6,6 +6,4 @@ DPADD= ${LIBGROFF} ${LIBM} LDADD= ${LIBGROFF} -lm CLEANFILES= ${MAN} -NO_PIE= yes - .include Modified: head/gnu/usr.bin/groff/src/roff/troff/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/roff/troff/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/groff/src/roff/troff/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -7,8 +7,6 @@ DPADD= ${LIBGROFF} ${LIBM} LDADD= ${LIBGROFF} -lm CLEANFILES= majorminor.cpp ${MAN} -NO_PIE= yes - .include majorminor.cpp: ${GROFF_DIST}/VERSION ${GROFF_DIST}/REVISION Modified: head/gnu/usr.bin/groff/src/utils/addftinfo/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/utils/addftinfo/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/groff/src/utils/addftinfo/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -6,6 +6,4 @@ DPADD= ${LIBGROFF} LDADD= ${LIBGROFF} CLEANFILES= ${MAN} -NO_PIE= yes - .include Modified: head/gnu/usr.bin/groff/src/utils/hpftodit/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/utils/hpftodit/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/groff/src/utils/hpftodit/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -6,6 +6,4 @@ DPADD= ${LIBGROFF} ${LIBM} LDADD= ${LIBGROFF} -lm CLEANFILES= ${MAN} -NO_PIE= yes - .include Modified: head/gnu/usr.bin/groff/src/utils/indxbib/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/utils/indxbib/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/groff/src/utils/indxbib/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -6,8 +6,6 @@ DPADD= ${LIBBIB} ${LIBGROFF} ${LIBM} LDADD= ${LIBBIB} ${LIBGROFF} -lm CLEANFILES= ${MAN} -NO_PIE= yes - beforeinstall: ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ ${DIST_DIR}/eign ${DESTDIR}${SHAREDIR}/dict/ Modified: head/gnu/usr.bin/groff/src/utils/lkbib/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/utils/lkbib/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/groff/src/utils/lkbib/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -6,6 +6,4 @@ DPADD= ${LIBBIB} ${LIBGROFF} ${LIBM} LDADD= ${LIBBIB} ${LIBGROFF} -lm CLEANFILES= ${MAN} -NO_PIE= yes - .include Modified: head/gnu/usr.bin/groff/src/utils/lookbib/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/utils/lookbib/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/groff/src/utils/lookbib/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -6,6 +6,4 @@ DPADD= ${LIBBIB} ${LIBGROFF} ${LIBM} LDADD= ${LIBBIB} ${LIBGROFF} -lm CLEANFILES= ${MAN} -NO_PIE= yes - .include Modified: head/gnu/usr.bin/groff/src/utils/tfmtodit/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/utils/tfmtodit/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/groff/src/utils/tfmtodit/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -6,6 +6,4 @@ DPADD= ${LIBGROFF} ${LIBM} LDADD= ${LIBGROFF} -lm CLEANFILES= ${MAN} -NO_PIE= yes - .include Modified: head/gnu/usr.bin/rcs/Makefile.inc ============================================================================== --- head/gnu/usr.bin/rcs/Makefile.inc Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/rcs/Makefile.inc Tue Aug 19 15:04:32 2014 (r270168) @@ -1,4 +1,3 @@ # $FreeBSD$ LIBRCS= ${.OBJDIR}/../lib/librcs.a -NO_PIE= yes Modified: head/gnu/usr.bin/texinfo/info/Makefile ============================================================================== --- head/gnu/usr.bin/texinfo/info/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/texinfo/info/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -13,8 +13,6 @@ CFLAGS+= -DINFODIR=\"${INFODIR}:/usr/loc DPADD= ${LIBTERMCAPW} ${LIBTXI} LDADD= -ltermcapw ${LIBTXI} -NO_PIE= yes - .include .PATH: ${TXIDIR}/info ${TXIDIR}/doc Modified: head/gnu/usr.bin/texinfo/infokey/Makefile ============================================================================== --- head/gnu/usr.bin/texinfo/infokey/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/texinfo/infokey/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -6,8 +6,6 @@ SRCS= infokey.c key.c DPADD= ${LIBTXI} LDADD= ${LIBTXI} -NO_PIE= yes - .include .PATH: ${TXIDIR}/info ${TXIDIR}/doc Modified: head/gnu/usr.bin/texinfo/install-info/Makefile ============================================================================== --- head/gnu/usr.bin/texinfo/install-info/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/texinfo/install-info/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -5,8 +5,6 @@ PROG= install-info DPADD= ${LIBTXI} LDADD= ${LIBTXI} -NO_PIE= yes - .include .PATH: ${TXIDIR}/util ${TXIDIR}/doc Modified: head/gnu/usr.bin/texinfo/makeinfo/Makefile ============================================================================== --- head/gnu/usr.bin/texinfo/makeinfo/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/texinfo/makeinfo/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -8,8 +8,6 @@ SRCS= cmds.c defun.c files.c float.c foo DPADD= ${LIBTXI} LDADD= ${LIBTXI} -NO_PIE= yes - .include .PATH: $(TXIDIR)/makeinfo $(TXIDIR)/doc Modified: head/gnu/usr.bin/texinfo/texindex/Makefile ============================================================================== --- head/gnu/usr.bin/texinfo/texindex/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/gnu/usr.bin/texinfo/texindex/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -5,8 +5,6 @@ PROG= texindex DPADD= ${LIBTXI} LDADD= ${LIBTXI} -NO_PIE= yes - .include .PATH: ${TXIDIR}/util ${TXIDIR}/doc Modified: head/kerberos5/libexec/digest-service/Makefile ============================================================================== --- head/kerberos5/libexec/digest-service/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/kerberos5/libexec/digest-service/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -14,8 +14,6 @@ LDADD= -lhdb -lkdc ${LDHEIMIPCS} -lkrb5 ${LIBVERS} -lheimntlm USEPRIVATELIB= heimipcs -NO_PIE= yes - .include .PATH: ${KRB5DIR}/kdc Modified: head/kerberos5/libexec/hprop/Makefile ============================================================================== --- head/kerberos5/libexec/hprop/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/kerberos5/libexec/hprop/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -16,8 +16,6 @@ LDADD= -lhdb -lkrb5 -lhx509 -lroken ${LI -lasn1 -lcrypto -lcrypt -lcom_err ${LDAPLDADD} LDFLAGS=${LDAPLDFLAGS} -NO_PIE= yes - .include .PATH: ${KRB5DIR}/kdc Modified: head/kerberos5/libexec/hpropd/Makefile ============================================================================== --- head/kerberos5/libexec/hpropd/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/kerberos5/libexec/hpropd/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -10,8 +10,6 @@ LDADD= -lhdb -lkrb5 -lhx509 -lroken ${LI -lasn1 -lcrypto -lcrypt -lcom_err ${LDAPLDADD} LDFLAGS=${LDAPLDFLAGS} -NO_PIE= yes - .include .PATH: ${KRB5DIR}/kdc Modified: head/kerberos5/libexec/ipropd-master/Makefile ============================================================================== --- head/kerberos5/libexec/ipropd-master/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/kerberos5/libexec/ipropd-master/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -11,8 +11,6 @@ LDADD= -lkadm5srv -lhdb -lkrb5 -lhx509 - -lasn1 -lcrypto -lcrypt -lcom_err ${LDAPLDADD} LDFLAGS=${LDAPLDFLAGS} -NO_PIE= yes - foo:: echo ${LIBHX509} Modified: head/kerberos5/libexec/ipropd-slave/Makefile ============================================================================== --- head/kerberos5/libexec/ipropd-slave/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/kerberos5/libexec/ipropd-slave/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -11,8 +11,6 @@ LDADD= -lkadm5srv -lhdb -lkrb5 -lhx509 - -lasn1 -lcrypto -lcrypt -lcom_err ${LDAPLDADD} LDFLAGS=${LDAPLDFLAGS} -NO_PIE= yes - .include .PATH: ${KRB5DIR}/lib/kadm5 Modified: head/kerberos5/libexec/kadmind/Makefile ============================================================================== --- head/kerberos5/libexec/kadmind/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/kerberos5/libexec/kadmind/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -15,8 +15,6 @@ LDADD= -lkadm5srv -lgssapi -lhdb -lkrb5 -lasn1 ${LIBVERS} -lcrypto -lcrypt ${LDAPLDADD} LDFLAGS=${LDAPLDFLAGS} -NO_PIE= yes - .include .PATH: ${KRB5DIR}/kadmin Modified: head/kerberos5/libexec/kcm/Makefile ============================================================================== --- head/kerberos5/libexec/kcm/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/kerberos5/libexec/kcm/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -26,8 +26,6 @@ LDADD= -lhdb -lkrb5 -lroken -lasn1 -lhei USEPRIVATELIB= heimipcs LDFLAGS=${LDAPLDFLAGS} -NO_PIE= yes - .include .PATH: ${KRB5DIR}/kcm Modified: head/kerberos5/libexec/kdc/Makefile ============================================================================== --- head/kerberos5/libexec/kdc/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/kerberos5/libexec/kdc/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -14,8 +14,6 @@ DPADD= ${LIBKDC} ${LIBHDB} ${LIBKRB5} ${ ${LIBCRYPTO} ${LIBCRYPT} ${LIBVERS} LDADD= -lkdc -lhdb -lkrb5 -lroken -lasn1 -lcrypto -lcrypt ${LIBVERS} -NO_PIE= yes - .include .PATH: ${KRB5DIR}/kdc Modified: head/kerberos5/libexec/kdigest/Makefile ============================================================================== --- head/kerberos5/libexec/kdigest/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/kerberos5/libexec/kdigest/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -13,8 +13,6 @@ SRCS= kdigest.c \ kdigest-commands.c \ kdigest-commands.h -NO_PIE= yes - kdigest-commands.h: kdigest-commands.in ${SLC} ${.ALLSRC:M*.in} Modified: head/kerberos5/libexec/kfd/Makefile ============================================================================== --- head/kerberos5/libexec/kfd/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/kerberos5/libexec/kfd/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -9,8 +9,6 @@ DPADD= ${LIBKRB5} ${LIBROKEN} ${LIBASN1} LDADD= -lkrb5 -lroken -lasn1 -lcrypto -lcrypt \ ${LIBVERS} -NO_PIE= yes - .include .PATH: ${KRB5DIR}/appl/kf Modified: head/kerberos5/libexec/kimpersonate/Makefile ============================================================================== --- head/kerberos5/libexec/kimpersonate/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/kerberos5/libexec/kimpersonate/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -11,8 +11,6 @@ DPADD= ${LIBKAFS5} ${LIBKRB5} ${LIBHEIMN LDADD= -lkafs5 -lkrb5 -lheimntlm -lroken -lasn1 -lcrypto -lcrypt \ ${LIBVERS} -NO_PIE= yes - .include .PATH: ${KRB5DIR}/kuser Modified: head/kerberos5/libexec/kpasswdd/Makefile ============================================================================== --- head/kerberos5/libexec/kpasswdd/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/kerberos5/libexec/kpasswdd/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -9,8 +9,6 @@ LDADD= -lkadm5srv -lhdb -lkrb5 -lhx509 - -lasn1 -lcrypto -lcrypt -lcom_err ${LDAPLDADD} LDFLAGS=${LDAPLDFLAGS} -NO_PIE= yes - .include .PATH: ${KRB5DIR}/kpasswd Modified: head/kerberos5/tools/asn1_compile/Makefile ============================================================================== --- head/kerberos5/tools/asn1_compile/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/kerberos5/tools/asn1_compile/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -27,8 +27,6 @@ CFLAGS+=-I${KRB5DIR}/lib/roken -I${KRB5D CLEANFILES= roken.h lex.c parse.c -NO_PIE= yes - roken.h: make-roken > ${.TARGET} Modified: head/kerberos5/tools/slc/Makefile ============================================================================== --- head/kerberos5/tools/slc/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/kerberos5/tools/slc/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -14,8 +14,6 @@ CFLAGS+=-I${KRB5DIR}/lib/roken -I${KRB5D CLEANFILES= roken.h slc-gram.c slc-lex.c -NO_PIE= yes - roken.h: ${MAKE_ROKEN} > ${.TARGET} Modified: head/kerberos5/usr.bin/hxtool/Makefile ============================================================================== --- head/kerberos5/usr.bin/hxtool/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/kerberos5/usr.bin/hxtool/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -10,8 +10,6 @@ DPADD= ${LIBHX509} ${LIBROKEN} ${LIBASN1 LDADD= -lhx509 -lroken -lasn1 -lcrypto -lcrypt ${LIBSL} ${LIBVERS} -ledit SRCS= hxtool.c hxtool-commands.c hxtool-commands.h -NO_PIE= yes - hxtool-commands.h: hxtool-commands.in ${SLC} ${.ALLSRC:M*.in} Modified: head/kerberos5/usr.bin/kadmin/Makefile ============================================================================== --- head/kerberos5/usr.bin/kadmin/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/kerberos5/usr.bin/kadmin/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -36,8 +36,6 @@ LDADD= -lkadm5clnt -lkadm5srv -lhdb -lkr -ledit -lncursesw ${LDAPLDADD} LDFLAGS=${LDAPLDFLAGS} -NO_PIE= yes - .include kadmin-commands.h: ${KRB5DIR}/kadmin/kadmin-commands.in Modified: head/kerberos5/usr.bin/kcc/Makefile ============================================================================== --- head/kerberos5/usr.bin/kcc/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/kerberos5/usr.bin/kcc/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -19,8 +19,6 @@ SRCS= kcc.c \ kswitch.c \ copy_cred_cache.c -NO_PIE= yes - kcc-commands.h: kcc-commands.in ${SLC} ${.ALLSRC:M*.in} Modified: head/kerberos5/usr.bin/kdestroy/Makefile ============================================================================== --- head/kerberos5/usr.bin/kdestroy/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/kerberos5/usr.bin/kdestroy/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -8,8 +8,6 @@ LDADD= -lkafs5 -lkrb5 -lheimntlm -lroken -lasn1 -lcrypto -lcrypt MAN= kdestroy.1 -NO_PIE= yes - .include .PATH: ${KRB5DIR}/kuser Modified: head/kerberos5/usr.bin/kf/Makefile ============================================================================== --- head/kerberos5/usr.bin/kf/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/kerberos5/usr.bin/kf/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -9,8 +9,6 @@ DPADD= ${LIBKRB5} ${LIBROKEN} ${LIBASN1} LDADD= -lkrb5 -lroken -lasn1 -lcrypto -lcrypt \ ${LIBVERS} -NO_PIE= yes - .include .PATH: ${KRB5DIR}/appl/kf Modified: head/kerberos5/usr.bin/kgetcred/Makefile ============================================================================== --- head/kerberos5/usr.bin/kgetcred/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/kerberos5/usr.bin/kgetcred/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -6,8 +6,6 @@ CFLAGS+= -I${KRB5DIR}/lib/asn1 \ DPADD= ${LIBKRB5} ${LIBROKEN} ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBVERS} LDADD= -lkrb5 -lroken -lasn1 -lcrypto -lcrypt ${LIBVERS} -NO_PIE= yes - .include .PATH: ${KRB5DIR}/kuser Modified: head/kerberos5/usr.bin/kinit/Makefile ============================================================================== --- head/kerberos5/usr.bin/kinit/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/kerberos5/usr.bin/kinit/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -7,8 +7,6 @@ DPADD= ${LIBKAFS5} ${LIBKRB5} ${LIBHEIMN LDADD= -lkafs5 -lkrb5 -lheimntlm -lroken ${LIBVERS} \ -lasn1 -lcrypto -lcrypt -lcom_err -NO_PIE= yes - .include .PATH: ${KRB5DIR}/kuser Modified: head/kerberos5/usr.bin/kpasswd/Makefile ============================================================================== --- head/kerberos5/usr.bin/kpasswd/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/kerberos5/usr.bin/kpasswd/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -7,8 +7,6 @@ DPADD= ${LIBKRB5} ${LIBHX509} ${LIBROKEN LDADD= -lkrb5 -lhx509 -lroken ${LIBVERS} \ -lasn1 -lcrypto -lcrypt -lcom_err -NO_PIE= yes - .include .PATH: ${KRB5DIR}/kpasswd Modified: head/kerberos5/usr.bin/ksu/Makefile ============================================================================== --- head/kerberos5/usr.bin/ksu/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/kerberos5/usr.bin/ksu/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -13,8 +13,6 @@ DPADD= ${LIBKAFS5} ${LIBKRB5} ${LIBHX509 LDADD= -lkafs5 -lkrb5 -lhx509 -lroken ${LIBVERS} \ -lasn1 -lcrypto -lcrypt -lcom_err -NO_PIE= yes - .include .PATH: ${KRB5DIR}/appl/su Modified: head/kerberos5/usr.bin/string2key/Makefile ============================================================================== --- head/kerberos5/usr.bin/string2key/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/kerberos5/usr.bin/string2key/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -11,8 +11,6 @@ DPADD= ${LIBHDB} ${LIBKRB5} ${LIBROKEN} ${LIBCRYPT} ${LIBVERS} LDADD= -lhdb -lkrb5 -lroken -lasn1 -lcrypto -lcrypt ${LIBVERS} -NO_PIE= yes - .include .PATH: ${KRB5DIR}/kdc Modified: head/kerberos5/usr.bin/verify_krb5_conf/Makefile ============================================================================== --- head/kerberos5/usr.bin/verify_krb5_conf/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/kerberos5/usr.bin/verify_krb5_conf/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -8,8 +8,6 @@ DPADD= ${LIBKAFS5} ${LIBKRB5} ${LIBHX509 LDADD= -lkafs5 -lkrb5 -lhx509 -lroken ${LIBVERS} \ -lasn1 -lcrypto -lcrypt -lcom_err -NO_PIE= yes - .include .PATH: ${KRB5DIR}/lib/krb5 Modified: head/kerberos5/usr.sbin/iprop-log/Makefile ============================================================================== --- head/kerberos5/usr.sbin/iprop-log/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/kerberos5/usr.sbin/iprop-log/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -13,8 +13,6 @@ DPADD= ${LIBKADM5SRV} ${LIBHDB} ${LIBKRB LDADD= -lkadm5srv -lhdb -lkrb5 -lasn1 -lcrypto -lcrypt ${LIBSL} -lroken \ ${LIBVERS} -ledit -NO_PIE= yes - iprop-commands.h: iprop-commands.in ${SLC} ${.ALLSRC:M*.in} Modified: head/kerberos5/usr.sbin/kstash/Makefile ============================================================================== --- head/kerberos5/usr.sbin/kstash/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/kerberos5/usr.sbin/kstash/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -10,8 +10,6 @@ LDADD= -lhdb -lkrb5 -lroken ${LIBVERS} \ -lasn1 -lcrypto -lcrypt ${LDAPLDADD} LDFLAGS=${LDAPLDFLAGS} -NO_PIE= yes - .include .PATH: ${KRB5DIR}/kdc Modified: head/kerberos5/usr.sbin/ktutil/Makefile ============================================================================== --- head/kerberos5/usr.sbin/ktutil/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/kerberos5/usr.sbin/ktutil/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -22,8 +22,6 @@ DPADD= ${LIBKADM5CLNT} ${LIBKRB5} ${LIBS LDADD= -lkadm5clnt -lkrb5 ${LIBSL} -lroken ${LIBVERS} \ -lasn1 -lcrypto -lcrypt -ledit -NO_PIE= yes - .include ktutil-commands.h: ${KRB5DIR}/admin/ktutil-commands.in Modified: head/lib/csu/amd64/Makefile ============================================================================== --- head/lib/csu/amd64/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/lib/csu/amd64/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -9,8 +9,6 @@ CFLAGS+= -I${.CURDIR}/../common \ -I${.CURDIR}/../../libc/include CFLAGS+= -fno-omit-frame-pointer -NO_PIE= yes - all: ${OBJS} CLEANFILES= ${OBJS} Modified: head/lib/csu/i386-elf/Makefile ============================================================================== --- head/lib/csu/i386-elf/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/lib/csu/i386-elf/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -13,8 +13,6 @@ CFLAGS+= -I${.CURDIR}/../common \ CLEANFILES= ${FILES} crt1_c.o crt1_s.o gcrt1_c.o Scrt1_c.o CLEANFILES+= crt1_c.s gcrt1_c.s Scrt1_c.s -NO_PIE= yes - # See the comment in lib/csu/common/crtbrand.c for the reason crt1_c.c is not # directly compiled to .o files. Modified: head/libexec/mail.local/Makefile ============================================================================== --- head/libexec/mail.local/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/libexec/mail.local/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -9,8 +9,6 @@ SRCS= mail.local.c MAN= mail.local.8 CFLAGS+=-I${SENDMAIL_DIR}/include -I. -NO_PIE= yes - WARNS?= 2 WFORMAT=0 Modified: head/libexec/rtld-elf/Makefile ============================================================================== --- head/libexec/rtld-elf/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/libexec/rtld-elf/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -78,8 +78,6 @@ beforeinstall: .PATH: ${.CURDIR}/${RTLD_ARCH} -NO_PIE= yes - .if ${MK_TESTS} != "no" SUBDIR+= tests .endif Modified: head/libexec/smrsh/Makefile ============================================================================== --- head/libexec/smrsh/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/libexec/smrsh/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -9,8 +9,6 @@ SRCS= smrsh.c MAN= smrsh.8 CFLAGS+=-I${SENDMAIL_DIR}/src -I${SENDMAIL_DIR}/include -I. -NO_PIE= yes - LIBSMDIR= ${.OBJDIR}/../../lib/libsm LIBSM= ${LIBSMDIR}/libsm.a Modified: head/libexec/telnetd/Makefile ============================================================================== --- head/libexec/telnetd/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/libexec/telnetd/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -20,8 +20,6 @@ WFORMAT?= 0 CFLAGS+= -DLINEMODE -DUSE_TERMIO -DDIAGNOSTICS -DOLD_ENVIRON \ -DENV_HACK -DSTREAMSPTY -NO_PIE= yes - .if ${MK_INET6_SUPPORT} != "no" CFLAGS+= -DINET6 .endif Modified: head/sbin/fsck/Makefile ============================================================================== --- head/sbin/fsck/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/sbin/fsck/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -5,6 +5,4 @@ PROG= fsck SRCS= fsck.c fsutil.c preen.c MAN= fsck.8 -NO_PIE= yes - .include Modified: head/sbin/ipf/ipf/Makefile ============================================================================== --- head/sbin/ipf/ipf/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/sbin/ipf/ipf/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -39,6 +39,4 @@ DPADD+= ${LIBPCAP} LDADD+= -lpcap .endif -NO_PIE= yes - .include Modified: head/sbin/ipf/ipfstat/Makefile ============================================================================== --- head/sbin/ipf/ipfstat/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/sbin/ipf/ipfstat/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -8,6 +8,4 @@ MAN= ipfstat.8 DPADD+= ${LIBCURSES} LDADD+= -lcurses -NO_PIE= yes - .include Modified: head/sbin/ipf/ipftest/Makefile ============================================================================== --- head/sbin/ipf/ipftest/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/sbin/ipf/ipftest/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -32,8 +32,6 @@ CLEANFILES+= ipnat.tab.c ipnat.tab.h CLEANFILES+= ippool_y.c ippool_l.c CLEANFILES+= ippool.tab.c ippool.tab.h -NO_PIE= yes - ipnat_y.c: ipnat_y.y ${YACC} -b ipnat -d ${.ALLSRC} sed -e 's/yy/ipnat_yy/g' \ Modified: head/sbin/ipf/ipmon/Makefile ============================================================================== --- head/sbin/ipf/ipmon/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/sbin/ipf/ipmon/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -11,8 +11,6 @@ DPSRCS+= ${GENHDRS} CLEANFILES+= ${GENHDRS} ipmon_y.c ipmon_l.c -NO_PIE= yes - ipmon_y.c: ipmon_y.y ${YACC} -d ${.ALLSRC} sed -e 's/yy/ipmon_yy/g' \ Modified: head/sbin/ipf/ipnat/Makefile ============================================================================== --- head/sbin/ipf/ipnat/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/sbin/ipf/ipnat/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -11,8 +11,6 @@ DPSRCS+= ${GENHDRS} CLEANFILES+= ${GENHDRS} ipnat_y.c ipnat_l.c -NO_PIE= yes - ipnat_y.c: ipnat_y.y ${YACC} -d ${.ALLSRC} sed -e 's/yy/ipnat_yy/g' \ Modified: head/sbin/ipf/ippool/Makefile ============================================================================== --- head/sbin/ipf/ippool/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/sbin/ipf/ippool/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -10,8 +10,6 @@ DPSRCS+= ${GENHDRS} CLEANFILES+= ${GENHDRS} ippool_y.c ippool_l.c -NO_PIE= yes - ippool_y.c: ippool_y.y ${YACC} -d ${.ALLSRC} sed -e 's/yy/ippool_yy/g' \ Modified: head/sbin/ipf/ipresend/Makefile ============================================================================== --- head/sbin/ipf/ipresend/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/sbin/ipf/ipresend/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -4,8 +4,6 @@ PROG= ipresend SRCS= ipresend.c ip.c resend.c sbpf.c sock.c 44arp.c MAN= ipresend.1 -NO_PIE= yes - .PATH: ${.CURDIR}/../../../contrib/ipfilter/ipsend .include Modified: head/sbin/rcorder/Makefile ============================================================================== --- head/sbin/rcorder/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/sbin/rcorder/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -14,8 +14,6 @@ CFLAGS+= -DORDER -I. SRCS+= util.h CLEANFILES+= util.h -NO_PIE= yes - util.h: ln -sf ${.CURDIR}/../../lib/libutil/libutil.h ${.TARGET} Modified: head/share/mk/bsd.opts.mk ============================================================================== --- head/share/mk/bsd.opts.mk Tue Aug 19 11:06:21 2014 (r270167) +++ head/share/mk/bsd.opts.mk Tue Aug 19 15:04:32 2014 (r270168) @@ -68,8 +68,7 @@ __DEFAULT_NO_OPTIONS = \ CTF \ DEBUG_FILES \ INSTALL_AS_USER \ - INFO \ - PIE + INFO .include Modified: head/share/mk/bsd.prog.mk ============================================================================== --- head/share/mk/bsd.prog.mk Tue Aug 19 11:06:21 2014 (r270167) +++ head/share/mk/bsd.prog.mk Tue Aug 19 15:04:32 2014 (r270168) @@ -11,18 +11,6 @@ CFLAGS+=${COPTS} .endif -.if ${MK_PIE} != "no" && (!defined(NO_PIE) || ${NO_PIE} == "no") -.if !defined(RESCUE) && !defined(NO_SHARED) -CFLAGS+= -fPIE -pie -LDFLAGS+= -pie -.elif defined(NO_SHARED) -.if ${NO_SHARED} == "no" || ${NO_SHARED} == "NO" -CFLAGS+= -fPIE -pie -LDFLAGS+= -pie -.endif -.endif -.endif - .if ${MK_ASSERT_DEBUG} == "no" CFLAGS+= -DNDEBUG NO_WERROR= Modified: head/sys/boot/i386/boot2/Makefile ============================================================================== --- head/sys/boot/i386/boot2/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/sys/boot/i386/boot2/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -22,8 +22,6 @@ BOOT2_UFS?= UFS1_AND_UFS2 #BOOT2_UFS?= UFS2_ONLY #BOOT2_UFS?= UFS1_ONLY -NO_PIE= yes - CFLAGS= -Os \ -fomit-frame-pointer \ -mrtd \ Modified: head/sys/boot/i386/btx/btx/Makefile ============================================================================== --- head/sys/boot/i386/btx/btx/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/sys/boot/i386/btx/btx/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -5,8 +5,6 @@ INTERNALPROG= MAN= SRCS= btx.S -NO_PIE= yes - .if defined(BOOT_BTX_NOHANG) BOOT_BTX_FLAGS=0x1 .else Modified: head/sys/boot/i386/btx/btxldr/Makefile ============================================================================== --- head/sys/boot/i386/btx/btxldr/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/sys/boot/i386/btx/btxldr/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -5,8 +5,6 @@ INTERNALPROG= MAN= SRCS= btxldr.S -NO_PIE= yes - CFLAGS+=-DLOADER_ADDRESS=${LOADER_ADDRESS} CFLAGS+=-I${.CURDIR}/../../common Modified: head/sys/boot/i386/btx/lib/Makefile ============================================================================== --- head/sys/boot/i386/btx/lib/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/sys/boot/i386/btx/lib/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -7,6 +7,4 @@ SRCS= btxcsu.S btxsys.s btxv86.s CFLAGS+=-I${.CURDIR}/../../common LDFLAGS=-Wl,-r -NO_PIE= yes - .include Modified: head/sys/boot/i386/loader/Makefile ============================================================================== --- head/sys/boot/i386/loader/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/sys/boot/i386/loader/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -8,8 +8,6 @@ PROG= ${LOADER}.sym INTERNALPROG= NEWVERSWHAT?= "bootstrap loader" x86 -NO_PIE= yes - # architecture-specific loader code SRCS= main.c conf.c vers.c Modified: head/sys/boot/mips/beri/boot2/Makefile ============================================================================== --- head/sys/boot/mips/beri/boot2/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/sys/boot/mips/beri/boot2/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -32,8 +32,6 @@ BINDIR?= /boot INSTALLFLAGS= -b -NO_PIE= yes - LOADERS= flashboot jtagboot FILES= ${LOADERS} ${LOADERS:S/$/.md5/} Modified: head/sys/boot/mips/beri/loader/Makefile ============================================================================== --- head/sys/boot/mips/beri/loader/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/sys/boot/mips/beri/loader/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -36,8 +36,6 @@ PROG?= loader NEWVERSWHAT= "BERI loader" ${MACHINE_CPUARCH} INSTALLFLAGS= -b -NO_PIE= yes - # Architecture-specific loader code SRCS= start.S \ main.c \ Modified: head/sys/boot/pc98/boot2/Makefile ============================================================================== --- head/sys/boot/pc98/boot2/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/sys/boot/pc98/boot2/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -6,8 +6,6 @@ #CC:= gcc #COMPILER_TYPE:= gcc -NO_PIE= yes - FILES= boot boot1 boot2 NM?= nm Modified: head/sys/boot/pc98/btx/lib/Makefile ============================================================================== --- head/sys/boot/pc98/btx/lib/Makefile Tue Aug 19 11:06:21 2014 (r270167) +++ head/sys/boot/pc98/btx/lib/Makefile Tue Aug 19 15:04:32 2014 (r270168) @@ -7,6 +7,4 @@ SRCS= btxcsu.S btxsys.s btxv86.s CFLAGS+=-I${.CURDIR}/../../../i386/common LDFLAGS=-Wl,-r *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Aug 19 15:09:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F08FC5FC; Tue, 19 Aug 2014 15:09:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D12AD395D; Tue, 19 Aug 2014 15:09:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7JF9OWe084669; Tue, 19 Aug 2014 15:09:24 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7JF9OHt084668; Tue, 19 Aug 2014 15:09:24 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201408191509.s7JF9OHt084668@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 19 Aug 2014 15:09:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270169 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 15:09:25 -0000 Author: bdrewery Date: Tue Aug 19 15:09:24 2014 New Revision: 270169 URL: http://svnweb.freebsd.org/changeset/base/270169 Log: Regen after r270168 Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Tue Aug 19 15:04:32 2014 (r270168) +++ head/share/man/man5/src.conf.5 Tue Aug 19 15:09:24 2014 (r270169) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 255964 2013-10-01 07:22:04Z des .\" $FreeBSD$ -.Dd July 16, 2014 +.Dd August 19, 2014 .Dt SRC.CONF 5 .Os .Sh NAME @@ -885,9 +885,6 @@ When set, it also enforces the following .It .Va WITHOUT_AUTHPF .El -.It Va WITH_PIE -.\" from FreeBSD: head/tools/build/options/WITH_PIE 267233 2014-06-08 17:29:31Z bdrewery -Enable building of Position-Independent Executables (PIEs). .It Va WITHOUT_PKGBOOTSTRAP .\" from FreeBSD: head/tools/build/options/WITHOUT_PKGBOOTSTRAP 258924 2013-12-04 15:58:42Z bdrewery Set to not build From owner-svn-src-all@FreeBSD.ORG Tue Aug 19 15:12:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B9BE28B8 for ; Tue, 19 Aug 2014 15:12:55 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A9AE3A15 for ; Tue, 19 Aug 2014 15:12:55 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id s7JFCtqo061575 for ; Tue, 19 Aug 2014 15:12:55 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id s7JFCtOr061568 for svn-src-all@freebsd.org; Tue, 19 Aug 2014 15:12:55 GMT (envelope-from bdrewery) Received: (qmail 10262 invoked from network); 19 Aug 2014 10:12:53 -0500 Received: from unknown (HELO ?10.10.0.24?) (freebsd@shatow.net@10.10.0.24) by sweb.xzibition.com with ESMTPA; 19 Aug 2014 10:12:53 -0500 Message-ID: <53F36973.4080900@FreeBSD.org> Date: Tue, 19 Aug 2014 10:12:51 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r267440 - in head: lib share/mk sys/modules sys/sys References: <201406130853.s5D8rowf084163@svn.freebsd.org> In-Reply-To: <201406130853.s5D8rowf084163@svn.freebsd.org> OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tnviscao2w7GbU33R4gX0TN7oTfsSmaBW" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 15:12:55 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --tnviscao2w7GbU33R4gX0TN7oTfsSmaBW Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 6/13/2014 3:53 AM, Hans Petter Selasky wrote: > Author: hselasky > Date: Fri Jun 13 08:53:49 2014 > New Revision: 267440 > URL: http://svnweb.freebsd.org/changeset/base/267440 >=20 > Log: > Attach the CUSE library and kernel module to the default FreeBSD > builds. Bump the FreeBSD version number. >=20 > Modified: > head/lib/Makefile > head/share/mk/src.opts.mk > head/sys/modules/Makefile > head/sys/sys/param.h >=20 > Modified: head/lib/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/lib/Makefile Fri Jun 13 08:44:03 2014 (r267439) > +++ head/lib/Makefile Fri Jun 13 08:53:49 2014 (r267440) > @@ -136,6 +136,7 @@ SUBDIR=3D ${SUBDIR_ORDERED} \ > libz \ > ${_atf} \ > ${_clang} \ > + ${_cuse} \ > ${_tests} > =20 > .if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf) > @@ -172,6 +173,10 @@ _libcasper=3D libcasper > _clang=3D clang > .endif > =20 > +.if ${MK_CUSE} !=3D "no" > +_cuse=3D libcuse > +.endif > + > .if ${MK_GPIB} !=3D "no" > _libgpib=3D libgpib > .endif >=20 > Modified: head/share/mk/src.opts.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/share/mk/src.opts.mk Fri Jun 13 08:44:03 2014 (r267439) > +++ head/share/mk/src.opts.mk Fri Jun 13 08:53:49 2014 (r267440) > @@ -68,6 +68,7 @@ __DEFAULT_YES_OPTIONS =3D \ > CROSS_COMPILER \ > CRYPT \ > CTM \ > + CUSE \ You forgot to define a tools/build/options/WITHOUT_CUSE so it is added to src.conf(5). ~/svn/base/tools/build/options # ./makeman > =2E./../../share/man/man5/src.conf.5 no description found for WITHOUT_CUSE, skipping --=20 Regards, Bryan Drewery --tnviscao2w7GbU33R4gX0TN7oTfsSmaBW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) iQEcBAEBAgAGBQJT82lzAAoJEDXXcbtuRpfPCbYIAI2ypyAXTD2U3MZ92S7MYk6T Afts11eWlS4ybhS0sQgK5zblU8T+u6uQF3/TmuJy17Da6uWCUjuDdtF9NcPsFjoI GtmwrWjU74HrNhGILrOMiDigf/dEHF4thnrAx59r8/gMOSzmVVtoRq/CHqvx2gp/ JU7mb+CBr8Y3lH7QSBZU7MyONxG1NV7qRT4z3KKHE4CQAno2xWtr/bCNz5VAr6Ls WVcYZsQHp+l4ZTFqTc7N9JERxzblg6zs5GdRVIhvoouzyNVnd4NaQAczaeZ8p7ES x5T3LAVtpqsLTY4av4IrJltgqAePQOse7DpzPaLHiE7Q3zZ3OOsE5mUOC8sowYQ= =eHNy -----END PGP SIGNATURE----- --tnviscao2w7GbU33R4gX0TN7oTfsSmaBW-- From owner-svn-src-all@FreeBSD.ORG Tue Aug 19 15:28:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5A6C3E35; Tue, 19 Aug 2014 15:28:57 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA9F43B81; Tue, 19 Aug 2014 15:28:56 +0000 (UTC) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s7JFSkDO074100 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 19 Aug 2014 18:28:46 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua s7JFSkDO074100 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id s7JFSkr9074099; Tue, 19 Aug 2014 18:28:46 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 19 Aug 2014 18:28:46 +0300 From: Konstantin Belousov To: Bryan Drewery Subject: Re: svn commit: r270168 - in head: . bin/rmail gnu/usr.bin/binutils/addr2line gnu/usr.bin/binutils/nm gnu/usr.bin/binutils/objcopy gnu/usr.bin/binutils/objdump gnu/usr.bin/binutils/readelf gnu/usr.bin/... Message-ID: <20140819152846.GV2737@kib.kiev.ua> References: <201408191504.s7JF4XJq083360@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TiGNc3ldf20CNpkJ" Content-Disposition: inline In-Reply-To: <201408191504.s7JF4XJq083360@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 15:28:57 -0000 --TiGNc3ldf20CNpkJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 19, 2014 at 03:04:33PM +0000, Bryan Drewery wrote: > Author: bdrewery > Date: Tue Aug 19 15:04:32 2014 > New Revision: 270168 > URL: http://svnweb.freebsd.org/changeset/base/270168 >=20 > Log: > Revert r267233 for now. PIE support needs to be reworked. Thank you. --TiGNc3ldf20CNpkJ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJT820uAAoJEJDCuSvBvK1BdOkP/3h4TVdDEMxIvPYM/2KFaUpL aQZDZO8GJiMJmxJ4n+LmhOGrIhhxEclWW46q86WdVSynpB1buUYnLwmFaFx328iL d7DJpIJr2FTjo1G6BBQaj5o3dbcZ0KFv/ZxCXiVd3//H4S8LVVk41fLjqJC70cri ogxJ5ZnY3/S8AkknZdiYfboc2b3+i6DQwDmTffXNjI+gn9MVP+2n9nUaSvbGrcvZ J93NAe8yWfygRmbHvWuIz/12+5rhjGm/xVMF0AW+vIApNiLL24CLpHW5m+yJBtb3 Z5GnZXAsNwhWgXSrqJsAoQCOCDEYbPIGGElQb1x7MIjLfObB2wjaN3QXKUxkTOxH Jg7eQpHjSE+2tFgicV1hgYWc9Sive9HnLrBGNY2z62lQOyeKyz4BdKKRYHqaZYLf moaDxJBGU+MwvbrW+8kLRL+xWbQMuXR46DS1EqB7JXngo5q6tVtw15e+Y6kc5M6Q XEJxwv9DrsTRjjr11KKDtKt+5xIS856vlDUzJn9xw7MpbBUDisRcrSoHG5IPy+NS X1aOxOGZZsbFEMe4bN5C+vM3qKaTaBE25m8gzmcRF+4OCUf5zt04N7U2Lei+K5de vMsk16qsEpjsPbfluRF06J1qI7nNaMJeaPT5MNt+NU33PzTe++VxXa0ygQthNc/r DxWahmlIjdB4dQdFJxcm =Dc5d -----END PGP SIGNATURE----- --TiGNc3ldf20CNpkJ-- From owner-svn-src-all@FreeBSD.ORG Tue Aug 19 15:30:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79C4396; Tue, 19 Aug 2014 15:30:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 64A023B9E; Tue, 19 Aug 2014 15:30:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7JFUvMq095164; Tue, 19 Aug 2014 15:30:57 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7JFUvsF095163; Tue, 19 Aug 2014 15:30:57 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201408191530.s7JFUvsF095163@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 19 Aug 2014 15:30:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270170 - head/lib/csu/i386-elf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 15:30:57 -0000 Author: bdrewery Date: Tue Aug 19 15:30:56 2014 New Revision: 270170 URL: http://svnweb.freebsd.org/changeset/base/270170 Log: Use bsd.lib.mk here as all other csu Makefiles do. This effectively reverts r124752. There's no reason this should be different. It resulted in needing NO_PIE in the original opt-out NO_PIE commit as this was not using the proper framework. Reported by: peter Modified: head/lib/csu/i386-elf/Makefile Modified: head/lib/csu/i386-elf/Makefile ============================================================================== --- head/lib/csu/i386-elf/Makefile Tue Aug 19 15:09:24 2014 (r270169) +++ head/lib/csu/i386-elf/Makefile Tue Aug 19 15:30:56 2014 (r270170) @@ -3,14 +3,14 @@ .PATH: ${.CURDIR}/../common SRCS= crti.S crtn.S -FILES= ${SRCS:N*.h:R:S/$/.o/g} gcrt1.o crt1.o Scrt1.o -FILESOWN= ${LIBOWN} -FILESGRP= ${LIBGRP} -FILESMODE= ${LIBMODE} -FILESDIR= ${LIBDIR} +OBJS= ${SRCS:N*.h:R:S/$/.o/g} +OBJS+= gcrt1.o crt1.o Scrt1.o CFLAGS+= -I${.CURDIR}/../common \ -I${.CURDIR}/../../libc/include -CLEANFILES= ${FILES} crt1_c.o crt1_s.o gcrt1_c.o Scrt1_c.o + +all: ${OBJS} + +CLEANFILES= ${OBJS} crt1_c.o crt1_s.o gcrt1_c.o Scrt1_c.o CLEANFILES+= crt1_c.s gcrt1_c.s Scrt1_c.s # See the comment in lib/csu/common/crtbrand.c for the reason crt1_c.c is not @@ -48,4 +48,8 @@ Scrt1.o: Scrt1_c.o crt1_s.o ${LD} ${_LDFLAGS} -o Scrt1.o -r crt1_s.o Scrt1_c.o objcopy --localize-symbol _start1 Scrt1.o -.include +realinstall: + ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ + ${OBJS} ${DESTDIR}${LIBDIR} + +.include From owner-svn-src-all@FreeBSD.ORG Tue Aug 19 15:40:26 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF4BB46A; Tue, 19 Aug 2014 15:40:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A2203C98; Tue, 19 Aug 2014 15:40:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7JFeQrv005835; Tue, 19 Aug 2014 15:40:26 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7JFeQvc005834; Tue, 19 Aug 2014 15:40:26 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201408191540.s7JFeQvc005834@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 19 Aug 2014 15:40:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270171 - head/tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 15:40:26 -0000 Author: hselasky Date: Tue Aug 19 15:40:26 2014 New Revision: 270171 URL: http://svnweb.freebsd.org/changeset/base/270171 Log: Add missing WITHOUT_CUSE file. Added: head/tools/build/options/WITHOUT_CUSE (contents, props changed) Added: head/tools/build/options/WITHOUT_CUSE ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_CUSE Tue Aug 19 15:40:26 2014 (r270171) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to not build CUSE-related programs and libraries. From owner-svn-src-all@FreeBSD.ORG Tue Aug 19 15:41:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 054125B0; Tue, 19 Aug 2014 15:41:13 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B61BD3D17; Tue, 19 Aug 2014 15:41:12 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 6B1551FE027; Tue, 19 Aug 2014 17:41:03 +0200 (CEST) Message-ID: <53F3701F.9040602@selasky.org> Date: Tue, 19 Aug 2014 17:41:19 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r267440 - in head: lib share/mk sys/modules sys/sys References: <201406130853.s5D8rowf084163@svn.freebsd.org> <53F36973.4080900@FreeBSD.org> In-Reply-To: <53F36973.4080900@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 15:41:13 -0000 Hi, > You forgot to define a tools/build/options/WITHOUT_CUSE so it is added > to src.conf(5). > > ~/svn/base/tools/build/options # ./makeman > > ../../../share/man/man5/src.conf.5 > no description found for WITHOUT_CUSE, skipping > > See: http://svnweb.freebsd.org/changeset/base/270171 Thank you! --HPS From owner-svn-src-all@FreeBSD.ORG Tue Aug 19 15:46:40 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C39AC957; Tue, 19 Aug 2014 15:46:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE74B3D6D; Tue, 19 Aug 2014 15:46:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7JFkejd007933; Tue, 19 Aug 2014 15:46:40 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7JFkeXH007932; Tue, 19 Aug 2014 15:46:40 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201408191546.s7JFkeXH007932@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 19 Aug 2014 15:46:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270172 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 15:46:40 -0000 Author: bdrewery Date: Tue Aug 19 15:46:40 2014 New Revision: 270172 URL: http://svnweb.freebsd.org/changeset/base/270172 Log: Regen after r270171 Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Tue Aug 19 15:40:26 2014 (r270171) +++ head/share/man/man5/src.conf.5 Tue Aug 19 15:46:40 2014 (r270172) @@ -327,6 +327,9 @@ similar to DWARF and the venerable stabs Set to not build .Xr ctm 1 and related utilities. +.It Va WITHOUT_CUSE +.\" from FreeBSD: head/tools/build/options/WITHOUT_CUSE 270171 2014-08-19 15:40:26Z hselasky +Set to not build CUSE-related programs and libraries. .It Va WITHOUT_CXX .\" from FreeBSD: head/tools/build/options/WITHOUT_CXX 220402 2011-04-06 20:19:07Z uqs Set to not build From owner-svn-src-all@FreeBSD.ORG Tue Aug 19 15:46:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 054D1A96 for ; Tue, 19 Aug 2014 15:46:57 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0E123D73 for ; Tue, 19 Aug 2014 15:46:56 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id s7JFkun1071607 for ; Tue, 19 Aug 2014 15:46:56 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id s7JFkuB2071602 for svn-src-all@freebsd.org; Tue, 19 Aug 2014 15:46:56 GMT (envelope-from bdrewery) Received: (qmail 42975 invoked from network); 19 Aug 2014 10:46:52 -0500 Received: from unknown (HELO ?10.10.0.24?) (freebsd@shatow.net@10.10.0.24) by sweb.xzibition.com with ESMTPA; 19 Aug 2014 10:46:52 -0500 Message-ID: <53F3716A.9040305@FreeBSD.org> Date: Tue, 19 Aug 2014 10:46:50 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r267440 - in head: lib share/mk sys/modules sys/sys References: <201406130853.s5D8rowf084163@svn.freebsd.org> <53F36973.4080900@FreeBSD.org> <53F3701F.9040602@selasky.org> In-Reply-To: <53F3701F.9040602@selasky.org> OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0Tv2nt3tlQ0k6ofALMledHWTCcJFxs7Vc" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 15:46:57 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --0Tv2nt3tlQ0k6ofALMledHWTCcJFxs7Vc Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 8/19/2014 10:41 AM, Hans Petter Selasky wrote: > Hi, >=20 >> You forgot to define a tools/build/options/WITHOUT_CUSE so it is added= >> to src.conf(5). >> >> ~/svn/base/tools/build/options # ./makeman > >> ../../../share/man/man5/src.conf.5 >> no description found for WITHOUT_CUSE, skipping >> >> >=20 > See: >=20 > http://svnweb.freebsd.org/changeset/base/270171 >=20 > Thank you! >=20 > --HPS Thanks, I rengerated src.conf.5 for you. --=20 Regards, Bryan Drewery --0Tv2nt3tlQ0k6ofALMledHWTCcJFxs7Vc Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) iQEcBAEBAgAGBQJT83FqAAoJEDXXcbtuRpfPpnkH/REXfwBnmY87pq25CecRtPri N+RkHoYeyVQcANhJMXygoJY46ED9aTGMOBJtKNpI3Q8uCcCXNzrH9MHoNU2XvFko ZR+35RWoV0xFfWaAYP4HuABec4eDBhD11bNJiT4JHcHuBx+wrB1F6vFyo46vL7yS yGao0nBNLe61aegMrpjHIL+fppwYd080F+pThLSBIFhVlhyCODIZClIm5Tb/OYOl SgBFk2AKD1jNOwj/3q2qwVSUZEL+e0rWAAebokzkh3/4XmBNvb3Wz6PtOohAXhvO TtOdEK/cmL4FSgiv3dBqm0AJY2kaGObj3CTD02jayIhSMj85IufiKTqhEr8ylRA= =Rp0N -----END PGP SIGNATURE----- --0Tv2nt3tlQ0k6ofALMledHWTCcJFxs7Vc-- From owner-svn-src-all@FreeBSD.ORG Tue Aug 19 15:47:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 34A82C60; Tue, 19 Aug 2014 15:47:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F8A73D8D; Tue, 19 Aug 2014 15:47:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7JFlp8w008136; Tue, 19 Aug 2014 15:47:52 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7JFlpoh008135; Tue, 19 Aug 2014 15:47:51 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201408191547.s7JFlpoh008135@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 19 Aug 2014 15:47:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270173 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 15:47:52 -0000 Author: bdrewery Date: Tue Aug 19 15:47:51 2014 New Revision: 270173 URL: http://svnweb.freebsd.org/changeset/base/270173 Log: Bump __FreeBSD_version after r269489 so ports can use it. Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Tue Aug 19 15:46:40 2014 (r270172) +++ head/sys/sys/param.h Tue Aug 19 15:47:51 2014 (r270173) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100028 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100029 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@FreeBSD.ORG Tue Aug 19 15:49:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2D438DF5; Tue, 19 Aug 2014 15:49:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 17C733DA9; Tue, 19 Aug 2014 15:49:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7JFncAv008434; Tue, 19 Aug 2014 15:49:38 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7JFncAV008433; Tue, 19 Aug 2014 15:49:38 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201408191549.s7JFncAV008433@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 19 Aug 2014 15:49:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270174 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 15:49:39 -0000 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 owner-svn-src-all@FreeBSD.ORG Tue Aug 19 15:51:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29C90FC8; Tue, 19 Aug 2014 15:51:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1404D3E87; Tue, 19 Aug 2014 15:51:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7JFph1q011976; Tue, 19 Aug 2014 15:51:43 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7JFph5J011975; Tue, 19 Aug 2014 15:51:43 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201408191551.s7JFph5J011975@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 19 Aug 2014 15:51:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r270175 - stable/9/sys/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 15:51:44 -0000 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 owner-svn-src-all@FreeBSD.ORG Tue Aug 19 17:04:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B9C2CBD8; Tue, 19 Aug 2014 17:04:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4ADE3753; Tue, 19 Aug 2014 17:04:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7JH4IAi045204; Tue, 19 Aug 2014 17:04:18 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7JH4I3c045203; Tue, 19 Aug 2014 17:04:18 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201408191704.s7JH4I3c045203@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 19 Aug 2014 17:04:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270176 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 17:04:18 -0000 Author: mav Date: Tue Aug 19 17:04:18 2014 New Revision: 270176 URL: http://svnweb.freebsd.org/changeset/base/270176 Log: Fix lock recursion on LUN shutdown, introduced on r269497. MFC after: 3 days Modified: head/sys/cam/ctl/ctl_tpc.c Modified: head/sys/cam/ctl/ctl_tpc.c ============================================================================== --- head/sys/cam/ctl/ctl_tpc.c Tue Aug 19 15:51:43 2014 (r270175) +++ head/sys/cam/ctl/ctl_tpc.c Tue Aug 19 17:04:18 2014 (r270176) @@ -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 owner-svn-src-all@FreeBSD.ORG Tue Aug 19 17:54:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87615460; Tue, 19 Aug 2014 17:54:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 705243C99; Tue, 19 Aug 2014 17:54:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7JHsHZS069845; Tue, 19 Aug 2014 17:54:17 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7JHsF2M069832; Tue, 19 Aug 2014 17:54:15 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201408191754.s7JHsF2M069832@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 19 Aug 2014 17:54:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r270177 - in stable/8: tools/regression/usr.sbin/etcupdate usr.sbin usr.sbin/etcupdate X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 17:54:17 -0000 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 owner-svn-src-all@FreeBSD.ORG Tue Aug 19 18:27:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5307BECD; Tue, 19 Aug 2014 18:27:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3EA2C3058; Tue, 19 Aug 2014 18:27:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7JIRi6Z085302; Tue, 19 Aug 2014 18:27:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7JIRigk085301; Tue, 19 Aug 2014 18:27:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201408191827.s7JIRigk085301@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 19 Aug 2014 18:27:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270178 - head/secure/usr.bin/ssh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 18:27:44 -0000 Author: ngie Date: Tue Aug 19 18:27:43 2014 New Revision: 270178 URL: http://svnweb.freebsd.org/changeset/base/270178 Log: Fix typo (LIBLDNSADD -> LIBLDNS) to fix "make checkdpadd" X-MFC with: r269648 Phabric: D634 Approved by: jmmv (mentor) Modified: head/secure/usr.bin/ssh/Makefile Modified: head/secure/usr.bin/ssh/Makefile ============================================================================== --- head/secure/usr.bin/ssh/Makefile Tue Aug 19 17:54:15 2014 (r270177) +++ head/secure/usr.bin/ssh/Makefile Tue Aug 19 18:27:43 2014 (r270178) @@ -22,7 +22,7 @@ USEPRIVATELIB= ssh .if ${MK_LDNS} != "no" CFLAGS+= -DHAVE_LDNS=1 DPADD+= ${LIBLDNS} -LDADD+= ${LIBLDNSADD} +LDADD+= ${LDLDNS} USEPRIVATELIB+= ldns .endif From owner-svn-src-all@FreeBSD.ORG Tue Aug 19 18:31:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 407E1188; Tue, 19 Aug 2014 18:31:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C449308B; Tue, 19 Aug 2014 18:31:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7JIVLiQ088759; Tue, 19 Aug 2014 18:31:21 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7JIVLj5088758; Tue, 19 Aug 2014 18:31:21 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201408191831.s7JIVLj5088758@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 19 Aug 2014 18:31:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270179 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 18:31:21 -0000 Author: ngie Date: Tue Aug 19 18:31:20 2014 New Revision: 270179 URL: http://svnweb.freebsd.org/changeset/base/270179 Log: Add missing libraries to DPADD; sort DPADD so DPADD and LDADD match up This fixes "make checkdpadd" Approved by: jmmv (mentor) MFC after: 2 weeks Phabric: D630 PR: 192765 Modified: head/usr.sbin/ctld/Makefile Modified: head/usr.sbin/ctld/Makefile ============================================================================== --- head/usr.sbin/ctld/Makefile Tue Aug 19 18:27:43 2014 (r270178) +++ head/usr.sbin/ctld/Makefile Tue Aug 19 18:31:20 2014 (r270179) @@ -9,8 +9,8 @@ CFLAGS+= -I${.CURDIR}/../../sys/dev/iscs #CFLAGS+= -DICL_KERNEL_PROXY MAN= ctld.8 ctl.conf.5 -DPADD= ${LIBCAM} ${LIBSBUF} ${LIBBSDXML} ${LIBUTIL} -LDADD= -lbsdxml -lcam -lcrypto -lfl -lsbuf -lssl -lutil +DPADD= ${LIBBSDXML} ${LIBCAM} ${LIBCRYPTO} ${LIBL} ${LIBSBUF} ${LIBSSL} ${LIBUTIL} +LDADD= -lbsdxml -lcam -lcrypto -ll -lsbuf -lssl -lutil YFLAGS+= -v CLEANFILES= y.tab.c y.tab.h y.output From owner-svn-src-all@FreeBSD.ORG Tue Aug 19 18:47:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 444689A6; Tue, 19 Aug 2014 18:47:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2FEC3328A; Tue, 19 Aug 2014 18:47:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7JIlmXq094693; Tue, 19 Aug 2014 18:47:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7JIllQ8094692; Tue, 19 Aug 2014 18:47:47 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201408191847.s7JIllQ8094692@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 19 Aug 2014 18:47:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270180 - head/usr.sbin/nmtree X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 18:47:48 -0000 Author: ngie Date: Tue Aug 19 18:47:47 2014 New Revision: 270180 URL: http://svnweb.freebsd.org/changeset/base/270180 Log: Add LIBMD and LIBUTIL to DPADD to fix "make checkdpadd" Approved by: jmmv (mentor) MFC after: 5 days Phabric: D633 PR: 192763 Modified: head/usr.sbin/nmtree/Makefile Modified: head/usr.sbin/nmtree/Makefile ============================================================================== --- head/usr.sbin/nmtree/Makefile Tue Aug 19 18:31:20 2014 (r270179) +++ head/usr.sbin/nmtree/Makefile Tue Aug 19 18:47:47 2014 (r270180) @@ -8,6 +8,7 @@ PROG= mtree MAN= mtree.5 mtree.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 owner-svn-src-all@FreeBSD.ORG Tue Aug 19 19:12:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AAD4A57F; Tue, 19 Aug 2014 19:12:57 +0000 (UTC) Received: from mail.made4.biz (mail.made4.biz [IPv6:2001:41d0:2:c018::1:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6BDEE356F; Tue, 19 Aug 2014 19:12:57 +0000 (UTC) Received: from 2a02-8428-011b-e000-0290-f5ff-fe9d-b78c.rev.sfr.net ([2a02:8428:11b:e000:290:f5ff:fe9d:b78c] helo=magellan.dumbbell.fr) by mail.made4.biz with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.82_1-5b7a7c0-XX (FreeBSD)) (envelope-from ) id 1XJopz-0000Si-M6; Tue, 19 Aug 2014 21:12:55 +0200 Message-ID: <53F3A1B2.50905@FreeBSD.org> Date: Tue, 19 Aug 2014 21:12:50 +0200 From: =?windows-1252?Q?Jean-S=E9bastien_P=E9dron?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Jeremie Le Hen Subject: Re: svn commit: r269729 - in head/usr.bin/sed: . tests References: <53e508dd.23d7.7477a7f9@svn.freebsd.org> <20140811202954.GA66720@caravan.chchile.org> In-Reply-To: <20140811202954.GA66720@caravan.chchile.org> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="sW96FqqW5XhsQp6Hb88qdVcu0utJkB1rL" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 19:12:57 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --sW96FqqW5XhsQp6Hb88qdVcu0utJkB1rL Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 11.08.2014 22:29, Jeremie Le Hen wrote: >> sed(1): Don't force a newline on last line, if input stream doesn't = have one >=20 > Any plan to MFC this? Sorry J=E9r=E9mie, I missed your mail... I'm not sure what to think because the out-of-the-box behavior differs from previous version. This could break some scripts and it would be quite difficult to debug. Of course, the problem will come with 11.0-RELEASE. I'd personnaly love to have that in stable/10, but that may not be the case for anyone :) Do you need this in a particular branch? --=20 Jean-S=E9bastien P=E9dron --sW96FqqW5XhsQp6Hb88qdVcu0utJkB1rL Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJT86G3XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NzA4N0ZEMUFFQUUwRTEyREJDNkE2RjAz OUU5OTc2MUE1RkQ5NENDAAoJEDnpl2Gl/ZTMvb8QAJu3Zsj+i9fsUV7O7W68lyED SIGjDDntHCWcLFUaKYq7xWqlvfSTFd5AYpdqyglHf64Z7+s+4r+vecbSM4zYVjt6 EUPrBPxnpPO/9Gw1hEYbdXjWzRUCXeYzBOzeZrQW41y8lxBKlWnRrp3o36MOlUbh ipYk67iigGSc+t7632zMLU0qxRgFZk+CpSLaHqgQ7k2oAtqSSUkv8ck5TGtDeNiC 4sI+Dn1dMOw3CFIFtCac8OTVMSWc1cCz5aWvVCvlk7gHA80X0SpFAcivjINjkA3T w9NzcPrRNTWO7YlaVcRxzu5p5KhJEFQN/Oz/mI8vdO20wKm5fmyy1ypAuSDiqaz8 AgTkdfAkyx90lX8CBxkEj50k3UpCJF37oHUoYWUgZGRl1vKR3m2zOehjyOKcMfDB dOoVjKmoH5cq599Uceg4jlNewZWn4crr5EAlqEcEyA4RNrnQ5VzLOJhu2C7AdtXv Pho3OLjm+Uty27dTvRqZEBwn8OSKYnrC6U8SW4a0oxSsCc756k4wuNHUsS0wilCQ pdnQRz+9efrS+bHUJnKvxKun87nKafYnm3dh2UTW1wcitZUsohQ4tfWJrmPwpt/N IxB257NDxnxPllC6d/FgTlsgKlffETi2I5ngrt1eQDJmCmqz/r8hZJ9GSCsSItVi yNXoEyrrqfjq4ytQw6x4 =Bkb2 -----END PGP SIGNATURE----- --sW96FqqW5XhsQp6Hb88qdVcu0utJkB1rL-- From owner-svn-src-all@FreeBSD.ORG Tue Aug 19 20:22:26 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17B3688F; Tue, 19 Aug 2014 20:22:26 +0000 (UTC) Received: from mail-lb0-x236.google.com (mail-lb0-x236.google.com [IPv6:2a00:1450:4010:c04::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 09B7A3BBB; Tue, 19 Aug 2014 20:22:24 +0000 (UTC) Received: by mail-lb0-f182.google.com with SMTP id z11so5789068lbi.41 for ; Tue, 19 Aug 2014 13:22:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=0PfSD/rREhj9x+KWEsaJD21oLfcQWqRQLIR/aDPXZ0A=; b=R8ZB5iQu5vso3KEHetYODBknrg7rfIGb8U+SW5No6s69OwdSzbTFSmpaWi36DwDRZh G60gyiIch5omPQDwlDw/N4TFFPjEzzyaIyyG3zhcbtv+LDyTMRomLcGQPXYxmDFhOLt6 ymnOzvcB1rvf5fhH/3Mb8rvyhmCPOB37547gWDH4LWxAjzEULX+JNWXiONmKoW93WAU5 BLpkAWNge9YyHAH6SwAI/a50m0Madq8wzDfppnkWCNK5aE//jNl29WNMY/iZpVcPLks+ dn/XC1ztF3aD42AsPjuHoYwwJuHIcLraP6N2AUYxgftMAgclLwAWi/V69RYj7zo3yAkx H9ww== X-Received: by 10.152.45.8 with SMTP id i8mr38342673lam.3.1408479742942; Tue, 19 Aug 2014 13:22:22 -0700 (PDT) Received: from localhost ([91.225.202.78]) by mx.google.com with ESMTPSA id ap2sm8704184lac.22.2014.08.19.13.22.21 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Aug 2014 13:22:22 -0700 (PDT) Sender: Mikolaj Golub Date: Tue, 19 Aug 2014 23:22:19 +0300 From: Mikolaj Golub To: Garrett Cooper Subject: Re: svn commit: r270117 - head/sbin/hastd Message-ID: <20140819202218.GA4835@gmail.com> References: <201408180050.s7I0o9uk035177@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201408180050.s7I0o9uk035177@svn.freebsd.org> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 20:22:26 -0000 On Mon, Aug 18, 2014 at 12:50:09AM +0000, Garrett Cooper wrote: Hi Garrett, > Log: > Add -ll to LDADD to fix "make checkdpadd" > Modified: head/sbin/hastd/Makefile > ============================================================================== > --- head/sbin/hastd/Makefile Sun Aug 17 23:30:45 2014 (r270116) > +++ head/sbin/hastd/Makefile Mon Aug 18 00:50:09 2014 (r270117) > @@ -31,7 +31,7 @@ CFLAGS+=-DINET6 > .endif > > DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} ${LIBL} ${LIBPTHREAD} ${LIBUTIL} > -LDADD= -lgeom -lbsdxml -lsbuf -lpthread -lutil > +LDADD= -lgeom -lbsdxml -lsbuf -ll -lpthread -lutil I think the proper fix is to remove ${LIBL} from DPADD instead. In r250503 the intention was to remove libl dependency. It looks like I forgot to update DPADD then. -- Mikolaj Golub From owner-svn-src-all@FreeBSD.ORG Tue Aug 19 20:35:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 116C2B5C; Tue, 19 Aug 2014 20:35:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D72F73CAF; Tue, 19 Aug 2014 20:35:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7JKZ97W045360; Tue, 19 Aug 2014 20:35:09 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7JKZ9N9045359; Tue, 19 Aug 2014 20:35:09 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201408192035.s7JKZ9N9045359@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 19 Aug 2014 20:35:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270181 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 20:35:10 -0000 Author: bdrewery Date: Tue Aug 19 20:35:09 2014 New Revision: 270181 URL: http://svnweb.freebsd.org/changeset/base/270181 Log: Add recent DragonFly releases. Submitted by: Zach Crownover MFC after: 1 week Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Tue Aug 19 18:47:47 2014 (r270180) +++ head/share/misc/bsd-family-tree Tue Aug 19 20:35:09 2014 (r270181) @@ -303,9 +303,18 @@ FreeBSD 5.2 | | | | | | NetBSD 6.1.4 | | | | | | | | | | | | OpenBSD 5.5 | + | | | | | | | | | | | DragonFly 3.8.0 + | | | | | | + | | | | | | + | | | | | DragonFly 3.8.1 + | | | | | | + | | | | | | + | | | | | DragonFly 3.6.3 + | | | | | | | FreeBSD | | | | | 9.3 | | | | + | | | | DragonFly 3.8.2 | | | | | | | | | | | | | | | @@ -640,7 +649,10 @@ 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] +DragonFly 3.8.1 2014-06-16 [DFB] +DragonFly 3.6.3 2014-06-17 [DFB] FreeBSD 9.3 2014-07-05 [FBD] +DragonFly 3.8.2 2014-08-08 [DFB] Bibliography ------------------------ From owner-svn-src-all@FreeBSD.ORG Tue Aug 19 20:53:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F1DBC12F; Tue, 19 Aug 2014 20:53:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC3753EEB; Tue, 19 Aug 2014 20:53:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7JKrSMj054326; Tue, 19 Aug 2014 20:53:28 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7JKrSK8054325; Tue, 19 Aug 2014 20:53:28 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201408192053.s7JKrSK8054325@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Tue, 19 Aug 2014 20:53:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270182 - stable/10/sys/dev/vt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 20:53:29 -0000 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 owner-svn-src-all@FreeBSD.ORG Tue Aug 19 21:04:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9DB9C476; Tue, 19 Aug 2014 21:04:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6EFE43FDD; Tue, 19 Aug 2014 21:04:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7JL4W4g059224; Tue, 19 Aug 2014 21:04:32 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7JL4WKo059223; Tue, 19 Aug 2014 21:04:32 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201408192104.s7JL4WKo059223@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 19 Aug 2014 21:04:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270183 - head/usr.sbin/mountd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 21:04:32 -0000 Author: bdrewery Date: Tue Aug 19 21:04:31 2014 New Revision: 270183 URL: http://svnweb.freebsd.org/changeset/base/270183 Log: Avoid showing stale errors when nmount(2) fails. Sometimes nmount(2) will fail without setting errmsg. The previous (ignored) error would then be shown as the reason for the failed call if the next nmount(2) also fails without [ENOENT,ENOTSUP]. An example is when there is a tmpfs mounted with -o size. vfs_filteropt() adds 'size' as an error in errmsg due to 'size' not being in tmpfs_updateopts. Then tmpfs_mount returns [ENOTSUP] from nmount(2), which is then ignored. The next call may race with an unmount causing an invalid [EINVAL] that then does log an error, with the tmpfs errmsg. The race itself is a separate issue to fix as it is expected to have an [ENOENT] returned instead. In this example the mount being shown is actually nullfs, not tmpfs that the error is from. mountd[740]: can't delete exports for /poudriere/data/.m/exp-head-commit-test-devel/04/.npkg: Invalid argument mount option is unknown It should only show: mountd[740]: can't delete exports for /poudriere/data/.m/exp-head-commit-test-devel/04/.npkg: Invalid argument MFC after: 2 weeks Modified: head/usr.sbin/mountd/mountd.c Modified: head/usr.sbin/mountd/mountd.c ============================================================================== --- head/usr.sbin/mountd/mountd.c Tue Aug 19 20:53:28 2014 (r270182) +++ head/usr.sbin/mountd/mountd.c Tue Aug 19 21:04:31 2014 (r270183) @@ -1744,6 +1744,7 @@ get_exportlist(void) iov[3].iov_len = strlen(fsp->f_mntonname) + 1; iov[5].iov_base = fsp->f_mntfromname; iov[5].iov_len = strlen(fsp->f_mntfromname) + 1; + errmsg[0] = '\0'; if (nmount(iov, iovlen, fsp->f_flags) < 0 && errno != ENOENT && errno != ENOTSUP) { @@ -2501,6 +2502,7 @@ do_mount(struct exportlist *ep, struct g iov[3].iov_len = strlen(fsb->f_mntonname) + 1; iov[5].iov_base = fsb->f_mntfromname; /* "from" */ iov[5].iov_len = strlen(fsb->f_mntfromname) + 1; + errmsg[0] = '\0'; while (nmount(iov, iovlen, fsb->f_flags) < 0) { if (cp) From owner-svn-src-all@FreeBSD.ORG Tue Aug 19 21:08:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E2E86DE; Tue, 19 Aug 2014 21:08:50 +0000 (UTC) Received: from mail-ig0-x231.google.com (mail-ig0-x231.google.com [IPv6:2607:f8b0:4001:c05::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 312D8300F; Tue, 19 Aug 2014 21:08:50 +0000 (UTC) Received: by mail-ig0-f177.google.com with SMTP id hn18so10301119igb.4 for ; Tue, 19 Aug 2014 14:08:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=+dzADuAfNud3urB6BGywX9IUdtgifZXgba0cb9B2jz8=; b=KGlpkM3uAp3PMrP4+rpf0993R6bbY93CbmqKT3hK6vihQu9qU0OtqAPUlRIPmuwf62 4p1K+L2CsXCnM/KFLzApNlHzNtVUqIqhlIJaIeOlo1n3dARpTrTqpLNDXr11LXQJUZ6L OQF6IxC5TZRkXiOCbzFrgrznUDtx5IxTEprdG9ouYWB/hJdQypcK2ntp/6YkaLdiik1c aOa8S31hGpYFpTxaJKw9Z1cdPkS4LZ4/PreWHsQNOhAIaVTdZkSqFZ/gbculUjTbsfqt gfEoDaAF8BtJA5GDqougxqxQpM9XhrwtCR7XqYWqBN4fpQ2IAFtgtW4b4Y11KsYrsimk 3sug== MIME-Version: 1.0 X-Received: by 10.50.35.133 with SMTP id h5mr8565459igj.26.1408482529671; Tue, 19 Aug 2014 14:08:49 -0700 (PDT) Received: by 10.50.72.69 with HTTP; Tue, 19 Aug 2014 14:08:49 -0700 (PDT) In-Reply-To: <201408192104.s7JL4WKo059223@svn.freebsd.org> References: <201408192104.s7JL4WKo059223@svn.freebsd.org> Date: Tue, 19 Aug 2014 14:08:49 -0700 Message-ID: Subject: Re: svn commit: r270183 - head/usr.sbin/mountd From: Garrett Cooper To: Bryan Drewery Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 21:08:50 -0000 On Tue, Aug 19, 2014 at 2:04 PM, Bryan Drewery wrote: > Author: bdrewery > Date: Tue Aug 19 21:04:31 2014 > New Revision: 270183 > URL: http://svnweb.freebsd.org/changeset/base/270183 > > Log: > Avoid showing stale errors when nmount(2) fails. > > Sometimes nmount(2) will fail without setting errmsg. The previous (ignored) > error would then be shown as the reason for the failed call if the next > nmount(2) also fails without [ENOENT,ENOTSUP]. > > An example is when there is a tmpfs mounted with -o size. vfs_filteropt() adds > 'size' as an error in errmsg due to 'size' not being in tmpfs_updateopts. Then > tmpfs_mount returns [ENOTSUP] from nmount(2), which is then ignored. The next > call may race with an unmount causing an invalid [EINVAL] that then does log an > error, with the tmpfs errmsg. > > The race itself is a separate issue to fix as it is expected to have an > [ENOENT] returned instead. > > In this example the mount being shown is actually nullfs, not tmpfs that the > error is from. > > mountd[740]: can't delete exports for /poudriere/data/.m/exp-head-commit-test-devel/04/.npkg: Invalid argument mount option is unknown > > It should only show: > > mountd[740]: can't delete exports for /poudriere/data/.m/exp-head-commit-test-devel/04/.npkg: Invalid argument > > MFC after: 2 weeks Hmm -- I wonder if this is related to https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191218 ... Guess I get to retest that bug after this commit :)! From owner-svn-src-all@FreeBSD.ORG Tue Aug 19 21:24:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AA850B97 for ; Tue, 19 Aug 2014 21:24:43 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C56D31FE for ; Tue, 19 Aug 2014 21:24:43 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id s7JLOhob084737 for ; Tue, 19 Aug 2014 21:24:43 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id s7JLOhsr084736 for svn-src-all@freebsd.org; Tue, 19 Aug 2014 21:24:43 GMT (envelope-from bdrewery) Received: (qmail 35258 invoked from network); 19 Aug 2014 16:24:41 -0500 Received: from unknown (HELO ?10.10.0.24?) (freebsd@shatow.net@10.10.0.24) by sweb.xzibition.com with ESMTPA; 19 Aug 2014 16:24:41 -0500 Message-ID: <53F3C096.5080907@FreeBSD.org> Date: Tue, 19 Aug 2014 16:24:38 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r270183 - head/usr.sbin/mountd References: <201408192104.s7JL4WKo059223@svn.freebsd.org> In-Reply-To: <201408192104.s7JL4WKo059223@svn.freebsd.org> OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="G4JGJbjaLGdOhtnrPwq8mVx7CAi3Jfbro" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 21:24:43 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --G4JGJbjaLGdOhtnrPwq8mVx7CAi3Jfbro Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 8/19/2014 4:04 PM, Bryan Drewery wrote: > Author: bdrewery > Date: Tue Aug 19 21:04:31 2014 > New Revision: 270183 > URL: http://svnweb.freebsd.org/changeset/base/270183 >=20 > Log: > Avoid showing stale errors when nmount(2) fails. > =20 > Sometimes nmount(2) will fail without setting errmsg. The previous (i= gnored) > error would then be shown as the reason for the failed call if the ne= xt > nmount(2) also fails without [ENOENT,ENOTSUP]. > =20 > An example is when there is a tmpfs mounted with -o size. vfs_filtero= pt() adds > 'size' as an error in errmsg due to 'size' not being in tmpfs_updateo= pts. Then > tmpfs_mount returns [ENOTSUP] from nmount(2), which is then ignored. = The next > call may race with an unmount causing an invalid [EINVAL] that then d= oes log an > error, with the tmpfs errmsg. > =20 > The race itself is a separate issue to fix as it is expected to have = an > [ENOENT] returned instead. The actual race causing the EINVAL is here with a proposed patch: http://lists.freebsd.org/pipermail/freebsd-fs/2013-August/018008.html I have not spent time analyzing/testing it yet. > =20 > In this example the mount being shown is actually nullfs, not tmpfs t= hat the > error is from. > =20 > mountd[740]: can't delete exports for /poudriere/data/.m/exp-head-c= ommit-test-devel/04/.npkg: Invalid argument mount option is unknow= n > =20 > It should only show: > =20 > mountd[740]: can't delete exports for /poudriere/data/.m/exp-head-c= ommit-test-devel/04/.npkg: Invalid argument > =20 > MFC after: 2 weeks >=20 > Modified: > head/usr.sbin/mountd/mountd.c >=20 > Modified: head/usr.sbin/mountd/mountd.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.sbin/mountd/mountd.c Tue Aug 19 20:53:28 2014 (r270182) > +++ head/usr.sbin/mountd/mountd.c Tue Aug 19 21:04:31 2014 (r270183) > @@ -1744,6 +1744,7 @@ get_exportlist(void) > iov[3].iov_len =3D strlen(fsp->f_mntonname) + 1; > iov[5].iov_base =3D fsp->f_mntfromname; > iov[5].iov_len =3D strlen(fsp->f_mntfromname) + 1; > + errmsg[0] =3D '\0'; > =20 > if (nmount(iov, iovlen, fsp->f_flags) < 0 && > errno !=3D ENOENT && errno !=3D ENOTSUP) { > @@ -2501,6 +2502,7 @@ do_mount(struct exportlist *ep, struct g > iov[3].iov_len =3D strlen(fsb->f_mntonname) + 1; > iov[5].iov_base =3D fsb->f_mntfromname; /* "from" */ > iov[5].iov_len =3D strlen(fsb->f_mntfromname) + 1; > + errmsg[0] =3D '\0'; > =09 > while (nmount(iov, iovlen, fsb->f_flags) < 0) { > if (cp) >=20 --=20 Regards, Bryan Drewery --G4JGJbjaLGdOhtnrPwq8mVx7CAi3Jfbro Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) iQEcBAEBAgAGBQJT88CXAAoJEDXXcbtuRpfPm+sIALUpaWY9gwkcahVPSTvK/DIM ejtcfuZ3xuy7n3LTw5oCa4RwEaOpRf1eo3NknPbkMiREUKAXgjRo/HAVLmFlEIZB d+cVvHrqnnapG0IZ9HjjI5G+IT/CLNviDtw7cb/p4skJz2rGXjvMbg1IdXidItE5 6MkCmtO2Tk+l/8/erS9RnYu2k0LhSC5BJOt2fiaAehsqd0de7l7LVSth4e/n5pP1 tq+rpd/nhi+05dyTaNeL8Ibv2i7arkkDo1oJlGAKblNRDZJzfBEb/yGIvwUjt51G fzw/AqK0hMvb9xIAJrj8TDPtWrCVaz2Pwdr+UTkFtGKGRAusi2gUs3qzGW8NnZE= =VpX4 -----END PGP SIGNATURE----- --G4JGJbjaLGdOhtnrPwq8mVx7CAi3Jfbro-- From owner-svn-src-all@FreeBSD.ORG Tue Aug 19 21:31:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2D67D52; Tue, 19 Aug 2014 21:31:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CDC5332B9; Tue, 19 Aug 2014 21:31:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7JLVWWv071393; Tue, 19 Aug 2014 21:31:32 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7JLVW0W071392; Tue, 19 Aug 2014 21:31:32 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201408192131.s7JLVW0W071392@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Tue, 19 Aug 2014 21:31:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r270184 - stable/9/sys/dev/vt X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 21:31:33 -0000 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 owner-svn-src-all@FreeBSD.ORG Tue Aug 19 23:08:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A3803F9F; Tue, 19 Aug 2014 23:08:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8EA343AF9; Tue, 19 Aug 2014 23:08:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7JN8lDJ015951; Tue, 19 Aug 2014 23:08:47 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7JN8l8M015950; Tue, 19 Aug 2014 23:08:47 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <201408192308.s7JN8l8M015950@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Tue, 19 Aug 2014 23:08:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270185 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 23:08:47 -0000 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 owner-svn-src-all@FreeBSD.ORG Tue Aug 19 23:15:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19EB51A9; Tue, 19 Aug 2014 23:15:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE39B3BA9; Tue, 19 Aug 2014 23:15:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7JNFl4q020142; Tue, 19 Aug 2014 23:15:47 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7JNFl9h020141; Tue, 19 Aug 2014 23:15:47 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <201408192315.s7JNFl9h020141@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Tue, 19 Aug 2014 23:15:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270186 - stable/10/sys/cddl/dev/dtrace/x86 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 23:15:48 -0000 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 owner-svn-src-all@FreeBSD.ORG Tue Aug 19 23:33:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8DD05581; Tue, 19 Aug 2014 23:33:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E69C3D3C; Tue, 19 Aug 2014 23:33:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7JNXqMl028820; Tue, 19 Aug 2014 23:33:52 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7JNXpiC028815; Tue, 19 Aug 2014 23:33:51 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201408192333.s7JNXpiC028815@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 19 Aug 2014 23:33:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270187 - in stable/10: . etc lib share/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 23:33:52 -0000 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 owner-svn-src-all@FreeBSD.ORG Wed Aug 20 00:06:54 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1A539E0; Wed, 20 Aug 2014 00:06:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ACDDF300B; Wed, 20 Aug 2014 00:06:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7K06sYF043507; Wed, 20 Aug 2014 00:06:54 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7K06sCG043506; Wed, 20 Aug 2014 00:06:54 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201408200006.s7K06sCG043506@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 20 Aug 2014 00:06:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r270188 - stable/8 X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 00:06:54 -0000 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 owner-svn-src-all@FreeBSD.ORG Wed Aug 20 00:14:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2D61DC3D; Wed, 20 Aug 2014 00:14:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 18C1830C9; Wed, 20 Aug 2014 00:14:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7K0EfeL047707; Wed, 20 Aug 2014 00:14:41 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7K0EfMI047706; Wed, 20 Aug 2014 00:14:41 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201408200014.s7K0EfMI047706@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 20 Aug 2014 00:14:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270189 - head/rescue/rescue X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 00:14:42 -0000 Author: delphij Date: Wed Aug 20 00:14:41 2014 New Revision: 270189 URL: http://svnweb.freebsd.org/changeset/base/270189 Log: Add zdb into rescue environment. On amd64, this would increase the binary size by 1.1MiB and make it possible to examine zpool status offline, useful for recovery and diagnostic purposes. Submitted by: sef Obtained from: FreeNAS MFC after: 2 weeks Modified: head/rescue/rescue/Makefile Modified: head/rescue/rescue/Makefile ============================================================================== --- head/rescue/rescue/Makefile Wed Aug 20 00:06:54 2014 (r270188) +++ head/rescue/rescue/Makefile Wed Aug 20 00:14:41 2014 (r270189) @@ -113,6 +113,7 @@ CRUNCH_PROGS_sbin+= ipf .if ${MK_ZFS} != "no" CRUNCH_PROGS_sbin+= zfs CRUNCH_PROGS_sbin+= zpool +CRUNCH_PROGS_usr.sbin+= zdb .endif # crunchgen does not like C++ programs; this should be fixed someday @@ -120,7 +121,7 @@ CRUNCH_PROGS_sbin+= zpool CRUNCH_LIBS+= -lalias -lcam -lncursesw -ldevstat -lipsec .if ${MK_ZFS} != "no" -CRUNCH_LIBS+= -lavl -lzfs_core -lzfs -lnvpair -lpthread -luutil -lumem +CRUNCH_LIBS+= -lavl -lzpool -lzfs_core -lzfs -lnvpair -lpthread -luutil -lumem .endif CRUNCH_LIBS+= -lgeom -lbsdxml -lkiconv .if ${MK_OPENSSL} == "no" @@ -158,6 +159,7 @@ CRUNCH_SRCDIR_ipf= $(.CURDIR)/../../sbin .if ${MK_ZFS} != "no" CRUNCH_SRCDIR_zfs= ${.CURDIR}/../../cddl/sbin/zfs CRUNCH_SRCDIR_zpool= ${.CURDIR}/../../cddl/sbin/zpool +CRUNCH_SRCDIR_zdb= ${.CURDIR}/../../cddl/usr.sbin/zdb .endif CRUNCH_ALIAS_reboot= fastboot halt fasthalt CRUNCH_ALIAS_restore= rrestore @@ -208,7 +210,7 @@ CRUNCH_ALIAS_id= groups whoami # CRUNCH_SRCDIRS+= usr.sbin -CRUNCH_PROGS_usr.sbin= chroot +CRUNCH_PROGS_usr.sbin+= chroot CRUNCH_PROGS_usr.sbin+= chown CRUNCH_ALIAS_chown= chgrp From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 00:28:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A23CF55; Wed, 20 Aug 2014 00:28:34 +0000 (UTC) Received: from mail-ig0-x22a.google.com (mail-ig0-x22a.google.com [IPv6:2607:f8b0:4001:c05::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E720431EE; Wed, 20 Aug 2014 00:28:33 +0000 (UTC) Received: by mail-ig0-f170.google.com with SMTP id h3so10477386igd.3 for ; Tue, 19 Aug 2014 17:28:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=DcWoNuqS+A66nuOojkn9rGU3pd/k/KBFGr/7P91MuUw=; b=AhDWb4t9gwvqza0EqD1qgogBZcN4eogthkvFFQ+O7f+a9mbf8ITmpHAUGaazNBW8Uk LK+BNzZ8Td7Xn8f1wAOxgVZPwyR0oe7YVNF1Eeyl6kLq7fvNlzWxFgCJJ0KXeCrpSX41 hh0MleVQdbL1F6ZRfFmgI/aEkTe5tAvX5vrAnWwzBA76ggckELTMaGa3LFopIH5GtHKp 09MKXmov2PbwZKGevJ55RhwCeLajdjTxwNnY9jjt6gP13TF83JLL+cYnZne8riRC5y2y SylY7gACBzX6hX+lkmQcg6S/Z71mnku3tezERgfyokbxUnj0PsDbMtyqtMHQ8411im3w NgjQ== MIME-Version: 1.0 X-Received: by 10.50.32.10 with SMTP id e10mr9489827igi.7.1408494513346; Tue, 19 Aug 2014 17:28:33 -0700 (PDT) Received: by 10.50.72.69 with HTTP; Tue, 19 Aug 2014 17:28:33 -0700 (PDT) In-Reply-To: <201408192333.s7JNXpiC028815@svn.freebsd.org> References: <201408192333.s7JNXpiC028815@svn.freebsd.org> Date: Tue, 19 Aug 2014 17:28:33 -0700 Message-ID: Subject: Re: svn commit: r270187 - in stable/10: . etc lib share/mk From: Garrett Cooper To: Ian Lepore Content-Type: text/plain; charset=UTF-8 Cc: svn-src-stable@freebsd.org, "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , svn-src-stable-10@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 00:28:34 -0000 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 owner-svn-src-all@FreeBSD.ORG Wed Aug 20 00:33:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0506E161; Wed, 20 Aug 2014 00:33:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E4E93328A; Wed, 20 Aug 2014 00:33:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7K0Xbep057004; Wed, 20 Aug 2014 00:33:37 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7K0XbNw057003; Wed, 20 Aug 2014 00:33:37 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201408200033.s7K0XbNw057003@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 20 Aug 2014 00:33:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270190 - head/tools/build/make_check X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 00:33:38 -0000 Author: ian Date: Wed Aug 20 00:33:37 2014 New Revision: 270190 URL: http://svnweb.freebsd.org/changeset/base/270190 Log: Don't stop other legs of a parallel build due to a failure in make_check. The whole point is to see if there's any failure, which is handled by building a newer version of make. Modified: head/tools/build/make_check/Makefile Modified: head/tools/build/make_check/Makefile ============================================================================== --- head/tools/build/make_check/Makefile Wed Aug 20 00:14:41 2014 (r270189) +++ head/tools/build/make_check/Makefile Wed Aug 20 00:33:37 2014 (r270190) @@ -2,6 +2,9 @@ .MAKE.MODE= normal +# Failure is handled by the invoker, don't kill other legs of a parallel build. +MAKE_JOB_ERROR_TOKEN=no + # Test for broken LHS expansion. # This *must* cause make(1) to detect a recursive variable, and fail as such. .if make(lhs_expn) From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 01:26:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1F78A86B; Wed, 20 Aug 2014 01:26:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E45C4368F; Wed, 20 Aug 2014 01:26:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7K1QSAd079695; Wed, 20 Aug 2014 01:26:28 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7K1QSON079691; Wed, 20 Aug 2014 01:26:28 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201408200126.s7K1QSON079691@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Wed, 20 Aug 2014 01:26:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270191 - in head: share/man/man4 sys/dev/usb sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 01:26:29 -0000 Author: kevlo Date: Wed Aug 20 01:26:27 2014 New Revision: 270191 URL: http://svnweb.freebsd.org/changeset/base/270191 Log: Add the D-Link DWA-125 rev D1. Tested by myself. Modified: head/share/man/man4/urtwn.4 head/sys/dev/usb/usbdevs head/sys/dev/usb/wlan/if_urtwn.c Modified: head/share/man/man4/urtwn.4 ============================================================================== --- head/share/man/man4/urtwn.4 Wed Aug 20 00:33:37 2014 (r270190) +++ head/share/man/man4/urtwn.4 Wed Aug 20 01:26:27 2014 (r270191) @@ -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: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Wed Aug 20 00:33:37 2014 (r270190) +++ head/sys/dev/usb/usbdevs Wed Aug 20 01:26:27 2014 (r270191) @@ -1194,7 +1194,7 @@ product ASUS USB_N53 0x179d ASUS Black product ASUS RTL8192CU 0x17ab RTL8192CU product ASUS USBN66 0x17ad USB-N66 product ASUS USBN10NANO 0x17ba USB-N10 Nano -product ASUS AC51 0x17d1 USB-AC51 +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 @@ -1593,6 +1593,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: head/sys/dev/usb/wlan/if_urtwn.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtwn.c Wed Aug 20 00:33:37 2014 (r270190) +++ head/sys/dev/usb/wlan/if_urtwn.c Wed Aug 20 01:26:27 2014 (r270191) @@ -152,6 +152,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 owner-svn-src-all@FreeBSD.ORG Wed Aug 20 01:32:04 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B6BF9AED; Wed, 20 Aug 2014 01:32:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 882183745; Wed, 20 Aug 2014 01:32:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7K1W4YN083665; Wed, 20 Aug 2014 01:32:04 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7K1W4QR083664; Wed, 20 Aug 2014 01:32:04 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201408200132.s7K1W4QR083664@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Wed, 20 Aug 2014 01:32:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270192 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 01:32:04 -0000 Author: kevlo Date: Wed Aug 20 01:32:04 2014 New Revision: 270192 URL: http://svnweb.freebsd.org/changeset/base/270192 Log: If eapol packets are sent at the lowest rate, key negotiation will become more reliable. Submitted by: Akinori Furukoshi Modified: head/sys/dev/usb/wlan/if_run.c Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Wed Aug 20 01:26:27 2014 (r270191) +++ head/sys/dev/usb/wlan/if_run.c Wed Aug 20 01:32:04 2014 (r270192) @@ -3255,13 +3255,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) && @@ -3338,7 +3338,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; @@ -4998,7 +4998,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 owner-svn-src-all@FreeBSD.ORG Wed Aug 20 06:15:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20DDF44D; Wed, 20 Aug 2014 06:15:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 006903F7D; Wed, 20 Aug 2014 06:15:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7K6Fsf0008506; Wed, 20 Aug 2014 06:15:54 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7K6Fr6w008501; Wed, 20 Aug 2014 06:15:53 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201408200615.s7K6Fr6w008501@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 20 Aug 2014 06:15:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r270193 - in vendor-sys/illumos/dist/uts/common: dtrace fs os sys X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 06:15:55 -0000 Author: delphij Date: Wed Aug 20 06:15:53 2014 New Revision: 270193 URL: http://svnweb.freebsd.org/changeset/base/270193 Log: 5042 stop using deprecated atomic functions Reviewed by: Dan McDonald Approved by: Robert Mustacchi Author: Josef 'Jeff' Sipek illumos/illumos-gate@75d94465dbafa487b716482dc36d5150a4ec9853 Modified: vendor-sys/illumos/dist/uts/common/dtrace/systrace.c vendor-sys/illumos/dist/uts/common/fs/vnode.c vendor-sys/illumos/dist/uts/common/os/fm.c vendor-sys/illumos/dist/uts/common/sys/bitmap.h vendor-sys/illumos/dist/uts/common/sys/cpuvar.h Modified: vendor-sys/illumos/dist/uts/common/dtrace/systrace.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/dtrace/systrace.c Wed Aug 20 01:32:04 2014 (r270192) +++ vendor-sys/illumos/dist/uts/common/dtrace/systrace.c Wed Aug 20 06:15:53 2014 (r270193) @@ -164,11 +164,11 @@ systrace_enable(void *arg, dtrace_id_t i return (0); } - (void) casptr(&sysent[sysnum].sy_callc, + (void) atomic_cas_ptr(&sysent[sysnum].sy_callc, (void *)systrace_sysent[sysnum].stsy_underlying, (void *)dtrace_systrace_syscall); #ifdef _SYSCALL32_IMPL - (void) casptr(&sysent32[sysnum].sy_callc, + (void) atomic_cas_ptr(&sysent32[sysnum].sy_callc, (void *)systrace_sysent32[sysnum].stsy_underlying, (void *)dtrace_systrace_syscall32); #endif @@ -184,12 +184,12 @@ systrace_disable(void *arg, dtrace_id_t systrace_sysent[sysnum].stsy_return == DTRACE_IDNONE); if (disable) { - (void) casptr(&sysent[sysnum].sy_callc, + (void) atomic_cas_ptr(&sysent[sysnum].sy_callc, (void *)dtrace_systrace_syscall, (void *)systrace_sysent[sysnum].stsy_underlying); #ifdef _SYSCALL32_IMPL - (void) casptr(&sysent32[sysnum].sy_callc, + (void) atomic_cas_ptr(&sysent32[sysnum].sy_callc, (void *)dtrace_systrace_syscall32, (void *)systrace_sysent32[sysnum].stsy_underlying); #endif Modified: vendor-sys/illumos/dist/uts/common/fs/vnode.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/vnode.c Wed Aug 20 01:32:04 2014 (r270192) +++ vendor-sys/illumos/dist/uts/common/fs/vnode.c Wed Aug 20 06:15:53 2014 (r270193) @@ -2837,11 +2837,12 @@ vn_setops(vnode_t *vp, vnodeops_t *vnode op = vp->v_op; membar_consumer(); /* - * If vp->v_femhead == NULL, then we'll call casptr() to do the - * compare-and-swap on vp->v_op. If either fails, then FEM is + * If vp->v_femhead == NULL, then we'll call atomic_cas_ptr() to do + * the compare-and-swap on vp->v_op. If either fails, then FEM is * in effect on the vnode and we need to have FEM deal with it. */ - if (vp->v_femhead != NULL || casptr(&vp->v_op, op, vnodeops) != op) { + if (vp->v_femhead != NULL || atomic_cas_ptr(&vp->v_op, op, vnodeops) != + op) { fem_setvnops(vp, vnodeops); } } Modified: vendor-sys/illumos/dist/uts/common/os/fm.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/os/fm.c Wed Aug 20 01:32:04 2014 (r270192) +++ vendor-sys/illumos/dist/uts/common/os/fm.c Wed Aug 20 06:15:53 2014 (r270193) @@ -374,7 +374,7 @@ fm_panic(const char *format, ...) { va_list ap; - (void) casptr((void *)&fm_panicstr, NULL, (void *)format); + (void) atomic_cas_ptr((void *)&fm_panicstr, NULL, (void *)format); #if defined(__i386) || defined(__amd64) fastreboot_disable_highpil(); #endif /* __i386 || __amd64 */ Modified: vendor-sys/illumos/dist/uts/common/sys/bitmap.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/sys/bitmap.h Wed Aug 20 01:32:04 2014 (r270192) +++ vendor-sys/illumos/dist/uts/common/sys/bitmap.h Wed Aug 20 06:15:53 2014 (r270193) @@ -171,9 +171,9 @@ extern int odd_parity(ulong_t); * to 0 otherwise. */ #define BT_ATOMIC_SET(bitmap, bitindex) \ - { atomic_or_long(&(BT_WIM(bitmap, bitindex)), BT_BIW(bitindex)); } + { atomic_or_ulong(&(BT_WIM(bitmap, bitindex)), BT_BIW(bitindex)); } #define BT_ATOMIC_CLEAR(bitmap, bitindex) \ - { atomic_and_long(&(BT_WIM(bitmap, bitindex)), ~BT_BIW(bitindex)); } + { atomic_and_ulong(&(BT_WIM(bitmap, bitindex)), ~BT_BIW(bitindex)); } #define BT_ATOMIC_SET_EXCL(bitmap, bitindex, result) \ { result = atomic_set_long_excl(&(BT_WIM(bitmap, bitindex)), \ Modified: vendor-sys/illumos/dist/uts/common/sys/cpuvar.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/sys/cpuvar.h Wed Aug 20 01:32:04 2014 (r270192) +++ vendor-sys/illumos/dist/uts/common/sys/cpuvar.h Wed Aug 20 06:15:53 2014 (r270193) @@ -528,8 +528,8 @@ typedef ulong_t cpuset_t; /* a set of CP largest = (uint_t)(highbit(set) - 1); \ } -#define CPUSET_ATOMIC_DEL(set, cpu) atomic_and_long(&(set), ~CPUSET(cpu)) -#define CPUSET_ATOMIC_ADD(set, cpu) atomic_or_long(&(set), CPUSET(cpu)) +#define CPUSET_ATOMIC_DEL(set, cpu) atomic_and_ulong(&(set), ~CPUSET(cpu)) +#define CPUSET_ATOMIC_ADD(set, cpu) atomic_or_ulong(&(set), CPUSET(cpu)) #define CPUSET_ATOMIC_XADD(set, cpu, result) \ { result = atomic_set_long_excl(&(set), (cpu)); } From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 06:20:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74F1F630; Wed, 20 Aug 2014 06:20:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 45FE53FC9; Wed, 20 Aug 2014 06:20:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7K6K7Kb009112; Wed, 20 Aug 2014 06:20:07 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7K6K69H009109; Wed, 20 Aug 2014 06:20:06 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201408200620.s7K6K69H009109@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 20 Aug 2014 06:20:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r270194 - in vendor-sys/illumos/dist/common/atomic: amd64 i386 sparc X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 06:20:07 -0000 Author: delphij Date: Wed Aug 20 06:20:06 2014 New Revision: 270194 URL: http://svnweb.freebsd.org/changeset/base/270194 Log: 5043 remove deprecated atomic functions' prototypes Reviewed by: Garrett D'Amore Approved by: Robert Mustacchi Author: Josef 'Jeff' Sipek illumos/illumos-gate@6ed9368a130d7c9a82e574da808d34034da33748 Modified: vendor-sys/illumos/dist/common/atomic/amd64/atomic.s vendor-sys/illumos/dist/common/atomic/i386/atomic.s vendor-sys/illumos/dist/common/atomic/sparc/atomic.s Modified: vendor-sys/illumos/dist/common/atomic/amd64/atomic.s ============================================================================== --- vendor-sys/illumos/dist/common/atomic/amd64/atomic.s Wed Aug 20 06:15:53 2014 (r270193) +++ vendor-sys/illumos/dist/common/atomic/amd64/atomic.s Wed Aug 20 06:20:06 2014 (r270194) @@ -29,7 +29,8 @@ #if defined(_KERNEL) /* - * Legacy kernel interfaces; they will go away (eventually). + * Legacy kernel interfaces; they will go away the moment our closed + * bins no longer require them. */ ANSI_PRAGMA_WEAK2(cas8,atomic_cas_8,function) ANSI_PRAGMA_WEAK2(cas32,atomic_cas_32,function) Modified: vendor-sys/illumos/dist/common/atomic/i386/atomic.s ============================================================================== --- vendor-sys/illumos/dist/common/atomic/i386/atomic.s Wed Aug 20 06:15:53 2014 (r270193) +++ vendor-sys/illumos/dist/common/atomic/i386/atomic.s Wed Aug 20 06:20:06 2014 (r270194) @@ -30,7 +30,8 @@ #if defined(_KERNEL) /* - * Legacy kernel interfaces; they will go away (eventually). + * Legacy kernel interfaces; they will go away the moment our closed + * bins no longer require them. */ ANSI_PRAGMA_WEAK2(cas8,atomic_cas_8,function) ANSI_PRAGMA_WEAK2(cas32,atomic_cas_32,function) Modified: vendor-sys/illumos/dist/common/atomic/sparc/atomic.s ============================================================================== --- vendor-sys/illumos/dist/common/atomic/sparc/atomic.s Wed Aug 20 06:15:53 2014 (r270193) +++ vendor-sys/illumos/dist/common/atomic/sparc/atomic.s Wed Aug 20 06:20:06 2014 (r270194) @@ -30,7 +30,8 @@ #if defined(_KERNEL) /* - * Legacy kernel interfaces; they will go away (eventually). + * Legacy kernel interfaces; they will go away the moment our closed + * bins no longer require them. */ ANSI_PRAGMA_WEAK2(cas8,atomic_cas_8,function) ANSI_PRAGMA_WEAK2(cas32,atomic_cas_32,function) From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 06:23:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E110A791; Wed, 20 Aug 2014 06:23:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CAB08305E; Wed, 20 Aug 2014 06:23:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7K6N1fg012687; Wed, 20 Aug 2014 06:23:01 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7K6Mxwk012645; Wed, 20 Aug 2014 06:22:59 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201408200622.s7K6Mxwk012645@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 20 Aug 2014 06:22:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r270195 - in vendor-sys/illumos/dist/uts: common/dtrace common/fs common/fs/zfs common/fs/zfs/sys common/os sparc/dtrace X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 06:23:02 -0000 Author: delphij Date: Wed Aug 20 06:22:59 2014 New Revision: 270195 URL: http://svnweb.freebsd.org/changeset/base/270195 Log: 5045 use atomic_{inc,dec}_* instead of atomic_add_* Reviewed by: Matthew Ahrens Reviewed by: Garrett D'Amore Approved by: Robert Mustacchi Author: Josef 'Jeff' Sipek illumos/illumos-gate@1a5e258f5471356ca102c7176637cdce45bac147 Modified: vendor-sys/illumos/dist/uts/common/dtrace/fasttrap.c vendor-sys/illumos/dist/uts/common/dtrace/profile.c vendor-sys/illumos/dist/uts/common/fs/vnode.c vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/refcount.h vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_cache.c vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_label.c vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vfsops.c vendor-sys/illumos/dist/uts/common/fs/zfs/zio_inject.c vendor-sys/illumos/dist/uts/common/os/fm.c vendor-sys/illumos/dist/uts/sparc/dtrace/fasttrap_isa.c Modified: vendor-sys/illumos/dist/uts/common/dtrace/fasttrap.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/dtrace/fasttrap.c Wed Aug 20 06:20:06 2014 (r270194) +++ vendor-sys/illumos/dist/uts/common/dtrace/fasttrap.c Wed Aug 20 06:22:59 2014 (r270195) @@ -1182,7 +1182,7 @@ fasttrap_proc_lookup(pid_t pid) mutex_enter(&fprc->ftpc_mtx); mutex_exit(&bucket->ftb_mtx); fprc->ftpc_rcount++; - atomic_add_64(&fprc->ftpc_acount, 1); + atomic_inc_64(&fprc->ftpc_acount); ASSERT(fprc->ftpc_acount <= fprc->ftpc_rcount); mutex_exit(&fprc->ftpc_mtx); @@ -1212,7 +1212,7 @@ fasttrap_proc_lookup(pid_t pid) mutex_enter(&fprc->ftpc_mtx); mutex_exit(&bucket->ftb_mtx); fprc->ftpc_rcount++; - atomic_add_64(&fprc->ftpc_acount, 1); + atomic_inc_64(&fprc->ftpc_acount); ASSERT(fprc->ftpc_acount <= fprc->ftpc_rcount); mutex_exit(&fprc->ftpc_mtx); @@ -1424,7 +1424,7 @@ fasttrap_provider_free(fasttrap_provider * count of active providers on the associated process structure. */ if (!provider->ftp_retired) { - atomic_add_64(&provider->ftp_proc->ftpc_acount, -1); + atomic_dec_64(&provider->ftp_proc->ftpc_acount); ASSERT(provider->ftp_proc->ftpc_acount < provider->ftp_proc->ftpc_rcount); } @@ -1499,7 +1499,7 @@ fasttrap_provider_retire(pid_t pid, cons * bucket lock therefore protects the integrity of the provider hash * table. */ - atomic_add_64(&fp->ftp_proc->ftpc_acount, -1); + atomic_dec_64(&fp->ftp_proc->ftpc_acount); ASSERT(fp->ftp_proc->ftpc_acount < fp->ftp_proc->ftpc_rcount); fp->ftp_retired = 1; @@ -1595,10 +1595,10 @@ fasttrap_add_probe(fasttrap_probe_spec_t pdata->ftps_mod, pdata->ftps_func, name_str) != 0) continue; - atomic_add_32(&fasttrap_total, 1); + atomic_inc_32(&fasttrap_total); if (fasttrap_total > fasttrap_max) { - atomic_add_32(&fasttrap_total, -1); + atomic_dec_32(&fasttrap_total); goto no_mem; } Modified: vendor-sys/illumos/dist/uts/common/dtrace/profile.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/dtrace/profile.c Wed Aug 20 06:20:06 2014 (r270194) +++ vendor-sys/illumos/dist/uts/common/dtrace/profile.c Wed Aug 20 06:22:59 2014 (r270195) @@ -171,9 +171,9 @@ profile_create(hrtime_t interval, const if (dtrace_probe_lookup(profile_id, NULL, NULL, name) != 0) return; - atomic_add_32(&profile_total, 1); + atomic_inc_32(&profile_total); if (profile_total > profile_max) { - atomic_add_32(&profile_total, -1); + atomic_dec_32(&profile_total); return; } @@ -328,7 +328,7 @@ profile_destroy(void *arg, dtrace_id_t i kmem_free(prof, sizeof (profile_probe_t)); ASSERT(profile_total >= 1); - atomic_add_32(&profile_total, -1); + atomic_dec_32(&profile_total); } /*ARGSUSED*/ Modified: vendor-sys/illumos/dist/uts/common/fs/vnode.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/vnode.c Wed Aug 20 06:20:06 2014 (r270194) +++ vendor-sys/illumos/dist/uts/common/fs/vnode.c Wed Aug 20 06:22:59 2014 (r270195) @@ -1244,9 +1244,9 @@ vn_open_upgrade( ASSERT(vp->v_type == VREG); if (filemode & FREAD) - atomic_add_32(&(vp->v_rdcnt), 1); + atomic_inc_32(&vp->v_rdcnt); if (filemode & FWRITE) - atomic_add_32(&(vp->v_wrcnt), 1); + atomic_inc_32(&vp->v_wrcnt); } @@ -1259,11 +1259,11 @@ vn_open_downgrade( if (filemode & FREAD) { ASSERT(vp->v_rdcnt > 0); - atomic_add_32(&(vp->v_rdcnt), -1); + atomic_dec_32(&vp->v_rdcnt); } if (filemode & FWRITE) { ASSERT(vp->v_wrcnt > 0); - atomic_add_32(&(vp->v_wrcnt), -1); + atomic_dec_32(&vp->v_wrcnt); } } @@ -2918,7 +2918,7 @@ fs_new_caller_id() { static uint64_t next_caller_id = 0LL; /* First call returns 1 */ - return ((u_longlong_t)atomic_add_64_nv(&next_caller_id, 1)); + return ((u_longlong_t)atomic_inc_64_nv(&next_caller_id)); } /* @@ -3146,9 +3146,9 @@ fop_open( */ if ((*vpp)->v_type == VREG) { if (mode & FREAD) - atomic_add_32(&((*vpp)->v_rdcnt), 1); + atomic_inc_32(&(*vpp)->v_rdcnt); if (mode & FWRITE) - atomic_add_32(&((*vpp)->v_wrcnt), 1); + atomic_inc_32(&(*vpp)->v_wrcnt); } VOPXID_MAP_CR(vp, cr); @@ -3162,9 +3162,9 @@ fop_open( */ VOPSTATS_UPDATE(vp, open); if ((vp->v_type == VREG) && (mode & FREAD)) - atomic_add_32(&(vp->v_rdcnt), -1); + atomic_dec_32(&vp->v_rdcnt); if ((vp->v_type == VREG) && (mode & FWRITE)) - atomic_add_32(&(vp->v_wrcnt), -1); + atomic_dec_32(&vp->v_wrcnt); } else { /* * Some filesystems will return a different vnode, @@ -3178,13 +3178,13 @@ fop_open( if (*vpp != vp && *vpp != NULL) { vn_copypath(vp, *vpp); if (((*vpp)->v_type == VREG) && (mode & FREAD)) - atomic_add_32(&((*vpp)->v_rdcnt), 1); + atomic_inc_32(&(*vpp)->v_rdcnt); if ((vp->v_type == VREG) && (mode & FREAD)) - atomic_add_32(&(vp->v_rdcnt), -1); + atomic_dec_32(&vp->v_rdcnt); if (((*vpp)->v_type == VREG) && (mode & FWRITE)) - atomic_add_32(&((*vpp)->v_wrcnt), 1); + atomic_inc_32(&(*vpp)->v_wrcnt); if ((vp->v_type == VREG) && (mode & FWRITE)) - atomic_add_32(&(vp->v_wrcnt), -1); + atomic_dec_32(&vp->v_wrcnt); } } VN_RELE(vp); @@ -3213,11 +3213,11 @@ fop_close( if ((vp->v_type == VREG) && (count == 1)) { if (flag & FREAD) { ASSERT(vp->v_rdcnt > 0); - atomic_add_32(&(vp->v_rdcnt), -1); + atomic_dec_32(&vp->v_rdcnt); } if (flag & FWRITE) { ASSERT(vp->v_wrcnt > 0); - atomic_add_32(&(vp->v_wrcnt), -1); + atomic_dec_32(&vp->v_wrcnt); } } return (err); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Wed Aug 20 06:20:06 2014 (r270194) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Wed Aug 20 06:22:59 2014 (r270195) @@ -178,7 +178,7 @@ dbuf_hash_insert(dmu_buf_impl_t *db) db->db_hash_next = h->hash_table[idx]; h->hash_table[idx] = db; mutex_exit(DBUF_HASH_MUTEX(h, idx)); - atomic_add_64(&dbuf_hash_count, 1); + atomic_inc_64(&dbuf_hash_count); return (NULL); } @@ -212,7 +212,7 @@ dbuf_hash_remove(dmu_buf_impl_t *db) *dbp = db->db_hash_next; db->db_hash_next = NULL; mutex_exit(DBUF_HASH_MUTEX(h, idx)); - atomic_add_64(&dbuf_hash_count, -1); + atomic_dec_64(&dbuf_hash_count); } static arc_evict_func_t dbuf_do_evict; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c Wed Aug 20 06:20:06 2014 (r270194) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c Wed Aug 20 06:22:59 2014 (r270195) @@ -1817,9 +1817,9 @@ spa_load_verify_done(zio_t *zio) if (error) { if ((BP_GET_LEVEL(bp) != 0 || DMU_OT_IS_METADATA(type)) && type != DMU_OT_INTENT_LOG) - atomic_add_64(&sle->sle_meta_count, 1); + atomic_inc_64(&sle->sle_meta_count); else - atomic_add_64(&sle->sle_data_count, 1); + atomic_inc_64(&sle->sle_data_count); } zio_data_buf_free(zio->io_data, zio->io_size); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/refcount.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/refcount.h Wed Aug 20 06:20:06 2014 (r270194) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/refcount.h Wed Aug 20 06:22:59 2014 (r270195) @@ -87,8 +87,8 @@ typedef struct refcount { #define refcount_destroy_many(rc, number) ((rc)->rc_count = 0) #define refcount_is_zero(rc) ((rc)->rc_count == 0) #define refcount_count(rc) ((rc)->rc_count) -#define refcount_add(rc, holder) atomic_add_64_nv(&(rc)->rc_count, 1) -#define refcount_remove(rc, holder) atomic_add_64_nv(&(rc)->rc_count, -1) +#define refcount_add(rc, holder) atomic_inc_64_nv(&(rc)->rc_count) +#define refcount_remove(rc, holder) atomic_dec_64_nv(&(rc)->rc_count) #define refcount_add_many(rc, number, holder) \ atomic_add_64_nv(&(rc)->rc_count, number) #define refcount_remove_many(rc, number, holder) \ Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_cache.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_cache.c Wed Aug 20 06:20:06 2014 (r270194) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_cache.c Wed Aug 20 06:22:59 2014 (r270195) @@ -102,7 +102,7 @@ static vdc_stats_t vdc_stats = { { "misses", KSTAT_DATA_UINT64 } }; -#define VDCSTAT_BUMP(stat) atomic_add_64(&vdc_stats.stat.value.ui64, 1); +#define VDCSTAT_BUMP(stat) atomic_inc_64(&vdc_stats.stat.value.ui64); static int vdev_cache_offset_compare(const void *a1, const void *a2) Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_label.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_label.c Wed Aug 20 06:20:06 2014 (r270194) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_label.c Wed Aug 20 06:22:59 2014 (r270195) @@ -976,7 +976,7 @@ vdev_uberblock_sync_done(zio_t *zio) uint64_t *good_writes = zio->io_private; if (zio->io_error == 0 && zio->io_vd->vdev_top->vdev_ms_array != 0) - atomic_add_64(good_writes, 1); + atomic_inc_64(good_writes); } /* @@ -1051,7 +1051,7 @@ vdev_label_sync_done(zio_t *zio) uint64_t *good_writes = zio->io_private; if (zio->io_error == 0) - atomic_add_64(good_writes, 1); + atomic_inc_64(good_writes); } /* Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vfsops.c Wed Aug 20 06:20:06 2014 (r270194) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vfsops.c Wed Aug 20 06:22:59 2014 (r270195) @@ -1240,7 +1240,7 @@ out: dmu_objset_disown(zfsvfs->z_os, zfsvfs); zfsvfs_free(zfsvfs); } else { - atomic_add_32(&zfs_active_fs_count, 1); + atomic_inc_32(&zfs_active_fs_count); } return (error); @@ -2158,7 +2158,7 @@ zfs_freevfs(vfs_t *vfsp) zfsvfs_free(zfsvfs); - atomic_add_32(&zfs_active_fs_count, -1); + atomic_dec_32(&zfs_active_fs_count); } /* Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zio_inject.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zio_inject.c Wed Aug 20 06:20:06 2014 (r270194) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zio_inject.c Wed Aug 20 06:22:59 2014 (r270195) @@ -426,7 +426,7 @@ zio_inject_fault(char *name, int flags, handler->zi_spa = spa; handler->zi_record = *record; list_insert_tail(&inject_handlers, handler); - atomic_add_32(&zio_injection_enabled, 1); + atomic_inc_32(&zio_injection_enabled); rw_exit(&inject_lock); } @@ -503,7 +503,7 @@ zio_clear_fault(int id) spa_inject_delref(handler->zi_spa); kmem_free(handler, sizeof (inject_handler_t)); - atomic_add_32(&zio_injection_enabled, -1); + atomic_dec_32(&zio_injection_enabled); return (0); } Modified: vendor-sys/illumos/dist/uts/common/os/fm.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/os/fm.c Wed Aug 20 06:20:06 2014 (r270194) +++ vendor-sys/illumos/dist/uts/common/os/fm.c Wed Aug 20 06:22:59 2014 (r270195) @@ -517,19 +517,19 @@ fm_ereport_post(nvlist_t *ereport, int e (void) nvlist_size(ereport, &nvl_size, NV_ENCODE_NATIVE); if (nvl_size > ERPT_DATA_SZ || nvl_size == 0) { - atomic_add_64(&erpt_kstat_data.erpt_dropped.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.erpt_dropped.value.ui64); return; } if (sysevent_evc_bind(FM_ERROR_CHAN, &error_chan, EVCH_CREAT|EVCH_HOLD_PEND) != 0) { - atomic_add_64(&erpt_kstat_data.erpt_dropped.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.erpt_dropped.value.ui64); return; } if (sysevent_evc_publish(error_chan, EC_FM, ESC_FM_ERROR, SUNW_VENDOR, FM_PUB, ereport, evc_flag) != 0) { - atomic_add_64(&erpt_kstat_data.erpt_dropped.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.erpt_dropped.value.ui64); (void) sysevent_evc_unbind(error_chan); return; } @@ -791,8 +791,7 @@ fm_payload_set(nvlist_t *payload, ...) va_end(ap); if (ret) - atomic_add_64( - &erpt_kstat_data.payload_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.payload_set_failed.value.ui64); } /* @@ -825,24 +824,24 @@ fm_ereport_set(nvlist_t *ereport, int ve int ret; if (version != FM_EREPORT_VERS0) { - atomic_add_64(&erpt_kstat_data.erpt_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.erpt_set_failed.value.ui64); return; } (void) snprintf(ereport_class, FM_MAX_CLASS, "%s.%s", FM_EREPORT_CLASS, erpt_class); if (nvlist_add_string(ereport, FM_CLASS, ereport_class) != 0) { - atomic_add_64(&erpt_kstat_data.erpt_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.erpt_set_failed.value.ui64); return; } if (nvlist_add_uint64(ereport, FM_EREPORT_ENA, ena)) { - atomic_add_64(&erpt_kstat_data.erpt_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.erpt_set_failed.value.ui64); } if (nvlist_add_nvlist(ereport, FM_EREPORT_DETECTOR, (nvlist_t *)detector) != 0) { - atomic_add_64(&erpt_kstat_data.erpt_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.erpt_set_failed.value.ui64); } va_start(ap, detector); @@ -851,7 +850,7 @@ fm_ereport_set(nvlist_t *ereport, int ve va_end(ap); if (ret) - atomic_add_64(&erpt_kstat_data.erpt_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.erpt_set_failed.value.ui64); } /* @@ -874,19 +873,19 @@ static int fm_fmri_hc_set_common(nvlist_t *fmri, int version, const nvlist_t *auth) { if (version != FM_HC_SCHEME_VERSION) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return (0); } if (nvlist_add_uint8(fmri, FM_VERSION, version) != 0 || nvlist_add_string(fmri, FM_FMRI_SCHEME, FM_FMRI_SCHEME_HC) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return (0); } if (auth != NULL && nvlist_add_nvlist(fmri, FM_FMRI_AUTHORITY, (nvlist_t *)auth) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return (0); } @@ -918,22 +917,22 @@ fm_fmri_hc_set(nvlist_t *fmri, int versi pairs[i] = fm_nvlist_create(nva); if (nvlist_add_string(pairs[i], FM_FMRI_HC_NAME, name) != 0 || nvlist_add_string(pairs[i], FM_FMRI_HC_ID, idstr) != 0) { - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); } } va_end(ap); if (nvlist_add_nvlist_array(fmri, FM_FMRI_HC_LIST, pairs, npairs) != 0) - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); for (i = 0; i < npairs; i++) fm_nvlist_destroy(pairs[i], FM_NVA_RETAIN); if (snvl != NULL) { if (nvlist_add_nvlist(fmri, FM_FMRI_HC_SPECIFIC, snvl) != 0) { - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); } } } @@ -958,7 +957,7 @@ fm_fmri_dev_set(nvlist_t *fmri_dev, int int err = 0; if (version != DEV_SCHEME_VERSION0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } @@ -979,7 +978,7 @@ fm_fmri_dev_set(nvlist_t *fmri_dev, int err |= nvlist_add_string(fmri_dev, FM_FMRI_DEV_TGTPTLUN0, tpl0); if (err) - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); } @@ -1004,35 +1003,35 @@ fm_fmri_cpu_set(nvlist_t *fmri_cpu, int uint64_t *failedp = &erpt_kstat_data.fmri_set_failed.value.ui64; if (version < CPU_SCHEME_VERSION1) { - atomic_add_64(failedp, 1); + atomic_inc_64(failedp); return; } if (nvlist_add_uint8(fmri_cpu, FM_VERSION, version) != 0) { - atomic_add_64(failedp, 1); + atomic_inc_64(failedp); return; } if (nvlist_add_string(fmri_cpu, FM_FMRI_SCHEME, FM_FMRI_SCHEME_CPU) != 0) { - atomic_add_64(failedp, 1); + atomic_inc_64(failedp); return; } if (auth != NULL && nvlist_add_nvlist(fmri_cpu, FM_FMRI_AUTHORITY, (nvlist_t *)auth) != 0) - atomic_add_64(failedp, 1); + atomic_inc_64(failedp); if (nvlist_add_uint32(fmri_cpu, FM_FMRI_CPU_ID, cpu_id) != 0) - atomic_add_64(failedp, 1); + atomic_inc_64(failedp); if (cpu_maskp != NULL && nvlist_add_uint8(fmri_cpu, FM_FMRI_CPU_MASK, *cpu_maskp) != 0) - atomic_add_64(failedp, 1); + atomic_inc_64(failedp); if (serial_idp == NULL || nvlist_add_string(fmri_cpu, FM_FMRI_CPU_SERIAL_ID, (char *)serial_idp) != 0) - atomic_add_64(failedp, 1); + atomic_inc_64(failedp); } /* @@ -1053,49 +1052,47 @@ fm_fmri_mem_set(nvlist_t *fmri, int vers const char *unum, const char *serial, uint64_t offset) { if (version != MEM_SCHEME_VERSION0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } if (!serial && (offset != (uint64_t)-1)) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } if (nvlist_add_uint8(fmri, FM_VERSION, version) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } if (nvlist_add_string(fmri, FM_FMRI_SCHEME, FM_FMRI_SCHEME_MEM) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } if (auth != NULL) { if (nvlist_add_nvlist(fmri, FM_FMRI_AUTHORITY, (nvlist_t *)auth) != 0) { - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); } } if (nvlist_add_string(fmri, FM_FMRI_MEM_UNUM, unum) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); } if (serial != NULL) { if (nvlist_add_string_array(fmri, FM_FMRI_MEM_SERIAL_ID, (char **)&serial, 1) != 0) { - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); } - if (offset != (uint64_t)-1) { - if (nvlist_add_uint64(fmri, FM_FMRI_MEM_OFFSET, - offset) != 0) { - atomic_add_64(&erpt_kstat_data. - fmri_set_failed.value.ui64, 1); - } + if (offset != (uint64_t)-1 && nvlist_add_uint64(fmri, + FM_FMRI_MEM_OFFSET, offset) != 0) { + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); } } } @@ -1105,28 +1102,28 @@ fm_fmri_zfs_set(nvlist_t *fmri, int vers uint64_t vdev_guid) { if (version != ZFS_SCHEME_VERSION0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } if (nvlist_add_uint8(fmri, FM_VERSION, version) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } if (nvlist_add_string(fmri, FM_FMRI_SCHEME, FM_FMRI_SCHEME_ZFS) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } if (nvlist_add_uint64(fmri, FM_FMRI_ZFS_POOL, pool_guid) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); } if (vdev_guid != 0) { if (nvlist_add_uint64(fmri, FM_FMRI_ZFS_VDEV, vdev_guid) != 0) { - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); } } } @@ -1306,20 +1303,20 @@ fm_fmri_hc_create(nvlist_t *fmri, int ve */ if (nvlist_lookup_nvlist_array(bboard, FM_FMRI_HC_LIST, &hcl, &n) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } for (i = 0; i < n; i++) { if (nvlist_lookup_string(hcl[i], FM_FMRI_HC_NAME, &hcname) != 0) { - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); return; } if (nvlist_lookup_string(hcl[i], FM_FMRI_HC_ID, &hcid) != 0) { - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); return; } @@ -1331,8 +1328,8 @@ fm_fmri_hc_create(nvlist_t *fmri, int ve fm_nvlist_destroy(pairs[j], FM_NVA_RETAIN); } - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); return; } } @@ -1356,8 +1353,8 @@ fm_fmri_hc_create(nvlist_t *fmri, int ve fm_nvlist_destroy(pairs[j], FM_NVA_RETAIN); } - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); return; } } @@ -1368,7 +1365,7 @@ fm_fmri_hc_create(nvlist_t *fmri, int ve */ if (nvlist_add_nvlist_array(fmri, FM_FMRI_HC_LIST, pairs, npairs + n) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } @@ -1378,8 +1375,8 @@ fm_fmri_hc_create(nvlist_t *fmri, int ve if (snvl != NULL) { if (nvlist_add_nvlist(fmri, FM_FMRI_HC_SPECIFIC, snvl) != 0) { - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); return; } } Modified: vendor-sys/illumos/dist/uts/sparc/dtrace/fasttrap_isa.c ============================================================================== --- vendor-sys/illumos/dist/uts/sparc/dtrace/fasttrap_isa.c Wed Aug 20 06:20:06 2014 (r270194) +++ vendor-sys/illumos/dist/uts/sparc/dtrace/fasttrap_isa.c Wed Aug 20 06:22:59 2014 (r270195) @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include @@ -1410,7 +1408,7 @@ fasttrap_getreg(struct regs *rp, uint_t value = dtrace_getreg_win(reg, 1); dtrace_interrupt_enable(cookie); - atomic_add_64(&fasttrap_getreg_fast_cnt, 1); + atomic_inc_64(&fasttrap_getreg_fast_cnt); return (value); } @@ -1435,7 +1433,7 @@ fasttrap_getreg(struct regs *rp, uint_t if ((long)mpcb->mpcb_spbuf[i] != rp->r_sp) continue; - atomic_add_64(&fasttrap_getreg_mpcb_cnt, 1); + atomic_inc_64(&fasttrap_getreg_mpcb_cnt); return (rwin[i].rw_local[reg - 16]); } while (i > 0); } @@ -1455,7 +1453,7 @@ fasttrap_getreg(struct regs *rp, uint_t if ((long)mpcb->mpcb_spbuf[i] != rp->r_sp) continue; - atomic_add_64(&fasttrap_getreg_mpcb_cnt, 1); + atomic_inc_64(&fasttrap_getreg_mpcb_cnt); return (rwin[i].rw_local[reg - 16]); } while (i > 0); } @@ -1466,7 +1464,7 @@ fasttrap_getreg(struct regs *rp, uint_t v32[0] = 0; } - atomic_add_64(&fasttrap_getreg_slow_cnt, 1); + atomic_inc_64(&fasttrap_getreg_slow_cnt); return (value); err: @@ -1505,7 +1503,7 @@ fasttrap_putreg(struct regs *rp, uint_t if (dtrace_getotherwin() > 0) { dtrace_putreg_win(reg, value); dtrace_interrupt_enable(cookie); - atomic_add_64(&fasttrap_putreg_fast_cnt, 1); + atomic_inc_64(&fasttrap_putreg_fast_cnt); return; } dtrace_interrupt_enable(cookie); @@ -1536,7 +1534,7 @@ fasttrap_putreg(struct regs *rp, uint_t continue; rwin[i].rw_local[reg - 16] = value; - atomic_add_64(&fasttrap_putreg_mpcb_cnt, 1); + atomic_inc_64(&fasttrap_putreg_mpcb_cnt); return; } while (i > 0); } @@ -1549,7 +1547,7 @@ fasttrap_putreg(struct regs *rp, uint_t rwin[mpcb->mpcb_wbcnt].rw_local[reg - 16] = value; mpcb->mpcb_spbuf[mpcb->mpcb_wbcnt] = (caddr_t)rp->r_sp; mpcb->mpcb_wbcnt++; - atomic_add_64(&fasttrap_putreg_mpcb_cnt, 1); + atomic_inc_64(&fasttrap_putreg_mpcb_cnt); return; } } else { @@ -1567,7 +1565,7 @@ fasttrap_putreg(struct regs *rp, uint_t continue; rwin[i].rw_local[reg - 16] = v32; - atomic_add_64(&fasttrap_putreg_mpcb_cnt, 1); + atomic_inc_64(&fasttrap_putreg_mpcb_cnt); return; } while (i > 0); } @@ -1580,12 +1578,12 @@ fasttrap_putreg(struct regs *rp, uint_t rwin[mpcb->mpcb_wbcnt].rw_local[reg - 16] = v32; mpcb->mpcb_spbuf[mpcb->mpcb_wbcnt] = (caddr_t)rp->r_sp; mpcb->mpcb_wbcnt++; - atomic_add_64(&fasttrap_putreg_mpcb_cnt, 1); + atomic_inc_64(&fasttrap_putreg_mpcb_cnt); return; } } - atomic_add_64(&fasttrap_putreg_slow_cnt, 1); + atomic_inc_64(&fasttrap_putreg_slow_cnt); return; err: From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 06:25:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5BB10A81; Wed, 20 Aug 2014 06:25:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D5F93092; Wed, 20 Aug 2014 06:25:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7K6Piho013285; Wed, 20 Aug 2014 06:25:44 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7K6PhUS013283; Wed, 20 Aug 2014 06:25:43 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201408200625.s7K6PhUS013283@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 20 Aug 2014 06:25:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r270196 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 06:25:44 -0000 Author: delphij Date: Wed Aug 20 06:25:43 2014 New Revision: 270196 URL: http://svnweb.freebsd.org/changeset/base/270196 Log: 5047 don't use atomic_*_nv if you discard the return value Reviewed by: Garrett D'Amore Reviewed by: Jason King Reviewed by: Matthew Ahrens Approved by: Robert Mustacchi Author: Josef 'Jeff' Sipek illumos/illumos-gate@640c1670a105457bb0040e8e11037b53ab6ebcfa Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Wed Aug 20 06:22:59 2014 (r270195) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Wed Aug 20 06:25:43 2014 (r270196) @@ -1605,7 +1605,7 @@ dbuf_clear(dmu_buf_impl_t *db) dndb = dn->dn_dbuf; if (db->db_blkid != DMU_BONUS_BLKID && MUTEX_HELD(&dn->dn_dbufs_mtx)) { avl_remove(&dn->dn_dbufs, db); - (void) atomic_dec_32_nv(&dn->dn_dbufs_count); + atomic_dec_32(&dn->dn_dbufs_count); membar_producer(); DB_DNODE_EXIT(db); /* @@ -1781,7 +1781,7 @@ dbuf_create(dnode_t *dn, uint8_t level, ASSERT(dn->dn_object == DMU_META_DNODE_OBJECT || refcount_count(&dn->dn_holds) > 0); (void) refcount_add(&dn->dn_holds, db); - (void) atomic_inc_32_nv(&dn->dn_dbufs_count); + atomic_inc_32(&dn->dn_dbufs_count); dprintf_dbuf(db, "db=%p\n", db); @@ -1827,7 +1827,7 @@ dbuf_destroy(dmu_buf_impl_t *db) dn = DB_DNODE(db); mutex_enter(&dn->dn_dbufs_mtx); avl_remove(&dn->dn_dbufs, db); - (void) atomic_dec_32_nv(&dn->dn_dbufs_count); + atomic_dec_32(&dn->dn_dbufs_count); mutex_exit(&dn->dn_dbufs_mtx); DB_DNODE_EXIT(db); /* @@ -2111,7 +2111,7 @@ dbuf_rele_and_unlock(dmu_buf_impl_t *db, * until the move completes. */ DB_DNODE_ENTER(db); - (void) atomic_dec_32_nv(&DB_DNODE(db)->dn_dbufs_count); + atomic_dec_32(&DB_DNODE(db)->dn_dbufs_count); DB_DNODE_EXIT(db); /* * The bonus buffer's dnode hold is no longer discounted Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c Wed Aug 20 06:22:59 2014 (r270195) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c Wed Aug 20 06:25:43 2014 (r270196) @@ -284,7 +284,7 @@ dmu_bonus_hold(objset_t *os, uint64_t ob /* as long as the bonus buf is held, the dnode will be held */ if (refcount_add(&db->db_holds, tag) == 1) { VERIFY(dnode_add_ref(dn, db)); - (void) atomic_inc_32_nv(&dn->dn_dbufs_count); + atomic_inc_32(&dn->dn_dbufs_count); } /* From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 06:29:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D80F4D96; Wed, 20 Aug 2014 06:29:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B823A3109; Wed, 20 Aug 2014 06:29:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7K6Th46013832; Wed, 20 Aug 2014 06:29:43 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7K6TgNs013826; Wed, 20 Aug 2014 06:29:42 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201408200629.s7K6TgNs013826@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 20 Aug 2014 06:29:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r270197 - vendor-sys/illumos/dist/uts/common/sys vendor/illumos/dist/head X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 06:29:44 -0000 Author: delphij Date: Wed Aug 20 06:29:42 2014 New Revision: 270197 URL: http://svnweb.freebsd.org/changeset/base/270197 Log: 5066 remove support for non-ANSI compilation 5068 Remove SCCSID() macro from Reviewed by: Keith Wesolowski Reviewed by: Josef 'Jeff' Sipek Approved by: Robert Mustacchi Author: Garrett D'Amore illumos/illumos-gate@ba3594ba9b5dd4c846c472a8d657edcb7c8109ac Modified: vendor/illumos/dist/head/libintl.h vendor/illumos/dist/head/nlist.h vendor/illumos/dist/head/synch.h vendor/illumos/dist/head/thread.h Changes in other areas also in this revision: Modified: vendor-sys/illumos/dist/uts/common/sys/acl.h vendor-sys/illumos/dist/uts/common/sys/debug.h vendor-sys/illumos/dist/uts/common/sys/feature_tests.h vendor-sys/illumos/dist/uts/common/sys/processor.h Modified: vendor/illumos/dist/head/libintl.h ============================================================================== --- vendor/illumos/dist/head/libintl.h Wed Aug 20 06:25:43 2014 (r270196) +++ vendor/illumos/dist/head/libintl.h Wed Aug 20 06:29:42 2014 (r270197) @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore + * * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -27,8 +29,6 @@ #ifndef _LIBINTL_H #define _LIBINTL_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include #ifdef __cplusplus @@ -64,7 +64,6 @@ typedef long wchar_t; #define __GNU_GETTEXT_SUPPORTED_REVISION(m) \ ((((m) == 0) || ((m) == 1)) ? 1 : -1) -#ifdef __STDC__ extern char *dcgettext(const char *, const char *, const int); extern char *dgettext(const char *, const char *); extern char *gettext(const char *); @@ -91,33 +90,6 @@ extern wchar_t *wddelim(wchar_t, wchar_t extern wchar_t mcfiller(void); extern int mcwrap(void); -#else -extern char *dcgettext(); -extern char *dgettext(); -extern char *gettext(); -extern char *textdomain(); -extern char *bindtextdomain(); - -/* - * LI18NUX 2000 Globalization Specification Version 1.0 - * with Amendment 2 - */ -extern char *dcngettext(); -extern char *dngettext(); -extern char *ngettext(); -extern char *bind_textdomain_codeset(); - -/* Word handling functions --- requires dynamic linking */ -/* Warning: these are experimental and subject to change. */ -extern int wdinit(); -extern int wdchkind(); -extern int wdbindf(); -extern wchar_t *wddelim(); -extern wchar_t mcfiller(); -extern int mcwrap(); - -#endif - #ifdef __cplusplus } #endif Modified: vendor/illumos/dist/head/nlist.h ============================================================================== --- vendor/illumos/dist/head/nlist.h Wed Aug 20 06:25:43 2014 (r270196) +++ vendor/illumos/dist/head/nlist.h Wed Aug 20 06:29:42 2014 (r270197) @@ -19,6 +19,9 @@ * * CDDL HEADER END */ +/* + * Copyright 2014 Garrett D'Amore + */ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ @@ -26,8 +29,6 @@ #ifndef _NLIST_H #define _NLIST_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.8.2.4 */ - #ifdef __cplusplus extern "C" { #endif @@ -41,11 +42,7 @@ struct nlist { char n_numaux; /* number of aux. entries */ }; -#if defined(__STDC__) extern int nlist(const char *, struct nlist *); -#else /* __STDC__ */ -extern int nlist(); -#endif /* __STDC__ */ #ifdef __cplusplus } Modified: vendor/illumos/dist/head/synch.h ============================================================================== --- vendor/illumos/dist/head/synch.h Wed Aug 20 06:25:43 2014 (r270196) +++ vendor/illumos/dist/head/synch.h Wed Aug 20 06:29:42 2014 (r270197) @@ -20,6 +20,7 @@ */ /* + * Copyright 2014 Garrett D'Amore * Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved. */ @@ -86,7 +87,6 @@ typedef struct _rwlock { cond_t writercv; /* used only to indicate ownership */ } rwlock_t; -#ifdef __STDC__ int _lwp_mutex_lock(lwp_mutex_t *); int _lwp_mutex_unlock(lwp_mutex_t *); int _lwp_mutex_trylock(lwp_mutex_t *); @@ -127,50 +127,6 @@ int sema_reltimedwait(sema_t *, const ti int sema_post(sema_t *); int sema_trywait(sema_t *); -#else /* __STDC__ */ - -int _lwp_mutex_lock(); -int _lwp_mutex_unlock(); -int _lwp_mutex_trylock(); -int _lwp_cond_wait(); -int _lwp_cond_timedwait(); -int _lwp_cond_reltimedwait(); -int _lwp_cond_signal(); -int _lwp_cond_broadcast(); -int _lwp_sema_init(); -int _lwp_sema_wait(); -int _lwp_sema_trywait(); -int _lwp_sema_post(); -int cond_init(); -int cond_destroy(); -int cond_wait(); -int cond_timedwait(); -int cond_reltimedwait(); -int cond_signal(); -int cond_broadcast(); -int mutex_init(); -int mutex_destroy(); -int mutex_consistent(); -int mutex_lock(); -int mutex_trylock(); -int mutex_unlock(); -int rwlock_init(); -int rwlock_destroy(); -int rw_rdlock(); -int rw_wrlock(); -int rw_unlock(); -int rw_tryrdlock(); -int rw_trywrlock(); -int sema_init(); -int sema_destroy(); -int sema_wait(); -int sema_timedwait(); -int sema_reltimedwait(); -int sema_post(); -int sema_trywait(); - -#endif /* __STDC__ */ - #endif /* _ASM */ /* "Magic numbers" tagging synchronization object types */ @@ -238,8 +194,6 @@ int sema_trywait(); #ifndef _ASM -#ifdef __STDC__ - /* * The *_held() functions apply equally well to Solaris threads * and to Posix threads synchronization objects, but the formal @@ -252,21 +206,8 @@ int _rw_read_held(void *); /* rwlock_t int _rw_write_held(void *); /* rwlock_t or pthread_rwlock_t */ int _mutex_held(void *); /* mutex_t or pthread_mutex_t */ -#else /* __STDC__ */ - -int _sema_held(); -int _rw_read_held(); -int _rw_write_held(); -int _mutex_held(); - -#endif /* __STDC__ */ - /* Pause API */ -#ifdef __STDC__ void smt_pause(void); -#else /* __STDC__ */ -void smt_pause(); -#endif /* __STDC__ */ #endif /* _ASM */ Modified: vendor/illumos/dist/head/thread.h ============================================================================== --- vendor/illumos/dist/head/thread.h Wed Aug 20 06:25:43 2014 (r270196) +++ vendor/illumos/dist/head/thread.h Wed Aug 20 06:29:42 2014 (r270197) @@ -20,6 +20,8 @@ */ /* + * Copyright 2014 Garrett D'Amore + * * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -27,8 +29,6 @@ #ifndef _THREAD_H #define _THREAD_H -#pragma ident "%Z%%M% %I% %E% SMI" - /* * thread.h: * definitions needed to use the thread interface except synchronization. @@ -48,10 +48,6 @@ extern "C" { #ifndef _ASM typedef unsigned int thread_t; typedef unsigned int thread_key_t; -#endif /* _ASM */ - -#ifndef _ASM -#ifdef __STDC__ extern int thr_create(void *, size_t, void *(*)(void *), void *, long, thread_t *); @@ -92,30 +88,6 @@ extern int thr_setspecific(thread_key_t, extern int thr_getspecific(thread_key_t, void **); extern size_t thr_min_stack(void); -#else /* __STDC */ - -extern int thr_create(); -extern int thr_join(); -extern int thr_setconcurrency(); -extern int thr_getconcurrency(); -extern void thr_exit(); -extern thread_t thr_self(); -extern int thr_sigsetmask(); -extern int thr_stksegment(); -extern int thr_main(); -extern int thr_kill(); -extern int thr_suspend(); -extern int thr_continue(); -extern void thr_yield(); -extern int thr_setprio(); -extern int thr_getprio(); -extern int thr_keycreate(); -extern int thr_keycreate_once(); -extern int thr_setspecific(); -extern int thr_getspecific(); -extern size_t thr_min_stack(); - -#endif /* __STDC */ #endif /* _ASM */ #define THR_MIN_STACK thr_min_stack() From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 06:29:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C888FDA3; Wed, 20 Aug 2014 06:29:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B073B310B; Wed, 20 Aug 2014 06:29:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7K6TiYS013841; Wed, 20 Aug 2014 06:29:44 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7K6Thc3013837; Wed, 20 Aug 2014 06:29:43 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201408200629.s7K6Thc3013837@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 20 Aug 2014 06:29:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r270197 - vendor-sys/illumos/dist/uts/common/sys vendor/illumos/dist/head X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 06:29:44 -0000 Author: delphij Date: Wed Aug 20 06:29:42 2014 New Revision: 270197 URL: http://svnweb.freebsd.org/changeset/base/270197 Log: 5066 remove support for non-ANSI compilation 5068 Remove SCCSID() macro from Reviewed by: Keith Wesolowski Reviewed by: Josef 'Jeff' Sipek Approved by: Robert Mustacchi Author: Garrett D'Amore illumos/illumos-gate@ba3594ba9b5dd4c846c472a8d657edcb7c8109ac Modified: vendor-sys/illumos/dist/uts/common/sys/acl.h vendor-sys/illumos/dist/uts/common/sys/debug.h vendor-sys/illumos/dist/uts/common/sys/feature_tests.h vendor-sys/illumos/dist/uts/common/sys/processor.h Changes in other areas also in this revision: Modified: vendor/illumos/dist/head/libintl.h vendor/illumos/dist/head/nlist.h vendor/illumos/dist/head/synch.h vendor/illumos/dist/head/thread.h Modified: vendor-sys/illumos/dist/uts/common/sys/acl.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/sys/acl.h Wed Aug 20 06:25:43 2014 (r270196) +++ vendor-sys/illumos/dist/uts/common/sys/acl.h Wed Aug 20 06:29:42 2014 (r270197) @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore + * * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -287,13 +289,8 @@ extern int cmp2acls(void *, void *); #endif /* !defined(_KERNEL) */ -#if defined(__STDC__) extern int acl(const char *path, int cmd, int cnt, void *buf); extern int facl(int fd, int cmd, int cnt, void *buf); -#else /* !__STDC__ */ -extern int acl(); -extern int facl(); -#endif /* defined(__STDC__) */ #ifdef __cplusplus } Modified: vendor-sys/illumos/dist/uts/common/sys/debug.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/sys/debug.h Wed Aug 20 06:25:43 2014 (r270196) +++ vendor-sys/illumos/dist/uts/common/sys/debug.h Wed Aug 20 06:29:42 2014 (r270197) @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore + * * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -48,7 +50,6 @@ extern "C" { * ASSERT and is evaluated on both debug and non-debug kernels. */ -#if defined(__STDC__) extern int assfail(const char *, const char *, int); #define VERIFY(EX) ((void)((EX) || assfail(#EX, __FILE__, __LINE__))) #if DEBUG @@ -56,15 +57,6 @@ extern int assfail(const char *, const c #else #define ASSERT(x) ((void)0) #endif -#else /* defined(__STDC__) */ -extern int assfail(); -#define VERIFY(EX) ((void)((EX) || assfail("EX", __FILE__, __LINE__))) -#if DEBUG -#define ASSERT(EX) ((void)((EX) || assfail("EX", __FILE__, __LINE__))) -#else -#define ASSERT(x) ((void)0) -#endif -#endif /* defined(__STDC__) */ /* * Assertion variants sensitive to the compilation data model Modified: vendor-sys/illumos/dist/uts/common/sys/feature_tests.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/sys/feature_tests.h Wed Aug 20 06:25:43 2014 (r270196) +++ vendor-sys/illumos/dist/uts/common/sys/feature_tests.h Wed Aug 20 06:29:42 2014 (r270197) @@ -20,6 +20,8 @@ */ /* + * Copyright 2013 Garrett D'Amore + * * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -43,15 +45,16 @@ extern "C" { * 199309L POSIX.1b-1993 compilation (Real Time) * 199506L POSIX.1c-1995 compilation (POSIX Threads) * 200112L POSIX.1-2001 compilation (Austin Group Revision) + * 200809L POSIX.1-2008 compilation */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1 #endif /* - * The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, and _STDC_C99 - * are Sun implementation specific macros created in order to compress - * common standards specified feature test macros for easier reading. + * The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS, + * and _STDC_C99 are Sun implementation specific macros created in order to + * compress common standards specified feature test macros for easier reading. * These macros should not be used by the application developer as * unexpected results may occur. Instead, the user should reference * standards(5) for correct usage of the standards feature test macros. @@ -77,6 +80,10 @@ extern "C" { * the C standard. A value of 199901L indicates a * compiler that complies with ISO/IEC 9899:1999, other- * wise known as the C99 standard. + * + * _STRICT_SYMBOLS Used in cases where symbol visibility is restricted + * by the standards, and the user has not explicitly + * relaxed the strictness via __EXTENSIONS__. */ #if defined(_XOPEN_SOURCE) || defined(_POSIX_C_SOURCE) @@ -144,6 +151,14 @@ extern "C" { #endif /* + * Use strict symbol visibility. + */ +#if (defined(_STRICT_STDC) || defined(__XOPEN_OR_POSIX)) && \ + !defined(__EXTENSIONS__) +#define _STRICT_SYMBOLS +#endif + +/* * Large file interfaces: * * _LARGEFILE_SOURCE @@ -222,6 +237,8 @@ extern "C" { * X/Open CAE Specification, Issue 5 (XPG5) * Open Group Technical Standard, Issue 6 (XPG6), also referred to as * IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002. + * Open Group Technical Standard, Issue 7 (XPG7), also referred to as + * IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009. * * XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1). * XPG5 is also referred to as UNIX 98 or the Single Unix Specification, @@ -229,6 +246,7 @@ extern "C" { * XPG6 is the result of a merge of the X/Open and POSIX specifications * and as such is also referred to as IEEE Std. 1003.1-2001 in * addition to UNIX 03 and SUSv3. + * XPG7 is also referred to as UNIX 08 and SUSv4. * * When writing a conforming X/Open application, as per the specification * requirements, the appropriate feature test macros must be defined at @@ -241,6 +259,7 @@ extern "C" { * _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 * _XOPEN_SOURCE = 500 XPG5 * _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6 + * _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7 * * In order to simplify the guards within the headers, the following * implementation private test macros have been created. Applications @@ -260,6 +279,7 @@ extern "C" { * _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS) * _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2) * _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3) + * _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4) */ /* X/Open Portability Guide, Issue 3 */ @@ -294,6 +314,19 @@ extern "C" { #define _POSIX_C_SOURCE 200112L #undef _XOPEN_SOURCE #define _XOPEN_SOURCE 600 + +/* Open Group Technical Standard, Issue 7 */ +#elif (_XOPEN_SOURCE - 0 == 700) || (_POSIX_C_SOURCE - 0 == 200809L) +#define _XPG7 +#define _XPG6 +#define _XPG5 +#define _XPG4_2 +#define _XPG4 +#define _XPG3 +#undef _POSIX_C_SOURCE +#define _POSIX_C_SOURCE 200809L +#undef _XOPEN_SOURCE +#define _XOPEN_SOURCE 700 #endif /* @@ -304,12 +337,15 @@ extern "C" { * with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application. * _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98) * application and with a value of 600 indicates an XPG6 (UNIX 03) - * application. The appropriate version is determined by the use of the + * application and with a value of 700 indicates an XPG7 (UNIX 08). + * The appropriate version is determined by the use of the * feature test macros described earlier. The value of _XOPEN_VERSION * defaults to 3 otherwise indicating support for XPG3 applications. */ #ifndef _XOPEN_VERSION -#ifdef _XPG6 +#if defined(_XPG7) +#define _XOPEN_VERSION 700 +#elif defined(_XPG6) #define _XOPEN_VERSION 600 #elif defined(_XPG5) #define _XOPEN_VERSION 500 Modified: vendor-sys/illumos/dist/uts/common/sys/processor.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/sys/processor.h Wed Aug 20 06:25:43 2014 (r270196) +++ vendor-sys/illumos/dist/uts/common/sys/processor.h Wed Aug 20 06:29:42 2014 (r270197) @@ -25,6 +25,8 @@ */ /* + * Copyright 2014 Garrett D'Amore + * * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -112,7 +114,6 @@ typedef struct { * User-level system call interface prototypes */ #ifndef _KERNEL -#ifdef __STDC__ extern int p_online(processorid_t processorid, int flag); extern int processor_info(processorid_t processorid, @@ -122,16 +123,6 @@ extern int processor_bind(idtype_t idtyp extern processorid_t getcpuid(void); extern lgrpid_t gethomelgroup(void); -#else - -extern int p_online(); -extern int processor_info(); -extern int processor_bind(); -extern processorid_t getcpuid(); -extern lgrpid_t gethomelgroup(); - -#endif /* __STDC__ */ - #else /* _KERNEL */ /* From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 06:34:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B5D02FC; Wed, 20 Aug 2014 06:34:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B231320A; Wed, 20 Aug 2014 06:34:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7K6YPWx018370; Wed, 20 Aug 2014 06:34:25 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7K6YOfI018363; Wed, 20 Aug 2014 06:34:24 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201408200634.s7K6YOfI018363@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 20 Aug 2014 06:34:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r270198 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 06:34:25 -0000 Author: delphij Date: Wed Aug 20 06:34:24 2014 New Revision: 270198 URL: http://svnweb.freebsd.org/changeset/base/270198 Log: 5095 panic when adding a duplicate dbuf to dn_dbufs Reviewed by: Adam Leventhal Reviewed by: George Wilson Reviewed by: Mattew Ahrens Reviewed by: Dan Kimmel Reviewed by: Dan McDonald Reviewed by: Josef Sipek Approved by: Robert Mustacchi Author: Alex Reece illumos/illumos-gate@86bb58aec7165f8a0303564575c65e5a2ad58bf1 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dbuf.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dnode.h Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Wed Aug 20 06:29:42 2014 (r270197) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Wed Aug 20 06:34:24 2014 (r270198) @@ -70,8 +70,6 @@ dbuf_cons(void *vdb, void *unused, int k cv_init(&db->db_changed, NULL, CV_DEFAULT, NULL); refcount_create(&db->db_holds); - db->db_creation = gethrtime(); - return (0); } @@ -819,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: vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c Wed Aug 20 06:29:42 2014 (r270197) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c Wed Aug 20 06:34:24 2014 (r270198) @@ -67,33 +67,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: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dbuf.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dbuf.h Wed Aug 20 06:29:42 2014 (r270197) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dbuf.h Wed Aug 20 06:34:24 2014 (r270198) @@ -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: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dnode.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dnode.h Wed Aug 20 06:29:42 2014 (r270197) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dnode.h Wed Aug 20 06:34:24 2014 (r270198) @@ -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 owner-svn-src-all@FreeBSD.ORG Wed Aug 20 07:46:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E21E171C; Wed, 20 Aug 2014 07:46:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CDA4E3A05; Wed, 20 Aug 2014 07:46:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7K7kSe0050654; Wed, 20 Aug 2014 07:46:28 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7K7kS7B050652; Wed, 20 Aug 2014 07:46:28 GMT (envelope-from se@FreeBSD.org) Message-Id: <201408200746.s7K7kS7B050652@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Wed, 20 Aug 2014 07:46:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270199 - head/tools/tools/vt/keymaps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 07:46:29 -0000 Author: se Date: Wed Aug 20 07:46:28 2014 New Revision: 270199 URL: http://svnweb.freebsd.org/changeset/base/270199 Log: Fix further conversion errors found while testing the converted keymaps. MFC after: 3 days Modified: head/tools/tools/vt/keymaps/convert-keymap.pl head/tools/tools/vt/keymaps/convert-keymaps.pl Modified: head/tools/tools/vt/keymaps/convert-keymap.pl ============================================================================== --- head/tools/tools/vt/keymaps/convert-keymap.pl Wed Aug 20 06:34:24 2014 (r270198) +++ head/tools/tools/vt/keymaps/convert-keymap.pl Wed Aug 20 07:46:28 2014 (r270199) @@ -35,33 +35,50 @@ sub local_to_UCS_code return prettyprint_token(ord(Encode::decode("UTF-8", local_to_UCS_string($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 + if $C =~ m/^0x([0-9a-f]+)$/i; # hex number return local_to_UCS_code(chr(ord($1))) - if $C =~ m/^'(.)'$/; # character - return ""; # uncovered case + 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 ' ' +#print "<< $line"; $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); +# print "-> $line<> $matches: ('$1','$2')\n"; + } 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); +#printf ">> $line%s\n", join('|', @KEYTOKEN); return @KEYTOKEN; } @@ -85,7 +102,7 @@ while () { } elsif ($C eq "(") { printf "%17s", "( "; # paren continues accent definition } else { - print "UNKNOWN DEFINITION: $_"; + print "Unknown input line format: $_"; } $at_bol = 0; } else { Modified: head/tools/tools/vt/keymaps/convert-keymaps.pl ============================================================================== --- head/tools/tools/vt/keymaps/convert-keymaps.pl Wed Aug 20 06:34:24 2014 (r270198) +++ head/tools/tools/vt/keymaps/convert-keymaps.pl Wed Aug 20 07:46:28 2014 (r270199) @@ -94,6 +94,6 @@ foreach $kbdfile (glob("$dir_keymaps_sys print "$kbdfile not found\n"; } } else { - print "Unknown input file: $basename\n"; + print "Ignore '$basename': No encoding defined in KBDFILES.map\n"; } } From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 07:48:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AC1C686E; Wed, 20 Aug 2014 07:48:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97EE63A12; Wed, 20 Aug 2014 07:48:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7K7mAl9050930; Wed, 20 Aug 2014 07:48:10 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7K7m92w050925; Wed, 20 Aug 2014 07:48:09 GMT (envelope-from se@FreeBSD.org) Message-Id: <201408200748.s7K7m92w050925@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Wed, 20 Aug 2014 07:48:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270200 - head/share/vt/keymaps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 07:48:10 -0000 Author: se Date: Wed Aug 20 07:48:09 2014 New Revision: 270200 URL: http://svnweb.freebsd.org/changeset/base/270200 Log: Fix conversion errors leading to malformed keymap files. MFC after: 3 days Modified: head/share/vt/keymaps/cz.kbd head/share/vt/keymaps/fr.dvorak.acc.kbd head/share/vt/keymaps/nordic.asus-eee.kbd head/share/vt/keymaps/pl.dvorak.kbd Modified: head/share/vt/keymaps/cz.kbd ============================================================================== --- head/share/vt/keymaps/cz.kbd Wed Aug 20 07:46:28 2014 (r270199) +++ head/share/vt/keymaps/cz.kbd Wed Aug 20 07:48:09 2014 (r270200) @@ -262,7 +262,7 @@ ( 'i' 0xed ) ( 'n' 0x0144 ) ( 'o' 0xf3 ) ( 'u' 0xfa ) ( 'y' 0xfd ) - dcir '^' ( ' ' ) ( 'A' 0xc2 ) ( 'I' 0xce ) ( 'O' 0xd4 ) + dcir '^' ( '^' '^' ) ( 'A' 0xc2 ) ( 'I' 0xce ) ( 'O' 0xd4 ) ( 'a' 0xe2 ) ( 'i' 0xee ) ( 'o' 0xf4 ) dbre 0x02d8 ( 0x02d8 0x02d8 ) ( 'A' 0x0102 ) ( 'a' 0x0103 ) Modified: head/share/vt/keymaps/fr.dvorak.acc.kbd ============================================================================== --- head/share/vt/keymaps/fr.dvorak.acc.kbd Wed Aug 20 07:46:28 2014 (r270199) +++ head/share/vt/keymaps/fr.dvorak.acc.kbd Wed Aug 20 07:48:09 2014 (r270200) @@ -1,7 +1,7 @@ # A Dvorak keyboard for French # # This is a Dvorak-like layout for French -# according to Francis Leboutte on +# according to Francis Leboutte on # http://www.algo.be/ergo/dvorak-fr.html # # -Frédéric Praca @@ -14,58 +14,58 @@ # ------------------------------------------------------------------ 000 nop nop nop nop nop nop nop nop O 001 esc esc esc esc esc esc debug esc O - 002 '=' '1' nop nop nop nop nop nop C - 003 '/' '2' nop nop nop nop nop nop C - 004 '-' '3' nop nop nop nop nop nop C - 005 'è' '4' nop nop nop nop nop nop C - 006 '\' '5' nop nop nop nop nop nop C - 007 dcir '6' nop nop nop nop nop nop C - 008 '(' '7' nop nop nop nop nop nop C - 009 dgra '8' nop nop nop nop nop nop C - 010 ')' '9' nop nop nop nop nop nop C - 011 '"' '0' nop nop nop nop nop nop C - 012 '[' '+' nop nop nop nop nop nop C - 013 ']' '%' nop nop nop nop nop nop C + 002 '=' '1' nop nop nop nop nop nop C + 003 '/' '2' nop nop nop nop nop nop C + 004 '-' '3' nop nop nop nop nop nop C + 005 0xe8 '4' nop nop nop nop nop nop C + 006 '\' '5' nop nop nop nop nop nop C + 007 dcir '6' nop nop nop nop nop nop C + 008 '(' '7' nop nop nop nop nop nop C + 009 dgra '8' nop nop nop nop nop nop C + 010 ')' '9' nop nop nop nop nop nop C + 011 '"' '0' nop nop nop nop nop nop C + 012 '[' '+' nop nop nop nop nop nop C + 013 ']' '%' nop nop nop nop nop nop C 014 bs bs del del bs bs del del O 015 ht btab nop nop ht btab nop nop O - 016 ':' '?' nop nop nop nop nop nop O - 017 ''' '<' nop nop nop nop nop nop C - 018 'é' '>' nop nop nop nop nop nop C - 019 'g' 'G' nop nop nop nop nop nop C - 020 '.' '!' nop nop nop nop nop nop O - 021 'h' 'H' nop nop nop nop nop nop C - 022 'v' 'V' nop nop nop nop nop nop C - 023 'c' 'C' nop nop nop nop nop nop C - 024 'm' 'M' nop nop nop nop nop nop C - 025 'k' 'K' nop nop nop nop nop nop C - 026 'z' 'Z' nop nop nop nop nop nop C - 027 ddia '&' nop nop nop nop nop nop O + 016 ':' '?' nop nop nop nop nop nop O + 017 ''' '<' nop nop nop nop nop nop C + 018 0xe9 '>' nop nop nop nop nop nop C + 019 'g' 'G' nop nop nop nop nop nop C + 020 '.' '!' nop nop nop nop nop nop O + 021 'h' 'H' nop nop nop nop nop nop C + 022 'v' 'V' nop nop nop nop nop nop C + 023 'c' 'C' nop nop nop nop nop nop C + 024 'm' 'M' nop nop nop nop nop nop C + 025 'k' 'K' nop nop nop nop nop nop C + 026 'z' 'Z' nop nop nop nop nop nop C + 027 ddia '&' nop nop nop nop nop nop O 028 cr cr nl nl cr cr nl nl O 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O - 030 'o' 'O' nop nop nop nop nop nop C - 031 'a' 'A' nop nop nop nop nop nop C - 032 'u' 'U' nop nop nop nop nop nop C - 033 'e' 'E' nop nop nop nop nop nop C - 034 'b' 'B' nop nop nop nop nop nop C - 035 'f' 'F' nop nop nop nop nop nop C - 036 's' 'S' nop nop nop nop nop nop C - 037 't' 'T' nop nop nop nop nop nop C - 038 'n' 'N' nop nop nop nop nop nop C - 039 'd' 'D' nop nop nop nop nop nop C - 040 'w' 'W' nop nop nop nop nop nop C + 030 'o' 'O' nop nop nop nop nop nop C + 031 'a' 'A' nop nop nop nop nop nop C + 032 'u' 'U' nop nop nop nop nop nop C + 033 'e' 'E' nop nop nop nop nop nop C + 034 'b' 'B' nop nop nop nop nop nop C + 035 'f' 'F' nop nop nop nop nop nop C + 036 's' 'S' nop nop nop nop nop nop C + 037 't' 'T' nop nop nop nop nop nop C + 038 'n' 'N' nop nop nop nop nop nop C + 039 'd' 'D' nop nop nop nop nop nop C + 040 'w' 'W' nop nop nop nop nop nop C 041 '_' '*' nop nop nop nop nop nop C 042 lshift lshift lshift lshift lshift lshift lshift lshift O - 043 dtil '#' nop nop nop nop nop nop O - 044 ';' '|' nop nop nop nop nop nop O - 045 'q' 'Q' nop nop nop nop nop nop C - 046 ',' '@' nop nop nop nop nop nop O - 047 'i' 'I' nop nop nop nop nop nop C - 048 'y' 'Y' nop nop nop nop nop nop C - 049 'x' 'X' nop nop nop nop nop nop C - 050 'r' 'R' nop nop nop nop nop nop C - 051 'l' 'L' nop nop nop nop nop nop C - 052 'p' 'P' nop nop nop nop nop nop C - 053 'j' 'J' nop nop nop nop nop nop C + 043 dtil '#' nop nop nop nop nop nop O + 044 ';' '|' nop nop nop nop nop nop O + 045 'q' 'Q' nop nop nop nop nop nop C + 046 ',' '@' nop nop nop nop nop nop O + 047 'i' 'I' nop nop nop nop nop nop C + 048 'y' 'Y' nop nop nop nop nop nop C + 049 'x' 'X' nop nop nop nop nop nop C + 050 'r' 'R' nop nop nop nop nop nop C + 051 'l' 'L' nop nop nop nop nop nop C + 052 'p' 'P' nop nop nop nop nop nop C + 053 'j' 'J' nop nop nop nop nop nop C 054 rshift rshift rshift rshift rshift rshift rshift rshift O 055 '*' '*' '*' '*' '*' '*' '*' '*' O 056 lalt lalt lalt lalt lalt lalt lalt lalt O @@ -98,7 +98,7 @@ 083 del '.' '.' '.' '.' '.' boot boot N 084 nop nop nop nop nop nop nop nop O 085 nop nop nop nop nop nop nop nop O - 086 'à' 'ç' nop nop nop nop nop nop O + 086 0xe0 0xe7 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 @@ -115,31 +115,35 @@ 100 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 O 101 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 O 102 fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 O - 103 fkey61 fkey61 fkey61 fkey61 fkey61 fkey61 boot 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 107 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O 108 nop nop nop nop nop nop nop nop O - dgra '`' ( '/' '±' ) ( '-' 'Å’' ) ( 'è' 'Å“' ) ( '\' 'Ÿ' ) - ( '?' 'Æ' ) ( 'C' 'Ç' ) - ( ':' 'æ' ) ( '`' '$' ) ( 'é' 'É' ) ( 'g' 164 ) - ( '.' '°' ) ( 'c' 'ç' ) ( 'm' 'µ' ) - ( 'O' 'Ã’' ) ( 'A' 192 ) ( 'U' 'Ù' ) ( 'E' 'È' ) - ( 'o' 'ò' ) ( 'a' 'à' ) ( 'u' 'ù' ) ( 'e' 'è' ) - ( 's' '«' ) ( 'n' '»' ) - ( 'ç' 'Ç' ) ( '|' 188 ) ( 'I' 'ÃŒ' ) - ( 'à' 192 ) ( ';' 189 ) ( 'q' '{' ) ( ',' '}' ) - ( 'i' 'ì' ) ( 'r' 'º' ) ( 'p' '§' ) - ( '!' '¡' ) - dcir '^' ( 'a' 'â' ) ( 'e' 'ê' ) ( 'i' 'î' ) ( 'o' 'ô' ) ( 'u' 'û' ) - ( 'A' 'Â' ) ( 'E' 'Ê' ) ( 'I' 'ÃŽ' ) ( 'O' 'Ô' ) ( 'U' 'Û' ) - dtil '~' ( 'n' 'ñ' ) ( 'N' 'Ñ' ) - ( 'a' 'ã' ) ( 'A' 'Ã' ) ( 'o' 'õ' ) ( 'O' 'Õ' ) - ddia '"' ( 'a' 'ä' ) ( 'e' 'ë' ) ( 'i' 'ï' ) ( 'o' 'ö' ) ( 'u' 'ü' ) - ( 'A' 'Ä' ) ( 'E' 'Ë' ) ( 'I' 'Ã' ) ( 'O' 'Ö' ) ( 'U' 'Ãœ' ) - ( 'y' 255 ) ( 'Y' 190 ) - dacu 0xb4 ( 'a' 'á' ) ( 'e' 'é' ) ( 'i' 237 ) ( 'o' 'ó') ( 'u' 'ú' ) - ( 'A' 'Ã' ) ( 'E' 'É' ) ( 'I' 'Ã' ) ( 'O' 'Ó' ) ( 'U' 'Ú' ) - ( 'Y' 221 ) ( 'y' 253 ) + dgra '`' ( '/' 0xb1 ) ( '-' 0x0152 ) ( 0xe8 0x0153 ) ( '\' 0x0178 ) + ( '?' 0xc6 ) ( 'C' 0xc7 ) + ( ':' 0xe6 ) ( '`' '$' ) ( 0xe9 0xc9 ) ( 'g' 0x20ac ) + ( '.' 0xb0 ) ( 'c' 0xe7 ) ( 'm' 0xb5 ) + ( 'O' 0xd2 ) ( 'A' 0xc0 ) ( 'U' 0xd9 ) ( 'E' 0xc8 ) + ( 'o' 0xf2 ) ( 'a' 0xe0 ) ( 'u' 0xf9 ) ( 'e' 0xe8 ) + ( 's' 0xab ) ( 'n' 0xbb ) + ( 0xe7 0xc7 ) ( '|' 0x0152 ) ( 'I' 0xcc ) + ( 0xe0 0xc0 ) ( ';' 0x0153 ) ( 'q' '{' ) ( ',' '}' ) + ( 'i' 0xec ) ( 'r' 0xba ) ( 'p' 0xa7 ) + ( '!' 0xa1 ) + + dcir '^' ( 'a' 0xe2 ) ( 'e' 0xea ) ( 'i' 0xee ) ( 'o' 0xf4 ) ( 'u' 0xfb ) + ( 'A' 0xc2 ) ( 'E' 0xca ) ( 'I' 0xce ) ( 'O' 0xd4 ) ( 'U' 0xdb ) + + dtil '~' ( 'n' 0xf1 ) ( 'N' 0xd1 ) + ( 'a' 0xe3 ) ( 'A' 0xc3 ) ( 'o' 0xf5 ) ( 'O' 0xd5 ) + + ddia '"' ( 'a' 0xe4 ) ( 'e' 0xeb ) ( 'i' 0xef ) ( 'o' 0xf6 ) ( 'u' 0xfc ) + ( 'A' 0xc4 ) ( 'E' 0xcb ) ( 'I' 0xcf ) ( 'O' 0xd6 ) ( 'U' 0xdc ) + ( 'y' 0xff ) ( 'Y' 0x0178 ) + + dacu 0x017d ( 'a' 0xe1 ) ( 'e' 0xe9 ) ( 'i' 0xed ) ( 'o' 0xf3 ) ( 'u' 0xfa ) + ( 'A' 0xc1 ) ( 'E' 0xc9 ) ( 'I' 0xcd ) ( 'O' 0xd3 ) ( 'U' 0xda ) + ( 'Y' 0xdd ) ( 'y' 0xfd ) Modified: head/share/vt/keymaps/nordic.asus-eee.kbd ============================================================================== --- head/share/vt/keymaps/nordic.asus-eee.kbd Wed Aug 20 07:46:28 2014 (r270199) +++ head/share/vt/keymaps/nordic.asus-eee.kbd Wed Aug 20 07:48:09 2014 (r270200) @@ -12,7 +12,7 @@ 006 '5' '%' nop nop nop nop nop nop O 007 '6' '&' nop nop nop nop nop nop O # Alt + Shift + 7 = ÷ - 008 '7' '/' nop nop '{' nop nop O + 008 '7' '/' nop nop '{' 0xf7 nop nop O 009 '8' '(' nop nop '[' nop nop nop O 010 '9' ')' nop nop ']' nop gs nop O 011 '0' '=' nop nop '}' nop nop nop O @@ -24,24 +24,24 @@ 016 'q' 'Q' dc1 dc1 'q' 'Q' dc1 dc1 C 017 'w' 'W' etb etb 'w' 'W' etb etb C # Alt + Ctrl + E = French e (as in café) - 018 'e' 'E' enq enq 0x20ac 'E' enq C + 018 'e' 'E' enq enq 0x20ac 'E' 0xe9 enq C # Alt + R = Copyright sign - 019 'r' 'R' dc2 dc2 'R' dc2 dc2 C + 019 'r' 'R' dc2 dc2 0xae 'R' dc2 dc2 C 020 't' 'T' dc4 dc4 't' 'T' dc4 dc4 C 021 'y' 'Y' em em 'y' 'Y' em em C # Alt + U = Mikro, Alt + Shift + U = German u - 022 'u' 'U' nak nak 'U' C + 022 'u' 'U' nak nak 0xb5 'U' 0xfc 0xdc C 023 'i' 'I' ht ht 'i' 'I' ht ht C # Alt + O = Norwegian/Danish Ö - 024 'o' 'O' si si si si C + 024 'o' 'O' si si 0xf8 0xd8 si si C # Alt + P = Pi - 025 'p' 'P' dle dle 'P' dle dle C + 025 'p' 'P' dle dle 0xb6 'P' dle dle C 026 0xe5 0xc5 nop nop '}' ']' nop nop C 027 0x0161 '^' nop nop '~' nop nop nop O 028 cr cr nl nl cr cr nl nl O 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O # Alt + A = At sign, Ctrl+Alt = ae, Ctrl+Alt+Shift = AE - 030 'a' 'A' soh soh '@' 'A' C + 030 'a' 'A' soh soh '@' 'A' 0xe6 0xc6 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 @@ -61,7 +61,7 @@ 046 'c' 'C' etx etx 'c' 'C' etx etx C 047 'v' 'V' syn syn 'v' 'V' syn syn C # Ctrl + Shift + B = German B - 048 'b' 'B' stx 'b' 'B' stx stx C + 048 'b' 'B' stx 0xdf 'b' 'B' stx stx C 049 'n' 'N' so so 'n' 'N' so so C # Alt + M = Mikro 050 'm' 'M' cr cr 0xb5 'M' cr cr C Modified: head/share/vt/keymaps/pl.dvorak.kbd ============================================================================== --- head/share/vt/keymaps/pl.dvorak.kbd Wed Aug 20 07:46:28 2014 (r270199) +++ head/share/vt/keymaps/pl.dvorak.kbd Wed Aug 20 07:48:09 2014 (r270200) @@ -115,4 +115,3 @@ 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 - From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 08:02:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE73D10F; Wed, 20 Aug 2014 08:02:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B9E713BD4; Wed, 20 Aug 2014 08:02:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7K82cX1059611; Wed, 20 Aug 2014 08:02:38 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7K82cJ6059609; Wed, 20 Aug 2014 08:02:38 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201408200802.s7K82cJ6059609@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 20 Aug 2014 08:02:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270201 - in head/sys: powerpc/include sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 08:02:38 -0000 Author: kib Date: Wed Aug 20 08:02:38 2014 New Revision: 270201 URL: http://svnweb.freebsd.org/changeset/base/270201 Log: Add arch-specific macro SFBUF_PHYS_DMAP(), which should translate the physical address of the page to direct map address, in case SFBUF_OPTIONAL_DIRECT_MAP returns true. The case of PowerPC AIM 64bit, where the page physical address is identical to the direct map address, is accidental. Reviewed by: alc Sponsored by: The FreeBSD Foundation Modified: head/sys/powerpc/include/vmparam.h head/sys/sys/sf_buf.h Modified: head/sys/powerpc/include/vmparam.h ============================================================================== --- head/sys/powerpc/include/vmparam.h Wed Aug 20 07:48:09 2014 (r270200) +++ head/sys/powerpc/include/vmparam.h Wed Aug 20 08:02:38 2014 (r270201) @@ -210,5 +210,6 @@ struct pmap_physseg { #define SFBUF #define SFBUF_NOMD #define SFBUF_OPTIONAL_DIRECT_MAP hw_direct_map +#define SFBUF_PHYS_DMAP(x) (x) #endif /* _MACHINE_VMPARAM_H_ */ Modified: head/sys/sys/sf_buf.h ============================================================================== --- head/sys/sys/sf_buf.h Wed Aug 20 07:48:09 2014 (r270200) +++ head/sys/sys/sf_buf.h Wed Aug 20 08:02:38 2014 (r270201) @@ -113,7 +113,7 @@ sf_buf_kva(struct sf_buf *sf) { #ifdef SFBUF_OPTIONAL_DIRECT_MAP if (SFBUF_OPTIONAL_DIRECT_MAP) - return (VM_PAGE_TO_PHYS((vm_page_t)sf)); + return (SFBUF_PHYS_DMAP(VM_PAGE_TO_PHYS((vm_page_t)sf))); #endif return (sf->kva); From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 08:07:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87829348; Wed, 20 Aug 2014 08:07:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 734483BFD; Wed, 20 Aug 2014 08:07:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7K879s6060235; Wed, 20 Aug 2014 08:07:09 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7K879GD060234; Wed, 20 Aug 2014 08:07:09 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201408200807.s7K879GD060234@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 20 Aug 2014 08:07:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270202 - head/sys/amd64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 08:07:09 -0000 Author: kib Date: Wed Aug 20 08:07:08 2014 New Revision: 270202 URL: http://svnweb.freebsd.org/changeset/base/270202 Log: Increase max number of physical segments on amd64 to 63. Eventually, the vmd_segs of the struct vm_domain should become bitset instead of long, to allow arbitrary compile-time selected maximum. Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/include/vmparam.h Modified: head/sys/amd64/include/vmparam.h ============================================================================== --- head/sys/amd64/include/vmparam.h Wed Aug 20 08:02:38 2014 (r270201) +++ head/sys/amd64/include/vmparam.h Wed Aug 20 08:07:08 2014 (r270202) @@ -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 owner-svn-src-all@FreeBSD.ORG Wed Aug 20 08:13:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD5725B3; Wed, 20 Aug 2014 08:13:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8F443CAE; Wed, 20 Aug 2014 08:13:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7K8D3OB064220; Wed, 20 Aug 2014 08:13:03 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7K8D3hS064219; Wed, 20 Aug 2014 08:13:03 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201408200813.s7K8D3hS064219@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 20 Aug 2014 08:13:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270203 - head/sys/ufs/ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 08:13:04 -0000 Author: kib Date: Wed Aug 20 08:13:03 2014 New Revision: 270203 URL: http://svnweb.freebsd.org/changeset/base/270203 Log: Correct the test for condition to suspend UFS filesystem during unmount. There is no need to suspend read-only filesystem, while we need suspension on modificable mount point. Reported by: rwatson Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/ufs/ffs/ffs_vfsops.c Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Wed Aug 20 08:07:08 2014 (r270202) +++ head/sys/ufs/ffs/ffs_vfsops.c Wed Aug 20 08:13:03 2014 (r270203) @@ -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 owner-svn-src-all@FreeBSD.ORG Wed Aug 20 08:15:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B5E3742; Wed, 20 Aug 2014 08:15:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26DFC3CCA; Wed, 20 Aug 2014 08:15:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7K8FN7H064602; Wed, 20 Aug 2014 08:15:23 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7K8FNHe064601; Wed, 20 Aug 2014 08:15:23 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201408200815.s7K8FNHe064601@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 20 Aug 2014 08:15:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270204 - head/sys/ufs/ufs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 08:15:24 -0000 Author: kib Date: Wed Aug 20 08:15:23 2014 New Revision: 270204 URL: http://svnweb.freebsd.org/changeset/base/270204 Log: Do not busy the UFS mount point inside VOP_RENAME(). The kern_renameat() already starts write on the mp, which prevents parallel unmount from proceed. Busying mp after vn_start_write() deadlocks the unmount. Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/ufs/ufs/ufs_vnops.c Modified: head/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- head/sys/ufs/ufs/ufs_vnops.c Wed Aug 20 08:13:03 2014 (r270203) +++ head/sys/ufs/ufs/ufs_vnops.c Wed Aug 20 08:15:23 2014 (r270204) @@ -1141,11 +1141,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 @@ -1545,8 +1540,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: @@ -1564,8 +1557,6 @@ releout: vrele(tdvp); if (tvp) vrele(tvp); - if (mp) - vfs_unbusy(mp); return (error); } From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 08:24:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E3572BBE; Wed, 20 Aug 2014 08:24:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B45A93DB0; Wed, 20 Aug 2014 08:24:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7K8OcAE069092; Wed, 20 Aug 2014 08:24:38 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7K8OcSn069089; Wed, 20 Aug 2014 08:24:38 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201408200824.s7K8OcSn069089@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 20 Aug 2014 08:24:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270205 - in stable/10/sys: kern vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 08:24:39 -0000 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 owner-svn-src-all@FreeBSD.ORG Wed Aug 20 08:27:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BA8E0D09; Wed, 20 Aug 2014 08:27:06 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 424983DC5; Wed, 20 Aug 2014 08:27:06 +0000 (UTC) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s7K8R0eb057639 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 20 Aug 2014 11:27:00 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua s7K8R0eb057639 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id s7K8R0bW057638; Wed, 20 Aug 2014 11:27:00 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 20 Aug 2014 11:27:00 +0300 From: Konstantin Belousov To: sparc64@freebsd.org Subject: Re: svn commit: r270201 - in head/sys: powerpc/include sys Message-ID: <20140820082700.GY2737@kib.kiev.ua> References: <201408200802.s7K82cJ6059609@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="JViz224v3YRbOSfM" Content-Disposition: inline In-Reply-To: <201408200802.s7K82cJ6059609@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 08:27:06 -0000 --JViz224v3YRbOSfM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 20, 2014 at 08:02:38AM +0000, Konstantin Belousov wrote: > Author: kib > Date: Wed Aug 20 08:02:38 2014 > New Revision: 270201 > URL: http://svnweb.freebsd.org/changeset/base/270201 >=20 > Log: > Add arch-specific macro SFBUF_PHYS_DMAP(), which should translate the > physical address of the page to direct map address, in case > SFBUF_OPTIONAL_DIRECT_MAP returns true. The case of PowerPC AIM > 64bit, where the page physical address is identical to the direct map > address, is accidental. Real use of this interposer is for sparc64 machines which can use direct map due to usable cache implementation. Could someone with the machine identified as SPARC64V test the following patch ? Just booting multiuser should be enough. diff --git a/sys/sparc64/include/vmparam.h b/sys/sparc64/include/vmparam.h index 8e7d76c..c2f30c3 100644 --- a/sys/sparc64/include/vmparam.h +++ b/sys/sparc64/include/vmparam.h @@ -241,5 +241,8 @@ extern vm_offset_t vm_max_kernel_address; =20 #define SFBUF #define SFBUF_MAP +#define SFBUF_OPTIONAL_DIRECT_MAP dcache_color_ignore +#include +#define SFBUF_PHYS_DMAP(x) TLB_PHYS_TO_DIRECT(x) =20 #endif /* !_MACHINE_VMPARAM_H_ */ --JViz224v3YRbOSfM Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJT9FvUAAoJEJDCuSvBvK1BaJgP/1WPrITGayGgyrWUCQWI9buj HT8IbGzSrBs33EANdcxm68GKHU+0s8iEkd+SrlUTJvaqPc1oFiguZ3X/He/i0tBQ ShjYxW6lTQfeKR2Q1ueY7nN3pOXe5oSwOWkasSYkijHvTldswZzLiasuDghNMWff z+kOwzWK3lTyP4BDUv8YNxiqN5t575XG6eVTHpFQrrJIWwz+HToGwrzL3MVAraJK Vbod7N3q9Ek/Q0m4naNAq3EoB3l412uz11+BCbJW2wgWk6oVjAPHLc3p/eUVafdX xd9V7xaiTGpLFpdkIAjI8cOajoihBwwTa6XESzeCjiMSpda8ONJjTbS6+lwlzDt8 xfwCQf6/htRcfZFtGeRcibSz5cuchAjFWOQyfc0trVW1Bw+fpwgAlXlBkp2Gv7dy l6HUJJJiDq/njy6MI8HXC4L8LPkSmy3NmI4Z9vuMUMP+vKsm7BaXSFqMLoLlCR+5 vqhKCf5p7n2PTQ4ugbwxv/Rz94jk/FRImbxCNFF8gHG2Q8QCXFQqm72xfg3/MWOL FSUt++27ypy0IMb54ZsgDNkBn0p/XpNYvsdXbSNSnpNfyUX4FvIB2OBycLHlbMrr xIpZT48ui/Z8UMA1tSruooKNI3Y+QWuaByrEtuSpYeAd/y5da2fLmqEi8PtZ1OHp 8SJ+Vcy4hwOba2pskA1b =OODx -----END PGP SIGNATURE----- --JViz224v3YRbOSfM-- From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 09:10:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C4F5450D; Wed, 20 Aug 2014 09:10:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B08F231CF; Wed, 20 Aug 2014 09:10:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7K9A3m8087769; Wed, 20 Aug 2014 09:10:03 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7K9A348087768; Wed, 20 Aug 2014 09:10:03 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201408200910.s7K9A348087768@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 20 Aug 2014 09:10:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270206 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 09:10:03 -0000 Author: adrian Date: Wed Aug 20 09:10:03 2014 New Revision: 270206 URL: http://svnweb.freebsd.org/changeset/base/270206 Log: After much toying around with this AMRR initial rate stuff, I've decided that for 11n rates it's best to start (very) low and work our way up. So, from now on, the initial rate for AMRR 11n is MCS4. It doesn't try MCS12 or MCS20 - at low signal strengths those don't work very well at all. AMRR will step the rate control up over time if things work out better. Tested: * Intel 5100 * Intel 5300 (using local diffs to test out 3x3 stream support) Modified: head/sys/net80211/ieee80211_amrr.c Modified: head/sys/net80211/ieee80211_amrr.c ============================================================================== --- head/sys/net80211/ieee80211_amrr.c Wed Aug 20 08:24:37 2014 (r270205) +++ head/sys/net80211/ieee80211_amrr.c Wed Aug 20 09:10:03 2014 (r270206) @@ -195,12 +195,13 @@ amrr_node_init(struct ieee80211_node *ni rate &= IEEE80211_RATE_VAL; /* pick initial rate from the rateset - HT or otherwise */ + /* Pick something low that's likely to succeed */ for (amn->amn_rix = rs->rs_nrates - 1; amn->amn_rix > 0; amn->amn_rix--) { /* legacy - anything < 36mbit, stop searching */ - /* 11n - stop at MCS4 / MCS12 / MCS28 */ + /* 11n - stop at MCS4 */ if (amrr_node_is_11n(ni)) { - if ((rs->rs_rates[amn->amn_rix] & 0x7) < 4) + if ((rs->rs_rates[amn->amn_rix] & 0x1f) < 4) break; } else if ((rs->rs_rates[amn->amn_rix] & IEEE80211_RATE_VAL) <= 72) break; From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 13:46:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A34C310; Wed, 20 Aug 2014 13:46:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F02DE30A2; Wed, 20 Aug 2014 13:46:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KDkpmI014312; Wed, 20 Aug 2014 13:46:51 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KDkpXu014311; Wed, 20 Aug 2014 13:46:51 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408201346.s7KDkpXu014311@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 20 Aug 2014 13:46:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270207 - head/sys/fs/autofs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 13:46:52 -0000 Author: trasz Date: Wed Aug 20 13:46:51 2014 New Revision: 270207 URL: http://svnweb.freebsd.org/changeset/base/270207 Log: Rework ".." lookup; previous one failed to properly busy the mountpoint. Reviewed by: kib@ MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/sys/fs/autofs/autofs_vnops.c Modified: head/sys/fs/autofs/autofs_vnops.c ============================================================================== --- head/sys/fs/autofs/autofs_vnops.c Wed Aug 20 09:10:03 2014 (r270206) +++ head/sys/fs/autofs/autofs_vnops.c Wed Aug 20 13:46:51 2014 (r270207) @@ -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 owner-svn-src-all@FreeBSD.ORG Wed Aug 20 13:52:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A2765A8; Wed, 20 Aug 2014 13:52:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA7F03165; Wed, 20 Aug 2014 13:52:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KDqlQI018368; Wed, 20 Aug 2014 13:52:47 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KDqlsp018367; Wed, 20 Aug 2014 13:52:47 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408201352.s7KDqlsp018367@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 20 Aug 2014 13:52:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270209 - head/sbin/mount X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 13:52:48 -0000 Author: trasz Date: Wed Aug 20 13:52:47 2014 New Revision: 270209 URL: http://svnweb.freebsd.org/changeset/base/270209 Log: Add description for the "automounted" mount flag. Reviewed by: emaste@ MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/sbin/mount/mount.8 Modified: head/sbin/mount/mount.8 ============================================================================== --- head/sbin/mount/mount.8 Wed Aug 20 13:48:58 2014 (r270208) +++ head/sbin/mount/mount.8 Wed Aug 20 13:52:47 2014 (r270209) @@ -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 owner-svn-src-all@FreeBSD.ORG Wed Aug 20 13:54:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 893A272B; Wed, 20 Aug 2014 13:54:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 752333185; Wed, 20 Aug 2014 13:54:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KDsSiO018614; Wed, 20 Aug 2014 13:54:28 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KDsSsi018613; Wed, 20 Aug 2014 13:54:28 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408201354.s7KDsSsi018613@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 20 Aug 2014 13:54:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270210 - head/usr.sbin/autofs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 13:54:28 -0000 Author: trasz Date: Wed Aug 20 13:54:27 2014 New Revision: 270210 URL: http://svnweb.freebsd.org/changeset/base/270210 Log: Remove useless - and buggy, it resulted in spurious warnings in logs - code. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/autofs/autounmountd.c Modified: head/usr.sbin/autofs/autounmountd.c ============================================================================== --- head/usr.sbin/autofs/autounmountd.c Wed Aug 20 13:52:47 2014 (r270209) +++ head/usr.sbin/autofs/autounmountd.c Wed Aug 20 13:54:27 2014 (r270210) @@ -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 owner-svn-src-all@FreeBSD.ORG Wed Aug 20 14:41:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8642E72C; Wed, 20 Aug 2014 14:41:16 +0000 (UTC) Received: from mail-we0-x230.google.com (mail-we0-x230.google.com [IPv6:2a00:1450:400c:c03::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A38C436BC; Wed, 20 Aug 2014 14:41:15 +0000 (UTC) Received: by mail-we0-f176.google.com with SMTP id q58so7994644wes.21 for ; Wed, 20 Aug 2014 07:41:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=5RjyW+wPVHHf+Ld5koroAYnTim2QFGZty3136j+dA4w=; b=BMWAnvtziqA/jz7jvM3rjm94w1z5Gj9Zx09xM2VP0LXIRew/OTaj3f2mLLWBURs8jX +egu412iyDmxiAqgteZlZ5Zqbn91FaebshGeIHarDS18CFeE29lRoDhW59lzRQWVITlO tjkT+wavQewxPVmFaEW9p1CgIsw845DIKwIvmvkkxYIUCNa3wM3Trs9JHreZkOlmhuXR w0nDgGRxlfEIQ/aXGmsEM/df0EyphmwT6+pMvKYa/N7Gy80yEF8aNvMBezqKOHmYJ16p 4HkwvWJ0hKGMuo0n0AwmQL+SKPGHjkOwngzHlKo29YaztAK8hfYcGqQW/srBlye2icWB E9Hw== X-Received: by 10.180.95.135 with SMTP id dk7mr15467382wib.68.1408545673854; Wed, 20 Aug 2014 07:41:13 -0700 (PDT) Received: from [172.16.1.30] (39.Red-2-136-52.dynamicIP.rima-tde.net. [2.136.52.39]) by mx.google.com with ESMTPSA id za9sm43323345wjc.29.2014.08.20.07.41.12 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 20 Aug 2014 07:41:12 -0700 (PDT) Sender: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Message-ID: <53F4B381.5010205@FreeBSD.org> Date: Wed, 20 Aug 2014 16:41:05 +0200 From: =?UTF-8?B?Um9nZXIgUGF1IE1vbm7DqQ==?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r265003 - head/secure/usr.sbin/sshd References: <201404270528.s3R5SEIm054377@svn.freebsd.org> In-Reply-To: <201404270528.s3R5SEIm054377@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 14:41:16 -0000 On 27/04/14 07:28, Konstantin Belousov wrote: > Author: kib > Date: Sun Apr 27 05:28:14 2014 > New Revision: 265003 > URL: http://svnweb.freebsd.org/changeset/base/265003 > > Log: > Fix order of libthr and libc in the global dso list for sshd, by > explicitely linking main binary with -lpthread. Before, libthr > appeared in the list due to dependency of one of the kerberos libs. > Due to the change in ld(1) behaviour of not copying NEEDED entries > from direct dependencies into the link results, the order becomes > reversed. > > The libthr must appear before libc to properly interpose libc symbols > and provide working rtld locks implementation. The symptom was sshd > hanging on rtld bind lock during nested symbol binding from a signal > handler. > > Approved by: des (openssh maintainer) > Sponsored by: The FreeBSD Foundation > MFC after: 1 week > > Modified: > head/secure/usr.sbin/sshd/Makefile > > Modified: head/secure/usr.sbin/sshd/Makefile > ============================================================================== > --- head/secure/usr.sbin/sshd/Makefile Sun Apr 27 05:19:01 2014 (r265002) > +++ head/secure/usr.sbin/sshd/Makefile Sun Apr 27 05:28:14 2014 (r265003) > @@ -57,6 +57,16 @@ CFLAGS+= -DNONE_CIPHER_ENABLED > DPADD+= ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ} > LDADD+= -lcrypt -lcrypto -lz > > +# Fix the order of NEEDED entries for libthr and libc. The libthr > +# needs to interpose libc symbols, leaving the libthr loading as > +# dependency of krb causes reversed order and broken interposing. Put > +# the threading library last on the linker command line, just before > +# the -lc added by a compiler driver. > +.if ${MK_KERBEROS_SUPPORT} != "no" > +DPADD+= ${LIBPTHREAD} > +LDADD+= -lpthread > +.endif > + > .if defined(LOCALBASE) > CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE}/bin/xauth\" > .endif Hello, This change makes the following simple test program fail on the second assert. The problem is that sa_handler == SIG_DFL, and sa_flags == SA_SIGINFO, which according to the sigaction(9) man page is not possible. With this change reverted the test is successful. --- #include #include #include int main(int argn, char **argv) { struct sigaction new, old; int rc; memset(&new, 0, sizeof(new)); memset(&old, 0, sizeof(old)); sigemptyset(&new.sa_mask); new.sa_handler = SIG_DFL; new.sa_flags = 0; rc = sigaction(SIGCHLD, &new, &old); assert(rc == 0); assert((old.sa_handler == SIG_DFL || old.sa_handler == SIG_IGN) && !(old.sa_flags & SA_SIGINFO)); return (0); } From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 14:53:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 772E0CCD; Wed, 20 Aug 2014 14:53:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6306037BD; Wed, 20 Aug 2014 14:53:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KErbw7046104; Wed, 20 Aug 2014 14:53:37 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KErb0N046103; Wed, 20 Aug 2014 14:53:37 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201408201453.s7KErb0N046103@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 20 Aug 2014 14:53:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r270211 - vendor/resolver/dist/lib/libc/nameser X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 14:53:37 -0000 Author: pfg Date: Wed Aug 20 14:53:36 2014 New Revision: 270211 URL: http://svnweb.freebsd.org/changeset/base/270211 Log: Add missing break. CID: 603368 Modified: vendor/resolver/dist/lib/libc/nameser/ns_print.c Modified: vendor/resolver/dist/lib/libc/nameser/ns_print.c ============================================================================== --- vendor/resolver/dist/lib/libc/nameser/ns_print.c Wed Aug 20 13:54:27 2014 (r270210) +++ vendor/resolver/dist/lib/libc/nameser/ns_print.c Wed Aug 20 14:53:36 2014 (r270211) @@ -900,6 +900,7 @@ ns_sprintrrf(const u_char *msg, size_t m if (len > 15) T(addstr(" )", 2, &buf, &buflen)); } + break; } case ns_t_ipseckey: { From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 14:57:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CB185F4D; Wed, 20 Aug 2014 14:57:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB4FC380A; Wed, 20 Aug 2014 14:57:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KEvLdI046685; Wed, 20 Aug 2014 14:57:21 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KEvKAn046654; Wed, 20 Aug 2014 14:57:20 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201408201457.s7KEvKAn046654@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: Roger Pau Monné Date: Wed, 20 Aug 2014 14:57:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270212 - in head/sys: dev/pci ofed/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 14:57:22 -0000 Author: royger Date: Wed Aug 20 14:57:20 2014 New Revision: 270212 URL: http://svnweb.freebsd.org/changeset/base/270212 Log: pci: make MSI(-X) enable and disable methods of the PCI bus Make the functions pci_disable_msi, pci_enable_msi and pci_enable_msix methods of the newbus PCI bus. This code should not include any functional change. Sponsored by: Citrix Systems R&D Reviewed by: imp, jhb Differential Revision: https://reviews.freebsd.org/D354 dev/pci/pci.c: - Convert the mentioned functions to newbus methods. - Fix the callers of the converted functions. sys/dev/pci/pci_private.h: dev/pci/pci_if.m: - Declare the new methods. dev/pci/pcivar.h: - Add helpers to call the newbus methods. ofed/include/linux/pci.h: - Add define to prevent the ofed version of pci_enable_msix from clashing with the FreeBSD native version. Modified: head/sys/dev/pci/pci.c head/sys/dev/pci/pci_if.m head/sys/dev/pci/pci_private.h head/sys/dev/pci/pcivar.h head/sys/ofed/include/linux/pci.h Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Wed Aug 20 14:53:36 2014 (r270211) +++ head/sys/dev/pci/pci.c Wed Aug 20 14:57:20 2014 (r270212) @@ -110,11 +110,6 @@ static int pci_write_vpd_reg(device_t p int reg, uint32_t data); #endif static void pci_read_vpd(device_t pcib, pcicfgregs *cfg); -static void pci_disable_msi(device_t dev); -static void pci_enable_msi(device_t dev, uint64_t address, - uint16_t data); -static void pci_enable_msix(device_t dev, u_int index, - uint64_t address, uint32_t data); static void pci_mask_msix(device_t dev, u_int index); static void pci_unmask_msix(device_t dev, u_int index); static int pci_msi_blacklisted(void); @@ -180,6 +175,9 @@ static device_method_t pci_methods[] = { DEVMETHOD(pci_find_htcap, pci_find_htcap_method), DEVMETHOD(pci_alloc_msi, pci_alloc_msi_method), DEVMETHOD(pci_alloc_msix, pci_alloc_msix_method), + DEVMETHOD(pci_enable_msi, pci_enable_msi_method), + DEVMETHOD(pci_enable_msix, pci_enable_msix_method), + DEVMETHOD(pci_disable_msi, pci_disable_msi_method), DEVMETHOD(pci_remap_msix, pci_remap_msix_method), DEVMETHOD(pci_release_msi, pci_release_msi_method), DEVMETHOD(pci_msi_count, pci_msi_count_method), @@ -1343,9 +1341,10 @@ pci_find_extcap_method(device_t dev, dev * Support for MSI-X message interrupts. */ void -pci_enable_msix(device_t dev, u_int index, uint64_t address, uint32_t data) +pci_enable_msix_method(device_t dev, device_t child, u_int index, + uint64_t address, uint32_t data) { - struct pci_devinfo *dinfo = device_get_ivars(dev); + struct pci_devinfo *dinfo = device_get_ivars(child); struct pcicfg_msix *msix = &dinfo->cfg.msix; uint32_t offset; @@ -1356,7 +1355,7 @@ pci_enable_msix(device_t dev, u_int inde bus_write_4(msix->msix_table_res, offset + 8, data); /* Enable MSI -> HT mapping. */ - pci_ht_map_msi(dev, address); + pci_ht_map_msi(child, address); } void @@ -1868,45 +1867,46 @@ pci_set_max_read_req(device_t dev, int s * Support for MSI message signalled interrupts. */ void -pci_enable_msi(device_t dev, uint64_t address, uint16_t data) +pci_enable_msi_method(device_t dev, device_t child, uint64_t address, + uint16_t data) { - struct pci_devinfo *dinfo = device_get_ivars(dev); + struct pci_devinfo *dinfo = device_get_ivars(child); struct pcicfg_msi *msi = &dinfo->cfg.msi; /* Write data and address values. */ - pci_write_config(dev, msi->msi_location + PCIR_MSI_ADDR, + pci_write_config(child, msi->msi_location + PCIR_MSI_ADDR, address & 0xffffffff, 4); if (msi->msi_ctrl & PCIM_MSICTRL_64BIT) { - pci_write_config(dev, msi->msi_location + PCIR_MSI_ADDR_HIGH, + pci_write_config(child, msi->msi_location + PCIR_MSI_ADDR_HIGH, address >> 32, 4); - pci_write_config(dev, msi->msi_location + PCIR_MSI_DATA_64BIT, + pci_write_config(child, msi->msi_location + PCIR_MSI_DATA_64BIT, data, 2); } else - pci_write_config(dev, msi->msi_location + PCIR_MSI_DATA, data, + pci_write_config(child, msi->msi_location + PCIR_MSI_DATA, data, 2); /* Enable MSI in the control register. */ msi->msi_ctrl |= PCIM_MSICTRL_MSI_ENABLE; - pci_write_config(dev, msi->msi_location + PCIR_MSI_CTRL, msi->msi_ctrl, - 2); + pci_write_config(child, msi->msi_location + PCIR_MSI_CTRL, + msi->msi_ctrl, 2); /* Enable MSI -> HT mapping. */ - pci_ht_map_msi(dev, address); + pci_ht_map_msi(child, address); } void -pci_disable_msi(device_t dev) +pci_disable_msi_method(device_t dev, device_t child) { - struct pci_devinfo *dinfo = device_get_ivars(dev); + struct pci_devinfo *dinfo = device_get_ivars(child); struct pcicfg_msi *msi = &dinfo->cfg.msi; /* Disable MSI -> HT mapping. */ - pci_ht_map_msi(dev, 0); + pci_ht_map_msi(child, 0); /* Disable MSI in the control register. */ msi->msi_ctrl &= ~PCIM_MSICTRL_MSI_ENABLE; - pci_write_config(dev, msi->msi_location + PCIR_MSI_CTRL, msi->msi_ctrl, - 2); + pci_write_config(child, msi->msi_location + PCIR_MSI_CTRL, + msi->msi_ctrl, 2); } /* Modified: head/sys/dev/pci/pci_if.m ============================================================================== --- head/sys/dev/pci/pci_if.m Wed Aug 20 14:53:36 2014 (r270211) +++ head/sys/dev/pci/pci_if.m Wed Aug 20 14:57:20 2014 (r270212) @@ -138,6 +138,26 @@ METHOD int alloc_msix { int *count; }; +METHOD void enable_msi { + device_t dev; + device_t child; + uint64_t address; + uint16_t data; +}; + +METHOD void enable_msix { + device_t dev; + device_t child; + u_int index; + uint64_t address; + uint32_t data; +}; + +METHOD void disable_msi { + device_t dev; + device_t child; +}; + METHOD int remap_msix { device_t dev; device_t child; Modified: head/sys/dev/pci/pci_private.h ============================================================================== --- head/sys/dev/pci/pci_private.h Wed Aug 20 14:53:36 2014 (r270211) +++ head/sys/dev/pci/pci_private.h Wed Aug 20 14:57:20 2014 (r270212) @@ -90,6 +90,11 @@ int pci_find_htcap_method(device_t dev, int capability, int *capreg); int pci_alloc_msi_method(device_t dev, device_t child, int *count); int pci_alloc_msix_method(device_t dev, device_t child, int *count); +void pci_enable_msi_method(device_t dev, device_t child, + uint64_t address, uint16_t data); +void pci_enable_msix_method(device_t dev, device_t child, + u_int index, uint64_t address, uint32_t data); +void pci_disable_msi_method(device_t dev, device_t child); int pci_remap_msix_method(device_t dev, device_t child, int count, const u_int *vectors); int pci_release_msi_method(device_t dev, device_t child); Modified: head/sys/dev/pci/pcivar.h ============================================================================== --- head/sys/dev/pci/pcivar.h Wed Aug 20 14:53:36 2014 (r270211) +++ head/sys/dev/pci/pcivar.h Wed Aug 20 14:57:20 2014 (r270212) @@ -458,6 +458,24 @@ pci_alloc_msix(device_t dev, int *count) return (PCI_ALLOC_MSIX(device_get_parent(dev), dev, count)); } +static __inline void +pci_enable_msi(device_t dev, uint64_t address, uint16_t data) +{ + PCI_ENABLE_MSI(device_get_parent(dev), dev, address, data); +} + +static __inline void +pci_enable_msix(device_t dev, u_int index, uint64_t address, uint32_t data) +{ + PCI_ENABLE_MSIX(device_get_parent(dev), dev, index, address, data); +} + +static __inline void +pci_disable_msi(device_t dev) +{ + PCI_DISABLE_MSI(device_get_parent(dev), dev); +} + static __inline int pci_remap_msix(device_t dev, int count, const u_int *vectors) { Modified: head/sys/ofed/include/linux/pci.h ============================================================================== --- head/sys/ofed/include/linux/pci.h Wed Aug 20 14:53:36 2014 (r270211) +++ head/sys/ofed/include/linux/pci.h Wed Aug 20 14:57:20 2014 (r270212) @@ -534,7 +534,11 @@ struct msix_entry { /* * Enable msix, positive errors indicate actual number of available * vectors. Negative errors are failures. + * + * NB: define added to prevent this definition of pci_enable_msix from + * clashing with the native FreeBSD version. */ +#define pci_enable_msix linux_pci_enable_msix static inline int pci_enable_msix(struct pci_dev *pdev, struct msix_entry *entries, int nreq) { From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 14:57:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4F11F4E; Wed, 20 Aug 2014 14:57:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0325380B; Wed, 20 Aug 2014 14:57:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KEvMjE046714; Wed, 20 Aug 2014 14:57:22 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KEvMOF046705; Wed, 20 Aug 2014 14:57:22 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201408201457.s7KEvMOF046705@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 20 Aug 2014 14:57:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r270213 - stable/9/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 14:57:22 -0000 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 owner-svn-src-all@FreeBSD.ORG Wed Aug 20 14:57:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C933249; Wed, 20 Aug 2014 14:57:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 175943817; Wed, 20 Aug 2014 14:57:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KEvtAj046832; Wed, 20 Aug 2014 14:57:55 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KEvtfw046826; Wed, 20 Aug 2014 14:57:55 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201408201457.s7KEvtfw046826@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 20 Aug 2014 14:57:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270214 - stable/10/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 14:57:56 -0000 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 owner-svn-src-all@FreeBSD.ORG Wed Aug 20 14:58:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B41F4384; Wed, 20 Aug 2014 14:58:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A08203825; Wed, 20 Aug 2014 14:58:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KEwPH9047015; Wed, 20 Aug 2014 14:58:25 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KEwPfb047013; Wed, 20 Aug 2014 14:58:25 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201408201458.s7KEwPfb047013@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 20 Aug 2014 14:58:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270215 - head/lib/libc/nameser X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 14:58:25 -0000 Author: pfg Date: Wed Aug 20 14:58:25 2014 New Revision: 270215 URL: http://svnweb.freebsd.org/changeset/base/270215 Log: Add missing break. CID: 603368 Modified: head/lib/libc/nameser/ns_print.c Modified: head/lib/libc/nameser/ns_print.c ============================================================================== --- head/lib/libc/nameser/ns_print.c Wed Aug 20 14:57:55 2014 (r270214) +++ head/lib/libc/nameser/ns_print.c Wed Aug 20 14:58:25 2014 (r270215) @@ -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 owner-svn-src-all@FreeBSD.ORG Wed Aug 20 15:13:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7CD15AC3; Wed, 20 Aug 2014 15:13:24 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00B5F3AF1; Wed, 20 Aug 2014 15:13:23 +0000 (UTC) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s7KFDAb2049645 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 20 Aug 2014 18:13:10 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua s7KFDAb2049645 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id s7KFDA7t049644; Wed, 20 Aug 2014 18:13:10 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 20 Aug 2014 18:13:10 +0300 From: Konstantin Belousov To: Roger Pau Monn?? Subject: Re: svn commit: r265003 - head/secure/usr.sbin/sshd Message-ID: <20140820151310.GB2737@kib.kiev.ua> References: <201404270528.s3R5SEIm054377@svn.freebsd.org> <53F4B381.5010205@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hgy5D1otryeNPdmY" Content-Disposition: inline In-Reply-To: <53F4B381.5010205@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 15:13:24 -0000 --hgy5D1otryeNPdmY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 20, 2014 at 04:41:05PM +0200, Roger Pau Monn?? wrote: > On 27/04/14 07:28, Konstantin Belousov wrote: > > Author: kib > > Date: Sun Apr 27 05:28:14 2014 > > New Revision: 265003 > > URL: http://svnweb.freebsd.org/changeset/base/265003 > >=20 > > Log: > > Fix order of libthr and libc in the global dso list for sshd, by > > explicitely linking main binary with -lpthread. Before, libthr > > appeared in the list due to dependency of one of the kerberos libs. > > Due to the change in ld(1) behaviour of not copying NEEDED entries > > from direct dependencies into the link results, the order becomes > > reversed. > > =20 > > The libthr must appear before libc to properly interpose libc symbols > > and provide working rtld locks implementation. The symptom was sshd > > hanging on rtld bind lock during nested symbol binding from a signal > > handler. > > =20 > > Approved by: des (openssh maintainer) > > Sponsored by: The FreeBSD Foundation > > MFC after: 1 week > >=20 > > Modified: > > head/secure/usr.sbin/sshd/Makefile > >=20 > > Modified: head/secure/usr.sbin/sshd/Makefile > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/secure/usr.sbin/sshd/Makefile Sun Apr 27 05:19:01 2014 (r26500= 2) > > +++ head/secure/usr.sbin/sshd/Makefile Sun Apr 27 05:28:14 2014 (r26500= 3) > > @@ -57,6 +57,16 @@ CFLAGS+=3D -DNONE_CIPHER_ENABLED > > DPADD+=3D ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ} > > LDADD+=3D -lcrypt -lcrypto -lz > > =20 > > +# Fix the order of NEEDED entries for libthr and libc. The libthr > > +# needs to interpose libc symbols, leaving the libthr loading as > > +# dependency of krb causes reversed order and broken interposing. Put > > +# the threading library last on the linker command line, just before > > +# the -lc added by a compiler driver. > > +.if ${MK_KERBEROS_SUPPORT} !=3D "no" > > +DPADD+=3D ${LIBPTHREAD} > > +LDADD+=3D -lpthread > > +.endif > > + > > .if defined(LOCALBASE) > > CFLAGS+=3D -DXAUTH_PATH=3D\"${LOCALBASE}/bin/xauth\" > > .endif >=20 > Hello, >=20 > This change makes the following simple test program fail on the second=20 > assert. The problem is that sa_handler =3D=3D SIG_DFL, and sa_flags =3D= =3D=20 > SA_SIGINFO, which according to the sigaction(9) man page is not=20 > possible. With this change reverted the test is successful. I do not quite follow. What are the relations between sshd and your test program ? Should the test be run somehow specially ? >=20 > --- > #include > #include > #include >=20 > int main(int argn, char **argv) > { > struct sigaction new, old; > int rc; >=20 > memset(&new, 0, sizeof(new)); > memset(&old, 0, sizeof(old)); >=20 > sigemptyset(&new.sa_mask); > new.sa_handler =3D SIG_DFL; > new.sa_flags =3D 0; >=20 > rc =3D sigaction(SIGCHLD, &new, &old); > assert(rc =3D=3D 0); > assert((old.sa_handler =3D=3D SIG_DFL || old.sa_handler =3D=3D SI= G_IGN) && > !(old.sa_flags & SA_SIGINFO)); >=20 > return (0); > } >=20 --hgy5D1otryeNPdmY Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJT9LsGAAoJEJDCuSvBvK1BVvoP/2wZgcRcmIxcS2rpxDyYmeMO 4y8aNjJcWez9OFZTwRQpBMXnBgbzKT0ohQWQItGfcPp9WaRp4Ea/+FEQEaU1c5is 3R8sHIFbKPLkeWotec0Nl56QjDOOn2E4v+9MPCKz0eRR68seNDfViZxpcSSTXpf+ Y/hNsQl+rKMDLgOggNRe2CPa5LDHn9vgm8OOoQVSnvwPiOtp0KTvkMdU1PjUydfe 0rmx5kKvoMWE3BTDKAFbRDmTPHrC1MHxMwEJwIudbXdsTHJBVBvtDgwWkSkmPUPT I2NUD5AmZ8sQwVD1r9THFSpm/ToJ8I38CjKe8Y0sElb4fg6c8wJ5tH+4gcDAyBRz cTilZJj/UYqpt9DDJZM+F384UehWr9pOqQxwW4Vdpj/R1Yweyi5Oj350z9UBXXuP QIOAyxWQh2Mu3Xj6yRfld1swSowtEbpimhNrzLQadbyhRsnqwQcxXsXiawgCPl/r ktwZ6eKK4d97n6f35aE976+6M13bxZydU2WIVhV714Ok0ove2A4jGBxvPwym3Ncl gLvpbrxTBwcrm3MZuTfuAnkCUoDREc83bDwZ6ImSDoQxk60rhpGJIYTTg/HjxJw2 lHJn/th5eDjy7vVl7x8XKmqyzCSWwz4M9JSbaOiAuZcB/4Z7D1U94sJaGzFzL9Lh 0t4ggzLYJaKyIs6i1Ga9 =KKeI -----END PGP SIGNATURE----- --hgy5D1otryeNPdmY-- From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 15:20:00 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ACF65D4D; Wed, 20 Aug 2014 15:20:00 +0000 (UTC) Received: from mail-we0-x233.google.com (mail-we0-x233.google.com [IPv6:2a00:1450:400c:c03::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EDE8D3B98; Wed, 20 Aug 2014 15:19:59 +0000 (UTC) Received: by mail-we0-f179.google.com with SMTP id u57so8128108wes.10 for ; Wed, 20 Aug 2014 08:19:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=gPI4q+wtz0RHijTSfo6oYsIrPo8rRPGofJxhpUHNDrE=; b=n3T635OJSYSwwr3JMCy2tgPVPca/VVdC3HoutPKKoGsgjVNlOUbeP3ZqwJBfUfBAXV bvGiw9/Bg2HGTkU9YYBm2CBOx0KGmJkSMPO2GXMTu3PJgg//ZJUMyjMPaNVVcOcq1cvZ OdBb7GtUlSghk3LRm83bhWtZVOPcwpEmhqUWGHhPG0enGTdyZz8up4BlpJ7G9QkhwAPW NqpvNu29hAKbZvKZK66WuoaewztcsL51lWhwpStP+muNUTbyPs2AYnLO5Ek+VF0VHM0V ljbDIkG6iWCmuKONYauvsJDLDGV/RZ63nEkJz5XYqpZXXjmBpRiVdiQ1IwahVenUGZbf oduQ== X-Received: by 10.194.203.105 with SMTP id kp9mr61326258wjc.41.1408547997633; Wed, 20 Aug 2014 08:19:57 -0700 (PDT) Received: from [172.16.1.30] (39.Red-2-136-52.dynamicIP.rima-tde.net. [2.136.52.39]) by mx.google.com with ESMTPSA id je3sm10182930wic.11.2014.08.20.08.19.56 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 20 Aug 2014 08:19:56 -0700 (PDT) Sender: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Message-ID: <53F4BC9B.3090405@FreeBSD.org> Date: Wed, 20 Aug 2014 17:19:55 +0200 From: =?ISO-8859-1?Q?Roger_Pau_Monn=E9?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: svn commit: r265003 - head/secure/usr.sbin/sshd References: <201404270528.s3R5SEIm054377@svn.freebsd.org> <53F4B381.5010205@FreeBSD.org> <20140820151310.GB2737@kib.kiev.ua> In-Reply-To: <20140820151310.GB2737@kib.kiev.ua> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 15:20:00 -0000 On 20/08/14 17:13, Konstantin Belousov wrote: > On Wed, Aug 20, 2014 at 04:41:05PM +0200, Roger Pau Monn?? wrote: >> On 27/04/14 07:28, Konstantin Belousov wrote: >>> Author: kib >>> Date: Sun Apr 27 05:28:14 2014 >>> New Revision: 265003 >>> URL: http://svnweb.freebsd.org/changeset/base/265003 >>> >>> Log: >>> Fix order of libthr and libc in the global dso list for sshd, by >>> explicitely linking main binary with -lpthread. Before, libthr >>> appeared in the list due to dependency of one of the kerberos libs. >>> Due to the change in ld(1) behaviour of not copying NEEDED entries >>> from direct dependencies into the link results, the order becomes >>> reversed. >>> >>> The libthr must appear before libc to properly interpose libc symbols >>> and provide working rtld locks implementation. The symptom was sshd >>> hanging on rtld bind lock during nested symbol binding from a signal >>> handler. >>> >>> Approved by: des (openssh maintainer) >>> Sponsored by: The FreeBSD Foundation >>> MFC after: 1 week >>> >>> Modified: >>> head/secure/usr.sbin/sshd/Makefile >>> >>> Modified: head/secure/usr.sbin/sshd/Makefile >>> ============================================================================== >>> --- head/secure/usr.sbin/sshd/Makefile Sun Apr 27 05:19:01 2014 (r265002) >>> +++ head/secure/usr.sbin/sshd/Makefile Sun Apr 27 05:28:14 2014 (r265003) >>> @@ -57,6 +57,16 @@ CFLAGS+= -DNONE_CIPHER_ENABLED >>> DPADD+= ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ} >>> LDADD+= -lcrypt -lcrypto -lz >>> >>> +# Fix the order of NEEDED entries for libthr and libc. The libthr >>> +# needs to interpose libc symbols, leaving the libthr loading as >>> +# dependency of krb causes reversed order and broken interposing. Put >>> +# the threading library last on the linker command line, just before >>> +# the -lc added by a compiler driver. >>> +.if ${MK_KERBEROS_SUPPORT} != "no" >>> +DPADD+= ${LIBPTHREAD} >>> +LDADD+= -lpthread >>> +.endif >>> + >>> .if defined(LOCALBASE) >>> CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE}/bin/xauth\" >>> .endif >> >> Hello, >> >> This change makes the following simple test program fail on the second >> assert. The problem is that sa_handler == SIG_DFL, and sa_flags == >> SA_SIGINFO, which according to the sigaction(9) man page is not >> possible. With this change reverted the test is successful. > I do not quite follow. > > What are the relations between sshd and your test program ? > Should the test be run somehow specially ? No, and frankly that's what I don't understand. I compile this simple test with `cc -o test test.c`. It fails with this commit applied, and succeeds without it. Roger. From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 15:28:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 174C41AB for ; Wed, 20 Aug 2014 15:28:56 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8DE13C93 for ; Wed, 20 Aug 2014 15:28:55 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KFStGT051391 for ; Wed, 20 Aug 2014 15:28:55 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id s7KFStYr051386 for svn-src-all@freebsd.org; Wed, 20 Aug 2014 15:28:55 GMT (envelope-from bdrewery) Received: (qmail 3273 invoked from network); 20 Aug 2014 10:28:53 -0500 Received: from unknown (HELO ?10.10.0.24?) (freebsd@shatow.net@10.10.0.24) by sweb.xzibition.com with ESMTPA; 20 Aug 2014 10:28:53 -0500 Message-ID: <53F4BEB1.6070000@FreeBSD.org> Date: Wed, 20 Aug 2014 10:28:49 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: =?windows-1252?Q?Roger_Pau_Monn=E9?= , Konstantin Belousov Subject: Re: svn commit: r265003 - head/secure/usr.sbin/sshd References: <201404270528.s3R5SEIm054377@svn.freebsd.org> <53F4B381.5010205@FreeBSD.org> <20140820151310.GB2737@kib.kiev.ua> <53F4BC9B.3090405@FreeBSD.org> In-Reply-To: <53F4BC9B.3090405@FreeBSD.org> OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="V5PmQs8sINARv3nlhRmJccjCeIVW9a5DX" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 15:28:56 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --V5PmQs8sINARv3nlhRmJccjCeIVW9a5DX Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 8/20/2014 10:19 AM, Roger Pau Monn=E9 wrote: > On 20/08/14 17:13, Konstantin Belousov wrote: >> On Wed, Aug 20, 2014 at 04:41:05PM +0200, Roger Pau Monn?? wrote: >>> On 27/04/14 07:28, Konstantin Belousov wrote: >>>> Author: kib >>>> Date: Sun Apr 27 05:28:14 2014 >>>> New Revision: 265003 >>>> URL: http://svnweb.freebsd.org/changeset/base/265003 >>>> >>>> Log: >>>> Fix order of libthr and libc in the global dso list for sshd, by >>>> explicitely linking main binary with -lpthread. Before, libthr >>>> appeared in the list due to dependency of one of the kerberos libs= =2E >>>> Due to the change in ld(1) behaviour of not copying NEEDED entries= >>>> from direct dependencies into the link results, the order becomes >>>> reversed. >>>> =20 >>>> The libthr must appear before libc to properly interpose libc symb= ols >>>> and provide working rtld locks implementation. The symptom was ss= hd >>>> hanging on rtld bind lock during nested symbol binding from a sign= al >>>> handler. >>>> =20 >>>> Approved by: des (openssh maintainer) >>>> Sponsored by: The FreeBSD Foundation >>>> MFC after: 1 week >>>> >>>> Modified: >>>> head/secure/usr.sbin/sshd/Makefile >>>> >>>> Modified: head/secure/usr.sbin/sshd/Makefile >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>>> --- head/secure/usr.sbin/sshd/Makefile Sun Apr 27 05:19:01 2014 (r26= 5002) >>>> +++ head/secure/usr.sbin/sshd/Makefile Sun Apr 27 05:28:14 2014 (r26= 5003) >>>> @@ -57,6 +57,16 @@ CFLAGS+=3D -DNONE_CIPHER_ENABLED >>>> DPADD+=3D ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ} >>>> LDADD+=3D -lcrypt -lcrypto -lz >>>> =20 >>>> +# Fix the order of NEEDED entries for libthr and libc. The libthr >>>> +# needs to interpose libc symbols, leaving the libthr loading as >>>> +# dependency of krb causes reversed order and broken interposing. P= ut >>>> +# the threading library last on the linker command line, just befor= e >>>> +# the -lc added by a compiler driver. >>>> +.if ${MK_KERBEROS_SUPPORT} !=3D "no" >>>> +DPADD+=3D ${LIBPTHREAD} >>>> +LDADD+=3D -lpthread >>>> +.endif >>>> + >>>> .if defined(LOCALBASE) >>>> CFLAGS+=3D -DXAUTH_PATH=3D\"${LOCALBASE}/bin/xauth\" >>>> .endif >>> >>> Hello, >>> >>> This change makes the following simple test program fail on the secon= d=20 >>> assert. The problem is that sa_handler =3D=3D SIG_DFL, and sa_flags =3D= =3D=20 >>> SA_SIGINFO, which according to the sigaction(9) man page is not=20 >>> possible. With this change reverted the test is successful. >> I do not quite follow. >> >> What are the relations between sshd and your test program ? >> Should the test be run somehow specially ? >=20 > No, and frankly that's what I don't understand. I compile this simple > test with `cc -o test test.c`. It fails with this commit applied, and > succeeds without it. >=20 > Roger. >=20 Does it fail if you do not connect with ssh? --=20 Regards, Bryan Drewery --V5PmQs8sINARv3nlhRmJccjCeIVW9a5DX Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) iQEcBAEBAgAGBQJT9L6yAAoJEDXXcbtuRpfPG4oH/0h8fOidMsPLrwCBZTnuHwwW kFcDkUJXc9LbIXIMD9IUhocfPDzO0aBXgeWHFiBDy97Ilizk0sfHjYNXHTdJD3tV eFtAOJTmyJOkYe1w1/e2/mxPQZyGJc8oPluH3c/BRf2sEn6rE/U28TeEKao+AMHt v9vdt0HyKyjrbRGEXBwqZlUM6faSsvnB4lf4polAbZt2t2Y3r/yhiTcE01pYXDxn DkLGq3wPSzY+7MFR80plBIs3KQKpaBDLkSuK6r1UuFawumRnIaSIvAjiSRQBLM85 nVZVj3gvlQux1V77gC8v9IfJLH50rHd+T6J2PESVbh6MMH0tnn7m7a+LAduyQ5Q= =5rg9 -----END PGP SIGNATURE----- --V5PmQs8sINARv3nlhRmJccjCeIVW9a5DX-- From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 15:35:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 50DCD49E; Wed, 20 Aug 2014 15:35:03 +0000 (UTC) Received: from mail-wi0-x229.google.com (mail-wi0-x229.google.com [IPv6:2a00:1450:400c:c05::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6BE473D82; Wed, 20 Aug 2014 15:35:02 +0000 (UTC) Received: by mail-wi0-f169.google.com with SMTP id n3so6887099wiv.0 for ; Wed, 20 Aug 2014 08:35:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=jfQibsJhSg4uGNyaYCuwM8Qw81X8c6UFmgYNk3w+Ayo=; b=bpA49jW9VbRdZLt0J1TvF2iIfNbIoVCaMAtigOdzZ9YoMYa43CVdouef/zz//e3aFH 4cBFTghIe1/P+6KLC/u5rzOgAsHIn9k5M0MTPmVWdcYGwzJyRXCi+Q8cnFbgAgXE3g9x ksyc3DC9x91aB5vTfo/4Q0cU4FK6T1Jfw70wU2/YB/9sU0tmZfZbin076dHvf7fbp8TW 8YV8i15vPEMpcTQ4CUMHHUTP9I8FU1yjzqSaj9QI1nqXMo5bA5TEdbcP1O+Qcw0KzHrA Y0do3dpdQnVfCWWos4FqQnSUS+kmcg/Yfzqjr4/canae0DbunWBhDurIUSAmtD0mlplS 8pug== X-Received: by 10.180.73.109 with SMTP id k13mr15744073wiv.11.1408548900614; Wed, 20 Aug 2014 08:35:00 -0700 (PDT) Received: from [172.16.1.30] (39.Red-2-136-52.dynamicIP.rima-tde.net. [2.136.52.39]) by mx.google.com with ESMTPSA id kw1sm59397401wjb.19.2014.08.20.08.34.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 20 Aug 2014 08:34:59 -0700 (PDT) Sender: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Message-ID: <53F4C022.5050804@FreeBSD.org> Date: Wed, 20 Aug 2014 17:34:58 +0200 From: =?windows-1252?Q?Roger_Pau_Monn=E9?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Bryan Drewery , Konstantin Belousov Subject: Re: svn commit: r265003 - head/secure/usr.sbin/sshd References: <201404270528.s3R5SEIm054377@svn.freebsd.org> <53F4B381.5010205@FreeBSD.org> <20140820151310.GB2737@kib.kiev.ua> <53F4BC9B.3090405@FreeBSD.org> <53F4BEB1.6070000@FreeBSD.org> In-Reply-To: <53F4BEB1.6070000@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 15:35:03 -0000 On 20/08/14 17:28, Bryan Drewery wrote: > On 8/20/2014 10:19 AM, Roger Pau Monné wrote: >> On 20/08/14 17:13, Konstantin Belousov wrote: >>> On Wed, Aug 20, 2014 at 04:41:05PM +0200, Roger Pau Monn?? wrote: >>>> On 27/04/14 07:28, Konstantin Belousov wrote: >>>>> Author: kib >>>>> Date: Sun Apr 27 05:28:14 2014 >>>>> New Revision: 265003 >>>>> URL: http://svnweb.freebsd.org/changeset/base/265003 >>>>> >>>>> Log: >>>>> Fix order of libthr and libc in the global dso list for sshd, by >>>>> explicitely linking main binary with -lpthread. Before, libthr >>>>> appeared in the list due to dependency of one of the kerberos libs. >>>>> Due to the change in ld(1) behaviour of not copying NEEDED entries >>>>> from direct dependencies into the link results, the order becomes >>>>> reversed. >>>>> >>>>> The libthr must appear before libc to properly interpose libc symbols >>>>> and provide working rtld locks implementation. The symptom was sshd >>>>> hanging on rtld bind lock during nested symbol binding from a signal >>>>> handler. >>>>> >>>>> Approved by: des (openssh maintainer) >>>>> Sponsored by: The FreeBSD Foundation >>>>> MFC after: 1 week >>>>> >>>>> Modified: >>>>> head/secure/usr.sbin/sshd/Makefile >>>>> >>>>> Modified: head/secure/usr.sbin/sshd/Makefile >>>>> ============================================================================== >>>>> --- head/secure/usr.sbin/sshd/Makefile Sun Apr 27 05:19:01 2014 (r265002) >>>>> +++ head/secure/usr.sbin/sshd/Makefile Sun Apr 27 05:28:14 2014 (r265003) >>>>> @@ -57,6 +57,16 @@ CFLAGS+= -DNONE_CIPHER_ENABLED >>>>> DPADD+= ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ} >>>>> LDADD+= -lcrypt -lcrypto -lz >>>>> >>>>> +# Fix the order of NEEDED entries for libthr and libc. The libthr >>>>> +# needs to interpose libc symbols, leaving the libthr loading as >>>>> +# dependency of krb causes reversed order and broken interposing. Put >>>>> +# the threading library last on the linker command line, just before >>>>> +# the -lc added by a compiler driver. >>>>> +.if ${MK_KERBEROS_SUPPORT} != "no" >>>>> +DPADD+= ${LIBPTHREAD} >>>>> +LDADD+= -lpthread >>>>> +.endif >>>>> + >>>>> .if defined(LOCALBASE) >>>>> CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE}/bin/xauth\" >>>>> .endif >>>> >>>> Hello, >>>> >>>> This change makes the following simple test program fail on the second >>>> assert. The problem is that sa_handler == SIG_DFL, and sa_flags == >>>> SA_SIGINFO, which according to the sigaction(9) man page is not >>>> possible. With this change reverted the test is successful. >>> I do not quite follow. >>> >>> What are the relations between sshd and your test program ? >>> Should the test be run somehow specially ? >> >> No, and frankly that's what I don't understand. I compile this simple >> test with `cc -o test test.c`. It fails with this commit applied, and >> succeeds without it. >> >> Roger. >> > > Does it fail if you do not connect with ssh? Right, it works fine from the serial console, fails when executed from ssh. Roger. From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 15:43:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71C2A831; Wed, 20 Aug 2014 15:43:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E1B13EB4; Wed, 20 Aug 2014 15:43:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KFhR36069358; Wed, 20 Aug 2014 15:43:27 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KFhRpM069357; Wed, 20 Aug 2014 15:43:27 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201408201543.s7KFhRpM069357@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 20 Aug 2014 15:43:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270216 - head/gnu/lib/libgcc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 15:43:27 -0000 Author: ngie Date: Wed Aug 20 15:43:26 2014 New Revision: 270216 URL: http://svnweb.freebsd.org/changeset/base/270216 Log: Add ${LIBC} to DPADD to fix "make checkdpadd" Phabric: D632 Approved by: jmmv (mentor) MFC after: 2 weeks Modified: head/gnu/lib/libgcc/Makefile Modified: head/gnu/lib/libgcc/Makefile ============================================================================== --- head/gnu/lib/libgcc/Makefile Wed Aug 20 14:58:25 2014 (r270215) +++ head/gnu/lib/libgcc/Makefile Wed Aug 20 15:43:26 2014 (r270216) @@ -28,6 +28,7 @@ CFLAGS+= -DIN_GCC -DIN_LIBGCC2 -D__GCC_F -I${.CURDIR}/../../usr.bin/cc/cc_tools LDFLAGS+= -nodefaultlibs +DPADD+= ${LIBC} LDADD+= -lc OBJS= # added to below in various ways depending on TARGET_CPUARCH From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 16:04:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A559FE76; Wed, 20 Aug 2014 16:04:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 858783172; Wed, 20 Aug 2014 16:04:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KG4Uih079577; Wed, 20 Aug 2014 16:04:30 GMT (envelope-from davide@FreeBSD.org) Received: (from davide@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KG4UsA079576; Wed, 20 Aug 2014 16:04:30 GMT (envelope-from davide@FreeBSD.org) Message-Id: <201408201604.s7KG4UsA079576@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: davide set sender to davide@FreeBSD.org using -f From: Davide Italiano Date: Wed, 20 Aug 2014 16:04:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270221 - head/sys/security/audit X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 16:04:30 -0000 Author: davide Date: Wed Aug 20 16:04:30 2014 New Revision: 270221 URL: http://svnweb.freebsd.org/changeset/base/270221 Log: Replace dev_clone with cdevpriv(9) KPI in audit_pipe code. This is (yet another) step towards the removal of device cloning from our kernel. CR: https://reviews.freebsd.org/D441 Reviewed by: kib, rwatson Tested by: pho Modified: head/sys/security/audit/audit_pipe.c Modified: head/sys/security/audit/audit_pipe.c ============================================================================== --- head/sys/security/audit/audit_pipe.c Wed Aug 20 15:57:52 2014 (r270220) +++ head/sys/security/audit/audit_pipe.c Wed Aug 20 16:04:30 2014 (r270221) @@ -112,7 +112,6 @@ struct audit_pipe_preselect { #define AUDIT_PIPE_ASYNC 0x00000001 #define AUDIT_PIPE_NBIO 0x00000002 struct audit_pipe { - int ap_open; /* Device open? */ u_int ap_flags; struct selinfo ap_selinfo; @@ -205,6 +204,7 @@ static struct rwlock audit_pipe_lock; #define AUDIT_PIPE_LIST_LOCK_INIT() rw_init(&audit_pipe_lock, \ "audit_pipe_list_lock") +#define AUDIT_PIPE_LIST_LOCK_DESTROY() rw_destroy(&audit_pipe_lock) #define AUDIT_PIPE_LIST_RLOCK() rw_rlock(&audit_pipe_lock) #define AUDIT_PIPE_LIST_RUNLOCK() rw_runlock(&audit_pipe_lock) #define AUDIT_PIPE_LIST_WLOCK() rw_wlock(&audit_pipe_lock) @@ -213,11 +213,11 @@ static struct rwlock audit_pipe_lock; #define AUDIT_PIPE_LIST_WUNLOCK() rw_wunlock(&audit_pipe_lock) /* - * Cloning related variables and constants. + * Audit pipe device. */ -#define AUDIT_PIPE_NAME "auditpipe" -static eventhandler_tag audit_pipe_eh_tag; -static struct clonedevs *audit_pipe_clones; +static struct cdev *audit_pipe_dev; + +#define AUDIT_PIPE_NAME "auditpipe" /* * Special device methods and definition. @@ -231,7 +231,6 @@ static d_kqfilter_t audit_pipe_kqfilter; static struct cdevsw audit_pipe_cdevsw = { .d_version = D_VERSION, - .d_flags = D_NEEDMINOR, .d_open = audit_pipe_open, .d_close = audit_pipe_close, .d_read = audit_pipe_read, @@ -572,8 +571,6 @@ audit_pipe_alloc(void) { struct audit_pipe *ap; - AUDIT_PIPE_LIST_WLOCK_ASSERT(); - ap = malloc(sizeof(*ap), M_AUDIT_PIPE, M_NOWAIT | M_ZERO); if (ap == NULL) return (NULL); @@ -599,9 +596,11 @@ audit_pipe_alloc(void) /* * Add to global list and update global statistics. */ + AUDIT_PIPE_LIST_WLOCK(); TAILQ_INSERT_HEAD(&audit_pipe_list, ap, ap_list); audit_pipe_count++; audit_pipe_ever++; + AUDIT_PIPE_LIST_WUNLOCK(); return (ap); } @@ -653,28 +652,16 @@ audit_pipe_free(struct audit_pipe *ap) audit_pipe_count--; } -/* - * Audit pipe clone routine -- provide specific requested audit pipe, or a - * fresh one if a specific one is not requested. - */ static void -audit_pipe_clone(void *arg, struct ucred *cred, char *name, int namelen, - struct cdev **dev) +audit_pipe_dtor(void *arg) { - int i, u; - - if (*dev != NULL) - return; - - if (strcmp(name, AUDIT_PIPE_NAME) == 0) - u = -1; - else if (dev_stdclone(name, NULL, AUDIT_PIPE_NAME, &u) != 1) - return; + struct audit_pipe *ap; - i = clone_create(&audit_pipe_clones, &audit_pipe_cdevsw, &u, dev, 0); - if (i) - *dev = make_dev_credf(MAKEDEV_REF, &audit_pipe_cdevsw, u, cred, - UID_ROOT, GID_WHEEL, 0600, "%s%d", AUDIT_PIPE_NAME, u); + ap = arg; + AUDIT_PIPE_LIST_WLOCK(); + AUDIT_PIPE_LOCK(ap); + audit_pipe_free(ap); + AUDIT_PIPE_LIST_WUNLOCK(); } /* @@ -686,24 +673,19 @@ static int audit_pipe_open(struct cdev *dev, int oflags, int devtype, struct thread *td) { struct audit_pipe *ap; + int error; - AUDIT_PIPE_LIST_WLOCK(); - ap = dev->si_drv1; + ap = audit_pipe_alloc(); if (ap == NULL) { - ap = audit_pipe_alloc(); - if (ap == NULL) { - AUDIT_PIPE_LIST_WUNLOCK(); - return (ENOMEM); - } - dev->si_drv1 = ap; - } else { - KASSERT(ap->ap_open, ("audit_pipe_open: ap && !ap_open")); - AUDIT_PIPE_LIST_WUNLOCK(); - return (EBUSY); + return (ENOMEM); } - ap->ap_open = 1; /* No lock required yet. */ - AUDIT_PIPE_LIST_WUNLOCK(); fsetown(td->td_proc->p_pid, &ap->ap_sigio); + error = devfs_set_cdevpriv(ap, audit_pipe_dtor); + if (error != 0) { + AUDIT_PIPE_LIST_WLOCK(); + audit_pipe_free(ap); + AUDIT_PIPE_LIST_WUNLOCK(); + } return (0); } @@ -714,18 +696,12 @@ static int audit_pipe_close(struct cdev *dev, int fflag, int devtype, struct thread *td) { struct audit_pipe *ap; + int error; - ap = dev->si_drv1; - KASSERT(ap != NULL, ("audit_pipe_close: ap == NULL")); - KASSERT(ap->ap_open, ("audit_pipe_close: !ap_open")); - + error = devfs_get_cdevpriv((void **)&ap); + if (error != 0) + return (error); funsetown(&ap->ap_sigio); - AUDIT_PIPE_LIST_WLOCK(); - AUDIT_PIPE_LOCK(ap); - ap->ap_open = 0; - audit_pipe_free(ap); - dev->si_drv1 = NULL; - AUDIT_PIPE_LIST_WUNLOCK(); return (0); } @@ -743,8 +719,9 @@ audit_pipe_ioctl(struct cdev *dev, u_lon int error, mode; au_id_t auid; - ap = dev->si_drv1; - KASSERT(ap != NULL, ("audit_pipe_ioctl: ap == NULL")); + error = devfs_get_cdevpriv((void **)&ap); + if (error != 0) + return (error); /* * Audit pipe ioctls: first come standard device node ioctls, then @@ -948,8 +925,9 @@ audit_pipe_read(struct cdev *dev, struct u_int toread; int error; - ap = dev->si_drv1; - KASSERT(ap != NULL, ("audit_pipe_read: ap == NULL")); + error = devfs_get_cdevpriv((void **)&ap); + if (error != 0) + return (error); /* * We hold an sx(9) lock over read and flush because we rely on the @@ -1026,12 +1004,12 @@ static int audit_pipe_poll(struct cdev *dev, int events, struct thread *td) { struct audit_pipe *ap; - int revents; + int error, revents; revents = 0; - ap = dev->si_drv1; - KASSERT(ap != NULL, ("audit_pipe_poll: ap == NULL")); - + error = devfs_get_cdevpriv((void **)&ap); + if (error != 0) + return (error); if (events & (POLLIN | POLLRDNORM)) { AUDIT_PIPE_LOCK(ap); if (TAILQ_FIRST(&ap->ap_queue) != NULL) @@ -1050,10 +1028,11 @@ static int audit_pipe_kqfilter(struct cdev *dev, struct knote *kn) { struct audit_pipe *ap; + int error; - ap = dev->si_drv1; - KASSERT(ap != NULL, ("audit_pipe_kqfilter: ap == NULL")); - + error = devfs_get_cdevpriv((void **)&ap); + if (error != 0) + return (error); if (kn->kn_filter != EVFILT_READ) return (EINVAL); @@ -1075,7 +1054,6 @@ audit_pipe_kqread(struct knote *kn, long struct audit_pipe *ap; ap = (struct audit_pipe *)kn->kn_hook; - KASSERT(ap != NULL, ("audit_pipe_kqread: ap == NULL")); AUDIT_PIPE_LOCK_ASSERT(ap); if (ap->ap_qlen != 0) { @@ -1096,8 +1074,6 @@ audit_pipe_kqdetach(struct knote *kn) struct audit_pipe *ap; ap = (struct audit_pipe *)kn->kn_hook; - KASSERT(ap != NULL, ("audit_pipe_kqdetach: ap == NULL")); - AUDIT_PIPE_LOCK(ap); knlist_remove(&ap->ap_selinfo.si_note, kn, 1); AUDIT_PIPE_UNLOCK(ap); @@ -1112,12 +1088,12 @@ audit_pipe_init(void *unused) TAILQ_INIT(&audit_pipe_list); AUDIT_PIPE_LIST_LOCK_INIT(); - - clone_setup(&audit_pipe_clones); - audit_pipe_eh_tag = EVENTHANDLER_REGISTER(dev_clone, - audit_pipe_clone, 0, 1000); - if (audit_pipe_eh_tag == NULL) - panic("audit_pipe_init: EVENTHANDLER_REGISTER"); + audit_pipe_dev = make_dev(&audit_pipe_cdevsw, 0, UID_ROOT, + GID_WHEEL, 0600, "%s", AUDIT_PIPE_NAME); + if (audit_pipe_dev == NULL) { + AUDIT_PIPE_LIST_LOCK_DESTROY(); + panic("Can't initialize audit pipe subsystem"); + } } SYSINIT(audit_pipe_init, SI_SUB_DRIVERS, SI_ORDER_MIDDLE, audit_pipe_init, From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 16:05:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 787E5175; Wed, 20 Aug 2014 16:05:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 64D0C31D6; Wed, 20 Aug 2014 16:05:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KG5GTl079869; Wed, 20 Aug 2014 16:05:16 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KG5G9X079868; Wed, 20 Aug 2014 16:05:16 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201408201605.s7KG5G9X079868@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 20 Aug 2014 16:05:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270222 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 16:05:16 -0000 Author: jhb Date: Wed Aug 20 16:05:15 2014 New Revision: 270222 URL: http://svnweb.freebsd.org/changeset/base/270222 Log: Bump the default size of cpuset_t masks in userland from 128 bits to 256. This should not be an ABI change since the various public APIs that use cpusets all include an explicit size parameter in addition to the cpuset parameter. MFC after: 1 week Modified: head/sys/sys/_cpuset.h Modified: head/sys/sys/_cpuset.h ============================================================================== --- head/sys/sys/_cpuset.h Wed Aug 20 16:04:30 2014 (r270221) +++ head/sys/sys/_cpuset.h Wed Aug 20 16:05:15 2014 (r270222) @@ -38,7 +38,7 @@ #define CPU_SETSIZE MAXCPU #endif -#define CPU_MAXSIZE 128 +#define CPU_MAXSIZE 256 #ifndef CPU_SETSIZE #define CPU_SETSIZE CPU_MAXSIZE From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 16:06:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EFD9B2C5; Wed, 20 Aug 2014 16:06:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC55331E9; Wed, 20 Aug 2014 16:06:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KG6OB3080087; Wed, 20 Aug 2014 16:06:24 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KG6One080086; Wed, 20 Aug 2014 16:06:24 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201408201606.s7KG6One080086@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 20 Aug 2014 16:06:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270223 - head/sys/amd64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 16:06:25 -0000 Author: jhb Date: Wed Aug 20 16:06:24 2014 New Revision: 270223 URL: http://svnweb.freebsd.org/changeset/base/270223 Log: Bump MAXCPU on amd64 from 64 to 256. In practice APIC only permits 255 CPUs (IDs 0 through 254). Getting above that limit requires x2APIC. MFC after: 1 month Modified: head/sys/amd64/include/param.h Modified: head/sys/amd64/include/param.h ============================================================================== --- head/sys/amd64/include/param.h Wed Aug 20 16:05:15 2014 (r270222) +++ head/sys/amd64/include/param.h Wed Aug 20 16:06:24 2014 (r270223) @@ -65,7 +65,7 @@ #if defined(SMP) || defined(KLD_MODULE) #ifndef MAXCPU -#define MAXCPU 64 +#define MAXCPU 256 #endif #else #define MAXCPU 1 From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 16:07:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D6944426; Wed, 20 Aug 2014 16:07:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8ACB3205; Wed, 20 Aug 2014 16:07:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KG7IVS080251; Wed, 20 Aug 2014 16:07:18 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KG7IEq080248; Wed, 20 Aug 2014 16:07:18 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201408201607.s7KG7IEq080248@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 20 Aug 2014 16:07:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270224 - in head/sys: amd64/conf dev/si i386/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 16:07:18 -0000 Author: jhb Date: Wed Aug 20 16:07:17 2014 New Revision: 270224 URL: http://svnweb.freebsd.org/changeset/base/270224 Log: Fix build of si(4) and enable it in LINT on amd64 and i386. Modified: head/sys/amd64/conf/NOTES head/sys/dev/si/si.c head/sys/i386/conf/NOTES Modified: head/sys/amd64/conf/NOTES ============================================================================== --- head/sys/amd64/conf/NOTES Wed Aug 20 16:06:24 2014 (r270223) +++ head/sys/amd64/conf/NOTES Wed Aug 20 16:07:17 2014 (r270224) @@ -521,7 +521,7 @@ hint.pbio.0.port="0x360" device smbios device vpd device asmc -#device si +device si device tpm device padlock_rng # VIA Padlock RNG device rdrand_rng # Intel Bull Mountain RNG Modified: head/sys/dev/si/si.c ============================================================================== --- head/sys/dev/si/si.c Wed Aug 20 16:06:24 2014 (r270223) +++ head/sys/dev/si/si.c Wed Aug 20 16:07:17 2014 (r270224) @@ -36,9 +36,9 @@ __FBSDID("$FreeBSD$"); #ifndef lint -static const char si_copyright1[] = "@(#) Copyright (C) Specialix International, 1990,1992,1998", - si_copyright2[] = "@(#) Copyright (C) Andy Rutter 1993", - si_copyright3[] = "@(#) Copyright (C) Peter Wemm 2000"; +__IDSTRING(si_copyright1, "@(#) Copyright (C) Specialix International, 1990,1992,1998"); +__IDSTRING(si_copyright2, "@(#) Copyright (C) Andy Rutter 1993"); +__IDSTRING(si_copyright3, "@(#) Copyright (C) Peter Wemm 2000"); #endif /* not lint */ #include "opt_compat.h" Modified: head/sys/i386/conf/NOTES ============================================================================== --- head/sys/i386/conf/NOTES Wed Aug 20 16:06:24 2014 (r270223) +++ head/sys/i386/conf/NOTES Wed Aug 20 16:07:17 2014 (r270224) @@ -871,7 +871,7 @@ device spic hint.spic.0.at="isa" hint.spic.0.port="0x10a0" device asmc -#device si +device si device tpm device padlock_rng # VIA Padlock RNG device rdrand_rng # Intel Bull Mountain RNG From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 16:07:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9FA845F3; Wed, 20 Aug 2014 16:07:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8BAF93218; Wed, 20 Aug 2014 16:07:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KG7uEB080395; Wed, 20 Aug 2014 16:07:56 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KG7u3i080394; Wed, 20 Aug 2014 16:07:56 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201408201607.s7KG7u3i080394@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 20 Aug 2014 16:07:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270225 - head/sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 16:07:56 -0000 Author: jhb Date: Wed Aug 20 16:07:56 2014 New Revision: 270225 URL: http://svnweb.freebsd.org/changeset/base/270225 Log: Unexpand TAILQ_FOREACH(). Modified: head/sys/cam/scsi/scsi_low.c Modified: head/sys/cam/scsi/scsi_low.c ============================================================================== --- head/sys/cam/scsi/scsi_low.c Wed Aug 20 16:07:17 2014 (r270224) +++ head/sys/cam/scsi/scsi_low.c Wed Aug 20 16:07:56 2014 (r270225) @@ -326,15 +326,13 @@ scsi_low_find_ccb(slp, target, lun, osde if ((cb = slp->sl_Qnexus) != NULL && cb->osdep == osdep) return cb; - for (cb = TAILQ_FIRST(&slp->sl_start); cb != NULL; - cb = TAILQ_NEXT(cb, ccb_chain)) + TAILQ_FOREACH(cb, &slp->sl_start, ccb_chain) { if (cb->osdep == osdep) return cb; } - for (cb = TAILQ_FIRST(&li->li_discq); cb != NULL; - cb = TAILQ_NEXT(cb, ccb_chain)) + TAILQ_FOREACH(cb, &li->li_discq, ccb_chain) { if (cb->osdep == osdep) return cb; @@ -4184,8 +4182,7 @@ scsi_low_info(slp, ti, s) printf(">>>>> SCSI_LOW_INFO(0x%lx): %s\n", (u_long) slp->sl_Tnexus, s); if (ti == NULL) { - for (ti = TAILQ_FIRST(&slp->sl_titab); ti != NULL; - ti = TAILQ_NEXT(ti, ti_chain)) + TAILQ_FOREACH(ti, &slp->sl_titab, ti_chain) { scsi_low_print(slp, ti); } From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 16:09:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2CCD974C; Wed, 20 Aug 2014 16:09:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D4163224; Wed, 20 Aug 2014 16:09:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KG96BM080679; Wed, 20 Aug 2014 16:09:06 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KG96U3080675; Wed, 20 Aug 2014 16:09:06 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201408201609.s7KG96U3080675@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 20 Aug 2014 16:09:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270226 - in head/sys/modules: . si wds wl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 16:09:07 -0000 Author: jhb Date: Wed Aug 20 16:09:05 2014 New Revision: 270226 URL: http://svnweb.freebsd.org/changeset/base/270226 Log: Add kernel modules for si(4), wds(4), and wl(4). Added: head/sys/modules/si/ head/sys/modules/si/Makefile (contents, props changed) head/sys/modules/wds/ head/sys/modules/wds/Makefile (contents, props changed) head/sys/modules/wl/ head/sys/modules/wl/Makefile (contents, props changed) Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Wed Aug 20 16:07:56 2014 (r270225) +++ head/sys/modules/Makefile Wed Aug 20 16:09:05 2014 (r270226) @@ -310,6 +310,7 @@ SUBDIR= \ ${_sf} \ ${_sfxge} \ sge \ + ${_si} \ siba_bwn \ siftr \ siis \ @@ -364,7 +365,9 @@ SUBDIR= \ ${_vxge} \ wb \ ${_wbwd} \ + ${_wds} \ ${_wi} \ + ${_wl} \ wlan \ wlan_acl \ wlan_amrr \ @@ -547,6 +550,7 @@ _rdma= rdma _safe= safe _sbni= sbni _scsi_low= scsi_low +_si= si _smbfs= smbfs _sound= sound _speaker= speaker @@ -557,6 +561,7 @@ _streams= streams _svr4= svr4 _vxge= vxge _wbwd= wbwd +_wds= wds _wi= wi _xe= xe .if ${MK_ZFS} != "no" || defined(ALL_MODULES) @@ -625,6 +630,7 @@ _nvram= nvram _nxge= nxge _tpm= tpm _viawd= viawd +_wl= wl _wpi= wpi .if ${MK_SOURCELESS_UCODE} != "no" _wpifw= wpifw @@ -757,6 +763,7 @@ _s3= s3 _safe= safe _scsi_low= scsi_low _sfxge= sfxge +_si= si _smbfs= smbfs _sound= sound _speaker= speaker Added: head/sys/modules/si/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/si/Makefile Wed Aug 20 16:09:05 2014 (r270226) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../dev/si + +KMOD= si +SRCS= si.c si2_z280.c si3_t225.c si_eisa.c si_isa.c si_pci.c +SRCS+= bus_if.h device_if.h eisa_if.h isa_if.h pci_if.h +SRCS+= opt_compat.h opt_debug_si.h opt_eisa.h + +.include Added: head/sys/modules/wds/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/wds/Makefile Wed Aug 20 16:09:05 2014 (r270226) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../dev/wds + +KMOD= wds +SRCS= wd7000.c +SRCS+= bus_if.h device_if.h isa_if.h +SRCS+= opt_cam.h + +.include Added: head/sys/modules/wl/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/wl/Makefile Wed Aug 20 16:09:05 2014 (r270226) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../dev/wl + +KMOD= if_wl +SRCS= if_wl.c +SRCS+= bus_if.h device_if.h isa_if.h +SRCS+= opt_inet.h opt_wavelan.h + +.include From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 16:32:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ACBB471B; Wed, 20 Aug 2014 16:32:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98BF43551; Wed, 20 Aug 2014 16:32:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KGW2Kr093637; Wed, 20 Aug 2014 16:32:02 GMT (envelope-from davide@FreeBSD.org) Received: (from davide@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KGW2vF093636; Wed, 20 Aug 2014 16:32:02 GMT (envelope-from davide@FreeBSD.org) Message-Id: <201408201632.s7KGW2vF093636@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: davide set sender to davide@FreeBSD.org using -f From: Davide Italiano Date: Wed, 20 Aug 2014 16:32:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270227 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 16:32:02 -0000 Author: davide Date: Wed Aug 20 16:32:02 2014 New Revision: 270227 URL: http://svnweb.freebsd.org/changeset/base/270227 Log: Make Bruce happy removing the "LL abomination" from time.h It's not necessary in all the three instances because they already have the correct type on all the supported arches. Requested by: bde Modified: head/sys/sys/time.h Modified: head/sys/sys/time.h ============================================================================== --- head/sys/sys/time.h Wed Aug 20 16:09:05 2014 (r270226) +++ head/sys/sys/time.h Wed Aug 20 16:32:02 2014 (r270227) @@ -129,7 +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 0x7fffffffffffffffLL +#define SBT_MAX 0x7fffffffffffffff static __inline int sbintime_getsec(sbintime_t _sbt) @@ -184,7 +184,7 @@ timespec2bintime(const struct timespec * _bt->sec = _ts->tv_sec; /* 18446744073 = int(2^64 / 1000000000) */ - _bt->frac = _ts->tv_nsec * (uint64_t)18446744073LL; + _bt->frac = _ts->tv_nsec * (uint64_t)18446744073; } static __inline void @@ -201,7 +201,7 @@ timeval2bintime(const struct timeval *_t _bt->sec = _tv->tv_sec; /* 18446744073709 = int(2^64 / 1000000) */ - _bt->frac = _tv->tv_usec * (uint64_t)18446744073709LL; + _bt->frac = _tv->tv_usec * (uint64_t)18446744073709; } static __inline struct timespec From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 16:59:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6229519E; Wed, 20 Aug 2014 16:59:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 424223798; Wed, 20 Aug 2014 16:59:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KGxY9g004279; Wed, 20 Aug 2014 16:59:34 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KGxY0T004278; Wed, 20 Aug 2014 16:59:34 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201408201659.s7KGxY0T004278@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 20 Aug 2014 16:59:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270228 - head/tests/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 16:59:34 -0000 Author: asomers Date: Wed Aug 20 16:59:33 2014 New Revision: 270228 URL: http://svnweb.freebsd.org/changeset/base/270228 Log: Numerous small fixes, mostly suggested by Coverity. tests/sys/kern/unix_seqpacket_test.c * Remove a duplicate error check in mk_pair_of_sockets * Always close sockets in the success path of ATF test cases. Don't bother with the error paths, because those are mostly assertions anyway. Most of these socket leaks were reported by Coverity. All of them are harmless, because each ATF test case runs in its own process. * Fix the len argument to send in shutdown_send and shutdown_send_sigpipe. The old version was using sizeof a pointer instead of sizeof the char array. Reported by Coverity. * Change a few ATF_CHECK to ATF_REQUIRE if the test can't reasonably continue past a failure. Reported by: Coverity Scan CID: 1229995, 1229991, 1229988, 1229994, 1229989, 1229992 CID: 1229993, 1229990, 1229984, 1229967, 1230005, 1229977 CID: 1229966, 1230004, 1229976 MFC after: 1 week Sponsored by: Spectra Logic Modified: head/tests/sys/kern/unix_seqpacket_test.c Modified: head/tests/sys/kern/unix_seqpacket_test.c ============================================================================== --- head/tests/sys/kern/unix_seqpacket_test.c Wed Aug 20 16:32:02 2014 (r270227) +++ head/tests/sys/kern/unix_seqpacket_test.c Wed Aug 20 16:59:33 2014 (r270228) @@ -91,7 +91,6 @@ mk_pair_of_sockets(int *sv) err = bind(s, (struct sockaddr *)&sun, sizeof(sun)); err = listen(s, -1); ATF_CHECK_EQ(0, err); - ATF_CHECK_EQ(0, err); /* Create the other socket */ s2 = socket(PF_LOCAL, SOCK_SEQPACKET, 0); @@ -111,6 +110,9 @@ mk_pair_of_sockets(int *sv) sv[0] = s1; sv[1] = s2; + + close(s); + return (path); } @@ -148,8 +150,11 @@ test_eagain(size_t sndbufsize, size_t rc for(i=0; i < numpkts; i++) { ssize = send(sv[0], sndbuf, pktsize, MSG_EOR); if (ssize == -1) { - if (errno == EAGAIN) + if (errno == EAGAIN) { + close(sv[0]); + close(sv[1]); atf_tc_pass(); + } else { perror("send"); atf_tc_fail("send returned < 0 but not EAGAIN"); @@ -199,6 +204,8 @@ test_sendrecv_symmetric_buffers(size_t b } ATF_CHECK_EQ_MSG(pktsize, rsize, "expected %zd=send(...) but got %zd", pktsize, rsize); + close(sv[0]); + close(sv[1]); } static void @@ -274,6 +281,8 @@ test_pipe_simulator(size_t sndbufsize, s } } } + close(sv[0]); + close(sv[1]); } typedef struct { @@ -372,6 +381,8 @@ test_pipe(size_t sndbufsize, size_t rcvb /* Join the children */ ATF_REQUIRE_EQ(0, pthread_join(writer, NULL)); ATF_REQUIRE_EQ(0, pthread_join(reader, NULL)); + close(sv[0]); + close(sv[1]); } @@ -387,6 +398,7 @@ ATF_TC_BODY(create_socket, tc) s = socket(PF_LOCAL, SOCK_SEQPACKET, 0); ATF_CHECK(s >= 0); + close(s); } /* Create SEQPACKET sockets using socketpair(2) */ @@ -401,6 +413,8 @@ ATF_TC_BODY(create_socketpair, tc) ATF_CHECK(sv[0] >= 0); ATF_CHECK(sv[1] >= 0); ATF_CHECK(sv[0] != sv[1]); + close(sv[0]); + close(sv[1]); } /* Call listen(2) without first calling bind(2). It should fail */ @@ -414,6 +428,7 @@ ATF_TC_BODY(listen_unbound, tc) r = listen(s, -1); /* expect listen to fail since we haven't called bind(2) */ ATF_CHECK(r != 0); + close(s); } /* Bind the socket to a file */ @@ -434,6 +449,7 @@ ATF_TC_BODY(bind, tc) strlcpy(sun.sun_path, path, sizeof(sun.sun_path)); r = bind(s, (struct sockaddr *)&sun, sizeof(sun)); ATF_CHECK_EQ(0, r); + close(s); } /* listen(2) a socket that is already bound(2) should succeed */ @@ -456,6 +472,7 @@ ATF_TC_BODY(listen_bound, tc) l = listen(s, -1); ATF_CHECK_EQ(0, r); ATF_CHECK_EQ(0, l); + close(s); } /* connect(2) can make a connection */ @@ -487,6 +504,8 @@ ATF_TC_BODY(connect, tc) perror("connect"); atf_tc_fail("connect(2) failed"); } + close(s); + close(s2); } /* accept(2) can receive a connection */ @@ -496,6 +515,8 @@ ATF_TC_BODY(accept, tc) int sv[2]; mk_pair_of_sockets(sv); + close(sv[0]); + close(sv[1]); } @@ -511,6 +532,7 @@ ATF_TC_BODY(fcntl_nonblock, tc) perror("fcntl"); atf_tc_fail("fcntl failed"); } + close(s); } /* Resize the send and receive buffers */ @@ -547,6 +569,7 @@ ATF_TC_BODY(resize_buffers, tc) ATF_CHECK_EQ(0, getsockopt(s, SOL_SOCKET, SO_SNDBUF, &xs, &sl)); ATF_CHECK_EQ(0, getsockopt(s, SOL_SOCKET, SO_RCVBUF, &xr, &sl)); printf("After changing RCVBUF | %7d | %7d |\n", xs, xr); + close(s); } /* @@ -603,6 +626,8 @@ ATF_TC_BODY(resize_connected_buffers, tc ATF_CHECK_EQ(0, getsockopt(sv[1], SOL_SOCKET, SO_RCVBUF, &rr, &sl)); printf("After changing Left's RCVBUF | %7d | %7d | %7d | %7d |\n", ls, lr, rs, rr); + close(sv[0]); + close(sv[1]); } @@ -632,6 +657,8 @@ ATF_TC_BODY(send_recv, tc) rsize = recv(sv[1], recv_buf, bufsize, MSG_WAITALL); ATF_CHECK_EQ(datalen, rsize); + close(sv[0]); + close(sv[1]); } /* sendto(2) and recvfrom(2) a single short record @@ -684,6 +711,8 @@ ATF_TC_BODY(sendto_recvfrom, tc) */ /* ATF_CHECK_EQ(PF_LOCAL, from.ss_family); */ /* ATF_CHECK_STREQ(path, ((struct sockaddr_un*)&from)->sun_path); */ + close(sv[0]); + close(sv[1]); } /* @@ -714,6 +743,8 @@ ATF_TC_BODY(send_recv_with_connect, tc) rsize = recv(sv[1], recv_buf, bufsize, MSG_WAITALL); ATF_CHECK_EQ(datalen, rsize); + close(sv[0]); + close(sv[1]); } /* send(2) should fail on a shutdown socket */ @@ -721,16 +752,17 @@ ATF_TC_WITHOUT_HEAD(shutdown_send); ATF_TC_BODY(shutdown_send, tc) { int s; - const char *data = "data"; + const char data[] = "data"; ssize_t ssize; s = socket(PF_LOCAL, SOCK_SEQPACKET, 0); - ATF_CHECK(s >= 0); + ATF_REQUIRE(s >= 0); ATF_CHECK_EQ(0, shutdown(s, SHUT_RDWR)); /* USE MSG_NOSIGNAL so we don't get SIGPIPE */ ssize = send(s, data, sizeof(data), MSG_EOR | MSG_NOSIGNAL); ATF_CHECK_EQ(EPIPE, errno); ATF_CHECK_EQ(-1, ssize); + close(s); } /* send(2) should cause SIGPIPE on a shutdown socket */ @@ -738,15 +770,16 @@ ATF_TC_WITHOUT_HEAD(shutdown_send_sigpip ATF_TC_BODY(shutdown_send_sigpipe, tc) { int s; - const char *data = "data"; + const char data[] = "data"; ssize_t ssize; s = socket(PF_LOCAL, SOCK_SEQPACKET, 0); - ATF_CHECK(s >= 0); + ATF_REQUIRE(s >= 0); ATF_CHECK_EQ(0, shutdown(s, SHUT_RDWR)); ATF_REQUIRE(SIG_ERR != signal(SIGPIPE, shutdown_send_sigpipe_handler)); ssize = send(s, data, sizeof(data), MSG_EOR); ATF_CHECK_EQ(1, got_sigpipe); + close(s); } /* nonblocking send(2) and recv(2) a single short record */ @@ -780,6 +813,8 @@ ATF_TC_BODY(send_recv_nonblocking, tc) rsize = recv(sv[1], recv_buf, bufsize, MSG_WAITALL); ATF_CHECK_EQ(datalen, rsize); + close(sv[0]); + close(sv[1]); } /* @@ -807,6 +842,8 @@ ATF_TC_BODY(emsgsize, tc) ssize = send(sv[0], sndbuf, pktsize, MSG_EOR); ATF_CHECK_EQ(EMSGSIZE, errno); ATF_CHECK_EQ(-1, ssize); + close(sv[0]); + close(sv[1]); } /* @@ -834,6 +871,8 @@ ATF_TC_BODY(emsgsize_nonblocking, tc) ssize = send(sv[0], sndbuf, pktsize, MSG_EOR); ATF_CHECK_EQ(EMSGSIZE, errno); ATF_CHECK_EQ(-1, ssize); + close(sv[0]); + close(sv[1]); } @@ -924,6 +963,8 @@ ATF_TC_BODY(rcvbuf_oversized, tc) rsize = recv(sv[1], recv_buf, pktsize, MSG_WAITALL); ATF_CHECK_EQ(EAGAIN, errno); ATF_CHECK_EQ(-1, rsize); + close(sv[0]); + close(sv[1]); } /* From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 17:00:53 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7ED64C0; Wed, 20 Aug 2014 17:00:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BEC16382D; Wed, 20 Aug 2014 17:00:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KH0rbC005744; Wed, 20 Aug 2014 17:00:53 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KH0lrH005686; Wed, 20 Aug 2014 17:00:47 GMT (envelope-from se@FreeBSD.org) Message-Id: <201408201700.s7KH0lrH005686@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Wed, 20 Aug 2014 17:00:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270229 - head/share/vt/keymaps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 17:00:54 -0000 Author: se Date: Wed Aug 20 17:00:47 2014 New Revision: 270229 URL: http://svnweb.freebsd.org/changeset/base/270229 Log: Another rpund of fixes, after checking keymaps for plausibility and with several updates to the converter tools. There is now support for hybrid source keymaps, which e.g. use ISO8859-1 (not -15) but still provide an Euro key (on the "E" key). ISO8859-1 currency symbols on other keys are still converted to that character, not the Euro sign. A similar hack was applied to the Japanese keyboards to add the Yen key, that could not be expressed in SYSCONS. Several modifications have been applied after the conversion (removal of unused accents tables, some reformatting, exchange of a few key symbols). The German keymap (de.kbd) is now using deadkeys only for those keys, that behave that way under Windows. There are now ".acc" and ".noacc" variants, which use deadkeys vs. nodeadkeys for all accent keys. I'm still in the process of comparing keymaps that existed in different encodings in SYSCONS. These are generally translated slightly differently, either because of mistakes, or because of different preferences, or due to limitations of the respective encoding. MFC after: 3 days Added: head/share/vt/keymaps/centraleuropean.qwerty.kbd - copied, changed from r270200, head/share/vt/keymaps/centraleuropean.kbd head/share/vt/keymaps/de.noacc.kbd - copied, changed from r270210, head/share/vt/keymaps/de.kbd Replaced: head/share/vt/keymaps/de.kbd - copied, changed from r270200, head/share/vt/keymaps/de.acc.kbd Modified: head/share/vt/keymaps/INDEX.keymaps head/share/vt/keymaps/Makefile head/share/vt/keymaps/am.kbd head/share/vt/keymaps/be.acc.kbd head/share/vt/keymaps/ca-fr.kbd head/share/vt/keymaps/centraleuropean.kbd head/share/vt/keymaps/ch-fr.acc.kbd head/share/vt/keymaps/ch-fr.kbd head/share/vt/keymaps/de.acc.kbd head/share/vt/keymaps/dk.acc.kbd head/share/vt/keymaps/dk.kbd head/share/vt/keymaps/dk.macbook.kbd head/share/vt/keymaps/es.dvorak.kbd head/share/vt/keymaps/fi.kbd head/share/vt/keymaps/fr.acc.kbd head/share/vt/keymaps/fr.dvorak.acc.kbd head/share/vt/keymaps/fr.dvorak.kbd head/share/vt/keymaps/fr.macbook.kbd head/share/vt/keymaps/is.kbd head/share/vt/keymaps/it.kbd head/share/vt/keymaps/jp.pc98.iso.kbd head/share/vt/keymaps/jp.pc98.kbd head/share/vt/keymaps/no.dvorak.kbd head/share/vt/keymaps/no.kbd head/share/vt/keymaps/nordic.asus-eee.kbd head/share/vt/keymaps/se.kbd head/share/vt/keymaps/uk.capsctrl.kbd head/share/vt/keymaps/uk.kbd head/share/vt/keymaps/us.acc.kbd Modified: head/share/vt/keymaps/INDEX.keymaps ============================================================================== --- head/share/vt/keymaps/INDEX.keymaps Wed Aug 20 16:59:33 2014 (r270228) +++ head/share/vt/keymaps/INDEX.keymaps Wed Aug 20 17:00:47 2014 (r270229) @@ -77,6 +77,11 @@ centraleuropean.kbd:de:Zentral Europäis centraleuropean.kbd:fr:Centre européen centraleuropean.kbd:es:Centroeuropeo +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.kbd:en:Colemak ergonomic alternative cz.kbd:en:Czech (QWERTZ, accent keys) @@ -89,6 +94,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 @@ -208,6 +218,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 @@ -501,18 +518,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: head/share/vt/keymaps/Makefile ============================================================================== --- head/share/vt/keymaps/Makefile Wed Aug 20 16:59:33 2014 (r270228) +++ head/share/vt/keymaps/Makefile Wed Aug 20 17:00:47 2014 (r270229) @@ -8,6 +8,7 @@ FILES= INDEX.keymaps \ ca.kbd \ ca-fr.kbd \ centraleuropean.kbd \ + centraleuropean.qwerty.kbd \ ch-fr.acc.kbd \ ch-fr.kbd \ ch.acc.kbd \ Modified: head/share/vt/keymaps/am.kbd ============================================================================== --- head/share/vt/keymaps/am.kbd Wed Aug 20 16:59:33 2014 (r270228) +++ head/share/vt/keymaps/am.kbd Wed Aug 20 17:00:47 2014 (r270229) @@ -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 Modified: head/share/vt/keymaps/be.acc.kbd ============================================================================== --- head/share/vt/keymaps/be.acc.kbd Wed Aug 20 16:59:33 2014 (r270228) +++ head/share/vt/keymaps/be.acc.kbd Wed Aug 20 17:00:47 2014 (r270229) @@ -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 ) Modified: head/share/vt/keymaps/ca-fr.kbd ============================================================================== --- head/share/vt/keymaps/ca-fr.kbd Wed Aug 20 16:59:33 2014 (r270228) +++ head/share/vt/keymaps/ca-fr.kbd Wed Aug 20 17:00:47 2014 (r270229) @@ -15,14 +15,14 @@ 003 '2' '"' nul nul '@' '"' nul nul O 004 '3' '/' nop nop 0xa3 '/' nop nop O 005 '4' '$' nop nop 0xa2 '$' nop nop O - 006 '5' '%' nop nop 0x20ac '%' nop nop O + 006 '5' '%' nop nop 0xa4 '%' nop nop O 007 '6' '?' nop nop 0xac '?' nop nop O 008 '7' '&' nop nop '|' '&' nop nop O 009 '8' '*' nop nop 0xb2 '*' nop nop O 010 '9' '(' nop nop 0xb3 '(' nop nop O - 011 '0' ')' nop nop 0x0152 ')' nop nop O - 012 '-' '_' nop nop 0x0153 '_' nop nop O - 013 '=' '+' nop nop 0x0178 '+' nop nop O + 011 '0' ')' nop nop 0xbc ')' nop nop O + 012 '-' '_' nop nop 0xbd '_' nop nop O + 013 '=' '+' nop nop 0xbe '+' 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 Modified: head/share/vt/keymaps/centraleuropean.kbd ============================================================================== --- head/share/vt/keymaps/centraleuropean.kbd Wed Aug 20 16:59:33 2014 (r270228) +++ head/share/vt/keymaps/centraleuropean.kbd Wed Aug 20 17:00:47 2014 (r270229) @@ -5,7 +5,7 @@ # # $FreeBSD$ # -# This map uses the US QWERTY keyboard for its basic layout. +# This map uses a QWERTZ keyboard for its basic layout. # It adds a "third row" to the top of the PC keyboard. To # access the third row, press and hold the Alt key, then # strike a key in the top row. @@ -58,7 +58,7 @@ # This layout offers access to the entire character set of # ISO 8859-2, used by Slovak, Czech, German, Polish, Croatian, # Slovenian, Rumanian, Hungarian, and probably other languages, -# while remaining fully compatible with the default US QWERTY +# while remaining mostly compatible with the default US QWERTY # keyboard. # # alt @@ -86,7 +86,7 @@ 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 + 021 'z' 'Z' sub sub 'z' 'Z' sub sub C 022 'u' 'U' nak nak 'u' 'U' nak nak C 023 'i' 'I' ht ht 'i' 'I' ht ht C 024 'o' 'O' si si 'o' 'O' si si C @@ -109,7 +109,7 @@ 041 '`' '~' nop nop dogo dced nop nop O 042 lshift lshift lshift lshift lshift lshift lshift lshift O 043 '\' '|' fs fs dsla dsla fs fs O - 044 'z' 'Z' sub sub 'z' 'Z' sub sub C + 044 'y' 'Y' em em 'y' 'Y' em em C 045 'x' 'X' can can 'x' 'X' can can C 046 'c' 'C' etx etx 'c' 'C' etx etx C 047 'v' 'V' syn syn 'v' 'V' syn syn C @@ -203,7 +203,7 @@ ( 't' 0x0165 ) ( 'T' 0x0164 ) ( 'z' 0x017e ) ( 'Z' 0x017d ) - ddot 0x02d9 ( 'z' 0 ) ( 'Z' 0 ) + ddot 0x02d9 ( 'z' 0x017c ) ( 'Z' 0x017b ) duml 0xa8 ( 'a' 0xe4 ) ( 'A' 0xc4 ) ( 'e' 0xeb ) ( 'E' 0xcb ) Copied and modified: head/share/vt/keymaps/centraleuropean.qwerty.kbd (from r270200, head/share/vt/keymaps/centraleuropean.kbd) ============================================================================== --- head/share/vt/keymaps/centraleuropean.kbd Wed Aug 20 07:48:09 2014 (r270200, copy source) +++ head/share/vt/keymaps/centraleuropean.qwerty.kbd Wed Aug 20 17:00:47 2014 (r270229) @@ -203,7 +203,7 @@ ( 't' 0x0165 ) ( 'T' 0x0164 ) ( 'z' 0x017e ) ( 'Z' 0x017d ) - ddot 0x02d9 ( 'z' 0 ) ( 'Z' 0 ) + ddot 0x02d9 ( 'z' 0x017c ) ( 'Z' 0x017b ) duml 0xa8 ( 'a' 0xe4 ) ( 'A' 0xc4 ) ( 'e' 0xeb ) ( 'E' 0xcb ) Modified: head/share/vt/keymaps/ch-fr.acc.kbd ============================================================================== --- head/share/vt/keymaps/ch-fr.acc.kbd Wed Aug 20 16:59:33 2014 (r270228) +++ head/share/vt/keymaps/ch-fr.acc.kbd Wed Aug 20 17:00:47 2014 (r270229) @@ -14,7 +14,7 @@ 005 '4' 0xe7 nop nop '4' 0xe7 nop nop O 006 '5' '%' nop nop '5' '%' nop nop O 007 '6' '&' nop nop 0xac 0xac nop nop O - 008 '7' '/' nop nop 0x0160 0x0160 nop nop O + 008 '7' '/' nop nop 0xa6 0xa6 nop nop O 009 '8' '(' esc esc 0xde 0xde esc esc O 010 '9' ')' gs gs '9' ')' gs gs O 011 '0' '=' nop nop '0' '=' nop nop O Modified: head/share/vt/keymaps/ch-fr.kbd ============================================================================== --- head/share/vt/keymaps/ch-fr.kbd Wed Aug 20 16:59:33 2014 (r270228) +++ head/share/vt/keymaps/ch-fr.kbd Wed Aug 20 17:00:47 2014 (r270229) @@ -14,8 +14,8 @@ 005 '4' 0xe7 nop nop '4' 0xe7 nop nop O 006 '5' '%' nop nop '5' '%' nop nop O 007 '6' '&' nop nop 0xac 0xac nop nop O - 008 '7' '/' nop nop 0x0160 0x0160 nop nop O - 009 '8' '(' esc esc 0xde 0xde esc esc O + 008 '7' '/' nop nop 0xa6 0xa6 nop nop O + 009 '8' '(' esc esc 0xa2 0xa2 esc esc O 010 '9' ')' gs gs '9' ')' gs gs O 011 '0' '=' nop nop '0' '=' nop nop O 012 ''' '?' fs fs 0xb4 0xb4 fs fs O @@ -33,7 +33,7 @@ 024 'o' 'O' si si 'o' 'O' si si C 025 'p' 'P' dle dle 'p' 'P' dle dle C 026 0xe8 0xfc esc esc '[' 0xdc esc esc C - 027 0x0161 '!' gs gs ']' ']' gs gs O + 027 0xa8 '!' 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 Modified: head/share/vt/keymaps/de.acc.kbd ============================================================================== --- head/share/vt/keymaps/de.acc.kbd Wed Aug 20 16:59:33 2014 (r270228) +++ head/share/vt/keymaps/de.acc.kbd Wed Aug 20 17:00:47 2014 (r270229) @@ -49,7 +49,7 @@ 043 '#' ''' nop nop '#' ''' nop nop O 044 'y' 'Y' em em 'y' 'Y' em em C 045 'x' 'X' can can 'x' 'X' can can C - 046 'c' 'C' etx etx 'c' 'C' etx etx C + 046 'c' 'C' etx etx 0xa2 '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 @@ -89,7 +89,7 @@ 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 '|' 0x0160 nop nop O + 086 '<' '>' nop nop '|' 0xa6 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 Copied and modified: head/share/vt/keymaps/de.kbd (from r270200, head/share/vt/keymaps/de.acc.kbd) ============================================================================== --- head/share/vt/keymaps/de.acc.kbd Wed Aug 20 07:48:09 2014 (r270200, copy source) +++ head/share/vt/keymaps/de.kbd Wed Aug 20 17:00:47 2014 (r270229) @@ -30,7 +30,7 @@ 024 'o' 'O' si si 'o' 'O' si si C 025 'p' 'P' dle dle 'p' 'P' dle dle C 026 0xfc 0xdc nop nop 0xfc 0xdc esc nop C - 027 '+' '*' nop nop dtil dtil nop nop O + 027 '+' '*' nop nop '~' '~' nop nop 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 @@ -49,7 +49,7 @@ 043 '#' ''' nop nop '#' ''' nop nop O 044 'y' 'Y' em em 'y' 'Y' em em C 045 'x' 'X' can can 'x' 'X' can can C - 046 'c' 'C' etx etx 'c' 'C' etx etx C + 046 'c' 'C' etx etx 0xa2 '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 @@ -89,7 +89,7 @@ 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 '|' 0x0160 nop nop O + 086 '<' '>' nop nop '|' 0xa6 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 @@ -124,14 +124,3 @@ dcir '^' ( 'a' 0xe2 ) ( 'A' 0xc2 ) ( 'e' 0xea ) ( 'E' 0xca ) ( 'i' 0xee ) ( 'I' 0xce ) ( 'o' 0xf4 ) ( 'O' 0xd4 ) ( 'u' 0xfb ) ( 'U' 0xdb ) - - dtil '~' ( 'a' 0xe3 ) ( 'A' 0xc3 ) ( 'n' 0xf1 ) ( 'N' 0xd1 ) - ( 'o' 0xf5 ) ( 'O' 0xd5 ) - - duml 0xa8 ( 'a' 0xe4 ) ( 'A' 0xc4 ) ( 'e' 0xeb ) ( 'E' 0xcb ) - ( 'i' 0xef ) ( 'I' 0xcf ) ( 'o' 0xf6 ) ( 'O' 0xd6 ) - ( 'u' 0xfc ) ( 'U' 0xdc ) ( 'y' 0xff ) - - drin 0xb0 ( 'a' 0xe5 ) ( 'A' 0xc5 ) - - dced 0xb8 ( 'c' 0xe7 ) ( 'C' 0xc7 ) Copied and modified: head/share/vt/keymaps/de.noacc.kbd (from r270210, head/share/vt/keymaps/de.kbd) ============================================================================== --- head/share/vt/keymaps/de.kbd Wed Aug 20 13:54:27 2014 (r270210, copy source) +++ head/share/vt/keymaps/de.noacc.kbd Wed Aug 20 17:00:47 2014 (r270229) @@ -49,7 +49,7 @@ 043 '#' ''' nop nop '#' ''' nop nop O 044 'y' 'Y' em em 'y' 'Y' em em C 045 'x' 'X' can can 'x' 'X' can can C - 046 'c' 'C' etx etx 'c' 'C' etx etx C + 046 'c' 'C' etx etx 0xa2 '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 @@ -87,9 +87,10 @@ 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 +# 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 '|' 0x0160 nop nop O + 086 '<' '>' nop nop '|' 0xa6 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 Modified: head/share/vt/keymaps/dk.acc.kbd ============================================================================== --- head/share/vt/keymaps/dk.acc.kbd Wed Aug 20 16:59:33 2014 (r270228) +++ head/share/vt/keymaps/dk.acc.kbd Wed Aug 20 17:00:47 2014 (r270229) @@ -33,7 +33,7 @@ 002 '1' '!' nop nop 0xa1 0xb9 nop nop O 003 '2' '"' nul nul '@' 0xb2 nul nul O 004 '3' '#' nop nop 0x9e 0xb3 nop nop O - 005 '4' 0x20ac nop nop '$' 0x20ac nop nop O + 005 '4' 0xa4 nop nop '$' 0xa4 nop nop O 006 '5' '%' nop nop '5' '%' nop nop O 007 '6' '&' nop nop '6' '&' nop nop O 008 '7' '/' nop nop '{' '/' nop nop O @@ -69,7 +69,7 @@ 038 'l' 'L' ff ff 'l' 'L' ff ff C 039 0xe6 0xc6 nop nop 0x91 0x92 nop nop C 040 0xf8 0xd8 nop nop 0x9b 0x9d nop nop C - 041 0x0153 0xa7 nop nop 0x0153 0xa7 nop nop O + 041 0xbd 0xa7 nop nop 0xbd 0xa7 nop nop O 042 lshift lshift lshift lshift lshift lshift lshift lshift O 043 ''' '*' nop nop ''' '*' nop nop O 044 'z' 'Z' sub sub 'z' 'Z' sub sub C @@ -153,7 +153,7 @@ ( 'i' 0xec ) ( 'I' 0xcc ) ( 'o' 0xf2 ) ( 'O' 0xd2 ) ( 'u' 0xf9 ) ( 'U' 0xd9 ) - dacu 0xb4 ( 'a' 0xe1 ) ( 'A' 0xc1 ) ( 'e' 0xe9 ) ( 'E' 0xc9 ) + dacu ''' ( 'a' 0xe1 ) ( 'A' 0xc1 ) ( 'e' 0xe9 ) ( 'E' 0xc9 ) ( 'i' 0xed ) ( 'I' 0xcd ) ( 'o' 0xf3 ) ( 'O' 0xd3 ) ( 'u' 0xfa ) ( 'U' 0xda ) ( 'y' 0xfd ) ( 'Y' 0xdd ) Modified: head/share/vt/keymaps/dk.kbd ============================================================================== --- head/share/vt/keymaps/dk.kbd Wed Aug 20 16:59:33 2014 (r270228) +++ head/share/vt/keymaps/dk.kbd Wed Aug 20 17:00:47 2014 (r270229) @@ -8,7 +8,7 @@ 002 '1' '!' nop nop '1' '!' nop nop O 003 '2' '"' nul nul '@' '@' nul nul O 004 '3' '#' nop nop 0x9e '#' nop nop O - 005 '4' 0x20ac nop nop '$' 0x20ac nop nop O + 005 '4' 0xa4 nop nop '$' 0xa4 nop nop O 006 '5' '%' nop nop '5' '%' nop nop O 007 '6' '&' nop nop '6' '&' nop nop O 008 '7' '/' nop nop '{' '/' nop nop O @@ -44,7 +44,7 @@ 038 'l' 'L' ff ff 'l' 'L' ff ff C 039 0xe6 0xc6 nop nop 0x91 0x92 nop nop C 040 0xf8 0xd8 nop nop 0x9b 0x9d nop nop C - 041 0x0153 0xa7 nop nop 0x0153 0xa7 nop nop O + 041 0xbd 0xa7 nop nop 0xbd 0xa7 nop nop O 042 lshift lshift lshift lshift lshift lshift lshift lshift O 043 ''' '*' nop nop ''' '*' nop nop O 044 'z' 'Z' sub sub 'z' 'Z' sub sub C Modified: head/share/vt/keymaps/dk.macbook.kbd ============================================================================== --- head/share/vt/keymaps/dk.macbook.kbd Wed Aug 20 16:59:33 2014 (r270228) +++ head/share/vt/keymaps/dk.macbook.kbd Wed Aug 20 17:00:47 2014 (r270229) @@ -33,7 +33,7 @@ 024 'o' 'O' si si nop nop nop nop C 025 'p' 'P' dle dle nop nop nop nop C 026 0xe5 nop nop nop nop nop nop nop C - 027 0x0161 '^' nop nop '~' '^' '~' '~' O + 027 0xa8 '^' nop nop '~' '^' '~' '~' 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 0xaa nop nop nop C @@ -50,7 +50,7 @@ 041 '$' 0xa7 '0' '0' nop ''' nop nop O 042 lshift lshift lshift lshift lshift lshift lshift lshift O 043 ''' '*' nop nop '@' nop nop nop O - 044 'z' 'Z' sub sub nop 0x017e nop nop C + 044 'z' 'Z' sub sub nop 0xb8 nop nop C 045 'x' 'X' can can nop nop nop nop C 046 'c' 'C' etx etx 0xe7 nop nop nop C 047 'v' 'V' syn syn 'v' 'V' nop nop C Modified: head/share/vt/keymaps/es.dvorak.kbd ============================================================================== --- head/share/vt/keymaps/es.dvorak.kbd Wed Aug 20 16:59:33 2014 (r270228) +++ head/share/vt/keymaps/es.dvorak.kbd Wed Aug 20 17:00:47 2014 (r270229) @@ -130,7 +130,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 ) Modified: head/share/vt/keymaps/fi.kbd ============================================================================== --- head/share/vt/keymaps/fi.kbd Wed Aug 20 16:59:33 2014 (r270228) +++ head/share/vt/keymaps/fi.kbd Wed Aug 20 17:00:47 2014 (r270229) @@ -8,7 +8,7 @@ 002 '1' '!' nop nop nop nop nop nop O 003 '2' '"' nul nul '@' '@' nul nul O 004 '3' '#' nop nop 0xa3 nop nop nop O - 005 '4' 0x20ac nop nop '$' nop nop nop O + 005 '4' 0xa4 nop nop '$' nop nop nop O 006 '5' '%' nop nop nop nop nop nop O 007 '6' '&' nop nop nop nop nop nop O 008 '7' '/' nop nop '{' nop nop nop O @@ -30,7 +30,7 @@ 024 'o' 'O' si si 'o' 'O' si si C 025 'p' 'P' dle dle 'p' 'P' dle dle C 026 0xe5 0xc5 nop nop '}' ']' nop nop C - 027 0x0161 '^' nop nop '~' nop nop nop O + 027 0xa8 '^' nop nop '~' nop nop nop 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 @@ -44,7 +44,7 @@ 038 'l' 'L' ff ff 'l' 'L' ff ff C 039 0xf6 0xd6 nop nop '|' '\' nop nop C 040 0xe4 0xc4 nop nop '{' '[' nop nop C - 041 0xa7 0x0153 nop nop '\' '|' nop nop O + 041 0xa7 0xbd nop nop '\' '|' nop nop O 042 lshift lshift lshift lshift lshift lshift lshift lshift O 043 ''' '*' nop nop nop nop nop nop O 044 'z' 'Z' sub sub 'z' 'Z' sub sub C Modified: head/share/vt/keymaps/fr.acc.kbd ============================================================================== --- head/share/vt/keymaps/fr.acc.kbd Wed Aug 20 16:59:33 2014 (r270228) +++ head/share/vt/keymaps/fr.acc.kbd Wed Aug 20 17:00:47 2014 (r270229) @@ -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 ) Modified: head/share/vt/keymaps/fr.dvorak.acc.kbd ============================================================================== --- head/share/vt/keymaps/fr.dvorak.acc.kbd Wed Aug 20 16:59:33 2014 (r270228) +++ head/share/vt/keymaps/fr.dvorak.acc.kbd Wed Aug 20 17:00:47 2014 (r270229) @@ -4,6 +4,10 @@ # according to Francis Leboutte on # http://www.algo.be/ergo/dvorak-fr.html # +# Note that letters with accents won't be correctly +# displayed unless one uses the correct font: +# vidcontrol -f iso15-8x16.fnt +# # -Frédéric Praca # -Clément Pillias for accent keys # @@ -122,28 +126,28 @@ 107 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O 108 nop nop nop nop nop nop nop nop O - dgra '`' ( '/' 0xb1 ) ( '-' 0x0152 ) ( 0xe8 0x0153 ) ( '\' 0x0178 ) - ( '?' 0xc6 ) ( 'C' 0xc7 ) - ( ':' 0xe6 ) ( '`' '$' ) ( 0xe9 0xc9 ) ( 'g' 0x20ac ) - ( '.' 0xb0 ) ( 'c' 0xe7 ) ( 'm' 0xb5 ) - ( 'O' 0xd2 ) ( 'A' 0xc0 ) ( 'U' 0xd9 ) ( 'E' 0xc8 ) - ( 'o' 0xf2 ) ( 'a' 0xe0 ) ( 'u' 0xf9 ) ( 'e' 0xe8 ) - ( 's' 0xab ) ( 'n' 0xbb ) - ( 0xe7 0xc7 ) ( '|' 0x0152 ) ( 'I' 0xcc ) - ( 0xe0 0xc0 ) ( ';' 0x0153 ) ( 'q' '{' ) ( ',' '}' ) - ( 'i' 0xec ) ( 'r' 0xba ) ( 'p' 0xa7 ) - ( '!' 0xa1 ) + dgra '`' ( '/' 0xb1 ) ( '-' 0xbc ) ( 0xe8 0xbd ) ( '\' 0xbe ) + ( '?' 0xc6 ) ( 'C' 0xc7 ) + ( ':' 0xe6 ) ( '`' '$' ) ( 0xe9 0xc9 ) ( 'g' 0xa4 ) + ( '.' 0xb0 ) ( 'c' 0xe7 ) ( 'm' 0xb5 ) + ( 'O' 0xd2 ) ( 'A' 0xc0 ) ( 'U' 0xd9 ) ( 'E' 0xc8 ) + ( 'o' 0xf2 ) ( 'a' 0xe0 ) ( 'u' 0xf9 ) ( 'e' 0xe8 ) + ( 's' 0xab ) ( 'n' 0xbb ) + ( 0xe7 0xc7 ) ( '|' 0xbc ) ( 'I' 0xcc ) + ( 0xe0 0xc0 ) ( ';' 0xbd ) ( 'q' '{' ) ( ',' '}' ) + ( 'i' 0xec ) ( 'r' 0xba ) ( 'p' 0xa7 ) + ( '!' 0xa1 ) - dcir '^' ( 'a' 0xe2 ) ( 'e' 0xea ) ( 'i' 0xee ) ( 'o' 0xf4 ) ( 'u' 0xfb ) - ( 'A' 0xc2 ) ( 'E' 0xca ) ( 'I' 0xce ) ( 'O' 0xd4 ) ( 'U' 0xdb ) + dcir '^' ( 'a' 0xe2 ) ( 'e' 0xea ) ( 'i' 0xee ) ( 'o' 0xf4 ) ( 'u' 0xfb ) + ( 'A' 0xc2 ) ( 'E' 0xca ) ( 'I' 0xce ) ( 'O' 0xd4 ) ( 'U' 0xdb ) - dtil '~' ( 'n' 0xf1 ) ( 'N' 0xd1 ) - ( 'a' 0xe3 ) ( 'A' 0xc3 ) ( 'o' 0xf5 ) ( 'O' 0xd5 ) + dtil '~' ( 'n' 0xf1 ) ( 'N' 0xd1 ) + ( 'a' 0xe3 ) ( 'A' 0xc3 ) ( 'o' 0xf5 ) ( 'O' 0xd5 ) - ddia '"' ( 'a' 0xe4 ) ( 'e' 0xeb ) ( 'i' 0xef ) ( 'o' 0xf6 ) ( 'u' 0xfc ) - ( 'A' 0xc4 ) ( 'E' 0xcb ) ( 'I' 0xcf ) ( 'O' 0xd6 ) ( 'U' 0xdc ) - ( 'y' 0xff ) ( 'Y' 0x0178 ) + ddia '"' ( 'a' 0xe4 ) ( 'e' 0xeb ) ( 'i' 0xef ) ( 'o' 0xf6 ) ( 'u' 0xfc ) + ( 'A' 0xc4 ) ( 'E' 0xcb ) ( 'I' 0xcf ) ( 'O' 0xd6 ) ( 'U' 0xdc ) + ( 'y' 0xff ) ( 'Y' 0xbe ) - dacu 0x017d ( 'a' 0xe1 ) ( 'e' 0xe9 ) ( 'i' 0xed ) ( 'o' 0xf3 ) ( 'u' 0xfa ) - ( 'A' 0xc1 ) ( 'E' 0xc9 ) ( 'I' 0xcd ) ( 'O' 0xd3 ) ( 'U' 0xda ) - ( 'Y' 0xdd ) ( 'y' 0xfd ) + dacu 0xb4( 'a' 0xe1 ) ( 'e' 0xe9 ) ( 'i' 0xed ) ( 'o' 0xf3 ) ( 'u' 0xfa ) + ( 'A' 0xc1 ) ( 'E' 0xc9 ) ( 'I' 0xcd ) ( 'O' 0xd3 ) ( 'U' 0xda ) + ( 'Y' 0xdd ) ( 'y' 0xfd ) Modified: head/share/vt/keymaps/fr.dvorak.kbd ============================================================================== --- head/share/vt/keymaps/fr.dvorak.kbd Wed Aug 20 16:59:33 2014 (r270228) +++ head/share/vt/keymaps/fr.dvorak.kbd Wed Aug 20 17:00:47 2014 (r270229) @@ -1,7 +1,7 @@ # A Dvorak keyboard for French # # This is a Dvorak-like layout for French -# according to Francis Leboutte on +# according to Francis Leboutte on # http://www.algo.be/ergo/dvorak-fr.html # # -Frédéric Praca @@ -13,58 +13,58 @@ # ------------------------------------------------------------------ 000 nop nop nop nop nop nop nop nop O 001 esc esc esc esc esc esc debug esc O - 002 '=' '1' nop ' ' '=' '1' nop nop C - 003 224 '2' nop '~' 'à' '2' nop nop C - 004 '-' '3' nop '#' '-' '3' nop nop C - 005 232 '4' nop '{' 'è' '4' nop nop C - 006 '/' '5' nop '[' '/' '5' nop nop C - 007 '^' '6' nop '|' '^' '6' nop nop C - 008 '(' '7' nop '`' '(' '7' nop nop C - 009 '`' '8' nop '\' '`' '8' nop nop C - 010 ')' '9' nop '^' ')' '9' nop nop C - 011 '"' '0' nop '@' '"' '0' nop nop C - 012 '[' '|' nop ']' '[' '|' nop nop O - 013 ']' '%' nop '}' ']' '%' nop nop O + 002 '=' '1' nop ' ' '=' '1' nop nop C + 003 0xe0 '2' nop '~' 0xe0 '2' nop nop C + 004 '-' '3' nop '#' '-' '3' nop nop C + 005 0xe8 '4' nop '{' 0xe8 '4' nop nop C + 006 '/' '5' nop '[' '/' '5' nop nop C + 007 '^' '6' nop '|' '^' '6' nop nop C + 008 '(' '7' nop '`' '(' '7' nop nop C + 009 '`' '8' nop '\' '`' '8' nop nop C + 010 ')' '9' nop '^' ')' '9' nop nop C + 011 '"' '0' nop '@' '"' '0' nop nop C + 012 '[' '|' nop ']' '[' '|' nop nop O + 013 ']' '%' 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 ':' '?' nop ' ' ':' '?' nop nop O - 017 ''' '<' nop ' ' ''' '<' nop nop C - 018 233 '>' nop '?' 'é' '>' nop nop C - 019 'g' 'G' nop ' ' 'g' 'G' nop nop C - 020 '.' '!' nop ' ' '.' '!' nop nop O - 021 'h' 'H' nop ' ' 'h' 'H' nop nop C - 022 'v' 'V' nop ' ' 'v' 'V' nop nop C - 023 'c' 'C' nop ' ' 'c' 'C' nop nop C - 024 'm' 'M' nop ' ' 'm' 'M' nop nop C - 025 'k' 'K' nop ' ' 'k' 'K' nop nop C - 026 'z' 'Z' nop ' ' 'z' 'Z' nop nop C - 027 168 '&' nop '€' 'Å¡' '&' nop nop C + 016 ':' '?' nop ' ' ':' '?' nop nop O + 017 ''' '<' nop ' ' ''' '<' nop nop C + 018 0xe9 '>' nop '?' 0xe9 '>' nop nop C + 019 'g' 'G' nop ' ' 'g' 'G' nop nop C + 020 '.' '!' nop ' ' '.' '!' nop nop O + 021 'h' 'H' nop ' ' 'h' 'H' nop nop C + 022 'v' 'V' nop ' ' 'v' 'V' nop nop C + 023 'c' 'C' nop ' ' 'c' 'C' nop nop C + 024 'm' 'M' nop ' ' 'm' 'M' nop nop C + 025 'k' 'K' nop ' ' 'k' 'K' nop nop C + 026 'z' 'Z' nop ' ' 'z' 'Z' nop nop C + 027 0xa8 '&' nop 0xa4 0xa8 '&' nop nop C 028 cr cr nl nl cr cr nl nl O 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O - 030 'o' 'O' nop ' ' 'o' 'O' nop nop C - 031 'a' 'A' nop ' ' 'a' 'A' nop nop C - 032 'u' 'U' nop ' ' 'u' 'U' nop nop C - 033 'e' 'E' nop ' ' 'e' 'E' nop nop C - 034 'b' 'B' nop ' ' 'b' 'B' nop nop C - 035 'f' 'F' nop ' ' 'f' 'F' nop nop C - 036 's' 'S' nop ' ' 's' 'S' nop nop C - 037 't' 'T' nop ' ' 't' 'T' nop nop C - 038 'n' 'N' nop ' ' 'n' 'N' nop nop C - 039 'd' 'D' nop ' ' 'd' 'D' nop nop C - 040 'w' 'W' nop ' ' 'w' 'W' nop nop C - 041 178 nop nop nop '|' '|' nop nop O + 030 'o' 'O' nop ' ' 'o' 'O' nop nop C + 031 'a' 'A' nop ' ' 'a' 'A' nop nop C + 032 'u' 'U' nop ' ' 'u' 'U' nop nop C + 033 'e' 'E' nop ' ' 'e' 'E' nop nop C + 034 'b' 'B' nop ' ' 'b' 'B' nop nop C + 035 'f' 'F' nop ' ' 'f' 'F' nop nop C + 036 's' 'S' nop ' ' 's' 'S' nop nop C + 037 't' 'T' nop ' ' 't' 'T' nop nop C + 038 'n' 'N' nop ' ' 'n' 'N' nop nop C + 039 'd' 'D' nop ' ' 'd' 'D' nop nop C + 040 'w' 'W' nop ' ' 'w' 'W' nop nop C + 041 0xb2 nop nop nop '|' '|' nop nop O 042 lshift lshift lshift lshift lshift lshift lshift lshift O - 043 126 '#' nop ' ' '~' '#' nop nop O - 044 ';' '@' nop ' ' ';' '@' nop nop O - 045 'q' 'Q' nop ' ' 'q' 'Q' nop nop C - 046 ',' '\' nop ' ' ',' '\' nop nop O - 047 'i' 'I' nop ' ' 'i' 'I' nop nop C - 048 'y' 'Y' nop ' ' 'y' 'Y' nop nop C - 049 'x' 'X' nop ' ' 'x' 'X' nop nop C - 050 'r' 'R' nop ' ' 'r' 'R' nop nop C - 051 'l' 'L' nop ' ' 'l' 'L' nop nop C - 052 'p' 'P' nop ' ' 'p' 'P' nop nop C - 053 'j' 'J' nop ' ' 'j' 'J' nop nop N + 043 '~' '#' nop ' ' '~' '#' nop nop O + 044 ';' '@' nop ' ' ';' '@' nop nop O + 045 'q' 'Q' nop ' ' 'q' 'Q' nop nop C + 046 ',' '\' nop ' ' ',' '\' nop nop O + 047 'i' 'I' nop ' ' 'i' 'I' nop nop C + 048 'y' 'Y' nop ' ' 'y' 'Y' nop nop C + 049 'x' 'X' nop ' ' 'x' 'X' nop nop C + 050 'r' 'R' nop ' ' 'r' 'R' nop nop C + 051 'l' 'L' nop ' ' 'l' 'L' nop nop C + 052 'p' 'P' nop ' ' 'p' 'P' nop nop C + 053 'j' 'J' nop ' ' 'j' 'J' nop nop N 054 rshift rshift rshift rshift rshift rshift rshift rshift O 055 '*' '*' '*' '*' '*' '*' '*' '*' O 056 lalt lalt lalt lalt lalt lalt lalt lalt O @@ -97,7 +97,7 @@ 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 O + 086 '+' '*' 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 @@ -114,7 +114,7 @@ 100 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 O 101 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 O 102 fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 O - 103 fkey61 fkey61 fkey61 fkey61 fkey61 fkey61 boot 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 Modified: head/share/vt/keymaps/fr.macbook.kbd ============================================================================== --- head/share/vt/keymaps/fr.macbook.kbd Wed Aug 20 16:59:33 2014 (r270228) +++ head/share/vt/keymaps/fr.macbook.kbd Wed Aug 20 17:00:47 2014 (r270229) @@ -30,7 +30,7 @@ 024 'o' 'O' si si 0xbd 0xbc si si C 025 'p' 'P' dle dle 0xf7 0xe6 dle dle C 026 dcir duml esc esc '[' '{' esc esc O - 027 '$' '*' gs gs 0x20ac '}' gs gs O + 027 '$' '*' gs gs 0xa4 '}' gs gs O 028 cr cr nl nl cr cr nl nl O 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O 030 'q' 'Q' dc1 dc1 'q' 'Q' soh soh C @@ -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 ) Modified: head/share/vt/keymaps/is.kbd ============================================================================== --- head/share/vt/keymaps/is.kbd Wed Aug 20 16:59:33 2014 (r270228) +++ head/share/vt/keymaps/is.kbd Wed Aug 20 17:00:47 2014 (r270229) @@ -8,7 +8,7 @@ 002 '1' '!' nop nop nop nop nop nop O 003 '2' '"' nul nul nop nop nul nul O 004 '3' '#' nop nop 0xa3 nop nop nop O - 005 '4' '$' nop nop 0x20ac nop nop nop O + 005 '4' '$' nop nop 0xa4 nop nop nop O 006 '5' '%' nop nop nop nop nop nop O 007 '6' '&' nop nop nop nop nop nop O 008 '7' '/' nop nop '{' nop nop nop O @@ -44,7 +44,7 @@ 038 'l' 'L' ff ff 'l' 'L' ff ff C 039 0xe6 0xc6 nop nop '|' '\' nop nop C 040 0xb4 0xb4 nop nop '~' '[' nop nop C - 041 0xb0 0x0161 nop nop '^' '*' nop nop O + 041 0xb0 0xa8 nop nop '^' '*' nop nop O 042 lshift lshift lshift lshift lshift lshift lshift lshift O 043 '+' '*' nop nop '`' '*' nop nop C 044 'z' 'Z' sub sub 'z' 'Z' sub sub C Modified: head/share/vt/keymaps/it.kbd ============================================================================== --- head/share/vt/keymaps/it.kbd Wed Aug 20 16:59:33 2014 (r270228) +++ head/share/vt/keymaps/it.kbd Wed Aug 20 17:00:47 2014 (r270229) @@ -34,9 +34,9 @@ 002 '1' '!' nop nop 0xb9 0xa1 nop nop O 003 '2' '"' nul duml 0xb2 nop nul nul O 004 '3' 0xa3 nop nop 0xb3 0xa3 nop nop O - 005 '4' '$' nop nop 0x0152 '$' nop nop O - 006 '5' '%' nop nop 0x0153 nop nop nop O - 007 '6' '&' rs rs 0x0178 nop rs rs O + 005 '4' '$' nop nop 0xbc '$' nop nop O + 006 '5' '%' nop nop 0xbd nop nop nop O + 007 '6' '&' rs rs 0xbe nop rs rs O 008 '7' '/' nop nop '{' nop nop nop O 009 '8' '(' nop nop '[' nop nop nop O 010 '9' ')' nop nop ']' 0xb1 nop nop O @@ -115,7 +115,7 @@ 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 '|' 0x0160 nop nop O + 086 '<' '>' nop nop '|' 0xa6 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 @@ -142,7 +142,7 @@ ( 'i' 0xec ) ( 'I' 0xcc ) ( 'o' 0xf2 ) ( 'O' 0xd2 ) ( 'u' 0xf9 ) ( 'U' 0xd9 ) - dacu 0xb4 ( 'a' 0xe1 ) ( 'A' 0xc1 ) ( 'e' 0xe9 ) ( 'E' 0xc9 ) + dacu ''' ( 'a' 0xe1 ) ( 'A' 0xc1 ) ( 'e' 0xe9 ) ( 'E' 0xc9 ) ( 'i' 0xed ) ( 'I' 0xcd ) ( 'o' 0xf3 ) ( 'O' 0xd3 ) ( 'u' 0xfa ) ( 'U' 0xda ) ( 'y' 0xfd ) ( 'Y' 0xdd ) Modified: head/share/vt/keymaps/jp.pc98.iso.kbd ============================================================================== --- head/share/vt/keymaps/jp.pc98.iso.kbd Wed Aug 20 16:59:33 2014 (r270228) +++ head/share/vt/keymaps/jp.pc98.iso.kbd Wed Aug 20 17:00:47 2014 (r270229) @@ -16,7 +16,7 @@ 010 '0' ')' ')' ')' '0' nop '0' '0' O 011 '-' '_' us us '-' '=' '-' '-' O 012 '=' '+' '+' '+' '^' '`' rs rs O - 013 '\' '|' fs fs '\' '|' fs fs O + 013 0xa5 '|' fs fs 0xa5 '|' fs fs O 014 bs bs bs bs bs bs bs bs O 015 ht btab ht btab ht btab ht btab O 016 'q' 'Q' dc1 dc1 'q' 'Q' dc1 dc1 C Modified: head/share/vt/keymaps/jp.pc98.kbd ============================================================================== --- head/share/vt/keymaps/jp.pc98.kbd Wed Aug 20 16:59:33 2014 (r270228) +++ head/share/vt/keymaps/jp.pc98.kbd Wed Aug 20 17:00:47 2014 (r270229) @@ -16,7 +16,7 @@ 010 '0' nop '0' '0' '0' ')' ')' ')' O 011 '-' '=' '-' '-' '-' '_' us us O 012 '^' '`' rs rs '=' '+' '+' '+' O - 013 '\' '|' fs fs '\' '|' fs fs O + 013 0xa5 '|' fs fs 0xa5 '|' fs fs O 014 bs bs bs bs bs bs bs bs O 015 ht btab ht btab ht btab ht btab O 016 'q' 'Q' dc1 dc1 'q' 'Q' dc1 dc1 C @@ -54,7 +54,7 @@ 048 ',' '<' '<' '<' ',' '<' '<' '<' O 049 '.' '>' '>' '>' '.' '>' '>' '>' O 050 '/' '?' del del '/' '?' del del O - 051 nop '_' us us '\' '|' fs fs O + 051 '\' '_' us us '\' '|' fs fs O 052 ' ' ' ' nul nul ' ' ' ' nul nul O 053 esc esc esc esc esc esc esc esc O 054 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 O Modified: head/share/vt/keymaps/no.dvorak.kbd ============================================================================== --- head/share/vt/keymaps/no.dvorak.kbd Wed Aug 20 16:59:33 2014 (r270228) +++ head/share/vt/keymaps/no.dvorak.kbd Wed Aug 20 17:00:47 2014 (r270229) @@ -8,7 +8,7 @@ 002 '1' '!' nop nop '1' '!' nop nop O 003 '2' '"' nul nul '@' '@' nul nul O 004 '3' '#' nop nop 0x9e '#' nop nop O - 005 '4' 0x20ac nop nop '$' 0x20ac nop nop O + 005 '4' 0xa4 nop nop '$' 0xa4 nop nop O 006 '5' '%' nop nop '5' '%' nop nop O 007 '6' '&' rs rs '6' '&' nop nop O 008 '7' '/' nop nop '{' '/' nop nop O @@ -30,7 +30,7 @@ 024 'r' 'R' dc2 dc2 'r' 'R' dc2 dc2 C 025 'l' 'L' ff ff 'l' 'L' ff ff C 026 ''' '*' nop nop ''' 0xd7 nop nop O - 027 0x0161 '^' rs rs 0xac '^' rs rs O + 027 0xa8 '^' rs rs 0xac '^' rs rs 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 @@ -44,7 +44,7 @@ 038 'n' 'N' so so 'n' 'N' so so C 039 's' 'S' dc3 dc3 's' 'S' dc3 dc3 C 040 '-' '_' us us '-' '_' us us O - 041 '|' 0xa7 nop nop 0x0160 0xb6 nop nop O + 041 '|' 0xa7 nop nop 0xa6 0xb6 nop nop O 042 lshift lshift lshift lshift lshift lshift lshift lshift O 043 '<' '>' nop nop '|' '\' nop nop C 044 0xe6 0xc6 nop nop '{' '[' nop nop C Modified: head/share/vt/keymaps/no.kbd ============================================================================== --- head/share/vt/keymaps/no.kbd Wed Aug 20 16:59:33 2014 (r270228) +++ head/share/vt/keymaps/no.kbd Wed Aug 20 17:00:47 2014 (r270229) @@ -8,7 +8,7 @@ 002 '1' '!' nop nop '1' '!' nop nop O 003 '2' '"' nul nul '@' '@' nul nul O 004 '3' '#' nop nop 0x9e '#' nop nop O - 005 '4' 0x20ac nop nop '$' 0x20ac nop nop O + 005 '4' 0xa4 nop nop '$' 0xa4 nop nop O 006 '5' '%' nop nop '5' '%' nop nop O 007 '6' '&' nop nop '6' '&' nop nop O 008 '7' '/' nop nop '{' '/' nop nop O @@ -44,7 +44,7 @@ 038 'l' 'L' ff ff 'l' 'L' ff ff C 039 0xf8 0xd8 nop nop '|' '\' nop nop C 040 0xe6 0xc6 nop nop '{' '[' nop nop C - 041 '|' 0xa7 nop nop 0x0160 0xb6 nop nop O + 041 '|' 0xa7 nop nop 0xa6 0xb6 nop nop O 042 lshift lshift lshift lshift lshift lshift lshift lshift O 043 ''' '*' nop nop ''' 0xd7 nop nop O 044 'z' 'Z' sub sub 'z' 'Z' sub sub C @@ -54,7 +54,7 @@ 048 'b' 'B' stx stx 'b' 'B' stx stx C 049 'n' 'N' so so 0xf1 0xd1 so so C 050 'm' 'M' cr cr 0xb5 0xba cr cr C - 051 ',' ';' nop nop 0x017e 0xab nop nop O + 051 ',' ';' nop nop 0xb8 0xab nop nop O 052 '.' ':' nop nop 0xb7 0xbb nop nop O 053 '-' '_' us us 0xad 0xad us us O 054 rshift rshift rshift rshift rshift rshift rshift rshift O Modified: head/share/vt/keymaps/nordic.asus-eee.kbd ============================================================================== --- head/share/vt/keymaps/nordic.asus-eee.kbd Wed Aug 20 16:59:33 2014 (r270228) +++ head/share/vt/keymaps/nordic.asus-eee.kbd Wed Aug 20 17:00:47 2014 (r270229) @@ -8,7 +8,7 @@ 002 '1' '!' nop nop nop nop nop nop O 003 '2' '"' nul nul '@' '@' nul nul O 004 '3' '#' nop nop 0xa3 nop nop nop O - 005 '4' 0x20ac nop nop '$' nop nop nop O + 005 '4' 0xa4 nop nop '$' nop nop nop O 006 '5' '%' nop nop nop nop nop nop O 007 '6' '&' nop nop nop nop nop nop O # Alt + Shift + 7 = ÷ @@ -23,16 +23,16 @@ 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 -# Alt + Ctrl + E = French e (as in café) +# Alt + Ctrl + E = French e (as in café) 018 'e' 'E' enq enq 0x20ac 'E' 0xe9 enq C -# Alt + R = Copyright sign +# Alt + R = Registered sign 019 'r' 'R' dc2 dc2 0xae 'R' dc2 dc2 C 020 't' 'T' dc4 dc4 't' 'T' dc4 dc4 C 021 'y' 'Y' em em 'y' 'Y' em em C -# Alt + U = Mikro, Alt + Shift + U = German u +# Alt + U = Mikro, Alt + Shift + U = German U (???) 022 'u' 'U' nak nak 0xb5 'U' 0xfc 0xdc C 023 'i' 'I' ht ht 'i' 'I' ht ht C *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 17:02:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D7C8665; Wed, 20 Aug 2014 17:02:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3822E3847; Wed, 20 Aug 2014 17:02:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KH2cIW008425; Wed, 20 Aug 2014 17:02:38 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KH2cRQ008423; Wed, 20 Aug 2014 17:02:38 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201408201702.s7KH2cRQ008423@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Wed, 20 Aug 2014 17:02:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270230 - head/sys/arm/ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 17:02:38 -0000 Author: loos Date: Wed Aug 20 17:02:37 2014 New Revision: 270230 URL: http://svnweb.freebsd.org/changeset/base/270230 Log: Rewrite of ti_i2c based on gonzo's patch, fix the following bugs/problems: . interrupt storm detected on "intr70:"; throttling interrupt source; . Added access serialization on iicbus_transfer(), previously there was no such protection and a new transfer could easily confuse the controller; . Add error checkings (i.e. stop the transfer when a error is detected and do _not_ overwrite the previous error); . On command done interrupt do not assume that the transfer was finished sucessfully as we will receive the command done interrupt even after errors; . Simplify the FIFO handling; . Reset the FIFO between the transfers as the FIFO may contain data from the last (failed) transfer; . Fix the iicbus speed for AM335x, which in turn will make better use of the I2C noise filter (set to one internal clock cycle); . Move the read and write handler to ithread instead of notifying the requesting thread with wakeup(9); . Fix the comments based on OMAP4 TRM. The above changes allows me to read the EDID from my HDMI monitor on BBB with gonzo's patches to support TDA19988 (which does 128 bytes reads) and repeatedly scan the iicbus (with a modified i2c(8)) without lock up the bus. Phabric: D465 Modified: head/sys/arm/ti/ti_i2c.c head/sys/arm/ti/ti_i2c.h Modified: head/sys/arm/ti/ti_i2c.c ============================================================================== --- head/sys/arm/ti/ti_i2c.c Wed Aug 20 17:00:47 2014 (r270229) +++ head/sys/arm/ti/ti_i2c.c Wed Aug 20 17:02:37 2014 (r270230) @@ -1,6 +1,6 @@ /*- - * Copyright (c) 2011 - * Ben Gray . + * Copyright (c) 2011 Ben Gray . + * Copyright (c) 2014 Luiz Otavio O Souza . * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -58,9 +58,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include -#include #include #include #include @@ -90,8 +90,13 @@ struct ti_i2c_softc struct mtx sc_mtx; - volatile uint16_t sc_stat_flags; /* contains the status flags last IRQ */ + struct iic_msg* sc_buffer; + int sc_bus_inuse; + int sc_buffer_pos; + int sc_error; + int sc_fifo_trsh; + uint16_t sc_con_reg; uint16_t sc_rev; }; @@ -106,63 +111,54 @@ struct ti_i2c_clock_config uint8_t hssclh; /* High Speed mode SCL high time */ }; +#if defined(SOC_OMAP3) +#error "Unsupported SoC" +#endif + #if defined(SOC_OMAP4) static struct ti_i2c_clock_config ti_omap4_i2c_clock_configs[] = { - { IIC_SLOW, 100000, 23, 13, 15, 0, 0}, - { IIC_FAST, 400000, 9, 5, 7, 0, 0}, - { IIC_FASTEST, 3310000, 1, 113, 115, 7, 10}, + { IIC_UNKNOWN, 100000, 23, 13, 15, 0, 0}, + { IIC_SLOW, 100000, 23, 13, 15, 0, 0}, + { IIC_FAST, 400000, 9, 5, 7, 0, 0}, + { IIC_FASTEST, 1000000, 5, 3, 4, 0, 0}, + /* { IIC_FASTEST, 3200000, 1, 113, 115, 7, 10}, - HS mode */ { -1, 0 } }; #endif #if defined(SOC_TI_AM335X) +/* + * AM335X doesn't support HS mode. For 100kHz I2C clock set the internal + * clock to 12Mhz, for 400kHz I2C clock set the internal clock to 24Mhz. + */ static struct ti_i2c_clock_config ti_am335x_i2c_clock_configs[] = { - { IIC_SLOW, 100000, 3, 53, 55, 0, 0}, - { IIC_FAST, 400000, 3, 8, 10, 0, 0}, - { IIC_FASTEST, 400000, 3, 8, 10, 0, 0}, /* This might be higher */ + { IIC_UNKNOWN, 100000, 7, 59, 61, 0, 0}, + { IIC_SLOW, 100000, 7, 59, 61, 0, 0}, + { IIC_FAST, 400000, 3, 23, 25, 0, 0}, + { IIC_FASTEST, 400000, 3, 23, 25, 0, 0}, { -1, 0 } }; #endif - -#define TI_I2C_REV1 0x003C /* OMAP3 */ -#define TI_I2C_REV2 0x000A /* OMAP4 */ - /** * Locking macros used throughout the driver */ -#define TI_I2C_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) -#define TI_I2C_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) -#define TI_I2C_LOCK_INIT(_sc) \ - mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->sc_dev), \ - "ti_i2c", MTX_DEF) -#define TI_I2C_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx); -#define TI_I2C_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED); -#define TI_I2C_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED); +#define TI_I2C_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) +#define TI_I2C_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) +#define TI_I2C_LOCK_INIT(_sc) \ + mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->sc_dev), \ + "ti_i2c", MTX_DEF) +#define TI_I2C_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx) +#define TI_I2C_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED) +#define TI_I2C_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED) #ifdef DEBUG -#define ti_i2c_dbg(_sc, fmt, args...) \ - device_printf((_sc)->sc_dev, fmt, ##args) +#define ti_i2c_dbg(_sc, fmt, args...) \ + device_printf((_sc)->sc_dev, fmt, ##args) #else -#define ti_i2c_dbg(_sc, fmt, args...) +#define ti_i2c_dbg(_sc, fmt, args...) #endif -static devclass_t ti_i2c_devclass; - -/* bus entry points */ - -static int ti_i2c_probe(device_t dev); -static int ti_i2c_attach(device_t dev); -static int ti_i2c_detach(device_t dev); -static void ti_i2c_intr(void *); - -/* OFW routine */ -static phandle_t ti_i2c_get_node(device_t bus, device_t dev); - -/* helper routines */ -static int ti_i2c_activate(device_t dev); -static void ti_i2c_deactivate(device_t dev); - /** * ti_i2c_read_2 - reads a 16-bit value from one of the I2C registers * @sc: I2C device context @@ -178,7 +174,8 @@ static void ti_i2c_deactivate(device_t d static inline uint16_t ti_i2c_read_2(struct ti_i2c_softc *sc, bus_size_t off) { - return bus_read_2(sc->sc_mem_res, off); + + return (bus_read_2(sc->sc_mem_res, off)); } /** @@ -196,142 +193,117 @@ ti_i2c_read_2(struct ti_i2c_softc *sc, b static inline void ti_i2c_write_2(struct ti_i2c_softc *sc, bus_size_t off, uint16_t val) { - bus_write_2(sc->sc_mem_res, off, val); -} - -/** - * ti_i2c_read_reg - reads a 16-bit value from one of the I2C registers - * take into account revision-dependent register offset - * @sc: I2C device context - * @off: the byte offset within the register bank to read from. - * - * - * LOCKING: - * No locking required - * - * RETURNS: - * 16-bit value read from the register. - */ -static inline uint16_t -ti_i2c_read_reg(struct ti_i2c_softc *sc, bus_size_t off) -{ - /* XXXOMAP3: FIXME add registers mapping here */ - return bus_read_2(sc->sc_mem_res, off); -} -/** - * ti_i2c_write_reg - writes a 16-bit value to one of the I2C registers - * take into account revision-dependent register offset - * @sc: I2C device context - * @off: the byte offset within the register bank to read from. - * @val: the value to write into the register - * - * LOCKING: - * No locking required - * - * RETURNS: - * 16-bit value read from the register. - */ -static inline void -ti_i2c_write_reg(struct ti_i2c_softc *sc, bus_size_t off, uint16_t val) -{ - /* XXXOMAP3: FIXME add registers mapping here */ bus_write_2(sc->sc_mem_res, off, val); } -/** - * ti_i2c_set_intr_enable - writes the interrupt enable register - * @sc: I2C device context - * @ie: bitmask of the interrupts to enable - * - * This function is needed as writing the I2C_IE register on the OMAP4 devices - * doesn't seem to actually enable the interrupt, rather you have to write - * through the I2C_IRQENABLE_CLR and I2C_IRQENABLE_SET registers. - * - * LOCKING: - * No locking required - * - * RETURNS: - * Nothing. - */ -static inline void -ti_i2c_set_intr_enable(struct ti_i2c_softc *sc, uint16_t ie) -{ - /* XXXOMAP3: FIXME */ - ti_i2c_write_2(sc, I2C_REG_IRQENABLE_CLR, 0xffff); - if (ie) - ti_i2c_write_2(sc, I2C_REG_IRQENABLE_SET, ie); -} - -/** - * ti_i2c_reset - attach function for the driver - * @dev: i2c device handle - * - * - * - * LOCKING: - * Called from timer context - * - * RETURNS: - * EH_HANDLED or EH_NOT_HANDLED - */ static int -ti_i2c_reset(device_t dev, u_char speed, u_char addr, u_char *oldaddr) +ti_i2c_transfer_intr(struct ti_i2c_softc* sc, uint16_t status) { - struct ti_i2c_softc *sc = device_get_softc(dev); - struct ti_i2c_clock_config *clkcfg; - uint16_t con_reg; + int amount, done, i; - switch (ti_chip()) { -#ifdef SOC_OMAP4 - case CHIP_OMAP_4: - clkcfg = ti_omap4_i2c_clock_configs; - break; -#endif -#ifdef SOC_TI_AM335X - case CHIP_AM335X: - clkcfg = ti_am335x_i2c_clock_configs; - break; -#endif - default: - panic("Unknown Ti SoC, unable to reset the i2c"); + done = 0; + amount = 0; + /* Check for the error conditions. */ + if (status & I2C_STAT_NACK) { + /* No ACK from slave. */ + ti_i2c_dbg(sc, "NACK\n"); + ti_i2c_write_2(sc, I2C_REG_STATUS, I2C_STAT_NACK); + sc->sc_error = ENXIO; + } else if (status & I2C_STAT_AL) { + /* Arbitration lost. */ + ti_i2c_dbg(sc, "Arbitration lost\n"); + ti_i2c_write_2(sc, I2C_REG_STATUS, I2C_STAT_AL); + sc->sc_error = ENXIO; + } + + /* Check if we have finished. */ + if (status & I2C_STAT_ARDY) { + /* Register access ready - transaction complete basically. */ + ti_i2c_dbg(sc, "ARDY transaction complete\n"); + if (sc->sc_error != 0 && sc->sc_buffer->flags & IIC_M_NOSTOP) { + ti_i2c_write_2(sc, I2C_REG_CON, + sc->sc_con_reg | I2C_CON_STP); + } + ti_i2c_write_2(sc, I2C_REG_STATUS, + I2C_STAT_ARDY | I2C_STAT_RDR | I2C_STAT_RRDY | + I2C_STAT_XDR | I2C_STAT_XRDY); + return (1); } - while (clkcfg->speed != -1) { - if (clkcfg->speed == speed) - break; - /* take slow if speed is unknown */ - if ((speed == IIC_UNKNOWN) && (clkcfg->speed == IIC_SLOW)) - break; - clkcfg++; - } - if (clkcfg->speed == -1) - return (EINVAL); - TI_I2C_LOCK(sc); + if (sc->sc_buffer->flags & IIC_M_RD) { + /* Read some data. */ + if (status & I2C_STAT_RDR) { + /* + * Receive draining interrupt - last data received. + * The set FIFO threshold wont be reached to trigger + * RRDY. + */ + ti_i2c_dbg(sc, "Receive draining interrupt\n"); - /* 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); - - /* Program the prescaler */ - ti_i2c_write_reg(sc, I2C_REG_PSC, clkcfg->psc); - - /* Set the bitrate */ - 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)); - - /* Check if we are dealing with high speed mode */ - if ((clkcfg->hsscll + clkcfg->hssclh) > 0) - con_reg = I2C_CON_OPMODE_HS; - else - con_reg = I2C_CON_OPMODE_STD; + /* + * Drain the FIFO. Read the pending data in the FIFO. + */ + amount = sc->sc_buffer->len - sc->sc_buffer_pos; + } else if (status & I2C_STAT_RRDY) { + /* + * Receive data ready interrupt - FIFO has reached the + * set threshold. + */ + ti_i2c_dbg(sc, "Receive data ready interrupt\n"); - /* Enable the I2C module again */ - ti_i2c_write_reg(sc, I2C_REG_CON, I2C_CON_I2C_EN | con_reg); + amount = min(sc->sc_fifo_trsh, + sc->sc_buffer->len - sc->sc_buffer_pos); + } - TI_I2C_UNLOCK(sc); + /* Read the bytes from the fifo. */ + for (i = 0; i < amount; i++) + sc->sc_buffer->buf[sc->sc_buffer_pos++] = + (uint8_t)(ti_i2c_read_2(sc, I2C_REG_DATA) & 0xff); + + if (status & I2C_STAT_RDR) + ti_i2c_write_2(sc, I2C_REG_STATUS, I2C_STAT_RDR); + if (status & I2C_STAT_RRDY) + ti_i2c_write_2(sc, I2C_REG_STATUS, I2C_STAT_RRDY); - return (IIC_ENOADDR); + } else { + /* Write some data. */ + if (status & I2C_STAT_XDR) { + /* + * Transmit draining interrupt - FIFO level is below + * the set threshold and the amount of data still to + * be transferred wont reach the set FIFO threshold. + */ + ti_i2c_dbg(sc, "Transmit draining interrupt\n"); + + /* + * Drain the TX data. Write the pending data in the + * FIFO. + */ + amount = sc->sc_buffer->len - sc->sc_buffer_pos; + } else if (status & I2C_STAT_XRDY) { + /* + * Transmit data ready interrupt - the FIFO level + * is below the set threshold. + */ + ti_i2c_dbg(sc, "Transmit data ready interrupt\n"); + + amount = min(sc->sc_fifo_trsh, + sc->sc_buffer->len - sc->sc_buffer_pos); + } + + /* Write the bytes from the fifo. */ + for (i = 0; i < amount; i++) + ti_i2c_write_2(sc, I2C_REG_DATA, + sc->sc_buffer->buf[sc->sc_buffer_pos++]); + + if (status & I2C_STAT_XDR) + ti_i2c_write_2(sc, I2C_REG_STATUS, I2C_STAT_XDR); + if (status & I2C_STAT_XRDY) + ti_i2c_write_2(sc, I2C_REG_STATUS, I2C_STAT_XRDY); + } + + return (done); } /** @@ -349,381 +321,41 @@ ti_i2c_reset(device_t dev, u_char speed, static void ti_i2c_intr(void *arg) { - struct ti_i2c_softc *sc = (struct ti_i2c_softc*) arg; - uint16_t status; + int done; + struct ti_i2c_softc *sc; + uint16_t events, status; - status = ti_i2c_read_reg(sc, I2C_REG_STAT); - if (status == 0) - return; + sc = (struct ti_i2c_softc *)arg; TI_I2C_LOCK(sc); - /* save the flags */ - sc->sc_stat_flags |= status; - - /* clear the status flags */ - ti_i2c_write_reg(sc, I2C_REG_STAT, status); - - /* wakeup the process the started the transaction */ - wakeup(sc); - - TI_I2C_UNLOCK(sc); - - return; -} - -/** - * ti_i2c_wait - waits for the specific event to occur - * @sc: i2c driver context - * @flags: the event(s) to wait on, this is a bitmask of the I2C_STAT_??? flags - * @statp: if not null will contain the status flags upon return - * @timo: the number of ticks to wait - * - * - * - * LOCKING: - * The driver context must be locked before calling this function. Internally - * the function sleeps, releasing the lock as it does so, however the lock is - * always retaken before this function returns. - * - * RETURNS: - * 0 if the event(s) were tripped within timeout period - * EBUSY if timedout waiting for the events - * ENXIO if a NACK event was received - */ -static int -ti_i2c_wait(struct ti_i2c_softc *sc, uint16_t flags, uint16_t *statp, int timo) -{ - int waittime = timo; - int start_ticks = ticks; - int rc; - - TI_I2C_ASSERT_LOCKED(sc); - - /* check if the condition has already occured, the interrupt routine will - * clear the status flags. - */ - if ((sc->sc_stat_flags & flags) == 0) { - - /* condition(s) haven't occured so sleep on the IRQ */ - while (waittime > 0) { - - rc = mtx_sleep(sc, &sc->sc_mtx, 0, "I2Cwait", waittime); - if (rc == EWOULDBLOCK) { - /* timed-out, simply break out of the loop */ - break; - } else { - /* IRQ has been tripped, but need to sanity check we have the - * right events in the status flag. - */ - if ((sc->sc_stat_flags & flags) != 0) - break; - - /* event hasn't been tripped so wait some more */ - waittime -= (ticks - start_ticks); - start_ticks = ticks; - } - } - } - - /* copy the actual status bits */ - if (statp != NULL) - *statp = sc->sc_stat_flags; - - /* return the status found */ - if ((sc->sc_stat_flags & flags) != 0) - rc = 0; - else - rc = EBUSY; - - /* clear the flags set by the interrupt handler */ - sc->sc_stat_flags = 0; - - return (rc); -} - -/** - * ti_i2c_wait_for_free_bus - waits for the bus to become free - * @sc: i2c driver context - * @timo: the time to wait for the bus to become free - * - * - * - * LOCKING: - * The driver context must be locked before calling this function. Internally - * the function sleeps, releasing the lock as it does so, however the lock is - * always taken before this function returns. - * - * RETURNS: - * 0 if the event(s) were tripped within timeout period - * EBUSY if timedout waiting for the events - * ENXIO if a NACK event was received - */ -static int -ti_i2c_wait_for_free_bus(struct ti_i2c_softc *sc, int timo) -{ - /* check if the bus is free, BB bit = 0 */ - if ((ti_i2c_read_reg(sc, I2C_REG_STAT) & I2C_STAT_BB) == 0) - return 0; - - /* enable bus free interrupts */ - ti_i2c_set_intr_enable(sc, I2C_IE_BF); - - /* wait for the bus free interrupt to be tripped */ - return ti_i2c_wait(sc, I2C_STAT_BF, NULL, timo); -} - -/** - * ti_i2c_read_bytes - attempts to perform a read operation - * @sc: i2c driver context - * @buf: buffer to hold the received bytes - * @len: the number of bytes to read - * - * This function assumes the slave address is already set - * - * LOCKING: - * The context lock should be held before calling this function - * - * RETURNS: - * 0 on function succeeded - * EINVAL if invalid message is passed as an arg - */ -static int -ti_i2c_read_bytes(struct ti_i2c_softc *sc, uint8_t *buf, uint16_t len) -{ - int timo = (hz / 4); - int err = 0; - uint16_t con_reg; - uint16_t events; - uint16_t status; - uint32_t amount = 0; - uint32_t sofar = 0; - uint32_t i; - - /* wait for the bus to become free */ - err = ti_i2c_wait_for_free_bus(sc, timo); - if (err != 0) { - device_printf(sc->sc_dev, "bus never freed\n"); - return (err); + status = ti_i2c_read_2(sc, I2C_REG_STATUS); + if (status == 0) { + TI_I2C_UNLOCK(sc); + return; } - /* set the events to wait for */ - events = I2C_IE_RDR | /* Receive draining interrupt */ - I2C_IE_RRDY | /* Receive Data Ready interrupt */ - I2C_IE_ARDY | /* Register Access Ready interrupt */ - I2C_IE_NACK | /* No Acknowledgment interrupt */ - I2C_IE_AL; + /* Save enabled interrupts. */ + events = ti_i2c_read_2(sc, I2C_REG_IRQENABLE_SET); - /* enable interrupts for the events we want */ - ti_i2c_set_intr_enable(sc, events); - - /* write the number of bytes to read */ - ti_i2c_write_reg(sc, I2C_REG_CNT, len); - - /* clear the write bit and initiate the read transaction. Setting the STT - * (start) bit initiates the transfer. - */ - con_reg = ti_i2c_read_reg(sc, I2C_REG_CON); - con_reg &= ~I2C_CON_TRX; - con_reg |= I2C_CON_MST | I2C_CON_STT | I2C_CON_STP; - ti_i2c_write_reg(sc, I2C_REG_CON, con_reg); - - /* reading loop */ - while (1) { - - /* wait for an event */ - err = ti_i2c_wait(sc, events, &status, timo); - if (err != 0) { - break; - } + /* We only care about enabled interrupts. */ + status &= events; - /* check for the error conditions */ - if (status & I2C_STAT_NACK) { - /* no ACK from slave */ - ti_i2c_dbg(sc, "NACK\n"); - err = ENXIO; - break; - } - if (status & I2C_STAT_AL) { - /* arbitration lost */ - ti_i2c_dbg(sc, "Arbitration lost\n"); - err = ENXIO; - break; - } + done = 0; - /* check if we have finished */ - if (status & I2C_STAT_ARDY) { - /* register access ready - transaction complete basically */ - ti_i2c_dbg(sc, "ARDY transaction complete\n"); - err = 0; - break; - } - - /* read some data */ - if (status & I2C_STAT_RDR) { - /* Receive draining interrupt - last data received */ - ti_i2c_dbg(sc, "Receive draining interrupt\n"); - - /* get the number of bytes in the FIFO */ - amount = ti_i2c_read_reg(sc, I2C_REG_BUFSTAT); - amount >>= 8; - amount &= 0x3f; - } - else if (status & I2C_STAT_RRDY) { - /* Receive data ready interrupt - enough data received */ - ti_i2c_dbg(sc, "Receive data ready interrupt\n"); - - /* get the number of bytes in the FIFO */ - amount = ti_i2c_read_reg(sc, I2C_REG_BUF); - amount >>= 8; - amount &= 0x3f; - amount += 1; - } - - /* sanity check we haven't overwritten the array */ - if ((sofar + amount) > len) { - ti_i2c_dbg(sc, "to many bytes to read\n"); - amount = (len - sofar); - } - - /* read the bytes from the fifo */ - for (i = 0; i < amount; i++) { - buf[sofar++] = (uint8_t)(ti_i2c_read_reg(sc, I2C_REG_DATA) & 0xff); - } - - /* attempt to clear the receive ready bits */ - ti_i2c_write_reg(sc, I2C_REG_STAT, I2C_STAT_RDR | I2C_STAT_RRDY); + if (sc->sc_buffer != NULL) + done = ti_i2c_transfer_intr(sc, status); + else { + ti_i2c_dbg(sc, "Transfer interrupt without buffer\n"); + sc->sc_error = EINVAL; + done = 1; } - /* reset the registers regardless if there was an error or not */ - ti_i2c_set_intr_enable(sc, 0x0000); - ti_i2c_write_reg(sc, I2C_REG_CON, I2C_CON_I2C_EN | I2C_CON_MST | I2C_CON_STP); - - return (err); -} - -/** - * ti_i2c_write_bytes - attempts to perform a read operation - * @sc: i2c driver context - * @buf: buffer containing the bytes to write - * @len: the number of bytes to write - * - * This function assumes the slave address is already set - * - * LOCKING: - * The context lock should be held before calling this function - * - * RETURNS: - * 0 on function succeeded - * EINVAL if invalid message is passed as an arg - */ -static int -ti_i2c_write_bytes(struct ti_i2c_softc *sc, const uint8_t *buf, uint16_t len) -{ - int timo = (hz / 4); - int err = 0; - uint16_t con_reg; - uint16_t events; - uint16_t status; - uint32_t amount = 0; - uint32_t sofar = 0; - uint32_t i; - - /* wait for the bus to become free */ - err = ti_i2c_wait_for_free_bus(sc, timo); - if (err != 0) - return (err); - - /* set the events to wait for */ - events = I2C_IE_XDR | /* Transmit draining interrupt */ - I2C_IE_XRDY | /* Transmit Data Ready interrupt */ - I2C_IE_ARDY | /* Register Access Ready interrupt */ - I2C_IE_NACK | /* No Acknowledgment interrupt */ - I2C_IE_AL; - - /* enable interrupts for the events we want*/ - ti_i2c_set_intr_enable(sc, events); - - /* write the number of bytes to write */ - ti_i2c_write_reg(sc, I2C_REG_CNT, len); + if (done) + /* Wakeup the process that started the transaction. */ + wakeup(sc); - /* set the write bit and initiate the write transaction. Setting the STT - * (start) bit initiates the transfer. - */ - con_reg = ti_i2c_read_reg(sc, I2C_REG_CON); - con_reg |= I2C_CON_TRX | I2C_CON_MST | I2C_CON_STT | I2C_CON_STP; - ti_i2c_write_reg(sc, I2C_REG_CON, con_reg); - - /* writing loop */ - while (1) { - - /* wait for an event */ - err = ti_i2c_wait(sc, events, &status, timo); - if (err != 0) { - break; - } - - /* check for the error conditions */ - if (status & I2C_STAT_NACK) { - /* no ACK from slave */ - ti_i2c_dbg(sc, "NACK\n"); - err = ENXIO; - break; - } - if (status & I2C_STAT_AL) { - /* arbitration lost */ - ti_i2c_dbg(sc, "Arbitration lost\n"); - err = ENXIO; - break; - } - - /* check if we have finished */ - if (status & I2C_STAT_ARDY) { - /* register access ready - transaction complete basically */ - ti_i2c_dbg(sc, "ARDY transaction complete\n"); - err = 0; - break; - } - - /* read some data */ - if (status & I2C_STAT_XDR) { - /* Receive draining interrupt - last data received */ - ti_i2c_dbg(sc, "Transmit draining interrupt\n"); - - /* get the number of bytes in the FIFO */ - amount = ti_i2c_read_reg(sc, I2C_REG_BUFSTAT); - amount &= 0x3f; - } - else if (status & I2C_STAT_XRDY) { - /* Receive data ready interrupt - enough data received */ - ti_i2c_dbg(sc, "Transmit data ready interrupt\n"); - - /* get the number of bytes in the FIFO */ - amount = ti_i2c_read_reg(sc, I2C_REG_BUF); - amount &= 0x3f; - amount += 1; - } - - /* sanity check we haven't overwritten the array */ - if ((sofar + amount) > len) { - ti_i2c_dbg(sc, "to many bytes to write\n"); - amount = (len - sofar); - } - - /* write the bytes from the fifo */ - for (i = 0; i < amount; i++) { - ti_i2c_write_reg(sc, I2C_REG_DATA, buf[sofar++]); - } - - /* attempt to clear the transmit ready bits */ - ti_i2c_write_reg(sc, I2C_REG_STAT, I2C_STAT_XDR | I2C_STAT_XRDY); - } - - /* reset the registers regardless if there was an error or not */ - ti_i2c_set_intr_enable(sc, 0x0000); - ti_i2c_write_reg(sc, I2C_REG_CON, I2C_CON_I2C_EN | I2C_CON_MST | I2C_CON_STP); - - return (err); + TI_I2C_UNLOCK(sc); } /** @@ -743,45 +375,109 @@ ti_i2c_write_bytes(struct ti_i2c_softc * static int ti_i2c_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) { - struct ti_i2c_softc *sc = device_get_softc(dev); - int err = 0; - uint32_t i; - uint16_t len; - uint8_t *buf; + int err, i, repstart, timeout; + struct ti_i2c_softc *sc; + uint16_t reg; + sc = device_get_softc(dev); TI_I2C_LOCK(sc); - for (i = 0; i < nmsgs; i++) { + /* If the controller is busy wait until it is available. */ + while (sc->sc_bus_inuse == 1) + mtx_sleep(dev, &sc->sc_mtx, 0, "i2cbuswait", 0); + + /* Now we have control over the I2C controller. */ + sc->sc_bus_inuse = 1; - len = msgs[i].len; - buf = msgs[i].buf; + err = 0; + repstart = 0; + for (i = 0; i < nmsgs; i++) { - /* zero byte transfers aren't allowed */ - if (len == 0 || buf == NULL) { + sc->sc_buffer = &msgs[i]; + sc->sc_buffer_pos = 0; + sc->sc_error = 0; + + /* Zero byte transfers aren't allowed. */ + if (sc->sc_buffer == NULL || sc->sc_buffer->buf == NULL || + sc->sc_buffer->len == 0) { err = EINVAL; - goto out; + break; } - /* set the slave address */ - ti_i2c_write_reg(sc, I2C_REG_SA, msgs[i].slave >> 1); - - /* perform the read or write */ - if (msgs[i].flags & IIC_M_RD) { - err = ti_i2c_read_bytes(sc, buf, len); - } else { - err = ti_i2c_write_bytes(sc, buf, len); - } + /* Check if the i2c bus is free. */ + if (repstart == 0) { + /* + * On repeated start we send the START condition while + * the bus _is_ busy. + */ + timeout = 0; + while (ti_i2c_read_2(sc, I2C_REG_STATUS_RAW) & I2C_STAT_BB) { + if (timeout++ > 100) { + err = EBUSY; + goto out; + } + DELAY(1000); + } + timeout = 0; + } else + repstart = 0; + + if (sc->sc_buffer->flags & IIC_M_NOSTOP) + repstart = 1; + + /* Set the slave address. */ + ti_i2c_write_2(sc, I2C_REG_SA, msgs[i].slave >> 1); + + /* Write the data length. */ + ti_i2c_write_2(sc, I2C_REG_CNT, sc->sc_buffer->len); + + /* Clear the RX and the TX FIFO. */ + reg = ti_i2c_read_2(sc, I2C_REG_BUF); + reg |= I2C_BUF_RXFIFO_CLR | I2C_BUF_TXFIFO_CLR; + ti_i2c_write_2(sc, I2C_REG_BUF, reg); + + reg = sc->sc_con_reg | I2C_CON_STT; + if (repstart == 0) + reg |= I2C_CON_STP; + if ((sc->sc_buffer->flags & IIC_M_RD) == 0) + reg |= I2C_CON_TRX; + ti_i2c_write_2(sc, I2C_REG_CON, reg); + + /* Wait for an event. */ + err = mtx_sleep(sc, &sc->sc_mtx, 0, "i2ciowait", hz); + if (err == 0) + err = sc->sc_error; + if (err) + break; } out: + if (timeout == 0) { + while (ti_i2c_read_2(sc, I2C_REG_STATUS_RAW) & I2C_STAT_BB) { + if (timeout++ > 100) + break; + DELAY(1000); + } + } + /* Put the controller in master mode again. */ + if ((ti_i2c_read_2(sc, I2C_REG_CON) & I2C_CON_MST) == 0) + ti_i2c_write_2(sc, I2C_REG_CON, sc->sc_con_reg); + + sc->sc_buffer = NULL; + sc->sc_bus_inuse = 0; + + /* Wake up the processes that are waiting for the bus. */ + wakeup(sc); + TI_I2C_UNLOCK(sc); return (err); } /** - * ti_i2c_callback - not sure about this one + * ti_i2c_callback - as we only provide iicbus_transfer() interface + * we don't need to implement the serialization here. * @dev: i2c device handle * * @@ -811,158 +507,231 @@ ti_i2c_callback(device_t dev, int index, return (error); } -/** - * ti_i2c_activate - initialises and activates an I2C bus - * @dev: i2c device handle - * @num: the number of the I2C controller to activate; 1, 2 or 3 - * - * - * LOCKING: - * Assumed called in an atomic context. - * - * RETURNS: - * nothing - */ static int -ti_i2c_activate(device_t dev) +ti_i2c_reset(struct ti_i2c_softc *sc, u_char speed) { - struct ti_i2c_softc *sc = (struct ti_i2c_softc*) device_get_softc(dev); - unsigned int timeout = 0; - uint16_t con_reg; - int err; - clk_ident_t clk; + int timeout; + struct ti_i2c_clock_config *clkcfg; + uint16_t fifo_trsh, reg, scll, sclh; - /* - * The following sequence is taken from the OMAP3530 technical reference - * - * 1. Enable the functional and interface clocks (see Section 18.3.1.1.1). - */ - clk = I2C0_CLK + sc->device_id; - err = ti_prcm_clk_enable(clk); - if (err) - return (err); + switch (ti_chip()) { +#ifdef SOC_OMAP4 + case CHIP_OMAP_4: + clkcfg = ti_omap4_i2c_clock_configs; + break; +#endif +#ifdef SOC_TI_AM335X + case CHIP_AM335X: + clkcfg = ti_am335x_i2c_clock_configs; + break; +#endif + default: + panic("Unknown Ti SoC, unable to reset the i2c"); + } + while (clkcfg->speed != -1) { + if (clkcfg->speed == speed) + break; + clkcfg++; + } + if (clkcfg->speed == -1) + return (EINVAL); - /* There seems to be a bug in the I2C reset mechanism, for some reason you - * need to disable the I2C module before issuing the reset and then enable - * it again after to detect the reset done. + /* + * 23.1.4.3 - HS I2C Software Reset + * From OMAP4 TRM at page 4068. * - * I found this out by looking at the Linux driver implementation, thanks - * linux guys! + * 1. Ensure that the module is disabled. */ + sc->sc_con_reg = 0; + ti_i2c_write_2(sc, I2C_REG_CON, sc->sc_con_reg); - /* Disable the I2C controller */ - ti_i2c_write_reg(sc, I2C_REG_CON, 0x0000); - - /* Issue a softreset to the controller */ - /* XXXOMAP3: FIXME */ - bus_write_2(sc->sc_mem_res, I2C_REG_SYSC, 0x0002); + /* 2. Issue a softreset to the controller. */ + bus_write_2(sc->sc_mem_res, I2C_REG_SYSC, I2C_REG_SYSC_SRST); - /* Re-enable the module and then check for the reset done */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 17:04:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B97A8AD; Wed, 20 Aug 2014 17:04:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B3463864; Wed, 20 Aug 2014 17:04:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KH4oeI008875; Wed, 20 Aug 2014 17:04:50 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KH4oBc008874; Wed, 20 Aug 2014 17:04:50 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201408201704.s7KH4oBc008874@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 20 Aug 2014 17:04:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270231 - head/sbin/devd/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 17:04:50 -0000 Author: asomers Date: Wed Aug 20 17:04:49 2014 New Revision: 270231 URL: http://svnweb.freebsd.org/changeset/base/270231 Log: Misc fixes suggested by Coverity. sbin/devd/tests/client_test.c * In the event that popen fails, don't dereference its return value. * Fix array overwrite in the stream and seqpacket tests. * Close sockets at the end of successful ATF tests. Reported by: Coverity scan CID: 1232019, 1232020, 1232029, 1232030 MFC after: 1 week Sponsored by: Spectra Logic Modified: head/sbin/devd/tests/client_test.c Modified: head/sbin/devd/tests/client_test.c ============================================================================== --- head/sbin/devd/tests/client_test.c Wed Aug 20 17:02:37 2014 (r270230) +++ head/sbin/devd/tests/client_test.c Wed Aug 20 17:04:49 2014 (r270231) @@ -58,6 +58,7 @@ create_two_events(void) snprintf(destroy_cmd, nitems(destroy_cmd), "mdconfig -d -u %s", mdname); destroy_stdout = popen(destroy_cmd, "r"); + ATF_REQUIRE(destroy_stdout != NULL); /* We expect no output */ ATF_REQUIRE_EQ(0, pclose(destroy_stdout)); } @@ -105,7 +106,8 @@ ATF_TC_BODY(seqpacket, tc) ssize_t len; char event[1024]; - len = recv(s, event, sizeof(event), MSG_WAITALL); + /* Read 1 less than sizeof(event) to allow space for NULL */ + len = recv(s, event, sizeof(event) - 1, MSG_WAITALL); ATF_REQUIRE(len != -1); /* NULL terminate the result */ event[len] = '\0'; @@ -118,6 +120,8 @@ ATF_TC_BODY(seqpacket, tc) if (cmp == 0) got_destroy_event = true; } + + close(s); } /* @@ -160,7 +164,8 @@ ATF_TC_BODY(stream, tc) ssize_t newlen; char *create_pos, *destroy_pos; - newlen = read(s, &event[len], sizeof(event) - len); + /* Read 1 less than sizeof(event) to allow space for NULL */ + newlen = read(s, &event[len], sizeof(event) - len - 1); ATF_REQUIRE(newlen != -1); len += newlen; /* NULL terminate the result */ @@ -174,8 +179,9 @@ ATF_TC_BODY(stream, tc) destroy_pos = strstr(event, destroy_pat); if (destroy_pos != NULL) got_destroy_event = true; - } + + close(s); } /* From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 17:07:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B206BA7F; Wed, 20 Aug 2014 17:07:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C8E5389E; Wed, 20 Aug 2014 17:07:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KH7gNU009307; Wed, 20 Aug 2014 17:07:42 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KH7gtX009303; Wed, 20 Aug 2014 17:07:42 GMT (envelope-from se@FreeBSD.org) Message-Id: <201408201707.s7KH7gtX009303@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Wed, 20 Aug 2014 17:07:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270232 - head/tools/tools/vt/keymaps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 17:07:42 -0000 Author: se Date: Wed Aug 20 17:07:41 2014 New Revision: 270232 URL: http://svnweb.freebsd.org/changeset/base/270232 Log: The conversion tools have been further improved and some erroneous conversions have been detected and fixed. It is now possible to add options after the encoding in the parameter list for convert-keymap.pl. This is currently used to selectively enable interpretation of the ISO8859-1 currency symbol as the Euro sign found in ISO5589-15, or to add a Yen symbol in place of '\' for specific Japanese keyboards. The option are appended to the parameter list, as in e.g. "convert-keymap.pl german.iso.kbd ISO5589-1 EURO". The options are appended to the encoding in the form "+EURO" or "+YEN" in KBDFILES.map, to keep the meaning of the columns intact. MFC after: 3 days Modified: head/tools/tools/vt/keymaps/KBDFILES.map head/tools/tools/vt/keymaps/convert-keymap.pl head/tools/tools/vt/keymaps/convert-keymaps.pl Modified: head/tools/tools/vt/keymaps/KBDFILES.map ============================================================================== --- head/tools/tools/vt/keymaps/KBDFILES.map Wed Aug 20 17:04:49 2014 (r270231) +++ head/tools/tools/vt/keymaps/KBDFILES.map Wed Aug 20 17:07:41 2014 (r270232) @@ -1,7 +1,15 @@ # $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 @@ -14,15 +22,15 @@ CP850 br275.cp850.kbd br.noacc.kbd #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-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,31 +104,31 @@ 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-15 uk.iso.kbd uk.kbd -ISO8859-15 uk.iso-ctrl.kbd uk.capsctrl.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 Modified: head/tools/tools/vt/keymaps/convert-keymap.pl ============================================================================== --- head/tools/tools/vt/keymaps/convert-keymap.pl Wed Aug 20 17:04:49 2014 (r270231) +++ head/tools/tools/vt/keymaps/convert-keymap.pl Wed Aug 20 17:07:41 2014 (r270232) @@ -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,21 +35,35 @@ 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 @@ -62,7 +93,6 @@ sub convert_token sub tokenize { # split on white space and parentheses (but not within token) my ($line) = @_; -#print "<< $line"; $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 @@ -70,7 +100,6 @@ sub tokenize { # split on white space an my $matches; do { $matches = ($line =~ s/^([^']*)'([^']+)'/$1_squoteL_$2_squoteR_/g); -# print "-> $line<> $matches: ('$1','$2')\n"; } while $matches; $line =~ s/_squoteL_ _squoteR_/ _spc_ /g; # prevent splitting of ' ' my @KEYTOKEN = split (" ", $line); @@ -78,12 +107,11 @@ sub tokenize { # split on white space an grep(s/_spc_/' '/, @KEYTOKEN); grep(s/_lpar_/'('/, @KEYTOKEN); grep(s/_rpar_/')'/, @KEYTOKEN); -#printf ">> $line%s\n", join('|', @KEYTOKEN); return @KEYTOKEN; } # main program -open FH, "<$ARGV[0]"; +open FH, "<$inputfile"; while () { if (m/^#/) { print local_to_UCS_string($_); @@ -95,7 +123,10 @@ 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 @@ -109,6 +140,7 @@ while () { 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: head/tools/tools/vt/keymaps/convert-keymaps.pl ============================================================================== --- head/tools/tools/vt/keymaps/convert-keymaps.pl Wed Aug 20 17:04:49 2014 (r270231) +++ head/tools/tools/vt/keymaps/convert-keymaps.pl Wed Aug 20 17:07:41 2014 (r270232) @@ -83,12 +83,13 @@ 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"; From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 17:26:05 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 96C17774; Wed, 20 Aug 2014 17:26:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 81F0E3AB2; Wed, 20 Aug 2014 17:26:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KHQ5s8018964; Wed, 20 Aug 2014 17:26:05 GMT (envelope-from davide@FreeBSD.org) Received: (from davide@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KHQ5qg018962; Wed, 20 Aug 2014 17:26:05 GMT (envelope-from davide@FreeBSD.org) Message-Id: <201408201726.s7KHQ5qg018962@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: davide set sender to davide@FreeBSD.org using -f From: Davide Italiano Date: Wed, 20 Aug 2014 17:26:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270233 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 17:26:05 -0000 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 owner-svn-src-all@FreeBSD.ORG Wed Aug 20 17:27:15 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B13A48DE; Wed, 20 Aug 2014 17:27:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D2313AC6; Wed, 20 Aug 2014 17:27:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KHRFiG019180; Wed, 20 Aug 2014 17:27:15 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KHRFQM019179; Wed, 20 Aug 2014 17:27:15 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201408201727.s7KHRFQM019179@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Wed, 20 Aug 2014 17:27:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270234 - head/usr.sbin/route6d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 17:27:15 -0000 Author: hrs Date: Wed Aug 20 17:27:15 2014 New Revision: 270234 URL: http://svnweb.freebsd.org/changeset/base/270234 Log: Recover sin6_scope_id of gateway addresses in riprecv() by using the if_index where a RIP packet was received. This fixes a bug which prevented gateway addresses in fe80::/64 from being added. Modified: head/usr.sbin/route6d/route6d.c Modified: head/usr.sbin/route6d/route6d.c ============================================================================== --- head/usr.sbin/route6d/route6d.c Wed Aug 20 17:26:05 2014 (r270233) +++ head/usr.sbin/route6d/route6d.c Wed Aug 20 17:27:15 2014 (r270234) @@ -2835,6 +2835,8 @@ addroute(struct riprt *rrt, sin6->sin6_len = sizeof(struct sockaddr_in6); sin6->sin6_family = AF_INET6; sin6->sin6_addr = *gw; + if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) + sin6->sin6_scope_id = ifcp->ifc_index; sin6 = (struct sockaddr_in6 *)((char *)sin6 + ROUNDUP(sin6->sin6_len)); /* Netmask */ sin6->sin6_len = sizeof(struct sockaddr_in6); From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 17:30:49 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 650B6CE2; Wed, 20 Aug 2014 17:30:49 +0000 (UTC) Received: from mail-vc0-x22d.google.com (mail-vc0-x22d.google.com [IPv6:2607:f8b0:400c:c03::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 00C9B3B0B; Wed, 20 Aug 2014 17:30:48 +0000 (UTC) Received: by mail-vc0-f173.google.com with SMTP id hy10so9509118vcb.32 for ; Wed, 20 Aug 2014 10:30:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=fowBjIJE9zU+0BFm3uCVikT0l692LT06p+wL9PyxpZI=; b=yR6dvAs2mGXqysfUijP+4aJmEt93if2ySeaB31paUg2Hvg+UUF1tW/6EZe2dz+Gumq hHcJAzz1iTtuwCB6woch0OGldAgbgDAHTFXIaqor9gDcTdAr7SdoqddJ2lQhsG7MRQji sHqIz+hYiwB3tl9Q+P/meHVEyYj0eFX2SHfw5stDJDnrL2doJP7yirqWOdqlQMIADppD rHOOzEEFDyEvAarGmICT7R1lvO+KVWZNw5DOBszVG1htTyCzuQV1rGvnEEn4KWmYQQId OeuvXxMC1KwDK8Z3G5q64roE6tczb+ZPxceEt4FHaToBT7fFcNceU0C6RdBpYLl5/B31 FCzg== MIME-Version: 1.0 X-Received: by 10.220.166.68 with SMTP id l4mr4050181vcy.20.1408555848179; Wed, 20 Aug 2014 10:30:48 -0700 (PDT) Sender: davide.italiano@gmail.com Received: by 10.220.225.201 with HTTP; Wed, 20 Aug 2014 10:30:48 -0700 (PDT) In-Reply-To: <201408201632.s7KGW2vF093636@svn.freebsd.org> References: <201408201632.s7KGW2vF093636@svn.freebsd.org> Date: Wed, 20 Aug 2014 10:30:48 -0700 X-Google-Sender-Auth: 9OzbD0geJn2nnRGz7gppinDgx7A Message-ID: Subject: Re: svn commit: r270227 - head/sys/sys From: Davide Italiano To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 17:30:49 -0000 On Wed, Aug 20, 2014 at 9:32 AM, Davide Italiano wrote: > Author: davide > Date: Wed Aug 20 16:32:02 2014 > New Revision: 270227 > URL: http://svnweb.freebsd.org/changeset/base/270227 > > Log: > Make Bruce happy removing the "LL abomination" from time.h > It's not necessary in all the three instances because > they already have the correct type on all the supported > arches. > > Requested by: bde > CR: https://reviews.freebsd.org/D434 From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 17:33:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 93D5AA8; Wed, 20 Aug 2014 17:33:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F8603BAA; Wed, 20 Aug 2014 17:33:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KHXWcp023431; Wed, 20 Aug 2014 17:33:32 GMT (envelope-from luigi@FreeBSD.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KHXWpi023430; Wed, 20 Aug 2014 17:33:32 GMT (envelope-from luigi@FreeBSD.org) Message-Id: <201408201733.s7KHXWpi023430@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: luigi set sender to luigi@FreeBSD.org using -f From: Luigi Rizzo Date: Wed, 20 Aug 2014 17:33:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270235 - stable/10/sys/dev/e1000 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 17:33:32 -0000 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 owner-svn-src-all@FreeBSD.ORG Wed Aug 20 17:39:53 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C453D287; Wed, 20 Aug 2014 17:39:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96DD23BEC; Wed, 20 Aug 2014 17:39:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KHdrZI024257; Wed, 20 Aug 2014 17:39:53 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KHdrYT024256; Wed, 20 Aug 2014 17:39:53 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201408201739.s7KHdrYT024256@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Wed, 20 Aug 2014 17:39:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270236 - stable/10/sys/dev/gpio X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 17:39:53 -0000 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 owner-svn-src-all@FreeBSD.ORG Wed Aug 20 17:57:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 93275B2A; Wed, 20 Aug 2014 17:57:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7DAC43DCA; Wed, 20 Aug 2014 17:57:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KHvN1H033667; Wed, 20 Aug 2014 17:57:23 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KHvNDJ033666; Wed, 20 Aug 2014 17:57:23 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201408201757.s7KHvNDJ033666@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Wed, 20 Aug 2014 17:57:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270237 - stable/10/sys/arm/ti/am335x X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 17:57:23 -0000 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 owner-svn-src-all@FreeBSD.ORG Wed Aug 20 18:10:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5532F5CA; Wed, 20 Aug 2014 18:10:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F2E9334D; Wed, 20 Aug 2014 18:10:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KIAD0i039620; Wed, 20 Aug 2014 18:10:13 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KIACcG039614; Wed, 20 Aug 2014 18:10:12 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201408201810.s7KIACcG039614@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Wed, 20 Aug 2014 18:10:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270238 - in stable/10: share/man/man4/man4.arm sys/arm/ti X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 18:10:13 -0000 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@FreeBSD.org +.An Luiz Otavio O Souza Aq loos@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 owner-svn-src-all@FreeBSD.ORG Wed Aug 20 18:29:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 49C89418; Wed, 20 Aug 2014 18:29:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 343A436F0; Wed, 20 Aug 2014 18:29:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KITJ1g048888; Wed, 20 Aug 2014 18:29:19 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KITIQA048884; Wed, 20 Aug 2014 18:29:18 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201408201829.s7KITIQA048884@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 20 Aug 2014 18:29:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270239 - in head/sys/cddl/contrib/opensolaris/uts/common: dtrace os sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 18:29:19 -0000 Author: delphij Date: Wed Aug 20 18:29:18 2014 New Revision: 270239 URL: http://svnweb.freebsd.org/changeset/base/270239 Log: MFV r270193: Illumos issues: 5042 stop using deprecated atomic functions MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/systrace.c head/sys/cddl/contrib/opensolaris/uts/common/os/fm.c head/sys/cddl/contrib/opensolaris/uts/common/sys/bitmap.h head/sys/cddl/contrib/opensolaris/uts/common/sys/cpuvar.h Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/systrace.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/systrace.c Wed Aug 20 18:10:12 2014 (r270238) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/systrace.c Wed Aug 20 18:29:18 2014 (r270239) @@ -165,11 +165,11 @@ systrace_enable(void *arg, dtrace_id_t i return; } - (void) casptr(&sysent[sysnum].sy_callc, + (void) atomic_cas_ptr(&sysent[sysnum].sy_callc, (void *)systrace_sysent[sysnum].stsy_underlying, (void *)dtrace_systrace_syscall); #ifdef _SYSCALL32_IMPL - (void) casptr(&sysent32[sysnum].sy_callc, + (void) atomic_cas_ptr(&sysent32[sysnum].sy_callc, (void *)systrace_sysent32[sysnum].stsy_underlying, (void *)dtrace_systrace_syscall32); #endif @@ -184,12 +184,12 @@ systrace_disable(void *arg, dtrace_id_t systrace_sysent[sysnum].stsy_return == DTRACE_IDNONE); if (disable) { - (void) casptr(&sysent[sysnum].sy_callc, + (void) atomic_cas_ptr(&sysent[sysnum].sy_callc, (void *)dtrace_systrace_syscall, (void *)systrace_sysent[sysnum].stsy_underlying); #ifdef _SYSCALL32_IMPL - (void) casptr(&sysent32[sysnum].sy_callc, + (void) atomic_cas_ptr(&sysent32[sysnum].sy_callc, (void *)dtrace_systrace_syscall32, (void *)systrace_sysent32[sysnum].stsy_underlying); #endif Modified: head/sys/cddl/contrib/opensolaris/uts/common/os/fm.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/os/fm.c Wed Aug 20 18:10:12 2014 (r270238) +++ head/sys/cddl/contrib/opensolaris/uts/common/os/fm.c Wed Aug 20 18:29:18 2014 (r270239) @@ -379,7 +379,7 @@ fm_panic(const char *format, ...) { va_list ap; - (void) casptr((void *)&fm_panicstr, NULL, (void *)format); + (void) atomic_cas_ptr((void *)&fm_panicstr, NULL, (void *)format); #if defined(__i386) || defined(__amd64) fastreboot_disable_highpil(); #endif /* __i386 || __amd64 */ Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/bitmap.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/sys/bitmap.h Wed Aug 20 18:10:12 2014 (r270238) +++ head/sys/cddl/contrib/opensolaris/uts/common/sys/bitmap.h Wed Aug 20 18:29:18 2014 (r270239) @@ -171,9 +171,9 @@ extern int odd_parity(ulong_t); * to 0 otherwise. */ #define BT_ATOMIC_SET(bitmap, bitindex) \ - { atomic_or_long(&(BT_WIM(bitmap, bitindex)), BT_BIW(bitindex)); } + { atomic_or_ulong(&(BT_WIM(bitmap, bitindex)), BT_BIW(bitindex)); } #define BT_ATOMIC_CLEAR(bitmap, bitindex) \ - { atomic_and_long(&(BT_WIM(bitmap, bitindex)), ~BT_BIW(bitindex)); } + { atomic_and_ulong(&(BT_WIM(bitmap, bitindex)), ~BT_BIW(bitindex)); } #define BT_ATOMIC_SET_EXCL(bitmap, bitindex, result) \ { result = atomic_set_long_excl(&(BT_WIM(bitmap, bitindex)), \ Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/cpuvar.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/sys/cpuvar.h Wed Aug 20 18:10:12 2014 (r270238) +++ head/sys/cddl/contrib/opensolaris/uts/common/sys/cpuvar.h Wed Aug 20 18:29:18 2014 (r270239) @@ -524,8 +524,8 @@ typedef ulong_t cpuset_t; /* a set of CP largest = (uint_t)(highbit(set) - 1); \ } -#define CPUSET_ATOMIC_DEL(set, cpu) atomic_and_long(&(set), ~CPUSET(cpu)) -#define CPUSET_ATOMIC_ADD(set, cpu) atomic_or_long(&(set), CPUSET(cpu)) +#define CPUSET_ATOMIC_DEL(set, cpu) atomic_and_ulong(&(set), ~CPUSET(cpu)) +#define CPUSET_ATOMIC_ADD(set, cpu) atomic_or_ulong(&(set), CPUSET(cpu)) #define CPUSET_ATOMIC_XADD(set, cpu, result) \ { result = atomic_set_long_excl(&(set), (cpu)); } From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 18:40:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 585BF6FD; Wed, 20 Aug 2014 18:40:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4351E3809; Wed, 20 Aug 2014 18:40:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KIeU1V054072; Wed, 20 Aug 2014 18:40:30 GMT (envelope-from davide@FreeBSD.org) Received: (from davide@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KIeU5X054071; Wed, 20 Aug 2014 18:40:30 GMT (envelope-from davide@FreeBSD.org) Message-Id: <201408201840.s7KIeU5X054071@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: davide set sender to davide@FreeBSD.org using -f From: Davide Italiano Date: Wed, 20 Aug 2014 18:40:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270240 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 18:40:30 -0000 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 owner-svn-src-all@FreeBSD.ORG Wed Aug 20 19:12:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 69893323; Wed, 20 Aug 2014 19:12:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A06D3B4E; Wed, 20 Aug 2014 19:12:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KJCK4Q070708; Wed, 20 Aug 2014 19:12:20 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KJCJdb070706; Wed, 20 Aug 2014 19:12:19 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201408201912.s7KJCJdb070706@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Wed, 20 Aug 2014 19:12:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270241 - in stable/10/sys: arm/ti dev/iicbus X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 19:12:20 -0000 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 owner-svn-src-all@FreeBSD.ORG Wed Aug 20 19:31:00 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D598AFC; Wed, 20 Aug 2014 19:31:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F15403CBE; Wed, 20 Aug 2014 19:30:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KJUxs0076887; Wed, 20 Aug 2014 19:30:59 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KJUw5E076882; Wed, 20 Aug 2014 19:30:58 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201408201930.s7KJUw5E076882@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 20 Aug 2014 19:30:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270242 - in stable/10: etc/mtree sbin/devd sbin/devd/tests X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 19:31:00 -0000 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 owner-svn-src-all@FreeBSD.ORG Wed Aug 20 19:37:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 96EF8D37; Wed, 20 Aug 2014 19:37:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7686B3D82; Wed, 20 Aug 2014 19:37:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KJb7hL080365; Wed, 20 Aug 2014 19:37:07 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KJb6Dk080359; Wed, 20 Aug 2014 19:37:06 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201408201937.s7KJb6Dk080359@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Wed, 20 Aug 2014 19:37:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270243 - in stable/10: share/man/man4 sys/arm/broadcom/bcm2835 sys/arm/ti sys/boot/fdt/dts/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 19:37:07 -0000 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@44e0b000 { pmic@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@44e0b000 { pmic@24 { compatible = "ti,am335x-pmic"; - reg = <0x24>; + reg = <0x48>; }; }; }; From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 19:39:08 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1CF2BF5A; Wed, 20 Aug 2014 19:39:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07A003D96; Wed, 20 Aug 2014 19:39:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KJd7rD080787; Wed, 20 Aug 2014 19:39:07 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KJd7ET080784; Wed, 20 Aug 2014 19:39:07 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201408201939.s7KJd7ET080784@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Wed, 20 Aug 2014 19:39:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270244 - in stable/10: bin/sh/tests/builtins tools/build/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 19:39:08 -0000 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 owner-svn-src-all@FreeBSD.ORG Wed Aug 20 19:42:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31C551FB; Wed, 20 Aug 2014 19:42:24 +0000 (UTC) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 06E073E87; Wed, 20 Aug 2014 19:42:24 +0000 (UTC) Received: from zeta.ixsystems.com (unknown [69.198.165.132]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id 18BFE7A10; Wed, 20 Aug 2014 12:42:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1408563743; x=1408578143; bh=Wc9Z1uWIwX35oOF8q4bIA6G7vxmfvfpe7MERUgVGjnA=; h=Date:From:Reply-To:To:Subject:References:In-Reply-To; b=upP9qp/ojwBGs3vEHmmOT5b1SCeCDYNnYQhw7d+39/rpkCXl8lTJGvpJca8l8dizD hFUKMa43kX1th02XWTyVVIED1XbBF/HojjGAhbngvADcblC9nKg1UMS+52xoLybaiU qKX6gkBQISNRsRFV82OqABnnWYhcI0K1uxqX4Xuo= Message-ID: <53F4FA1E.2000103@delphij.net> Date: Wed, 20 Aug 2014 12:42:22 -0700 From: Xin Li Reply-To: d@delphij.net Organization: The FreeBSD Project MIME-Version: 1.0 To: Davide Italiano , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r270227 - head/sys/sys References: <201408201632.s7KGW2vF093636@svn.freebsd.org> In-Reply-To: <201408201632.s7KGW2vF093636@svn.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 19:42:24 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 08/20/14 09:32, Davide Italiano wrote: > Author: davide Date: Wed Aug 20 16:32:02 2014 New Revision: 270227 > URL: http://svnweb.freebsd.org/changeset/base/270227 > > Log: Make Bruce happy removing the "LL abomination" from time.h > It's not necessary in all the three instances because they already > have the correct type on all the supported arches. I'm not yet 100% sure (still building with some of my changes) but this looks like the change that broke powerpc build, I saw: In file included from /tank/delphij/head/cddl/usr.sbin/lockstat/../../../sys/cddl/compat/opensolaris/sys/time.h:32, from /tank/delphij/head/cddl/usr.sbin/lockstat/../../../sys/sys/stat.h:99, from /tank/delphij/head/cddl/usr.sbin/lockstat/../../../sys/cddl/compat/opensolaris/sys/stat.h:33, from /tank/delphij/head/cddl/usr.sbin/lockstat/../../../cddl/contrib/opensolaris/cmd/lockstat/lockstat.c:41: /tank/delphij/head/cddl/usr.sbin/lockstat/../../../sys/sys/time.h: In function 'timespec2bintime': /tank/delphij/head/cddl/usr.sbin/lockstat/../../../sys/sys/time.h:187: warning: integer constant is too large for 'long' type /tank/delphij/head/cddl/usr.sbin/lockstat/../../../sys/sys/time.h: In function 'timeval2bintime': /tank/delphij/head/cddl/usr.sbin/lockstat/../../../sys/sys/time.h:204: warning: integer constant is too large for 'long' type *** [lockstat.o] Error code 1 > Requested by: bde > > Modified: head/sys/sys/time.h > > Modified: head/sys/sys/time.h > ============================================================================== > > - --- head/sys/sys/time.h Wed Aug 20 16:09:05 2014 (r270226) > +++ head/sys/sys/time.h Wed Aug 20 16:32:02 2014 (r270227) @@ > -129,7 +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 > 0x7fffffffffffffffLL +#define SBT_MAX 0x7fffffffffffffff > > static __inline int sbintime_getsec(sbintime_t _sbt) @@ -184,7 > +184,7 @@ timespec2bintime(const struct timespec * > > _bt->sec = _ts->tv_sec; /* 18446744073 = int(2^64 / 1000000000) */ > - _bt->frac = _ts->tv_nsec * (uint64_t)18446744073LL; + _bt->frac = > _ts->tv_nsec * (uint64_t)18446744073; } > > static __inline void @@ -201,7 +201,7 @@ timeval2bintime(const > struct timeval *_t > > _bt->sec = _tv->tv_sec; /* 18446744073709 = int(2^64 / 1000000) */ > - _bt->frac = _tv->tv_usec * (uint64_t)18446744073709LL; + > _bt->frac = _tv->tv_usec * (uint64_t)18446744073709; } > > static __inline struct timespec > - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0 iQIcBAEBCgAGBQJT9PoeAAoJEJW2GBstM+nsvAsP/3asjb/pBnK4jXnouHSSHmzf Hww9RbqtRrLVGmxl0utcI4yhs/5yvlm2wqGyhfqS4EY8dHEXE0N+gtHTXcZsrCSM g/3kJLGNj8oA6poNWXiNWo4fIVEmsOgwy/K2ef5EDs8moq19dP7/3x7ixjpEMIIz 80Yq9Zts1hNLICKlv2gKCONpGo5MyThquJytadXsRKz+McZnzR3XaXnHEIl5DB9+ OgZrKuYX4aGdWguppciS53IUvdn43jF5NZw+JFsf6SwXX5I7p4DjM1JE0R6wssKr jeuelME0xmki462VBlOBj+ul/JHEbF6aF8Nkp4VVf0oN527rRguJ1Qu7a2r/xbO1 Vcc28rO8o+oxbYotnCItlKtj2tXBivalc+gcHV+ySdVL/mIDAcPw0UVqYWIQAQul QHRW+zwnnVH5DRoHn0IBpDs1jlvu45xubc0iVpZPWHbE3FFt8HMcrqMQc+7ppSAn HJSQv4kxEhvR/jHzu3dY6cnziWsz5TZT4V4HfE9ut7QZELA5f95DR5HqT82dOf0x 4Wrc9uJT2yJayvK5E40/tuXMhipv+OOm/Gjs1gF/BHULHjMEc1LRRirwY0DAewwd 8p/cTmKNXpyTxi24kAvJ2mWKNdv4ncrjWIgLDJLZfMruA4SbaD3TCZEs0evmE1lH gbdwjyzcWuwHUMh+1TfG =1yEW -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 19:46:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 729814B0; Wed, 20 Aug 2014 19:46:22 +0000 (UTC) Received: from smtp2.wemm.org (smtp2.wemm.org [IPv6:2001:470:67:39d::78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp2.wemm.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48C7C3ECD; Wed, 20 Aug 2014 19:46:22 +0000 (UTC) Received: from hater-dm.corp.yahoo.com (nat-dip4.cfw-a-gci.corp.yahoo.com [209.131.62.113]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: peter) by smtp2.wemm.org (Postfix) with ESMTPSA id AC85C61E; Wed, 20 Aug 2014 12:46:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=m20140428; t=1408563981; bh=dqfwsxeBkpqCduWa8xBm7buCewmXOqOwB/Su1ui05z8=; h=Date:From:To:Subject:References:In-Reply-To; b=vmNh8GTpc/fr/t8r8fVrUe6FBVFXA+sPu9Dk6+IzXAlRy4bDaYjHaCqNRL5T2AEan 5oQe8lP0gqxDhew/KoypGCS+zCaYt5J3DXn67FDMEjJ4XZs5hld42gR1tuiV+1saRB WoBy+3PHnBoEe0ilmXRwNVqP9Z+glwqfgA/qXQv0= Message-ID: <53F4FB0D.9080605@wemm.org> Date: Wed, 20 Aug 2014 12:46:21 -0700 From: Peter Wemm User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: John Baldwin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r270177 - in stable/8: tools/regression/usr.sbin/etcupdate usr.sbin usr.sbin/etcupdate References: <201408191754.s7JHsF2M069832@svn.freebsd.org> In-Reply-To: <201408191754.s7JHsF2M069832@svn.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1vP3RQMNbRmQcqpvKXDiLgWhDuUU8Seeu" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 19:46:22 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --1vP3RQMNbRmQcqpvKXDiLgWhDuUU8Seeu Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 >=20 > Log: > MFC 238423,238426,238428,258063,258064,258066,258097,258185,259134: > The etcupdate utility is a tool for managing updates to files that ar= e > 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 f= iles > against the local versions. It is also designed to minimize the amou= nt > of user intervention with the goal of simplifying upgrades for cluste= rs > of machines. > =20 > 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= =2E 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! --=20 Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6F= JV --1vP3RQMNbRmQcqpvKXDiLgWhDuUU8Seeu Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (Darwin) iQEcBAEBAgAGBQJT9PsNAAoJEDXWlwnsgJ4ErMIIAIwA74K/jg8F5UxakR2hER/a aC24RroB3TJoHGZrskatgaOUgmZZGZiiX44pYEUOggayxY9VBRRWzNHIEcDanlsd wWweLNIZMuv6T6Fxk7rf7rC2NQA/aRdVBCtcp/xSOPgkL3ahmo4jfQk6bRFGvxxQ Pbe85x8VOxN7YDm/C9H8WLYBFMZpa8l76302pw7OX2lqRxxAPmgxzpCTwPzY3UTS xl9lHoWESCWT0CAj4lslDE2Zqgb2+Ot4zQF00dJDG3GAFLL97m+NYggOqmRbf80m 2MrjCHogXFTJFc+Ugn/Ao2cOZxP96PHsfYNSXiJwS15uI3PMS7Y1oDYKMYqiRcw= =lyYz -----END PGP SIGNATURE----- --1vP3RQMNbRmQcqpvKXDiLgWhDuUU8Seeu-- From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 19:59:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4591998B; Wed, 20 Aug 2014 19:59:13 +0000 (UTC) Received: from mail-vc0-x22e.google.com (mail-vc0-x22e.google.com [IPv6:2607:f8b0:400c:c03::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D46063FD1; Wed, 20 Aug 2014 19:59:12 +0000 (UTC) Received: by mail-vc0-f174.google.com with SMTP id la4so9575633vcb.5 for ; Wed, 20 Aug 2014 12:59:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=xaQ1PHgsAzLlHsbpNK0ifqoH9Y73T+xUig/4KzIEhTw=; b=unWdbBWUJHnCLINEpzxwClBg+IfmG8tmnFd4e6Kumb5BLdhIUa/9dJ3Wy7AGPDbTmY k2Anbs8Ct/ZlZxZ3DI3qTtAZIuYgGBa7zakIdsoVIJNq7Xq+xCLfVXYPVxQcN6etNnCp T41tLfu7x8b4A/Z7RjF1wrbpDt6TQkkKcqbPidIWRkRxsn3lbUYljtw3HLCTIRfOkHGV AI4A03JZ4qSH1Q4XKVqfRrZaMNTExl+/fXbUINqJc9y7bu+LIrNsoIM4GxJexeodtqar JIvgU5EWirYolf3hou1Bd65asVkItUFqVg5+fVbWzBh4eFZgNZIUD8ZMN5UGkObimPDb SDNg== MIME-Version: 1.0 X-Received: by 10.220.166.207 with SMTP id n15mr2517788vcy.75.1408564751965; Wed, 20 Aug 2014 12:59:11 -0700 (PDT) Sender: davide.italiano@gmail.com Received: by 10.220.225.201 with HTTP; Wed, 20 Aug 2014 12:59:11 -0700 (PDT) In-Reply-To: <53F4FA1E.2000103@delphij.net> References: <201408201632.s7KGW2vF093636@svn.freebsd.org> <53F4FA1E.2000103@delphij.net> Date: Wed, 20 Aug 2014 12:59:11 -0700 X-Google-Sender-Auth: QUlvvHF8k6w9rh9RbJGAt1U7dgI Message-ID: Subject: Re: svn commit: r270227 - head/sys/sys From: Davide Italiano To: Xin LI Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 19:59:13 -0000 On Wed, Aug 20, 2014 at 12:42 PM, Xin Li wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > On 08/20/14 09:32, Davide Italiano wrote: >> Author: davide Date: Wed Aug 20 16:32:02 2014 New Revision: 270227 >> URL: http://svnweb.freebsd.org/changeset/base/270227 >> >> Log: Make Bruce happy removing the "LL abomination" from time.h >> It's not necessary in all the three instances because they already >> have the correct type on all the supported arches. > > I'm not yet 100% sure (still building with some of my changes) but > this looks like the change that broke powerpc build, I saw: > No problem to (at least partly) revert this if it causes problem. Let me know. -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 20:12:05 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98D32CB7; Wed, 20 Aug 2014 20:12:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83BE93140; Wed, 20 Aug 2014 20:12:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KKC5wd098757; Wed, 20 Aug 2014 20:12:05 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KKC5Rw098756; Wed, 20 Aug 2014 20:12:05 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201408202012.s7KKC5Rw098756@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Wed, 20 Aug 2014 20:12:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r270245 - stable/9/lib/libc/gen X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 20:12:05 -0000 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 owner-svn-src-all@FreeBSD.ORG Wed Aug 20 20:15:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7FBCC17E; Wed, 20 Aug 2014 20:15:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B8B0319F; Wed, 20 Aug 2014 20:15:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KKFifA099564; Wed, 20 Aug 2014 20:15:44 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KKFiu9099563; Wed, 20 Aug 2014 20:15:44 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201408202015.s7KKFiu9099563@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Wed, 20 Aug 2014 20:15:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270246 - head/bin/sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 20:15:44 -0000 Author: jilles Date: Wed Aug 20 20:15:43 2014 New Revision: 270246 URL: http://svnweb.freebsd.org/changeset/base/270246 Log: sh: Remove two redundant (uintmax_t) casts. Submitted by: jmallett Modified: head/bin/sh/arith_yacc.c Modified: head/bin/sh/arith_yacc.c ============================================================================== --- head/bin/sh/arith_yacc.c Wed Aug 20 20:12:05 2014 (r270245) +++ head/bin/sh/arith_yacc.c Wed Aug 20 20:15:43 2014 (r270246) @@ -139,10 +139,9 @@ static arith_t do_binop(int op, arith_t case ARITH_SUB: return (uintmax_t)a - (uintmax_t)b; case ARITH_LSHIFT: - return (uintmax_t)a << - ((uintmax_t)b & (sizeof(uintmax_t) * CHAR_BIT - 1)); + return (uintmax_t)a << (b & (sizeof(uintmax_t) * CHAR_BIT - 1)); case ARITH_RSHIFT: - return a >> ((uintmax_t)b & (sizeof(uintmax_t) * CHAR_BIT - 1)); + return a >> (b & (sizeof(uintmax_t) * CHAR_BIT - 1)); case ARITH_LT: return a < b; case ARITH_LE: From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 21:08:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 720884A7; Wed, 20 Aug 2014 21:08:02 +0000 (UTC) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id 1D89E3682; Wed, 20 Aug 2014 21:08:01 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id F2BB5D44164; Thu, 21 Aug 2014 07:08:00 +1000 (EST) Date: Thu, 21 Aug 2014 07:07:55 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: d@delphij.net Subject: Re: svn commit: r270227 - head/sys/sys In-Reply-To: <53F4FA1E.2000103@delphij.net> Message-ID: <20140821063422.P11841@besplex.bde.org> References: <201408201632.s7KGW2vF093636@svn.freebsd.org> <53F4FA1E.2000103@delphij.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=fvDlOjIf c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=RrlIlrznAvoA:10 a=Bs0Nco5NFfgA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=6I5d2MoRAAAA:8 a=hb80LD8SbhmvLjey31QA:9 a=CjuIK1q_8ugA:10 Cc: Davide Italiano , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 21:08:02 -0000 On Wed, 20 Aug 2014, Xin Li wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > On 08/20/14 09:32, Davide Italiano wrote: >> Author: davide Date: Wed Aug 20 16:32:02 2014 New Revision: 270227 >> URL: http://svnweb.freebsd.org/changeset/base/270227 >> >> Log: Make Bruce happy removing the "LL abomination" from time.h >> It's not necessary in all the three instances because they already >> have the correct type on all the supported arches. > > I'm not yet 100% sure (still building with some of my changes) but > this looks like the change that broke powerpc build, I saw: That is a compiler bug, or excessive compiler flags to force the compiler to be broken. I thought that such compilers and/or flags went away. However, apparently 15 years of C99 and 25 years of gnu89 is not enough for them to go away. We used to almost-intentionally ask for the warning and not ask for pure gnu89 using some flag like -std=c89. Otherwise, old compilers default to gnu89 and support constants whos natural type is long long. > In file included from > /tank/delphij/head/cddl/usr.sbin/lockstat/../../../sys/cddl/compat/opensolaris/sys/time.h:32, > from > /tank/delphij/head/cddl/usr.sbin/lockstat/../../../sys/sys/stat.h:99, > from > /tank/delphij/head/cddl/usr.sbin/lockstat/../../../sys/cddl/compat/opensolaris/sys/stat.h:33, > from > /tank/delphij/head/cddl/usr.sbin/lockstat/../../../cddl/contrib/opensolaris/cmd/lockstat/lockstat.c:41: > /tank/delphij/head/cddl/usr.sbin/lockstat/../../../sys/sys/time.h: In > function 'timespec2bintime': > /tank/delphij/head/cddl/usr.sbin/lockstat/../../../sys/sys/time.h:187: > warning: integer constant is too large for 'long' type > /tank/delphij/head/cddl/usr.sbin/lockstat/../../../sys/sys/time.h: In > function 'timeval2bintime': > /tank/delphij/head/cddl/usr.sbin/lockstat/../../../sys/sys/time.h:204: > warning: integer constant is too large for 'long' type > *** [lockstat.o] Error code 1 > >> Requested by: bde >> >> Modified: head/sys/sys/time.h >> >> Modified: head/sys/sys/time.h >> ============================================================================== > - --- head/sys/sys/time.h Wed Aug 20 16:09:05 2014 (r270226) >> +++ head/sys/sys/time.h Wed Aug 20 16:32:02 2014 (r270227) @@ >> -129,7 +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 >> 0x7fffffffffffffffLL +#define SBT_MAX 0x7fffffffffffffff This is the part touched by davide recently. >> static __inline int sbintime_getsec(sbintime_t _sbt) @@ -184,7 >> +184,7 @@ timespec2bintime(const struct timespec * >> >> _bt->sec = _ts->tv_sec; /* 18446744073 = int(2^64 / 1000000000) */ >> - _bt->frac = _ts->tv_nsec * (uint64_t)18446744073LL; + _bt->frac = >> _ts->tv_nsec * (uint64_t)18446744073; } >> >> static __inline void @@ -201,7 +201,7 @@ timeval2bintime(const >> struct timeval *_t >> >> _bt->sec = _tv->tv_sec; /* 18446744073709 = int(2^64 / 1000000) */ >> - _bt->frac = _tv->tv_usec * (uint64_t)18446744073709LL; + >> _bt->frac = _tv->tv_usec * (uint64_t)18446744073709; } >> >> static __inline struct timespec Older parts used the uint64_t casts to get the correct type, but also used the long long abomination to avoid the warning, since this used to be necessary for gcc on i386. It is actually -std=c99 or clang that is needed to avoid the warning. The default for gcc is to warn, and even -std=gnu89 doesn't prevent the warning. This is bogus since old gcc and gnu89 support long long and don't warn about other uses of it. clang is more seriously broken in the other direction: it doesn't warn about either the constants too large for long or for use of long long even with -std=c89. It takes -std=c89 -pedantic to get a warning about use of long long, and this is not enough for a warning about large constants (e.g., in 'long long x = 111111111111111;'). clang does give a more useful conversion warning which such a constant is assigned to a type too small to represent it. -std=c99 is standard in kern.pre.mk but not so standard for applications. The default for applications is -std=gnu99 but there is support for overriding this. So another bug bites. I consider the functions with the LL's in them as namespace pollution for applications. I think they are meant to be used by applications, but they are undocumented. So it was not enough to check that this change doesn't break kernels. The SBT macros are also undocumented namespace pollution for applications (everything is under __BSD_VISIBLE, but that is the default), but since they are macros they don't cause problems unless they are used or have a conflicting name. Inline functions give much more pollution than macros since they are always parsed and they may depend on other headers. Bruce From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 21:44:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5676E12D; Wed, 20 Aug 2014 21:44:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3FC7739F8; Wed, 20 Aug 2014 21:44:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KLipc0041116; Wed, 20 Aug 2014 21:44:51 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KLinaC041097; Wed, 20 Aug 2014 21:44:49 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201408202144.s7KLinaC041097@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 20 Aug 2014 21:44:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270247 - in head/sys/cddl/contrib/opensolaris/uts: common/dtrace common/fs/zfs common/fs/zfs/sys common/os sparc/dtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 21:44:51 -0000 Author: delphij Date: Wed Aug 20 21:44:48 2014 New Revision: 270247 URL: http://svnweb.freebsd.org/changeset/base/270247 Log: MFC r270195: Illumos issue: 5045 use atomic_{inc,dec}_* instead of atomic_add_* MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c head/sys/cddl/contrib/opensolaris/uts/common/dtrace/profile.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/refcount.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_inject.c head/sys/cddl/contrib/opensolaris/uts/common/os/fm.c head/sys/cddl/contrib/opensolaris/uts/sparc/dtrace/fasttrap_isa.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Wed Aug 20 20:15:43 2014 (r270246) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Wed Aug 20 21:44:48 2014 (r270247) @@ -1467,7 +1467,7 @@ fasttrap_proc_lookup(pid_t pid) mutex_enter(&fprc->ftpc_mtx); mutex_exit(&bucket->ftb_mtx); fprc->ftpc_rcount++; - atomic_add_64(&fprc->ftpc_acount, 1); + atomic_inc_64(&fprc->ftpc_acount); ASSERT(fprc->ftpc_acount <= fprc->ftpc_rcount); mutex_exit(&fprc->ftpc_mtx); @@ -1501,7 +1501,7 @@ fasttrap_proc_lookup(pid_t pid) mutex_enter(&fprc->ftpc_mtx); mutex_exit(&bucket->ftb_mtx); fprc->ftpc_rcount++; - atomic_add_64(&fprc->ftpc_acount, 1); + atomic_inc_64(&fprc->ftpc_acount); ASSERT(fprc->ftpc_acount <= fprc->ftpc_rcount); mutex_exit(&fprc->ftpc_mtx); @@ -1738,7 +1738,7 @@ fasttrap_provider_free(fasttrap_provider * count of active providers on the associated process structure. */ if (!provider->ftp_retired) { - atomic_add_64(&provider->ftp_proc->ftpc_acount, -1); + atomic_dec_64(&provider->ftp_proc->ftpc_acount); ASSERT(provider->ftp_proc->ftpc_acount < provider->ftp_proc->ftpc_rcount); } @@ -1814,7 +1814,7 @@ fasttrap_provider_retire(pid_t pid, cons * bucket lock therefore protects the integrity of the provider hash * table. */ - atomic_add_64(&fp->ftp_proc->ftpc_acount, -1); + atomic_dec_64(&fp->ftp_proc->ftpc_acount); ASSERT(fp->ftp_proc->ftpc_acount < fp->ftp_proc->ftpc_rcount); fp->ftp_retired = 1; @@ -1910,10 +1910,10 @@ fasttrap_add_probe(fasttrap_probe_spec_t pdata->ftps_mod, pdata->ftps_func, name_str) != 0) continue; - atomic_add_32(&fasttrap_total, 1); + atomic_inc_32(&fasttrap_total); if (fasttrap_total > fasttrap_max) { - atomic_add_32(&fasttrap_total, -1); + atomic_dec_32(&fasttrap_total); goto no_mem; } Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/profile.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/profile.c Wed Aug 20 20:15:43 2014 (r270246) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/profile.c Wed Aug 20 21:44:48 2014 (r270247) @@ -169,9 +169,9 @@ profile_create(hrtime_t interval, const if (dtrace_probe_lookup(profile_id, NULL, NULL, name) != 0) return; - atomic_add_32(&profile_total, 1); + atomic_inc_32(&profile_total); if (profile_total > profile_max) { - atomic_add_32(&profile_total, -1); + atomic_dec_32(&profile_total); return; } @@ -326,7 +326,7 @@ profile_destroy(void *arg, dtrace_id_t i kmem_free(prof, sizeof (profile_probe_t)); ASSERT(profile_total >= 1); - atomic_add_32(&profile_total, -1); + atomic_dec_32(&profile_total); } /*ARGSUSED*/ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Wed Aug 20 20:15:43 2014 (r270246) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Wed Aug 20 21:44:48 2014 (r270247) @@ -182,7 +182,7 @@ dbuf_hash_insert(dmu_buf_impl_t *db) db->db_hash_next = h->hash_table[idx]; h->hash_table[idx] = db; mutex_exit(DBUF_HASH_MUTEX(h, idx)); - atomic_add_64(&dbuf_hash_count, 1); + atomic_inc_64(&dbuf_hash_count); return (NULL); } @@ -216,7 +216,7 @@ dbuf_hash_remove(dmu_buf_impl_t *db) *dbp = db->db_hash_next; db->db_hash_next = NULL; mutex_exit(DBUF_HASH_MUTEX(h, idx)); - atomic_add_64(&dbuf_hash_count, -1); + atomic_dec_64(&dbuf_hash_count); } static arc_evict_func_t dbuf_do_evict; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Wed Aug 20 20:15:43 2014 (r270246) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Wed Aug 20 21:44:48 2014 (r270247) @@ -1872,9 +1872,9 @@ spa_load_verify_done(zio_t *zio) if (error) { if ((BP_GET_LEVEL(bp) != 0 || DMU_OT_IS_METADATA(type)) && type != DMU_OT_INTENT_LOG) - atomic_add_64(&sle->sle_meta_count, 1); + atomic_inc_64(&sle->sle_meta_count); else - atomic_add_64(&sle->sle_data_count, 1); + atomic_inc_64(&sle->sle_data_count); } zio_data_buf_free(zio->io_data, zio->io_size); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/refcount.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/refcount.h Wed Aug 20 20:15:43 2014 (r270246) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/refcount.h Wed Aug 20 21:44:48 2014 (r270247) @@ -89,8 +89,8 @@ typedef struct refcount { #define refcount_destroy_many(rc, number) ((rc)->rc_count = 0) #define refcount_is_zero(rc) ((rc)->rc_count == 0) #define refcount_count(rc) ((rc)->rc_count) -#define refcount_add(rc, holder) atomic_add_64_nv(&(rc)->rc_count, 1) -#define refcount_remove(rc, holder) atomic_add_64_nv(&(rc)->rc_count, -1) +#define refcount_add(rc, holder) atomic_inc_64_nv(&(rc)->rc_count) +#define refcount_remove(rc, holder) atomic_dec_64_nv(&(rc)->rc_count) #define refcount_add_many(rc, number, holder) \ atomic_add_64_nv(&(rc)->rc_count, number) #define refcount_remove_many(rc, number, holder) \ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c Wed Aug 20 20:15:43 2014 (r270246) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c Wed Aug 20 21:44:48 2014 (r270247) @@ -111,7 +111,7 @@ static vdc_stats_t vdc_stats = { { "misses", KSTAT_DATA_UINT64 } }; -#define VDCSTAT_BUMP(stat) atomic_add_64(&vdc_stats.stat.value.ui64, 1); +#define VDCSTAT_BUMP(stat) atomic_inc_64(&vdc_stats.stat.value.ui64); static int vdev_cache_offset_compare(const void *a1, const void *a2) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Wed Aug 20 20:15:43 2014 (r270246) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Wed Aug 20 21:44:48 2014 (r270247) @@ -992,7 +992,7 @@ vdev_uberblock_sync_done(zio_t *zio) uint64_t *good_writes = zio->io_private; if (zio->io_error == 0 && zio->io_vd->vdev_top->vdev_ms_array != 0) - atomic_add_64(good_writes, 1); + atomic_inc_64(good_writes); } /* @@ -1067,7 +1067,7 @@ vdev_label_sync_done(zio_t *zio) uint64_t *good_writes = zio->io_private; if (zio->io_error == 0) - atomic_add_64(good_writes, 1); + atomic_inc_64(good_writes); } /* Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Aug 20 20:15:43 2014 (r270246) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Aug 20 21:44:48 2014 (r270247) @@ -1233,7 +1233,7 @@ out: dmu_objset_disown(zfsvfs->z_os, zfsvfs); zfsvfs_free(zfsvfs); } else { - atomic_add_32(&zfs_active_fs_count, 1); + atomic_inc_32(&zfs_active_fs_count); } return (error); @@ -2324,7 +2324,7 @@ zfs_freevfs(vfs_t *vfsp) zfsvfs_free(zfsvfs); - atomic_add_32(&zfs_active_fs_count, -1); + atomic_dec_32(&zfs_active_fs_count); } #ifdef __i386__ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_inject.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_inject.c Wed Aug 20 20:15:43 2014 (r270246) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_inject.c Wed Aug 20 21:44:48 2014 (r270247) @@ -426,7 +426,7 @@ zio_inject_fault(char *name, int flags, handler->zi_spa = spa; handler->zi_record = *record; list_insert_tail(&inject_handlers, handler); - atomic_add_32(&zio_injection_enabled, 1); + atomic_inc_32(&zio_injection_enabled); rw_exit(&inject_lock); } @@ -503,7 +503,7 @@ zio_clear_fault(int id) spa_inject_delref(handler->zi_spa); kmem_free(handler, sizeof (inject_handler_t)); - atomic_add_32(&zio_injection_enabled, -1); + atomic_dec_32(&zio_injection_enabled); return (0); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/os/fm.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/os/fm.c Wed Aug 20 20:15:43 2014 (r270246) +++ head/sys/cddl/contrib/opensolaris/uts/common/os/fm.c Wed Aug 20 21:44:48 2014 (r270247) @@ -524,20 +524,20 @@ fm_ereport_post(nvlist_t *ereport, int e (void) nvlist_size(ereport, &nvl_size, NV_ENCODE_NATIVE); if (nvl_size > ERPT_DATA_SZ || nvl_size == 0) { - atomic_add_64(&erpt_kstat_data.erpt_dropped.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.erpt_dropped.value.ui64); return; } #ifdef sun if (sysevent_evc_bind(FM_ERROR_CHAN, &error_chan, EVCH_CREAT|EVCH_HOLD_PEND) != 0) { - atomic_add_64(&erpt_kstat_data.erpt_dropped.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.erpt_dropped.value.ui64); return; } if (sysevent_evc_publish(error_chan, EC_FM, ESC_FM_ERROR, SUNW_VENDOR, FM_PUB, ereport, evc_flag) != 0) { - atomic_add_64(&erpt_kstat_data.erpt_dropped.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.erpt_dropped.value.ui64); (void) sysevent_evc_unbind(error_chan); return; } @@ -803,8 +803,7 @@ fm_payload_set(nvlist_t *payload, ...) va_end(ap); if (ret) - atomic_add_64( - &erpt_kstat_data.payload_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.payload_set_failed.value.ui64); } /* @@ -837,24 +836,24 @@ fm_ereport_set(nvlist_t *ereport, int ve int ret; if (version != FM_EREPORT_VERS0) { - atomic_add_64(&erpt_kstat_data.erpt_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.erpt_set_failed.value.ui64); return; } (void) snprintf(ereport_class, FM_MAX_CLASS, "%s.%s", FM_EREPORT_CLASS, erpt_class); if (nvlist_add_string(ereport, FM_CLASS, ereport_class) != 0) { - atomic_add_64(&erpt_kstat_data.erpt_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.erpt_set_failed.value.ui64); return; } if (nvlist_add_uint64(ereport, FM_EREPORT_ENA, ena)) { - atomic_add_64(&erpt_kstat_data.erpt_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.erpt_set_failed.value.ui64); } if (nvlist_add_nvlist(ereport, FM_EREPORT_DETECTOR, (nvlist_t *)detector) != 0) { - atomic_add_64(&erpt_kstat_data.erpt_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.erpt_set_failed.value.ui64); } va_start(ap, detector); @@ -863,7 +862,7 @@ fm_ereport_set(nvlist_t *ereport, int ve va_end(ap); if (ret) - atomic_add_64(&erpt_kstat_data.erpt_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.erpt_set_failed.value.ui64); } /* @@ -886,19 +885,19 @@ static int fm_fmri_hc_set_common(nvlist_t *fmri, int version, const nvlist_t *auth) { if (version != FM_HC_SCHEME_VERSION) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return (0); } if (nvlist_add_uint8(fmri, FM_VERSION, version) != 0 || nvlist_add_string(fmri, FM_FMRI_SCHEME, FM_FMRI_SCHEME_HC) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return (0); } if (auth != NULL && nvlist_add_nvlist(fmri, FM_FMRI_AUTHORITY, (nvlist_t *)auth) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return (0); } @@ -930,22 +929,22 @@ fm_fmri_hc_set(nvlist_t *fmri, int versi pairs[i] = fm_nvlist_create(nva); if (nvlist_add_string(pairs[i], FM_FMRI_HC_NAME, name) != 0 || nvlist_add_string(pairs[i], FM_FMRI_HC_ID, idstr) != 0) { - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); } } va_end(ap); if (nvlist_add_nvlist_array(fmri, FM_FMRI_HC_LIST, pairs, npairs) != 0) - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); for (i = 0; i < npairs; i++) fm_nvlist_destroy(pairs[i], FM_NVA_RETAIN); if (snvl != NULL) { if (nvlist_add_nvlist(fmri, FM_FMRI_HC_SPECIFIC, snvl) != 0) { - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); } } } @@ -970,7 +969,7 @@ fm_fmri_dev_set(nvlist_t *fmri_dev, int int err = 0; if (version != DEV_SCHEME_VERSION0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } @@ -991,7 +990,7 @@ fm_fmri_dev_set(nvlist_t *fmri_dev, int err |= nvlist_add_string(fmri_dev, FM_FMRI_DEV_TGTPTLUN0, tpl0); if (err) - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); } @@ -1016,35 +1015,35 @@ fm_fmri_cpu_set(nvlist_t *fmri_cpu, int uint64_t *failedp = &erpt_kstat_data.fmri_set_failed.value.ui64; if (version < CPU_SCHEME_VERSION1) { - atomic_add_64(failedp, 1); + atomic_inc_64(failedp); return; } if (nvlist_add_uint8(fmri_cpu, FM_VERSION, version) != 0) { - atomic_add_64(failedp, 1); + atomic_inc_64(failedp); return; } if (nvlist_add_string(fmri_cpu, FM_FMRI_SCHEME, FM_FMRI_SCHEME_CPU) != 0) { - atomic_add_64(failedp, 1); + atomic_inc_64(failedp); return; } if (auth != NULL && nvlist_add_nvlist(fmri_cpu, FM_FMRI_AUTHORITY, (nvlist_t *)auth) != 0) - atomic_add_64(failedp, 1); + atomic_inc_64(failedp); if (nvlist_add_uint32(fmri_cpu, FM_FMRI_CPU_ID, cpu_id) != 0) - atomic_add_64(failedp, 1); + atomic_inc_64(failedp); if (cpu_maskp != NULL && nvlist_add_uint8(fmri_cpu, FM_FMRI_CPU_MASK, *cpu_maskp) != 0) - atomic_add_64(failedp, 1); + atomic_inc_64(failedp); if (serial_idp == NULL || nvlist_add_string(fmri_cpu, FM_FMRI_CPU_SERIAL_ID, (char *)serial_idp) != 0) - atomic_add_64(failedp, 1); + atomic_inc_64(failedp); } /* @@ -1065,49 +1064,47 @@ fm_fmri_mem_set(nvlist_t *fmri, int vers const char *unum, const char *serial, uint64_t offset) { if (version != MEM_SCHEME_VERSION0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } if (!serial && (offset != (uint64_t)-1)) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } if (nvlist_add_uint8(fmri, FM_VERSION, version) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } if (nvlist_add_string(fmri, FM_FMRI_SCHEME, FM_FMRI_SCHEME_MEM) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } if (auth != NULL) { if (nvlist_add_nvlist(fmri, FM_FMRI_AUTHORITY, (nvlist_t *)auth) != 0) { - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); } } if (nvlist_add_string(fmri, FM_FMRI_MEM_UNUM, unum) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); } if (serial != NULL) { if (nvlist_add_string_array(fmri, FM_FMRI_MEM_SERIAL_ID, (char **)&serial, 1) != 0) { - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); } - if (offset != (uint64_t)-1) { - if (nvlist_add_uint64(fmri, FM_FMRI_MEM_OFFSET, - offset) != 0) { - atomic_add_64(&erpt_kstat_data. - fmri_set_failed.value.ui64, 1); - } + if (offset != (uint64_t)-1 && nvlist_add_uint64(fmri, + FM_FMRI_MEM_OFFSET, offset) != 0) { + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); } } } @@ -1117,28 +1114,28 @@ fm_fmri_zfs_set(nvlist_t *fmri, int vers uint64_t vdev_guid) { if (version != ZFS_SCHEME_VERSION0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } if (nvlist_add_uint8(fmri, FM_VERSION, version) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } if (nvlist_add_string(fmri, FM_FMRI_SCHEME, FM_FMRI_SCHEME_ZFS) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } if (nvlist_add_uint64(fmri, FM_FMRI_ZFS_POOL, pool_guid) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); } if (vdev_guid != 0) { if (nvlist_add_uint64(fmri, FM_FMRI_ZFS_VDEV, vdev_guid) != 0) { - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); } } } @@ -1322,20 +1319,20 @@ fm_fmri_hc_create(nvlist_t *fmri, int ve */ if (nvlist_lookup_nvlist_array(bboard, FM_FMRI_HC_LIST, &hcl, &n) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } for (i = 0; i < n; i++) { if (nvlist_lookup_string(hcl[i], FM_FMRI_HC_NAME, &hcname) != 0) { - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); return; } if (nvlist_lookup_string(hcl[i], FM_FMRI_HC_ID, &hcid) != 0) { - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); return; } @@ -1347,8 +1344,8 @@ fm_fmri_hc_create(nvlist_t *fmri, int ve fm_nvlist_destroy(pairs[j], FM_NVA_RETAIN); } - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); return; } } @@ -1372,8 +1369,8 @@ fm_fmri_hc_create(nvlist_t *fmri, int ve fm_nvlist_destroy(pairs[j], FM_NVA_RETAIN); } - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); return; } } @@ -1384,7 +1381,7 @@ fm_fmri_hc_create(nvlist_t *fmri, int ve */ if (nvlist_add_nvlist_array(fmri, FM_FMRI_HC_LIST, pairs, npairs + n) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } @@ -1394,8 +1391,8 @@ fm_fmri_hc_create(nvlist_t *fmri, int ve if (snvl != NULL) { if (nvlist_add_nvlist(fmri, FM_FMRI_HC_SPECIFIC, snvl) != 0) { - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); return; } } Modified: head/sys/cddl/contrib/opensolaris/uts/sparc/dtrace/fasttrap_isa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/sparc/dtrace/fasttrap_isa.c Wed Aug 20 20:15:43 2014 (r270246) +++ head/sys/cddl/contrib/opensolaris/uts/sparc/dtrace/fasttrap_isa.c Wed Aug 20 21:44:48 2014 (r270247) @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include @@ -1410,7 +1408,7 @@ fasttrap_getreg(struct regs *rp, uint_t value = dtrace_getreg_win(reg, 1); dtrace_interrupt_enable(cookie); - atomic_add_64(&fasttrap_getreg_fast_cnt, 1); + atomic_inc_64(&fasttrap_getreg_fast_cnt); return (value); } @@ -1435,7 +1433,7 @@ fasttrap_getreg(struct regs *rp, uint_t if ((long)mpcb->mpcb_spbuf[i] != rp->r_sp) continue; - atomic_add_64(&fasttrap_getreg_mpcb_cnt, 1); + atomic_inc_64(&fasttrap_getreg_mpcb_cnt); return (rwin[i].rw_local[reg - 16]); } while (i > 0); } @@ -1455,7 +1453,7 @@ fasttrap_getreg(struct regs *rp, uint_t if ((long)mpcb->mpcb_spbuf[i] != rp->r_sp) continue; - atomic_add_64(&fasttrap_getreg_mpcb_cnt, 1); + atomic_inc_64(&fasttrap_getreg_mpcb_cnt); return (rwin[i].rw_local[reg - 16]); } while (i > 0); } @@ -1466,7 +1464,7 @@ fasttrap_getreg(struct regs *rp, uint_t v32[0] = 0; } - atomic_add_64(&fasttrap_getreg_slow_cnt, 1); + atomic_inc_64(&fasttrap_getreg_slow_cnt); return (value); err: @@ -1505,7 +1503,7 @@ fasttrap_putreg(struct regs *rp, uint_t if (dtrace_getotherwin() > 0) { dtrace_putreg_win(reg, value); dtrace_interrupt_enable(cookie); - atomic_add_64(&fasttrap_putreg_fast_cnt, 1); + atomic_inc_64(&fasttrap_putreg_fast_cnt); return; } dtrace_interrupt_enable(cookie); @@ -1536,7 +1534,7 @@ fasttrap_putreg(struct regs *rp, uint_t continue; rwin[i].rw_local[reg - 16] = value; - atomic_add_64(&fasttrap_putreg_mpcb_cnt, 1); + atomic_inc_64(&fasttrap_putreg_mpcb_cnt); return; } while (i > 0); } @@ -1549,7 +1547,7 @@ fasttrap_putreg(struct regs *rp, uint_t rwin[mpcb->mpcb_wbcnt].rw_local[reg - 16] = value; mpcb->mpcb_spbuf[mpcb->mpcb_wbcnt] = (caddr_t)rp->r_sp; mpcb->mpcb_wbcnt++; - atomic_add_64(&fasttrap_putreg_mpcb_cnt, 1); + atomic_inc_64(&fasttrap_putreg_mpcb_cnt); return; } } else { @@ -1567,7 +1565,7 @@ fasttrap_putreg(struct regs *rp, uint_t continue; rwin[i].rw_local[reg - 16] = v32; - atomic_add_64(&fasttrap_putreg_mpcb_cnt, 1); + atomic_inc_64(&fasttrap_putreg_mpcb_cnt); return; } while (i > 0); } @@ -1580,12 +1578,12 @@ fasttrap_putreg(struct regs *rp, uint_t rwin[mpcb->mpcb_wbcnt].rw_local[reg - 16] = v32; mpcb->mpcb_spbuf[mpcb->mpcb_wbcnt] = (caddr_t)rp->r_sp; mpcb->mpcb_wbcnt++; - atomic_add_64(&fasttrap_putreg_mpcb_cnt, 1); + atomic_inc_64(&fasttrap_putreg_mpcb_cnt); return; } } - atomic_add_64(&fasttrap_putreg_slow_cnt, 1); + atomic_inc_64(&fasttrap_putreg_slow_cnt); return; err: From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 22:39:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 05B0CD28; Wed, 20 Aug 2014 22:39:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CBAAC3ED6; Wed, 20 Aug 2014 22:39:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KMdQPq064334; Wed, 20 Aug 2014 22:39:26 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KMdQWL064332; Wed, 20 Aug 2014 22:39:26 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201408202239.s7KMdQWL064332@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 20 Aug 2014 22:39:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270248 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 22:39:27 -0000 Author: delphij Date: Wed Aug 20 22:39:26 2014 New Revision: 270248 URL: http://svnweb.freebsd.org/changeset/base/270248 Log: MFV r270196: Illumos issue: 5047 don't use atomic_*_nv if you discard the return value MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Wed Aug 20 21:44:48 2014 (r270247) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Wed Aug 20 22:39:26 2014 (r270248) @@ -1609,7 +1609,7 @@ dbuf_clear(dmu_buf_impl_t *db) dndb = dn->dn_dbuf; if (db->db_blkid != DMU_BONUS_BLKID && MUTEX_HELD(&dn->dn_dbufs_mtx)) { avl_remove(&dn->dn_dbufs, db); - (void) atomic_dec_32_nv(&dn->dn_dbufs_count); + atomic_dec_32(&dn->dn_dbufs_count); membar_producer(); DB_DNODE_EXIT(db); /* @@ -1785,7 +1785,7 @@ dbuf_create(dnode_t *dn, uint8_t level, ASSERT(dn->dn_object == DMU_META_DNODE_OBJECT || refcount_count(&dn->dn_holds) > 0); (void) refcount_add(&dn->dn_holds, db); - (void) atomic_inc_32_nv(&dn->dn_dbufs_count); + atomic_inc_32(&dn->dn_dbufs_count); dprintf_dbuf(db, "db=%p\n", db); @@ -1831,7 +1831,7 @@ dbuf_destroy(dmu_buf_impl_t *db) dn = DB_DNODE(db); mutex_enter(&dn->dn_dbufs_mtx); avl_remove(&dn->dn_dbufs, db); - (void) atomic_dec_32_nv(&dn->dn_dbufs_count); + atomic_dec_32(&dn->dn_dbufs_count); mutex_exit(&dn->dn_dbufs_mtx); DB_DNODE_EXIT(db); /* @@ -2115,7 +2115,7 @@ dbuf_rele_and_unlock(dmu_buf_impl_t *db, * until the move completes. */ DB_DNODE_ENTER(db); - (void) atomic_dec_32_nv(&DB_DNODE(db)->dn_dbufs_count); + atomic_dec_32(&DB_DNODE(db)->dn_dbufs_count); DB_DNODE_EXIT(db); /* * The bonus buffer's dnode hold is no longer discounted Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Wed Aug 20 21:44:48 2014 (r270247) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Wed Aug 20 22:39:26 2014 (r270248) @@ -287,7 +287,7 @@ dmu_bonus_hold(objset_t *os, uint64_t ob /* as long as the bonus buf is held, the dnode will be held */ if (refcount_add(&db->db_holds, tag) == 1) { VERIFY(dnode_add_ref(dn, db)); - (void) atomic_inc_32_nv(&dn->dn_dbufs_count); + atomic_inc_32(&dn->dn_dbufs_count); } /* From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 22:58:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9C62031D; Wed, 20 Aug 2014 22:58:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F2CA3062; Wed, 20 Aug 2014 22:58:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KMwDLg073410; Wed, 20 Aug 2014 22:58:13 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KMwDh3073409; Wed, 20 Aug 2014 22:58:13 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201408202258.s7KMwDh3073409@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 20 Aug 2014 22:58:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270249 - head/sys/cam/ata X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 22:58:13 -0000 Author: imp Date: Wed Aug 20 22:58:12 2014 New Revision: 270249 URL: http://svnweb.freebsd.org/changeset/base/270249 Log: 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). Modified: head/sys/cam/ata/ata_xpt.c Modified: head/sys/cam/ata/ata_xpt.c ============================================================================== --- head/sys/cam/ata/ata_xpt.c Wed Aug 20 22:39:26 2014 (r270248) +++ head/sys/cam/ata/ata_xpt.c Wed Aug 20 22:58:12 2014 (r270249) @@ -458,12 +458,18 @@ negotiate: 0, 0x02); break; case PROBE_SETAN: - /* Remember what transport thinks about AEN. */ - if (softc->caps & CTS_SATA_CAPS_H_AN) + /* + * Only ATAPI defines this bit to mean AEN, but remember + * what transport thinks about AEN. + */ + if ((softc->caps & CTS_SATA_CAPS_H_AN) && + periph->path->device->protocol == PROTO_ATAPI) path->device->inq_flags |= SID_AEN; else path->device->inq_flags &= ~SID_AEN; xpt_async(AC_GETDEV_CHANGED, path, NULL); + if (periph->path->device->protocol != PROTO_ATAPI) + break; cam_fill_ataio(ataio, 1, probedone, @@ -750,14 +756,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. From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 23:09:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 629A15BF; Wed, 20 Aug 2014 23:09:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 42D2C3123; Wed, 20 Aug 2014 23:09:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KN9T1e078460; Wed, 20 Aug 2014 23:09:29 GMT (envelope-from slm@FreeBSD.org) Received: (from slm@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KN9Sl5078454; Wed, 20 Aug 2014 23:09:28 GMT (envelope-from slm@FreeBSD.org) Message-Id: <201408202309.s7KN9Sl5078454@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: slm set sender to slm@FreeBSD.org using -f From: Stephen McConnell Date: Wed, 20 Aug 2014 23:09:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270250 - stable/10/sys/dev/mps X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 23:09:29 -0000 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 owner-svn-src-all@FreeBSD.ORG Wed Aug 20 23:29:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 27E8FDFF; Wed, 20 Aug 2014 23:29:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1400C3334; Wed, 20 Aug 2014 23:29:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KNTYiu087510; Wed, 20 Aug 2014 23:29:34 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KNTYq8087509; Wed, 20 Aug 2014 23:29:34 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201408202329.s7KNTYq8087509@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Wed, 20 Aug 2014 23:29:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270251 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 23:29:35 -0000 Author: gavin Date: Wed Aug 20 23:29:34 2014 New Revision: 270251 URL: http://svnweb.freebsd.org/changeset/base/270251 Log: Fix return type of callout_init_rm() and add return type to callout_deactivate(). PR: 192520 Submitted by: yaneurabeya gmail com MFC after: 3 days Modified: head/share/man/man9/timeout.9 Modified: head/share/man/man9/timeout.9 ============================================================================== --- head/share/man/man9/timeout.9 Wed Aug 20 23:09:27 2014 (r270250) +++ head/share/man/man9/timeout.9 Wed Aug 20 23:29:34 2014 (r270251) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 17, 2014 +.Dd August 21, 2014 .Dt TIMEOUT 9 .Os .Sh NAME @@ -74,7 +74,7 @@ struct callout_handle handle = CALLOUT_H .Fn callout_init "struct callout *c" "int mpsafe" .Ft void .Fn callout_init_mtx "struct callout *c" "struct mtx *mtx" "int flags" -.Fn void +.Ft void .Fn callout_init_rm "struct callout *c" "struct rmlock *rm" "int flags" .Ft void .Fn callout_init_rw "struct callout *c" "struct rwlock *rw" "int flags" @@ -103,6 +103,7 @@ struct callout_handle handle = CALLOUT_H .Fn callout_pending "struct callout *c" .Ft int .Fn callout_active "struct callout *c" +.Ft void .Fn callout_deactivate "struct callout *c" .Sh DESCRIPTION The function From owner-svn-src-all@FreeBSD.ORG Wed Aug 20 23:34:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 40A8416E; Wed, 20 Aug 2014 23:34:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A45D33F2; Wed, 20 Aug 2014 23:34:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KNYcDW091443; Wed, 20 Aug 2014 23:34:38 GMT (envelope-from luigi@FreeBSD.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KNYaax091432; Wed, 20 Aug 2014 23:34:36 GMT (envelope-from luigi@FreeBSD.org) Message-Id: <201408202334.s7KNYaax091432@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: luigi set sender to luigi@FreeBSD.org using -f From: Luigi Rizzo Date: Wed, 20 Aug 2014 23:34:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270252 - in stable/10: sys/conf sys/dev/e1000 sys/dev/ixgbe sys/dev/netmap tools/tools/netmap X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 23:34:38 -0000 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 owner-svn-src-all@FreeBSD.ORG Wed Aug 20 23:36:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A3C12C5; Wed, 20 Aug 2014 23:36:09 +0000 (UTC) Received: from mail-pd0-x22b.google.com (mail-pd0-x22b.google.com [IPv6:2607:f8b0:400e:c02::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DD9F43402; Wed, 20 Aug 2014 23:36:08 +0000 (UTC) Received: by mail-pd0-f171.google.com with SMTP id z10so12738602pdj.30 for ; Wed, 20 Aug 2014 16:36:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=myzuNQW7ipq1doY4a7lMmsAUYUGqkFfL340rj61zB/E=; b=ZskxMZ0EpdVzVz6/T8M/GfVuNTiKj85IoSwbyQFQhXTZ1+j3FgjQ1YE7xUAuLe8/jI H6k6Kw/IrXOuAq6aj9Fs95jgVnDcRFmoc2PmT9nvhkUhwZVIVf+TQTi5Qlbl0Lg3gTB5 JehRlIu2Oj3xGMBuoW7yYxPPppNkwXqY1kqNCVxlYQK9mpnEHd7TP3yda36tTpARNIBg NrBELu7oQZkYdXfiffGVhvCjR0O6gP0wb8gfpDEvk8QyoeVC4qJLTXtOqqx18WnSoSw7 bpJlYEnoiMs0PiAcDfq5Kg7RcaRKdLEA2zn0Qiu/P65i8vixWTMpDCDENYIA6BuEB5xv yobA== X-Received: by 10.68.222.136 with SMTP id qm8mr56999056pbc.92.1408577768496; Wed, 20 Aug 2014 16:36:08 -0700 (PDT) Received: from [10.192.166.0] (stargate.chelsio.com. [67.207.112.58]) by mx.google.com with ESMTPSA id ov8sm27045125pdb.92.2014.08.20.16.36.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Aug 2014 16:36:08 -0700 (PDT) Sender: Navdeep Parhar Message-ID: <53F530E6.7000504@FreeBSD.org> Date: Wed, 20 Aug 2014 16:36:06 -0700 From: Navdeep Parhar User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Luigi Rizzo , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r270252 - in stable/10: sys/conf sys/dev/e1000 sys/dev/ixgbe sys/dev/netmap tools/tools/netmap References: <201408202334.s7KNYaax091432@svn.freebsd.org> In-Reply-To: <201408202334.s7KNYaax091432@svn.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 23:36:09 -0000 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 owner-svn-src-all@FreeBSD.ORG Wed Aug 20 23:37:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B9DE04E4; Wed, 20 Aug 2014 23:37:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2615341F; Wed, 20 Aug 2014 23:37:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7KNbikQ092030; Wed, 20 Aug 2014 23:37:44 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7KNbi6K092029; Wed, 20 Aug 2014 23:37:44 GMT (envelope-from np@FreeBSD.org) Message-Id: <201408202337.s7KNbi6K092029@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 20 Aug 2014 23:37:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270253 - head/sys/dev/netmap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 23:37:44 -0000 Author: np Date: Wed Aug 20 23:37:44 2014 New Revision: 270253 URL: http://svnweb.freebsd.org/changeset/base/270253 Log: Change netmap's global lock to sx instead of a mutex. Reviewed by: luigi@ MFC after: 1 day Modified: head/sys/dev/netmap/netmap_kern.h Modified: head/sys/dev/netmap/netmap_kern.h ============================================================================== --- head/sys/dev/netmap/netmap_kern.h Wed Aug 20 23:34:36 2014 (r270252) +++ head/sys/dev/netmap/netmap_kern.h Wed Aug 20 23:37:44 2014 (r270253) @@ -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 owner-svn-src-all@FreeBSD.ORG Wed Aug 20 23:48:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BFADE9E9; Wed, 20 Aug 2014 23:48:29 +0000 (UTC) Received: from mail-ie0-x234.google.com (mail-ie0-x234.google.com [IPv6:2607:f8b0:4001:c03::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5DA663509; Wed, 20 Aug 2014 23:48:29 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id at20so3656871iec.25 for ; Wed, 20 Aug 2014 16:48:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=9nu2FYYRNYAsnWwLF5z7sNv8flZ/7/WHTf5Yrnng+Lo=; b=CDg7NBkqejCSIvpPF4TwSiDvLXpSgY7jeCbBf9vp0xi+Ak40GX5h7fcbbT72/LBiUW nwy8M3pjHeF6qS8EVdSQ623zw2BHHryenqKiIoTVxOtMIJBadVwQ8DrzUcgZBra/+xUS x7vWf0i8zi3f/Rc7VKnuxuKYG3iSLzx2MWgXIgkUmwNJvYsS+Vq12jxGT1FhLvbZHebj OD4pIZWWc10uXVQir1mFjUBwfv+JGx6bzhQGZRkeO6I6xOevp/Fhp6s0XBppv4LhqiI8 tdKHPoodVTpyQy1LY2MK2VUdT1mE1PwPDcfUNWFSOAjQK6VyA2bdKOlw+x9Fq/DFiO+B JLjg== X-Received: by 10.50.79.232 with SMTP id m8mr16197396igx.0.1408578508442; Wed, 20 Aug 2014 16:48:28 -0700 (PDT) MIME-Version: 1.0 Sender: mr.kodiak@gmail.com Received: by 10.64.171.14 with HTTP; Wed, 20 Aug 2014 16:47:58 -0700 (PDT) In-Reply-To: <53F530E6.7000504@FreeBSD.org> References: <201408202334.s7KNYaax091432@svn.freebsd.org> <53F530E6.7000504@FreeBSD.org> From: Bryan Venteicher Date: Wed, 20 Aug 2014 18:47:58 -0500 X-Google-Sender-Auth: xAfwCemtx361UTLsLXjwx4zCkjI Message-ID: Subject: Re: svn commit: r270252 - in stable/10: sys/conf sys/dev/e1000 sys/dev/ixgbe sys/dev/netmap tools/tools/netmap To: Navdeep Parhar Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-stable@freebsd.org, Luigi Rizzo , src-committers@freebsd.org, svn-src-stable-10@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 23:48:30 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 00:57:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A7C7CD3; Thu, 21 Aug 2014 00:57:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93A6F3BEA; Thu, 21 Aug 2014 00:57:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7L0vXw5029824; Thu, 21 Aug 2014 00:57:33 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7L0vX95029823; Thu, 21 Aug 2014 00:57:33 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201408210057.s7L0vX95029823@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 21 Aug 2014 00:57:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270254 - head/sys/dev/ep X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 00:57:33 -0000 Author: adrian Date: Thu Aug 21 00:57:32 2014 New Revision: 270254 URL: http://svnweb.freebsd.org/changeset/base/270254 Log: Add missing locking. Whilst here, assert that the lock is held when calling epstop(). Tested: ep0: <3com Megahertz 574B> Modified: head/sys/dev/ep/if_ep.c Modified: head/sys/dev/ep/if_ep.c ============================================================================== --- head/sys/dev/ep/if_ep.c Wed Aug 20 23:37:44 2014 (r270253) +++ head/sys/dev/ep/if_ep.c Thu Aug 21 00:57:32 2014 (r270254) @@ -343,7 +343,9 @@ ep_attach(struct ep_softc *sc) EP_FSET(sc, F_RX_FIRST); sc->top = sc->mcur = 0; + EP_LOCK(sc); epstop(sc); + EP_UNLOCK(sc); return (0); } @@ -1000,6 +1002,9 @@ epwatchdog(struct ep_softc *sc) static void epstop(struct ep_softc *sc) { + + EP_ASSERT_LOCKED(sc); + CSR_WRITE_2(sc, EP_COMMAND, RX_DISABLE); CSR_WRITE_2(sc, EP_COMMAND, RX_DISCARD_TOP_PACK); EP_BUSY_WAIT(sc); From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 01:07:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 461EF353; Thu, 21 Aug 2014 01:07:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15BF13CE9; Thu, 21 Aug 2014 01:07:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7L17R1W034451; Thu, 21 Aug 2014 01:07:27 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7L17RES034450; Thu, 21 Aug 2014 01:07:27 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201408210107.s7L17RES034450@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 21 Aug 2014 01:07:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270255 - stable/10/usr.sbin/mountd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 01:07:28 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 01:48:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89EE9A7C; Thu, 21 Aug 2014 01:48:29 +0000 (UTC) Received: from mail-qg0-x22b.google.com (mail-qg0-x22b.google.com [IPv6:2607:f8b0:400d:c04::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 299B03082; Thu, 21 Aug 2014 01:48:29 +0000 (UTC) Received: by mail-qg0-f43.google.com with SMTP id a108so8398138qge.30 for ; Wed, 20 Aug 2014 18:48:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=BLKt6bf7EW9MlLPSiqTwr8eRKa6vH2RfV+UFYI6rigA=; b=EkwW9WltNa+hOgXLA/QfkO+zh3HdisWiJRqKdRibIad1h09hGzXOH4baZMJUcrFN3l Th9f67y5OXr1X8YDgejTNbwdnnht9/pZdsszwNLFO2fN1waGPgkWbucM6pZsDuTohclJ kjgnIK0sHnv+qq5+hXxgT76E43nlZxJiUblDeTKzm0P5STQMrPvA9sRk2aUQXyXr3UU0 Px8nRFgBOEiCFH4UuoBlCmMiMdtssq/Dcv7x8sr7HbYY1mE7vhgfc0y4C/6hQ65Id4w0 hpf9eUOT4/AYPPtcTdYVn/lc8VZOOnExaSAPNxdfkNBLVOhKTnbyglvIG0If1CAPetcp qc0A== MIME-Version: 1.0 X-Received: by 10.224.75.73 with SMTP id x9mr46612858qaj.63.1408585708307; Wed, 20 Aug 2014 18:48:28 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.39.139 with HTTP; Wed, 20 Aug 2014 18:48:28 -0700 (PDT) In-Reply-To: <201408210057.s7L0vX95029823@svn.freebsd.org> References: <201408210057.s7L0vX95029823@svn.freebsd.org> Date: Wed, 20 Aug 2014 18:48:28 -0700 X-Google-Sender-Auth: VMXIsP_tPOWMAXxZ-d2KLlkz7AY Message-ID: Subject: Re: svn commit: r270254 - head/sys/dev/ep From: Adrian Chadd To: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 01:48:29 -0000 Also, I have no plans to MFC this, but it likely should be. So if you're .. bored, please feel free to MFC this as appropriate. -a On 20 August 2014 17:57, Adrian Chadd wrote: > Author: adrian > Date: Thu Aug 21 00:57:32 2014 > New Revision: 270254 > URL: http://svnweb.freebsd.org/changeset/base/270254 > > Log: > Add missing locking. > > Whilst here, assert that the lock is held when calling epstop(). > > Tested: > > ep0: <3com Megahertz 574B> > > Modified: > head/sys/dev/ep/if_ep.c > > Modified: head/sys/dev/ep/if_ep.c > ============================================================================== > --- head/sys/dev/ep/if_ep.c Wed Aug 20 23:37:44 2014 (r270253) > +++ head/sys/dev/ep/if_ep.c Thu Aug 21 00:57:32 2014 (r270254) > @@ -343,7 +343,9 @@ ep_attach(struct ep_softc *sc) > EP_FSET(sc, F_RX_FIRST); > sc->top = sc->mcur = 0; > > + EP_LOCK(sc); > epstop(sc); > + EP_UNLOCK(sc); > > return (0); > } > @@ -1000,6 +1002,9 @@ epwatchdog(struct ep_softc *sc) > static void > epstop(struct ep_softc *sc) > { > + > + EP_ASSERT_LOCKED(sc); > + > CSR_WRITE_2(sc, EP_COMMAND, RX_DISABLE); > CSR_WRITE_2(sc, EP_COMMAND, RX_DISCARD_TOP_PACK); > EP_BUSY_WAIT(sc); > From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 02:40:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1F6D1301; Thu, 21 Aug 2014 02:40:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E4E22347B; Thu, 21 Aug 2014 02:40:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7L2eYJD076103; Thu, 21 Aug 2014 02:40:34 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7L2eYju076100; Thu, 21 Aug 2014 02:40:34 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201408210240.s7L2eYju076100@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 21 Aug 2014 02:40:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270256 - in head: bin/ed libexec/rtld-elf usr.bin/mail X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 02:40:35 -0000 Author: pfg Date: Thu Aug 21 02:40:33 2014 New Revision: 270256 URL: http://svnweb.freebsd.org/changeset/base/270256 Log: Always check the limits of array index variables before using them. Obtained from: DragonFlyBSD MFC after: 1 week Modified: head/bin/ed/cbc.c head/libexec/rtld-elf/libmap.c head/usr.bin/mail/edit.c Modified: head/bin/ed/cbc.c ============================================================================== --- head/bin/ed/cbc.c Thu Aug 21 01:07:27 2014 (r270255) +++ head/bin/ed/cbc.c Thu Aug 21 02:40:33 2014 (r270256) @@ -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: head/libexec/rtld-elf/libmap.c ============================================================================== --- head/libexec/rtld-elf/libmap.c Thu Aug 21 01:07:27 2014 (r270255) +++ head/libexec/rtld-elf/libmap.c Thu Aug 21 02:40:33 2014 (r270256) @@ -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: head/usr.bin/mail/edit.c ============================================================================== --- head/usr.bin/mail/edit.c Thu Aug 21 01:07:27 2014 (r270255) +++ head/usr.bin/mail/edit.c Thu Aug 21 02:40:33 2014 (r270256) @@ -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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 03:18:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 005963B6; Thu, 21 Aug 2014 03:18:41 +0000 (UTC) Received: from sakura.ccs.furiru.org (sakura.ccs.furiru.org [IPv6:2001:2f0:104:8060::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0C9939D4; Thu, 21 Aug 2014 03:18:41 +0000 (UTC) Received: from localhost (authenticated bits=0) by sakura.ccs.furiru.org (unknown) with ESMTP id s7L3IZA9047248; Thu, 21 Aug 2014 12:18:37 +0900 (JST) (envelope-from nyan@FreeBSD.org) Date: Thu, 21 Aug 2014 12:18:35 +0900 (JST) Message-Id: <20140821.121835.2221313819979273506.nyan@FreeBSD.org> To: se@freebsd.org Subject: Re: svn commit: r270229 - head/share/vt/keymaps From: TAKAHASHI Yoshihiro In-Reply-To: <201408201700.s7KH0lrH005686@svn.freebsd.org> References: <201408201700.s7KH0lrH005686@svn.freebsd.org> X-Mailer: Mew version 6.3 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 03:18:42 -0000 In article <201408201700.s7KH0lrH005686@svn.freebsd.org> Stefan Esser writes: > Log: > Another rpund of fixes, after checking keymaps for plausibility and with > several updates to the converter tools. There is now support for hybrid > source keymaps, which e.g. use ISO8859-1 (not -15) but still provide an > Euro key (on the "E" key). ISO8859-1 currency symbols on other keys are > still converted to that character, not the Euro sign. A similar hack was > applied to the Japanese keyboards to add the Yen key, that could not be > expressed in SYSCONS. PC98 keyboards don't have a backslash key, so we use the Yen key instead. Please back it out of pc98 part. --- TAKAHASHI Yoshihiro From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 03:50:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 12373E22; Thu, 21 Aug 2014 03:50:56 +0000 (UTC) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id C77253E9D; Thu, 21 Aug 2014 03:50:55 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id 7DDB8D428E7; Thu, 21 Aug 2014 13:50:51 +1000 (EST) Date: Thu, 21 Aug 2014 13:50:50 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bruce Evans Subject: Re: svn commit: r270227 - head/sys/sys In-Reply-To: <20140821063422.P11841@besplex.bde.org> Message-ID: <20140821133529.J1207@besplex.bde.org> References: <201408201632.s7KGW2vF093636@svn.freebsd.org> <53F4FA1E.2000103@delphij.net> <20140821063422.P11841@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=AOuw8Gd4 c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=RrlIlrznAvoA:10 a=Bs0Nco5NFfgA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=6I5d2MoRAAAA:8 a=lE9PNradQvvoA_KvT-EA:9 a=CjuIK1q_8ugA:10 Cc: Davide Italiano , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, d@delphij.net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 03:50:56 -0000 On Thu, 21 Aug 2014, Bruce Evans wrote: > On Wed, 20 Aug 2014, Xin Li wrote: > >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA512 >> >> On 08/20/14 09:32, Davide Italiano wrote: >>> Author: davide Date: Wed Aug 20 16:32:02 2014 New Revision: 270227 >>> URL: http://svnweb.freebsd.org/changeset/base/270227 >>> >>> Log: Make Bruce happy removing the "LL abomination" from time.h >>> It's not necessary in all the three instances because they already >>> have the correct type on all the supported arches. >> >> I'm not yet 100% sure (still building with some of my changes) but >> this looks like the change that broke powerpc build, I saw: > > That is a compiler bug, or excessive compiler flags to force the compiler > to be broken. I thought that such compilers and/or flags went away. [It is actually -std=c99 or clang that is needed to avoid the warning.] >>> +184,7 @@ timespec2bintime(const struct timespec * >>> >>> _bt->sec = _ts->tv_sec; /* 18446744073 = int(2^64 / 1000000000) */ >>> - _bt->frac = _ts->tv_nsec * (uint64_t)18446744073LL; + _bt->frac = >>> _ts->tv_nsec * (uint64_t)18446744073; } >>> ... > Older parts used the uint64_t casts to get the correct type, but also > used the long long abomination to avoid the warning, since this used > to be necessary for gcc on i386. I also wished for the correct fix of spelling the magic decimal numbers non-magically and without a comment as is already done for some numbers elsewhere in the file. The magic 1844mumble is 2**64 obfuscated by spelling it in decimal. I can only remember what 2**N is in decimal up to N = 16 and calculate it easily up to N = 20. 2**64 is best written as (uint65_t)1 << 64, but since most arches don't have uint65_t you can only write 2**63 using as (uint64_t)1 << 63 this method. Dividing by 2 is easy and gives small or recognizable decimal constants: /* No comment: */ _bt->frac = _ts->tv_nsec * (((uint64_t)1 << 63) / 500000000); Strictly portable code also needs an L suffix on the 500000000, since ints might be 16 bits and then 500000000 would be too large for an int constant and compilers might gratuitously warn about this. FreeBSD doesn't need this since it only supports 32-bit ints. Bruce From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 04:26:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D6DC443D; Thu, 21 Aug 2014 04:26:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C1512321A; Thu, 21 Aug 2014 04:26:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7L4QGf3024503; Thu, 21 Aug 2014 04:26:16 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7L4QGNE024502; Thu, 21 Aug 2014 04:26:16 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201408210426.s7L4QGNE024502@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 21 Aug 2014 04:26:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270257 - stable/10/usr.bin/ssh-copy-id X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 04:26:17 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 04:31:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 467085B2; Thu, 21 Aug 2014 04:31:23 +0000 (UTC) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id 8CCA932BF; Thu, 21 Aug 2014 04:31:21 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id C6433D4081D; Thu, 21 Aug 2014 14:31:20 +1000 (EST) Date: Thu, 21 Aug 2014 14:31:19 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bruce Evans Subject: Re: svn commit: r254627 - in head: bin/chflags bin/ls lib/libc/gen lib/libc/sys sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/fs/msdosfs sys/fs/smbfs sys/sys sys/ufs/ufs In-Reply-To: <20140628165434.A1406@etaplex.bde.org> Message-ID: <20140821141813.V1394@besplex.bde.org> References: <201308212304.r7LN4mr6058450@svn.freebsd.org> <20140627195201.GA52113@nargothrond.kdm.org> <20140628165434.A1406@etaplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=AOuw8Gd4 c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=mVt93wZpjUsA:10 a=NgjQapKE0a4A:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=PIQYOUdQSiZef2HGeeYA:9 a=CjuIK1q_8ugA:10 Cc: "src-committers@freebsd.org" , Xin LI , "svn-src-all@freebsd.org" , "Kenneth D. Merry" , Craig Rodrigues , "svn-src-head@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 04:31:23 -0000 [My mail connection wasn't working back in June when I wrote this. This is the first of many replies to try to prevent breakage of mv. I have now checked what happens for simple tests on ref11. Details in later replies.] On Sat, 28 Jun 2014, Bruce Evans wrote: > On Fri, 27 Jun 2014, Kenneth D. Merry wrote: > >> On Fri, Jun 27, 2014 at 12:48:29 -0700, Xin LI wrote: >>> Hi, >>> >>> Craig have hit an interesting issue today, where he tried to 'mv' a file >>> from ZFS dataset to a NFS mount, 'mv' bails out because chflags failed. >>> >>> I think it's probably sensible to have mv ignoring UF_ARCHIVE, and set the >>> flag on the target unconditionally? i.e.: >>> >>> Index: mv.c >>> =================================================================== >>> --- mv.c (revision 267940) >>> +++ mv.c (working copy) >>> @@ -337,8 +337,8 @@ >>> * on a file that we copied, i.e., that we didn't create.) >>> */ >>> errno = 0; >>> - if (fchflags(to_fd, sbp->st_flags)) >>> - if (errno != EOPNOTSUPP || sbp->st_flags != 0) >>> + if (fchflags(to_fd, sbp->st_flags | UF_ARCHIVE)) >>> + if (errno != EOPNOTSUPP || (sbp->st_flags & ~UF_ARCHIVE) != 0) >>> warn("%s: set flags (was: 0%07o)", to, sbp->st_flags); >>> >>> tval[0].tv_sec = sbp->st_atime; >> >> Yes, that sounds like a good way to do it. > > No, this is very broken. > > Ignoring the error is bad enough. POSIX requires duplicating all of > the attributes and certain error handling when they cannot be > duplicated. File flags aren't a POSIX attribute, but not duplicating > or handling errors differently for them them breaks the spirit of the > POSIX spec. > > Forcing the archive flag to be set on the copy is worse. It is broken > especially broken if the source and target both support the archive flag, > since it then fails to preserve the flag when it is clear on the source. > > The old code was bad too. I think it usually gives the POSIX behaviour, > but it only applies to the unusual case where only a few regular files > are moved, and its checking if the preservation worked can be done > better by stat()ing the result and comparing with the original. The > usual case (by number of files moved, if not by mv instances), is for > moving whole directory heirarchies. The above code is not used in that > case. cp -pR is used. cp -pR is more buggy than the above in general, > but for the chflags() its error handling is less fancy and thus stricter > than the above, so tends to produce thousands or warnings instead of only > 1. More and different details in another reply. > > I sent the following mail to ken about this (mostly for cp -p instead of > mv) in April, but received no reply: > > old> Copying files on freefall now causes annoying warnings. This is because > old> zfs supports UF_ARCHIVE but nfs doesn't: > old> old> % Script started on Sat Apr 5 05:10:55 2014 > old> % pts/29:bde@freefall:~/zmsun> cp -p $l/msun/Makefile . > old> % cp: chflags: ./Makefile: Operation not supported > old> % pts/29:bde@freefall:~/zmsun> echo $? > old> % 1 > old> % pts/29:bde@freefall:~/zmsun> ls -lo $l/msun/Makefile Makefile > old> % -rw-r--r-- 1 root wheel uarch 8610 Mar 2 11:00 > /usr/src/lib/msun/Makefile > old> % -rw-r--r-- 1 bde devel - 8610 Mar 2 11:00 Makefile > old> % pts/29:bde@freefall:~/zmsun> exit > old> % old> % Script done on Sat Apr 5 05:11:28 2014 > old> old> cp works, but this is hard to determine since the exit status is 1. > Oops, > old> that means that cp doesn't work. It also cannot copy the more important > old> uid and gid, but it doesn't warn about this or change the exit status to > old> 1 for this. Not warning is a historical hack to keep cp usable. Not > old> indicating the error in any other way is not good, but is also > historical. > old> This is only done when chown() returns EPERM. For chflags() on nfs, > we're > old> getting EOPNOTSUPPORT for the whole syscall. > > So cp -pR is completely broken for use by mv for the uid and gid, but works > almost as correctly as possibly for file flags. POSIX has relaxed > requirements for cp relative to mv, since cp without -p is not required > to preserve any attributes, and cp with -p can't be expected to preserve > all the attributes in many cases, unlike the usual case for mv where it > is not across a file system. > > old> The support is useless in practice, at least on freefall, because zfs > old> always sets UF_ARCHIVE and nothing ever clears it. zfs sets it even > old> for directories and symlinks. > old> old> Also, sys/stat.h still has SF_ARCHIVED: > old> old> % #define UF_ARCHIVE 0x00000800 /* file needs to be > archived */ > old> % #define SF_ARCHIVED 0x00010000 /* file is archived */ > old> old> It's not clear what SF_ARCHIVED means, especially since no file > system > old> supports it. The only references to it are: > old> old> % ./fs/tmpfs/tmpfs_subr.c: if ((flags & ~(SF_APPEND | > SF_ARCHIVED | SF_IMMUTABLE | SF_NOUNLINK | > old> % ./ufs/ufs/ufs_vnops.c: if ((vap->va_flags & ~(SF_APPEND | > SF_ARCHIVED | SF_IMMUTABLE | > old> old> So applications can set this flag for ffs and tmpfs, but since the > fs never > old> changes it, it is almost useless. Perhaps we left it for compatibility > old> in ffs. tmpfs doesn't have anything to be compatible with. > old> old> UF_ARCHIVE and UF_NODUMP are fairly bogus for tmpfs too. I think > all they > old> do is prevent the above error when copying files from fs's that support > old> them. > old> old> Bruce > > Attributes like file times cannot be preserved in general, and the > checks for this are both too strict and too weak. Too strict because > it is impossible to preserve file times in general (utimes() cannot > even ask to preserve sub-microsecond resolution. POSIX file systems > are only required to support seconds resolution. FreeBSD supports > some non-POSIX file systems that have worse than seconds resolution). > Too weak because it is impossible to ask for strict preservation. > Syscalls silently change times to something that they can represent > or write. Utilities don't check if the requested settings were > actually made. They should check, but then there are problems > handling errors and complications configuring the utilities to do > the sloppy preservation that they historically did. File times are > only a relatively simple unimportant case. > > Bruce Bruce From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 04:31:49 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35E9E700; Thu, 21 Aug 2014 04:31:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1588A32CA; Thu, 21 Aug 2014 04:31:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7L4VmNI027900; Thu, 21 Aug 2014 04:31:48 GMT (envelope-from peter@FreeBSD.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7L4Vmkj027897; Thu, 21 Aug 2014 04:31:48 GMT (envelope-from peter@FreeBSD.org) Message-Id: <201408210431.s7L4Vmkj027897@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: peter set sender to peter@FreeBSD.org using -f From: Peter Wemm Date: Thu, 21 Aug 2014 04:31:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270258 - in stable/10: sbin/umount usr.bin/showmount X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 04:31:49 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 04:45:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 44781955; Thu, 21 Aug 2014 04:45:07 +0000 (UTC) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id E113133C6; Thu, 21 Aug 2014 04:45:06 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id CB2B6D660C6; Thu, 21 Aug 2014 14:44:59 +1000 (EST) Date: Thu, 21 Aug 2014 14:44:59 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bruce Evans Subject: Re: svn commit: r267977 - head/bin/mv In-Reply-To: <20140628172421.U1406@etaplex.bde.org> Message-ID: <20140821143250.P1394@besplex.bde.org> References: <201406271957.s5RJvs6j074326@svn.freebsd.org> <20140627222323.GA43131@stack.nl> <20140628172421.U1406@etaplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=BdjhjNd2 c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=ROBjKm5rAVIA:10 a=deHfi5miR1cA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=e5j5qM8xitJFG-Zi-7IA:9 a=em-xuGDjEYKKJJIn:21 a=Qu4cKNXtBWhjSmeL:21 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Xin LI , Jilles Tjoelker X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 04:45:07 -0000 [My mail connection wasn't working back in June when I wrote this. This is the first of many replies to try to prevent breakage of mv. I have now checked what happens for simple tests on ref11. Details in later replies.] On Sat, 28 Jun 2014, Bruce Evans wrote: > On Sat, 28 Jun 2014, Jilles Tjoelker wrote: > >> On Fri, Jun 27, 2014 at 07:57:54PM +0000, Xin LI wrote: >>> Author: delphij >> >>> Log: >>> Always set UF_ARCHIVE on target (because they are by definition new >>> files >>> and should be archived) and ignore error when we can't set it (e.g. >>> NFS). >> >>> Reviewed by: ken >>> MFC after: 2 weeks >> >>> Modified: >>> head/bin/mv/mv.c >> >>> Modified: head/bin/mv/mv.c >>> ============================================================================== >>> --- head/bin/mv/mv.c Fri Jun 27 19:50:30 2014 (r267976) >>> +++ head/bin/mv/mv.c Fri Jun 27 19:57:54 2014 (r267977) >>> @@ -337,8 +337,8 @@ err: if (unlink(to)) >>> * on a file that we copied, i.e., that we didn't create.) >>> */ >>> errno = 0; >>> - if (fchflags(to_fd, sbp->st_flags)) >>> - if (errno != EOPNOTSUPP || sbp->st_flags != 0) >>> + if (fchflags(to_fd, sbp->st_flags | UF_ARCHIVE)) >>> + if (errno != EOPNOTSUPP || ((sbp->st_flags & ~UF_ARCHIVE) != >>> 0)) >>> warn("%s: set flags (was: 0%07o)", to, >>> sbp->st_flags); >>> >>> tval[0].tv_sec = sbp->st_atime; >> >> The part ignoring failures to set UF_ARCHIVE is OK. > > No, it is not OK. The error was only a warning, and that is the best > possible. Now I'm not sure about this. The same warning for the usual case where cp -pR is used becomes fatal for mv: @ pts/9:bde@freefall:~> cd /tmp @ pts/9:bde@freefall:/tmp> mkdir bde @ pts/9:bde@freefall:/tmp> mv bde ~/z @ mv: rename bde to /home/bde/z: Not a directory @ pts/9:bde@freefall:/tmp> mv bde ~/z1 @ mv: chflags: /home/bde/z1: Operation not supported @ mv: /bin/cp bde /home/bde/z1: terminated with 1 (non-zero) status After cp exits with nonzero status, mv cannot remove the source directory and a mess results. It is more reasonable for cp -p to ignore this error, but it is mv that doesn't allow the error to affect its exit status. POSIX has detailed rules for mv, and IIRC not so detailed rules for cp -p. POSIX doesn't allow implementing mv across file systems using cp -pR like the FreeBSD implementation does, except possibly if cp -pR follows exactly the same rules as mv and rules followed don't conflict with the POSIX rules. >> However, it seems >> inconsistent to set UF_ARCHIVE on a cross-filesystem mv of a single >> file, but not on a cross-filesystem mv of a directory tree > > It is also inconsistent with within-filesystem mv's in both cases. > >> or a file >> newly created via shell output redirection. > > The file system should set it in that case, if the file system actually > supports UF_ARCHIVE. > >> If UF_ARCHIVE is supposed to be set automatically, I think this should >> be done in the kernel, like msdosfs already does. > > zfs sets it too. That's where the problematic UF_ARCHIVE settings > come from. The problem was just less visible for msdsofs since it > is less used for critical file systems. > > It used to be an even larger problem for msdosfs. msdosfs's archive > flag was mapped to SF_ARCHIVE instead of to UF_ARCHIVE. So for mv > or cp -p from msdsofs to msdosfs (or a similar file system), you > could get an EPERM error. The above hack only checks for > EOPNOTSUPP, so it made no difference. > > When the target file system actually supports UF_ARCHIVE, the target > file already has UF_ARCHIVE set because the file is new. Then the > chflags() is needed mainly to unset UF_ARCHIVE when the source file > doesn't have it set. The change does the opposite. > > The cp -pR case (for mv across file systems and cp itself) never even > had the EOPNOTSUPP hack (except possibly in recent versions which I > can't check now), so it tends to spew errors. Old versions of cp -p > did the following: > > @ /* > @ * Changing the ownership probably won't succeed, unless we're root > @ * or POSIX_CHOWN_RESTRICTED is not set. Set uid/gid before setting > @ * the mode; current BSD behavior is to remove all setuid bits on > @ * chown. If chown fails, lose setuid/setgid bits. > @ */ > @ if (!gotstat || fs->st_uid != ts.st_uid || fs->st_gid != ts.st_gid) > > This avoids most chown()s by not attempting any. Good. > > @ if (fdval ? fchown(fd, fs->st_uid, fs->st_gid) : > @ (islink ? lchown(to.p_path, fs->st_uid, fs->st_gid) : > @ chown(to.p_path, fs->st_uid, fs->st_gid))) { > > Here it would be better to stat() the file again and mostly not use the > syscall result. syscalls that can set multiple attributes should allow > setting subsets and require checking to see which ones were set. > tcsettattr() is such a syscall. It has the very bad error handling of > returning success if at least 1 attribute was set. That is bad because > it is fail-unsafe for sloppy callers, and its success is guaranteed > since there are always attributes which can be set to an unchanged > value. chown() is not such a syscall, but it is safer to check. > > See the XXX comment before the above code in mv. It is about > (mis)handling settable subsets of flags. Currently there is no > reasonable way, since chflags() is like chown() and has to accept all > of the settings or not change any. > > @ if (errno != EPERM) { > @ warn("chown: %s", to.p_path); > @ rval = 1; > @ } > @ fs->st_mode &= ~(S_ISUID | S_ISGID); > @ } > @ @ if (!gotstat || fs->st_mode != ts.st_mode) > @ if (fdval ? fchmod(fd, fs->st_mode) : > @ (islink ? lchmod(to.p_path, fs->st_mode) : > @ chmod(to.p_path, fs->st_mode))) { > @ warn("chmod: %s", to.p_path); > @ rval = 1; > @ } > > Similarly for the mode, except not making null changes is closer to > being just an optimization. > > Hmm, This order seems to be backwards. Shouldn't we change the mode > before the ownerships go keep more permission for changing the mode? > We already change file flags last in case an immutable flag will be set. > > @ @ if (!gotstat || fs->st_flags != ts.st_flags) > > Avoiding null changes for file flags avoids permissions and support > problems in the usual case where the file flags are 0. However, for > zfs and now msdosfs, this is now the unusual case -- the source file > flags are usually UF_ARCHIVE. (For msdosfs, the archive flag used to > be SF_ARCHIVE, but this was inverted so the usual case for a new file > was mapped to . But > backing up under WinDOS normally clears the archive flag, so if it > is done then the usual case was mapped > to .) > > @ if (fdval ? > @ fchflags(fd, fs->st_flags) : > @ (islink ? (errno = ENOSYS) : > @ chflags(to.p_path, fs->st_flags))) { > @ warn("chflags: %s", to.p_path); > @ rval = 1; > @ } > > Note that any error here causes the exit status to be 1, while for > fastcopy() in mv, no fchflags() error causes the exit status to be 1, > and warnings are also suppressed for some EOPNOTSUPP errors. Very > inconsistent. fastcopy() also never sets the exit status to 1 for > errors in fchown(), fchmod() or utimes(). The utimes() in it is > also broken by being placed after the fchflags(), so it is certain > to fail if fchflags() set any immutable flag. cp is careful to > avoid this bug. > > POSIX specifies most of this: mv: "If the duplication of the file > characteristics fails for any reason, then mv shall write a diagnostic > message to stderr, but this failure shall not cause mv to modify its > exit status". cp -p: only duplicating the times, uid, gid and certain > mode bits is required; a diagnostic is required for failure to duplicate > the times or certain mode bits is required; a diagnostic is optional > for failure to duplicate uid or gid; the exit status is not mentioned. > FreeBSD cp -p always modifies the exit status and prints a diagnostic > except for EPERM errors from chown(). > > For all attributes, modifying the exit status in cp -pR makes FreeBSD > cp -pR unusable for the mv across file systems that it is used for. > cp -pR has other bugs like snapping hard links and not preserving > directory times, but I still trust it more than fastcopy(). > >> However, I'm not sure >> this is actually a useful feature: backup programs are smarter than an >> archive attribute these days. > > I mostly use the ctime to decide which files need backing up, but the > archive bit would have some advantage if backup programs and system > utilities actually supported it. It can be controlled by utilities, > unlike ctimes. msdosfs utilities had good support for it 25-30 years > ago (things like an option in all copying utilities to clear the archive > bit in the source after copying, so that all copying utilities can be > used to back up), but I never actually used this until recently. I > don't see how a backup utility could get equivalent functionality > without maintaining large databases of files backed up and having bits > like the archive bit in the database, and sub-utilities to manage the > bits. > > Bruce Bruce From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 05:03:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 85F64CAF; Thu, 21 Aug 2014 05:03:12 +0000 (UTC) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id 9907B352E; Thu, 21 Aug 2014 05:03:10 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id 27434D43515; Thu, 21 Aug 2014 15:03:00 +1000 (EST) Date: Thu, 21 Aug 2014 15:02:57 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bruce Evans Subject: Re: svn commit: r268129 - head/bin/mv In-Reply-To: <20140702130950.N637@etaplex.bde.org> Message-ID: <20140821144734.B1461@besplex.bde.org> References: <201407012246.s61MkdQc049307@svn.freebsd.org> <20140702130950.N637@etaplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=AOuw8Gd4 c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=6NMDU4RGk-wA:10 a=2KZsoIxPL1EA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=MixIDf-I4x6-FpJRb5cA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Xin LI X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 05:03:12 -0000 [My mail connection wasn't working back in June when I wrote this. This is the last of many old replies to try to prevent breakage of mv. The second of the old replies was labeled as the first again. This reply adds new details] On Wed, 2 Jul 2014, Bruce Evans wrote: > On Tue, 1 Jul 2014, Xin LI wrote: > >> Log: >> Check if fchflags() is needed by fstat'ing before and check >> the results. >> >> Reviewed by: jilles >> X-MFC-With: r267977 > > This keeps getting worse. It now does extra work (with style bugs) > to check one of the broken cases and try harder to keep it broken. > >> Modified: head/bin/mv/mv.c >> ============================================================================== >> --- head/bin/mv/mv.c Tue Jul 1 22:42:53 2014 (r268128) >> +++ head/bin/mv/mv.c Tue Jul 1 22:46:39 2014 (r268129) >> @@ -278,6 +278,7 @@ fastcopy(const char *from, const char *t >> static char *bp = NULL; >> mode_t oldmode; >> int nread, from_fd, to_fd; >> + struct stat tsb; > > Style bug. > >> >> if ((from_fd = open(from, O_RDONLY, 0)) < 0) { >> warn("fastcopy: open() failed (from): %s", from); >> @@ -336,10 +337,18 @@ err: if (unlink(to)) >> * if the server supports flags and we were trying to *remove* flags >> * on a file that we copied, i.e., that we didn't create.) >> */ > > The code keeps rotting further away from the comment. The last sentence > in it is about being wrong when the "server" (really, any target file > system) sets flags that aren't set in the source file. We now do extra > work to try harder to break this for the UF_ARCHIVE flag. > >> - errno = 0; >> - if (fchflags(to_fd, sbp->st_flags | UF_ARCHIVE)) >> - if (errno != EOPNOTSUPP || ((sbp->st_flags & ~UF_ARCHIVE) != >> 0)) >> - warn("%s: set flags (was: 0%07o)", to, >> sbp->st_flags); >> + if (fstat(to_fd, &tsb) == 0) { >> + if ((sbp->st_flags & ~UF_ARCHIVE) != >> + (tsb.st_flags & ~UF_ARCHIVE)) { > > This sometimes (when the other flags are identical) skips fchflags() > to explicitly break clearing of UF_ARCHIVE on the target file when it > is set in the target but not in the source. In this case, the > fchflags() to clear it should work so there was no bug until recently. > It also skips fchflags() in some cases where UF_ARCHIVE is set in the > source but not in the target. This case was previously broken a little > differently. The previous brokenness is retained in the fchlags() > error handling for the case where fchflags() is called in an attempt > to change other flags. > > The above is a verbose way of writing the flags test. Tests for > equality of a subset of flags are best written using the xor operator: > > if ((sbp->st_flags ^ tsb.st_flags) & ~UF_ARCHIVE) { > > or in KNF verboseness: > > if (((sbp->st_flags ^ tsb.st_flags) & ~UF_ARCHIVE) != 0) { > >> + if (fchflags(to_fd, >> + sbp->st_flags | (tsb.st_flags & UF_ARCHIVE))) > > This retains the brokenness of forcing the UF_ARCHIVE on in the target > to ensure breaking it in the case that it is off in the source. This > is is really silly now. We only reach here if the flags other than > UF_ARCHIVE differ. The target UF_ARCHIVE is now not clobbered in the > usual case where all the flags except possibly UF_ARCHIVE are clear > in both the source and the target, but it is also not cleared when it > should be in this case. It is now forcibly set in other cases, to > retain the brokenness when it should be cleared. > >> + if (errno != EOPNOTSUPP || >> + ((sbp->st_flags & ~UF_ARCHIVE) != 0)) >> + warn("%s: set flags (was: 0%07o)", >> + to, sbp->st_flags); > > This error handling to break the warning is much the same as before, > but sillier. Now we only get here if there are flags other than > UF_ARCHIVE to change. If errno == EOPNOTSUPP, then the whole syscall > failed so it was impossible to change the other flags. So errno == > EOPNOTSUPP implies an error that it just as fatal as errno != > EOPNOTSUPP, and any flags test after it is redundant or broken. The > correct redundant test is that the flags are the same, but we already > know that they differ and fchflags() has the bug of changing some but > failing. The current broken test is that all the source flags except > UF_ARCHIVE are the same. These tests only give different results if > the target has some flag other than UF_ARCHIVE set, since even an > unsupported chflags() should result in mostly-zero flags. There are > currently no such flags, but mv shouldn't depend on this. > >> + } >> + } else >> + warn("%s: cannot stat", to); > > The error handling for fstat() is laborious and silly. We just opened > the file, so fstat() can't fail. If it somehow fails, then the following > close() of the file should also fail and generate a fatal error. > >> >> tval[0].tv_sec = sbp->st_atime; >> tval[1].tv_sec = sbp->st_mtime; > > I just noticed that fastcopy() is even more broken than first appeared. > Unlike cp -pR, it still hasn't caught up with the reason for existence > of utimes() (4.2BSD, 1983) -- just after here, it uses utimes(), but > defeats it by forcing tv_usec to 0 in the target. I have now checked what happens for simple tests on ref11. The first bug observed was that mv now fails to preserve UF_ARCHIVE even when both the source and target file systems support it. mv still works correctly and reports failure to preserve the gid (due to the source file being on /tmp so the gids are unlikely to match (one was wheel and the other was bde). I rarely see this warning on my local file systems since I don't use gid bde and almost everything has gid wheel). Also checked: cp -pR wasn't changed, so it UF_ARCHIVE still causes zillions of warnings for it, but it doesn't fail to preserve the flag if possible. The usual case of mv, where the move is of a directory tree, still uses cp -pR so it is unaffected by the changes. Old versions of mv on old versions of FreeBSD that don't have UF_ARCHIVE still work as correctly as possible for SF_ARCHIVE and all other flags. SF_ARCHIVE is privileged and not supported by zfs IIRC, so it is harder to test and rarely set. Bruce From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 07:41:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7C3F3903; Thu, 21 Aug 2014 07:41:38 +0000 (UTC) Received: from mail-pd0-x235.google.com (mail-pd0-x235.google.com [IPv6:2607:f8b0:400e:c02::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3574F3276; Thu, 21 Aug 2014 07:41:38 +0000 (UTC) Received: by mail-pd0-f181.google.com with SMTP id g10so12970750pdj.26 for ; Thu, 21 Aug 2014 00:41:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=7NIU5Ioe/xjzQr3c+TQ8l2dZj9r1iODrl6YuXKArxbc=; b=t7yuywUe6gtKt7idWQyBYDpuPIoO2+G/jIIWTGTP1vWJAt9ZUbTzQUbYIJ8r1aLppy 8sNpW6ggi7PdrO1TVllJ3H2YcHeIYE/SE+5tyialWpLtQ8OACChPAPOwj9etExURvLiK 2FfLCxDRgqCe+kt0rmOv3OrCnd55uhZAXzmg8rwjqCbxWry9knMwsIxuh0u2NZWnzvAY +1kVtKS8GppXn1b/Ryrz8qj4Q4W9KyVf2fbZOTU+18TbTUvzyypEzaPIDPF5wgZQHJaA FK4b93cHivEK7v3eLwz4EebRlRDTVyqjYScgmhBwCLlLOjX9vvNj2PdiE+WL/ePRHu/s sfXw== X-Received: by 10.70.37.98 with SMTP id x2mr31179644pdj.8.1408606897653; Thu, 21 Aug 2014 00:41:37 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:68ee:4a7a:301b:9c32? ([2601:8:ab80:7d6:68ee:4a7a:301b:9c32]) by mx.google.com with ESMTPSA id dd2sm37447328pdb.16.2014.08.21.00.41.36 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 21 Aug 2014 00:41:36 -0700 (PDT) Content-Type: multipart/signed; boundary="Apple-Mail=_206AC717-7F7C-49A9-B1DA-92D77789FE75"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: 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... From: yaneurabeya@gmail.com In-Reply-To: <201408190120.s7J1KP93011521@svn.freebsd.org> Date: Thu, 21 Aug 2014 00:41:35 -0700 Message-Id: <5E940151-D3B4-4CE1-93F0-5A3992C47BA3@gmail.com> References: <201408190120.s7J1KP93011521@svn.freebsd.org> To: Peter Grehan X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 07:41:38 -0000 --Apple-Mail=_206AC717-7F7C-49A9-B1DA-92D77789FE75 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 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 >=20 > 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. >=20 > Catch bhyve up to CURRENT. >=20 > Lightly tested with FreeBSD i386/amd64, Linux i386/amd64, and > OpenBSD/amd64. Still resolving an issue with OpenBSD/i386. >=20 > 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 =93warning: =91inline=92 = is not at beginning of declaration=94 :/. I=92ve opened this bug to = track the issue: = https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D192880 . Thanks! -Garrett --Apple-Mail=_206AC717-7F7C-49A9-B1DA-92D77789FE75 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJT9aKvAAoJEMZr5QU6S73e+JQH/RKpOJX5WAjdT7KBPK/TkqL4 /hRadBdLEWZTAfTuzHHJdEN1aRtF5yeiX+WtROB5o1N6lyIHMCrVY/gDXn9aJDoV zkujL2okdbffhd25ZjKg4zo3of76BAynxwIP/aBoL+PbgSYBjf4AIC53eUI4l08K qRtngcoinVRTp+Jb7Q++xtH819HpLoEN8rRP81Puumu48hLbgoqRSK+PilMctoup k/taUwPApBQWuEYIflEueFTpMR/k/r+xBSMD1E1bi6SmnAODj7l6cQ381plhBjNa Kdz3ylWHCmcFFgExMetg244rX8xZRX6lQUNYy2gnE0mFx4RQQRRDzIuKLxa5Z9Q= =0wr8 -----END PGP SIGNATURE----- --Apple-Mail=_206AC717-7F7C-49A9-B1DA-92D77789FE75-- From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 07:52:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A978CBE6; Thu, 21 Aug 2014 07:52:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95503336D; Thu, 21 Aug 2014 07:52:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7L7qps7017963; Thu, 21 Aug 2014 07:52:51 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7L7qpXZ017962; Thu, 21 Aug 2014 07:52:51 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201408210752.s7L7qpXZ017962@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Thu, 21 Aug 2014 07:52:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270259 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 07:52:51 -0000 Author: gavin Date: Thu Aug 21 07:52:51 2014 New Revision: 270259 URL: http://svnweb.freebsd.org/changeset/base/270259 Log: Add a missing brace to callout_init_rm() to fix syntax. MFC after: 1 week Modified: head/sys/sys/callout.h Modified: head/sys/sys/callout.h ============================================================================== --- head/sys/sys/callout.h Thu Aug 21 04:31:48 2014 (r270258) +++ head/sys/sys/callout.h Thu Aug 21 07:52:51 2014 (r270259) @@ -72,7 +72,7 @@ void _callout_init_lock(struct callout * _callout_init_lock((c), ((mtx) != NULL) ? &(mtx)->lock_object : \ NULL, (flags)) #define callout_init_rm(c, rm, flags) \ - _callout_init_lock((c), ((rm != NULL) ? &(rm)->lock_object : \ + _callout_init_lock((c), ((rm) != NULL) ? &(rm)->lock_object : \ NULL, (flags)) #define callout_init_rw(c, rw, flags) \ _callout_init_lock((c), ((rw) != NULL) ? &(rw)->lock_object : \ From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 08:05:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 51FEA1BB; Thu, 21 Aug 2014 08:05:48 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1F093461; Thu, 21 Aug 2014 08:05:47 +0000 (UTC) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s7L85fH1078380 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 21 Aug 2014 11:05:41 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua s7L85fH1078380 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id s7L85fe0078379; Thu, 21 Aug 2014 11:05:41 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 21 Aug 2014 11:05:41 +0300 From: Konstantin Belousov To: Roger Pau Monn? Subject: Re: svn commit: r265003 - head/secure/usr.sbin/sshd Message-ID: <20140821080541.GE2737@kib.kiev.ua> References: <201404270528.s3R5SEIm054377@svn.freebsd.org> <53F4B381.5010205@FreeBSD.org> <20140820151310.GB2737@kib.kiev.ua> <53F4BC9B.3090405@FreeBSD.org> <53F4BEB1.6070000@FreeBSD.org> <53F4C022.5050804@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/3zO87W6OPidGKTZ" Content-Disposition: inline In-Reply-To: <53F4C022.5050804@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bryan Drewery X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 08:05:48 -0000 --/3zO87W6OPidGKTZ Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Wed, Aug 20, 2014 at 05:34:58PM +0200, Roger Pau Monn? wrote: > On 20/08/14 17:28, Bryan Drewery wrote: > > On 8/20/2014 10:19 AM, Roger Pau Monn? wrote: > >> On 20/08/14 17:13, Konstantin Belousov wrote: > >>> On Wed, Aug 20, 2014 at 04:41:05PM +0200, Roger Pau Monn?? wrote: > >>>> On 27/04/14 07:28, Konstantin Belousov wrote: > >>>>> Author: kib > >>>>> Date: Sun Apr 27 05:28:14 2014 > >>>>> New Revision: 265003 > >>>>> URL: http://svnweb.freebsd.org/changeset/base/265003 > >>>>> > >>>>> Log: > >>>>> Fix order of libthr and libc in the global dso list for sshd, by > >>>>> explicitely linking main binary with -lpthread. Before, libthr > >>>>> appeared in the list due to dependency of one of the kerberos lib= s. > >>>>> Due to the change in ld(1) behaviour of not copying NEEDED entries > >>>>> from direct dependencies into the link results, the order becomes > >>>>> reversed. > >>>>> =20 > >>>>> The libthr must appear before libc to properly interpose libc sym= bols > >>>>> and provide working rtld locks implementation. The symptom was s= shd > >>>>> hanging on rtld bind lock during nested symbol binding from a sig= nal > >>>>> handler. > >>>>> =20 > >>>>> Approved by: des (openssh maintainer) > >>>>> Sponsored by: The FreeBSD Foundation > >>>>> MFC after: 1 week > >>>>> > >>>>> Modified: > >>>>> head/secure/usr.sbin/sshd/Makefile > >>>>> > >>>>> Modified: head/secure/usr.sbin/sshd/Makefile > >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > >>>>> --- head/secure/usr.sbin/sshd/Makefile Sun Apr 27 05:19:01 2014 (r2= 65002) > >>>>> +++ head/secure/usr.sbin/sshd/Makefile Sun Apr 27 05:28:14 2014 (r2= 65003) > >>>>> @@ -57,6 +57,16 @@ CFLAGS+=3D -DNONE_CIPHER_ENABLED > >>>>> DPADD+=3D ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ} > >>>>> LDADD+=3D -lcrypt -lcrypto -lz > >>>>> =20 > >>>>> +# Fix the order of NEEDED entries for libthr and libc. The libthr > >>>>> +# needs to interpose libc symbols, leaving the libthr loading as > >>>>> +# dependency of krb causes reversed order and broken interposing. = Put > >>>>> +# the threading library last on the linker command line, just befo= re > >>>>> +# the -lc added by a compiler driver. > >>>>> +.if ${MK_KERBEROS_SUPPORT} !=3D "no" > >>>>> +DPADD+=3D ${LIBPTHREAD} > >>>>> +LDADD+=3D -lpthread > >>>>> +.endif > >>>>> + > >>>>> .if defined(LOCALBASE) > >>>>> CFLAGS+=3D -DXAUTH_PATH=3D\"${LOCALBASE}/bin/xauth\" > >>>>> .endif > >>>> > >>>> Hello, > >>>> > >>>> This change makes the following simple test program fail on the seco= nd=20 > >>>> assert. The problem is that sa_handler =3D=3D SIG_DFL, and sa_flags = =3D=3D=20 > >>>> SA_SIGINFO, which according to the sigaction(9) man page is not=20 > >>>> possible. With this change reverted the test is successful. > >>> I do not quite follow. > >>> > >>> What are the relations between sshd and your test program ? > >>> Should the test be run somehow specially ? > >> > >> No, and frankly that's what I don't understand. I compile this simple > >> test with `cc -o test test.c`. It fails with this commit applied, and > >> succeeds without it. > >> > >> Roger. > >> > >=20 > > Does it fail if you do not connect with ssh? >=20 > Right, it works fine from the serial console, fails when executed from ss= h. I cannot reproduce it locally with your scenario, but the attached program demonstrates the issue without relying on inheritance and libthr. I think you mis-interpret the man page statement, it only says that SA_SIGINFO should not be set in new->sa_flags IMO. But I do not see much sense in the requirement. Note that we do not test flags for correctness at all. SUSv4 is also silent on the issue. If this is important for your case, the following patch prevents leaking of the flags for ignored of default/action signals. Could you, please, describe why do you consider this a bug ? diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 561ea0a..3409875 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -621,6 +621,15 @@ sig_ffs(sigset_t *set) return (0); } =20 +static bool +sigact_flag_test(struct sigaction *act, int flag) +{ + + return ((act->sa_flags & flag) !=3D 0 && + (__sighandler_t *)act->sa_sigaction !=3D SIG_IGN && + (__sighandler_t *)act->sa_sigaction !=3D SIG_DFL); +} + /* * kern_sigaction * sigaction @@ -679,7 +688,7 @@ kern_sigaction(td, sig, act, oact, flags) =20 ps->ps_catchmask[_SIG_IDX(sig)] =3D 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)] =3D (__sighandler_t *)act->sa_sigaction; SIGADDSET(ps->ps_siginfo, sig); @@ -687,19 +696,19 @@ kern_sigaction(td, sig, act, oact, flags) ps->ps_sigact[_SIG_IDX(sig)] =3D 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); --/3zO87W6OPidGKTZ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJT9ahUAAoJEJDCuSvBvK1BPNYP/0k+vHv46B3lSPdiOz7Kx3dA ADJSl0gRQlGEy39cs6cEcUx9ctSw2qaGxFZrrWIrK9NATOoG+twcF1E9DmyUZoXS Zm9c/rHj+OQpqIC1SgF+yvj5fkWoAYTEBBklrrEb0FOwNaTrbRMynwyedGuxloQO VFp9KnP1lIzZZWBRe3PbXkZyK7zOKUrBAQpZzI8goNJdAqsuTDyaj5aNhbhT4J64 VTb0HmVLvuRAUppZNEywFc6tD+TyUwoGLprRhi48awmQhTW/2VIelySUWEzrN4Ar vVpRTzEOavIguNxi9qyqo71BxPGvpd5qyLFStlTgINU9ddp0fCTkZvrUrbYRwnWL DZlGZ1q89mVHhNIe3Qy/pHJstwcgFP4dirZ0KuhbEixrIdaVY9lyB4WZqpMTkqGO OoqZ+jiin4tWkBE2hny7PkJExqNHDO5PUQnV6FNUGOr9zvuQPhCrpPzu2PkSddW9 SYBKvhjcvd47tERemqw2WjhU0SHkoqhm2ghZNiFMq03gjDAiIH4qdT+Vdm8q1aCR Qj0IQhRZCnd8I1ZSlHPbFS9i87NzySWht33HQW0o1yUsQ404T9q2fZREKaGM31+7 7XXhoE4cbW/mVGi7qw8KPtHz7DTE8lW3zXOlijrG2CHKw8ACrxSlX7qeD7YCxOZN q26mSuPhvKxYYqHHgmrW =trCK -----END PGP SIGNATURE----- --/3zO87W6OPidGKTZ-- From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 08:25:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D8CBA6B7; Thu, 21 Aug 2014 08:25:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4B84363A; Thu, 21 Aug 2014 08:25:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7L8PkYu032172; Thu, 21 Aug 2014 08:25:46 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7L8Pkxs032171; Thu, 21 Aug 2014 08:25:46 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201408210825.s7L8Pkxs032171@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 21 Aug 2014 08:25:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270260 - head/sys/cddl/compat/opensolaris/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 08:25:47 -0000 Author: delphij Date: Thu Aug 21 08:25:46 2014 New Revision: 270260 URL: http://svnweb.freebsd.org/changeset/base/270260 Log: Provide compatibility shim for atomic_dec_64_nv. X-MFC-with: r270247 MFC after: 13 days Modified: head/sys/cddl/compat/opensolaris/sys/atomic.h Modified: head/sys/cddl/compat/opensolaris/sys/atomic.h ============================================================================== --- head/sys/cddl/compat/opensolaris/sys/atomic.h Thu Aug 21 07:52:51 2014 (r270259) +++ head/sys/cddl/compat/opensolaris/sys/atomic.h Thu Aug 21 08:25:46 2014 (r270260) @@ -117,6 +117,12 @@ atomic_inc_64_nv(volatile uint64_t *targ return (atomic_add_64_nv(target, 1)); } +static __inline uint64_t +atomic_dec_64_nv(volatile uint64_t *target) +{ + return (atomic_add_64_nv(target, -1)); +} + #if !defined(COMPAT_32BIT) && defined(__LP64__) static __inline void * atomic_cas_ptr(volatile void *target, void *cmp, void *newval) From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 09:01:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23900927; Thu, 21 Aug 2014 09:01:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0FE5D3A9E; Thu, 21 Aug 2014 09:01:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7L91gdv049823; Thu, 21 Aug 2014 09:01:42 GMT (envelope-from davide@FreeBSD.org) Received: (from davide@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7L91gZ7049822; Thu, 21 Aug 2014 09:01:42 GMT (envelope-from davide@FreeBSD.org) Message-Id: <201408210901.s7L91gZ7049822@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: davide set sender to davide@FreeBSD.org using -f From: Davide Italiano Date: Thu, 21 Aug 2014 09:01:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270261 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 09:01:43 -0000 Author: davide Date: Thu Aug 21 09:01:42 2014 New Revision: 270261 URL: http://svnweb.freebsd.org/changeset/base/270261 Log: Revert r270227. GCC doesn't like the lack of LL suffix, so this makes powerpc build failing. Modified: head/sys/sys/time.h Modified: head/sys/sys/time.h ============================================================================== --- head/sys/sys/time.h Thu Aug 21 08:25:46 2014 (r270260) +++ head/sys/sys/time.h Thu Aug 21 09:01:42 2014 (r270261) @@ -129,7 +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 +#define SBT_MAX 0x7fffffffffffffffLL static __inline int sbintime_getsec(sbintime_t _sbt) @@ -184,7 +184,7 @@ timespec2bintime(const struct timespec * _bt->sec = _ts->tv_sec; /* 18446744073 = int(2^64 / 1000000000) */ - _bt->frac = _ts->tv_nsec * (uint64_t)18446744073; + _bt->frac = _ts->tv_nsec * (uint64_t)18446744073LL; } static __inline void @@ -201,7 +201,7 @@ timeval2bintime(const struct timeval *_t _bt->sec = _tv->tv_sec; /* 18446744073709 = int(2^64 / 1000000) */ - _bt->frac = _tv->tv_usec * (uint64_t)18446744073709; + _bt->frac = _tv->tv_usec * (uint64_t)18446744073709LL; } static __inline struct timespec From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 10:18:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0BD2EED7; Thu, 21 Aug 2014 10:18:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E94A43260; Thu, 21 Aug 2014 10:18:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LAIimv082787; Thu, 21 Aug 2014 10:18:44 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LAIhXL082778; Thu, 21 Aug 2014 10:18:43 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201408211018.s7LAIhXL082778@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Thu, 21 Aug 2014 10:18:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org 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 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 10:18:45 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 10:25:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4805410E; Thu, 21 Aug 2014 10:25:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27AE9334A; Thu, 21 Aug 2014 10:25:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LAPbKq086989; Thu, 21 Aug 2014 10:25:37 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LAPag8086982; Thu, 21 Aug 2014 10:25:36 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201408211025.s7LAPag8086982@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Thu, 21 Aug 2014 10:25:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r270263 - in stable/9/sys/dev/vt: colors hw/fb hw/ofwfb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 10:25:37 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 10:46:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B08C1AF9; Thu, 21 Aug 2014 10:46:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9AF093586; Thu, 21 Aug 2014 10:46:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LAkKSZ096326; Thu, 21 Aug 2014 10:46:20 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LAkJeE096320; Thu, 21 Aug 2014 10:46:19 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201408211046.s7LAkJeE096320@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 21 Aug 2014 10:46:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270264 - in stable/10: bin/ps sys/kern sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 10:46:20 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 10:54:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DFC79D03; Thu, 21 Aug 2014 10:54:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB912364E; Thu, 21 Aug 2014 10:54:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LAsd0b000670; Thu, 21 Aug 2014 10:54:39 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LAsdGa000669; Thu, 21 Aug 2014 10:54:39 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201408211054.s7LAsdGa000669@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Thu, 21 Aug 2014 10:54:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270265 - head/sys/dev/vt/font X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 10:54:40 -0000 Author: dumbbell Date: Thu Aug 21 10:54:39 2014 New Revision: 270265 URL: http://svnweb.freebsd.org/changeset/base/270265 Log: vt(4): Fix an inconsistency between the mouse cursor bitmap and its mask MFC after: 1 week Modified: head/sys/dev/vt/font/vt_mouse_cursor.c Modified: head/sys/dev/vt/font/vt_mouse_cursor.c ============================================================================== --- head/sys/dev/vt/font/vt_mouse_cursor.c Thu Aug 21 10:46:19 2014 (r270264) +++ head/sys/dev/vt/font/vt_mouse_cursor.c Thu Aug 21 10:54:39 2014 (r270265) @@ -43,7 +43,7 @@ struct mouse_cursor vt_default_mouse_poi 0x7c, /* "_*****_ " */ 0x7e, /* "_******_" */ 0x68, /* "_**_****" */ - 0x4c, /* "_*__**__" */ + 0x4c, /* "_*__**_ " */ 0x0c, /* " _ _**_ " */ 0x06, /* " _**_" */ 0x06, /* " _**_" */ @@ -58,8 +58,8 @@ struct mouse_cursor vt_default_mouse_poi 0xfe, /* "_______ " */ 0xff, /* "________" */ 0xff, /* "________" */ - 0xff, /* "________" */ - 0x1e, /* " ____ " */ + 0xfe, /* "_______ " */ + 0x5e, /* " _ ____ " */ 0x0f, /* " ____" */ 0x0f, /* " ____" */ 0x0f, /* " ____" */ From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 11:12:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC77D317; Thu, 21 Aug 2014 11:12:55 +0000 (UTC) Received: from mail-wi0-x22e.google.com (mail-wi0-x22e.google.com [IPv6:2a00:1450:400c:c05::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D77EF3805; Thu, 21 Aug 2014 11:12:54 +0000 (UTC) Received: by mail-wi0-f174.google.com with SMTP id d1so8512178wiv.1 for ; Thu, 21 Aug 2014 04:12:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=Fct6oz5Lw7zpQOpRzkZIxW/dakvNtS76S2CmGcP+LLk=; b=UNdHPaQyy/1sQ6krH+2EFPe5nzAdNnjWJ8CZQBVyesNY/0C/RQSZiiyhzrGc591hXd BRKWJJxIuOgXW0QBkc7AOhUbfuE9AXlUI+10414ddJ4jWp0fbw9wtuNK0ewW3ZeegWCd Q4q9G0nm6vIoFvIwwE7ONDLIv75TrweETtBCDUJYbsn37ccVBlnqaJTFFmJPLrx2vkmo ezu6gPBfjL2ZdrgA6rRF2ug+LHjkr58RzVunnqoIzwneED95iDVYLzvodrW2BnA77f5Q Ipxtz2mnEdkJlhsnBWLvZevujVDP12q/P6PuEpxWF5l36VEd6v+MuGKYDYgzHu0V1PhF QMuA== X-Received: by 10.194.77.233 with SMTP id v9mr2599078wjw.129.1408619572850; Thu, 21 Aug 2014 04:12:52 -0700 (PDT) Received: from [172.16.1.30] (39.Red-2-136-52.dynamicIP.rima-tde.net. [2.136.52.39]) by mx.google.com with ESMTPSA id ga2sm65923199wjb.44.2014.08.21.04.12.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 21 Aug 2014 04:12:51 -0700 (PDT) Sender: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Message-ID: <53F5D42E.9080908@FreeBSD.org> Date: Thu, 21 Aug 2014 13:12:46 +0200 From: =?ISO-8859-1?Q?Roger_Pau_Monn=E9?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: svn commit: r265003 - head/secure/usr.sbin/sshd References: <201404270528.s3R5SEIm054377@svn.freebsd.org> <53F4B381.5010205@FreeBSD.org> <20140820151310.GB2737@kib.kiev.ua> <53F4BC9B.3090405@FreeBSD.org> <53F4BEB1.6070000@FreeBSD.org> <53F4C022.5050804@FreeBSD.org> <20140821080541.GE2737@kib.kiev.ua> In-Reply-To: <20140821080541.GE2737@kib.kiev.ua> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bryan Drewery X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 11:12:56 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 21/08/14 10:05, Konstantin Belousov wrote: > On Wed, Aug 20, 2014 at 05:34:58PM +0200, Roger Pau Monn? wrote: >> On 20/08/14 17:28, Bryan Drewery wrote: >>> On 8/20/2014 10:19 AM, Roger Pau Monn? wrote: >>>> On 20/08/14 17:13, Konstantin Belousov wrote: >>>>> On Wed, Aug 20, 2014 at 04:41:05PM +0200, Roger Pau Monn?? >>>>> wrote: >>>>>> On 27/04/14 07:28, Konstantin Belousov wrote: >>>>>>> Author: kib Date: Sun Apr 27 05:28:14 2014 New >>>>>>> Revision: 265003 URL: >>>>>>> http://svnweb.freebsd.org/changeset/base/265003 >>>>>>> >>>>>>> Log: Fix order of libthr and libc in the global dso >>>>>>> list for sshd, by explicitely linking main binary with >>>>>>> -lpthread. Before, libthr appeared in the list due to >>>>>>> dependency of one of the kerberos libs. Due to the >>>>>>> change in ld(1) behaviour of not copying NEEDED entries >>>>>>> from direct dependencies into the link results, the >>>>>>> order becomes reversed. >>>>>>> >>>>>>> The libthr must appear before libc to properly >>>>>>> interpose libc symbols and provide working rtld locks >>>>>>> implementation. The symptom was sshd hanging on rtld >>>>>>> bind lock during nested symbol binding from a signal >>>>>>> handler. >>>>>>> >>>>>>> Approved by: des (openssh maintainer) Sponsored by: >>>>>>> The FreeBSD Foundation MFC after: 1 week >>>>>>> >>>>>>> Modified: head/secure/usr.sbin/sshd/Makefile >>>>>>> >>>>>>> Modified: head/secure/usr.sbin/sshd/Makefile >>>>>>> ============================================================================== >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> - --- head/secure/usr.sbin/sshd/Makefile Sun Apr 27 05:19:01 2014 (r265002) >>>>>>> +++ head/secure/usr.sbin/sshd/Makefile Sun Apr 27 >>>>>>> 05:28:14 2014 (r265003) @@ -57,6 +57,16 @@ CFLAGS+= >>>>>>> -DNONE_CIPHER_ENABLED DPADD+= ${LIBCRYPT} ${LIBCRYPTO} >>>>>>> ${LIBZ} LDADD+= -lcrypt -lcrypto -lz >>>>>>> >>>>>>> +# Fix the order of NEEDED entries for libthr and >>>>>>> libc. The libthr +# needs to interpose libc symbols, >>>>>>> leaving the libthr loading as +# dependency of krb >>>>>>> causes reversed order and broken interposing. Put +# >>>>>>> the threading library last on the linker command line, >>>>>>> just before +# the -lc added by a compiler driver. >>>>>>> +.if ${MK_KERBEROS_SUPPORT} != "no" +DPADD+= >>>>>>> ${LIBPTHREAD} +LDADD+= -lpthread +.endif + .if >>>>>>> defined(LOCALBASE) CFLAGS+= >>>>>>> -DXAUTH_PATH=\"${LOCALBASE}/bin/xauth\" .endif >>>>>> >>>>>> Hello, >>>>>> >>>>>> This change makes the following simple test program fail >>>>>> on the second assert. The problem is that sa_handler == >>>>>> SIG_DFL, and sa_flags == SA_SIGINFO, which according to >>>>>> the sigaction(9) man page is not possible. With this >>>>>> change reverted the test is successful. >>>>> I do not quite follow. >>>>> >>>>> What are the relations between sshd and your test program ? >>>>> Should the test be run somehow specially ? >>>> >>>> No, and frankly that's what I don't understand. I compile >>>> this simple test with `cc -o test test.c`. It fails with >>>> this commit applied, and succeeds without it. >>>> >>>> Roger. >>>> >>> >>> Does it fail if you do not connect with ssh? >> >> Right, it works fine from the serial console, fails when >> executed from ssh. > > I cannot reproduce it locally with your scenario, but the attached > program demonstrates the issue without relying on inheritance and > libthr. > > I think you mis-interpret the man page statement, it only says that > SA_SIGINFO should not be set in new->sa_flags IMO. But I do not see > much sense in the requirement. Note that we do not test flags for > correctness at all. SUSv4 is also silent on the issue. > > If this is important for your case, the following patch prevents > leaking of the flags for ignored of default/action signals. Could > you, please, describe why do you consider this a bug ? IMO, it is an inconsistency to return an invalid old sigaction, I assume that what is returned as the old sigaction should also be valid according to the man page. I realize SUSv4 don't specify such requirement, but it would still be wrong to use SIG_DFL with SA_SIGINFO, since SA_SIGINFO expect the handler to be of the type: void func(int signo, siginfo_t *info, void *context); While SIG_DLF is of type: void func(int signo); There's software out there that (wrongly?) relies on sa_action == SIG_DFL and (sa_flags & SA_SIGINFO) == 0: http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=tools/libxl/libxl_fork.c;h=fa150959adcfa6618342ba1eb0085cbba5f75d0a;hb=HEAD#l338 The sa_flags check done here seems too strong in my opinion, but I still think it's right according to the man page. Roger. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (Darwin) iQEcBAEBAgAGBQJT9dQpAAoJEKXZdqUyumTAgsIH/2xAfa0FjWpCpkvDoNXGVs4K tRDurCFTsaCJZ1xt3aQyPvPALm+qOpBX+i3nTiX4Bg86jbrZRGTag4OeAE6uX3KR TCKaUB6jNUjuNsj5djURIQktbojFj71ID40bM3AXExXN8Gc7e9qqdvo+p82hDFS/ RkwwS9NfTv+yeC/djH+PsApq7OYCrpR0CX1fW6TKwtjdEZpJC4jx5S5TVJoZ2Y0B urlCtrjW6b4oNHqoiDMF4nk48SkuU/JWsTGAbFW6lK+1voyt3y1126uFk5jz144M ZYy4fu6mKEddrwrUFD9Qt9r3shaSLbenBxhc2ZxMT9V4Ws87bVxTSqqzrYsHJ0E= =Qwfa -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 11:48:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0229523C; Thu, 21 Aug 2014 11:48:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D68403B4C; Thu, 21 Aug 2014 11:48:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LBmbDg024653; Thu, 21 Aug 2014 11:48:37 GMT (envelope-from marck@FreeBSD.org) Received: (from marck@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LBmbnK024652; Thu, 21 Aug 2014 11:48:37 GMT (envelope-from marck@FreeBSD.org) Message-Id: <201408211148.s7LBmbnK024652@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marck set sender to marck@FreeBSD.org using -f From: Dmitry Morozovsky Date: Thu, 21 Aug 2014 11:48:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270266 - stable/10/share/misc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 11:48:38 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 12:30:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F92BFE7; Thu, 21 Aug 2014 12:30:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4AA873F8C; Thu, 21 Aug 2014 12:30:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LCU2fg043704; Thu, 21 Aug 2014 12:30:02 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LCU2iu043703; Thu, 21 Aug 2014 12:30:02 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201408211230.s7LCU2iu043703@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 21 Aug 2014 12:30:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270267 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 12:30:02 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 12:32:53 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A69E81E6; Thu, 21 Aug 2014 12:32:53 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C812302B; Thu, 21 Aug 2014 12:32:52 +0000 (UTC) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s7LCWkWw087095 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 21 Aug 2014 15:32:46 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua s7LCWkWw087095 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id s7LCWkIm087094; Thu, 21 Aug 2014 15:32:46 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 21 Aug 2014 15:32:46 +0300 From: Konstantin Belousov To: Roger Pau Monn? Subject: Re: svn commit: r265003 - head/secure/usr.sbin/sshd Message-ID: <20140821123246.GH2737@kib.kiev.ua> References: <201404270528.s3R5SEIm054377@svn.freebsd.org> <53F4B381.5010205@FreeBSD.org> <20140820151310.GB2737@kib.kiev.ua> <53F4BC9B.3090405@FreeBSD.org> <53F4BEB1.6070000@FreeBSD.org> <53F4C022.5050804@FreeBSD.org> <20140821080541.GE2737@kib.kiev.ua> <53F5D42E.9080908@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="o8DTQsiwS+K7TY1f" Content-Disposition: inline In-Reply-To: <53F5D42E.9080908@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bryan Drewery X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 12:32:53 -0000 --o8DTQsiwS+K7TY1f Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 21, 2014 at 01:12:46PM +0200, Roger Pau Monn? wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 >=20 > On 21/08/14 10:05, Konstantin Belousov wrote: > > On Wed, Aug 20, 2014 at 05:34:58PM +0200, Roger Pau Monn? wrote: > >> On 20/08/14 17:28, Bryan Drewery wrote: > >>> On 8/20/2014 10:19 AM, Roger Pau Monn? wrote: > >>>> On 20/08/14 17:13, Konstantin Belousov wrote: > >>>>> On Wed, Aug 20, 2014 at 04:41:05PM +0200, Roger Pau Monn??=20 > >>>>> wrote: > >>>>>> On 27/04/14 07:28, Konstantin Belousov wrote: > >>>>>>> Author: kib Date: Sun Apr 27 05:28:14 2014 New=20 > >>>>>>> Revision: 265003 URL:=20 > >>>>>>> http://svnweb.freebsd.org/changeset/base/265003 > >>>>>>>=20 > >>>>>>> Log: Fix order of libthr and libc in the global dso=20 > >>>>>>> list for sshd, by explicitely linking main binary with=20 > >>>>>>> -lpthread. Before, libthr appeared in the list due to=20 > >>>>>>> dependency of one of the kerberos libs. Due to the=20 > >>>>>>> change in ld(1) behaviour of not copying NEEDED entries > >>>>>>> from direct dependencies into the link results, the > >>>>>>> order becomes reversed. > >>>>>>>=20 > >>>>>>> The libthr must appear before libc to properly=20 > >>>>>>> interpose libc symbols and provide working rtld locks=20 > >>>>>>> implementation. The symptom was sshd hanging on rtld=20 > >>>>>>> bind lock during nested symbol binding from a signal=20 > >>>>>>> handler. > >>>>>>>=20 > >>>>>>> Approved by: des (openssh maintainer) Sponsored by: > >>>>>>> The FreeBSD Foundation MFC after: 1 week > >>>>>>>=20 > >>>>>>> Modified: head/secure/usr.sbin/sshd/Makefile > >>>>>>>=20 > >>>>>>> Modified: head/secure/usr.sbin/sshd/Makefile=20 > >>>>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>>=20 > - --- head/secure/usr.sbin/sshd/Makefile Sun Apr 27 05:19:01 2014 (r26500= 2) > >>>>>>> +++ head/secure/usr.sbin/sshd/Makefile Sun Apr 27=20 > >>>>>>> 05:28:14 2014 (r265003) @@ -57,6 +57,16 @@ CFLAGS+=3D=20 > >>>>>>> -DNONE_CIPHER_ENABLED DPADD+=3D ${LIBCRYPT} ${LIBCRYPTO}=20 > >>>>>>> ${LIBZ} LDADD+=3D -lcrypt -lcrypto -lz > >>>>>>>=20 > >>>>>>> +# Fix the order of NEEDED entries for libthr and > >>>>>>> libc. The libthr +# needs to interpose libc symbols, > >>>>>>> leaving the libthr loading as +# dependency of krb > >>>>>>> causes reversed order and broken interposing. Put +# > >>>>>>> the threading library last on the linker command line, > >>>>>>> just before +# the -lc added by a compiler driver. > >>>>>>> +.if ${MK_KERBEROS_SUPPORT} !=3D "no" +DPADD+=3D > >>>>>>> ${LIBPTHREAD} +LDADD+=3D -lpthread +.endif + .if > >>>>>>> defined(LOCALBASE) CFLAGS+=3D > >>>>>>> -DXAUTH_PATH=3D\"${LOCALBASE}/bin/xauth\" .endif > >>>>>>=20 > >>>>>> Hello, > >>>>>>=20 > >>>>>> This change makes the following simple test program fail=20 > >>>>>> on the second assert. The problem is that sa_handler =3D=3D=20 > >>>>>> SIG_DFL, and sa_flags =3D=3D SA_SIGINFO, which according to=20 > >>>>>> the sigaction(9) man page is not possible. With this=20 > >>>>>> change reverted the test is successful. > >>>>> I do not quite follow. > >>>>>=20 > >>>>> What are the relations between sshd and your test program ? > >>>>> Should the test be run somehow specially ? > >>>>=20 > >>>> No, and frankly that's what I don't understand. I compile=20 > >>>> this simple test with `cc -o test test.c`. It fails with > >>>> this commit applied, and succeeds without it. > >>>>=20 > >>>> Roger. > >>>>=20 > >>>=20 > >>> Does it fail if you do not connect with ssh? > >>=20 > >> Right, it works fine from the serial console, fails when > >> executed from ssh. > >=20 > > I cannot reproduce it locally with your scenario, but the attached=20 > > program demonstrates the issue without relying on inheritance and=20 > > libthr. > >=20 > > I think you mis-interpret the man page statement, it only says that > > SA_SIGINFO should not be set in new->sa_flags IMO. But I do not see > > much sense in the requirement. Note that we do not test flags for > > correctness at all. SUSv4 is also silent on the issue. > >=20 > > If this is important for your case, the following patch prevents=20 > > leaking of the flags for ignored of default/action signals. Could=20 > > you, please, describe why do you consider this a bug ? >=20 > IMO, it is an inconsistency to return an invalid old sigaction, I > assume that what is returned as the old sigaction should also be valid > according to the man page. >=20 > I realize SUSv4 don't specify such requirement, but it would still be > wrong to use SIG_DFL with SA_SIGINFO, since SA_SIGINFO expect the > handler to be of the type: >=20 > void func(int signo, siginfo_t *info, void *context); >=20 > While SIG_DLF is of type: >=20 > void func(int signo); >=20 > There's software out there that (wrongly?) relies on sa_action =3D=3D > SIG_DFL and (sa_flags & SA_SIGINFO) =3D=3D 0: >=20 > http://xenbits.xen.org/gitweb/?p=3Dxen.git;a=3Dblob;f=3Dtools/libxl/libxl= _fork.c;h=3Dfa150959adcfa6618342ba1eb0085cbba5f75d0a;hb=3DHEAD#l338 >=20 > The sa_flags check done here seems too strong in my opinion, but I > still think it's right according to the man page. Apparently, the original problem requires /bin/sh as the login shell to reproduce, while I used zsh on the test box. Below is the patch which fixes reset of flags both for sigaction(2) and execve(2). diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 561ea0a..4077ec9 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -621,6 +621,15 @@ sig_ffs(sigset_t *set) return (0); } =20 +static bool +sigact_flag_test(struct sigaction *act, int flag) +{ + + return ((act->sa_flags & flag) !=3D 0 && + (__sighandler_t *)act->sa_sigaction !=3D SIG_IGN && + (__sighandler_t *)act->sa_sigaction !=3D SIG_DFL); +} + /* * kern_sigaction * sigaction @@ -679,7 +688,7 @@ kern_sigaction(td, sig, act, oact, flags) =20 ps->ps_catchmask[_SIG_IDX(sig)] =3D 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)] =3D (__sighandler_t *)act->sa_sigaction; SIGADDSET(ps->ps_siginfo, sig); @@ -687,19 +696,19 @@ kern_sigaction(td, sig, act, oact, flags) ps->ps_sigact[_SIG_IDX(sig)] =3D 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); @@ -935,6 +944,11 @@ execsigs(struct proc *p) sigqueue_delete_proc(p, sig); } ps->ps_sigact[_SIG_IDX(sig)] =3D SIG_DFL; + SIGDELSET(ps->ps_siginfo, sig); + SIGDELSET(ps->ps_sigintr, sig); + SIGDELSET(ps->ps_sigonstack, sig); + SIGDELSET(ps->ps_sigreset, sig); + SIGDELSET(ps->ps_signodefer, sig); } /* * Reset stack state to the user stack. --o8DTQsiwS+K7TY1f Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJT9ebuAAoJEJDCuSvBvK1BpE4P/1OCAwh5It16HWT/Nzo9eRO+ NVxLO9R8UCRUvS+n1UIwXVNrottNsWOpSVL7olK/saG/k1RQUzp6lCdOftcfOE1W GSnzbTEP/2+zjSFQZut6ZvGD+UMjM1lNJmmXG8tQTDJNLcGY7XnwsG3fHoazwdzv RN78BHMgjpcmlPAmRFc7hdZu2UlC1RNxKS90g7JUX2nLgXgGni34z8ISqlJbs4xM k3iOkXSEFok+zQ9oZaJ1cKpP2j5LcRV8dX+Wpg79yRe0uihJO+9h/gYwcHjdfgIe uU/QMJhNZOnG5DSbW3VSXenTy1DinjxDd/eeCA7vT7dyc2rLdG5znwqueAftGvQO pVlGx1ncnCuSAEG64AZ/9CnlaZjvZls/Rc9t/5bpv51xoKkoEtOZHc8evyB01z3X JrKO9+L8K5GVBAOBp79WV9neDGC7DYwTBr7Ba5+2zJ+OFuELhbwfLe7ba1JgMsZl pPMwPsFdLvolMGv01KIb5iwaML/Aq6wVS4ZYKXbEQZ8vksOgQaY2aR+CroXeDhGC DtpQrxjvBjv/DmVAV68++yicQ7HkJnraW69Er2NDQ1JVVE7xE6Klp5qVY+7hqaQY DmUWljGcCYLj+lIsZMjzUiCUSNkVcrnz6SsK6I0owEdEKvyXnrELClDS7KXrKGwu qNBTL5l0dls057LdtEso =HJy7 -----END PGP SIGNATURE----- --o8DTQsiwS+K7TY1f-- From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 12:50:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 264BF59D; Thu, 21 Aug 2014 12:50:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1225D316A; Thu, 21 Aug 2014 12:50:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LCoBdt054943; Thu, 21 Aug 2014 12:50:11 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LCoBQr054942; Thu, 21 Aug 2014 12:50:11 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201408211250.s7LCoBQr054942@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Thu, 21 Aug 2014 12:50:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270268 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 12:50:12 -0000 Author: bz Date: Thu Aug 21 12:50:11 2014 New Revision: 270268 URL: http://svnweb.freebsd.org/changeset/base/270268 Log: Document MAC address selection and setting for atse(4). Submitted by: brooks MFC after: 3 days Sponsored by: DARPA/AFRL Modified: head/share/man/man4/altera_atse.4 Modified: head/share/man/man4/altera_atse.4 ============================================================================== --- head/share/man/man4/altera_atse.4 Thu Aug 21 12:30:01 2014 (r270267) +++ head/share/man/man4/altera_atse.4 Thu Aug 21 12:50:11 2014 (r270268) @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2013 SRI International +.\" Copyright (c) 2013-2014 SRI International .\" All rights reserved. .\" .\" This software was developed by SRI International and the University of @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 18, 2013 +.Dd May 21, 2014 .Dt ALTERA_ATSE 4 .Os .Sh NAME @@ -66,6 +66,25 @@ The current version of the .Nm driver supports the Ethernet MegaCore as described in version 11.1 of Altera's documentation when the device is configured with internal FIFOs. +.Sh MAC SELECTION +The default MAC address for each +.Nm +interface is derived from a value stored in +.Xr cfi 4 +flash. +The value is managed by the +.Xr atsectl 8 +utility. +.Pp +Only a single MAC address may be stored in flash. +If the address begins with the Altera prefix 00:07:ed and ends in 00 then +up to 16 addresses will be derived from it by adding the unit number of +the interface to the stored address. +For other prefixes, the address will be assigned to atse0 and random +addresses will be used for other interfaces. +If the stored address is invalid, for example all zero's, multicast, or the +default address shipped on all DE4 boards (00:07:ed:ff:ed:15) then a random +address is generated when the device is attached. .Sh SEE ALSO .Xr miibus 4 , .Xr netintro 4 , From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 13:04:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E18DC982; Thu, 21 Aug 2014 13:04:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C16B63358; Thu, 21 Aug 2014 13:04:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LD4Yjx061632; Thu, 21 Aug 2014 13:04:34 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LD4Y77061630; Thu, 21 Aug 2014 13:04:34 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201408211304.s7LD4Y77061630@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Thu, 21 Aug 2014 13:04:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270269 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 13:04:35 -0000 Author: dumbbell Date: Thu Aug 21 13:04:34 2014 New Revision: 270269 URL: http://svnweb.freebsd.org/changeset/base/270269 Log: vt(4): Handle global and per-window mouse cursor toggle in one place Before the global flag was set/unset using the CONS_MOUSECTL ioctl, and the per-window flag through the MOUSE_SETLEVEL or MOUSE_SETMODE ioctls. Also, if the cursor is already enabled/disabled, return immediatly. This avoids to reset the cursor's position to the center of the screen. This matches syscons' behavior. While here, remove a trailing space and a redundant variable declaration. Modified: head/sys/dev/vt/vt_core.c head/sys/dev/vt/vt_sysmouse.c Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Thu Aug 21 12:50:11 2014 (r270268) +++ head/sys/dev/vt/vt_core.c Thu Aug 21 13:04:34 2014 (r270269) @@ -1703,7 +1703,7 @@ skip_thunk: /* XXX: other fields! */ return (0); } - case CONS_GETVERS: + case CONS_GETVERS: *(int *)data = 0x200; return (0); case CONS_MODEINFO: @@ -1713,20 +1713,28 @@ skip_thunk: mouse_info_t *mouse = (mouse_info_t*)data; /* - * This has no effect on vt(4). We don't draw any mouse - * cursor. Just ignore MOUSE_HIDE and MOUSE_SHOW to - * prevent excessive errors. All the other commands + * All the commands except MOUSE_SHOW nd MOUSE_HIDE * should not be applied to individual TTYs, but only to * consolectl. */ switch (mouse->operation) { case MOUSE_HIDE: - vd->vd_flags &= ~VDF_MOUSECURSOR; + if (vd->vd_flags & VDF_MOUSECURSOR) { + vd->vd_flags &= ~VDF_MOUSECURSOR; +#ifndef SC_NO_CUTPASTE + vt_mouse_state(VT_MOUSE_HIDE); +#endif + } return (0); case MOUSE_SHOW: - vd->vd_mx = vd->vd_width / 2; - vd->vd_my = vd->vd_height / 2; - vd->vd_flags |= VDF_MOUSECURSOR; + if (!(vd->vd_flags & VDF_MOUSECURSOR)) { + vd->vd_flags |= VDF_MOUSECURSOR; + vd->vd_mx = vd->vd_width / 2; + vd->vd_my = vd->vd_height / 2; +#ifndef SC_NO_CUTPASTE + vt_mouse_state(VT_MOUSE_SHOW); +#endif + } return (0); default: return (EINVAL); @@ -1749,7 +1757,6 @@ skip_thunk: } case GIO_SCRNMAP: { scrmap_t *sm = (scrmap_t *)data; - int i; /* We don't have screen maps, so return a handcrafted one. */ for (i = 0; i < 256; i++) Modified: head/sys/dev/vt/vt_sysmouse.c ============================================================================== --- head/sys/dev/vt/vt_sysmouse.c Thu Aug 21 12:50:11 2014 (r270268) +++ head/sys/dev/vt/vt_sysmouse.c Thu Aug 21 13:04:34 2014 (r270269) @@ -347,9 +347,6 @@ sysmouse_ioctl(struct cdev *dev, u_long return (EINVAL); sysmouse_level = level; -#ifndef SC_NO_CUTPASTE - vt_mouse_state((level == 0)?VT_MOUSE_SHOW:VT_MOUSE_HIDE); -#endif return (0); } case MOUSE_SETMODE: { @@ -362,10 +359,6 @@ sysmouse_ioctl(struct cdev *dev, u_long case 0: case 1: sysmouse_level = mode->level; -#ifndef SC_NO_CUTPASTE - vt_mouse_state((mode->level == 0)?VT_MOUSE_SHOW: - VT_MOUSE_HIDE); -#endif break; default: return (EINVAL); From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 13:27:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 69FB739A; Thu, 21 Aug 2014 13:27:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5508A35E1; Thu, 21 Aug 2014 13:27:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LDR6dj071700; Thu, 21 Aug 2014 13:27:06 GMT (envelope-from bryanv@FreeBSD.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LDR5NQ071698; Thu, 21 Aug 2014 13:27:05 GMT (envelope-from bryanv@FreeBSD.org) Message-Id: <201408211327.s7LDR5NQ071698@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bryanv set sender to bryanv@FreeBSD.org using -f From: Bryan Venteicher Date: Thu, 21 Aug 2014 13:27:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270270 - stable/10/sys/dev/virtio X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 13:27:06 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 13:28:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9EC3F570; Thu, 21 Aug 2014 13:28:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A41A35FE; Thu, 21 Aug 2014 13:28:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LDSm4k071944; Thu, 21 Aug 2014 13:28:48 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LDSmhX071943; Thu, 21 Aug 2014 13:28:48 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201408211328.s7LDSmhX071943@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Thu, 21 Aug 2014 13:28:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270271 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 13:28:48 -0000 Author: dumbbell Date: Thu Aug 21 13:28:48 2014 New Revision: 270271 URL: http://svnweb.freebsd.org/changeset/base/270271 Log: vt(4): Mark cursor old position as dirty before reading the dirty area Otherwise, the redraw is done during the next vt_flush run. MFC after: 1 week Modified: head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Thu Aug 21 13:27:05 2014 (r270270) +++ head/sys/dev/vt/vt_core.c Thu Aug 21 13:28:48 2014 (r270271) @@ -832,6 +832,14 @@ vt_flush(struct vt_device *vd) if (vd->vd_flags & VDF_SPLASH || vw->vw_flags & VWF_BUSY) return; +#ifndef SC_NO_CUTPASTE + if ((vw->vw_flags & VWF_MOUSE_HIDE) == 0) { + /* Mark last mouse position as dirty to erase. */ + vtbuf_mouse_cursor_position(&vw->vw_buf, vd->vd_mdirtyx, + vd->vd_mdirtyy); + } +#endif + vtbuf_undirty(&vw->vw_buf, &tarea, &tmask); vt_termsize(vd, vf, &size); @@ -844,14 +852,6 @@ vt_flush(struct vt_device *vd) vd->vd_flags &= ~VDF_INVALID; } -#ifndef SC_NO_CUTPASTE - if ((vw->vw_flags & VWF_MOUSE_HIDE) == 0) { - /* Mark last mouse position as dirty to erase. */ - vtbuf_mouse_cursor_position(&vw->vw_buf, vd->vd_mdirtyx, - vd->vd_mdirtyy); - } -#endif - for (row = tarea.tr_begin.tp_row; row < tarea.tr_end.tp_row; row++) { if (!VTBUF_DIRTYROW(&tmask, row)) continue; From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 14:12:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B74DD630; Thu, 21 Aug 2014 14:12:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2C8D3B52; Thu, 21 Aug 2014 14:12:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LECCN8093702; Thu, 21 Aug 2014 14:12:12 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LECCHg093701; Thu, 21 Aug 2014 14:12:12 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201408211412.s7LECCHg093701@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Thu, 21 Aug 2014 14:12:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270272 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 14:12:12 -0000 Author: dumbbell Date: Thu Aug 21 14:12:11 2014 New Revision: 270272 URL: http://svnweb.freebsd.org/changeset/base/270272 Log: vt(4): If the cursor is globally disabled, don't mark its position as dirty This avoids unnecessary redraw. In particular, during boot, where the cursor is disabled and its fake position is [0;0], this triggered a refresh of the whole screen each time vt_flush() is called. MFC after: 1 week Modified: head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Thu Aug 21 13:28:48 2014 (r270271) +++ head/sys/dev/vt/vt_core.c Thu Aug 21 14:12:11 2014 (r270272) @@ -833,7 +833,8 @@ vt_flush(struct vt_device *vd) return; #ifndef SC_NO_CUTPASTE - if ((vw->vw_flags & VWF_MOUSE_HIDE) == 0) { + if ((vd->vd_flags & VDF_MOUSECURSOR) && /* Mouse support enabled. */ + !(vw->vw_flags & VWF_MOUSE_HIDE)) { /* Cursor displayed. */ /* Mark last mouse position as dirty to erase. */ vtbuf_mouse_cursor_position(&vw->vw_buf, vd->vd_mdirtyx, vd->vd_mdirtyy); From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 14:54:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7813336D; Thu, 21 Aug 2014 14:54:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 630EF3F9C; Thu, 21 Aug 2014 14:54:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LEscDx012507; Thu, 21 Aug 2014 14:54:38 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LEsbIM012504; Thu, 21 Aug 2014 14:54:37 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201408211454.s7LEsbIM012504@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Thu, 21 Aug 2014 14:54:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270273 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 14:54:38 -0000 Author: dumbbell Date: Thu Aug 21 14:54:37 2014 New Revision: 270273 URL: http://svnweb.freebsd.org/changeset/base/270273 Log: vt(4): If the cursor didn't move, don't mark its position as dirty Currently, this has no effect, because the cursor is always redrawn anyway. But this will be useful after improvements to the vd_bitbltchr_t callback API. The vt_device structure members used to store the position of the cursor as of the last redraw are renamed from vd_mdirty{x,y} to vd_mold{x,y}. The associated comment is fixed too. Also, their value is now expressed in pixels, not in character columns/row. MFC after: 1 week Modified: head/sys/dev/vt/vt.h head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt.h ============================================================================== --- head/sys/dev/vt/vt.h Thu Aug 21 14:12:11 2014 (r270272) +++ head/sys/dev/vt/vt.h Thu Aug 21 14:54:37 2014 (r270273) @@ -122,10 +122,10 @@ struct vt_device { struct vt_window *vd_markedwin; /* (?) Copy/paste buf owner. */ const struct vt_driver *vd_driver; /* (c) Graphics driver. */ void *vd_softc; /* (u) Driver data. */ - uint16_t vd_mx; /* (?) Mouse X. */ - uint16_t vd_my; /* (?) Mouse Y. */ - vt_axis_t vd_mdirtyx; /* (?) Screen width. */ - vt_axis_t vd_mdirtyy; /* (?) Screen height. */ + uint16_t vd_mx; /* (?) Current mouse X. */ + uint16_t vd_my; /* (?) current mouse Y. */ + vt_axis_t vd_moldx; /* (?) Mouse X as of last redraw. */ + vt_axis_t vd_moldy; /* (?) Mouse Y as of last redraw. */ uint32_t vd_mstate; /* (?) Mouse state. */ term_pos_t vd_offset; /* (?) Pixel offset. */ vt_axis_t vd_width; /* (?) Screen width. */ Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Thu Aug 21 14:12:11 2014 (r270272) +++ head/sys/dev/vt/vt_core.c Thu Aug 21 14:54:37 2014 (r270273) @@ -835,9 +835,33 @@ vt_flush(struct vt_device *vd) #ifndef SC_NO_CUTPASTE if ((vd->vd_flags & VDF_MOUSECURSOR) && /* Mouse support enabled. */ !(vw->vw_flags & VWF_MOUSE_HIDE)) { /* Cursor displayed. */ - /* Mark last mouse position as dirty to erase. */ - vtbuf_mouse_cursor_position(&vw->vw_buf, vd->vd_mdirtyx, - vd->vd_mdirtyy); + if (vd->vd_moldx != vd->vd_mx || + vd->vd_moldy != vd->vd_my) { + /* + * Mark last mouse position as dirty to erase. + * + * FIXME: The font size could be different among + * all windows, so the column/row calculation + * below isn't correct for all windows. + * + * FIXME: The cursor can span more than one + * character cell. vtbuf_mouse_cursor_position + * marks surrounding cells as dirty. But due + * to font size possibly inconsistent across + * windows, this may not be sufficient. This + * causes part of the cursor to not be erased. + */ + vtbuf_mouse_cursor_position(&vw->vw_buf, + vd->vd_moldx / vf->vf_width, + vd->vd_moldy / vf->vf_height); + + /* + * Save point of last mouse cursor to erase it + * later. + */ + vd->vd_moldx = vd->vd_mx; + vd->vd_moldy = vd->vd_my; + } } #endif @@ -892,9 +916,6 @@ vt_flush(struct vt_device *vd) vd->vd_offset.tp_row + vd->vd_my, vd->vd_offset.tp_col + vd->vd_mx, w, h, TC_WHITE, TC_BLACK); - /* Save point of last mouse cursor to erase it later. */ - vd->vd_mdirtyx = vd->vd_mx / vf->vf_width; - vd->vd_mdirtyy = vd->vd_my / vf->vf_height; } #endif } From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 14:56:59 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A282568; Thu, 21 Aug 2014 14:56:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 531E53FC7; Thu, 21 Aug 2014 14:56:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LEuxGR012897; Thu, 21 Aug 2014 14:56:59 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LEuwPo012891; Thu, 21 Aug 2014 14:56:58 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201408211456.s7LEuwPo012891@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 21 Aug 2014 14:56:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270274 - in stable/10: . sys/conf sys/dev/aic7xxx/aicasm sys/modules/aic7xxx sys/modules/aic7xxx/ahc sys/modules/aic7xxx/ahd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 14:56:59 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 15:00:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F45E990; Thu, 21 Aug 2014 15:00:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8ABF9300F; Thu, 21 Aug 2014 15:00:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LF0LU1013947; Thu, 21 Aug 2014 15:00:21 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LF0LYB013933; Thu, 21 Aug 2014 15:00:21 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201408211500.s7LF0LYB013933@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Thu, 21 Aug 2014 15:00:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270275 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 15:00:21 -0000 Author: dumbbell Date: Thu Aug 21 15:00:21 2014 New Revision: 270275 URL: http://svnweb.freebsd.org/changeset/base/270275 Log: vt(4): Mark the current cursor position as dirty Like r270273, this has no effect for now, because the cursor is always drawn. This is in preparation of future changes to vd_bitbltchr_t API. MFC after: 1 week Modified: head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Thu Aug 21 14:56:57 2014 (r270274) +++ head/sys/dev/vt/vt_core.c Thu Aug 21 15:00:21 2014 (r270275) @@ -850,10 +850,16 @@ vt_flush(struct vt_device *vd) * to font size possibly inconsistent across * windows, this may not be sufficient. This * causes part of the cursor to not be erased. + * + * FIXME: The vt_buf lock is acquired twice in a + * row. */ vtbuf_mouse_cursor_position(&vw->vw_buf, vd->vd_moldx / vf->vf_width, vd->vd_moldy / vf->vf_height); + vtbuf_mouse_cursor_position(&vw->vw_buf, + vd->vd_mx / vf->vf_width, + vd->vd_my / vf->vf_height); /* * Save point of last mouse cursor to erase it From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 15:07:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2307D05; Thu, 21 Aug 2014 15:07:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CCA5D30F8; Thu, 21 Aug 2014 15:07:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LF7RuB018108; Thu, 21 Aug 2014 15:07:27 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LF7PgQ018086; Thu, 21 Aug 2014 15:07:25 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408211507.s7LF7PgQ018086@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 21 Aug 2014 15:07:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270276 - in head: sys/fs/autofs usr.sbin/autofs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 15:07:28 -0000 Author: trasz Date: Thu Aug 21 15:07:25 2014 New Revision: 270276 URL: http://svnweb.freebsd.org/changeset/base/270276 Log: Use __FBSDID() properly. Suggested by: pluknet@ MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/sys/fs/autofs/autofs.c head/sys/fs/autofs/autofs.h head/sys/fs/autofs/autofs_vfsops.c head/sys/fs/autofs/autofs_vnops.c head/usr.sbin/autofs/automount.c head/usr.sbin/autofs/automountd.c head/usr.sbin/autofs/autounmountd.c head/usr.sbin/autofs/common.c head/usr.sbin/autofs/defined.c head/usr.sbin/autofs/log.c head/usr.sbin/autofs/popen.c Modified: head/sys/fs/autofs/autofs.c ============================================================================== --- head/sys/fs/autofs/autofs.c Thu Aug 21 15:00:21 2014 (r270275) +++ head/sys/fs/autofs/autofs.c Thu Aug 21 15:07:25 2014 (r270276) @@ -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: head/sys/fs/autofs/autofs.h ============================================================================== --- head/sys/fs/autofs/autofs.h Thu Aug 21 15:00:21 2014 (r270275) +++ head/sys/fs/autofs/autofs.h Thu Aug 21 15:07:25 2014 (r270276) @@ -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: head/sys/fs/autofs/autofs_vfsops.c ============================================================================== --- head/sys/fs/autofs/autofs_vfsops.c Thu Aug 21 15:00:21 2014 (r270275) +++ head/sys/fs/autofs/autofs_vfsops.c Thu Aug 21 15:07:25 2014 (r270276) @@ -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: head/sys/fs/autofs/autofs_vnops.c ============================================================================== --- head/sys/fs/autofs/autofs_vnops.c Thu Aug 21 15:00:21 2014 (r270275) +++ head/sys/fs/autofs/autofs_vnops.c Thu Aug 21 15:07:25 2014 (r270276) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ #include Modified: head/usr.sbin/autofs/automount.c ============================================================================== --- head/usr.sbin/autofs/automount.c Thu Aug 21 15:00:21 2014 (r270275) +++ head/usr.sbin/autofs/automount.c Thu Aug 21 15:07:25 2014 (r270276) @@ -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: head/usr.sbin/autofs/automountd.c ============================================================================== --- head/usr.sbin/autofs/automountd.c Thu Aug 21 15:00:21 2014 (r270275) +++ head/usr.sbin/autofs/automountd.c Thu Aug 21 15:07:25 2014 (r270276) @@ -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: head/usr.sbin/autofs/autounmountd.c ============================================================================== --- head/usr.sbin/autofs/autounmountd.c Thu Aug 21 15:00:21 2014 (r270275) +++ head/usr.sbin/autofs/autounmountd.c Thu Aug 21 15:07:25 2014 (r270276) @@ -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: head/usr.sbin/autofs/common.c ============================================================================== --- head/usr.sbin/autofs/common.c Thu Aug 21 15:00:21 2014 (r270275) +++ head/usr.sbin/autofs/common.c Thu Aug 21 15:07:25 2014 (r270276) @@ -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: head/usr.sbin/autofs/defined.c ============================================================================== --- head/usr.sbin/autofs/defined.c Thu Aug 21 15:00:21 2014 (r270275) +++ head/usr.sbin/autofs/defined.c Thu Aug 21 15:07:25 2014 (r270276) @@ -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: head/usr.sbin/autofs/log.c ============================================================================== --- head/usr.sbin/autofs/log.c Thu Aug 21 15:00:21 2014 (r270275) +++ head/usr.sbin/autofs/log.c Thu Aug 21 15:07:25 2014 (r270276) @@ -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: head/usr.sbin/autofs/popen.c ============================================================================== --- head/usr.sbin/autofs/popen.c Thu Aug 21 15:00:21 2014 (r270275) +++ head/usr.sbin/autofs/popen.c Thu Aug 21 15:07:25 2014 (r270276) @@ -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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 15:10:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 147F7EAF; Thu, 21 Aug 2014 15:10:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 009643119; Thu, 21 Aug 2014 15:10:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LFAATY018559; Thu, 21 Aug 2014 15:10:10 GMT (envelope-from kan@FreeBSD.org) Received: (from kan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LFAAET018558; Thu, 21 Aug 2014 15:10:10 GMT (envelope-from kan@FreeBSD.org) Message-Id: <201408211510.s7LFAAET018558@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kan set sender to kan@FreeBSD.org using -f From: Alexander Kabaev Date: Thu, 21 Aug 2014 15:10:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270277 - head/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 15:10:11 -0000 Author: kan Date: Thu Aug 21 15:10:10 2014 New Revision: 270277 URL: http://svnweb.freebsd.org/changeset/base/270277 Log: Add guards to ptrdiff_t definition in include/stddef.h Back in 2011 obrien has added the #define macro in sys/sys/stddef.h to guard ptrdiff_t. Add similar protection to the identical code in include/stddef.h. Submitted by: Mariusz Zaborski MFC after: 1 week Modified: head/include/stddef.h Modified: head/include/stddef.h ============================================================================== --- head/include/stddef.h Thu Aug 21 15:07:25 2014 (r270276) +++ head/include/stddef.h Thu Aug 21 15:10:10 2014 (r270277) @@ -38,7 +38,10 @@ #include #include +#ifndef _PTRDIFF_T_DECLARED typedef __ptrdiff_t ptrdiff_t; +#define _PTRDIFF_T_DECLARED +#endif #if __BSD_VISIBLE #ifndef _RUNE_T_DECLARED From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 15:14:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29388400; Thu, 21 Aug 2014 15:14:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14ECC3204; Thu, 21 Aug 2014 15:14:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LFEsBG022539; Thu, 21 Aug 2014 15:14:54 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LFEs0t022538; Thu, 21 Aug 2014 15:14:54 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201408211514.s7LFEs0t022538@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Thu, 21 Aug 2014 15:14:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270278 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 15:14:55 -0000 Author: dumbbell Date: Thu Aug 21 15:14:54 2014 New Revision: 270278 URL: http://svnweb.freebsd.org/changeset/base/270278 Log: vt(4): Mark cursor position as dirty when we enable/disable it MFC after: 1 week Modified: head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Thu Aug 21 15:10:10 2014 (r270277) +++ head/sys/dev/vt/vt_core.c Thu Aug 21 15:14:54 2014 (r270278) @@ -1559,6 +1559,15 @@ vt_mouse_state(int show) vw->vw_flags &= ~VWF_MOUSE_HIDE; break; } + + /* + * Mark mouse position as dirty. + * + * FIXME: See comments in vt_flush(). + */ + vtbuf_mouse_cursor_position(&vw->vw_buf, + vd->vd_mx / vw->vw_font->vf_width, + vd->vd_my / vw->vw_font->vf_height); } #endif From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 15:32:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A10EBBE0; Thu, 21 Aug 2014 15:32:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A6C533F4; Thu, 21 Aug 2014 15:32:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LFWgZr031340; Thu, 21 Aug 2014 15:32:42 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LFWcj6031317; Thu, 21 Aug 2014 15:32:38 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408211532.s7LFWcj6031317@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 21 Aug 2014 15:32:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270279 - in head: sys/dev/iscsi usr.bin/iscsictl usr.sbin/ctld usr.sbin/iscsid X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 15:32:42 -0000 Author: trasz Date: Thu Aug 21 15:32:38 2014 New Revision: 270279 URL: http://svnweb.freebsd.org/changeset/base/270279 Log: Make the iSCSI stack use __FBSDID() properly. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/iscsi/icl.c head/sys/dev/iscsi/icl_proxy.c head/sys/dev/iscsi/iscsi.c head/usr.bin/iscsictl/iscsictl.c head/usr.sbin/ctld/ctld.c head/usr.sbin/ctld/discovery.c head/usr.sbin/ctld/kernel.c head/usr.sbin/ctld/keys.c head/usr.sbin/ctld/log.c head/usr.sbin/ctld/login.c head/usr.sbin/ctld/pdu.c head/usr.sbin/iscsid/discovery.c head/usr.sbin/iscsid/iscsid.c head/usr.sbin/iscsid/keys.c head/usr.sbin/iscsid/log.c head/usr.sbin/iscsid/login.c head/usr.sbin/iscsid/pdu.c Modified: head/sys/dev/iscsi/icl.c ============================================================================== --- head/sys/dev/iscsi/icl.c Thu Aug 21 15:14:54 2014 (r270278) +++ head/sys/dev/iscsi/icl.c Thu Aug 21 15:32:38 2014 (r270279) @@ -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: head/sys/dev/iscsi/icl_proxy.c ============================================================================== --- head/sys/dev/iscsi/icl_proxy.c Thu Aug 21 15:14:54 2014 (r270278) +++ head/sys/dev/iscsi/icl_proxy.c Thu Aug 21 15:32:38 2014 (r270279) @@ -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: head/sys/dev/iscsi/iscsi.c ============================================================================== --- head/sys/dev/iscsi/iscsi.c Thu Aug 21 15:14:54 2014 (r270278) +++ head/sys/dev/iscsi/iscsi.c Thu Aug 21 15:32:38 2014 (r270279) @@ -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: head/usr.bin/iscsictl/iscsictl.c ============================================================================== --- head/usr.bin/iscsictl/iscsictl.c Thu Aug 21 15:14:54 2014 (r270278) +++ head/usr.bin/iscsictl/iscsictl.c Thu Aug 21 15:32:38 2014 (r270279) @@ -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: head/usr.sbin/ctld/ctld.c ============================================================================== --- head/usr.sbin/ctld/ctld.c Thu Aug 21 15:14:54 2014 (r270278) +++ head/usr.sbin/ctld/ctld.c Thu Aug 21 15:32:38 2014 (r270279) @@ -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: head/usr.sbin/ctld/discovery.c ============================================================================== --- head/usr.sbin/ctld/discovery.c Thu Aug 21 15:14:54 2014 (r270278) +++ head/usr.sbin/ctld/discovery.c Thu Aug 21 15:32:38 2014 (r270279) @@ -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: head/usr.sbin/ctld/kernel.c ============================================================================== --- head/usr.sbin/ctld/kernel.c Thu Aug 21 15:14:54 2014 (r270278) +++ head/usr.sbin/ctld/kernel.c Thu Aug 21 15:32:38 2014 (r270279) @@ -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: head/usr.sbin/ctld/keys.c ============================================================================== --- head/usr.sbin/ctld/keys.c Thu Aug 21 15:14:54 2014 (r270278) +++ head/usr.sbin/ctld/keys.c Thu Aug 21 15:32:38 2014 (r270279) @@ -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: head/usr.sbin/ctld/log.c ============================================================================== --- head/usr.sbin/ctld/log.c Thu Aug 21 15:14:54 2014 (r270278) +++ head/usr.sbin/ctld/log.c Thu Aug 21 15:32:38 2014 (r270279) @@ -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: head/usr.sbin/ctld/login.c ============================================================================== --- head/usr.sbin/ctld/login.c Thu Aug 21 15:14:54 2014 (r270278) +++ head/usr.sbin/ctld/login.c Thu Aug 21 15:32:38 2014 (r270279) @@ -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: head/usr.sbin/ctld/pdu.c ============================================================================== --- head/usr.sbin/ctld/pdu.c Thu Aug 21 15:14:54 2014 (r270278) +++ head/usr.sbin/ctld/pdu.c Thu Aug 21 15:32:38 2014 (r270279) @@ -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: head/usr.sbin/iscsid/discovery.c ============================================================================== --- head/usr.sbin/iscsid/discovery.c Thu Aug 21 15:14:54 2014 (r270278) +++ head/usr.sbin/iscsid/discovery.c Thu Aug 21 15:32:38 2014 (r270279) @@ -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: head/usr.sbin/iscsid/iscsid.c ============================================================================== --- head/usr.sbin/iscsid/iscsid.c Thu Aug 21 15:14:54 2014 (r270278) +++ head/usr.sbin/iscsid/iscsid.c Thu Aug 21 15:32:38 2014 (r270279) @@ -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: head/usr.sbin/iscsid/keys.c ============================================================================== --- head/usr.sbin/iscsid/keys.c Thu Aug 21 15:14:54 2014 (r270278) +++ head/usr.sbin/iscsid/keys.c Thu Aug 21 15:32:38 2014 (r270279) @@ -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: head/usr.sbin/iscsid/log.c ============================================================================== --- head/usr.sbin/iscsid/log.c Thu Aug 21 15:14:54 2014 (r270278) +++ head/usr.sbin/iscsid/log.c Thu Aug 21 15:32:38 2014 (r270279) @@ -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: head/usr.sbin/iscsid/login.c ============================================================================== --- head/usr.sbin/iscsid/login.c Thu Aug 21 15:14:54 2014 (r270278) +++ head/usr.sbin/iscsid/login.c Thu Aug 21 15:32:38 2014 (r270279) @@ -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: head/usr.sbin/iscsid/pdu.c ============================================================================== --- head/usr.sbin/iscsid/pdu.c Thu Aug 21 15:14:54 2014 (r270278) +++ head/usr.sbin/iscsid/pdu.c Thu Aug 21 15:32:38 2014 (r270279) @@ -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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 15:39:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D53E61D5; Thu, 21 Aug 2014 15:39:55 +0000 (UTC) Received: from alto.onthenet.com.au (alto.OntheNet.com.au [203.13.68.12]) by mx1.freebsd.org (Postfix) with ESMTP id 936763454; Thu, 21 Aug 2014 15:39:55 +0000 (UTC) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by alto.onthenet.com.au (Postfix) with ESMTPS id 24B9D12648; Fri, 22 Aug 2014 01:39:54 +1000 (EST) Received: from Peters-MacBook-Pro.local (c-69-181-164-196.hsd1.ca.comcast.net [69.181.164.196]) by dommail.onthenet.com.au (MOS 4.4.4-GA) with ESMTP id BXX37319 (AUTH peterg@ptree32.com.au); Fri, 22 Aug 2014 01:39:52 +1000 Message-ID: <53F612C8.8060809@freebsd.org> Date: Thu, 21 Aug 2014 08:39:52 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: yaneurabeya@gmail.com Subject: Re: 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... References: <201408190120.s7J1KP93011521@svn.freebsd.org> <5E940151-D3B4-4CE1-93F0-5A3992C47BA3@gmail.com> In-Reply-To: <5E940151-D3B4-4CE1-93F0-5A3992C47BA3@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 15:39:56 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 15:55:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 33BFBC91; Thu, 21 Aug 2014 15:55:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1EC9F362D; Thu, 21 Aug 2014 15:55:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LFtIH6040842; Thu, 21 Aug 2014 15:55:18 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LFtI63040840; Thu, 21 Aug 2014 15:55:18 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201408211555.s7LFtI63040840@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Thu, 21 Aug 2014 15:55:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270280 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 15:55:19 -0000 Author: dumbbell Date: Thu Aug 21 15:55:18 2014 New Revision: 270280 URL: http://svnweb.freebsd.org/changeset/base/270280 Log: vt(4): Pause the flush timer while swithing window This fixes bad looking refresh when switching window: squares instead of text, flashing screen, and so on. In the worst case, vt_flush() came at a very inappropriate timing and the screen was not refreshed at all (leaving squares all over the place). This doesn't fix the flickering of the screen with vt_vga, because the sync signal is temporarily stopped and the video memory is cleared. MFC after: 1 week Modified: head/sys/dev/vt/vt.h head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt.h ============================================================================== --- head/sys/dev/vt/vt.h Thu Aug 21 15:32:38 2014 (r270279) +++ head/sys/dev/vt/vt.h Thu Aug 21 15:55:18 2014 (r270280) @@ -133,6 +133,7 @@ struct vt_device { struct mtx vd_lock; /* Per-device lock. */ struct cv vd_winswitch; /* (d) Window switch notify. */ struct callout vd_timer; /* (d) Display timer. */ + volatile unsigned int vd_timer_armed;/* (?) Display timer started.*/ int vd_flags; /* (d) Device flags. */ #define VDF_TEXTMODE 0x01 /* Do text mode rendering. */ #define VDF_SPLASH 0x02 /* Splash screen active. */ Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Thu Aug 21 15:32:38 2014 (r270279) +++ head/sys/dev/vt/vt_core.c Thu Aug 21 15:55:18 2014 (r270280) @@ -228,6 +228,37 @@ vt_update_static(void *dummy) } static void +vt_schedule_flush(struct vt_device *vd, int ms) +{ + + if (ms <= 0) + /* Default to initial value. */ + ms = 1000 / VT_TIMERFREQ; + + callout_schedule(&vd->vd_timer, hz / (1000 / ms)); +} + +static void +vt_resume_flush_timer(struct vt_device *vd, int ms) +{ + + if (!atomic_cmpset_int(&vd->vd_timer_armed, 0, 1)) + return; + + vt_schedule_flush(vd, ms); +} + +static void +vt_suspend_flush_timer(struct vt_device *vd) +{ + + if (!atomic_cmpset_int(&vd->vd_timer_armed, 1, 0)) + return; + + callout_drain(&vd->vd_timer); +} + +static void vt_switch_timer(void *arg) { @@ -330,6 +361,8 @@ vt_window_switch(struct vt_window *vw) return (EINVAL); } + vt_suspend_flush_timer(vd); + vd->vd_curwindow = vw; vd->vd_flags |= VDF_INVALID; cv_broadcast(&vd->vd_winswitch); @@ -338,6 +371,8 @@ vt_window_switch(struct vt_window *vw) if (vd->vd_driver->vd_postswitch) vd->vd_driver->vd_postswitch(vd); + vt_resume_flush_timer(vd, 0); + /* Restore per-window keyboard mode. */ mtx_lock(&Giant); kbd = kbd_get_keyboard(vd->vd_keyboard); @@ -936,7 +971,7 @@ vt_timer(void *arg) vt_flush(vd); /* Schedule for next update. */ - callout_schedule(&vd->vd_timer, hz / VT_TIMERFREQ); + vt_schedule_flush(vd, 0); } static void @@ -2091,6 +2126,7 @@ vt_upgrade(struct vt_device *vd) /* Start timer when everything ready. */ vd->vd_flags |= VDF_ASYNC; callout_reset(&vd->vd_timer, hz / VT_TIMERFREQ, vt_timer, vd); + vd->vd_timer_armed = 1; } VT_UNLOCK(vd); @@ -2150,7 +2186,7 @@ vt_allocate(struct vt_driver *drv, void if (vd->vd_flags & VDF_ASYNC) { /* Stop vt_flush periodic task. */ - callout_drain(&vd->vd_timer); + vt_suspend_flush_timer(vd); /* * Mute current terminal until we done. vt_change_font (called * from vt_resize) will unmute it. @@ -2181,7 +2217,7 @@ vt_allocate(struct vt_driver *drv, void /* Allow to put chars now. */ terminal_mute(vd->vd_curwindow->vw_terminal, 0); /* Rerun timer for screen updates. */ - callout_schedule(&vd->vd_timer, hz / VT_TIMERFREQ); + vt_resume_flush_timer(vd, 0); } /* From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 15:59:26 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D8B96237; Thu, 21 Aug 2014 15:59:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C426B368D; Thu, 21 Aug 2014 15:59:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LFxQss041496; Thu, 21 Aug 2014 15:59:26 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LFxQXJ041493; Thu, 21 Aug 2014 15:59:26 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408211559.s7LFxQXJ041493@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 21 Aug 2014 15:59:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270281 - head/sys/fs/autofs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 15:59:27 -0000 Author: trasz Date: Thu Aug 21 15:59:25 2014 New Revision: 270281 URL: http://svnweb.freebsd.org/changeset/base/270281 Log: Fix includes. Suggested by: pluknet@ MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/sys/fs/autofs/autofs.c head/sys/fs/autofs/autofs_vfsops.c head/sys/fs/autofs/autofs_vnops.c Modified: head/sys/fs/autofs/autofs.c ============================================================================== --- head/sys/fs/autofs/autofs.c Thu Aug 21 15:55:18 2014 (r270280) +++ head/sys/fs/autofs/autofs.c Thu Aug 21 15:59:25 2014 (r270281) @@ -80,8 +80,8 @@ #include #include -#include "autofs.h" -#include "autofs_ioctl.h" +#include +#include MALLOC_DEFINE(M_AUTOFS, "autofs", "Automounter filesystem"); Modified: head/sys/fs/autofs/autofs_vfsops.c ============================================================================== --- head/sys/fs/autofs/autofs_vfsops.c Thu Aug 21 15:55:18 2014 (r270280) +++ head/sys/fs/autofs/autofs_vfsops.c Thu Aug 21 15:59:25 2014 (r270281) @@ -42,7 +42,7 @@ #include #include -#include "autofs.h" +#include static const char *autofs_opts[] = { "from", "master_options", "master_prefix", NULL Modified: head/sys/fs/autofs/autofs_vnops.c ============================================================================== --- head/sys/fs/autofs/autofs_vnops.c Thu Aug 21 15:55:18 2014 (r270280) +++ head/sys/fs/autofs/autofs_vnops.c Thu Aug 21 15:59:25 2014 (r270281) @@ -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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 16:08:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 36DF17A7; Thu, 21 Aug 2014 16:08:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0813D378B; Thu, 21 Aug 2014 16:08:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LG8I9a046013; Thu, 21 Aug 2014 16:08:18 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LG8I97046009; Thu, 21 Aug 2014 16:08:18 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408211608.s7LG8I97046009@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 21 Aug 2014 16:08:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270282 - in head/sys: cam/ctl dev/iscsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 16:08:19 -0000 Author: trasz Date: Thu Aug 21 16:08:17 2014 New Revision: 270282 URL: http://svnweb.freebsd.org/changeset/base/270282 Log: Use proper include paths in kernel iSCSI code. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c head/sys/dev/iscsi/icl.c head/sys/dev/iscsi/icl_proxy.c head/sys/dev/iscsi/iscsi.c Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_iscsi.c Thu Aug 21 15:59:25 2014 (r270281) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Thu Aug 21 16:08:17 2014 (r270282) @@ -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: head/sys/dev/iscsi/icl.c ============================================================================== --- head/sys/dev/iscsi/icl.c Thu Aug 21 15:59:25 2014 (r270281) +++ head/sys/dev/iscsi/icl.c Thu Aug 21 16:08:17 2014 (r270282) @@ -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: head/sys/dev/iscsi/icl_proxy.c ============================================================================== --- head/sys/dev/iscsi/icl_proxy.c Thu Aug 21 15:59:25 2014 (r270281) +++ head/sys/dev/iscsi/icl_proxy.c Thu Aug 21 16:08:17 2014 (r270282) @@ -87,7 +87,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include "icl.h" +#include static int debug = 1; Modified: head/sys/dev/iscsi/iscsi.c ============================================================================== --- head/sys/dev/iscsi/iscsi.c Thu Aug 21 15:59:25 2014 (r270281) +++ head/sys/dev/iscsi/iscsi.c Thu Aug 21 16:08:17 2014 (r270282) @@ -59,10 +59,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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 16:13:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39B4FC51; Thu, 21 Aug 2014 16:13:34 +0000 (UTC) Received: from mail-ob0-x234.google.com (mail-ob0-x234.google.com [IPv6:2607:f8b0:4003:c01::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D208F3874; Thu, 21 Aug 2014 16:13:33 +0000 (UTC) Received: by mail-ob0-f180.google.com with SMTP id uy5so7504595obc.25 for ; Thu, 21 Aug 2014 09:13:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=82JSW4UzFH5SvMx0JiKY7CHBcl9O3KIbEW2KpqT+BKs=; b=Ry5m9rtbV/06qAWlmqlWhHqWEg7tRFMWwFbWrTYLME9J9+XuTZOlo7pNBR9CeetjWi B7fjJvpB/vfWE72pMQXTbNiiAKZb0REzo9sp9PiK+pqt7qjqQqMJIrvkGQKRTJ0K4BhE VoEsYIeDiV8NJBDow8dRvpcbv2x/P24LB0OeE45GhNNh9J55n+TfFenKnBOBHn/cTtV4 VzgCCKD97arWcK5mGR7E5xZTQcAIk8Lqxg/KhzMWDP4DChrY4NJq3rVa+ZaXjRuWhwV0 FiTLT+FHqknkvyiBa84Do9JtNIwM/68j/cdEceg7KdR4D/Q+LU50Zl7hMqTESEDGa1oq gfxQ== MIME-Version: 1.0 X-Received: by 10.182.119.230 with SMTP id kx6mr22688187obb.72.1408637613197; Thu, 21 Aug 2014 09:13:33 -0700 (PDT) Received: by 10.182.98.111 with HTTP; Thu, 21 Aug 2014 09:13:33 -0700 (PDT) In-Reply-To: <201408211250.s7LCoBQr054942@svn.freebsd.org> References: <201408211250.s7LCoBQr054942@svn.freebsd.org> Date: Thu, 21 Aug 2014 12:13:33 -0400 Message-ID: Subject: Re: svn commit: r270268 - head/share/man/man4 From: Benjamin Kaduk To: "Bjoern A. Zeeb" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 16:13:34 -0000 On Thu, Aug 21, 2014 at 8:50 AM, Bjoern A. Zeeb wrote: > Author: bz > Date: Thu Aug 21 12:50:11 2014 > New Revision: 270268 > URL: http://svnweb.freebsd.org/changeset/base/270268 > > Log: > Document MAC address selection and setting for atse(4). > > Submitted by: brooks > MFC after: 3 days > Sponsored by: DARPA/AFRL > > Modified: > head/share/man/man4/altera_atse.4 > > Modified: head/share/man/man4/altera_atse.4 > > ============================================================================== > --- head/share/man/man4/altera_atse.4 Thu Aug 21 12:30:01 2014 > (r270267) > +++ head/share/man/man4/altera_atse.4 Thu Aug 21 12:50:11 2014 > (r270268) > +If the stored address is invalid, for example all zero's, multicast, or > the > +default address shipped on all DE4 boards (00:07:ed:ff:ed:15) then a > random > +address is generated when the device is attached. > I think that "all zeros" does not take an apostrophe. Also, the use of commas is slightly unclear, since "for example all zeros" is really a parenthetical, not a member of the comma-separated list. -Ben From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 17:15:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A6A23B6; Thu, 21 Aug 2014 17:15:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA2A53EEA; Thu, 21 Aug 2014 17:15:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LHF9SA078198; Thu, 21 Aug 2014 17:15:09 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LHF9Hj078197; Thu, 21 Aug 2014 17:15:09 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201408211715.s7LHF9Hj078197@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Thu, 21 Aug 2014 17:15:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270283 - head/usr.sbin/bsdconfig/share/packages X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 17:15:10 -0000 Author: dteske Date: Thu Aug 21 17:15:09 2014 New Revision: 270283 URL: http://svnweb.freebsd.org/changeset/base/270283 Log: Add `-A' flag to pkg-install(8) invocation when installing dependencies. MFC after: 3 days X-MFC-to: stable/10, stable/9 Reported by: gjb Discussed with: jelischer, gjb, bdrewery Modified: head/usr.sbin/bsdconfig/share/packages/packages.subr Modified: head/usr.sbin/bsdconfig/share/packages/packages.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/packages/packages.subr Thu Aug 21 16:08:17 2014 (r270282) +++ head/usr.sbin/bsdconfig/share/packages/packages.subr Thu Aug 21 17:15:09 2014 (r270283) @@ -1029,9 +1029,11 @@ f_package_extract() # Request the package be added via pkg-install(8) if f_debugging; then - f_eval_catch $funcname pkg 'pkg -d install -y "%s"' "$name" + f_eval_catch $funcname pkg \ + 'pkg -d install -${depended:+A}y "%s"' "$name" else - f_eval_catch $funcname pkg 'pkg install -y "%s"' "$name" + f_eval_catch $funcname pkg \ + 'pkg install -${depended:+A}y "%s"' "$name" fi if [ $? -ne $SUCCESS ]; then $alert "$msg_pkg_install_apparently_did_not_like_the_package" \ From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 17:16:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7EE24506 for ; Thu, 21 Aug 2014 17:16:56 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5FC253EFF for ; Thu, 21 Aug 2014 17:16:56 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LHGuFA076362 for ; Thu, 21 Aug 2014 17:16:56 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id s7LHGund076360 for svn-src-all@freebsd.org; Thu, 21 Aug 2014 17:16:56 GMT (envelope-from bdrewery) Received: (qmail 68825 invoked from network); 21 Aug 2014 12:16:54 -0500 Received: from unknown (HELO ?10.10.0.24?) (freebsd@shatow.net@10.10.0.24) by sweb.xzibition.com with ESMTPA; 21 Aug 2014 12:16:54 -0500 Message-ID: <53F62981.20006@FreeBSD.org> Date: Thu, 21 Aug 2014 12:16:49 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Devin Teske , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r270283 - head/usr.sbin/bsdconfig/share/packages References: <201408211715.s7LHF9Hj078197@svn.freebsd.org> In-Reply-To: <201408211715.s7LHF9Hj078197@svn.freebsd.org> OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8TjDfnFUmHDkPp2eO8juleJMeLDglSAwE" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 17:16:56 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --8TjDfnFUmHDkPp2eO8juleJMeLDglSAwE Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 8/21/2014 12:15 PM, Devin Teske wrote: > Author: dteske > Date: Thu Aug 21 17:15:09 2014 > New Revision: 270283 > URL: http://svnweb.freebsd.org/changeset/base/270283 >=20 > Log: > Add `-A' flag to pkg-install(8) invocation when installing dependenci= es. Thank you!! > =20 > MFC after: 3 days > X-MFC-to: stable/10, stable/9 > Reported by: gjb > Discussed with: jelischer, gjb, bdrewery >=20 > Modified: > head/usr.sbin/bsdconfig/share/packages/packages.subr >=20 > Modified: head/usr.sbin/bsdconfig/share/packages/packages.subr > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.sbin/bsdconfig/share/packages/packages.subr Thu Aug 21 16:= 08:17 2014 (r270282) > +++ head/usr.sbin/bsdconfig/share/packages/packages.subr Thu Aug 21 17:= 15:09 2014 (r270283) > @@ -1029,9 +1029,11 @@ f_package_extract() > =20 > # Request the package be added via pkg-install(8) > if f_debugging; then > - f_eval_catch $funcname pkg 'pkg -d install -y "%s"' "$name" > + f_eval_catch $funcname pkg \ > + 'pkg -d install -${depended:+A}y "%s"' "$name" > else > - f_eval_catch $funcname pkg 'pkg install -y "%s"' "$name" > + f_eval_catch $funcname pkg \ > + 'pkg install -${depended:+A}y "%s"' "$name" > fi > if [ $? -ne $SUCCESS ]; then > $alert "$msg_pkg_install_apparently_did_not_like_the_package" \ >=20 --=20 Regards, Bryan Drewery --8TjDfnFUmHDkPp2eO8juleJMeLDglSAwE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) iQEcBAEBAgAGBQJT9imBAAoJEDXXcbtuRpfPBywIAJxTVyUggWUqS7BuPjC3JmOP w5kA62usKVZzijDIAOP+6c9f9pS/BaW3WywXvm5m0eQdjBmKZe/eBFVaAB4IgraO 3SvmazwdbJrbRs/s/tPphFokniAvFz9k5h4+TpPu5JAdm1BPH27yfR2eS8K8TmMo GdCo6AEuYhw5I5JyLZ3s/zTR/OJdWDxZluH/s0FO7Q/r0vuVwhXgcMXYeYIBk51d lQEhMDoQPN+f/vS0IuL6UnxYBn1+TJVlNlfdxh5OaXZMlQBRw5Wsf6nZxeon+US8 d9z6MJuCsU8XISa2j/rDOyUFUd6Did/O/MD5GJ/7mJIsO5lam85nz7IYrk5JZMc= =whvw -----END PGP SIGNATURE----- --8TjDfnFUmHDkPp2eO8juleJMeLDglSAwE-- From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 17:18:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D069F665; Thu, 21 Aug 2014 17:18:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7FA03F13; Thu, 21 Aug 2014 17:18:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LHIMhw078636; Thu, 21 Aug 2014 17:18:22 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LHIMfa078631; Thu, 21 Aug 2014 17:18:22 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201408211718.s7LHIMfa078631@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 21 Aug 2014 17:18:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org 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... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 17:18:22 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 17:23:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E987A9E; Thu, 21 Aug 2014 17:23:57 +0000 (UTC) Received: from shxd.cx (unknown [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 67D183FDF; Thu, 21 Aug 2014 17:23:57 +0000 (UTC) Received: from 50-196-156-133-static.hfc.comcastbusiness.net ([50.196.156.133]:60372 helo=THEMADHATTER) by shxd.cx with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1XKFPr-000NA1-Kq; Wed, 20 Aug 2014 16:35:43 -0700 From: To: "'Bryan Drewery'" , "'Devin Teske'" , , , References: <201408211715.s7LHF9Hj078197@svn.freebsd.org> <53F62981.20006@FreeBSD.org> In-Reply-To: <53F62981.20006@FreeBSD.org> Subject: RE: svn commit: r270283 - head/usr.sbin/bsdconfig/share/packages Date: Thu, 21 Aug 2014 10:23:24 -0700 Message-ID: <113901cfbd64$9d10b1d0$d7321570$@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQKD3ufN/Qslxscxpi38uiau2j9/MgG6sA2CmmU1slA= Content-Language: en-us Sender: devin@shxd.cx X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 17:23:57 -0000 > -----Original Message----- > From: owner-src-committers@freebsd.org [mailto:owner-src- > committers@freebsd.org] On Behalf Of Bryan Drewery > Sent: Thursday, August 21, 2014 10:17 AM > To: Devin Teske; src-committers@freebsd.org; svn-src-all@freebsd.org; = svn- > src-head@freebsd.org > Subject: Re: svn commit: r270283 - = head/usr.sbin/bsdconfig/share/packages >=20 > On 8/21/2014 12:15 PM, Devin Teske wrote: > > Author: dteske > > Date: Thu Aug 21 17:15:09 2014 > > New Revision: 270283 > > URL: http://svnweb.freebsd.org/changeset/base/270283 > > > > Log: > > Add `-A' flag to pkg-install(8) invocation when installing = dependencies. >=20 > Thank you!! >=20 To my recollection, nobody brought this to my attention before = yesterday. --=20 Devin From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 17:32:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 83552E5A; Thu, 21 Aug 2014 17:32:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D7F330B9; Thu, 21 Aug 2014 17:32:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LHWd77087223; Thu, 21 Aug 2014 17:32:39 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LHWdcZ087221; Thu, 21 Aug 2014 17:32:39 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201408211732.s7LHWdcZ087221@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 21 Aug 2014 17:32:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270285 - in stable/10: etc/mtree lib/libmp lib/libmp/tests tools/regression/lib/libmp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 17:32:39 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 17:36:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE45E144; Thu, 21 Aug 2014 17:36:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7C7830F0; Thu, 21 Aug 2014 17:36:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LHag5l087825; Thu, 21 Aug 2014 17:36:42 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LHagXk087824; Thu, 21 Aug 2014 17:36:42 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201408211736.s7LHagXk087824@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 21 Aug 2014 17:36:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270286 - stable/10/lib/atf/libatf-c++ X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 17:36:43 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 17:39:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 05E7E56A for ; Thu, 21 Aug 2014 17:39:41 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA69A3142 for ; Thu, 21 Aug 2014 17:39:40 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LHdeeX082378 for ; Thu, 21 Aug 2014 17:39:40 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id s7LHdeuF082371 for svn-src-all@freebsd.org; Thu, 21 Aug 2014 17:39:40 GMT (envelope-from bdrewery) Received: (qmail 7209 invoked from network); 21 Aug 2014 12:39:38 -0500 Received: from unknown (HELO ?10.10.0.24?) (freebsd@shatow.net@10.10.0.24) by sweb.xzibition.com with ESMTPA; 21 Aug 2014 12:39:38 -0500 Message-ID: <53F62ED5.7050206@FreeBSD.org> Date: Thu, 21 Aug 2014 12:39:33 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: dteske@FreeBSD.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r270283 - head/usr.sbin/bsdconfig/share/packages References: <201408211715.s7LHF9Hj078197@svn.freebsd.org> <53F62981.20006@FreeBSD.org> <113901cfbd64$9d10b1d0$d7321570$@FreeBSD.org> In-Reply-To: <113901cfbd64$9d10b1d0$d7321570$@FreeBSD.org> OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TqPjJV2TVGwdhfwAcHkwa9AVxiNHvarVW" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 17:39:41 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --TqPjJV2TVGwdhfwAcHkwa9AVxiNHvarVW Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 8/21/2014 12:23 PM, dteske@FreeBSD.org wrote: >=20 >=20 >> -----Original Message----- >> From: owner-src-committers@freebsd.org [mailto:owner-src- >> committers@freebsd.org] On Behalf Of Bryan Drewery >> Sent: Thursday, August 21, 2014 10:17 AM >> To: Devin Teske; src-committers@freebsd.org; svn-src-all@freebsd.org; = svn- >> src-head@freebsd.org >> Subject: Re: svn commit: r270283 - head/usr.sbin/bsdconfig/share/packa= ges >> >> On 8/21/2014 12:15 PM, Devin Teske wrote: >>> Author: dteske >>> Date: Thu Aug 21 17:15:09 2014 >>> New Revision: 270283 >>> URL: http://svnweb.freebsd.org/changeset/base/270283 >>> >>> Log: >>> Add `-A' flag to pkg-install(8) invocation when installing dependen= cies. >> >> Thank you!! >> >=20 > To my recollection, nobody brought this to my attention before yesterda= y. >=20 That's fine. I'm hoping we can communicate on mutual needs more going forward. I admit I have not used bsdinstall/bsdconfig much yet as my own systems are either HEAD or upgraded from a src tree. I haven't yet had a need to use the installer. So I am not familiar with all of the details. I'll have to trust your judgement on it, but keep in mind I may not understand what you're referring to or where you're coming from on it. I don't want to speak for bapt but he may be in the same position. Thinking outloud... I would love to see the installer allow the user select which repository they want to use. Consider this in a general sense as I still am considering building a WITHOUT_X11 repository for server uses. If that works out (some people think it will have too many problems) then it would be cool if the installer allowed picking between desktop/server repository. A stable repository (like debian does) bound to a release would be great too, but won't be happening soon. More support and planning needs to happen first. As for pkg pulling in the latest, we could probably put a question in the bootstrap to ask the user which repository they would like to use. That would cover other cases as well, and give a way for the installer to skip the question if it already has an answer from the GUI. As for the server selection (I haven't used it), if it's a sub-menu (and not forced part of the installation) then it seems fine to me. If the user is just selecting which server to use pkg.FreeBSD.org vs my.internalhost. My concern was if it was forcing the user to select which *mirror* to use, which we should let the geodns handle in most cases. Again, if it's an optional sub-menu for that then it is probably fine so long as it has a warning that it is less supported than using the main hostname of pkg.FreeBSD.org. Having said all of that, I did just go look in bsdconfig and it seems perfectly fine how it is now. Allowing to pick the default or select your own is perfect. So I misunderstood what you were talking about with selecting a server. --=20 Regards, Bryan Drewery --TqPjJV2TVGwdhfwAcHkwa9AVxiNHvarVW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) iQEcBAEBAgAGBQJT9i7VAAoJEDXXcbtuRpfP7BwIALWB7ptBcK1cG4ImVsp9p+/d Ff8E5F6xbWOqwXiUEoKd+ZFxdD+jV4c2ZEWokT2ExvJLcpERVvguYtCevrfr4TSj t0ggjhpnnz8dTgrbUdmHpu71xW87WRxRD0uFWSmAMldl4l+U+atychOz7HWPuK4B sgxjmH3FuULO6dSl4UQEXF1b85Xvnd+WIJPUg54pmSteSzEkssKf13/Yibo3dUKq v41LSa+8bHT0DyZTv0qV+Lha9G84Q1Ko8oGbM/ICMIzaeQL6znUT8f0ChyBWKbvw js3EOBNS3Z5wHpYnrkOMOd8POPrNtiukbdxtgryAI4cH3RIB3tYsT/E4f7ifmbg= =+o19 -----END PGP SIGNATURE----- --TqPjJV2TVGwdhfwAcHkwa9AVxiNHvarVW-- From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 17:42:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F7DC6F1; Thu, 21 Aug 2014 17:42:29 +0000 (UTC) Received: from mail-pa0-x236.google.com (mail-pa0-x236.google.com [IPv6:2607:f8b0:400e:c03::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3EABD3212; Thu, 21 Aug 2014 17:42:29 +0000 (UTC) Received: by mail-pa0-f54.google.com with SMTP id fa1so14921091pad.13 for ; Thu, 21 Aug 2014 10:42:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=E0jQtpcmWzJB36Yj9O+b0GZYzf99R3WcD6KNIIaYUjA=; b=OGkCO95t1W/+igcd1w9hPqG6OmIfbpptysI17FoMI46FuCs0OhhAnzlkqpB8gAACzB BhBX434EGHHttzqthP/u75Lu29u+xM8NDBJUQcprFfgTUQbRkAcG2TOMou3mlU/7Xd+3 3/kXt47vWIx8kSvKwiIfSPLyOxwIOL3TaxH/rPXXI2sbKTDYiFAqWoi4O+p3ToVqBuQA kVwGFbPO/zIQ2Lc/ZwN6od9ewz6ZH9L3UTpWgVnOH4rgrcMDFJdcPVqN6wJFvTIHT5Cc 2mAORykyEdcskHzS4GxN9GmConr243KRH5RNoR5B9CIFNtwpLw5vwXHMbMygSDvn8S4G yriw== X-Received: by 10.70.37.67 with SMTP id w3mr65474737pdj.107.1408642948801; Thu, 21 Aug 2014 10:42:28 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:f49d:171c:46ef:4371? ([2601:8:ab80:7d6:f49d:171c:46ef:4371]) by mx.google.com with ESMTPSA id pi7sm25497280pdb.57.2014.08.21.10.42.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 21 Aug 2014 10:42:28 -0700 (PDT) Content-Type: multipart/signed; boundary="Apple-Mail=_CE8BEE43-7216-4787-99A1-4E4B8B7C0D11"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r269603 - in head: etc/mtree lib/libnv lib/libnv/tests tools/regression/lib/libnv From: yaneurabeya@gmail.com In-Reply-To: Date: Thu, 21 Aug 2014 10:42:26 -0700 Message-Id: <0F9E783C-3FB5-4C8A-B1C1-1C1140D3A368@gmail.com> References: <53e12558.5d33.563f584f@svn.freebsd.org> To: Garrett Cooper X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 17:42:29 -0000 --Apple-Mail=_CE8BEE43-7216-4787-99A1-4E4B8B7C0D11 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Aug 5, 2014, at 3:06 PM, Garrett Cooper = wrote: > On Aug 5, 2014, at 11:41 AM, Garrett Cooper wrote: >=20 >> Author: ngie >> Date: Tue Aug 5 18:41:27 2014 >> New Revision: 269603 >> URL: http://svnweb.freebsd.org/changeset/base/269603 >>=20 >> Log: >> Integrate lib/libnv into the build/kyua >>=20 >> Rename all of the TAP test applications from to _test >> to match the convention described in the TestSuite wiki page >>=20 >> Phabric: D538 >> Approved by: jmmv (mentor) >> Sponsored by: EMC / Isilon Storage Division >=20 > I forgot to mention=85 >=20 > MFC after: 2 weeks Didn=92t realize that lib/libnv hasn=92t been MFCed to = stable/10, so this note=92s kind of moot right now :). Thanks! -Garrett --Apple-Mail=_CE8BEE43-7216-4787-99A1-4E4B8B7C0D11 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJT9i+CAAoJEMZr5QU6S73ejPEH/1pMGtLp7zcQbbTiv6jdFqOz ZCLOpcp6h4GdVO9OQfD7lp6lPuofLYnboly/2soH4mz1h5dMLeOPPi16zczo0zkc hjRJXBWjffqpXt23xwE5HRMmO7lZTDUT5X1XZCJWkmWJppvSULlAQsF7wRk7I2SB Ekpo4Or3sRzQYjfWrJSwxjhC5pihPJ650bSyQk9/wIGUOuEv3vDNYFN6jmPLuveM YkucpzfKbW7uk0eGfZ4Vv9waourmzm/vlheak/DSlxhvpzilMUvCYkp7+pOHApH+ mxuxR16+Og1XaM7UutfLSjrlnvDlM152FfkX7U0WT4KpzcJG5owWg5hgHoM4qFA= =/FWG -----END PGP SIGNATURE----- --Apple-Mail=_CE8BEE43-7216-4787-99A1-4E4B8B7C0D11-- From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 17:48:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D4676BAE for ; Thu, 21 Aug 2014 17:48:14 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9874F3288 for ; Thu, 21 Aug 2014 17:48:14 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LHmEF1085714 for ; Thu, 21 Aug 2014 17:48:14 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id s7LHmECa085705 for svn-src-all@freebsd.org; Thu, 21 Aug 2014 17:48:14 GMT (envelope-from bdrewery) Received: (qmail 97074 invoked from network); 21 Aug 2014 12:48:12 -0500 Received: from unknown (HELO ?10.10.0.24?) (freebsd@shatow.net@10.10.0.24) by sweb.xzibition.com with ESMTPA; 21 Aug 2014 12:48:12 -0500 Message-ID: <53F630D7.6010808@FreeBSD.org> Date: Thu, 21 Aug 2014 12:48:07 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: yaneurabeya@gmail.com, Garrett Cooper Subject: Re: svn commit: r269603 - in head: etc/mtree lib/libnv lib/libnv/tests tools/regression/lib/libnv References: <53e12558.5d33.563f584f@svn.freebsd.org> <0F9E783C-3FB5-4C8A-B1C1-1C1140D3A368@gmail.com> In-Reply-To: <0F9E783C-3FB5-4C8A-B1C1-1C1140D3A368@gmail.com> OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vBuiso1h0gOsNH7IW1HQ4wav7xPCCXjau" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Pawel Jakub Dawidek X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 17:48:14 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --vBuiso1h0gOsNH7IW1HQ4wav7xPCCXjau Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 8/21/2014 12:42 PM, yaneurabeya@gmail.com wrote: > On Aug 5, 2014, at 3:06 PM, Garrett Cooper wrot= e: >=20 >> On Aug 5, 2014, at 11:41 AM, Garrett Cooper wrote: >> >>> Author: ngie >>> Date: Tue Aug 5 18:41:27 2014 >>> New Revision: 269603 >>> URL: http://svnweb.freebsd.org/changeset/base/269603 >>> >>> Log: >>> Integrate lib/libnv into the build/kyua >>> >>> Rename all of the TAP test applications from to _test >>> to match the convention described in the TestSuite wiki page >>> >>> Phabric: D538 >>> Approved by: jmmv (mentor) >>> Sponsored by: EMC / Isilon Storage Division >> >> I forgot to mention=85 >> >> MFC after: 2 weeks >=20 > Didn=92t realize that lib/libnv hasn=92t been MFCed to stable/10, so t= his note=92s kind of moot right now :). > Thanks! > -Garrett >=20 If I remember right, pjd@ did tell me he planned to MFC it to 10.1. Not sure if he still will. --=20 Regards, Bryan Drewery --vBuiso1h0gOsNH7IW1HQ4wav7xPCCXjau Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) iQEcBAEBAgAGBQJT9jDXAAoJEDXXcbtuRpfPQNoH/iUeLtGm1qwaKuDvoshU7br8 ImNeIj8iu86dz5WemxG4xuHgg09thzDyWWVLCgy0ziVcPOh2talSwKUqGeEinqRS JuOb/yIth5ANdlurWtyNI4xmZhA5/pSYtqs5Whfi3gAQqN1NBSG0thGABnxKNlv9 t+LrlidGjNInJYp0gAf8mDYty/mWg6egHRr4voqeqAZNKCgdyMEUlq6yrwS5+U8W vSvdS2Btk46rgqgqrLS+cBES1XGuZ7Cl0Td4LkjqLcjPLqg514Grr2zSVZxC6jFO 5hTGPkbEdbVlVbhXjMK5TpQgA1sUWE+3kVeoukruXhGGTkFJLHH15hOt1Yj91aM= =geVe -----END PGP SIGNATURE----- --vBuiso1h0gOsNH7IW1HQ4wav7xPCCXjau-- From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 17:54:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 922A8FD2; Thu, 21 Aug 2014 17:54:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 71A27338E; Thu, 21 Aug 2014 17:54:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LHsh6w096512; Thu, 21 Aug 2014 17:54:43 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LHsgJE096509; Thu, 21 Aug 2014 17:54:43 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201408211754.s7LHsgJE096509@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Thu, 21 Aug 2014 17:54:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270287 - in head: sbin/ifconfig sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 17:54:43 -0000 Author: melifaro Date: Thu Aug 21 17:54:42 2014 New Revision: 270287 URL: http://svnweb.freebsd.org/changeset/base/270287 Log: * Add new net/sff8436.h containing constants used to access QSFP+ data via i2c inteface. These constants has been taken from SFF-8436 "QSFP+ 10 Gbs 4X PLUGGABLE TRANSCEIVER" standard rev 4.8. * Add support for printing QSFP+ information from 40G NICs such as Chelsio T5. This commit does not contain ioctl changes necessary for this functionality work, there will be another commit soon. Example: cxl1: flags=8843 metric 0 mtu 1500 options=ec07bb ether 00:07:43:28:ad:08 nd6 options=29 media: Ethernet 40Gbase-LR4 status: active plugged: QSFP+ 40GBASE-LR4 (MPO Parallel Optic) vendor: OEM PN: OP-QSFP-40G-LR4 SN: 20140318001 DATE: 2014-03-18 module temperature: 64.06 C voltage: 3.26 Volts lane 1: RX: 0.47 mW (-3.21 dBm) TX: 2.78 mW (4.46 dBm) lane 2: RX: 0.20 mW (-6.94 dBm) TX: 2.80 mW (4.47 dBm) lane 3: RX: 0.18 mW (-7.38 dBm) TX: 2.79 mW (4.47 dBm) lane 4: RX: 0.90 mW (-0.45 dBm) TX: 2.80 mW (4.48 dBm) Tested on: Chelsio T5 Tested on: Mellanox/Huawei passive/active cables/transceivers. MFC after: 2 weeks Sponsored by: Yandex LLC Added: head/sys/net/sff8436.h (contents, props changed) Modified: head/sbin/ifconfig/sfp.c head/sys/net/sff8472.h Modified: head/sbin/ifconfig/sfp.c ============================================================================== --- head/sbin/ifconfig/sfp.c Thu Aug 21 17:36:42 2014 (r270286) +++ head/sbin/ifconfig/sfp.c Thu Aug 21 17:54:42 2014 (r270287) @@ -34,11 +34,13 @@ static const char rcsid[] = #include #include +#include #include #include #include #include +#include #include #include #include @@ -53,11 +55,16 @@ typedef int (read_i2c)(struct i2c_info * struct i2c_info { int s; int error; + int bshift; + int qsfp; + int do_diag; struct ifreq *ifr; read_i2c *f; - uint8_t diag_type; char *textbuf; size_t bufsize; + int cfd; + int port_id; + int chip_id; }; struct _nv { @@ -86,11 +93,12 @@ static struct _nv conn[] = { { 0x20, "HSSDC II" }, { 0x21, "Copper pigtail" }, { 0x22, "RJ45" }, + { 0x23, "No separate connector" }, /* SFF-8436 */ { 0, NULL } }; /* SFF-8472 Rev. 11.4 table 3.5: Transceiver codes */ -/* 10G Ethernet compliance codes, byte 3 */ +/* 10G Ethernet/IB compliance codes, byte 3 */ static struct _nv eth_10g[] = { { 0x80, "10G Base-ER" }, { 0x40, "10G Base-LRM" }, @@ -165,6 +173,21 @@ static struct _nv fc_speed[] = { { 0, NULL } }; +/* SFF-8436 Rev. 4.8 table 33: Specification compliance */ + +/* 10/40G Ethernet compliance codes, byte 128 + 3 */ +static struct _nv eth_1040g[] = { + { 0x80, "Reserved" }, + { 0x40, "10GBASE-LRM" }, + { 0x20, "10GBASE-LR" }, + { 0x10, "10GBASE-SR" }, + { 0x08, "40GBASE-CR4" }, + { 0x04, "40GBASE-SR4" }, + { 0x02, "40GBASE-LR4" }, + { 0x01, "40G Active Cable" }, + { 0, NULL } +}; + const char * find_value(struct _nv *x, int value) { @@ -194,18 +217,15 @@ find_zero_bit(struct _nv *x, int value, } static void -get_sfp_identifier(struct i2c_info *ii, char *buf, size_t size) +convert_sff_identifier(char *buf, size_t size, uint8_t value) { const char *x; - uint8_t data; - - ii->f(ii, SFF_8472_BASE, SFF_8472_ID, 1, (caddr_t)&data); x = NULL; - if (data <= SFF_8472_ID_LAST) - x = sff_8472_id[data]; + if (value <= SFF_8024_ID_LAST) + x = sff_8024_id[value]; else { - if (data > 0x80) + if (value > 0x80) x = "Vendor specific"; else x = "Reserved"; @@ -215,17 +235,14 @@ get_sfp_identifier(struct i2c_info *ii, } static void -get_sfp_connector(struct i2c_info *ii, char *buf, size_t size) +convert_sff_connector(char *buf, size_t size, uint8_t value) { const char *x; - uint8_t data; - ii->f(ii, SFF_8472_BASE, SFF_8472_CONNECTOR, 1, (caddr_t)&data); - - if ((x = find_value(conn, data)) == NULL) { - if (data >= 0x0D && data <= 0x1F) + if ((x = find_value(conn, value)) == NULL) { + if (value >= 0x0D && value <= 0x1F) x = "Unallocated"; - else if (data >= 0x23 && data <= 0x7F) + else if (value >= 0x24 && value <= 0x7F) x = "Unallocated"; else x = "Vendor specific"; @@ -235,6 +252,42 @@ get_sfp_connector(struct i2c_info *ii, c } static void +get_sfp_identifier(struct i2c_info *ii, char *buf, size_t size) +{ + uint8_t data; + + ii->f(ii, SFF_8472_BASE, SFF_8472_ID, 1, (caddr_t)&data); + convert_sff_identifier(buf, size, data); +} + +static void +get_sfp_connector(struct i2c_info *ii, char *buf, size_t size) +{ + uint8_t data; + + ii->f(ii, SFF_8472_BASE, SFF_8472_CONNECTOR, 1, (caddr_t)&data); + convert_sff_connector(buf, size, data); +} + +static void +get_qsfp_identifier(struct i2c_info *ii, char *buf, size_t size) +{ + uint8_t data; + + ii->f(ii, SFF_8436_BASE, SFF_8436_ID, 1, (caddr_t)&data); + convert_sff_identifier(buf, size, data); +} + +static void +get_qsfp_connector(struct i2c_info *ii, char *buf, size_t size) +{ + uint8_t data; + + ii->f(ii, SFF_8436_BASE, SFF_8436_CONNECTOR, 1, (caddr_t)&data); + convert_sff_connector(buf, size, data); +} + +static void printf_sfp_transceiver_descr(struct i2c_info *ii, char *buf, size_t size) { char xbuf[12]; @@ -290,49 +343,72 @@ get_sfp_transceiver_class(struct i2c_inf snprintf(buf, size, "%s", tech_class); } +static void +get_qsfp_transceiver_class(struct i2c_info *ii, char *buf, size_t size) +{ + const char *tech_class; + uint8_t code; + + /* Check 10/40G Ethernet class only */ + ii->f(ii, SFF_8436_BASE, SFF_8436_CODE_E1040G, 1, (caddr_t)&code); + tech_class = find_zero_bit(eth_1040g, code, 1); + if (tech_class == NULL) + tech_class = "Unknown"; + + snprintf(buf, size, "%s", tech_class); +} +/* + * Print SFF-8472/SFF-8436 string to supplied buffer. + * All (vendor-specific) strings are padded right with '0x20'. + */ static void -get_sfp_vendor_name(struct i2c_info *ii, char *buf, size_t size) +convert_sff_name(char *buf, size_t size, char *xbuf) { - char xbuf[17], *p; + char *p; - memset(xbuf, 0, sizeof(xbuf)); - /* ASCII String, right-padded with 0x20 */ - ii->f(ii, SFF_8472_BASE, SFF_8472_VENDOR_START, 16, xbuf); for (p = &xbuf[16]; *(p - 1) == 0x20; p--) ; *p = '\0'; - snprintf(buf, size, "%s", xbuf); } static void +convert_sff_date(char *buf, size_t size, char *xbuf) +{ + + snprintf(buf, size, "20%c%c-%c%c-%c%c", xbuf[0], xbuf[1], + xbuf[2], xbuf[3], xbuf[4], xbuf[5]); +} + +static void +get_sfp_vendor_name(struct i2c_info *ii, char *buf, size_t size) +{ + char xbuf[17]; + + memset(xbuf, 0, sizeof(xbuf)); + ii->f(ii, SFF_8472_BASE, SFF_8472_VENDOR_START, 16, xbuf); + convert_sff_name(buf, size, xbuf); +} + +static void get_sfp_vendor_pn(struct i2c_info *ii, char *buf, size_t size) { - char xbuf[17], *p; + char xbuf[17]; memset(xbuf, 0, sizeof(xbuf)); - /* ASCII String, right-padded with 0x20 */ ii->f(ii, SFF_8472_BASE, SFF_8472_PN_START, 16, xbuf); - for (p = &xbuf[16]; *(p - 1) == 0x20; p--) - ; - *p = '\0'; - - snprintf(buf, size, "%s", xbuf); + convert_sff_name(buf, size, xbuf); } static void get_sfp_vendor_sn(struct i2c_info *ii, char *buf, size_t size) { - char xbuf[17], *p; + char xbuf[17]; memset(xbuf, 0, sizeof(xbuf)); - /* ASCII String, right-padded with 0x20 */ ii->f(ii, SFF_8472_BASE, SFF_8472_SN_START, 16, xbuf); - for (p = &xbuf[16]; *(p - 1) == 0x20; p--) - ; - *p = '\0'; - snprintf(buf, size, "%s", xbuf); + convert_sff_name(buf, size, xbuf); } static void @@ -343,8 +419,47 @@ get_sfp_vendor_date(struct i2c_info *ii, memset(xbuf, 0, sizeof(xbuf)); /* Date code, see Table 3.8 for description */ ii->f(ii, SFF_8472_BASE, SFF_8472_DATE_START, 6, xbuf); - snprintf(buf, size, "20%c%c-%c%c-%c%c", xbuf[0], xbuf[1], - xbuf[2], xbuf[3], xbuf[4], xbuf[5]); + convert_sff_date(buf, size, xbuf); +} + +static void +get_qsfp_vendor_name(struct i2c_info *ii, char *buf, size_t size) +{ + char xbuf[17]; + + memset(xbuf, 0, sizeof(xbuf)); + ii->f(ii, SFF_8436_BASE, SFF_8436_VENDOR_START, 16, xbuf); + convert_sff_name(buf, size, xbuf); +} + +static void +get_qsfp_vendor_pn(struct i2c_info *ii, char *buf, size_t size) +{ + char xbuf[17]; + + memset(xbuf, 0, sizeof(xbuf)); + ii->f(ii, SFF_8436_BASE, SFF_8436_PN_START, 16, xbuf); + convert_sff_name(buf, size, xbuf); +} + +static void +get_qsfp_vendor_sn(struct i2c_info *ii, char *buf, size_t size) +{ + char xbuf[17]; + + memset(xbuf, 0, sizeof(xbuf)); + ii->f(ii, SFF_8436_BASE, SFF_8436_SN_START, 16, xbuf); + convert_sff_name(buf, size, xbuf); +} + +static void +get_qsfp_vendor_date(struct i2c_info *ii, char *buf, size_t size) +{ + char xbuf[6]; + + memset(xbuf, 0, sizeof(xbuf)); + ii->f(ii, SFF_8436_BASE, SFF_8436_DATE_START, 6, xbuf); + convert_sff_date(buf, size, xbuf); } static void @@ -353,33 +468,54 @@ print_sfp_vendor(struct i2c_info *ii, ch char xbuf[80]; memset(xbuf, 0, sizeof(xbuf)); - get_sfp_vendor_name(ii, xbuf, 20); - get_sfp_vendor_pn(ii, &xbuf[20], 20); - get_sfp_vendor_sn(ii, &xbuf[40], 20); - get_sfp_vendor_date(ii, &xbuf[60], 20); + if (ii->qsfp != 0) { + get_qsfp_vendor_name(ii, xbuf, 20); + get_qsfp_vendor_pn(ii, &xbuf[20], 20); + get_qsfp_vendor_sn(ii, &xbuf[40], 20); + get_qsfp_vendor_date(ii, &xbuf[60], 20); + } else { + get_sfp_vendor_name(ii, xbuf, 20); + get_sfp_vendor_pn(ii, &xbuf[20], 20); + get_sfp_vendor_sn(ii, &xbuf[40], 20); + get_sfp_vendor_date(ii, &xbuf[60], 20); + } snprintf(buf, size, "vendor: %s PN: %s SN: %s DATE: %s", xbuf, &xbuf[20], &xbuf[40], &xbuf[60]); } +/* + * Converts internal templerature (SFF-8472, SFF-8436) + * 16-bit unsigned value to human-readable representation: + * + * Internally measured Module temperature are represented + * as a 16-bit signed twos complement value in increments of + * 1/256 degrees Celsius, yielding a total range of –128C to +128C + * that is considered valid between –40 and +125C. + * + */ static void -get_sfp_temp(struct i2c_info *ii, char *buf, size_t size) +convert_sff_temp(char *buf, size_t size, char *xbuf) { - char xbuf[2]; + double d; - int8_t major; - uint8_t minor; - int k; + d = (double)(int8_t)xbuf[0]; + d += (double)(uint8_t)xbuf[1] / 256; - memset(xbuf, 0, sizeof(xbuf)); - ii->f(ii, SFF_8472_DIAG, SFF_8472_TEMP, 2, xbuf); + snprintf(buf, size, "%.2f C", d); +} - /* Convert temperature to string according to table 3.13 */ - major = (int8_t)xbuf[0]; - minor = (uint8_t)buf[1]; - k = minor * 1000 / 256; +/* + * Retrieves supplied voltage (SFF-8472, SFF-8436). + * 16-bit usigned value, treated as range 0..+6.55 Volts + */ +static void +convert_sff_voltage(char *buf, size_t size, char *xbuf) +{ + double d; - snprintf(buf, size, "%d.%d C", major, k / 100); + d = (double)(((uint8_t)xbuf[0] << 8) | (uint8_t)xbuf[1]); + snprintf(buf, size, "%.2f Volts", d / 10000); } /* @@ -387,7 +523,7 @@ get_sfp_temp(struct i2c_info *ii, char * * human representation. */ static void -convert_power(struct i2c_info *ii, char *xbuf, char *buf, size_t size) +convert_sff_power(struct i2c_info *ii, char *buf, size_t size, char *xbuf) { uint16_t mW; double dbm; @@ -397,11 +533,55 @@ convert_power(struct i2c_info *ii, char /* Convert mw to dbm */ dbm = 10.0 * log10(1.0 * mW / 10000); + /* + * Assume internally-calibrated data. + * This is always true for SFF-8346, and explicitly + * checked for SFF-8472. + */ + /* Table 3.9, bit 5 is set, internally calibrated */ - if ((ii->diag_type & 0x20) != 0) { - snprintf(buf, size, "%d.%02d mW (%.2f dBm)", - mW / 10000, (mW % 10000) / 100, dbm); - } + snprintf(buf, size, "%d.%02d mW (%.2f dBm)", + mW / 10000, (mW % 10000) / 100, dbm); +} + +static void +get_sfp_temp(struct i2c_info *ii, char *buf, size_t size) +{ + char xbuf[2]; + + memset(xbuf, 0, sizeof(xbuf)); + ii->f(ii, SFF_8472_DIAG, SFF_8472_TEMP, 2, xbuf); + convert_sff_temp(buf, size, xbuf); +} + +static void +get_sfp_voltage(struct i2c_info *ii, char *buf, size_t size) +{ + char xbuf[2]; + + memset(xbuf, 0, sizeof(xbuf)); + ii->f(ii, SFF_8472_DIAG, SFF_8472_VCC, 2, xbuf); + convert_sff_voltage(buf, size, xbuf); +} + +static void +get_qsfp_temp(struct i2c_info *ii, char *buf, size_t size) +{ + char xbuf[2]; + + memset(xbuf, 0, sizeof(xbuf)); + ii->f(ii, SFF_8436_BASE, SFF_8436_TEMP, 2, xbuf); + convert_sff_temp(buf, size, xbuf); +} + +static void +get_qsfp_voltage(struct i2c_info *ii, char *buf, size_t size) +{ + char xbuf[2]; + + memset(xbuf, 0, sizeof(xbuf)); + ii->f(ii, SFF_8436_BASE, SFF_8436_VCC, 2, xbuf); + convert_sff_voltage(buf, size, xbuf); } static void @@ -411,7 +591,7 @@ get_sfp_rx_power(struct i2c_info *ii, ch memset(xbuf, 0, sizeof(xbuf)); ii->f(ii, SFF_8472_DIAG, SFF_8472_RX_POWER, 2, xbuf); - convert_power(ii, xbuf, buf, size); + convert_sff_power(ii, buf, size, xbuf); } static void @@ -421,7 +601,27 @@ get_sfp_tx_power(struct i2c_info *ii, ch memset(xbuf, 0, sizeof(xbuf)); ii->f(ii, SFF_8472_DIAG, SFF_8472_TX_POWER, 2, xbuf); - convert_power(ii, xbuf, buf, size); + convert_sff_power(ii, buf, size, xbuf); +} + +static void +get_qsfp_rx_power(struct i2c_info *ii, char *buf, size_t size, int chan) +{ + char xbuf[2]; + + memset(xbuf, 0, sizeof(xbuf)); + ii->f(ii, SFF_8436_BASE, SFF_8436_RX_CH1_MSB + (chan - 1) * 2, 2, xbuf); + convert_sff_power(ii, buf, size, xbuf); +} + +static void +get_qsfp_tx_power(struct i2c_info *ii, char *buf, size_t size, int chan) +{ + char xbuf[2]; + + memset(xbuf, 0, sizeof(xbuf)); + ii->f(ii, SFF_8436_BASE, SFF_8436_TX_CH1_MSB + (chan -1) * 2, 2, xbuf); + convert_sff_power(ii, buf, size, xbuf); } /* Intel ixgbe-specific structures and handlers */ @@ -463,50 +663,127 @@ read_i2c_ixgbe(struct i2c_info *ii, uint return (0); } -void -sfp_status(int s, struct ifreq *ifr, int verbose) +/* Generic handler */ +static int +read_i2c_generic(struct i2c_info *ii, uint8_t addr, uint8_t off, uint8_t len, + caddr_t buf) +{ + + ii->error = EINVAL; + return (-1); +} + +static void +print_qsfp_status(struct i2c_info *ii, int verbose) { - struct i2c_info ii; char buf[80], buf2[40], buf3[40]; + uint8_t diag_type; + int i; + + /* Read diagnostic monitoring type */ + ii->f(ii, SFF_8436_BASE, SFF_8436_DIAG_TYPE, 1, (caddr_t)&diag_type); + if (ii->error != 0) + return; /* - * Check if we have i2c support for particular driver. - * TODO: Determine driver by original name. + * Read monitoring data it is supplied. + * XXX: It is not exactly clear from standard + * how one can specify lack of measurements (passive cables case). */ - memset(&ii, 0, sizeof(ii)); - if (strncmp(ifr->ifr_name, "ix", 2) == 0) { - ii.f = read_i2c_ixgbe; - } else - return; + if (diag_type != 0) + ii->do_diag = 1; + ii->qsfp = 1; - /* Prepare necessary into to pass to NIC handler */ - ii.s = s; - ii.ifr = ifr; + /* Transceiver type */ + get_qsfp_identifier(ii, buf, sizeof(buf)); + get_qsfp_transceiver_class(ii, buf2, sizeof(buf2)); + get_qsfp_connector(ii, buf3, sizeof(buf3)); + if (ii->error == 0) + printf("\tplugged: %s %s (%s)\n", buf, buf2, buf3); + print_sfp_vendor(ii, buf, sizeof(buf)); + if (ii->error == 0) + printf("\t%s\n", buf); + + /* Request current measurements if they are provided: */ + if (ii->do_diag != 0) { + get_qsfp_temp(ii, buf, sizeof(buf)); + get_qsfp_voltage(ii, buf2, sizeof(buf2)); + printf("\tmodule temperature: %s voltage: %s\n", buf, buf2); + for (i = 1; i <= 4; i++) { + get_qsfp_rx_power(ii, buf, sizeof(buf), i); + get_qsfp_tx_power(ii, buf2, sizeof(buf2), i); + printf("\tlane %d: RX: %s TX: %s\n", i, buf, buf2); + } + } +} + +static void +print_sfp_status(struct i2c_info *ii, int verbose) +{ + char buf[80], buf2[40], buf3[40]; + uint8_t diag_type, flags; /* Read diagnostic monitoring type */ - ii.f(&ii, SFF_8472_BASE, SFF_8472_DIAG_TYPE, 1, (caddr_t)&ii.diag_type); + ii->f(ii, SFF_8472_BASE, SFF_8472_DIAG_TYPE, 1, (caddr_t)&diag_type); + if (ii->error != 0) + return; + + /* + * Read monitoring data IFF it is supplied AND is + * internally calibrated + */ + flags = SFF_8472_DDM_DONE | SFF_8472_DDM_INTERNAL; + if ((diag_type & flags) == flags) + ii->do_diag = 1; /* Transceiver type */ - get_sfp_identifier(&ii, buf, sizeof(buf)); - get_sfp_transceiver_class(&ii, buf2, sizeof(buf2)); - get_sfp_connector(&ii, buf3, sizeof(buf3)); - if (ii.error == 0) - printf("\ti2c: %s %s (%s)\n", buf, buf2, buf3); + get_sfp_identifier(ii, buf, sizeof(buf)); + get_sfp_transceiver_class(ii, buf2, sizeof(buf2)); + get_sfp_connector(ii, buf3, sizeof(buf3)); + if (ii->error == 0) + printf("\tplugged: %s %s (%s)\n", buf, buf2, buf3); if (verbose > 2) - printf_sfp_transceiver_descr(&ii, buf, sizeof(buf)); - print_sfp_vendor(&ii, buf, sizeof(buf)); - if (ii.error == 0) + printf_sfp_transceiver_descr(ii, buf, sizeof(buf)); + print_sfp_vendor(ii, buf, sizeof(buf)); + if (ii->error == 0) printf("\t%s\n", buf); /* * Request current measurements iff they are provided: - * Bit 6 must be set. */ - if ((ii.diag_type & 0x40) != 0) { - get_sfp_temp(&ii, buf, sizeof(buf)); - get_sfp_rx_power(&ii, buf2, sizeof(buf2)); - get_sfp_tx_power(&ii, buf3, sizeof(buf3)); - printf("\tTemp: %s RX: %s TX: %s\n", buf, buf2, buf3); + if (ii->do_diag != 0) { + get_sfp_temp(ii, buf, sizeof(buf)); + get_sfp_voltage(ii, buf2, sizeof(buf2)); + printf("\tmodule temperature: %s Voltage: %s\n", buf, buf2); + get_sfp_rx_power(ii, buf, sizeof(buf)); + get_sfp_tx_power(ii, buf2, sizeof(buf2)); + printf("\tRX: %s TX: %s\n", buf, buf2); } } +void +sfp_status(int s, struct ifreq *ifr, int verbose) +{ + struct i2c_info ii; + + /* Prepare necessary into to pass to NIC handler */ + ii.s = s; + ii.ifr = ifr; + + /* + * Check if we have i2c support for particular driver. + * TODO: Determine driver by original name. + */ + memset(&ii, 0, sizeof(ii)); + if (strncmp(ifr->ifr_name, "ix", 2) == 0) { + ii.f = read_i2c_ixgbe; + print_sfp_status(&ii, verbose); + } else if (strncmp(ifr->ifr_name, "cxl", 3) == 0) { + ii.port_id = atoi(&ifr->ifr_name[3]); + ii.f = read_i2c_generic; + ii.cfd = -1; + print_qsfp_status(&ii, verbose); + } else + return; +} + Added: head/sys/net/sff8436.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/net/sff8436.h Thu Aug 21 17:54:42 2014 (r270287) @@ -0,0 +1,211 @@ +/*- + * Copyright (c) 2014 Yandex LLC. + * + * 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$ + */ + +/* + * The following set of constants are from Document SFF-8436 + * "QSFP+ 10 Gbs 4X PLUGGABLE TRANSCEIVER" revision 4.8 dated October 31, 2013 + * + * This SFF standard defines the following QSFP+ memory address module: + * + * 1) 256-byte addressable block and 128-byte pages + * 2) Lower 128-bytes addresses always refer to the same page + * 3) Upper address space may refer to different pages depending on + * "page select" byte value. + * + * Map description: + * + * Serial address 0xA02: + * + * Lower bits + * 0-127 Monitoring data & page select byte + * 128-255: + * + * Page 00: + * 128-191 Base ID Fields + * 191-223 Extended ID + * 223-255 Vendor Specific ID + * + * Page 01 (optional): + * 128-255 App-specific data + * + * Page 02 (optional): + * 128-255 User EEPROM Data + * + * Page 03 (optional for Cable Assmeblies) + * 128-223 Thresholds + * 225-237 Vendor Specific + * 238-253 Channel Controls/Monitor + * 254-255 Reserverd + * + * All these values are read across an I2C (i squared C) bus. + */ + +#define SFF_8436_BASE 0xA0 /* Base address for all requests */ + +/* Table 17 - Lower Memory Map */ +enum { + SFF_8436_MID = 0, /* Copy of SFF_8436_ID field */ + SFF_8436_STATUS = 1, /* 2-bytes status (Table 18) */ + SFF_8436_INTR_START = 3, /* Interrupt flags (Tables 19-21) */ + SFF_8436_INTR_END = 21, + SFF_8436_MODMON_START = 22, /* Module monitors (Table 22 */ + SFF_8436_TEMP = 22, /* Internally measured module temp */ + SFF_8436_VCC = 26, /* Internally mesasure module + * supplied voltage */ + SFF_8436_MODMON_END = 33, + SFF_8436_CHMON_START = 34, /* Channel monitors (Table 23) */ + SFF_8436_RX_CH1_MSB = 34, /* Internally measured RX input power */ + SFF_8436_RX_CH1_LSB = 35, /* for channel 1 */ + SFF_8436_RX_CH2_MSB = 36, /* Internally measured RX input power */ + SFF_8436_RX_CH2_LSB = 37, /* for channel 2 */ + SFF_8436_RX_CH3_MSB = 38, /* Internally measured RX input power */ + SFF_8436_RX_CH3_LSB = 39, /* for channel 3 */ + SFF_8436_RX_CH4_MSB = 40, /* Internally measured RX input power */ + SFF_8436_RX_CH4_LSB = 41, /* for channel 4 */ + SFF_8436_TX_CH1_MSB = 42, /* Internally measured TX bias */ + SFF_8436_TX_CH1_LSB = 43, /* for channel 1 */ + SFF_8436_TX_CH2_MSB = 44, /* Internally measured TX bias */ + SFF_8436_TX_CH2_LSB = 45, /* for channel 2 */ + SFF_8436_TX_CH3_MSB = 46, /* Internally measured TX bias */ + SFF_8436_TX_CH3_LSB = 47, /* for channel 3 */ + SFF_8436_TX_CH4_MSB = 48, /* Internally measured TX bias */ + SFF_8436_TX_CH4_LSB = 49, /* for channel 4 */ + SFF_8436_CHANMON_END = 81, + SFF_8436_CONTROL_START = 86, /* Control (Table 24) */ + SFF_8436_CONTROL_END = 97, + SFF_8436_MASKS_START = 100, /* Module/channel masks (Table 25) */ + SFF_8436_MASKS_END = 106, + SFF_8436_CHPASSWORD = 119, /* Password change entry (4 bytes) */ + SFF_8436_PASSWORD = 123, /* Password entry area (4 bytes) */ + SFF_8436_PAGESEL = 127, /* Page select byte */ +}; + +/* Table 18 - Status Indicators bits */ +/* Byte 1: all bits reserved */ + +/* Byte 2 bits */ +#define SFF_8436_STATUS_FLATMEM (1 << 2) /* Upper memory flat or paged + * 0 = paging, 1=Page 0 only */ +#define SFF_8436_STATUS_INTL (1 << 1) /* Digital state of the intL + * Interrupt output pin */ +#define SFF_8436_STATUS_NOTREADY 1 /* Module has not yet achieved + * power up and memory data is not + * ready. 0=data is ready */ +/* + * Upper page 0 definitions: + * Table 29 - Serial ID: Data fields. + * + * Note that this table is mostly the same as used in SFF-8472. + * The only differenee is address shift: +128 bytes. + */ +enum { + SFF_8436_ID = 128, /* Module Type (defined in sff8472.h) */ + SFF_8436_EXT_ID = 129, /* Extended transceiver type + * (Table 31) */ + SFF_8436_CONNECTOR = 130, /* Connector type (Table 32) */ + SFF_8436_TRANS_START = 131, /* Electric or Optical Compatibility + * (Table 33) */ + SFF_8436_CODE_E1040G = 131, /* 10/40G Ethernet Compliance Code */ + SFF_8436_CODE_SONET = 132, /* SONET Compliance codes */ + SFF_8436_CODE_SATA = 133, /* SAS/SATA compliance codes */ + SFF_8436_CODE_E1G = 134, /* Gigabit Ethernet Compliant codes */ + SFF_8436_CODE_FC_START = 135, /* FC link/media/speed */ + SFF_8436_CODE_FC_END = 138, + SFF_8436_TRANS_END = 138, + SFF_8436_ENCODING = 139, /* Encoding Code for high speed + * serial encoding algorithm (see + * Table 34) */ + SFF_8436_BITRATE = 140, /* Nominal signaling rate, units + * of 100MBd. */ + SFF_8436_RATEID = 141, /* Extended RateSelect Compliance + * (see Table 35) */ + SFF_8436_LEN_SMF_KM = 142, /* Link length supported for single + * mode fiber, units of km */ + SFF_8436_LEN_OM3 = 143, /* Link length supported for 850nm + * 50um multimode fiber, units of 2 m */ + SFF_8436_LEN_OM2 = 144, /* Link length supported for 50 um + * OM2 fiber, units of 1 m */ + SFF_8436_LEN_OM1 = 145, /* Link length supported for 1310 nm + * 50um multi-mode fiber, units of 1m*/ + SFF_8436_LEN_ASM = 144, /* Link length of passive cable assembly + * Length is specified as in the INF + * 8074, units of 1m. 0 means this is + * not value assembly. Value of 255 + * means thet the Module supports length + * greater than 254 m. */ + SFF_8436_DEV_TECH = 147, /* Device/transmitter technology, + * see Table 36/37 */ + SFF_8436_VENDOR_START = 148, /* Vendor name, 16 bytes, padded + * right with 0x20 */ + SFF_8436_VENDOR_END = 163, + SFF_8436_EXTMODCODE = 164, /* Extended module code, Table 164 */ + SFF_8436_VENDOR_OUI_START = 165 , /* Vendor OUI SFP vendor IEEE + * company ID */ + SFF_8436_VENDOR_OUI_END = 167, + SFF_8436_PN_START = 168, /* Vendor PN, padded right with 0x20 */ + SFF_8436_PN_END = 183, + SFF_8436_REV_START = 184, /* Vendor Revision, padded right 0x20 */ + SFF_8436_REV_END = 185, + SFF_8436_WAVELEN_START = 186, /* Wavelength Laser wavelength + * (Passive/Active Cable + * Specification Compliance) */ + SFF_8436_WAVELEN_END = 189, + SFF_8436_MAX_CASE_TEMP = 190, /* Allows to specify maximum temp + * above 70C. Maximum case temperature is + * an 8-bit value in Degrees C. A value + *of 0 implies the standard 70C rating.*/ + SFF_8436_CC_BASE = 191, /* CC_BASE Check code for Base ID + * Fields (first 63 bytes) */ + /* Extended ID fields */ + SFF_8436_OPTIONS_START = 192, /* Options Indicates which optional + * transceiver signals are + * implemented (see Table 39) */ + SFF_8436_OPTIONS_END = 195, + SFF_8436_SN_START = 196, /* Vendor SN, riwght padded with 0x20 */ + SFF_8436_SN_END = 211, + SFF_8436_DATE_START = 212, /* Vendor’s manufacturing date code + * (see Table 40) */ + SFF_8436_DATE_END = 219, + SFF_8436_DIAG_TYPE = 220, /* Diagnostic Monitoring Type + * Indicates which type of + * diagnostic monitoring is + * implemented (if any) in the + * transceiver (see Table 41) */ + + SFF_8436_ENHANCED = 221, /* Enhanced Options Indicates which + * optional features are implemented + * (if any) in the transceiver + * (see Table 42) */ + SFF_8436_CC_EXT = 222, /* Check code for the Extended ID + * Fields (bytes 192-222 incl) */ + SFF_8436_VENDOR_RSRVD_START = 224, + SFF_8436_VENDOR_RSRVD_END = 255, +}; + + Modified: head/sys/net/sff8472.h ============================================================================== --- head/sys/net/sff8472.h Thu Aug 21 17:36:42 2014 (r270286) +++ head/sys/net/sff8472.h Thu Aug 21 17:54:42 2014 (r270287) @@ -375,37 +375,98 @@ enum { */ #define SFF_8472_STATUS_DATA_READY (1 << 0) -/* Table 3.2 Identifier values */ +/* + * Table 3.2 Identifier values. + * Identifier constants has taken from SFF-8024 rev 2.2 table 4.1 + * (as referenced by table 3.2 footer) + * */ enum { - SFF_8472_ID_UNKNOWN = 0x0, /* Unknown or unspecified */ - SFF_8472_ID_GBIC = 0x1, /* GBIC */ - SFF_8472_ID_SFF = 0x2, /* Module soldered to motherboard (ex: SFF)*/ - SFF_8472_ID_SFP = 0x3, /* SFP or SFP “Plus†*/ - SFF_8472_ID_XBI = 0x4, /* Reserved for “300 pin XBI†devices */ - SFF_8472_ID_XENPAK = 0x5, /* Reserved for “Xenpak†devices */ - SFF_8472_ID_XFP = 0x6, /* Reserved for “XFP†devices */ - SFF_8472_ID_XFF = 0x7, /* Reserved for “XFF†devices */ - SFF_8472_ID_XFPE = 0x8, /* Reserved for “XFP-E†devices */ - SFF_8472_ID_XPAK = 0x9, /* Reserved for “XPak†devices */ - SFF_8472_ID_X2 = 0xA, /* Reserved for “X2†devices */ - SFF_8472_ID_DWDM_SFP = 0xB, /* Reserved for “DWDM-SFP†devices */ - SFF_8472_ID_QSFP = 0xC, /* Reserved for “QSFP†devices */ - SFF_8472_ID_LAST = SFF_8472_ID_QSFP + SFF_8024_ID_UNKNOWN = 0x0, /* Unknown or unspecified */ + SFF_8024_ID_GBIC = 0x1, /* GBIC */ + SFF_8024_ID_SFF = 0x2, /* Module soldered to motherboard (ex: SFF)*/ + SFF_8024_ID_SFP = 0x3, /* SFP or SFP “Plus†*/ + SFF_8024_ID_XBI = 0x4, /* 300 pin XBI */ + SFF_8024_ID_XENPAK = 0x5, /* Xenpak */ + SFF_8024_ID_XFP = 0x6, /* XFP */ + SFF_8024_ID_XFF = 0x7, /* XFF */ + SFF_8024_ID_XFPE = 0x8, /* XFP-E */ + SFF_8024_ID_XPAK = 0x9, /* XPAk */ + SFF_8024_ID_X2 = 0xA, /* X2 */ + SFF_8024_ID_DWDM_SFP = 0xB, /* DWDM-SFP */ + SFF_8024_ID_QSFP = 0xC, /* QSFP */ + SFF_8024_ID_QSFPPLUS = 0xD, /* QSFP+ */ + SFF_8024_ID_CXP = 0xE, /* CXP */ + SFF_8024_ID_HD4X = 0xF, /* Shielded Mini Multilane HD 4X */ + SFF_8024_ID_HD8X = 0x10, /* Shielded Mini Multilane HD 8X */ + SFF_8024_ID_QSFP28 = 0x11, /* QSFP28 */ + SFF_8024_ID_CXP2 = 0x12, /* CXP2 (aka CXP28) */ + SFF_8024_ID_LAST = SFF_8024_ID_CXP2 }; -static const char *sff_8472_id[SFF_8472_ID_LAST + 1] = {"Unknown", +static const char *sff_8024_id[SFF_8024_ID_LAST + 1] = {"Unknown", "GBIC", "SFF", - "SFP", + "SFP/SFP+", "XBI", "Xenpak", "XFP", "XFF", "XFP-E", - "XPak", + "XPAk", "X2", "DWDM-SFP", - "QSFP"}; + "QSFP", + "QSFP+", + "CXP", + "HD4X", + "HD8X", + "QSFP28", + "CXP2"}; + +/* Keep compability with old definitions */ +#define SFF_8472_ID_UNKNOWN SFF_8024_ID_UNKNOWN +#define SFF_8472_ID_GBIC SFF_8024_ID_GBIC +#define SFF_8472_ID_SFF SFF_8024_ID_SFF +#define SFF_8472_ID_SFP SFF_8024_ID_SFP +#define SFF_8472_ID_XBI SFF_8024_ID_XBI +#define SFF_8472_ID_XENPAK SFF_8024_ID_XENPAK +#define SFF_8472_ID_XFP SFF_8024_ID_XFP +#define SFF_8472_ID_XFF SFF_8024_ID_XFF +#define SFF_8472_ID_XFPE SFF_8024_ID_XFPE +#define SFF_8472_ID_XPAK SFF_8024_ID_XPAK +#define SFF_8472_ID_X2 SFF_8024_ID_X2 +#define SFF_8472_ID_DWDM_SFP SFF_8024_ID_DWDM_SFP +#define SFF_8472_ID_QSFP SFF_8024_ID_QSFP +#define SFF_8472_ID_LAST SFF_8024_ID_LAST + +#define sff_8472_id sff_8024_id + +/* + * Table 3.9 Diagnostic Monitoring Type (byte 92) + * bits described. + */ + +/* + * Digital diagnostic monitoring implemented. + * Set to 1 for transceivers implementing DDM. + */ +#define SFF_8472_DDM_DONE (1 << 6) + +/* + * Measurements are internally calibrated. + */ +#define SFF_8472_DDM_INTERNAL (1 << 5) + +/* + * Measurements are externally calibrated. + */ +#define SFF_8472_DDM_EXTERNAL (1 << 4) + +/* + * Received power measurement type + * 0 = OMA, 1 = average power + */ +#define SFF_8472_DDM_PMTYPE (1 << 3) /* Table 3.13 and 3.14 Temperature Conversion Values */ #define SFF_8472_TEMP_SIGN (1 << 15) From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 18:26:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B3D80EC1; Thu, 21 Aug 2014 18:26:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9EDD436CA; Thu, 21 Aug 2014 18:26:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LIQXQS011030; Thu, 21 Aug 2014 18:26:33 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LIQXXd011028; Thu, 21 Aug 2014 18:26:33 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201408211826.s7LIQXXd011028@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Thu, 21 Aug 2014 18:26:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270288 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 18:26:33 -0000 Author: dumbbell Date: Thu Aug 21 18:26:32 2014 New Revision: 270288 URL: http://svnweb.freebsd.org/changeset/base/270288 Log: vt(4): Constify vt_buf argument of vtbuf_iscursor() MFC after: 1 week Modified: head/sys/dev/vt/vt.h head/sys/dev/vt/vt_buf.c Modified: head/sys/dev/vt/vt.h ============================================================================== --- head/sys/dev/vt/vt.h Thu Aug 21 17:54:42 2014 (r270287) +++ head/sys/dev/vt/vt.h Thu Aug 21 18:26:32 2014 (r270288) @@ -197,7 +197,7 @@ void vtbuf_cursor_position(struct vt_buf void vtbuf_scroll_mode(struct vt_buf *vb, int yes); void vtbuf_undirty(struct vt_buf *, term_rect_t *, struct vt_bufmask *); void vtbuf_sethistory_size(struct vt_buf *, int); -int vtbuf_iscursor(struct vt_buf *vb, int row, int col); +int vtbuf_iscursor(const struct vt_buf *vb, int row, int col); void vtbuf_cursor_visibility(struct vt_buf *, int); #ifndef SC_NO_CUTPASTE void vtbuf_mouse_cursor_position(struct vt_buf *vb, int col, int row); Modified: head/sys/dev/vt/vt_buf.c ============================================================================== --- head/sys/dev/vt/vt_buf.c Thu Aug 21 17:54:42 2014 (r270287) +++ head/sys/dev/vt/vt_buf.c Thu Aug 21 18:26:32 2014 (r270288) @@ -148,7 +148,7 @@ vtbuf_wth(struct vt_buf *vb, int row) /* Translate history row to current view row number. */ static int -vtbuf_htw(struct vt_buf *vb, int row) +vtbuf_htw(const struct vt_buf *vb, int row) { /* @@ -162,7 +162,7 @@ vtbuf_htw(struct vt_buf *vb, int row) } int -vtbuf_iscursor(struct vt_buf *vb, int row, int col) +vtbuf_iscursor(const struct vt_buf *vb, int row, int col) { int sc, sr, ec, er, tmp; From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 18:32:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9CC105AE; Thu, 21 Aug 2014 18:32:43 +0000 (UTC) Received: from mail-la0-x22c.google.com (mail-la0-x22c.google.com [IPv6:2a00:1450:4010:c03::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6A15437B3; Thu, 21 Aug 2014 18:32:42 +0000 (UTC) Received: by mail-la0-f44.google.com with SMTP id el20so9054032lab.31 for ; Thu, 21 Aug 2014 11:32:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=2/5SZNoYRkW6GOBSY0nquSHZh2YV0hEewDrEhHdS0V4=; b=TGz8v/uPOcsihv3isVZjCO8AF8+I5DRfvwWHjJLyqyuNG9UsHPeGYm/bwlYDnbgAQF Ql6+8deRdaHVDuobCZuLs7U3xbwunyKazZ6gDAqebLYbgO4VIRXXYsN6W4jUxQOmX+HT V2n0DeX14UInh7To446Yw2GJfzlbcW6Ag2w1scbxgs7aHe+NHQCz96g+19kgOLuwYzgP 20ALWG8KXQ1qB/u7ZrSZ3vjGvyJIOHBzfBz0U877R7IkofTzC/yGydxkyMWbt2k5ybZz dfhpY+3JMJDj4B3JlpZoDB+gYEVckpdO5Hd34Lm/Q7JU/HMGF5Ox84YTDLdrkHxujicz X6LA== MIME-Version: 1.0 X-Received: by 10.112.169.35 with SMTP id ab3mr213838lbc.41.1408645960386; Thu, 21 Aug 2014 11:32:40 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.112.197.107 with HTTP; Thu, 21 Aug 2014 11:32:40 -0700 (PDT) In-Reply-To: <201408210431.s7L4Vmkj027897@svn.freebsd.org> References: <201408210431.s7L4Vmkj027897@svn.freebsd.org> Date: Thu, 21 Aug 2014 11:32:40 -0700 X-Google-Sender-Auth: YbGdiEmOgESdVBsrNj29r_oPhHQ Message-ID: Subject: Re: svn commit: r270258 - in stable/10: sbin/umount usr.bin/showmount From: Craig Rodrigues To: Peter Wemm Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 18:32:43 -0000 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@. -- Craig From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 19:04:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A43DE96C; Thu, 21 Aug 2014 19:04:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F6A83A9B; Thu, 21 Aug 2014 19:04:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LJ4Gpr030042; Thu, 21 Aug 2014 19:04:16 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LJ4Gug030039; Thu, 21 Aug 2014 19:04:16 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201408211904.s7LJ4Gug030039@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Thu, 21 Aug 2014 19:04:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270289 - in head: sbin/mksnap_ffs sbin/shutdown usr.sbin/ppp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 19:04:16 -0000 Author: neel Date: Thu Aug 21 19:04:15 2014 New Revision: 270289 URL: http://svnweb.freebsd.org/changeset/base/270289 Log: Change file permissions for some setuid executables so they are "o+r". The executable itself doesn't contain any privileged information. An example of where this is useful is when makefs(8) is creating an image that includes /sbin/shutdown. This can now be done without root privileges. Reviewed by: delphij Discussed with: delphij, des CR: https://reviews.freebsd.org/D662 Modified: head/sbin/mksnap_ffs/Makefile head/sbin/shutdown/Makefile head/usr.sbin/ppp/Makefile Modified: head/sbin/mksnap_ffs/Makefile ============================================================================== --- head/sbin/mksnap_ffs/Makefile Thu Aug 21 18:26:32 2014 (r270288) +++ head/sbin/mksnap_ffs/Makefile Thu Aug 21 19:04:15 2014 (r270289) @@ -10,9 +10,9 @@ WARNS?= 2 CFLAGS+=-I${.CURDIR}/../mount .if defined(NOSUID) -BINMODE=550 +BINMODE=554 .else -BINMODE=4550 +BINMODE=4554 BINOWN= root .endif BINGRP= operator Modified: head/sbin/shutdown/Makefile ============================================================================== --- head/sbin/shutdown/Makefile Thu Aug 21 18:26:32 2014 (r270288) +++ head/sbin/shutdown/Makefile Thu Aug 21 19:04:15 2014 (r270289) @@ -8,6 +8,6 @@ MLINKS= shutdown.8 poweroff.8 BINOWN= root BINGRP= operator -BINMODE=4550 +BINMODE=4554 .include Modified: head/usr.sbin/ppp/Makefile ============================================================================== --- head/usr.sbin/ppp/Makefile Thu Aug 21 18:26:32 2014 (r270288) +++ head/usr.sbin/ppp/Makefile Thu Aug 21 19:04:15 2014 (r270289) @@ -33,9 +33,9 @@ PPP_NO_PAM= .endif .if defined(PPP_NO_SUID) -BINMODE=550 +BINMODE=554 .else -BINMODE=4550 +BINMODE=4554 BINOWN= root .endif BINGRP= network From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 19:15:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C393332; Thu, 21 Aug 2014 19:15:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F1DAF3BAE; Thu, 21 Aug 2014 19:15:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LJFM4F035096; Thu, 21 Aug 2014 19:15:22 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LJFMTr035095; Thu, 21 Aug 2014 19:15:22 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201408211915.s7LJFMTr035095@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Thu, 21 Aug 2014 19:15:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270290 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 19:15:23 -0000 Author: dumbbell Date: Thu Aug 21 19:15:22 2014 New Revision: 270290 URL: http://svnweb.freebsd.org/changeset/base/270290 Log: vt(4): Test if the cursor is shown only once Later, we just see if the "struct mouse_cursor" pointer is set. This avoids the need to mess with all the conditions several times; this has been error prone. While here, rename the variable "m" to a more meaningful "cursor", like it's done elsewhere in the code. MFC after: 1 week Modified: head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Thu Aug 21 19:04:15 2014 (r270289) +++ head/sys/dev/vt/vt_core.c Thu Aug 21 19:15:22 2014 (r270290) @@ -853,7 +853,7 @@ vt_flush(struct vt_device *vd) term_pos_t size; term_char_t *r; #ifndef SC_NO_CUTPASTE - struct mouse_cursor *m; + struct mouse_cursor *cursor; int bpl, h, w; #endif @@ -868,6 +868,7 @@ vt_flush(struct vt_device *vd) return; #ifndef SC_NO_CUTPASTE + cursor = NULL; if ((vd->vd_flags & VDF_MOUSECURSOR) && /* Mouse support enabled. */ !(vw->vw_flags & VWF_MOUSE_HIDE)) { /* Cursor displayed. */ if (vd->vd_moldx != vd->vd_mx || @@ -903,6 +904,11 @@ vt_flush(struct vt_device *vd) vd->vd_moldx = vd->vd_mx; vd->vd_moldy = vd->vd_my; } + + if (!kdb_active && panicstr == NULL) { + /* Mouse enabled, and DDB isn't active. */ + cursor = &vt_default_mouse_pointer; + } } #endif @@ -933,27 +939,17 @@ vt_flush(struct vt_device *vd) } #ifndef SC_NO_CUTPASTE - /* Mouse disabled. */ - if (vw->vw_flags & VWF_MOUSE_HIDE) - return; - - /* No mouse for DDB. */ - if (kdb_active || panicstr != NULL) - return; - - if ((vd->vd_flags & (VDF_MOUSECURSOR|VDF_TEXTMODE)) == - VDF_MOUSECURSOR) { - m = &vt_default_mouse_pointer; - bpl = (m->w + 7) >> 3; /* Bytes per source line. */ - w = m->w; - h = m->h; + if (cursor != NULL) { + bpl = (cursor->w + 7) >> 3; /* Bytes per source line. */ + w = cursor->w; + h = cursor->h; - if ((vd->vd_mx + m->w) > (size.tp_col * vf->vf_width)) + if ((vd->vd_mx + cursor->w) > (size.tp_col * vf->vf_width)) w = (size.tp_col * vf->vf_width) - vd->vd_mx - 1; - if ((vd->vd_my + m->h) > (size.tp_row * vf->vf_height)) + if ((vd->vd_my + cursor->h) > (size.tp_row * vf->vf_height)) h = (size.tp_row * vf->vf_height) - vd->vd_my - 1; - vd->vd_driver->vd_bitbltchr(vd, m->map, m->mask, bpl, + vd->vd_driver->vd_bitbltchr(vd, cursor->map, cursor->mask, bpl, vd->vd_offset.tp_row + vd->vd_my, vd->vd_offset.tp_col + vd->vd_mx, w, h, TC_WHITE, TC_BLACK); From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 19:32:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84ADFD87; Thu, 21 Aug 2014 19:32:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6FC163D84; Thu, 21 Aug 2014 19:32:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LJWt8w044113; Thu, 21 Aug 2014 19:32:55 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LJWtDx044112; Thu, 21 Aug 2014 19:32:55 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201408211932.s7LJWtDx044112@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 21 Aug 2014 19:32:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270291 - stable/10/share/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 19:32:55 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 19:42:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D3C93425; Thu, 21 Aug 2014 19:42:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B352A3EC5; Thu, 21 Aug 2014 19:42:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LJg3wU049050; Thu, 21 Aug 2014 19:42:03 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LJg3u0049048; Thu, 21 Aug 2014 19:42:03 GMT (envelope-from np@FreeBSD.org) Message-Id: <201408211942.s7LJg3u0049048@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 21 Aug 2014 19:42:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270292 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 19:42:04 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 19:42:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C218557; Thu, 21 Aug 2014 19:42:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 370F03ECC; Thu, 21 Aug 2014 19:42:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LJgP4e049142; Thu, 21 Aug 2014 19:42:25 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LJgO2p049137; Thu, 21 Aug 2014 19:42:24 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201408211942.s7LJgO2p049137@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Thu, 21 Aug 2014 19:42:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270293 - in head/sys/dev/vt: . font X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 19:42:25 -0000 Author: dumbbell Date: Thu Aug 21 19:42:24 2014 New Revision: 270293 URL: http://svnweb.freebsd.org/changeset/base/270293 Log: vt(4): Rename the "mouse_cursor" structure to "vt_mouse_cursor" At the same time, "w" and "h" members are now called "width" and "height". The goal is to have a more "public" structure, because it will soon be passed as argument to a new callback, replacing vd_bitbltchr_t. MFC after: 1 week Modified: head/sys/dev/vt/font/vt_mouse_cursor.c head/sys/dev/vt/vt.h head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/font/vt_mouse_cursor.c ============================================================================== --- head/sys/dev/vt/font/vt_mouse_cursor.c Thu Aug 21 19:42:03 2014 (r270292) +++ head/sys/dev/vt/font/vt_mouse_cursor.c Thu Aug 21 19:42:24 2014 (r270293) @@ -33,7 +33,7 @@ __FBSDID("$FreeBSD$"); #include #ifndef SC_NO_CUTPASTE -struct mouse_cursor vt_default_mouse_pointer = { +struct vt_mouse_cursor vt_default_mouse_pointer = { .map = { 0x00, /* "__ " */ 0x40, /* "_*_ " */ @@ -64,7 +64,7 @@ struct mouse_cursor vt_default_mouse_poi 0x0f, /* " ____" */ 0x0f, /* " ____" */ }, - .w = 8, - .h = 13, + .width = 8, + .height = 13, }; #endif Modified: head/sys/dev/vt/vt.h ============================================================================== --- head/sys/dev/vt/vt.h Thu Aug 21 19:42:03 2014 (r270292) +++ head/sys/dev/vt/vt.h Thu Aug 21 19:42:24 2014 (r270293) @@ -284,6 +284,15 @@ struct vt_window { * (VDF_TEXTMODE). */ +#ifndef SC_NO_CUTPASTE +struct vt_mouse_cursor { + uint8_t map[64 * 64 / 8]; + uint8_t mask[64 * 64 / 8]; + uint8_t width; + uint8_t height; +}; +#endif + typedef int vd_init_t(struct vt_device *vd); typedef int vd_probe_t(struct vt_device *vd); typedef void vd_postswitch_t(struct vt_device *vd); @@ -377,15 +386,6 @@ struct vt_font { unsigned int vf_refcount; }; -#ifndef SC_NO_CUTPASTE -struct mouse_cursor { - uint8_t map[64 * 64 / 8]; - uint8_t mask[64 * 64 / 8]; - uint8_t w; - uint8_t h; -}; -#endif - const uint8_t *vtfont_lookup(const struct vt_font *vf, term_char_t c); struct vt_font *vtfont_ref(struct vt_font *vf); void vtfont_unref(struct vt_font *vf); Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Thu Aug 21 19:42:03 2014 (r270292) +++ head/sys/dev/vt/vt_core.c Thu Aug 21 19:42:24 2014 (r270293) @@ -134,7 +134,7 @@ extern unsigned char vt_logo_image[]; /* Font. */ extern struct vt_font vt_font_default; #ifndef SC_NO_CUTPASTE -extern struct mouse_cursor vt_default_mouse_pointer; +extern struct vt_mouse_cursor vt_default_mouse_pointer; #endif static int signal_vt_rel(struct vt_window *); @@ -853,7 +853,7 @@ vt_flush(struct vt_device *vd) term_pos_t size; term_char_t *r; #ifndef SC_NO_CUTPASTE - struct mouse_cursor *cursor; + struct vt_mouse_cursor *cursor; int bpl, h, w; #endif @@ -940,13 +940,15 @@ vt_flush(struct vt_device *vd) #ifndef SC_NO_CUTPASTE if (cursor != NULL) { - bpl = (cursor->w + 7) >> 3; /* Bytes per source line. */ - w = cursor->w; - h = cursor->h; + bpl = (cursor->width + 7) >> 3; /* Bytes per source line. */ + w = cursor->width; + h = cursor->height; - if ((vd->vd_mx + cursor->w) > (size.tp_col * vf->vf_width)) + if ((vd->vd_mx + cursor->width) > + (size.tp_col * vf->vf_width)) w = (size.tp_col * vf->vf_width) - vd->vd_mx - 1; - if ((vd->vd_my + cursor->h) > (size.tp_row * vf->vf_height)) + if ((vd->vd_my + cursor->height) > + (size.tp_row * vf->vf_height)) h = (size.tp_row * vf->vf_height) - vd->vd_my - 1; vd->vd_driver->vd_bitbltchr(vd, cursor->map, cursor->mask, bpl, From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 19:45:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A70D6973; Thu, 21 Aug 2014 19:45:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 91C9E3F01; Thu, 21 Aug 2014 19:45:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LJjqqS049740; Thu, 21 Aug 2014 19:45:52 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LJjqST049739; Thu, 21 Aug 2014 19:45:52 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201408211945.s7LJjqST049739@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 21 Aug 2014 19:45:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270294 - stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 19:45:52 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 19:45:54 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E5066A54; Thu, 21 Aug 2014 19:45:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C810E3F07; Thu, 21 Aug 2014 19:45:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LJjsLN049790; Thu, 21 Aug 2014 19:45:54 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LJjsxf049789; Thu, 21 Aug 2014 19:45:54 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201408211945.s7LJjsxf049789@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 21 Aug 2014 19:45:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r270295 - stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 19:45:55 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 19:51:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CA7D7FC4; Thu, 21 Aug 2014 19:51:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 997403FDC; Thu, 21 Aug 2014 19:51:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LJpABh052965; Thu, 21 Aug 2014 19:51:10 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LJp8uJ052951; Thu, 21 Aug 2014 19:51:08 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201408211951.s7LJp8uJ052951@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 21 Aug 2014 19:51:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270296 - in stable/10/sys: ia64/acpica ia64/ia64 ia64/include sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 19:51:10 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 19:54:04 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3F7D81C4; Thu, 21 Aug 2014 19:54:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2772C3007; Thu, 21 Aug 2014 19:54:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LJs4Xi054343; Thu, 21 Aug 2014 19:54:04 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LJs321054331; Thu, 21 Aug 2014 19:54:03 GMT (envelope-from np@FreeBSD.org) Message-Id: <201408211954.s7LJs321054331@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 21 Aug 2014 19:54:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org 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... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 19:54:04 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 19:58:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 511E3526; Thu, 21 Aug 2014 19:58:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3CDF7303B; Thu, 21 Aug 2014 19:58:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LJwlJR055045; Thu, 21 Aug 2014 19:58:47 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LJwlwr055044; Thu, 21 Aug 2014 19:58:47 GMT (envelope-from np@FreeBSD.org) Message-Id: <201408211958.s7LJwlwr055044@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 21 Aug 2014 19:58:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270298 - stable/10/sys/dev/netmap X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 19:58:47 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 20:10:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 92A1A9E5; Thu, 21 Aug 2014 20:10:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7DF503136; Thu, 21 Aug 2014 20:10:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LKA67V060244; Thu, 21 Aug 2014 20:10:06 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LKA65M060243; Thu, 21 Aug 2014 20:10:06 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201408212010.s7LKA65M060243@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Thu, 21 Aug 2014 20:10:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270299 - head/sys/dev/vt/hw/vga X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 20:10:06 -0000 Author: dumbbell Date: Thu Aug 21 20:10:05 2014 New Revision: 270299 URL: http://svnweb.freebsd.org/changeset/base/270299 Log: vt_vga: When clearing video memory, don't read from it The goal is to clear the video memory, in case an application drew to it. So the content shouldn't be loaded in the latches, it can't be trusted anyway. This improves a bit the window switch speed. MFC after: 1 week Modified: head/sys/dev/vt/hw/vga/vt_vga.c Modified: head/sys/dev/vt/hw/vga/vt_vga.c ============================================================================== --- head/sys/dev/vt/hw/vga/vt_vga.c Thu Aug 21 19:58:46 2014 (r270298) +++ head/sys/dev/vt/hw/vga/vt_vga.c Thu Aug 21 20:10:05 2014 (r270299) @@ -604,7 +604,6 @@ vga_initialize(struct vt_device *vd, int * planes. */ for (ofs = 0; ofs < VT_VGA_MEMSIZE; ofs++) { - MEM_READ1(sc, ofs); MEM_WRITE1(sc, ofs, 0); } } From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 20:33:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE0C64B1; Thu, 21 Aug 2014 20:33:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C90BD3440; Thu, 21 Aug 2014 20:33:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LKXAZS073428; Thu, 21 Aug 2014 20:33:10 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LKX9if073420; Thu, 21 Aug 2014 20:33:09 GMT (envelope-from se@FreeBSD.org) Message-Id: <201408212033.s7LKX9if073420@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Thu, 21 Aug 2014 20:33:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270300 - head/share/vt/keymaps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 20:33:11 -0000 Author: se Date: Thu Aug 21 20:33:09 2014 New Revision: 270300 URL: http://svnweb.freebsd.org/changeset/base/270300 Log: Next round of fixes. MFC after: 3 days Added: head/share/vt/keymaps/bg.phonetic.kbd - copied unchanged from r270290, head/share/vt/keymaps/bg.bds.ctrlcaps.kbd head/share/vt/keymaps/colemak.acc.kbd - copied unchanged from r270290, head/share/vt/keymaps/colemak.kbd Deleted: head/share/vt/keymaps/bg.bds.ctrlcaps.kbd head/share/vt/keymaps/colemak.kbd Modified: head/share/vt/keymaps/INDEX.keymaps head/share/vt/keymaps/Makefile head/share/vt/keymaps/ca-fr.kbd head/share/vt/keymaps/ca.kbd head/share/vt/keymaps/jp.pc98.kbd Modified: head/share/vt/keymaps/INDEX.keymaps ============================================================================== --- head/share/vt/keymaps/INDEX.keymaps Thu Aug 21 20:10:05 2014 (r270299) +++ head/share/vt/keymaps/INDEX.keymaps Thu Aug 21 20:33:09 2014 (r270300) @@ -53,8 +53,9 @@ 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) + +bg.phonetic.kbd:en:Bulgarian (Phonetic) +bg.phonetic.kbd:de:Bulgarisch (phonetisch) br.kbd:en:Brazilian (accent keys) br.kbd:de:Brasilianisch (mit Akzenten) @@ -82,7 +83,7 @@ centraleuropean.qwerty.kbd:de:Zentral Eu centraleuropean.qwerty.kbd:fr:Centre européen (QWERTY) centraleuropean.qwerty.kbd:es:Centroeuropeo (QWERTY) -colemak.kbd:en:Colemak ergonomic alternative +colemak.acc.kbd:en:Colemak ergonomic alternative cz.kbd:en:Czech (QWERTZ, accent keys) cz.kbd:de:Tschechisch (QWERTZ, mit Akzenten) Modified: head/share/vt/keymaps/Makefile ============================================================================== --- head/share/vt/keymaps/Makefile Thu Aug 21 20:10:05 2014 (r270299) +++ head/share/vt/keymaps/Makefile Thu Aug 21 20:33:09 2014 (r270300) @@ -2,9 +2,13 @@ FILES= INDEX.keymaps \ am.kbd \ - bg.bds.ctrlcaps.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 \ @@ -14,9 +18,10 @@ FILES= INDEX.keymaps \ ch.acc.kbd \ ch.kbd \ ch.macbook.acc.kbd \ - colemak.kbd \ + colemak.acc.kbd \ cz.kbd \ de.acc.kbd \ + de.noacc.kbd \ de.kbd \ dk.acc.kbd \ dk.kbd \ @@ -26,6 +31,9 @@ FILES= INDEX.keymaps \ 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 \ Copied: head/share/vt/keymaps/bg.phonetic.kbd (from r270290, head/share/vt/keymaps/bg.bds.ctrlcaps.kbd) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/vt/keymaps/bg.phonetic.kbd Thu Aug 21 20:33:09 2014 (r270300, copy of r270290, head/share/vt/keymaps/bg.bds.ctrlcaps.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 + 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 + 237 nop nop nop nop nop nop nop nop O + 238 nop nop nop nop nop nop nop nop O + 239 nop nop nop nop nop nop nop nop O + 240 nop nop nop nop nop nop nop nop O + 241 nop nop nop nop nop nop nop nop O + 242 nop nop nop nop nop nop nop nop O + 243 nop nop nop nop nop nop nop nop O + 244 nop nop nop nop nop nop nop nop O + 245 nop nop nop nop nop nop nop nop O + 246 nop nop nop nop nop nop nop nop O + 247 nop nop nop nop nop nop nop nop O + 248 nop nop nop nop nop nop nop nop O + 249 nop nop nop nop nop nop nop nop O + 250 nop nop nop nop nop nop nop nop O + 251 nop nop nop nop nop nop nop nop O + 252 nop nop nop nop nop nop nop nop O + 253 nop nop nop nop nop nop nop nop O + 254 nop nop nop nop nop nop nop nop O + 255 nop nop nop nop nop nop nop nop O Modified: head/share/vt/keymaps/ca-fr.kbd ============================================================================== --- head/share/vt/keymaps/ca-fr.kbd Thu Aug 21 20:10:05 2014 (r270299) +++ head/share/vt/keymaps/ca-fr.kbd Thu Aug 21 20:33:09 2014 (r270300) @@ -61,7 +61,7 @@ 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 nop O + 052 '.' '.' nop nop '.' '.' nop nop O 053 0xe9 0xc9 nop nop dacu 0xc9 nop nop C 054 rshift rshift rshift rshift rshift rshift rshift rshift O 055 '*' '*' '*' '*' '*' '*' '*' '*' O Modified: head/share/vt/keymaps/ca.kbd ============================================================================== --- head/share/vt/keymaps/ca.kbd Thu Aug 21 20:10:05 2014 (r270299) +++ head/share/vt/keymaps/ca.kbd Thu Aug 21 20:33:09 2014 (r270300) @@ -46,7 +46,7 @@ 038 'l' 'L' ff ff 'l' 'L' ff ff C 039 ';' ':' nop nop '~' ':' nop nop O 040 ''' '"' nop nop dgra dgra nop nop O - 041 0x60 0x7e nop nop 0x60 0x7e nop nop O + 041 '`' '~' nop nop '`' '~' nop nop O 042 lshift lshift lshift lshift lshift lshift lshift lshift O 043 '\' '|' fs fs '<' '>' nop nop O 044 'z' 'Z' sub sub 'z' 'Z' sub sub C @@ -56,8 +56,8 @@ 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 ',' 0x3c nop nop 0x3c ''' nop nop O - 052 '.' 0x3e nop nop 0x3e '.' nop nop O + 051 ',' '<' nop nop '<' ''' nop nop O + 052 '.' '>' nop nop '>' '.' nop nop O 053 '/' '?' nop nop dacu 0xc9 nop nop C 054 rshift rshift rshift rshift rshift rshift rshift rshift O 055 '*' '*' '*' '*' '*' '*' '*' '*' O Copied: head/share/vt/keymaps/colemak.acc.kbd (from r270290, head/share/vt/keymaps/colemak.kbd) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/vt/keymaps/colemak.acc.kbd Thu Aug 21 20:33:09 2014 (r270300, copy of r270290, head/share/vt/keymaps/colemak.kbd) @@ -0,0 +1,147 @@ +# $FreeBSD$ +# +# Colemak Layout for FreeBSD console +# 2006-01-01 Shai Coleman, http://colemak.com/ . Public domain. + +# alt +# scan cntrl alt alt cntrl lock +# code base shift cntrl shift alt shift cntrl shift state +# ------------------------------------------------------------------ + + 041 '`' '~' nop nop dtil '~' nop nop O + 002 '1' '!' nop nop 0xa1 0xb9 nop nop O + 003 '2' '@' nul nul 0xba 0xb2 nul nul O + 004 '3' '#' nop nop 0xaa 0xb3 nop nop O + 005 '4' '$' nop nop 0xa2 0xa3 nop nop O + 006 '5' '%' nop nop 0xa4 0xa5 nop nop O + 007 '6' '^' rs rs '~' '~' rs rs O + 008 '7' '&' nop nop 0xf0 0xd0 nop nop O + 009 '8' '*' nop nop 0xfe 0xde nop nop O + 010 '9' '(' nop nop '~' '~' nop nop O + 011 '0' ')' nop nop '~' '~' nop nop O + 012 '-' '_' us us '~' '~' us us O + 013 '=' '+' nop nop 0xd7 0xf7 nop nop O + + 016 'q' 'Q' dc1 dc1 0xe4 0xc4 dc1 dc1 C + 017 'w' 'W' etb etb 0xe5 0xc5 etb etb C + 018 'f' 'F' ack ack 0xe3 0xc3 ack ack C + 019 'p' 'P' dle dle 0xf8 0xd8 dle dle C + 020 'g' 'G' bel bel '~' '~' bel bel C + 021 'j' 'J' nl nl '~' '~' nl nl C + 022 'l' 'L' ff ff '~' '~' ff ff C + 023 'u' 'U' nak nak 0xfa 0xda nak nak C + 024 'y' 'Y' em em 0xfc 0xdc em em C + 025 ';' ':' nop nop 0xf6 0xd6 nop nop O + 026 '[' '{' esc esc 0xab '~' esc esc O + 027 ']' '}' gs gs 0xbb '~' gs gs O + 043 '\' '|' fs fs '~' '~' fs fs O + + 030 'a' 'A' soh soh 0xe1 0xc1 soh soh C + 031 'r' 'R' dc2 dc2 dgra '~' dc2 dc2 C + 032 's' 'S' dc3 dc3 0xdf '~' dc3 dc3 C + 033 't' 'T' dc4 dc4 dacu '~' dc4 dc4 C + 034 'd' 'D' eot eot duml '~' eot eot C + 035 'h' 'H' bs bs '~' '~' bs bs C + 036 'n' 'N' so so 0xf1 0xd1 so so C + 037 'e' 'E' enq enq 0xe9 0xc9 enq enq C + 038 'i' 'I' ht ht 0xed 0xcd ht ht C + 039 'o' 'O' si si 0xf3 0xd3 si si C + 040 ''' '"' nop nop 0xf5 0xd5 nop nop O + + 044 'z' 'Z' sub sub 0xe6 0xc6 sub sub C + 045 'x' 'X' can can dcir '~' can can C + 046 'c' 'C' etx etx 0xe7 0xc7 etx etx C + 047 'v' 'V' syn syn 0xbd 0xbc syn syn C + 048 'b' 'B' stx stx '~' '~' stx stx C + 049 'k' 'K' vt vt drin '~' vt vt C + 050 'm' 'M' cr cr '~' '~' cr cr C + 051 ',' '<' nop nop dced '~' nop nop O + 052 '.' '>' nop nop '~' '~' nop nop O + 053 '/' '?' nop nop 0xbf '~' nop nop O + + 058 bs bs bs bs bs bs bs bs O + 086 '-' '_' us us '~' '~' us us O + 057 ' ' ' ' nul nul ' ' ' ' susp susp O + + 000 nop nop nop nop nop nop nop nop O + 001 esc esc esc esc esc esc debug debug O + 014 bs bs del del bs bs del del O + 015 ht btab nscr nscr ht btab nop nop O + 028 cr cr nl nl cr cr nl nl O + 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O + 042 lshift lshift lshift lshift lshift lshift lshift lshift O + 054 rshift rshift rshift rshift rshift rshift rshift rshift O + 055 '*' '*' '*' '*' '*' '*' '*' '*' O + 056 lalt lalt lalt lalt lalt lalt lalt lalt 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 + 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 nscr nop nop debug debug debug debug O + 093 ralt ralt ralt ralt ralt ralt ralt ralt O + 094 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 O + 095 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 O + 096 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 O + 097 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 O + 098 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 O + 099 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 O + 100 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 O + 101 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 O + 102 fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 O + 103 fkey61 fkey61 fkey61 fkey61 fkey61 fkey61 boot fkey61 O + 104 saver saver susp susp nop nop susp susp 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 + + dgra '`' ( 'a' 0xe0 ) ( 'A' 0xc0 ) ( 'e' 0xe8 ) ( 'E' 0xc8 ) + ( 'i' 0xec ) ( 'I' 0xcc ) ( 'o' 0xf2 ) ( 'O' 0xd2 ) + ( 'u' 0xf9 ) ( 'U' 0xd9 ) + + dacu 0xb4 ( 'a' 0xe1 ) ( 'A' 0xc1 ) ( 'e' 0xe9 ) ( 'E' 0xc9 ) + ( 'i' 0xed ) ( 'I' 0xcd ) ( 'o' 0xf3 ) ( 'O' 0xd3 ) + ( 'u' 0xfa ) ( 'U' 0xda ) ( 'y' 0xfd ) ( 'Y' 0xdd ) + + dcir '^' ( 'a' 0xe2 ) ( 'A' 0xc2 ) ( 'e' 0xea ) ( 'E' 0xca ) + ( 'i' 0xee ) ( 'I' 0xce ) ( 'o' 0xf4 ) ( 'O' 0xd4 ) + ( 'u' 0xfb ) ( 'U' 0xdb ) + + dtil '~' ( 'a' 0xe3 ) ( 'A' 0xc3 ) ( 'n' 0xf1 ) ( 'N' 0xd1 ) + ( 'o' 0xf5 ) ( 'O' 0xd5 ) + + duml 0xa8 ( 'a' 0xe4 ) ( 'A' 0xc4 ) ( 'e' 0xeb ) ( 'E' 0xcb ) + ( 'i' 0xef ) ( 'I' 0xcf ) ( 'o' 0xf6 ) ( 'O' 0xd6 ) + ( 'u' 0xfc ) ( 'U' 0xdc ) ( 'y' 0xff ) + + drin 0xb0 ( 'a' 0xe5 ) ( 'A' 0xc5 ) + + dced 0xb8 ( 'c' 0xe7 ) ( 'C' 0xc7 ) Modified: head/share/vt/keymaps/jp.pc98.kbd ============================================================================== --- head/share/vt/keymaps/jp.pc98.kbd Thu Aug 21 20:10:05 2014 (r270299) +++ head/share/vt/keymaps/jp.pc98.kbd Thu Aug 21 20:33:09 2014 (r270300) @@ -16,7 +16,7 @@ 010 '0' nop '0' '0' '0' ')' ')' ')' O 011 '-' '=' '-' '-' '-' '_' us us O 012 '^' '`' rs rs '=' '+' '+' '+' O - 013 0xa5 '|' fs fs 0xa5 '|' fs fs O + 013 '\' '|' fs fs 0xa5 '|' fs fs O 014 bs bs bs bs bs bs bs bs O 015 ht btab ht btab ht btab ht btab O 016 'q' 'Q' dc1 dc1 'q' 'Q' dc1 dc1 C @@ -54,7 +54,7 @@ 048 ',' '<' '<' '<' ',' '<' '<' '<' O 049 '.' '>' '>' '>' '.' '>' '>' '>' O 050 '/' '?' del del '/' '?' del del O - 051 '\' '_' us us '\' '|' fs fs O + 051 nop '_' us us '\' '|' fs fs O 052 ' ' ' ' nul nul ' ' ' ' nul nul O 053 esc esc esc esc esc esc esc esc O 054 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 O From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 20:35:40 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3C65B61F; Thu, 21 Aug 2014 20:35:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 284A0345E; Thu, 21 Aug 2014 20:35:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LKZe59073823; Thu, 21 Aug 2014 20:35:40 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LKZeTg073822; Thu, 21 Aug 2014 20:35:40 GMT (envelope-from se@FreeBSD.org) Message-Id: <201408212035.s7LKZeTg073822@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Thu, 21 Aug 2014 20:35:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270301 - head/tools/tools/vt/keymaps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 20:35:40 -0000 Author: se Date: Thu Aug 21 20:35:39 2014 New Revision: 270301 URL: http://svnweb.freebsd.org/changeset/base/270301 Log: Modify a few output file names as used with vt. MFC after: 3 days Modified: head/tools/tools/vt/keymaps/KBDFILES.map Modified: head/tools/tools/vt/keymaps/KBDFILES.map ============================================================================== --- head/tools/tools/vt/keymaps/KBDFILES.map Thu Aug 21 20:33:09 2014 (r270300) +++ head/tools/tools/vt/keymaps/KBDFILES.map Thu Aug 21 20:35:39 2014 (r270301) @@ -12,7 +12,7 @@ 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.from-iso1 (only AltGr-Shift-6 differs from CP850) ISO8859-1 br275.iso.acc.kbd br.kbd @@ -24,7 +24,7 @@ ISO8859-5 by.iso5.kbd by.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.qwerty.kbd.from-ce From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 20:55:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7C7528C; Thu, 21 Aug 2014 20:55:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C35DF3675; Thu, 21 Aug 2014 20:55:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LKtA4g083121; Thu, 21 Aug 2014 20:55:10 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LKtANH083119; Thu, 21 Aug 2014 20:55:10 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201408212055.s7LKtANH083119@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 21 Aug 2014 20:55:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270303 - in head: sys/sys usr.bin/elfdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 20:55:11 -0000 Author: emaste Date: Thu Aug 21 20:55:10 2014 New Revision: 270303 URL: http://svnweb.freebsd.org/changeset/base/270303 Log: Rename DT_FEATURE_1 to DT_FEATURE This provides a minor cleanup in elfdump; there are otherwise no consumers in the tree. Old SUN documentation can be found for either variant, but GNU binutils switched to DT_FEATURE around 2000. Sponsored by: The FreeBSD Foundation Modified: head/sys/sys/elf_common.h head/usr.bin/elfdump/elfdump.c Modified: head/sys/sys/elf_common.h ============================================================================== --- head/sys/sys/elf_common.h Thu Aug 21 20:36:22 2014 (r270302) +++ head/sys/sys/elf_common.h Thu Aug 21 20:55:10 2014 (r270303) @@ -426,7 +426,7 @@ typedef struct { #define DT_PLTPADSZ 0x6ffffdf9 /* pltpadding size */ #define DT_MOVEENT 0x6ffffdfa /* move table entry size */ #define DT_MOVESZ 0x6ffffdfb /* move table size */ -#define DT_FEATURE_1 0x6ffffdfc /* feature holder */ +#define DT_FEATURE 0x6ffffdfc /* feature holder */ #define DT_POSFLAG_1 0x6ffffdfd /* flags for DT_* entries, effecting */ /* the following DT_* entry. */ /* See DF_P1_* definitions */ Modified: head/usr.bin/elfdump/elfdump.c ============================================================================== --- head/usr.bin/elfdump/elfdump.c Thu Aug 21 20:36:22 2014 (r270302) +++ head/usr.bin/elfdump/elfdump.c Thu Aug 21 20:55:10 2014 (r270303) @@ -213,7 +213,7 @@ d_tags(u_int64_t tag) case DT_PLTPADSZ: return "DT_PLTPADSZ"; case DT_MOVEENT: return "DT_MOVEENT"; case DT_MOVESZ: return "DT_MOVESZ"; - case 0x6ffffdfc: return "DT_FEATURE"; + case DT_FEATURE: return "DT_FEATURE"; case DT_POSFLAG_1: return "DT_POSFLAG_1"; case DT_SYMINSZ: return "DT_SYMINSZ"; case DT_SYMINENT : return "DT_SYMINENT (DT_VALRNGHI)"; From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 20:58:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3990049B; Thu, 21 Aug 2014 20:58:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2555F36AC; Thu, 21 Aug 2014 20:58:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LKwiWq083598; Thu, 21 Aug 2014 20:58:44 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LKwi6e083597; Thu, 21 Aug 2014 20:58:44 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201408212058.s7LKwi6e083597@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 21 Aug 2014 20:58:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270304 - head/usr.bin/elfdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 20:58:44 -0000 Author: emaste Date: Thu Aug 21 20:58:43 2014 New Revision: 270304 URL: http://svnweb.freebsd.org/changeset/base/270304 Log: elfdump: Remove extraneous _SUNW_ in reported DT_ names Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/elfdump/elfdump.c Modified: head/usr.bin/elfdump/elfdump.c ============================================================================== --- head/usr.bin/elfdump/elfdump.c Thu Aug 21 20:55:10 2014 (r270303) +++ head/usr.bin/elfdump/elfdump.c Thu Aug 21 20:58:43 2014 (r270304) @@ -221,11 +221,11 @@ d_tags(u_int64_t tag) case DT_GNU_HASH: return "DT_GNU_HASH"; case 0x6ffffef8: return "DT_GNU_CONFLICT"; case 0x6ffffef9: return "DT_GNU_LIBLIST"; - case 0x6ffffefa: return "DT_SUNW_CONFIG"; - case 0x6ffffefb: return "DT_SUNW_DEPAUDIT"; - case 0x6ffffefc: return "DT_SUNW_AUDIT"; - case 0x6ffffefd: return "DT_SUNW_PLTPAD"; - case 0x6ffffefe: return "DT_SUNW_MOVETAB"; + case DT_CONFIG: return "DT_CONFIG"; + case DT_DEPAUDIT: return "DT_DEPAUDIT"; + case DT_AUDIT: return "DT_AUDIT"; + case DT_PLTPAD: return "DT_PLTPAD"; + case DT_MOVETAB: return "DT_MOVETAB"; case DT_SYMINFO : return "DT_SYMINFO (DT_ADDRRNGHI)"; case DT_RELACOUNT: return "DT_RELACOUNT"; case DT_RELCOUNT: return "DT_RELCOUNT"; From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 21:05:59 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29B61674; Thu, 21 Aug 2014 21:05:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15716376F; Thu, 21 Aug 2014 21:05:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LL5wO9087917; Thu, 21 Aug 2014 21:05:58 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LL5w2l087915; Thu, 21 Aug 2014 21:05:58 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201408212105.s7LL5w2l087915@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Thu, 21 Aug 2014 21:05:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270305 - in head/sys/cam: ata scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 21:05:59 -0000 Author: sbruno Date: Thu Aug 21 21:05:58 2014 New Revision: 270305 URL: http://svnweb.freebsd.org/changeset/base/270305 Log: Add the Samsung 843T as a 4k enabled drive Submitted by: Jason Wolfe MFC after: 2 weeks Sponsored by: Limelight Networks Modified: head/sys/cam/ata/ata_da.c head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Thu Aug 21 20:58:43 2014 (r270304) +++ head/sys/cam/ata/ata_da.c Thu Aug 21 21:05:58 2014 (r270305) @@ -451,6 +451,14 @@ static struct ada_quirk_entry ada_quirk_ }, { /* + * Samsung 843T Series SSDs + * 4k optimised + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "SAMSUNG MZ7WD*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* * SuperTalent TeraDrive CT SSDs * 4k optimised & trim only works in 4k requests + 4k aligned */ Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Thu Aug 21 20:58:43 2014 (r270304) +++ head/sys/cam/scsi/scsi_da.c Thu Aug 21 21:05:58 2014 (r270305) @@ -1119,6 +1119,14 @@ static struct da_quirk_entry da_quirk_ta }, { /* + * Samsung 843T Series SSDs + * 4k optimised + */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "SAMSUNG MZ7WD*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* * SuperTalent TeraDrive CT SSDs * 4k optimised & trim only works in 4k requests + 4k aligned */ From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 21:36:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 95BC5A1; Thu, 21 Aug 2014 21:36:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8106039F2; Thu, 21 Aug 2014 21:36:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LLa7u9001695; Thu, 21 Aug 2014 21:36:07 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LLa7cu001694; Thu, 21 Aug 2014 21:36:07 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201408212136.s7LLa7cu001694@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 21 Aug 2014 21:36:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270306 - stable/10/sys/modules/aic7xxx/ahc/ahc_eisa X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 21:36:07 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 21:48:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 51D4C2C3; Thu, 21 Aug 2014 21:48:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 212683ACA; Thu, 21 Aug 2014 21:48:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LLmYIa006654; Thu, 21 Aug 2014 21:48:35 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LLmYwa006646; Thu, 21 Aug 2014 21:48:34 GMT (envelope-from se@FreeBSD.org) Message-Id: <201408212148.s7LLmYwa006646@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Thu, 21 Aug 2014 21:48:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270307 - stable/10/share/syscons/keymaps X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 21:48:35 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 21:53:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ACF84681; Thu, 21 Aug 2014 21:53:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8958E3B87; Thu, 21 Aug 2014 21:53:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LLriVr010523; Thu, 21 Aug 2014 21:53:44 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LLrhk0010520; Thu, 21 Aug 2014 21:53:43 GMT (envelope-from se@FreeBSD.org) Message-Id: <201408212153.s7LLrhk0010520@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Thu, 21 Aug 2014 21:53:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270308 - stable/10/tools/tools/vt/keymaps X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 21:53:44 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 21:57:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE9D88D1; Thu, 21 Aug 2014 21:57:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7FDFD3BA8; Thu, 21 Aug 2014 21:57:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LLvJox011051; Thu, 21 Aug 2014 21:57:19 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LLvJcX011048; Thu, 21 Aug 2014 21:57:19 GMT (envelope-from se@FreeBSD.org) Message-Id: <201408212157.s7LLvJcX011048@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Thu, 21 Aug 2014 21:57:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270309 - stable/10/usr.sbin/kbdmap X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 21:57:19 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 22:04:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1BDFBAAD; Thu, 21 Aug 2014 22:04:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 03FF33C73; Thu, 21 Aug 2014 22:04:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LM4IWV015260; Thu, 21 Aug 2014 22:04:18 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LM4HVu015249; Thu, 21 Aug 2014 22:04:17 GMT (envelope-from se@FreeBSD.org) Message-Id: <201408212204.s7LM4HVu015249@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Thu, 21 Aug 2014 22:04:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270310 - stable/10/share/vt/keymaps X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 22:04:19 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 22:42:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B7A8EA04; Thu, 21 Aug 2014 22:42:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A3D5F306A; Thu, 21 Aug 2014 22:42:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LMg2e2033170; Thu, 21 Aug 2014 22:42:02 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LMg2eR033169; Thu, 21 Aug 2014 22:42:02 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201408212242.s7LMg2eR033169@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 21 Aug 2014 22:42:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270311 - head/sys/modules/aic7xxx/ahc/ahc_eisa X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 22:42:02 -0000 Author: ian Date: Thu Aug 21 22:42:02 2014 New Revision: 270311 URL: http://svnweb.freebsd.org/changeset/base/270311 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: head/sys/modules/aic7xxx/ahc/ahc_eisa/Makefile Modified: head/sys/modules/aic7xxx/ahc/ahc_eisa/Makefile ============================================================================== --- head/sys/modules/aic7xxx/ahc/ahc_eisa/Makefile Thu Aug 21 22:04:17 2014 (r270310) +++ head/sys/modules/aic7xxx/ahc/ahc_eisa/Makefile Thu Aug 21 22:42:02 2014 (r270311) @@ -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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 22:42:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 991C9B4F; Thu, 21 Aug 2014 22:42:30 +0000 (UTC) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6BD433071; Thu, 21 Aug 2014 22:42:30 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1XKb3s-00043W-QN; Thu, 21 Aug 2014 22:42:28 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id s7LMgRMr057094; Thu, 21 Aug 2014 16:42:27 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX19eofEmCMy9GHwgXfQ0zoMq X-Authentication-Warning: paranoia.hippie.lan: Host revolution.hippie.lan [172.22.42.240] claimed to be [172.22.42.240] Subject: Re: svn commit: r270306 - stable/10/sys/modules/aic7xxx/ahc/ahc_eisa From: Ian Lepore To: src-committers@freebsd.org In-Reply-To: <201408212136.s7LLa7cu001694@svn.freebsd.org> References: <201408212136.s7LLa7cu001694@svn.freebsd.org> Content-Type: text/plain; charset="us-ascii" Date: Thu, 21 Aug 2014 16:42:27 -0600 Message-ID: <1408660947.1150.37.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 22:42:30 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 22:44:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5AB92D13; Thu, 21 Aug 2014 22:44:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43DCE308F; Thu, 21 Aug 2014 22:44:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LMiBS4033533; Thu, 21 Aug 2014 22:44:11 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LMi8L4033507; Thu, 21 Aug 2014 22:44:08 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201408212244.s7LMi8L4033507@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Thu, 21 Aug 2014 22:44:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org 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 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 22:44:11 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 22:47:04 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 66E47FCF; Thu, 21 Aug 2014 22:47:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38CFF30C8; Thu, 21 Aug 2014 22:47:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LMl473033980; Thu, 21 Aug 2014 22:47:04 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LMl3JM033978; Thu, 21 Aug 2014 22:47:03 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201408212247.s7LMl3JM033978@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Thu, 21 Aug 2014 22:47:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270313 - in stable/10/sys/cam: ata scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 22:47:04 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 22:49:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6B70F1A5; Thu, 21 Aug 2014 22:49:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F4DB30D8; Thu, 21 Aug 2014 22:49:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LMngHZ035792; Thu, 21 Aug 2014 22:49:42 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LMngTL035791; Thu, 21 Aug 2014 22:49:42 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201408212249.s7LMngTL035791@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 21 Aug 2014 22:49:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270314 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 22:49:42 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Aug 21 22:53:15 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C8CE4AB; Thu, 21 Aug 2014 22:53:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 180DD31E4; Thu, 21 Aug 2014 22:53:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LMrEHx041125; Thu, 21 Aug 2014 22:53:14 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LMrEfj041124; Thu, 21 Aug 2014 22:53:14 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201408212253.s7LMrEfj041124@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 21 Aug 2014 22:53:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270315 - head/cddl/contrib/opensolaris/cmd/lockstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 22:53:15 -0000 Author: delphij Date: Thu Aug 21 22:53:14 2014 New Revision: 270315 URL: http://svnweb.freebsd.org/changeset/base/270315 Log: Include two headers to provide prototype for modfind(2) and kldload(2). MFC after: 2 weeks Modified: head/cddl/contrib/opensolaris/cmd/lockstat/sym.c Modified: head/cddl/contrib/opensolaris/cmd/lockstat/sym.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/lockstat/sym.c Thu Aug 21 22:49:41 2014 (r270314) +++ head/cddl/contrib/opensolaris/cmd/lockstat/sym.c Thu Aug 21 22:53:14 2014 (r270315) @@ -50,6 +50,9 @@ /* FreeBSD */ #include #include +#include +#include +#include #endif #include From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 00:54:00 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E244F493; Fri, 22 Aug 2014 00:54:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CDAB03DD9; Fri, 22 Aug 2014 00:54:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7M0s0M6096577; Fri, 22 Aug 2014 00:54:00 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7M0s0As096576; Fri, 22 Aug 2014 00:54:00 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201408220054.s7M0s0As096576@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 22 Aug 2014 00:54:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270316 - stable/10/etc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 00:54:01 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 01:23:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ECCD4C21; Fri, 22 Aug 2014 01:23:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D81D23124; Fri, 22 Aug 2014 01:23:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7M1NcHZ010141; Fri, 22 Aug 2014 01:23:38 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7M1NckW010140; Fri, 22 Aug 2014 01:23:38 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201408220123.s7M1NckW010140@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 22 Aug 2014 01:23:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270317 - head/cddl/usr.sbin/lockstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 01:23:39 -0000 Author: delphij Date: Fri Aug 22 01:23:38 2014 New Revision: 270317 URL: http://svnweb.freebsd.org/changeset/base/270317 Log: Fix powerpc build: Chase r270227 and compile lockstat with C99 standard. Suggested by: bde Modified: head/cddl/usr.sbin/lockstat/Makefile Modified: head/cddl/usr.sbin/lockstat/Makefile ============================================================================== --- head/cddl/usr.sbin/lockstat/Makefile Fri Aug 22 00:54:00 2014 (r270316) +++ head/cddl/usr.sbin/lockstat/Makefile Fri Aug 22 01:23:38 2014 (r270317) @@ -18,6 +18,7 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ -I${.CURDIR}/../../../sys CFLAGS+= -DNEED_ERRLOC -g +CSTD?= gnu99 #YFLAGS+= -d From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 04:31:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B0C6B9E; Fri, 22 Aug 2014 04:31:03 +0000 (UTC) Received: from mail-qg0-x22e.google.com (mail-qg0-x22e.google.com [IPv6:2607:f8b0:400d:c04::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BF6F730C2; Fri, 22 Aug 2014 04:31:02 +0000 (UTC) Received: by mail-qg0-f46.google.com with SMTP id z60so6225721qgd.5 for ; Thu, 21 Aug 2014 21:31:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=PNKiBHAtrU/yChkz5MjcanP3z4+fXKJvpP+LDvfQJME=; b=QZey0x/DAQrOubpPA+3knm2HbpciuWd2xbo3CbBdJnFK0Te9ReFBI+ZZcBY+usFYCa XgzARnuwKoe+t42F35RdXGFcwA8W4DHP4HbZi8EjSqsSo4vqNLBu323q0vUSUzcJeKeV Xly/xsNMM63s2lQSnfDg6gBb21VgjGz7eLCMQmunpHVp1Nt525BYu1ktXoKamBEbLKhH iYF6/Am6ZqRcLMIGwm4rljsNDg4NhDP7JaD6yWhqNu6fi6L9q7ETV4AOVDbdsCb2Ibap CoPoVaU0I7LDVhxPibm89+m0PkTq97cvNF27VDKgXh9m7i+NkSoOWAaIQpsQ+kWZXSio zEgg== MIME-Version: 1.0 X-Received: by 10.224.37.134 with SMTP id x6mr4418716qad.39.1408681861824; Thu, 21 Aug 2014 21:31:01 -0700 (PDT) Received: by 10.140.84.80 with HTTP; Thu, 21 Aug 2014 21:31:01 -0700 (PDT) In-Reply-To: <201408202258.s7KMwDh3073409@svn.freebsd.org> References: <201408202258.s7KMwDh3073409@svn.freebsd.org> Date: Thu, 21 Aug 2014 21:31:01 -0700 Message-ID: Subject: Re: svn commit: r270249 - head/sys/cam/ata From: Neel Natu To: Warner Losh Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 04:31:03 -0000 Hi Warner, On Wed, Aug 20, 2014 at 3:58 PM, Warner Losh wrote: > Author: imp > Date: Wed Aug 20 22:58:12 2014 > New Revision: 270249 > URL: http://svnweb.freebsd.org/changeset/base/270249 > > Log: > 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). > > Modified: > head/sys/cam/ata/ata_xpt.c > > Modified: head/sys/cam/ata/ata_xpt.c > ============================================================================== > --- head/sys/cam/ata/ata_xpt.c Wed Aug 20 22:39:26 2014 (r270248) > +++ head/sys/cam/ata/ata_xpt.c Wed Aug 20 22:58:12 2014 (r270249) > @@ -458,12 +458,18 @@ negotiate: > 0, 0x02); > break; > case PROBE_SETAN: > - /* Remember what transport thinks about AEN. */ > - if (softc->caps & CTS_SATA_CAPS_H_AN) > + /* > + * Only ATAPI defines this bit to mean AEN, but remember > + * what transport thinks about AEN. > + */ > + if ((softc->caps & CTS_SATA_CAPS_H_AN) && > + periph->path->device->protocol == PROTO_ATAPI) > path->device->inq_flags |= SID_AEN; > else > path->device->inq_flags &= ~SID_AEN; > xpt_async(AC_GETDEV_CHANGED, path, NULL); > + if (periph->path->device->protocol != PROTO_ATAPI) > + break; > cam_fill_ataio(ataio, > 1, > probedone, > @@ -750,14 +756,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. > This change causes a panic for me on boot. Here is the boot log: ahci0: port 0xf050-0xf057,0xf040-0xf043,0xf030-0xf037,0xf020-0xf023,0xf000-0xf01f mem 0xfbb21000-0xfbb217ff irq 18 at device 31.2 on pci0 ahci0: AHCI v1.30 with 6 6Gbps ports, Port Multiplier not supported ahcich0: at channel 0 on ahci0 ahcich1: at channel 1 on ahci0 ahcich2: at channel 2 on ahci0 ahcich3: at channel 3 on ahci0 ahcich4: at channel 4 on ahci0 ahcich5: at channel 5 on ahci0 ahciem0: on ahci0 ... xpt_action_default: CCB type 0xdeadc0de not supported ... run_interrupt_driven_hooks: still waiting after 60 seconds for xpt_config run_interrupt_driven_hooks: still waiting after 120 seconds for xpt_config run_interrupt_driven_hooks: still waiting after 180 seconds for xpt_config run_interrupt_driven_hooks: still waiting after 240 seconds for xpt_config run_interrupt_driven_hooks: still waiting after 300 seconds for xpt_config panic: run_interrupt_driven_config_hooks: waited too long cpuid = 0 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xffffffff81d92920 kdb_backtrace() at kdb_backtrace+0x39/frame 0xffffffff81d929d0 vpanic() at vpanic+0x189/frame 0xffffffff81d92a50 kassert_panic() at kassert_panic+0x139/frame 0xffffffff81d92ac0 boot_run_interrupt_driven_config_hooks() at boot_run_interrupt_driven_config_hooks+0x111/frame 0xffffffff81d92b50 mi_startup()fffff81d92b70 btext() at btext+0x2c KDB: enter: panic [ thread pid 0 tid 100000 ] Stopped at kdb_enter+0x3e: movq $0,kdb_why db> The peripheral in question is a SATA attached CDROM: % camcontrol devlist at scbus0 target 0 lun 0 (pass0,ada0) at scbus2 target 0 lun 0 (cd0,pass1) at scbus3 target 0 lun 0 (pass2,ada1) at scbus4 target 0 lun 0 (pass3,ada2) at scbus6 target 0 lun 0 (ses0,pass4) pass1 at ahcich2 bus 0 scbus2 target 0 lun 0 pass1: Removable CD-ROM SCSI-0 device pass1: Serial Number 3524472 2N8225501140 pass1: 150.000MB/s transfers (SATA 1.x, UDMA5, ATAPI 12bytes, PIO 8192bytes) The following patch fixes the panic. Index: sys/cam/ata/ata_xpt.c =================================================================== --- sys/cam/ata/ata_xpt.c (revision 270249) +++ sys/cam/ata/ata_xpt.c (working copy) @@ -468,7 +468,8 @@ else path->device->inq_flags &= ~SID_AEN; xpt_async(AC_GETDEV_CHANGED, path, NULL); - if (periph->path->device->protocol != PROTO_ATAPI) + if (periph->path->device->protocol != PROTO_ATAPI && + periph->path->device->protocol != PROTO_SCSI) break; cam_fill_ataio(ataio, 1, However, there seem to be a couple of issues with the original patch: 1. The 'periph->path->device->protocol' is not initialized to PROTO_ATAPI anywhere in the tree so the not-equal-to test is a no-op. 2. It seems not right to break out of switch in 'probestart()' without providing a way for 'probedone()' to be called. I believe that this stops the state machine from making forward progress and results in 'xpt_config()' not completing. If you need more information to debug this some more or test a proper fix then I am happy to help. best Neel From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 05:03:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 407EC99; Fri, 22 Aug 2014 05:03:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 125CC33DF; Fri, 22 Aug 2014 05:03:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7M53U8o008949; Fri, 22 Aug 2014 05:03:30 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7M53UWv008948; Fri, 22 Aug 2014 05:03:30 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201408220503.s7M53UWv008948@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Fri, 22 Aug 2014 05:03:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270318 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 05:03:31 -0000 Author: hrs Date: Fri Aug 22 05:03:30 2014 New Revision: 270318 URL: http://svnweb.freebsd.org/changeset/base/270318 Log: Fix a panic which occurs in a VIMAGE-enabled kernel after r270158, and separate socket_hhook_register() part and put it into VNET_SYS{,UN}INIT() handler. Discussed with: marcel Modified: head/sys/kern/uipc_socket.c Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Fri Aug 22 01:23:38 2014 (r270317) +++ head/sys/kern/uipc_socket.c Fri Aug 22 05:03:30 2014 (r270318) @@ -271,9 +271,16 @@ socket_hhook_register(int subtype) } static void +socket_hhook_deregister(int subtype) +{ + + if (hhook_head_deregister(V_socket_hhh[subtype]) != 0) + printf("%s: WARNING: unable to deregister hook\n", __func__); +} + +static void socket_init(void *tag) { - int i; socket_zone = uma_zcreate("socket", sizeof(struct socket), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); @@ -281,13 +288,31 @@ socket_init(void *tag) uma_zone_set_warning(socket_zone, "kern.ipc.maxsockets limit reached"); EVENTHANDLER_REGISTER(maxsockets_change, socket_zone_change, NULL, EVENTHANDLER_PRI_FIRST); +} +SYSINIT(socket, SI_SUB_PROTO_DOMAININIT, SI_ORDER_ANY, socket_init, NULL); + +static void +socket_vnet_init(const void *unused __unused) +{ + int i; /* We expect a contiguous range */ - for (i = 0; i <= HHOOK_SOCKET_LAST; i++) { + for (i = 0; i <= HHOOK_SOCKET_LAST; i++) socket_hhook_register(i); - } } -SYSINIT(socket, SI_SUB_PROTO_DOMAININIT, SI_ORDER_ANY, socket_init, NULL); +VNET_SYSINIT(socket_vnet_init, SI_SUB_PROTO_DOMAININIT, SI_ORDER_ANY, + socket_vnet_init, NULL); + +static void +socket_vnet_uninit(const void *unused __unused) +{ + int i; + + for (i = 0; i <= HHOOK_SOCKET_LAST; i++) + socket_hhook_deregister(i); +} +VNET_SYSUNINIT(socket_vnet_uninit, SI_SUB_PROTO_DOMAININIT, SI_ORDER_ANY, + socket_vnet_uninit, NULL); /* * Initialise maxsockets. This SYSINIT must be run after @@ -376,12 +401,15 @@ soalloc(struct vnet *vnet) #endif mtx_unlock(&so_global_mtx); + CURVNET_SET(vnet); /* We shouldn't need the so_global_mtx */ if (V_socket_hhh[HHOOK_SOCKET_CREATE]->hhh_nhooks > 0) { if (hhook_run_socket(so, NULL, HHOOK_SOCKET_CREATE)) /* Do we need more comprehensive error returns? */ - return (NULL); + so = NULL; } + CURVNET_RESTORE(); + return (so); } @@ -418,8 +446,10 @@ sodealloc(struct socket *so) #ifdef MAC mac_socket_destroy(so); #endif + CURVNET_SET(so->so_vnet); if (V_socket_hhh[HHOOK_SOCKET_CLOSE]->hhh_nhooks > 0) hhook_run_socket(so, NULL, HHOOK_SOCKET_CLOSE); + CURVNET_RESTORE(); crfree(so->so_cred); khelp_destroy_osd(&so->osd); From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 05:34:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9C932618 for ; Fri, 22 Aug 2014 05:34:55 +0000 (UTC) Received: from mail-pa0-f45.google.com (mail-pa0-f45.google.com [209.85.220.45]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 61875362E for ; Fri, 22 Aug 2014 05:34:54 +0000 (UTC) Received: by mail-pa0-f45.google.com with SMTP id eu11so15868734pac.32 for ; Thu, 21 Aug 2014 22:34:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; bh=M56PJt+uAvDrwGyk4PhURAIgCei3in/1rJeldvoFeVE=; b=i01umXrgtPRE/HS1rCXS7XZCg65xVWQSTqity2vpLZ6mIR3XSJ2IxBXZWUvmaj8g0S H5tn6j7SszG3l6YUdCOohuZ3NDDjHmSMEO1r8QsopzOw3rMOBau0uVfVbpk3hyHd3mlU KbGo/GqYvVZMwS733Y0sKZwyZburt5RKdXTZf1u9rdwVHsFRSbypKeG48F74K1Bfd7U5 Jpyw2J6Mzp4ZRcAi9NRwTdMmwPpiag+uxB0SPQO5rHj61t9xNmBi6o2P7WoqBcf0vkqZ 4GNzCgwizAyPrFn4YsHTMby6XaoUR02Uum8TaK3IcYQu+3QI01T5jqkKZ7GyOcYMJtBh dPiw== X-Gm-Message-State: ALoCoQkVoC5YgoNnib2vGqfbCXT6t7Haobbr/2fv+HGKnpkG7t/ItwUegNKhrjBifm3sK8DXRNgr X-Received: by 10.68.162.3 with SMTP id xw3mr3558204pbb.142.1408685694083; Thu, 21 Aug 2014 22:34:54 -0700 (PDT) Received: from [10.64.25.67] (dc1-prod.netflix.com. [69.53.236.251]) by mx.google.com with ESMTPSA id rn7sm98276797pab.39.2014.08.21.22.34.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 21 Aug 2014 22:34:53 -0700 (PDT) Sender: Warner Losh Content-Type: multipart/signed; boundary="Apple-Mail=_087EAC53-4CC3-4EC0-BEA0-734653A71204"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r270249 - head/sys/cam/ata From: Warner Losh In-Reply-To: Date: Thu, 21 Aug 2014 23:34:49 -0600 Message-Id: <0DAF2357-4BBA-4D5B-8F17-D61845BACDA5@bsdimp.com> References: <201408202258.s7KMwDh3073409@svn.freebsd.org> To: Neel Natu X-Mailer: Apple Mail (2.1878.6) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 05:34:55 -0000 --Apple-Mail=_087EAC53-4CC3-4EC0-BEA0-734653A71204 Content-Type: multipart/mixed; boundary="Apple-Mail=_A472B53B-3FAE-4A43-9CDD-C534C8B6E52C" --Apple-Mail=_A472B53B-3FAE-4A43-9CDD-C534C8B6E52C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Aug 21, 2014, at 10:31 PM, Neel Natu wrote: > Hi Warner, >=20 > On Wed, Aug 20, 2014 at 3:58 PM, Warner Losh wrote: >> Author: imp >> Date: Wed Aug 20 22:58:12 2014 >> New Revision: 270249 >> URL: http://svnweb.freebsd.org/changeset/base/270249 >>=20 >> Log: >> 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). >>=20 >> Modified: >> head/sys/cam/ata/ata_xpt.c >>=20 >> Modified: head/sys/cam/ata/ata_xpt.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/cam/ata/ata_xpt.c Wed Aug 20 22:39:26 2014 = (r270248) >> +++ head/sys/cam/ata/ata_xpt.c Wed Aug 20 22:58:12 2014 = (r270249) >> @@ -458,12 +458,18 @@ negotiate: >> 0, 0x02); >> break; >> case PROBE_SETAN: >> - /* Remember what transport thinks about AEN. */ >> - if (softc->caps & CTS_SATA_CAPS_H_AN) >> + /* >> + * Only ATAPI defines this bit to mean AEN, but = remember >> + * what transport thinks about AEN. >> + */ >> + if ((softc->caps & CTS_SATA_CAPS_H_AN) && >> + periph->path->device->protocol =3D=3D = PROTO_ATAPI) >> path->device->inq_flags |=3D SID_AEN; >> else >> path->device->inq_flags &=3D ~SID_AEN; >> xpt_async(AC_GETDEV_CHANGED, path, NULL); >> + if (periph->path->device->protocol !=3D PROTO_ATAPI) >> + break; >> cam_fill_ataio(ataio, >> 1, >> probedone, >> @@ -750,14 +756,6 @@ out: >> goto noerror; >>=20 >> /* >> - * Some Samsung SSDs report supported Asynchronous = Notification, >> - * but return ABORT on attempt to enable it. >> - */ >> - } else if (softc->action =3D=3D PROBE_SETAN && >> - status =3D=3D 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. >>=20 >=20 > This change causes a panic for me on boot. Here is the boot log: >=20 > ahci0: port > 0xf050-0xf057,0xf040-0xf043,0xf030-0xf037,0xf020-0xf023,0xf000-0xf01f > mem 0xfbb21000-0xfbb217ff irq 18 at device 31.2 on pci0 > ahci0: AHCI v1.30 with 6 6Gbps ports, Port Multiplier not supported > ahcich0: at channel 0 on ahci0 > ahcich1: at channel 1 on ahci0 > ahcich2: at channel 2 on ahci0 > ahcich3: at channel 3 on ahci0 > ahcich4: at channel 4 on ahci0 > ahcich5: at channel 5 on ahci0 > ahciem0: on ahci0 > ... > xpt_action_default: CCB type 0xdeadc0de not supported > ... > run_interrupt_driven_hooks: still waiting after 60 seconds for = xpt_config > run_interrupt_driven_hooks: still waiting after 120 seconds for = xpt_config > run_interrupt_driven_hooks: still waiting after 180 seconds for = xpt_config > run_interrupt_driven_hooks: still waiting after 240 seconds for = xpt_config > run_interrupt_driven_hooks: still waiting after 300 seconds for = xpt_config > panic: run_interrupt_driven_config_hooks: waited too long > cpuid =3D 0 > KDB: stack backtrace: > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame = 0xffffffff81d92920 > kdb_backtrace() at kdb_backtrace+0x39/frame 0xffffffff81d929d0 > vpanic() at vpanic+0x189/frame 0xffffffff81d92a50 > kassert_panic() at kassert_panic+0x139/frame 0xffffffff81d92ac0 > boot_run_interrupt_driven_config_hooks() at > boot_run_interrupt_driven_config_hooks+0x111/frame 0xffffffff81d92b50 > mi_startup()fffff81d92b70 > btext() at btext+0x2c > KDB: enter: panic > [ thread pid 0 tid 100000 ] > Stopped at kdb_enter+0x3e: movq $0,kdb_why > db> >=20 > The peripheral in question is a SATA attached CDROM: >=20 > % camcontrol devlist > at scbus0 target 0 lun 0 = (pass0,ada0) > at scbus2 target 0 lun 0 = (cd0,pass1) > at scbus3 target 0 lun 0 = (pass2,ada1) > at scbus4 target 0 lun 0 = (pass3,ada2) > at scbus6 target 0 lun 0 = (ses0,pass4) >=20 > pass1 at ahcich2 bus 0 scbus2 target 0 lun 0 > pass1: Removable CD-ROM SCSI-0 device > pass1: Serial Number 3524472 2N8225501140 > pass1: 150.000MB/s transfers (SATA 1.x, UDMA5, ATAPI 12bytes, PIO = 8192bytes) >=20 > The following patch fixes the panic. >=20 > Index: sys/cam/ata/ata_xpt.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- sys/cam/ata/ata_xpt.c (revision 270249) > +++ sys/cam/ata/ata_xpt.c (working copy) > @@ -468,7 +468,8 @@ > else > path->device->inq_flags &=3D ~SID_AEN; > xpt_async(AC_GETDEV_CHANGED, path, NULL); > - if (periph->path->device->protocol !=3D PROTO_ATAPI) > + if (periph->path->device->protocol !=3D PROTO_ATAPI && > + periph->path->device->protocol !=3D PROTO_SCSI) > break; > cam_fill_ataio(ataio, > 1, I think the more proper test is =3D=3D PROTO_ATA elsewhere, since that=92s= what distinguishes the ATA_IDENTIFY from the ATAPI_IDENTIFY. > However, there seem to be a couple of issues with the original patch: >=20 > 1. The 'periph->path->device->protocol' is not initialized to > PROTO_ATAPI anywhere in the tree so the not-equal-to test is a no-op. We test here to determine which identify command to send: if (periph->path->device->protocol =3D=3D PROTO_ATA) ata_28bit_cmd(ataio, ATA_ATA_IDENTIFY, 0, 0, 0); else ata_28bit_cmd(ataio, ATA_ATAPI_IDENTIFY, 0, 0, = 0); and that is working to send the right command. > 2. It seems not right to break out of switch in 'probestart()' without > providing a way for 'probedone()' to be called. I believe that this > stops the state machine from making forward progress and results in > 'xpt_config()' not completing. That=92s a problem, you=92re right. Let me rework. > If you need more information to debug this some more or test a proper > fix then I am happy to help. Please try the one included here. I think it will address things. I=92ve = tried it on one system, and am trying it on others in parallel to = sending this. Warner --Apple-Mail=_A472B53B-3FAE-4A43-9CDD-C534C8B6E52C Content-Disposition: attachment; filename=ata-xpt-patch Content-Type: application/octet-stream; x-unix-mode=0664; name="ata-xpt-patch" Content-Transfer-Encoding: 7bit diff -r a293b21e7c58 sys/cam/ata/ata_xpt.c --- a/sys/cam/ata/ata_xpt.c +++ b/sys/cam/ata/ata_xpt.c @@ -458,18 +458,12 @@ negotiate: 0, 0x02); break; case PROBE_SETAN: - /* - * Only ATAPI defines this bit to mean AEN, but remember - * what transport thinks about AEN. - */ - if ((softc->caps & CTS_SATA_CAPS_H_AN) && - periph->path->device->protocol == PROTO_ATAPI) + /* Remember what transport thinks about AEN. */ + if (softc->caps & CTS_SATA_CAPS_H_AN) path->device->inq_flags |= SID_AEN; else path->device->inq_flags &= ~SID_AEN; xpt_async(AC_GETDEV_CHANGED, path, NULL); - if (periph->path->device->protocol != PROTO_ATAPI) - break; cam_fill_ataio(ataio, 1, probedone, @@ -1057,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); @@ -1178,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; --Apple-Mail=_A472B53B-3FAE-4A43-9CDD-C534C8B6E52C Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii --Apple-Mail=_A472B53B-3FAE-4A43-9CDD-C534C8B6E52C-- --Apple-Mail=_087EAC53-4CC3-4EC0-BEA0-734653A71204 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJT9tZ5AAoJEGwc0Sh9sBEAX7kP/1gLvkIaMbHs2q9c/UZFbe+I OgyxtY1d2xcYFpah/h3SakXIEQ4C41R73n88saZ+an8g9stdyrcDQMn7D8pSaWhV g8Un1+QhB/qYmXl5PM2ENbZY/h7BxArPZaeqscwdnqfS5Zs/xfAImD9mbPgTWaU9 W56iSmWeRTms/DDZ/OKEUqF9DOsYaG2iBhBZgmZeahHMaEK3WL48toAGyGvamspQ dUrHXqgv7meGd6XQOLLSbHUSEAOznkDmX1bsMWhJ9lko5SWNj2X6GGoSUgaopAKc zF9yT1P4dsrtTc6mdvSz4xZ1r4ZZKB9kxiVqrof0Nz+0H/q+t7Q8OFKl5RLoS6cV f/GZNvJQ4arCEzUN9SGkV7G97KJkrs5ck80ZU99fWD4BFCKt7z/emq7G5eVtnHXJ KLNu1Yl2o0fslTEOpKfA5Ogll68kZW0jtJooQhpIDyRjpMvAtpXKo1fxjrwH9kc5 D0iW3U6djWyEi0Gs3gdewyPf4sg4mLRt6lld7/YlOf4/Kld/o7BRw7m5fhel0Ftk UbK1c8UJxL3bvdmxsX8Y9Y2p7bfTwhl+4pekIe0reSrEaHHz0RukIhldVSA9yiC1 LMaO39w/KYlmBvc1RNMyh/4yidF5TgyxqTYkMdWw1/lQaR2P3tEuwRlyiUuCilxl w5U1uSfcTtfwPlx0XKXB =2tWf -----END PGP SIGNATURE----- --Apple-Mail=_087EAC53-4CC3-4EC0-BEA0-734653A71204-- From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 05:58:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31C43900; Fri, 22 Aug 2014 05:58:43 +0000 (UTC) Received: from mail-qc0-x22d.google.com (mail-qc0-x22d.google.com [IPv6:2607:f8b0:400d:c01::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B1DFD3798; Fri, 22 Aug 2014 05:58:42 +0000 (UTC) Received: by mail-qc0-f173.google.com with SMTP id w7so10147740qcr.4 for ; Thu, 21 Aug 2014 22:58:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=bxrxJAQZOHhXU1n9CvSCJsM6XDVx7J3D/JwDhi0uyHM=; b=gc4c6ugdwK5XtLDd+NYl3/hEeUTGs2nM3i+AgSUqP3jJlGyVGFpU3ppsW8rF+Omd5k zwk41IEScFkQkXVdTXom8vajFusvku/XUf8KFB0eIMPSqycZ7BWN/th8LlaXfQqy60ga 1YFvMMoRozVVJMt/rscZWT/rMv8nOqf5guuUQEPG1PFJ/FyCbDu9xBeJtgxXBAhliK2R EUas6Rql4/GndMwkcGIMdE22LYzOvm8Fv4w9EeS3WjTaVt8oOI8QxoVtTO72cCNM77nE 9KCh6l5kHm99HBOAH6Qo7ULjDMGoDsEQS/v/am5Yss2prXlHsV63arPRcyVXUIpT97uu n+UA== MIME-Version: 1.0 X-Received: by 10.224.95.74 with SMTP id c10mr4689694qan.35.1408687121614; Thu, 21 Aug 2014 22:58:41 -0700 (PDT) Received: by 10.140.84.80 with HTTP; Thu, 21 Aug 2014 22:58:41 -0700 (PDT) In-Reply-To: <0DAF2357-4BBA-4D5B-8F17-D61845BACDA5@bsdimp.com> References: <201408202258.s7KMwDh3073409@svn.freebsd.org> <0DAF2357-4BBA-4D5B-8F17-D61845BACDA5@bsdimp.com> Date: Thu, 21 Aug 2014 22:58:41 -0700 Message-ID: Subject: Re: svn commit: r270249 - head/sys/cam/ata From: Neel Natu To: Warner Losh Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 05:58:43 -0000 Hi Warner, On Thu, Aug 21, 2014 at 10:34 PM, Warner Losh wrote: > > On Aug 21, 2014, at 10:31 PM, Neel Natu wrote: > >> Hi Warner, >> >> On Wed, Aug 20, 2014 at 3:58 PM, Warner Losh wrote: >>> Author: imp >>> Date: Wed Aug 20 22:58:12 2014 >>> New Revision: 270249 >>> URL: http://svnweb.freebsd.org/changeset/base/270249 >>> >>> Log: >>> 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). >>> >>> Modified: >>> head/sys/cam/ata/ata_xpt.c >>> >>> Modified: head/sys/cam/ata/ata_xpt.c >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>> --- head/sys/cam/ata/ata_xpt.c Wed Aug 20 22:39:26 2014 (r27024= 8) >>> +++ head/sys/cam/ata/ata_xpt.c Wed Aug 20 22:58:12 2014 (r27024= 9) >>> @@ -458,12 +458,18 @@ negotiate: >>> 0, 0x02); >>> break; >>> case PROBE_SETAN: >>> - /* Remember what transport thinks about AEN. */ >>> - if (softc->caps & CTS_SATA_CAPS_H_AN) >>> + /* >>> + * Only ATAPI defines this bit to mean AEN, but remembe= r >>> + * what transport thinks about AEN. >>> + */ >>> + if ((softc->caps & CTS_SATA_CAPS_H_AN) && >>> + periph->path->device->protocol =3D=3D PROTO_ATAPI) >>> path->device->inq_flags |=3D SID_AEN; >>> else >>> path->device->inq_flags &=3D ~SID_AEN; >>> xpt_async(AC_GETDEV_CHANGED, path, NULL); >>> + if (periph->path->device->protocol !=3D PROTO_ATAPI) >>> + break; >>> cam_fill_ataio(ataio, >>> 1, >>> probedone, >>> @@ -750,14 +756,6 @@ out: >>> goto noerror; >>> >>> /* >>> - * Some Samsung SSDs report supported Asynchronous Noti= fication, >>> - * but return ABORT on attempt to enable it. >>> - */ >>> - } else if (softc->action =3D=3D PROBE_SETAN && >>> - status =3D=3D CAM_ATA_STATUS_ERROR) { >>> - goto noerror; >>> - >>> - /* >>> * SES and SAF-TE SEPs have different IDENTIFY commands, >>> * but SATA specification doesn't tell how to identify t= hem. >>> * Until better way found, just try another if first fai= l. >>> >> >> This change causes a panic for me on boot. Here is the boot log: >> >> ahci0: port >> 0xf050-0xf057,0xf040-0xf043,0xf030-0xf037,0xf020-0xf023,0xf000-0xf01f >> mem 0xfbb21000-0xfbb217ff irq 18 at device 31.2 on pci0 >> ahci0: AHCI v1.30 with 6 6Gbps ports, Port Multiplier not supported >> ahcich0: at channel 0 on ahci0 >> ahcich1: at channel 1 on ahci0 >> ahcich2: at channel 2 on ahci0 >> ahcich3: at channel 3 on ahci0 >> ahcich4: at channel 4 on ahci0 >> ahcich5: at channel 5 on ahci0 >> ahciem0: on ahci0 >> ... >> xpt_action_default: CCB type 0xdeadc0de not supported >> ... >> run_interrupt_driven_hooks: still waiting after 60 seconds for xpt_confi= g >> run_interrupt_driven_hooks: still waiting after 120 seconds for xpt_conf= ig >> run_interrupt_driven_hooks: still waiting after 180 seconds for xpt_conf= ig >> run_interrupt_driven_hooks: still waiting after 240 seconds for xpt_conf= ig >> run_interrupt_driven_hooks: still waiting after 300 seconds for xpt_conf= ig >> panic: run_interrupt_driven_config_hooks: waited too long >> cpuid =3D 0 >> KDB: stack backtrace: >> db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xffffffff81= d92920 >> kdb_backtrace() at kdb_backtrace+0x39/frame 0xffffffff81d929d0 >> vpanic() at vpanic+0x189/frame 0xffffffff81d92a50 >> kassert_panic() at kassert_panic+0x139/frame 0xffffffff81d92ac0 >> boot_run_interrupt_driven_config_hooks() at >> boot_run_interrupt_driven_config_hooks+0x111/frame 0xffffffff81d92b50 >> mi_startup()fffff81d92b70 >> btext() at btext+0x2c >> KDB: enter: panic >> [ thread pid 0 tid 100000 ] >> Stopped at kdb_enter+0x3e: movq $0,kdb_why >> db> >> >> The peripheral in question is a SATA attached CDROM: >> >> % camcontrol devlist >> at scbus0 target 0 lun 0 (pass0,ada0) >> at scbus2 target 0 lun 0 (cd0,pass1) >> at scbus3 target 0 lun 0 (pass2,ada1) >> at scbus4 target 0 lun 0 (pass3,ada2) >> at scbus6 target 0 lun 0 (ses0,pass4) >> >> pass1 at ahcich2 bus 0 scbus2 target 0 lun 0 >> pass1: Removable CD-ROM SCSI-0 device >> pass1: Serial Number 3524472 2N8225501140 >> pass1: 150.000MB/s transfers (SATA 1.x, UDMA5, ATAPI 12bytes, PIO 8192by= tes) >> >> The following patch fixes the panic. >> >> Index: sys/cam/ata/ata_xpt.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> --- sys/cam/ata/ata_xpt.c (revision 270249) >> +++ sys/cam/ata/ata_xpt.c (working copy) >> @@ -468,7 +468,8 @@ >> else >> path->device->inq_flags &=3D ~SID_AEN; >> xpt_async(AC_GETDEV_CHANGED, path, NULL); >> - if (periph->path->device->protocol !=3D PROTO_ATAPI) >> + if (periph->path->device->protocol !=3D PROTO_ATAPI && >> + periph->path->device->protocol !=3D PROTO_SCSI) >> break; >> cam_fill_ataio(ataio, >> 1, > > I think the more proper test is =3D=3D PROTO_ATA elsewhere, since that=E2= =80=99s what > distinguishes the ATA_IDENTIFY from the ATAPI_IDENTIFY. > >> However, there seem to be a couple of issues with the original patch: >> >> 1. The 'periph->path->device->protocol' is not initialized to >> PROTO_ATAPI anywhere in the tree so the not-equal-to test is a no-op. > > We test here to determine which identify command to send: > > if (periph->path->device->protocol =3D=3D PROTO_ATA) > ata_28bit_cmd(ataio, ATA_ATA_IDENTIFY, 0, 0, 0); > else > ata_28bit_cmd(ataio, ATA_ATAPI_IDENTIFY, 0, 0, 0)= ; > > and that is working to send the right command. > Yes, but PROTO_ATA !=3D PROTO_ATAPI :-) Since we never initialize 'periph->path->device->protocol' to 'PROTO_ATAPI' in -current: if (protocol !=3D PROTO_ATAPI) equates to if (1) if (protocol =3D=3D PROTO_ATAPI) equates to if (0) I was trying to say that any code that compares 'protocol' to PROTO_ATAPI probably deserves a second look (e.g., the original patch that triggered this panic). >> 2. It seems not right to break out of switch in 'probestart()' without >> providing a way for 'probedone()' to be called. I believe that this >> stops the state machine from making forward progress and results in >> 'xpt_config()' not completing. > > That=E2=80=99s a problem, you=E2=80=99re right. Let me rework. > >> If you need more information to debug this some more or test a proper >> fix then I am happy to help. > > Please try the one included here. I think it will address things. I=E2=80= =99ve tried it on one system, and am trying it on others in parallel to sen= ding this. > Yup, works fine. Thanks for the quick fix! best Neel > Warner > > > > From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 06:22:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 212D3C54; Fri, 22 Aug 2014 06:22:14 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3F2739AA; Fri, 22 Aug 2014 06:22:13 +0000 (UTC) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s7M6M7Jv047181 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 22 Aug 2014 09:22:07 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua s7M6M7Jv047181 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id s7M6M7Cl047180; Fri, 22 Aug 2014 09:22:07 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 22 Aug 2014 09:22:07 +0300 From: Konstantin Belousov To: Mark Johnston Subject: Re: svn commit: r270294 - stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace Message-ID: <20140822062207.GK2737@kib.kiev.ua> References: <201408211945.s7LJjqST049739@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cNa0Phtf76TQ4tlb" Content-Disposition: inline In-Reply-To: <201408211945.s7LJjqST049739@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 06:22:14 -0000 --cNa0Phtf76TQ4tlb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 >=20 > Log: > MFC r269525: > Return 0 for the PPID of threads in process 0, as process 0 doesn't hav= e a > parent process. >=20 > Modified: > stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c > Directory Properties: > stable/10/ (props changed) >=20 > Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace= =2Ec > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- 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 =3D=3D proc0.p_pid) > + return (curproc->p_pid); > + else > + return (curproc->p_pptr->p_pid); > #endif > =20 > 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() ? --cNa0Phtf76TQ4tlb Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJT9uGPAAoJEJDCuSvBvK1BY1MP/ix0AFaw0b54RIfCuPzC2s4x tYD4HU/xa7kcs3/vBXooiPneZZTD5q/V/jtGPrcPMdZ0RscMl2RQK1KIpmnOk80f I95vWpt3u51hfI7ySjmGlUSzbJspom6Ap2lWNFJXv2r/QlMjWAhcDGql8nmZkJLk b96IRCXcdgOqJf6eLir/csyTqU9CVWpLPR6CshJbCOiSnUkfpByWQSeKSOLzDjNZ mB83KEjSsZr12sf0jy78jlQy6LJ9KvuwDUgCvGLYMHDJXRRWZihzWcV5qWKGKKn9 HDi9ZpahJGw/RvP6lNhgUNNdEtHIL5rqGM1udkKyW6TUCXtBv4EVaraqj2NHcbIM z9aAeUm+a7uBjF+By4uJOocTGYDbrDClD8DhsF0i1FwC8/whNH2fwSPFSfAyPOF0 V8z8V7c3W6XcxPwhIznB4CYtsRmxIt5Y4WWlAL0Z++gDb4+V2UXiIhStSJCuFzr+ X6kLHAxAZQM4OYPGplGwErV22XBAD7G4VW2SIgv/WU7WhjSHuxyDkY+z1ZzAgxWE R0umPnacB3gglybjkkp7I/U5A3jcY+pVxyflD4r5eSyGlUD9uudTsOhRM8eHy/4I b6O+h7xkvr3wwpJE5p4zB++2va6mWT0kK0QIyHk73/OgU5fjIkmcJxIWrPdwLEye vk+eAEa/DG9hxJh9EWAS =YyOi -----END PGP SIGNATURE----- --cNa0Phtf76TQ4tlb-- From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 07:09:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 348BF661; Fri, 22 Aug 2014 07:09:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 141C83CEE; Fri, 22 Aug 2014 07:09:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7M79s9Y063645; Fri, 22 Aug 2014 07:09:54 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7M79sKx063644; Fri, 22 Aug 2014 07:09:54 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201408220709.s7M79sKx063644@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 22 Aug 2014 07:09:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270319 - stable/10/sys/fs/nullfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 07:09:55 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 07:52:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5951FEC0; Fri, 22 Aug 2014 07:52:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4586A3110; Fri, 22 Aug 2014 07:52:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7M7qmhL086219; Fri, 22 Aug 2014 07:52:48 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7M7qmYB086218; Fri, 22 Aug 2014 07:52:48 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201408220752.s7M7qmYB086218@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 22 Aug 2014 07:52:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270320 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 07:52:48 -0000 Author: kib Date: Fri Aug 22 07:52:47 2014 New Revision: 270320 URL: http://svnweb.freebsd.org/changeset/base/270320 Log: Check the validity of struct sigaction sa_flags value, reject unknown flags. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Fri Aug 22 07:09:54 2014 (r270319) +++ head/sys/kern/kern_sig.c Fri Aug 22 07:52:47 2014 (r270320) @@ -639,6 +639,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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 08:19:08 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C0F3F4FD; Fri, 22 Aug 2014 08:19:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0E1A335D; Fri, 22 Aug 2014 08:19:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7M8J8r4096258; Fri, 22 Aug 2014 08:19:08 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7M8J8v0096257; Fri, 22 Aug 2014 08:19:08 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201408220819.s7M8J8v0096257@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 22 Aug 2014 08:19:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270321 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 08:19:08 -0000 Author: kib Date: Fri Aug 22 08:19:08 2014 New Revision: 270321 URL: http://svnweb.freebsd.org/changeset/base/270321 Log: Ensure that sigaction flags for signal, which disposition is reset to ignored or default, are not leaking. Apparently, there exists code which relies on SA_SIGINFO not reported for SIG_DFL or SIG_IGN. In kern_sigaction, ignore flags when resetting. Encapsulate the flag and disposition testing into helper sigact_flag_test(). On exec, and when delivering signal with SA_RESETHAND flag set, signals are reset automatically. Use new helper sigdflt(), which removes duplicated code and corrects all flag bits for the signal. For proc0, set sigintr bit for all ignored signals. Ignored signals are consumed in tdsendsignal() and not delivered to the victim thread at all. Reported and tested by: royger Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Fri Aug 22 07:52:47 2014 (r270320) +++ head/sys/kern/kern_sig.c Fri Aug 22 08:19:08 2014 (r270321) @@ -621,6 +621,15 @@ sig_ffs(sigset_t *set) return (0); } +static bool +sigact_flag_test(struct sigaction *act, int flag) +{ + + return ((act->sa_flags & flag) != 0 && + (__sighandler_t *)act->sa_sigaction != SIG_IGN && + (__sighandler_t *)act->sa_sigaction != SIG_DFL); +} + /* * kern_sigaction * sigaction @@ -683,7 +692,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); @@ -691,19 +700,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); @@ -904,14 +913,36 @@ 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); + SIGADDSET(ps->ps_sigintr, 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); + SIGADDSET(ps->ps_sigintr, sig); + SIGDELSET(ps->ps_sigonstack, sig); + SIGDELSET(ps->ps_sigreset, sig); + SIGDELSET(ps->ps_signodefer, sig); +} + +/* * Reset signals for an exec of the specified process. */ void @@ -932,13 +963,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. @@ -1892,16 +1919,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 { /* @@ -2844,16 +2863,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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 08:22:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6C1D9658; Fri, 22 Aug 2014 08:22:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5692133ED; Fri, 22 Aug 2014 08:22:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7M8Mfnj099984; Fri, 22 Aug 2014 08:22:41 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7M8Meps099981; Fri, 22 Aug 2014 08:22:40 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201408220822.s7M8Meps099981@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Fri, 22 Aug 2014 08:22:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270322 - in head/sys/dev/vt: . hw/vga X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 08:22:41 -0000 Author: dumbbell Date: Fri Aug 22 08:22:40 2014 New Revision: 270322 URL: http://svnweb.freebsd.org/changeset/base/270322 Log: vt(4): Add new vd_bitblt_text_t callback, and implement it for vt_vga Compared to the deprecated vd_bitbltchr_t callback, vd_bitblt_text_t receives: o the whole text buffer o the dirty area o the mouse cursor (map, position, colors) This allows the backend to perform optimization on how to draw things. The goal is to remove vd_bitbltchr_t and vd_putchar_t, once all driver are converted (only vt_vga is included in this commit). In vt_vga, this allows to draw the text and the cursor in one pass, without ever reading from video memory (because it has all the context). The main benefit is the speed improvement: no more slideshow during boot! Other bugs fixed in vt_vga are: o left-most characters are drawn properly (the left-most pixels were missing with bold characters and some wide letters such as 'm') o no more black square around the cursor o no cursor flickering when the text is scrolling There are still many problems to fix: the known issues are marked with "FIXME" inside the code. MFC after: 1 week Modified: head/sys/dev/vt/hw/vga/vt_vga.c head/sys/dev/vt/vt.h head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/hw/vga/vt_vga.c ============================================================================== --- head/sys/dev/vt/hw/vga/vt_vga.c Fri Aug 22 08:19:08 2014 (r270321) +++ head/sys/dev/vt/hw/vga/vt_vga.c Fri Aug 22 08:22:40 2014 (r270322) @@ -54,7 +54,7 @@ struct vga_softc { bus_space_handle_t vga_fb_handle; bus_space_tag_t vga_reg_tag; bus_space_handle_t vga_reg_handle; - int vga_curcolor; + term_color_t vga_curfg, vga_curbg; }; /* Convenience macros. */ @@ -71,13 +71,26 @@ struct vga_softc { #define VT_VGA_HEIGHT 480 #define VT_VGA_MEMSIZE (VT_VGA_WIDTH * VT_VGA_HEIGHT / 8) +/* + * VGA is designed to handle 8 pixels at a time (8 pixels in one byte of + * memory). + */ +#define VT_VGA_PIXELS_BLOCK 8 + +/* + * We use an off-screen addresses to: + * o store the background color; + * o store pixels pattern. + * Those addresses are then loaded in the latches once. + */ +#define VT_VGA_BGCOLOR_OFFSET VT_VGA_MEMSIZE + static vd_probe_t vga_probe; static vd_init_t vga_init; static vd_blank_t vga_blank; -static vd_bitbltchr_t vga_bitbltchr; +static vd_bitblt_text_t vga_bitblt_text; static vd_drawrect_t vga_drawrect; static vd_setpixel_t vga_setpixel; -static vd_putchar_t vga_putchar; static vd_postswitch_t vga_postswitch; static const struct vt_driver vt_vga_driver = { @@ -85,10 +98,9 @@ static const struct vt_driver vt_vga_dri .vd_probe = vga_probe, .vd_init = vga_init, .vd_blank = vga_blank, - .vd_bitbltchr = vga_bitbltchr, + .vd_bitblt_text = vga_bitblt_text, .vd_drawrect = vga_drawrect, .vd_setpixel = vga_setpixel, - .vd_putchar = vga_putchar, .vd_postswitch = vga_postswitch, .vd_priority = VD_PRIORITY_GENERIC, }; @@ -101,152 +113,45 @@ static struct vga_softc vga_conssoftc; VT_DRIVER_DECLARE(vt_vga, vt_vga_driver); static inline void -vga_setcolor(struct vt_device *vd, term_color_t color) +vga_setfg(struct vt_device *vd, term_color_t color) { struct vga_softc *sc = vd->vd_softc; - if (sc->vga_curcolor != color) { + if (sc->vga_curfg != color) { REG_WRITE1(sc, VGA_GC_ADDRESS, VGA_GC_SET_RESET); REG_WRITE1(sc, VGA_GC_DATA, color); - sc->vga_curcolor = color; + sc->vga_curfg = color; } } -static void -vga_blank(struct vt_device *vd, term_color_t color) -{ - struct vga_softc *sc = vd->vd_softc; - u_int ofs; - - vga_setcolor(vd, color); - for (ofs = 0; ofs < VT_VGA_MEMSIZE; ofs++) - MEM_WRITE1(sc, ofs, 0xff); -} - static inline void -vga_bitblt_put(struct vt_device *vd, u_long dst, term_color_t color, - uint8_t v) +vga_setbg(struct vt_device *vd, term_color_t color) { struct vga_softc *sc = vd->vd_softc; - /* Skip empty writes, in order to avoid palette changes. */ - if (v != 0x00) { - vga_setcolor(vd, color); + if (sc->vga_curbg != color) { + REG_WRITE1(sc, VGA_GC_ADDRESS, VGA_GC_SET_RESET); + REG_WRITE1(sc, VGA_GC_DATA, color); + /* - * When this MEM_READ1() gets disabled, all sorts of - * artifacts occur. This is because this read loads the - * set of 8 pixels that are about to be changed. There - * is one scenario where we can avoid the read, namely - * if all pixels are about to be overwritten anyway. + * Write 8 pixels using the background color to an + * off-screen byte in the video memory. */ - if (v != 0xff) - MEM_READ1(sc, dst); - MEM_WRITE1(sc, dst, v); - } -} - -static void -vga_setpixel(struct vt_device *vd, int x, int y, term_color_t color) -{ - - vga_bitblt_put(vd, (y * VT_VGA_WIDTH / 8) + (x / 8), color, - 0x80 >> (x % 8)); -} - -static void -vga_drawrect(struct vt_device *vd, int x1, int y1, int x2, int y2, int fill, - term_color_t color) -{ - int x, y; - - for (y = y1; y <= y2; y++) { - if (fill || (y == y1) || (y == y2)) { - for (x = x1; x <= x2; x++) - vga_setpixel(vd, x, y, color); - } else { - vga_setpixel(vd, x1, y, color); - vga_setpixel(vd, x2, y, color); - } - } -} - -/* - * Shift bitmap of one row of the glyph. - * a - array of bytes with src bitmap and result storage. - * m - resulting background color bitmask. - * size - number of bytes per glyph row (+ one byte to store shift overflow). - * shift - offset for target bitmap. - */ - -static void -vga_shift_u8array(uint8_t *a, uint8_t *m, int size, int shift) -{ - int i; - - for (i = (size - 1); i > 0; i--) { - a[i] = (a[i] >> shift) | (a[i-1] << (7 - shift)); - m[i] = ~a[i]; - } - a[0] = (a[0] >> shift); - m[0] = ~a[0] & (0xff >> shift); - m[size - 1] = ~a[size - 1] & (0xff << (7 - shift)); -} - -/* XXX: fix gaps on mouse track when character size is not rounded to 8. */ -static void -vga_bitbltchr(struct vt_device *vd, const uint8_t *src, const uint8_t *mask, - int bpl, vt_axis_t top, vt_axis_t left, unsigned int width, - unsigned int height, term_color_t fg, term_color_t bg) -{ - uint8_t aa[64], ma[64], *r; - int dst, shift, sz, x, y; - struct vga_softc *sc; - - if ((left + width) > VT_VGA_WIDTH) - return; - if ((top + height) > VT_VGA_HEIGHT) - return; - - sc = vd->vd_softc; + MEM_WRITE1(sc, VT_VGA_BGCOLOR_OFFSET, 0xff); - sz = (width + 7) / 8; - shift = left % 8; - - dst = (VT_VGA_WIDTH * top + left) / 8; - - for (y = 0; y < height; y++) { - r = (uint8_t *)src + (y * sz); - memcpy(aa, r, sz); - aa[sz] = 0; - vga_shift_u8array(aa, ma, sz + 1, shift); - - vga_setcolor(vd, bg); - for (x = 0; x < (sz + 1); x ++) { - if (ma[x] == 0) - continue; - /* - * XXX Only mouse cursor can go out of screen. - * So for mouse it have to just return, but for regular - * characters it have to panic, to indicate error in - * size/coordinates calculations. - */ - if ((dst + x) >= (VT_VGA_WIDTH * VT_VGA_HEIGHT)) - return; - if (ma[x] != 0xff) - MEM_READ1(sc, dst + x); - MEM_WRITE1(sc, dst + x, ma[x]); - } + /* + * Read those 8 pixels back to load the background color + * in the latches register. + */ + MEM_READ1(sc, VT_VGA_BGCOLOR_OFFSET); - vga_setcolor(vd, fg); - for (x = 0; x < (sz + 1); x ++) { - if (aa[x] == 0) - continue; - if (aa[x] != 0xff) - MEM_READ1(sc, dst + x); - MEM_WRITE1(sc, dst + x, aa[x]); - } + sc->vga_curbg = color; - dst += VT_VGA_WIDTH / 8; + /* + * The Set/Reset register doesn't contain the fg color + * anymore, store an invalid color. + */ + sc->vga_curfg = 0xff; } } @@ -376,25 +281,561 @@ vga_get_cp437(term_char_t c) } static void -vga_putchar(struct vt_device *vd, term_char_t c, - vt_axis_t top, vt_axis_t left, term_color_t fg, term_color_t bg) +vga_blank(struct vt_device *vd, term_color_t color) { struct vga_softc *sc = vd->vd_softc; - uint8_t ch, attr; + u_int ofs; + + vga_setfg(vd, color); + for (ofs = 0; ofs < VT_VGA_MEMSIZE; ofs++) + MEM_WRITE1(sc, ofs, 0xff); +} + +static inline void +vga_bitblt_put(struct vt_device *vd, u_long dst, term_color_t color, + uint8_t v) +{ + struct vga_softc *sc = vd->vd_softc; + + /* Skip empty writes, in order to avoid palette changes. */ + if (v != 0x00) { + vga_setfg(vd, color); + /* + * When this MEM_READ1() gets disabled, all sorts of + * artifacts occur. This is because this read loads the + * set of 8 pixels that are about to be changed. There + * is one scenario where we can avoid the read, namely + * if all pixels are about to be overwritten anyway. + */ + if (v != 0xff) { + MEM_READ1(sc, dst); + + /* The bg color was trashed by the reads. */ + sc->vga_curbg = 0xff; + } + MEM_WRITE1(sc, dst, v); + } +} + +static void +vga_setpixel(struct vt_device *vd, int x, int y, term_color_t color) +{ + + vga_bitblt_put(vd, (y * VT_VGA_WIDTH / 8) + (x / 8), color, + 0x80 >> (x % 8)); +} + +static void +vga_drawrect(struct vt_device *vd, int x1, int y1, int x2, int y2, int fill, + term_color_t color) +{ + int x, y; + + for (y = y1; y <= y2; y++) { + if (fill || (y == y1) || (y == y2)) { + for (x = x1; x <= x2; x++) + vga_setpixel(vd, x, y, color); + } else { + vga_setpixel(vd, x1, y, color); + vga_setpixel(vd, x2, y, color); + } + } +} + +static void +vga_compute_shifted_pattern(const uint8_t *src, unsigned int bytes, + unsigned int src_x, unsigned int x_count, unsigned int dst_x, + uint8_t *pattern, uint8_t *mask) +{ + unsigned int n; + + n = src_x / 8; + + /* + * This mask has bits set, where a pixel (ether 0 or 1) + * comes from the source bitmap. + */ + if (mask != NULL) { + *mask = (0xff + >> (8 - x_count)) + << (8 - x_count - dst_x); + } + + if (n == (src_x + x_count - 1) / 8) { + /* All the pixels we want are in the same byte. */ + *pattern = src[n]; + if (dst_x >= src_x) + *pattern >>= (dst_x - src_x % 8); + else + *pattern <<= (src_x % 8 - dst_x); + } else { + /* The pixels we want are split into two bytes. */ + if (dst_x >= src_x % 8) { + *pattern = + src[n] << (8 - dst_x - src_x % 8) | + src[n + 1] >> (dst_x - src_x % 8); + } else { + *pattern = + src[n] << (src_x % 8 - dst_x) | + src[n + 1] >> (8 - src_x % 8 - dst_x); + } + } +} + +static void +vga_copy_bitmap_portion(uint8_t *pattern_2colors, uint8_t *pattern_ncolors, + const uint8_t *src, const uint8_t *src_mask, unsigned int src_width, + unsigned int src_x, unsigned int dst_x, unsigned int x_count, + unsigned int src_y, unsigned int dst_y, unsigned int y_count, + term_color_t fg, term_color_t bg, int overwrite) +{ + unsigned int i, bytes; + uint8_t pattern, relevant_bits, mask; + + bytes = (src_width + 7) / 8; + + for (i = 0; i < y_count; ++i) { + vga_compute_shifted_pattern(src + (src_y + i) * bytes, + bytes, src_x, x_count, dst_x, &pattern, &relevant_bits); + + if (src_mask == NULL) { + /* + * No src mask. Consider that all wanted bits + * from the source are "authoritative". + */ + mask = relevant_bits; + } else { + /* + * There's an src mask. We shift it the same way + * we shifted the source pattern. + */ + vga_compute_shifted_pattern( + src_mask + (src_y + i) * bytes, + bytes, src_x, x_count, dst_x, + &mask, NULL); + + /* Now, only keep the wanted bits among them. */ + mask &= relevant_bits; + } + + /* + * Clear bits from the pattern which must be + * transparent, according to the source mask. + */ + pattern &= mask; + + /* Set the bits in the 2-colors array. */ + if (overwrite) + pattern_2colors[dst_y + i] &= ~mask; + pattern_2colors[dst_y + i] |= pattern; + + /* + * Set the same bits in the n-colors array. This one + * supports transparency, when a given bit is cleared in + * all colors. + */ + if (overwrite) { + /* + * Ensure that the pixels used by this bitmap are + * cleared in other colors. + */ + for (int j = 0; j < 16; ++j) + pattern_ncolors[(dst_y + i) * 16 + j] &= + ~mask; + } + pattern_ncolors[(dst_y + i) * 16 + fg] |= pattern; + pattern_ncolors[(dst_y + i) * 16 + bg] |= (~pattern & mask); + } +} + +static void +vga_bitblt_pixels_block_2colors(struct vt_device *vd, const uint8_t *masks, + term_color_t fg, term_color_t bg, + unsigned int x, unsigned int y, unsigned int height) +{ + unsigned int i, offset; + struct vga_softc *sc; /* - * Convert character to CP437, which is the character set used - * by the VGA hardware by default. + * The great advantage of Write Mode 3 is that we just need + * to load the foreground in the Set/Reset register, load the + * background color in the latches register (this is done + * through a write in offscreen memory followed by a read of + * that data), then write the pattern to video memory. This + * pattern indicates if the pixel should use the foreground + * color (bit set) or the background color (bit cleared). */ - ch = vga_get_cp437(c); + + vga_setbg(vd, bg); + vga_setfg(vd, fg); + + sc = vd->vd_softc; + offset = (VT_VGA_WIDTH * y + x) / 8; + + for (i = 0; i < height; ++i, offset += VT_VGA_WIDTH / 8) { + MEM_WRITE1(sc, offset, masks[i]); + } +} + +static void +vga_bitblt_pixels_block_ncolors(struct vt_device *vd, const uint8_t *masks, + unsigned int x, unsigned int y, unsigned int height) +{ + unsigned int i, j, offset; + struct vga_softc *sc; + uint8_t mask; + + sc = vd->vd_softc; /* - * Convert colors to VGA attributes. + * To draw a pixels block with N colors (N > 2), we write each + * color one by one: + * 1. Use the color as the foreground color + * 2. Read the pixels block into the latches + * 3. Draw the calculated mask + * 4. Go back to #1 for subsequent colors. + * + * FIXME: Use Write Mode 0 to remove the need to read from video + * memory. */ - attr = bg << 4 | fg; - MEM_WRITE1(sc, 0x18000 + (top * 80 + left) * 2 + 0, ch); - MEM_WRITE1(sc, 0x18000 + (top * 80 + left) * 2 + 1, attr); + for (i = 0; i < height; ++i) { + for (j = 0; j < 16; ++j) { + mask = masks[i * 16 + j]; + if (mask == 0) + continue; + + vga_setfg(vd, j); + + offset = (VT_VGA_WIDTH * (y + i) + x) / 8; + if (mask != 0xff) { + MEM_READ1(sc, offset); + + /* The bg color was trashed by the reads. */ + sc->vga_curbg = 0xff; + } + MEM_WRITE1(sc, offset, mask); + } + } +} + +static void +vga_bitblt_one_text_pixels_block(struct vt_device *vd, const struct vt_buf *vb, + const struct vt_font *vf, unsigned int x, unsigned int y +#ifndef SC_NO_CUTPASTE + , const struct vt_mouse_cursor *cursor, + term_color_t cursor_fg, term_color_t cursor_bg +#endif + ) +{ + unsigned int i, col, row, src_x, x_count; + unsigned int used_colors_list[16], used_colors; + uint8_t pattern_2colors[vf->vf_height]; + uint8_t pattern_ncolors[vf->vf_height * 16]; + term_char_t c; + term_color_t fg, bg; + const uint8_t *src; +#ifndef SC_NO_CUTPASTE + unsigned int mx, my; +#endif + + /* + * The current pixels block. + * + * We fill it with portions of characters, because both "grids" + * may not match. + * + * i is the index in this pixels block. + */ + + i = x; + used_colors = 0; + memset(used_colors_list, 0, sizeof(used_colors_list)); + memset(pattern_2colors, 0, sizeof(pattern_2colors)); + memset(pattern_ncolors, 0, sizeof(pattern_ncolors)); + + if (i < vd->vd_offset.tp_col) { + /* + * i is in the margin used to center the text area on + * the screen. + */ + + i = vd->vd_offset.tp_col; + } + + while (i < x + VT_VGA_PIXELS_BLOCK) { + /* + * Find which character is drawn on this pixel in the + * pixels block. + * + * While here, record what colors it uses. + */ + + col = (i - vd->vd_offset.tp_col) / vf->vf_width; + row = (y - vd->vd_offset.tp_row) / vf->vf_height; + + c = VTBUF_GET_FIELD(vb, row, col); + src = vtfont_lookup(vf, c); + + vt_determine_colors(c, VTBUF_ISCURSOR(vb, row, col), &fg, &bg); + if ((used_colors_list[fg] & 0x1) != 0x1) + used_colors++; + if ((used_colors_list[bg] & 0x2) != 0x2) + used_colors++; + used_colors_list[fg] |= 0x1; + used_colors_list[bg] |= 0x2; + + /* + * Compute the portion of the character we want to draw, + * because the pixels block may start in the middle of a + * character. + * + * The first pixel to draw in the character is + * the current position - + * the start position of the character + * + * The last pixel to draw is either + * - the last pixel of the character, or + * - the pixel of the character matching the end of + * the pixels block + * whichever comes first. This position is then + * changed to be relative to the start position of the + * character. + */ + + src_x = i - (col * vf->vf_width + vd->vd_offset.tp_col); + x_count = min( + (col + 1) * vf->vf_width + vd->vd_offset.tp_col, + x + VT_VGA_PIXELS_BLOCK); + x_count -= col * vf->vf_width + vd->vd_offset.tp_col; + x_count -= src_x; + + /* Copy a portion of the character. */ + vga_copy_bitmap_portion(pattern_2colors, pattern_ncolors, + src, NULL, vf->vf_width, + src_x, i % VT_VGA_PIXELS_BLOCK, x_count, + 0, 0, vf->vf_height, fg, bg, 0); + + /* We move to the next portion. */ + i += x_count; + } + +#ifndef SC_NO_CUTPASTE + /* + * Copy the mouse pointer bitmap if it's over the current pixels + * block. + * + * We use the saved cursor position (saved in vt_flush()), because + * the current position could be different than the one used + * to mark the area dirty. + */ + mx = vd->vd_moldx + vd->vd_offset.tp_col; + my = vd->vd_moldy + vd->vd_offset.tp_row; + if (cursor != NULL && + ((mx >= x && x + VT_VGA_PIXELS_BLOCK - 1 >= mx) || + (mx < x && mx + cursor->width >= x)) && + ((my >= y && y + vf->vf_height - 1 >= my) || + (my < y && my + cursor->height >= y))) { + unsigned int dst_x, src_y, dst_y, y_count; + + /* Compute the portion of the cursor we want to copy. */ + src_x = x > mx ? x - mx : 0; + dst_x = mx > x ? mx - x : 0; + x_count = min( + min(cursor->width - src_x, x + VT_VGA_PIXELS_BLOCK - mx), + VT_VGA_PIXELS_BLOCK); + + /* + * The cursor isn't aligned on the Y-axis with + * characters, so we need to compute the vertical + * start/count. + */ + src_y = y > my ? y - my : 0; + dst_y = my > y ? my - y : 0; + y_count = min( + min(cursor->height - src_y, y + vf->vf_height - my), + vf->vf_height); + + /* Copy the cursor portion. */ + vga_copy_bitmap_portion(pattern_2colors, pattern_ncolors, + cursor->map, cursor->mask, cursor->width, + src_x, dst_x, x_count, src_y, dst_y, y_count, + cursor_fg, cursor_bg, 1); + + if ((used_colors_list[cursor_fg] & 0x1) != 0x1) + used_colors++; + if ((used_colors_list[cursor_bg] & 0x2) != 0x2) + used_colors++; + } +#endif + + /* + * The pixels block is completed, we can now draw it on the + * screen. + */ + if (used_colors == 2) + vga_bitblt_pixels_block_2colors(vd, pattern_2colors, fg, bg, + x, y, vf->vf_height); + else + vga_bitblt_pixels_block_ncolors(vd, pattern_ncolors, + x, y, vf->vf_height); +} + +static void +vga_bitblt_text_gfxmode(struct vt_device *vd, const struct vt_buf *vb, + const struct vt_font *vf, const term_rect_t *area +#ifndef SC_NO_CUTPASTE + , const struct vt_mouse_cursor *cursor, + term_color_t cursor_fg, term_color_t cursor_bg +#endif + ) +{ + unsigned int col, row; + unsigned int x1, y1, x2, y2, x, y; + + /* + * Compute the top-left pixel position aligned with the video + * adapter pixels block size. + * + * This is calculated from the top-left column of te dirty area: + * + * 1. Compute the top-left pixel of the character: + * col * font width + x offset + * + * NOTE: x offset is used to center the text area on the + * screen. It's expressed in pixels, not in characters + * col/row! + * + * 2. Find the pixel further on the left marking the start of + * an aligned pixels block (eg. chunk of 8 pixels): + * character's x / blocksize * blocksize + * + * The division, being made on integers, achieves the + * alignment. + * + * For the Y-axis, we need to compute the character's y + * coordinate, but we don't need to align it. + */ + + col = area->tr_begin.tp_col; + row = area->tr_begin.tp_row; + x1 = (int)((col * vf->vf_width + vd->vd_offset.tp_col) + / VT_VGA_PIXELS_BLOCK) + * VT_VGA_PIXELS_BLOCK; + y1 = row * vf->vf_height + vd->vd_offset.tp_row; + + /* + * Compute the bottom right pixel position, again, aligned with + * the pixels block size. + * + * The same rules apply, we just add 1 to base the computation + * on the "right border" of the dirty area. + */ + + col = area->tr_end.tp_col; + row = area->tr_end.tp_row; + x2 = (int)((col * vf->vf_width + vd->vd_offset.tp_col + + VT_VGA_PIXELS_BLOCK - 1) + / VT_VGA_PIXELS_BLOCK) + * VT_VGA_PIXELS_BLOCK; + y2 = row * vf->vf_height + vd->vd_offset.tp_row; + + /* + * Now, we take care of N pixels line at a time (the first for + * loop, N = font height), and for these lines, draw one pixels + * block at a time (the second for loop), not a character at a + * time. + * + * Therefore, on the X-axis, characters my be drawn partially if + * they are not aligned on 8-pixels boundary. + * + * However, the operation is repeated for the full height of the + * font before moving to the next character, because it allows + * to keep the color settings and write mode, before perhaps + * changing them with the next one. + */ + + for (y = y1; y < y2; y += vf->vf_height) { + for (x = x1; x < x2; x += VT_VGA_PIXELS_BLOCK) { + vga_bitblt_one_text_pixels_block(vd, vb, vf, x, y +#ifndef SC_NO_CUTPASTE + , cursor, cursor_fg, cursor_bg +#endif + ); + } + } +} + +static void +vga_bitblt_text_txtmode(struct vt_device *vd, const struct vt_buf *vb, + const term_rect_t *area +#ifndef SC_NO_CUTPASTE + , const struct vt_mouse_cursor *cursor, + term_color_t cursor_fg, term_color_t cursor_bg +#endif + ) +{ + struct vga_softc *sc; + unsigned int col, row; + term_char_t c; + term_color_t fg, bg; + uint8_t ch, attr; + + sc = vd->vd_softc; + + for (row = area->tr_begin.tp_row; row < area->tr_end.tp_row; ++row) { + for (col = area->tr_begin.tp_col; + col < area->tr_end.tp_col; + ++col) { + /* + * Get next character and its associated fg/bg + * colors. + */ + c = VTBUF_GET_FIELD(vb, row, col); + vt_determine_colors(c, VTBUF_ISCURSOR(vb, row, col), + &fg, &bg); + + /* + * Convert character to CP437, which is the + * character set used by the VGA hardware by + * default. + */ + ch = vga_get_cp437(c); + + /* Convert colors to VGA attributes. */ + attr = bg << 4 | fg; + + MEM_WRITE1(sc, 0x18000 + (row * 80 + col) * 2 + 0, + ch); + MEM_WRITE1(sc, 0x18000 + (row * 80 + col) * 2 + 1, + attr); + } + } +} + +static void +vga_bitblt_text(struct vt_device *vd, const struct vt_buf *vb, + const struct vt_font *vf, const term_rect_t *area +#ifndef SC_NO_CUTPASTE + , const struct vt_mouse_cursor *cursor, + term_color_t cursor_fg, term_color_t cursor_bg +#endif + ) +{ + + if (!(vd->vd_flags & VDF_TEXTMODE)) { + vga_bitblt_text_gfxmode(vd, vb, vf, area +#ifndef SC_NO_CUTPASTE + , cursor, cursor_fg, cursor_bg +#endif + ); + } else { + vga_bitblt_text_txtmode(vd, vb, area +#ifndef SC_NO_CUTPASTE + , cursor, cursor_fg, cursor_bg +#endif + ); + } } static void @@ -622,6 +1063,12 @@ vga_initialize(struct vt_device *vd, int REG_WRITE1(sc, VGA_GC_DATA, 3); REG_WRITE1(sc, VGA_GC_ADDRESS, VGA_GC_ENABLE_SET_RESET); REG_WRITE1(sc, VGA_GC_DATA, 0x0f); + + /* + * Clear the colors we think are loaded into Set/Reset or + * the latches. + */ + sc->vga_curfg = sc->vga_curbg = 0xff; } } Modified: head/sys/dev/vt/vt.h ============================================================================== --- head/sys/dev/vt/vt.h Fri Aug 22 08:19:08 2014 (r270321) +++ head/sys/dev/vt/vt.h Fri Aug 22 08:22:40 2014 (r270322) @@ -278,10 +278,6 @@ struct vt_window { /* * Per-device driver routines. - * - * vd_bitbltchr is used when the driver operates in graphics mode, while - * vd_putchar is used when the driver operates in text mode - * (VDF_TEXTMODE). */ #ifndef SC_NO_CUTPASTE @@ -297,11 +293,22 @@ typedef int vd_init_t(struct vt_device * typedef int vd_probe_t(struct vt_device *vd); typedef void vd_postswitch_t(struct vt_device *vd); typedef void vd_blank_t(struct vt_device *vd, term_color_t color); +/* + * FIXME: Remove vd_bitblt_t and vd_putchar_t, once vd_bitblt_text_t is + * provided by all drivers. + */ typedef void vd_bitbltchr_t(struct vt_device *vd, const uint8_t *src, const uint8_t *mask, int bpl, vt_axis_t top, vt_axis_t left, unsigned int width, unsigned int height, term_color_t fg, term_color_t bg); typedef void vd_putchar_t(struct vt_device *vd, term_char_t, vt_axis_t top, vt_axis_t left, term_color_t fg, term_color_t bg); +typedef void vd_bitblt_text_t(struct vt_device *vd, const struct vt_buf *vb, + const struct vt_font *vf, const term_rect_t *area +#ifndef SC_NO_CUTPASTE + , const struct vt_mouse_cursor *cursor, + term_color_t cursor_fg, term_color_t cursor_bg +#endif + ); typedef int vd_fb_ioctl_t(struct vt_device *, u_long, caddr_t, struct thread *); typedef int vd_fb_mmap_t(struct vt_device *, vm_ooffset_t, vm_paddr_t *, int, vm_memattr_t *); @@ -317,9 +324,10 @@ struct vt_driver { /* Drawing. */ vd_blank_t *vd_blank; - vd_bitbltchr_t *vd_bitbltchr; + vd_bitbltchr_t *vd_bitbltchr; /* FIXME: Deprecated. */ vd_drawrect_t *vd_drawrect; vd_setpixel_t *vd_setpixel; + vd_bitblt_text_t *vd_bitblt_text; /* Framebuffer ioctls, if present. */ vd_fb_ioctl_t *vd_fb_ioctl; @@ -328,7 +336,7 @@ struct vt_driver { vd_fb_mmap_t *vd_fb_mmap; /* Text mode operation. */ - vd_putchar_t *vd_putchar; + vd_putchar_t *vd_putchar; /* FIXME: Deprecated. */ /* Update display setting on vt switch. */ vd_postswitch_t *vd_postswitch; @@ -400,5 +408,9 @@ void vt_mouse_state(int show); #define VT_MOUSE_SHOW 1 #define VT_MOUSE_HIDE 0 +/* Utilities. */ +void vt_determine_colors(term_char_t c, int cursor, + term_color_t *fg, term_color_t *bg); + #endif /* !_DEV_VT_VT_H_ */ Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Fri Aug 22 08:19:08 2014 (r270321) +++ head/sys/dev/vt/vt_core.c Fri Aug 22 08:22:40 2014 (r270322) @@ -786,7 +786,7 @@ vtterm_param(struct terminal *tm, int cm } } -static inline void +void vt_determine_colors(term_char_t c, int cursor, term_color_t *fg, term_color_t *bg) { @@ -924,39 +924,53 @@ vt_flush(struct vt_device *vd) vd->vd_flags &= ~VDF_INVALID; } - for (row = tarea.tr_begin.tp_row; row < tarea.tr_end.tp_row; row++) { - if (!VTBUF_DIRTYROW(&tmask, row)) - continue; - r = VTBUF_GET_ROW(&vw->vw_buf, row); - for (col = tarea.tr_begin.tp_col; - col < tarea.tr_end.tp_col; col++) { - if (!VTBUF_DIRTYCOL(&tmask, col)) + if (vd->vd_driver->vd_bitblt_text != NULL) { + if (tarea.tr_begin.tp_col < tarea.tr_end.tp_col) { + vd->vd_driver->vd_bitblt_text(vd, &vw->vw_buf, vf, &tarea +#ifndef SC_NO_CUTPASTE + , cursor, TC_WHITE, TC_BLACK +#endif + ); + } + } else { + /* + * FIXME: Once all backend drivers expose the + * vd_bitblt_text_t callback, this code can be removed. + */ + for (row = tarea.tr_begin.tp_row; row < tarea.tr_end.tp_row; row++) { + if (!VTBUF_DIRTYROW(&tmask, row)) continue; + r = VTBUF_GET_ROW(&vw->vw_buf, row); + for (col = tarea.tr_begin.tp_col; + col < tarea.tr_end.tp_col; col++) { + if (!VTBUF_DIRTYCOL(&tmask, col)) + continue; - vt_bitblt_char(vd, vf, r[col], - VTBUF_ISCURSOR(&vw->vw_buf, row, col), row, col); + vt_bitblt_char(vd, vf, r[col], + VTBUF_ISCURSOR(&vw->vw_buf, row, col), row, col); + } } - } #ifndef SC_NO_CUTPASTE - if (cursor != NULL) { - bpl = (cursor->width + 7) >> 3; /* Bytes per source line. */ - w = cursor->width; - h = cursor->height; - - if ((vd->vd_mx + cursor->width) > - (size.tp_col * vf->vf_width)) - w = (size.tp_col * vf->vf_width) - vd->vd_mx - 1; - if ((vd->vd_my + cursor->height) > - (size.tp_row * vf->vf_height)) - h = (size.tp_row * vf->vf_height) - vd->vd_my - 1; - - vd->vd_driver->vd_bitbltchr(vd, cursor->map, cursor->mask, bpl, - vd->vd_offset.tp_row + vd->vd_my, - vd->vd_offset.tp_col + vd->vd_mx, - w, h, TC_WHITE, TC_BLACK); - } + if (cursor != NULL) { + bpl = (cursor->width + 7) >> 3; /* Bytes per source line. */ + w = cursor->width; + h = cursor->height; + + if ((vd->vd_mx + cursor->width) > + (size.tp_col * vf->vf_width)) + w = (size.tp_col * vf->vf_width) - vd->vd_mx - 1; + if ((vd->vd_my + cursor->height) > + (size.tp_row * vf->vf_height)) + h = (size.tp_row * vf->vf_height) - vd->vd_my - 1; + + vd->vd_driver->vd_bitbltchr(vd, cursor->map, cursor->mask, bpl, + vd->vd_offset.tp_row + vd->vd_my, + vd->vd_offset.tp_col + vd->vd_mx, + w, h, TC_WHITE, TC_BLACK); + } #endif + } } static void From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 10:31:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 07420BBA; Fri, 22 Aug 2014 10:31:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E6F553F8D; Fri, 22 Aug 2014 10:31:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MAVvSZ061158; Fri, 22 Aug 2014 10:31:57 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MAVvHD061157; Fri, 22 Aug 2014 10:31:57 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201408221031.s7MAVvHD061157@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 22 Aug 2014 10:31:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r270323 - stable/9/sys/modules/if_carp X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 10:31:58 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 10:49:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 56043105; Fri, 22 Aug 2014 10:49:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 416E830CB; Fri, 22 Aug 2014 10:49:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MAnqiH067085; Fri, 22 Aug 2014 10:49:52 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MAnqrU067084; Fri, 22 Aug 2014 10:49:52 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201408221049.s7MAnqrU067084@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Fri, 22 Aug 2014 10:49:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270324 - head/sys/dev/vt/hw/vga X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 10:49:52 -0000 Author: dumbbell Date: Fri Aug 22 10:49:51 2014 New Revision: 270324 URL: http://svnweb.freebsd.org/changeset/base/270324 Log: vt_vga: Clip the draw area to never draw offscreen This fixes a bug when two windows use different fonts, but a longer-term solution is required. The dirty area should be stored as pixels, not character cells, because such coordinates don't have the same meaning in all windows, when using different fonts. MFC after: 1 week Modified: head/sys/dev/vt/hw/vga/vt_vga.c Modified: head/sys/dev/vt/hw/vga/vt_vga.c ============================================================================== --- head/sys/dev/vt/hw/vga/vt_vga.c Fri Aug 22 10:31:57 2014 (r270323) +++ head/sys/dev/vt/hw/vga/vt_vga.c Fri Aug 22 10:49:51 2014 (r270324) @@ -741,6 +741,19 @@ vga_bitblt_text_gfxmode(struct vt_device y2 = row * vf->vf_height + vd->vd_offset.tp_row; /* + * Clip the area to the screen size. + * + * FIXME: The problem with handling the dirty area in character + * cells is that when using different fonts, the dirty area was + * possibly calculated with a different font than the one we use + * here, leading to out-of-screen coordinates. The dirty area + * should be stored in pixels. + */ + + x2 = min(x2, vd->vd_width - 1); + y2 = min(y2, vd->vd_height - 1); + + /* * Now, we take care of N pixels line at a time (the first for * loop, N = font height), and for these lines, draw one pixels * block at a time (the second for loop), not a character at a From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 11:50:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C08AF137; Fri, 22 Aug 2014 11:50:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9108936E5; Fri, 22 Aug 2014 11:50:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MBoY8S096706; Fri, 22 Aug 2014 11:50:34 GMT (envelope-from marck@FreeBSD.org) Received: (from marck@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MBoYZR096705; Fri, 22 Aug 2014 11:50:34 GMT (envelope-from marck@FreeBSD.org) Message-Id: <201408221150.s7MBoYZR096705@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marck set sender to marck@FreeBSD.org using -f From: Dmitry Morozovsky Date: Fri, 22 Aug 2014 11:50:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r270325 - stable/9/share/misc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 11:50:35 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 13:01:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5C3BEE8C; Fri, 22 Aug 2014 13:01:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47B6A3D73; Fri, 22 Aug 2014 13:01:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MD1N2D029619; Fri, 22 Aug 2014 13:01:23 GMT (envelope-from tychon@FreeBSD.org) Received: (from tychon@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MD1NwB029618; Fri, 22 Aug 2014 13:01:23 GMT (envelope-from tychon@FreeBSD.org) Message-Id: <201408221301.s7MD1NwB029618@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tychon set sender to tychon@FreeBSD.org using -f From: Tycho Nightingale Date: Fri, 22 Aug 2014 13:01:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270326 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 13:01:23 -0000 Author: tychon Date: Fri Aug 22 13:01:22 2014 New Revision: 270326 URL: http://svnweb.freebsd.org/changeset/base/270326 Log: Fix a recursive lock acquisition in vi_reset_dev(). Reviewed by: grehan Modified: head/usr.sbin/bhyve/virtio.c Modified: head/usr.sbin/bhyve/virtio.c ============================================================================== --- head/usr.sbin/bhyve/virtio.c Fri Aug 22 11:50:34 2014 (r270325) +++ head/usr.sbin/bhyve/virtio.c Fri Aug 22 13:01:22 2014 (r270326) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "bhyverun.h" #include "pci_emul.h" @@ -89,6 +90,9 @@ vi_reset_dev(struct virtio_softc *vs) struct vqueue_info *vq; int i, nvq; + if (vs->vs_mtx) + assert(pthread_mutex_isowned_np(vs->vs_mtx)); + nvq = vs->vs_vc->vc_nvq; for (vq = vs->vs_queues, i = 0; i < nvq; vq++, i++) { vq->vq_flags = 0; @@ -99,11 +103,9 @@ vi_reset_dev(struct virtio_softc *vs) vs->vs_negotiated_caps = 0; vs->vs_curq = 0; /* vs->vs_status = 0; -- redundant */ - VS_LOCK(vs); if (vs->vs_isr) pci_lintr_deassert(vs->vs_pi); vs->vs_isr = 0; - VS_UNLOCK(vs); vs->vs_msix_cfg_idx = VIRTIO_MSI_NO_VECTOR; } @@ -137,7 +139,9 @@ vi_intr_init(struct virtio_softc *vs, in if (use_msix) { vs->vs_flags |= VIRTIO_USE_MSIX; + VS_LOCK(vs); vi_reset_dev(vs); /* set all vectors to NO_VECTOR */ + VS_UNLOCK(vs); nvec = vs->vs_vc->vc_nvq + 1; if (pci_emul_add_msixcap(vs->vs_pi, nvec, barnum)) return (1); From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 13:16:00 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 83FF19E2; Fri, 22 Aug 2014 13:16:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 561EB3F10; Fri, 22 Aug 2014 13:16:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MDG0RV037977; Fri, 22 Aug 2014 13:16:00 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MDG0G0037975; Fri, 22 Aug 2014 13:16:00 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201408221316.s7MDG0G0037975@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 22 Aug 2014 13:16:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270327 - head/sys/cam/ata X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 13:16:00 -0000 Author: imp Date: Fri Aug 22 13:15:59 2014 New Revision: 270327 URL: http://svnweb.freebsd.org/changeset/base/270327 Log: 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. Modified: head/sys/cam/ata/ata_xpt.c Modified: head/sys/cam/ata/ata_xpt.c ============================================================================== --- head/sys/cam/ata/ata_xpt.c Fri Aug 22 13:01:22 2014 (r270326) +++ head/sys/cam/ata/ata_xpt.c Fri Aug 22 13:15:59 2014 (r270327) @@ -458,18 +458,12 @@ negotiate: 0, 0x02); break; case PROBE_SETAN: - /* - * Only ATAPI defines this bit to mean AEN, but remember - * what transport thinks about AEN. - */ - if ((softc->caps & CTS_SATA_CAPS_H_AN) && - periph->path->device->protocol == PROTO_ATAPI) + /* Remember what transport thinks about AEN. */ + if (softc->caps & CTS_SATA_CAPS_H_AN) path->device->inq_flags |= SID_AEN; else path->device->inq_flags &= ~SID_AEN; xpt_async(AC_GETDEV_CHANGED, path, NULL); - if (periph->path->device->protocol != PROTO_ATAPI) - break; cam_fill_ataio(ataio, 1, probedone, @@ -1057,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); @@ -1178,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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 13:20:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79A59C8E for ; Fri, 22 Aug 2014 13:20:25 +0000 (UTC) Received: from mail-pd0-f182.google.com (mail-pd0-f182.google.com [209.85.192.182]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 43F353FBA for ; Fri, 22 Aug 2014 13:20:24 +0000 (UTC) Received: by mail-pd0-f182.google.com with SMTP id fp1so16004300pdb.27 for ; Fri, 22 Aug 2014 06:20:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; bh=Ug9P+CXaUhmQ0RFds9G40/g8coUyuMBG89IiG8BpKig=; b=T9Sj8ZkWcuMYt0x2MI3D1vdjT6YOt/7IuT4G3mWnVvTGuDKsvVhS0cU8moVLy8rfLh JEdoAdGKGnhcMJYytD6K0zYZGLnz/6dp3lTbgJCjH7ahUwOyQSrykNfxAkPcYBWGjlcL 3bj/ofyTxHqjYfVDViepw04m/yc1CknfEiVWQ7c0w++wMjLsNI5t2/ASWT7tfsky8BOY 7Tg4qygs4RFBBkqlbmFjZzqS2z5AR7qlvy0Mr9yX8cqVr3L62LTGuQHLzq8AkMjySYPD phYt2idafR4QnvRROSJnKfh6Xa4i3OncFK5A9auiNXLVMCgt0//D4chI1BzcPfaBIL0z XTcw== X-Gm-Message-State: ALoCoQmoG1Y98ambyuE3b1DG2h9Opo8NtAJxDDu6nBZ+f8ZbUm+si5C55dEF+Zh2Mv/LqPEAYGhz X-Received: by 10.66.182.227 with SMTP id eh3mr6573936pac.68.1408713222844; Fri, 22 Aug 2014 06:13:42 -0700 (PDT) Received: from [10.64.25.67] (dc1-prod.netflix.com. [69.53.236.251]) by mx.google.com with ESMTPSA id fz10sm43610531pdb.48.2014.08.22.06.13.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 22 Aug 2014 06:13:42 -0700 (PDT) Sender: Warner Losh Content-Type: multipart/signed; boundary="Apple-Mail=_D756C39A-C97E-4CE5-B1D4-FC15F18D796C"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r270249 - head/sys/cam/ata From: Warner Losh In-Reply-To: Date: Fri, 22 Aug 2014 07:13:38 -0600 Message-Id: <118A680A-E4E4-4FEF-9C9C-44771F89A2D7@bsdimp.com> References: <201408202258.s7KMwDh3073409@svn.freebsd.org> <0DAF2357-4BBA-4D5B-8F17-D61845BACDA5@bsdimp.com> To: Neel Natu X-Mailer: Apple Mail (2.1878.6) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 13:20:25 -0000 --Apple-Mail=_D756C39A-C97E-4CE5-B1D4-FC15F18D796C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Aug 21, 2014, at 11:58 PM, Neel Natu wrote: > Hi Warner, >=20 > On Thu, Aug 21, 2014 at 10:34 PM, Warner Losh wrote: >>=20 >> On Aug 21, 2014, at 10:31 PM, Neel Natu wrote: >>=20 >>> Hi Warner, >>>=20 >>> On Wed, Aug 20, 2014 at 3:58 PM, Warner Losh = wrote: >>>> Author: imp >>>> Date: Wed Aug 20 22:58:12 2014 >>>> New Revision: 270249 >>>> URL: http://svnweb.freebsd.org/changeset/base/270249 >>>>=20 >>>> Log: >>>> 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). >>>>=20 >>>> Modified: >>>> head/sys/cam/ata/ata_xpt.c >>>>=20 >>>> Modified: head/sys/cam/ata/ata_xpt.c >>>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >>>> --- head/sys/cam/ata/ata_xpt.c Wed Aug 20 22:39:26 2014 = (r270248) >>>> +++ head/sys/cam/ata/ata_xpt.c Wed Aug 20 22:58:12 2014 = (r270249) >>>> @@ -458,12 +458,18 @@ negotiate: >>>> 0, 0x02); >>>> break; >>>> case PROBE_SETAN: >>>> - /* Remember what transport thinks about AEN. */ >>>> - if (softc->caps & CTS_SATA_CAPS_H_AN) >>>> + /* >>>> + * Only ATAPI defines this bit to mean AEN, but = remember >>>> + * what transport thinks about AEN. >>>> + */ >>>> + if ((softc->caps & CTS_SATA_CAPS_H_AN) && >>>> + periph->path->device->protocol =3D=3D = PROTO_ATAPI) >>>> path->device->inq_flags |=3D SID_AEN; >>>> else >>>> path->device->inq_flags &=3D ~SID_AEN; >>>> xpt_async(AC_GETDEV_CHANGED, path, NULL); >>>> + if (periph->path->device->protocol !=3D = PROTO_ATAPI) >>>> + break; >>>> cam_fill_ataio(ataio, >>>> 1, >>>> probedone, >>>> @@ -750,14 +756,6 @@ out: >>>> goto noerror; >>>>=20 >>>> /* >>>> - * Some Samsung SSDs report supported Asynchronous = Notification, >>>> - * but return ABORT on attempt to enable it. >>>> - */ >>>> - } else if (softc->action =3D=3D PROBE_SETAN && >>>> - status =3D=3D 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. >>>>=20 >>>=20 >>> This change causes a panic for me on boot. Here is the boot log: >>>=20 >>> ahci0: port >>> = 0xf050-0xf057,0xf040-0xf043,0xf030-0xf037,0xf020-0xf023,0xf000-0xf01f >>> mem 0xfbb21000-0xfbb217ff irq 18 at device 31.2 on pci0 >>> ahci0: AHCI v1.30 with 6 6Gbps ports, Port Multiplier not supported >>> ahcich0: at channel 0 on ahci0 >>> ahcich1: at channel 1 on ahci0 >>> ahcich2: at channel 2 on ahci0 >>> ahcich3: at channel 3 on ahci0 >>> ahcich4: at channel 4 on ahci0 >>> ahcich5: at channel 5 on ahci0 >>> ahciem0: on ahci0 >>> ... >>> xpt_action_default: CCB type 0xdeadc0de not supported >>> ... >>> run_interrupt_driven_hooks: still waiting after 60 seconds for = xpt_config >>> run_interrupt_driven_hooks: still waiting after 120 seconds for = xpt_config >>> run_interrupt_driven_hooks: still waiting after 180 seconds for = xpt_config >>> run_interrupt_driven_hooks: still waiting after 240 seconds for = xpt_config >>> run_interrupt_driven_hooks: still waiting after 300 seconds for = xpt_config >>> panic: run_interrupt_driven_config_hooks: waited too long >>> cpuid =3D 0 >>> KDB: stack backtrace: >>> db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame = 0xffffffff81d92920 >>> kdb_backtrace() at kdb_backtrace+0x39/frame 0xffffffff81d929d0 >>> vpanic() at vpanic+0x189/frame 0xffffffff81d92a50 >>> kassert_panic() at kassert_panic+0x139/frame 0xffffffff81d92ac0 >>> boot_run_interrupt_driven_config_hooks() at >>> boot_run_interrupt_driven_config_hooks+0x111/frame = 0xffffffff81d92b50 >>> mi_startup()fffff81d92b70 >>> btext() at btext+0x2c >>> KDB: enter: panic >>> [ thread pid 0 tid 100000 ] >>> Stopped at kdb_enter+0x3e: movq $0,kdb_why >>> db> >>>=20 >>> The peripheral in question is a SATA attached CDROM: >>>=20 >>> % camcontrol devlist >>> at scbus0 target 0 lun 0 = (pass0,ada0) >>> at scbus2 target 0 lun 0 = (cd0,pass1) >>> at scbus3 target 0 lun 0 = (pass2,ada1) >>> at scbus4 target 0 lun 0 = (pass3,ada2) >>> at scbus6 target 0 lun 0 = (ses0,pass4) >>>=20 >>> pass1 at ahcich2 bus 0 scbus2 target 0 lun 0 >>> pass1: Removable CD-ROM SCSI-0 device >>> pass1: Serial Number 3524472 2N8225501140 >>> pass1: 150.000MB/s transfers (SATA 1.x, UDMA5, ATAPI 12bytes, PIO = 8192bytes) >>>=20 >>> The following patch fixes the panic. >>>=20 >>> Index: sys/cam/ata/ata_xpt.c >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> --- sys/cam/ata/ata_xpt.c (revision 270249) >>> +++ sys/cam/ata/ata_xpt.c (working copy) >>> @@ -468,7 +468,8 @@ >>> else >>> path->device->inq_flags &=3D ~SID_AEN; >>> xpt_async(AC_GETDEV_CHANGED, path, NULL); >>> - if (periph->path->device->protocol !=3D PROTO_ATAPI) >>> + if (periph->path->device->protocol !=3D PROTO_ATAPI = && >>> + periph->path->device->protocol !=3D PROTO_SCSI) >>> break; >>> cam_fill_ataio(ataio, >>> 1, >>=20 >> I think the more proper test is =3D=3D PROTO_ATA elsewhere, since = that=92s what >> distinguishes the ATA_IDENTIFY from the ATAPI_IDENTIFY. >>=20 >>> However, there seem to be a couple of issues with the original = patch: >>>=20 >>> 1. The 'periph->path->device->protocol' is not initialized to >>> PROTO_ATAPI anywhere in the tree so the not-equal-to test is a = no-op. >>=20 >> We test here to determine which identify command to send: >>=20 >> if (periph->path->device->protocol =3D=3D PROTO_ATA) >> ata_28bit_cmd(ataio, ATA_ATA_IDENTIFY, 0, 0, = 0); >> else >> ata_28bit_cmd(ataio, ATA_ATAPI_IDENTIFY, 0, 0, = 0); >>=20 >> and that is working to send the right command. >>=20 >=20 > Yes, but PROTO_ATA !=3D PROTO_ATAPI :-) >=20 > Since we never initialize 'periph->path->device->protocol' to > 'PROTO_ATAPI' in -current: But this code appears to: case PROBE_RESET: { int sign =3D (done_ccb->ataio.res.lba_high << 8) + done_ccb->ataio.res.lba_mid; CAM_DEBUG(path, CAM_DEBUG_PROBE, ("SIGNATURE: %04x\n", sign)); if (sign =3D=3D 0x0000 && done_ccb->ccb_h.target_id !=3D 15) { path->device->protocol =3D PROTO_ATA; PROBE_SET_ACTION(softc, PROBE_IDENTIFY); } else if (sign =3D=3D 0x9669 && done_ccb->ccb_h.target_id =3D=3D 15) { /* Report SIM that PM is present. */ bzero(&cts, sizeof(cts)); xpt_setup_ccb(&cts.ccb_h, path, = CAM_PRIORITY_NONE); cts.ccb_h.func_code =3D XPT_SET_TRAN_SETTINGS; cts.type =3D CTS_TYPE_CURRENT_SETTINGS; cts.xport_specific.sata.pm_present =3D 1; cts.xport_specific.sata.valid =3D = CTS_SATA_VALID_PM; xpt_action((union ccb *)&cts); path->device->protocol =3D PROTO_SATAPM; PROBE_SET_ACTION(softc, PROBE_PM_PID); } else if (sign =3D=3D 0xc33c && done_ccb->ccb_h.target_id !=3D 15) { path->device->protocol =3D PROTO_SEMB; PROBE_SET_ACTION(softc, PROBE_IDENTIFY_SES); } else if (sign =3D=3D 0xeb14 && done_ccb->ccb_h.target_id !=3D 15) { path->device->protocol =3D PROTO_SCSI; PROBE_SET_ACTION(softc, PROBE_IDENTIFY); } else { if (done_ccb->ccb_h.target_id !=3D 15) { xpt_print(path, "Unexpected signature 0x%04x\n", = sign); } goto device_fail; } =20 what am I missing? > if (protocol !=3D PROTO_ATAPI) equates to if (1) > if (protocol =3D=3D PROTO_ATAPI) equates to if (0) >=20 > I was trying to say that any code that compares 'protocol' to > PROTO_ATAPI probably deserves a second look (e.g., the original patch > that triggered this panic). Yes, but I think you=92re analysis was incorrect on this point :) >>> 2. It seems not right to break out of switch in 'probestart()' = without >>> providing a way for 'probedone()' to be called. I believe that this >>> stops the state machine from making forward progress and results in >>> 'xpt_config()' not completing. >>=20 >> That=92s a problem, you=92re right. Let me rework. >>=20 >>> If you need more information to debug this some more or test a = proper >>> fix then I am happy to help. >>=20 >> Please try the one included here. I think it will address things. = I=92ve tried it on one system, and am trying it on others in parallel to = sending this. >>=20 >=20 > Yup, works fine. Thanks for the quick fix! Will push it in. Thanks. Warner --Apple-Mail=_D756C39A-C97E-4CE5-B1D4-FC15F18D796C Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJT90ICAAoJEGwc0Sh9sBEA8jcP/0H4en1mQqKXPCEG2qOoIGqv R56TfUe+OFqfXsyyPfmur55gvxJLpap7WBiAOQMj5JNnl3/wSwwpv2kvMqT3kXaU MfejYtOhKdbpR13v5SCL5wnIl9hak9I2SmuF+q9UO8igHu9bUFIK4IzwGL4z7Ebh BvLSYVPmpeP+UBnmi7aCJwS10/GhGwjBUQexfFx1dDyp4l85onB9fXeVu4SyDEzW 2D1eHWVnL8mEHxGFLmTsbuxZ3c6rhWjTvhlaTUhdu+7gPKdxKGkTW2H8e6gzwTeR mfknejkw2KUK7aUYWf0BZc87WYkLHGrj8zD0HV6/y2M7E+2bS4gBnmFvELTYaZaY 0X7mTnUQwFw9T+N1/etUgrKqgUM7T0sWsAWyYBSmXyTfxQQFMWgu4QTx7jlqNM0L d+IEE0WMtFHieEB7pJJ50rrCxE9XVHHOOdQmqEa3GJg1K/W8QQufADhIXJXUF4a5 ayIDqkjjYNXog0sq1OT35akFnn8Ir1lJrAVgOXli2SH4q+H0ESojjjIjo8dxcPCM UkXYiMOElu3gBzJG2zihSUcnranqe45D+RvUl1quuv1EYM9NNEfTHqLsP04+kk1y 6JZyfu8vlY9qShJKodPdPiqWcMiAFn6yvIIeGgbrfRw8S1pqoDmWkG5WFr3qNSSK cG7pVBccVjxj+AzsPTIZ =35y7 -----END PGP SIGNATURE----- --Apple-Mail=_D756C39A-C97E-4CE5-B1D4-FC15F18D796C-- From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 13:39:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D6CD977F; Fri, 22 Aug 2014 13:39:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6AC031E3; Fri, 22 Aug 2014 13:39:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MDdu1o048563; Fri, 22 Aug 2014 13:39:56 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MDduX4048562; Fri, 22 Aug 2014 13:39:56 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201408221339.s7MDduX4048562@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 22 Aug 2014 13:39:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270328 - stable/10/sys/netpfil/pf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 13:39:57 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 13:43:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E0341A30; Fri, 22 Aug 2014 13:43:56 +0000 (UTC) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mailhost.stack.nl", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8922C32A0; Fri, 22 Aug 2014 13:43:56 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 93F1AB809E; Fri, 22 Aug 2014 15:43:53 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id 808DA28494; Fri, 22 Aug 2014 15:43:53 +0200 (CEST) Date: Fri, 22 Aug 2014 15:43:53 +0200 From: Jilles Tjoelker To: Konstantin Belousov Subject: Re: svn commit: r265003 - head/secure/usr.sbin/sshd Message-ID: <20140822134353.GA21891@stack.nl> References: <201404270528.s3R5SEIm054377@svn.freebsd.org> <53F4B381.5010205@FreeBSD.org> <20140820151310.GB2737@kib.kiev.ua> <53F4BC9B.3090405@FreeBSD.org> <53F4BEB1.6070000@FreeBSD.org> <53F4C022.5050804@FreeBSD.org> <20140821080541.GE2737@kib.kiev.ua> <53F5D42E.9080908@FreeBSD.org> <20140821123246.GH2737@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140821123246.GH2737@kib.kiev.ua> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Roger Pau Monn? , src-committers@freebsd.org, Bryan Drewery X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 13:43:57 -0000 On Thu, Aug 21, 2014 at 03:32:46PM +0300, Konstantin Belousov wrote: > > > I think you mis-interpret the man page statement, it only says that > > > SA_SIGINFO should not be set in new->sa_flags IMO. But I do not see > > > much sense in the requirement. Note that we do not test flags for > > > correctness at all. SUSv4 is also silent on the issue. > > > If this is important for your case, the following patch prevents > > > leaking of the flags for ignored of default/action signals. Could > > > you, please, describe why do you consider this a bug ? > > IMO, it is an inconsistency to return an invalid old sigaction, I > > assume that what is returned as the old sigaction should also be valid > > according to the man page. > > I realize SUSv4 don't specify such requirement, but it would still be > > wrong to use SIG_DFL with SA_SIGINFO, since SA_SIGINFO expect the > > handler to be of the type: > > void func(int signo, siginfo_t *info, void *context); > > While SIG_DLF is of type: > > void func(int signo); > > There's software out there that (wrongly?) relies on sa_action == > > SIG_DFL and (sa_flags & SA_SIGINFO) == 0: > > http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=tools/libxl/libxl_fork.c;h=fa150959adcfa6618342ba1eb0085cbba5f75d0a;hb=HEAD#l338 > > The sa_flags check done here seems too strong in my opinion, but I > > still think it's right according to the man page. > Apparently, the original problem requires /bin/sh as the login shell to > reproduce, while I used zsh on the test box. > Below is the patch which fixes reset of flags both for sigaction(2) > and execve(2). > diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c > index 561ea0a..4077ec9 100644 > --- a/sys/kern/kern_sig.c > +++ b/sys/kern/kern_sig.c > @@ -621,6 +621,15 @@ sig_ffs(sigset_t *set) > return (0); > } > > +static bool > +sigact_flag_test(struct sigaction *act, int flag) > +{ > + > + return ((act->sa_flags & flag) != 0 && > + (__sighandler_t *)act->sa_sigaction != SIG_IGN && > + (__sighandler_t *)act->sa_sigaction != SIG_DFL); > +} > + > /* > * kern_sigaction > * sigaction > @@ -679,7 +688,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); > @@ -687,19 +696,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); > @@ -935,6 +944,11 @@ execsigs(struct proc *p) > sigqueue_delete_proc(p, sig); > } > ps->ps_sigact[_SIG_IDX(sig)] = SIG_DFL; > + SIGDELSET(ps->ps_siginfo, sig); > + SIGDELSET(ps->ps_sigintr, sig); > + SIGDELSET(ps->ps_sigonstack, sig); > + SIGDELSET(ps->ps_sigreset, sig); > + SIGDELSET(ps->ps_signodefer, sig); > } > /* > * Reset stack state to the user stack. This is good and necessary for SA_SIGINFO (because of the type of the SIG_DFL and SIG_IGN constants, and because POSIX says so in the description of SA_RESETHAND in the sigaction() page). However, there seems no reason to clear the other flags, which have no effect when the disposition is SIG_DFL or SIG_IGN but have historically always been preserved. (Slight exception: if kernel code erroneously loops on ERESTART, it will eat CPU time iff SA_RESTART is set, independent of the signal's disposition.) I notice a bug in POSIX here: it should specify that execve() clear SA_SIGINFO bits when it resets signals to SIG_DFL. -- Jilles Tjoelker From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 13:48:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23729CB6; Fri, 22 Aug 2014 13:48:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F056330D; Fri, 22 Aug 2014 13:48:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MDmX8r053059; Fri, 22 Aug 2014 13:48:33 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MDmXmF053058; Fri, 22 Aug 2014 13:48:33 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201408221348.s7MDmXmF053058@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Fri, 22 Aug 2014 13:48:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270329 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 13:48:34 -0000 Author: dumbbell Date: Fri Aug 22 13:48:33 2014 New Revision: 270329 URL: http://svnweb.freebsd.org/changeset/base/270329 Log: vt(4): Mark new mouse position as dirty only when it's actually displayed MFC after: 1 week Modified: head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Fri Aug 22 13:39:56 2014 (r270328) +++ head/sys/dev/vt/vt_core.c Fri Aug 22 13:48:33 2014 (r270329) @@ -893,9 +893,6 @@ vt_flush(struct vt_device *vd) vtbuf_mouse_cursor_position(&vw->vw_buf, vd->vd_moldx / vf->vf_width, vd->vd_moldy / vf->vf_height); - vtbuf_mouse_cursor_position(&vw->vw_buf, - vd->vd_mx / vf->vf_width, - vd->vd_my / vf->vf_height); /* * Save point of last mouse cursor to erase it @@ -908,6 +905,11 @@ vt_flush(struct vt_device *vd) if (!kdb_active && panicstr == NULL) { /* Mouse enabled, and DDB isn't active. */ cursor = &vt_default_mouse_pointer; + + /* Mark new mouse position as dirty. */ + vtbuf_mouse_cursor_position(&vw->vw_buf, + vd->vd_mx / vf->vf_width, + vd->vd_my / vf->vf_height); } } #endif From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 14:31:54 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23ED5D8D; Fri, 22 Aug 2014 14:31:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0437838FA; Fri, 22 Aug 2014 14:31:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MEVr2p075486; Fri, 22 Aug 2014 14:31:53 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MEVrHU075483; Fri, 22 Aug 2014 14:31:53 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201408221431.s7MEVrHU075483@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Fri, 22 Aug 2014 14:31:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270331 - in head/sys/dev/vt: . hw/vga X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 14:31:54 -0000 Author: dumbbell Date: Fri Aug 22 14:31:53 2014 New Revision: 270331 URL: http://svnweb.freebsd.org/changeset/base/270331 Log: vt(4): Store cursor bitmap & colors in struct vt_device This removes the need to specify them to each call to vd_bitblt_text_t and, therefore, simplifies the API. MFC after: 1 week Modified: head/sys/dev/vt/hw/vga/vt_vga.c head/sys/dev/vt/vt.h head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/hw/vga/vt_vga.c ============================================================================== --- head/sys/dev/vt/hw/vga/vt_vga.c Fri Aug 22 14:27:41 2014 (r270330) +++ head/sys/dev/vt/hw/vga/vt_vga.c Fri Aug 22 14:31:53 2014 (r270331) @@ -521,12 +521,8 @@ vga_bitblt_pixels_block_ncolors(struct v static void vga_bitblt_one_text_pixels_block(struct vt_device *vd, const struct vt_buf *vb, - const struct vt_font *vf, unsigned int x, unsigned int y -#ifndef SC_NO_CUTPASTE - , const struct vt_mouse_cursor *cursor, - term_color_t cursor_fg, term_color_t cursor_bg -#endif - ) + const struct vt_font *vf, unsigned int x, unsigned int y, + int cursor_displayed) { unsigned int i, col, row, src_x, x_count; unsigned int used_colors_list[16], used_colors; @@ -536,6 +532,7 @@ vga_bitblt_one_text_pixels_block(struct term_color_t fg, bg; const uint8_t *src; #ifndef SC_NO_CUTPASTE + struct vt_mouse_cursor *cursor; unsigned int mx, my; #endif @@ -629,9 +626,10 @@ vga_bitblt_one_text_pixels_block(struct * the current position could be different than the one used * to mark the area dirty. */ + cursor = vd->vd_mcursor; mx = vd->vd_moldx + vd->vd_offset.tp_col; my = vd->vd_moldy + vd->vd_offset.tp_row; - if (cursor != NULL && + if (cursor_displayed && ((mx >= x && x + VT_VGA_PIXELS_BLOCK - 1 >= mx) || (mx < x && mx + cursor->width >= x)) && ((my >= y && y + vf->vf_height - 1 >= my) || @@ -660,11 +658,11 @@ vga_bitblt_one_text_pixels_block(struct vga_copy_bitmap_portion(pattern_2colors, pattern_ncolors, cursor->map, cursor->mask, cursor->width, src_x, dst_x, x_count, src_y, dst_y, y_count, - cursor_fg, cursor_bg, 1); + vd->vd_mcursor_fg, vd->vd_mcursor_bg, 1); - if ((used_colors_list[cursor_fg] & 0x1) != 0x1) + if ((used_colors_list[vd->vd_mcursor_fg] & 0x1) != 0x1) used_colors++; - if ((used_colors_list[cursor_bg] & 0x2) != 0x2) + if ((used_colors_list[vd->vd_mcursor_bg] & 0x2) != 0x2) used_colors++; } #endif @@ -683,12 +681,7 @@ vga_bitblt_one_text_pixels_block(struct static void vga_bitblt_text_gfxmode(struct vt_device *vd, const struct vt_buf *vb, - const struct vt_font *vf, const term_rect_t *area -#ifndef SC_NO_CUTPASTE - , const struct vt_mouse_cursor *cursor, - term_color_t cursor_fg, term_color_t cursor_bg -#endif - ) + const struct vt_font *vf, const term_rect_t *area, int cursor_displayed) { unsigned int col, row; unsigned int x1, y1, x2, y2, x, y; @@ -770,23 +763,15 @@ vga_bitblt_text_gfxmode(struct vt_device for (y = y1; y < y2; y += vf->vf_height) { for (x = x1; x < x2; x += VT_VGA_PIXELS_BLOCK) { - vga_bitblt_one_text_pixels_block(vd, vb, vf, x, y -#ifndef SC_NO_CUTPASTE - , cursor, cursor_fg, cursor_bg -#endif - ); + vga_bitblt_one_text_pixels_block(vd, vb, vf, x, y, + cursor_displayed); } } } static void vga_bitblt_text_txtmode(struct vt_device *vd, const struct vt_buf *vb, - const term_rect_t *area -#ifndef SC_NO_CUTPASTE - , const struct vt_mouse_cursor *cursor, - term_color_t cursor_fg, term_color_t cursor_bg -#endif - ) + const term_rect_t *area, int cursor_displayed) { struct vga_softc *sc; unsigned int col, row; @@ -828,26 +813,13 @@ vga_bitblt_text_txtmode(struct vt_device static void vga_bitblt_text(struct vt_device *vd, const struct vt_buf *vb, - const struct vt_font *vf, const term_rect_t *area -#ifndef SC_NO_CUTPASTE - , const struct vt_mouse_cursor *cursor, - term_color_t cursor_fg, term_color_t cursor_bg -#endif - ) + const struct vt_font *vf, const term_rect_t *area, int cursor_displayed) { if (!(vd->vd_flags & VDF_TEXTMODE)) { - vga_bitblt_text_gfxmode(vd, vb, vf, area -#ifndef SC_NO_CUTPASTE - , cursor, cursor_fg, cursor_bg -#endif - ); + vga_bitblt_text_gfxmode(vd, vb, vf, area, cursor_displayed); } else { - vga_bitblt_text_txtmode(vd, vb, area -#ifndef SC_NO_CUTPASTE - , cursor, cursor_fg, cursor_bg -#endif - ); + vga_bitblt_text_txtmode(vd, vb, area, cursor_displayed); } } Modified: head/sys/dev/vt/vt.h ============================================================================== --- head/sys/dev/vt/vt.h Fri Aug 22 14:27:41 2014 (r270330) +++ head/sys/dev/vt/vt.h Fri Aug 22 14:31:53 2014 (r270331) @@ -115,6 +115,10 @@ typedef unsigned int vt_axis_t; * Per-device datastructure. */ +#ifndef SC_NO_CUTPASTE +struct vt_mouse_cursor; +#endif + struct vt_device { struct vt_window *vd_windows[VT_MAXWINDOWS]; /* (c) Windows. */ struct vt_window *vd_curwindow; /* (d) Current window. */ @@ -122,6 +126,11 @@ struct vt_device { struct vt_window *vd_markedwin; /* (?) Copy/paste buf owner. */ const struct vt_driver *vd_driver; /* (c) Graphics driver. */ void *vd_softc; /* (u) Driver data. */ +#ifndef SC_NO_CUTPASTE + struct vt_mouse_cursor *vd_mcursor; /* (?) Cursor bitmap. */ + term_color_t vd_mcursor_fg; /* (?) Cursor fg color. */ + term_color_t vd_mcursor_bg; /* (?) Cursor bg color. */ +#endif uint16_t vd_mx; /* (?) Current mouse X. */ uint16_t vd_my; /* (?) current mouse Y. */ vt_axis_t vd_moldx; /* (?) Mouse X as of last redraw. */ @@ -280,15 +289,6 @@ struct vt_window { * Per-device driver routines. */ -#ifndef SC_NO_CUTPASTE -struct vt_mouse_cursor { - uint8_t map[64 * 64 / 8]; - uint8_t mask[64 * 64 / 8]; - uint8_t width; - uint8_t height; -}; -#endif - typedef int vd_init_t(struct vt_device *vd); typedef int vd_probe_t(struct vt_device *vd); typedef void vd_postswitch_t(struct vt_device *vd); @@ -303,12 +303,7 @@ typedef void vd_bitbltchr_t(struct vt_de typedef void vd_putchar_t(struct vt_device *vd, term_char_t, vt_axis_t top, vt_axis_t left, term_color_t fg, term_color_t bg); typedef void vd_bitblt_text_t(struct vt_device *vd, const struct vt_buf *vb, - const struct vt_font *vf, const term_rect_t *area -#ifndef SC_NO_CUTPASTE - , const struct vt_mouse_cursor *cursor, - term_color_t cursor_fg, term_color_t cursor_bg -#endif - ); + const struct vt_font *vf, const term_rect_t *area, int cursor_displayed); typedef int vd_fb_ioctl_t(struct vt_device *, u_long, caddr_t, struct thread *); typedef int vd_fb_mmap_t(struct vt_device *, vm_ooffset_t, vm_paddr_t *, int, vm_memattr_t *); @@ -394,6 +389,15 @@ struct vt_font { unsigned int vf_refcount; }; +#ifndef SC_NO_CUTPASTE +struct vt_mouse_cursor { + uint8_t map[64 * 64 / 8]; + uint8_t mask[64 * 64 / 8]; + uint8_t width; + uint8_t height; +}; +#endif + const uint8_t *vtfont_lookup(const struct vt_font *vf, term_char_t c); struct vt_font *vtfont_ref(struct vt_font *vf); void vtfont_unref(struct vt_font *vf); Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Fri Aug 22 14:27:41 2014 (r270330) +++ head/sys/dev/vt/vt_core.c Fri Aug 22 14:31:53 2014 (r270331) @@ -162,6 +162,12 @@ static struct vt_device vt_consdev = { .vd_curwindow = &vt_conswindow, .vd_markedwin = NULL, .vd_kbstate = 0, + +#ifndef SC_NO_CUTPASTE + .vd_mcursor = &vt_default_mouse_pointer, + .vd_mcursor_fg = TC_WHITE, + .vd_mcursor_bg = TC_BLACK, +#endif }; static term_char_t vt_constextbuf[(_VTDEFW) * (VBF_DEFAULT_HISTORY_SIZE)]; static term_char_t *vt_constextbufrows[VBF_DEFAULT_HISTORY_SIZE]; @@ -852,8 +858,8 @@ vt_flush(struct vt_device *vd) term_rect_t tarea; term_pos_t size; term_char_t *r; + int cursor_displayed; #ifndef SC_NO_CUTPASTE - struct vt_mouse_cursor *cursor; int bpl, h, w; #endif @@ -867,8 +873,9 @@ vt_flush(struct vt_device *vd) if (vd->vd_flags & VDF_SPLASH || vw->vw_flags & VWF_BUSY) return; + cursor_displayed = 0; + #ifndef SC_NO_CUTPASTE - cursor = NULL; if ((vd->vd_flags & VDF_MOUSECURSOR) && /* Mouse support enabled. */ !(vw->vw_flags & VWF_MOUSE_HIDE)) { /* Cursor displayed. */ if (vd->vd_moldx != vd->vd_mx || @@ -904,7 +911,7 @@ vt_flush(struct vt_device *vd) if (!kdb_active && panicstr == NULL) { /* Mouse enabled, and DDB isn't active. */ - cursor = &vt_default_mouse_pointer; + cursor_displayed = 1; /* Mark new mouse position as dirty. */ vtbuf_mouse_cursor_position(&vw->vw_buf, @@ -928,11 +935,8 @@ vt_flush(struct vt_device *vd) if (vd->vd_driver->vd_bitblt_text != NULL) { if (tarea.tr_begin.tp_col < tarea.tr_end.tp_col) { - vd->vd_driver->vd_bitblt_text(vd, &vw->vw_buf, vf, &tarea -#ifndef SC_NO_CUTPASTE - , cursor, TC_WHITE, TC_BLACK -#endif - ); + vd->vd_driver->vd_bitblt_text(vd, &vw->vw_buf, vf, + &tarea, cursor_displayed); } } else { /* @@ -954,22 +958,24 @@ vt_flush(struct vt_device *vd) } #ifndef SC_NO_CUTPASTE - if (cursor != NULL) { - bpl = (cursor->width + 7) >> 3; /* Bytes per source line. */ - w = cursor->width; - h = cursor->height; + if (cursor_displayed) { + /* Bytes per source line. */ + bpl = (vd->vd_mcursor->width + 7) >> 3; + w = vd->vd_mcursor->width; + h = vd->vd_mcursor->height; - if ((vd->vd_mx + cursor->width) > + if ((vd->vd_mx + vd->vd_mcursor->width) > (size.tp_col * vf->vf_width)) w = (size.tp_col * vf->vf_width) - vd->vd_mx - 1; - if ((vd->vd_my + cursor->height) > + if ((vd->vd_my + vd->vd_mcursor->height) > (size.tp_row * vf->vf_height)) h = (size.tp_row * vf->vf_height) - vd->vd_my - 1; - vd->vd_driver->vd_bitbltchr(vd, cursor->map, cursor->mask, bpl, + vd->vd_driver->vd_bitbltchr(vd, + vd->vd_mcursor->map, vd->vd_mcursor->mask, bpl, vd->vd_offset.tp_row + vd->vd_my, vd->vd_offset.tp_col + vd->vd_mx, - w, h, TC_WHITE, TC_BLACK); + w, h, vd->vd_mcursor_fg, vd->vd_mcursor_bg); } #endif } From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 15:00:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 63E5B860; Fri, 22 Aug 2014 15:00:48 +0000 (UTC) Received: from mail-qg0-x22d.google.com (mail-qg0-x22d.google.com [IPv6:2607:f8b0:400d:c04::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DC05D3C18; Fri, 22 Aug 2014 15:00:47 +0000 (UTC) Received: by mail-qg0-f45.google.com with SMTP id f51so10250960qge.4 for ; Fri, 22 Aug 2014 08:00:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=EDbv2Pn+2YrfepncFSYyQQhBXtJNibt8LvasFTm2VGY=; b=XldTCpviMh1MpaC9UXfB6DgHtUuMCNvYkWS7Vt6tNSkkhDoxvKsM3AePEGwPVQQV8L Y7qT82ZCpKRZA8EicU6J2KcREiA+QZJp/N07z95cdPLkufifqF+U02xldliZxp2aoC4/ cdxZO0tBF6F+h+9r6SG+96vb3AE70G4ORWWBhKA26ndDapCjf7hF1EnpAgwgicDf2r8Y Z6q38AMtpIA4pMJtAbOYO722bFJb5lBNP0pHQbrWEwuAhHqXNiQN16WnuVCjXHLSELf/ LnHywYcciyJNrEtxNVXqsGsyIQXTHxJMb5k/XWsM5iwqPvsgI+LN+OAv3yoxo4Wbd/CI uwSQ== X-Received: by 10.140.89.5 with SMTP id u5mr8516116qgd.14.1408719646985; Fri, 22 Aug 2014 08:00:46 -0700 (PDT) Received: from charmander.home ([65.92.193.222]) by mx.google.com with ESMTPSA id x14sm35386825qae.13.2014.08.22.08.00.46 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Aug 2014 08:00:46 -0700 (PDT) Sender: Mark Johnston Date: Fri, 22 Aug 2014 10:59:28 -0400 From: Mark Johnston To: Konstantin Belousov Subject: Re: svn commit: r270294 - stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace Message-ID: <20140822145928.GA75918@charmander.home> References: <201408211945.s7LJjqST049739@svn.freebsd.org> <20140822062207.GK2737@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140822062207.GK2737@kib.kiev.ua> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 15:00:48 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 15:05:53 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 445FBAAD; Fri, 22 Aug 2014 15:05:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 24A163C97; Fri, 22 Aug 2014 15:05:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MF5rHo090342; Fri, 22 Aug 2014 15:05:53 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MF5qqh090337; Fri, 22 Aug 2014 15:05:52 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201408221505.s7MF5qqh090337@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: Roger Pau Monné Date: Fri, 22 Aug 2014 15:05:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270332 - head/sys/dev/pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 15:05:53 -0000 Author: royger Date: Fri Aug 22 15:05:51 2014 New Revision: 270332 URL: http://svnweb.freebsd.org/changeset/base/270332 Log: pci: add a new pci_child_added newbus method. This is needed so when running under Xen the calls to pci_child_added can be intercepted and a custom Xen method can be used to register those devices with Xen. This should not include any functional change, since the Xen implementation will be added in a following patch and the native implementation is a noop. Sponsored by: Citrix Systems R&D Reviewed by: jhb dev/pci/pci.c: dev/pci/pci_if.m: dev/pci/pci_private.h: dev/pci/pcivar.h: - Add the pci_child_added newbus method. Modified: head/sys/dev/pci/pci.c head/sys/dev/pci/pci_if.m head/sys/dev/pci/pci_private.h head/sys/dev/pci/pcivar.h Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Fri Aug 22 14:31:53 2014 (r270331) +++ head/sys/dev/pci/pci.c Fri Aug 22 15:05:51 2014 (r270332) @@ -183,6 +183,7 @@ static device_method_t pci_methods[] = { DEVMETHOD(pci_msi_count, pci_msi_count_method), DEVMETHOD(pci_msix_count, pci_msix_count_method), DEVMETHOD(pci_get_rid, pci_get_rid_method), + DEVMETHOD(pci_child_added, pci_child_added_method), DEVMETHOD_END }; @@ -3518,6 +3519,13 @@ pci_add_child(device_t bus, struct pci_d pci_cfg_restore(dinfo->cfg.dev, dinfo); pci_print_verbose(dinfo); pci_add_resources(bus, dinfo->cfg.dev, 0, 0); + pci_child_added(dinfo->cfg.dev); +} + +void +pci_child_added_method(device_t dev, device_t child) +{ + } static int Modified: head/sys/dev/pci/pci_if.m ============================================================================== --- head/sys/dev/pci/pci_if.m Fri Aug 22 14:31:53 2014 (r270331) +++ head/sys/dev/pci/pci_if.m Fri Aug 22 15:05:51 2014 (r270332) @@ -185,3 +185,7 @@ METHOD uint16_t get_rid { device_t child; }; +METHOD void child_added { + device_t dev; + device_t child; +}; Modified: head/sys/dev/pci/pci_private.h ============================================================================== --- head/sys/dev/pci/pci_private.h Fri Aug 22 14:31:53 2014 (r270331) +++ head/sys/dev/pci/pci_private.h Fri Aug 22 15:05:51 2014 (r270332) @@ -125,6 +125,7 @@ int pci_assign_interrupt_method(device_ int pci_resume(device_t dev); int pci_suspend(device_t dev); bus_dma_tag_t pci_get_dma_tag(device_t bus, device_t dev); +void pci_child_added_method(device_t dev, device_t child); /** Restore the config register state. The state must be previously * saved with pci_cfg_save. However, the pci bus driver takes care of Modified: head/sys/dev/pci/pcivar.h ============================================================================== --- head/sys/dev/pci/pcivar.h Fri Aug 22 14:31:53 2014 (r270331) +++ head/sys/dev/pci/pcivar.h Fri Aug 22 15:05:51 2014 (r270332) @@ -506,6 +506,13 @@ pci_get_rid(device_t dev) return (PCI_GET_RID(device_get_parent(dev), dev)); } +static __inline void +pci_child_added(device_t dev) +{ + + return (PCI_CHILD_ADDED(device_get_parent(dev), dev)); +} + device_t pci_find_bsf(uint8_t, uint8_t, uint8_t); device_t pci_find_dbsf(uint32_t, uint8_t, uint8_t, uint8_t); device_t pci_find_device(uint16_t, uint16_t); From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 15:10:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0ABFCC62; Fri, 22 Aug 2014 15:10:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0A9A3CDE; Fri, 22 Aug 2014 15:10:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MFAQCO092037; Fri, 22 Aug 2014 15:10:26 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MFAQqw092036; Fri, 22 Aug 2014 15:10:26 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201408221510.s7MFAQqw092036@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: Roger Pau Monné Date: Fri, 22 Aug 2014 15:10:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270333 - head/sys/dev/xen/netback X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 15:10:27 -0000 Author: royger Date: Fri Aug 22 15:10:26 2014 New Revision: 270333 URL: http://svnweb.freebsd.org/changeset/base/270333 Log: netback: fixes for netback This patch contains the following fixes for netback: - Only unbind the evtchn if it has been bound. - Set xnb->bridge to NULL after free to prevent double-freeing it. - Set the MAC address for the host-facing interface to a dummy value. Sponsored by: Citrix Systems R&D dev/xen/netback/netback.c: - Prevent trying to unbind if the evtchn has not been bounded. - Prevent double-freeing xnb->bridge. - Set the MAC address of the host-facing interface to a dummy value, so it can work when the interface is added to a bridge. Modified: head/sys/dev/xen/netback/netback.c Modified: head/sys/dev/xen/netback/netback.c ============================================================================== --- head/sys/dev/xen/netback/netback.c Fri Aug 22 15:05:51 2014 (r270332) +++ head/sys/dev/xen/netback/netback.c Fri Aug 22 15:10:26 2014 (r270333) @@ -652,7 +652,8 @@ xnb_disconnect(struct xnb_softc *xnb) int error; int i; - xen_intr_unbind(xnb->xen_intr_handle); + if (xnb->xen_intr_handle != NULL) + xen_intr_unbind(&xnb->xen_intr_handle); /* * We may still have another thread currently processing requests. We @@ -666,8 +667,10 @@ xnb_disconnect(struct xnb_softc *xnb) mtx_unlock(&xnb->rx_lock); /* Free malloc'd softc member variables */ - if (xnb->bridge != NULL) + if (xnb->bridge != NULL) { free(xnb->bridge, M_XENSTORE); + xnb->bridge = NULL; + } /* All request processing has stopped, so unmap the rings */ for (i=0; i < XNB_NUM_RING_TYPES; i++) { @@ -1211,7 +1214,18 @@ create_netdev(device_t dev) ifmedia_add(&xnb->sc_media, IFM_ETHER|IFM_MANUAL, 0, NULL); ifmedia_set(&xnb->sc_media, IFM_ETHER|IFM_MANUAL); - err = xen_net_read_mac(dev, xnb->mac); + /* + * Set the MAC address to a dummy value (00:00:00:00:00), + * if the MAC address of the host-facing interface is set + * to the same as the guest-facing one (the value found in + * xenstore), the bridge would stop delivering packets to + * us because it would see that the destination address of + * the packet is the same as the interface, and so the bridge + * would expect the packet has already been delivered locally + * (and just drop it). + */ + bzero(&xnb->mac[0], sizeof(xnb->mac)); + if (err == 0) { /* Set up ifnet structure */ ifp = xnb->xnb_ifp = if_alloc(IFT_ETHER); From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 15:12:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53E6BE60; Fri, 22 Aug 2014 15:12:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E59B3D7D; Fri, 22 Aug 2014 15:12:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MFCLFg094632; Fri, 22 Aug 2014 15:12:21 GMT (envelope-from bryanv@FreeBSD.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MFCKZO094630; Fri, 22 Aug 2014 15:12:20 GMT (envelope-from bryanv@FreeBSD.org) Message-Id: <201408221512.s7MFCKZO094630@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bryanv set sender to bryanv@FreeBSD.org using -f From: Bryan Venteicher Date: Fri, 22 Aug 2014 15:12:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270334 - stable/10/sys/dev/virtio/network X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 15:12:21 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 15:16:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B608114C; Fri, 22 Aug 2014 15:16:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9610E3DAF; Fri, 22 Aug 2014 15:16:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MFGgFU096857; Fri, 22 Aug 2014 15:16:42 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MFGgaQ096850; Fri, 22 Aug 2014 15:16:42 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201408221516.s7MFGgaQ096850@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Fri, 22 Aug 2014 15:16:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270336 - in head/sys/dev/vt: . hw/vga X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 15:16:42 -0000 Author: dumbbell Date: Fri Aug 22 15:16:41 2014 New Revision: 270336 URL: http://svnweb.freebsd.org/changeset/base/270336 Log: vt(4): Give the window to vd_bitblt_text_t callback ... instead of both the buffer and the font. Again, this simplifies the API. MFC after: 1 week Modified: head/sys/dev/vt/hw/vga/vt_vga.c head/sys/dev/vt/vt.h head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/hw/vga/vt_vga.c ============================================================================== --- head/sys/dev/vt/hw/vga/vt_vga.c Fri Aug 22 15:12:56 2014 (r270335) +++ head/sys/dev/vt/hw/vga/vt_vga.c Fri Aug 22 15:16:41 2014 (r270336) @@ -520,14 +520,16 @@ vga_bitblt_pixels_block_ncolors(struct v } static void -vga_bitblt_one_text_pixels_block(struct vt_device *vd, const struct vt_buf *vb, - const struct vt_font *vf, unsigned int x, unsigned int y, +vga_bitblt_one_text_pixels_block(struct vt_device *vd, + const struct vt_window *vw, unsigned int x, unsigned int y, int cursor_displayed) { + const struct vt_buf *vb; + const struct vt_font *vf; unsigned int i, col, row, src_x, x_count; unsigned int used_colors_list[16], used_colors; - uint8_t pattern_2colors[vf->vf_height]; - uint8_t pattern_ncolors[vf->vf_height * 16]; + uint8_t pattern_2colors[vw->vw_font->vf_height]; + uint8_t pattern_ncolors[vw->vw_font->vf_height * 16]; term_char_t c; term_color_t fg, bg; const uint8_t *src; @@ -536,6 +538,9 @@ vga_bitblt_one_text_pixels_block(struct unsigned int mx, my; #endif + vb = &vw->vw_buf; + vf = vw->vw_font; + /* * The current pixels block. * @@ -680,12 +685,15 @@ vga_bitblt_one_text_pixels_block(struct } static void -vga_bitblt_text_gfxmode(struct vt_device *vd, const struct vt_buf *vb, - const struct vt_font *vf, const term_rect_t *area, int cursor_displayed) +vga_bitblt_text_gfxmode(struct vt_device *vd, const struct vt_window *vw, + const term_rect_t *area, int cursor_displayed) { + const struct vt_font *vf; unsigned int col, row; unsigned int x1, y1, x2, y2, x, y; + vf = vw->vw_font; + /* * Compute the top-left pixel position aligned with the video * adapter pixels block size. @@ -763,23 +771,25 @@ vga_bitblt_text_gfxmode(struct vt_device for (y = y1; y < y2; y += vf->vf_height) { for (x = x1; x < x2; x += VT_VGA_PIXELS_BLOCK) { - vga_bitblt_one_text_pixels_block(vd, vb, vf, x, y, + vga_bitblt_one_text_pixels_block(vd, vw, x, y, cursor_displayed); } } } static void -vga_bitblt_text_txtmode(struct vt_device *vd, const struct vt_buf *vb, +vga_bitblt_text_txtmode(struct vt_device *vd, const struct vt_window *vw, const term_rect_t *area, int cursor_displayed) { struct vga_softc *sc; + const struct vt_buf *vb; unsigned int col, row; term_char_t c; term_color_t fg, bg; uint8_t ch, attr; sc = vd->vd_softc; + vb = &vw->vw_buf; for (row = area->tr_begin.tp_row; row < area->tr_end.tp_row; ++row) { for (col = area->tr_begin.tp_col; @@ -812,14 +822,14 @@ vga_bitblt_text_txtmode(struct vt_device } static void -vga_bitblt_text(struct vt_device *vd, const struct vt_buf *vb, - const struct vt_font *vf, const term_rect_t *area, int cursor_displayed) +vga_bitblt_text(struct vt_device *vd, const struct vt_window *vw, + const term_rect_t *area, int cursor_displayed) { if (!(vd->vd_flags & VDF_TEXTMODE)) { - vga_bitblt_text_gfxmode(vd, vb, vf, area, cursor_displayed); + vga_bitblt_text_gfxmode(vd, vw, area, cursor_displayed); } else { - vga_bitblt_text_txtmode(vd, vb, area, cursor_displayed); + vga_bitblt_text_txtmode(vd, vw, area, cursor_displayed); } } Modified: head/sys/dev/vt/vt.h ============================================================================== --- head/sys/dev/vt/vt.h Fri Aug 22 15:12:56 2014 (r270335) +++ head/sys/dev/vt/vt.h Fri Aug 22 15:16:41 2014 (r270336) @@ -302,8 +302,8 @@ typedef void vd_bitbltchr_t(struct vt_de unsigned int width, unsigned int height, term_color_t fg, term_color_t bg); typedef void vd_putchar_t(struct vt_device *vd, term_char_t, vt_axis_t top, vt_axis_t left, term_color_t fg, term_color_t bg); -typedef void vd_bitblt_text_t(struct vt_device *vd, const struct vt_buf *vb, - const struct vt_font *vf, const term_rect_t *area, int cursor_displayed); +typedef void vd_bitblt_text_t(struct vt_device *vd, const struct vt_window *vw, + const term_rect_t *area, int cursor_displayed); typedef int vd_fb_ioctl_t(struct vt_device *, u_long, caddr_t, struct thread *); typedef int vd_fb_mmap_t(struct vt_device *, vm_ooffset_t, vm_paddr_t *, int, vm_memattr_t *); Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Fri Aug 22 15:12:56 2014 (r270335) +++ head/sys/dev/vt/vt_core.c Fri Aug 22 15:16:41 2014 (r270336) @@ -935,8 +935,8 @@ vt_flush(struct vt_device *vd) if (vd->vd_driver->vd_bitblt_text != NULL) { if (tarea.tr_begin.tp_col < tarea.tr_end.tp_col) { - vd->vd_driver->vd_bitblt_text(vd, &vw->vw_buf, vf, - &tarea, cursor_displayed); + vd->vd_driver->vd_bitblt_text(vd, vw, &tarea, + cursor_displayed); } } else { /* From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 15:31:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35FA4833; Fri, 22 Aug 2014 15:31:45 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C910F3034; Fri, 22 Aug 2014 15:31:44 +0000 (UTC) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s7MFVdx0067461 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 22 Aug 2014 18:31:39 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua s7MFVdx0067461 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id s7MFVdJd067460; Fri, 22 Aug 2014 18:31:39 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 22 Aug 2014 18:31:39 +0300 From: Konstantin Belousov To: Jilles Tjoelker Subject: Re: svn commit: r265003 - head/secure/usr.sbin/sshd Message-ID: <20140822153139.GN2737@kib.kiev.ua> References: <201404270528.s3R5SEIm054377@svn.freebsd.org> <53F4B381.5010205@FreeBSD.org> <20140820151310.GB2737@kib.kiev.ua> <53F4BC9B.3090405@FreeBSD.org> <53F4BEB1.6070000@FreeBSD.org> <53F4C022.5050804@FreeBSD.org> <20140821080541.GE2737@kib.kiev.ua> <53F5D42E.9080908@FreeBSD.org> <20140821123246.GH2737@kib.kiev.ua> <20140822134353.GA21891@stack.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LlyFhrrzptpgNMGs" Content-Disposition: inline In-Reply-To: <20140822134353.GA21891@stack.nl> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Roger Pau Monn? , src-committers@freebsd.org, Bryan Drewery X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 15:31:45 -0000 --LlyFhrrzptpgNMGs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 22, 2014 at 03:43:53PM +0200, Jilles Tjoelker wrote: > This is good and necessary for SA_SIGINFO (because of the type of the > SIG_DFL and SIG_IGN constants, and because POSIX says so in the > description of SA_RESETHAND in the sigaction() page). However, there > seems no reason to clear the other flags, which have no effect when the > disposition is SIG_DFL or SIG_IGN but have historically always been > preserved. (Slight exception: if kernel code erroneously loops on > ERESTART, it will eat CPU time iff SA_RESTART is set, independent of the > signal's disposition.) Well, I already committed the patch with several bugs fixed comparing with what was mailed, before your feedback arrived. Do you consider it is important enough to revert the resetting of other flags ? In particular, your note about the traditional historic behaviour makes me wonder. I do not see why SA_SIGINFO is so special that it must be reset, while other flags are not. The absence of the cases where the default/ignored disposition is affected by the flags seems rather arbitrary. >=20 > I notice a bug in POSIX here: it should specify that execve() clear > SA_SIGINFO bits when it resets signals to SIG_DFL. >=20 > --=20 > Jilles Tjoelker --LlyFhrrzptpgNMGs Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJT92JbAAoJEJDCuSvBvK1ByhsP/iggX+JU9BLduvXkQJMEXN7F aUuKwaidYPaulVVHAMHRHy8Bs2U3ZI3nmmBfGa8penqlJgm7U10dtRLRFgbufe+6 CgC293/eBU9U/5exF8M8hv36ieF2TqdAXKFjKDMWOaY4tFeoedP0ZR30Ywz6IyTt dIYSYD1ZP+5ChsnkjWV0ykMHRiO0cfYjOdNyYt81Pyc+V1imUFxPjjb13nuZRcde mjZOOY6VUnY2R4LPvT2uL62nDjrojD7Xz8SqWVVVx8GVpRVrwCIcz9S4uA6PYykV fkRIzf2SlgwTLwgLhPl4TkIlC59OWhPpEBPGnk/PRXNWHGO+4Ky1j0hBuAJdefhd Dafs4VROhWKGSj81mC5s0+L/3XuEnmD6gD/EzAVF9c2rx1zQKZhB5HjstlpgNtzg yGEokuCEC0qmLuUlmleaBiace9KkBibQAHhDNJ4OTt0c3dH++ZLMx7LtncrwYTS5 06+G1DgKsUopzksVJ2lV+mgme4IQH0uv1lYqWX38UIYsO6d41j7acnzOjQfZE2EW V5K1H9Jb35A39qrUo6cPPal/YR1glKO413M53s8Ognbox9yxRkiMOuXNpBETU4Oo dnmWjByi0sAw5rB+/GBuS01shL9AREVeF+plAX1qH6fUenh8bOwx/xgNmSdt5dUM PLr3UHJqVfX8F/r33dEJ =HYcX -----END PGP SIGNATURE----- --LlyFhrrzptpgNMGs-- From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 15:34:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DAFCEB34; Fri, 22 Aug 2014 15:34:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD021309C; Fri, 22 Aug 2014 15:34:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MFYur2006107; Fri, 22 Aug 2014 15:34:56 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MFYuHd006106; Fri, 22 Aug 2014 15:34:56 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201408221534.s7MFYuHd006106@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: Roger Pau Monné Date: Fri, 22 Aug 2014 15:34:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270337 - head/sys/dev/xen/netback X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 15:34:57 -0000 Author: royger Date: Fri Aug 22 15:34:56 2014 New Revision: 270337 URL: http://svnweb.freebsd.org/changeset/base/270337 Log: netback: remove dead code Remove the xen_net_read_mac function since it's not used anymore. Sponsored by: Citrix Systems R&D Modified: head/sys/dev/xen/netback/netback.c Modified: head/sys/dev/xen/netback/netback.c ============================================================================== --- head/sys/dev/xen/netback/netback.c Fri Aug 22 15:16:41 2014 (r270336) +++ head/sys/dev/xen/netback/netback.c Fri Aug 22 15:34:56 2014 (r270337) @@ -152,7 +152,6 @@ static void xnb_attach_failed(struct xnb static int xnb_shutdown(struct xnb_softc *xnb); static int create_netdev(device_t dev); static int xnb_detach(device_t dev); -static int xen_net_read_mac(device_t dev, uint8_t mac[]); static int xnb_ifmedia_upd(struct ifnet *ifp); static void xnb_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr); static void xnb_intr(void *arg); @@ -2467,42 +2466,6 @@ xnb_ifinit(void *xsc) mtx_unlock(&xnb->sc_lock); } - -/** - * Read the 'mac' node at the given device's node in the store, and parse that - * as colon-separated octets, placing result the given mac array. mac must be - * a preallocated array of length ETHER_ADDR_LEN ETH_ALEN (as declared in - * net/ethernet.h). - * Return 0 on success, or errno on error. - */ -static int -xen_net_read_mac(device_t dev, uint8_t mac[]) -{ - char *s, *e, *macstr; - const char *path; - int error = 0; - int i; - - path = xenbus_get_node(dev); - error = xs_read(XST_NIL, path, "mac", NULL, (void **) &macstr); - if (error != 0) { - xenbus_dev_fatal(dev, error, "parsing %s/mac", path); - } else { - s = macstr; - for (i = 0; i < ETHER_ADDR_LEN; i++) { - mac[i] = strtoul(s, &e, 16); - if (s == e || (e[0] != ':' && e[0] != 0)) { - error = ENOENT; - break; - } - s = &e[1]; - } - free(macstr, M_XENBUS); - } - return error; -} - - /** * Callback used by the generic networking code to tell us when our carrier * state has changed. Since we don't have a physical carrier, we don't care From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 15:36:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B8488D97; Fri, 22 Aug 2014 15:36:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A352B30BA; Fri, 22 Aug 2014 15:36:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MFawfM006624; Fri, 22 Aug 2014 15:36:58 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MFawui006620; Fri, 22 Aug 2014 15:36:58 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201408221536.s7MFawui006620@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Fri, 22 Aug 2014 15:36:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270338 - in head/sys/dev/vt: . hw/vga X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 15:36:58 -0000 Author: dumbbell Date: Fri Aug 22 15:36:57 2014 New Revision: 270338 URL: http://svnweb.freebsd.org/changeset/base/270338 Log: vt(4): The offset to center the text area is per-window now The previous global offset, based on the last loaded font, had no meaning for other windows. This caused a shifted text area, often partly out-of-screen. MFC after: 1 week Modified: head/sys/dev/vt/hw/vga/vt_vga.c head/sys/dev/vt/vt.h head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/hw/vga/vt_vga.c ============================================================================== --- head/sys/dev/vt/hw/vga/vt_vga.c Fri Aug 22 15:34:56 2014 (r270337) +++ head/sys/dev/vt/hw/vga/vt_vga.c Fri Aug 22 15:36:57 2014 (r270338) @@ -556,13 +556,13 @@ vga_bitblt_one_text_pixels_block(struct memset(pattern_2colors, 0, sizeof(pattern_2colors)); memset(pattern_ncolors, 0, sizeof(pattern_ncolors)); - if (i < vd->vd_offset.tp_col) { + if (i < vw->vw_offset.tp_col) { /* * i is in the margin used to center the text area on * the screen. */ - i = vd->vd_offset.tp_col; + i = vw->vw_offset.tp_col; } while (i < x + VT_VGA_PIXELS_BLOCK) { @@ -573,8 +573,8 @@ vga_bitblt_one_text_pixels_block(struct * While here, record what colors it uses. */ - col = (i - vd->vd_offset.tp_col) / vf->vf_width; - row = (y - vd->vd_offset.tp_row) / vf->vf_height; + col = (i - vw->vw_offset.tp_col) / vf->vf_width; + row = (y - vw->vw_offset.tp_row) / vf->vf_height; c = VTBUF_GET_FIELD(vb, row, col); src = vtfont_lookup(vf, c); @@ -605,11 +605,11 @@ vga_bitblt_one_text_pixels_block(struct * character. */ - src_x = i - (col * vf->vf_width + vd->vd_offset.tp_col); + src_x = i - (col * vf->vf_width + vw->vw_offset.tp_col); x_count = min( - (col + 1) * vf->vf_width + vd->vd_offset.tp_col, + (col + 1) * vf->vf_width + vw->vw_offset.tp_col, x + VT_VGA_PIXELS_BLOCK); - x_count -= col * vf->vf_width + vd->vd_offset.tp_col; + x_count -= col * vf->vf_width + vw->vw_offset.tp_col; x_count -= src_x; /* Copy a portion of the character. */ @@ -632,8 +632,8 @@ vga_bitblt_one_text_pixels_block(struct * to mark the area dirty. */ cursor = vd->vd_mcursor; - mx = vd->vd_moldx + vd->vd_offset.tp_col; - my = vd->vd_moldy + vd->vd_offset.tp_row; + mx = vd->vd_moldx + vw->vw_offset.tp_col; + my = vd->vd_moldy + vw->vw_offset.tp_row; if (cursor_displayed && ((mx >= x && x + VT_VGA_PIXELS_BLOCK - 1 >= mx) || (mx < x && mx + cursor->width >= x)) && @@ -720,10 +720,10 @@ vga_bitblt_text_gfxmode(struct vt_device col = area->tr_begin.tp_col; row = area->tr_begin.tp_row; - x1 = (int)((col * vf->vf_width + vd->vd_offset.tp_col) + x1 = (int)((col * vf->vf_width + vw->vw_offset.tp_col) / VT_VGA_PIXELS_BLOCK) * VT_VGA_PIXELS_BLOCK; - y1 = row * vf->vf_height + vd->vd_offset.tp_row; + y1 = row * vf->vf_height + vw->vw_offset.tp_row; /* * Compute the bottom right pixel position, again, aligned with @@ -735,11 +735,11 @@ vga_bitblt_text_gfxmode(struct vt_device col = area->tr_end.tp_col; row = area->tr_end.tp_row; - x2 = (int)((col * vf->vf_width + vd->vd_offset.tp_col + x2 = (int)((col * vf->vf_width + vw->vw_offset.tp_col + VT_VGA_PIXELS_BLOCK - 1) / VT_VGA_PIXELS_BLOCK) * VT_VGA_PIXELS_BLOCK; - y2 = row * vf->vf_height + vd->vd_offset.tp_row; + y2 = row * vf->vf_height + vw->vw_offset.tp_row; /* * Clip the area to the screen size. Modified: head/sys/dev/vt/vt.h ============================================================================== --- head/sys/dev/vt/vt.h Fri Aug 22 15:34:56 2014 (r270337) +++ head/sys/dev/vt/vt.h Fri Aug 22 15:36:57 2014 (r270338) @@ -136,7 +136,6 @@ struct vt_device { vt_axis_t vd_moldx; /* (?) Mouse X as of last redraw. */ vt_axis_t vd_moldy; /* (?) Mouse Y as of last redraw. */ uint32_t vd_mstate; /* (?) Mouse state. */ - term_pos_t vd_offset; /* (?) Pixel offset. */ vt_axis_t vd_width; /* (?) Screen width. */ vt_axis_t vd_height; /* (?) Screen height. */ struct mtx vd_lock; /* Per-device lock. */ @@ -258,6 +257,7 @@ struct vt_window { struct terminal *vw_terminal; /* (c) Terminal. */ struct vt_buf vw_buf; /* (u) Screen buffer. */ struct vt_font *vw_font; /* (d) Graphical font. */ + term_pos_t vw_offset; /* (?) Pixel offset. */ unsigned int vw_number; /* (c) Window number. */ int vw_kbdmode; /* (?) Keyboard mode. */ char *vw_kbdsq; /* Escape sequence queue*/ Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Fri Aug 22 15:34:56 2014 (r270337) +++ head/sys/dev/vt/vt_core.c Fri Aug 22 15:36:57 2014 (r270338) @@ -837,8 +837,8 @@ vt_bitblt_char(struct vt_device *vd, str * Fonts may not always be able to fill the entire * screen. */ - top = row * vf->vf_height + vd->vd_offset.tp_row; - left = col * vf->vf_width + vd->vd_offset.tp_col; + top = row * vf->vf_height + vd->vd_curwindow->vw_offset.tp_row; + left = col * vf->vf_width + vd->vd_curwindow->vw_offset.tp_col; vd->vd_driver->vd_bitbltchr(vd, src, NULL, 0, top, left, vf->vf_width, vf->vf_height, fg, bg); @@ -973,8 +973,8 @@ vt_flush(struct vt_device *vd) vd->vd_driver->vd_bitbltchr(vd, vd->vd_mcursor->map, vd->vd_mcursor->mask, bpl, - vd->vd_offset.tp_row + vd->vd_my, - vd->vd_offset.tp_col + vd->vd_mx, + vw->vw_offset.tp_row + vd->vd_my, + vw->vw_offset.tp_col + vd->vd_mx, w, h, vd->vd_mcursor_fg, vd->vd_mcursor_bg); } #endif @@ -1248,8 +1248,8 @@ vt_change_font(struct vt_window *vw, str vt_termsize(vd, vf, &size); vt_winsize(vd, vf, &wsz); /* Save offset to font aligned area. */ - vd->vd_offset.tp_col = (vd->vd_width % vf->vf_width) / 2; - vd->vd_offset.tp_row = (vd->vd_height % vf->vf_height) / 2; + vw->vw_offset.tp_col = (vd->vd_width % vf->vf_width) / 2; + vw->vw_offset.tp_row = (vd->vd_height % vf->vf_height) / 2; /* Grow the screen buffer and terminal. */ terminal_mute(tm, 1); @@ -1287,8 +1287,8 @@ vt_set_border(struct vt_window *vw, stru x = vd->vd_width - 1; y = vd->vd_height - 1; - off_x = vd->vd_offset.tp_col; - off_y = vd->vd_offset.tp_row; + off_x = vw->vw_offset.tp_col; + off_y = vw->vw_offset.tp_row; /* Top bar. */ if (off_y > 0) From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 15:38:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E8306FFE; Fri, 22 Aug 2014 15:38:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D417330DE; Fri, 22 Aug 2014 15:38:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MFcLTd007010; Fri, 22 Aug 2014 15:38:21 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MFcLp3007009; Fri, 22 Aug 2014 15:38:21 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201408221538.s7MFcLp3007009@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: Roger Pau Monné Date: Fri, 22 Aug 2014 15:38:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270339 - head/sys/dev/xen/blkback X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 15:38:22 -0000 Author: royger Date: Fri Aug 22 15:38:21 2014 New Revision: 270339 URL: http://svnweb.freebsd.org/changeset/base/270339 Log: xen: fix incorrectly accounted free Fix some frees incorrectly assigned to M_XENBUS when the memory is allocated with M_XENSTORE. Sponsored by: Citrix Systems R&D MFC after: 1 week dev/xen/blkback/blkback.c: - Fix incorrect frees. Modified: head/sys/dev/xen/blkback/blkback.c Modified: head/sys/dev/xen/blkback/blkback.c ============================================================================== --- head/sys/dev/xen/blkback/blkback.c Fri Aug 22 15:36:57 2014 (r270338) +++ head/sys/dev/xen/blkback/blkback.c Fri Aug 22 15:38:21 2014 (r270339) @@ -3852,17 +3852,17 @@ xbb_detach(device_t dev) xbb_close_backend(xbb); if (xbb->dev_mode != NULL) { - free(xbb->dev_mode, M_XENBUS); + free(xbb->dev_mode, M_XENSTORE); xbb->dev_mode = NULL; } if (xbb->dev_type != NULL) { - free(xbb->dev_type, M_XENBUS); + free(xbb->dev_type, M_XENSTORE); xbb->dev_type = NULL; } if (xbb->dev_name != NULL) { - free(xbb->dev_name, M_XENBUS); + free(xbb->dev_name, M_XENSTORE); xbb->dev_name = NULL; } From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 16:30:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60DE5F5E; Fri, 22 Aug 2014 16:30:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D0FB3667; Fri, 22 Aug 2014 16:30:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MGUR3d032432; Fri, 22 Aug 2014 16:30:27 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MGUR38032431; Fri, 22 Aug 2014 16:30:27 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201408221630.s7MGUR38032431@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Fri, 22 Aug 2014 16:30:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270340 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 16:30:27 -0000 Author: dumbbell Date: Fri Aug 22 16:30:26 2014 New Revision: 270340 URL: http://svnweb.freebsd.org/changeset/base/270340 Log: vt(4): Don't run vt_set_border() and vt_flush() concurrently In the case of vt_vga, the two concurrent calls were writing to the same VGA registers, causing incorrect refresh of the screen. MFC after: 1 week Modified: head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Fri Aug 22 15:38:21 2014 (r270339) +++ head/sys/dev/vt/vt_core.c Fri Aug 22 16:30:26 2014 (r270340) @@ -866,13 +866,14 @@ vt_flush(struct vt_device *vd) vw = vd->vd_curwindow; if (vw == NULL) return; - vf = vw->vw_font; - if (((vd->vd_flags & VDF_TEXTMODE) == 0) && (vf == NULL)) - return; if (vd->vd_flags & VDF_SPLASH || vw->vw_flags & VWF_BUSY) return; + vf = vw->vw_font; + if (((vd->vd_flags & VDF_TEXTMODE) == 0) && (vf == NULL)) + return; + cursor_displayed = 0; #ifndef SC_NO_CUTPASTE @@ -1211,6 +1212,35 @@ vtterm_opened(struct terminal *tm, int o } static int +vt_set_border(struct vt_window *vw, struct vt_font *vf, term_color_t c) +{ + struct vt_device *vd = vw->vw_device; + int x, y, off_x, off_y; + + if (vd->vd_driver->vd_drawrect == NULL) + return (ENOTSUP); + + x = vd->vd_width - 1; + y = vd->vd_height - 1; + off_x = vw->vw_offset.tp_col; + off_y = vw->vw_offset.tp_row; + + /* Top bar. */ + if (off_y > 0) + vd->vd_driver->vd_drawrect(vd, 0, 0, x, off_y - 1, 1, c); + /* Left bar. */ + if (off_x > 0) + vd->vd_driver->vd_drawrect(vd, 0, off_y, off_x - 1, y - off_y, + 1, c); + /* Right bar. May be 1 pixel wider than necessary due to rounding. */ + vd->vd_driver->vd_drawrect(vd, x - off_x, off_y, x, y - off_y, 1, c); + /* Bottom bar. May be 1 mixel taller than necessary due to rounding. */ + vd->vd_driver->vd_drawrect(vd, 0, y - off_y, x, y, 1, c); + + return (0); +} + +static int vt_change_font(struct vt_window *vw, struct vt_font *vf) { struct vt_device *vd = vw->vw_device; @@ -1269,43 +1299,16 @@ vt_change_font(struct vt_window *vw, str } /* Force a full redraw the next timer tick. */ - if (vd->vd_curwindow == vw) + if (vd->vd_curwindow == vw) { + vt_set_border(vw, vf, TC_BLACK); vd->vd_flags |= VDF_INVALID; + } vw->vw_flags &= ~VWF_BUSY; VT_UNLOCK(vd); return (0); } static int -vt_set_border(struct vt_window *vw, struct vt_font *vf, term_color_t c) -{ - struct vt_device *vd = vw->vw_device; - int x, y, off_x, off_y; - - if (vd->vd_driver->vd_drawrect == NULL) - return (ENOTSUP); - - x = vd->vd_width - 1; - y = vd->vd_height - 1; - off_x = vw->vw_offset.tp_col; - off_y = vw->vw_offset.tp_row; - - /* Top bar. */ - if (off_y > 0) - vd->vd_driver->vd_drawrect(vd, 0, 0, x, off_y - 1, 1, c); - /* Left bar. */ - if (off_x > 0) - vd->vd_driver->vd_drawrect(vd, 0, off_y, off_x - 1, y - off_y, - 1, c); - /* Right bar. May be 1 pixel wider than necessary due to rounding. */ - vd->vd_driver->vd_drawrect(vd, x - off_x, off_y, x, y - off_y, 1, c); - /* Bottom bar. May be 1 mixel taller than necessary due to rounding. */ - vd->vd_driver->vd_drawrect(vd, 0, y - off_y, x, y, 1, c); - - return (0); -} - -static int vt_proc_alive(struct vt_window *vw) { struct proc *p; @@ -1840,10 +1843,6 @@ skip_thunk: return (error); error = vt_change_font(vw, vf); - if (error == 0) { - /* XXX: replace 0 with current bg color. */ - vt_set_border(vw, vf, 0); - } vtfont_unref(vf); return (error); } From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 17:05:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7C997190; Fri, 22 Aug 2014 17:05:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 685A53B95; Fri, 22 Aug 2014 17:05:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MH5g1D048659; Fri, 22 Aug 2014 17:05:42 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MH5gH1048658; Fri, 22 Aug 2014 17:05:42 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201408221705.s7MH5gH1048658@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Fri, 22 Aug 2014 17:05:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270341 - head/sys/dev/vt/hw/vga X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 17:05:42 -0000 Author: dumbbell Date: Fri Aug 22 17:05:41 2014 New Revision: 270341 URL: http://svnweb.freebsd.org/changeset/base/270341 Log: vt_vga: Remove a "FIXME" comment; the issue was solved in r270338 MFC after: 1 week Modified: head/sys/dev/vt/hw/vga/vt_vga.c Modified: head/sys/dev/vt/hw/vga/vt_vga.c ============================================================================== --- head/sys/dev/vt/hw/vga/vt_vga.c Fri Aug 22 16:30:26 2014 (r270340) +++ head/sys/dev/vt/hw/vga/vt_vga.c Fri Aug 22 17:05:41 2014 (r270341) @@ -741,16 +741,7 @@ vga_bitblt_text_gfxmode(struct vt_device * VT_VGA_PIXELS_BLOCK; y2 = row * vf->vf_height + vw->vw_offset.tp_row; - /* - * Clip the area to the screen size. - * - * FIXME: The problem with handling the dirty area in character - * cells is that when using different fonts, the dirty area was - * possibly calculated with a different font than the one we use - * here, leading to out-of-screen coordinates. The dirty area - * should be stored in pixels. - */ - + /* Clip the area to the screen size. */ x2 = min(x2, vd->vd_width - 1); y2 = min(y2, vd->vd_height - 1); From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 17:09:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 07C6847F; Fri, 22 Aug 2014 17:09:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DBD843BD8; Fri, 22 Aug 2014 17:09:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MH9WDb049326; Fri, 22 Aug 2014 17:09:32 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MH9W3Y049318; Fri, 22 Aug 2014 17:09:32 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201408221709.s7MH9W3Y049318@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Fri, 22 Aug 2014 17:09:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270342 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 17:09:33 -0000 Author: dumbbell Date: Fri Aug 22 17:09:31 2014 New Revision: 270342 URL: http://svnweb.freebsd.org/changeset/base/270342 Log: vt(4): Use the actual size of the mouse when marking its position as dirty This fixes a bug where part of the cursor was not erased. MFC after: 1 week Modified: head/sys/dev/vt/vt.h head/sys/dev/vt/vt_buf.c head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt.h ============================================================================== --- head/sys/dev/vt/vt.h Fri Aug 22 17:05:41 2014 (r270341) +++ head/sys/dev/vt/vt.h Fri Aug 22 17:09:31 2014 (r270342) @@ -203,12 +203,12 @@ void vtbuf_grow(struct vt_buf *, const t void vtbuf_putchar(struct vt_buf *, const term_pos_t *, term_char_t); void vtbuf_cursor_position(struct vt_buf *, const term_pos_t *); void vtbuf_scroll_mode(struct vt_buf *vb, int yes); +void vtbuf_dirty(struct vt_buf *vb, const term_rect_t *area); void vtbuf_undirty(struct vt_buf *, term_rect_t *, struct vt_bufmask *); void vtbuf_sethistory_size(struct vt_buf *, int); int vtbuf_iscursor(const struct vt_buf *vb, int row, int col); void vtbuf_cursor_visibility(struct vt_buf *, int); #ifndef SC_NO_CUTPASTE -void vtbuf_mouse_cursor_position(struct vt_buf *vb, int col, int row); int vtbuf_set_mark(struct vt_buf *vb, int type, int col, int row); int vtbuf_get_marked_len(struct vt_buf *vb); void vtbuf_extract_marked(struct vt_buf *vb, term_char_t *buf, int sz); Modified: head/sys/dev/vt/vt_buf.c ============================================================================== --- head/sys/dev/vt/vt_buf.c Fri Aug 22 17:05:41 2014 (r270341) +++ head/sys/dev/vt/vt_buf.c Fri Aug 22 17:09:31 2014 (r270342) @@ -246,7 +246,7 @@ vtbuf_dirty_locked(struct vt_buf *vb, co vtbuf_dirty_axis(area->tr_begin.tp_col, area->tr_end.tp_col); } -static inline void +void vtbuf_dirty(struct vt_buf *vb, const term_rect_t *area) { @@ -558,18 +558,6 @@ vtbuf_cursor_position(struct vt_buf *vb, } #ifndef SC_NO_CUTPASTE -void -vtbuf_mouse_cursor_position(struct vt_buf *vb, int col, int row) -{ - term_rect_t area; - - area.tr_begin.tp_row = MAX(row - 1, 0); - area.tr_begin.tp_col = MAX(col - 1, 0); - area.tr_end.tp_row = MIN(row + 2, vb->vb_scr_size.tp_row); - area.tr_end.tp_col = MIN(col + 2, vb->vb_scr_size.tp_col); - vtbuf_dirty(vb, &area); -} - static void vtbuf_flush_mark(struct vt_buf *vb) { Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Fri Aug 22 17:05:41 2014 (r270341) +++ head/sys/dev/vt/vt_core.c Fri Aug 22 17:09:31 2014 (r270342) @@ -819,6 +819,28 @@ vt_determine_colors(term_char_t c, int c } static void +vt_mark_mouse_position_as_dirty(struct vt_device *vd, int x, int y) +{ + term_rect_t area; + struct vt_window *vw; + struct vt_font *vf; + + vw = vd->vd_curwindow; + vf = vw->vw_font; + + area.tr_begin.tp_col = (x - vw->vw_offset.tp_col) / vf->vf_width; + area.tr_begin.tp_row = (y - vw->vw_offset.tp_row) / vf->vf_height; + area.tr_end.tp_col = + ((x + vd->vd_mcursor->width - vw->vw_offset.tp_col) / + vf->vf_width) + 1; + area.tr_end.tp_row = + ((y + vd->vd_mcursor->height - vw->vw_offset.tp_row) / + vf->vf_height) + 1; + + vtbuf_dirty(&vw->vw_buf, &area); +} + +static void vt_bitblt_char(struct vt_device *vd, struct vt_font *vf, term_char_t c, int iscursor, unsigned int row, unsigned int col) { @@ -884,23 +906,11 @@ vt_flush(struct vt_device *vd) /* * Mark last mouse position as dirty to erase. * - * FIXME: The font size could be different among - * all windows, so the column/row calculation - * below isn't correct for all windows. - * - * FIXME: The cursor can span more than one - * character cell. vtbuf_mouse_cursor_position - * marks surrounding cells as dirty. But due - * to font size possibly inconsistent across - * windows, this may not be sufficient. This - * causes part of the cursor to not be erased. - * * FIXME: The vt_buf lock is acquired twice in a * row. */ - vtbuf_mouse_cursor_position(&vw->vw_buf, - vd->vd_moldx / vf->vf_width, - vd->vd_moldy / vf->vf_height); + vt_mark_mouse_position_as_dirty(vd, + vd->vd_moldx, vd->vd_moldy); /* * Save point of last mouse cursor to erase it @@ -915,9 +925,8 @@ vt_flush(struct vt_device *vd) cursor_displayed = 1; /* Mark new mouse position as dirty. */ - vtbuf_mouse_cursor_position(&vw->vw_buf, - vd->vd_mx / vf->vf_width, - vd->vd_my / vf->vf_height); + vt_mark_mouse_position_as_dirty(vd, + vd->vd_mx, vd->vd_my); } } #endif @@ -1618,14 +1627,8 @@ vt_mouse_state(int show) break; } - /* - * Mark mouse position as dirty. - * - * FIXME: See comments in vt_flush(). - */ - vtbuf_mouse_cursor_position(&vw->vw_buf, - vd->vd_mx / vw->vw_font->vf_width, - vd->vd_my / vw->vw_font->vf_height); + /* Mark mouse position as dirty. */ + vt_mark_mouse_position_as_dirty(vd, vd->vd_mx, vd->vd_my); } #endif From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 17:49:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 453943EC; Fri, 22 Aug 2014 17:49:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 30DAE3020; Fri, 22 Aug 2014 17:49:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MHnOIf067796; Fri, 22 Aug 2014 17:49:24 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MHnOOZ067795; Fri, 22 Aug 2014 17:49:24 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201408221749.s7MHnOOZ067795@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Fri, 22 Aug 2014 17:49:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270343 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 17:49:25 -0000 Author: dumbbell Date: Fri Aug 22 17:49:24 2014 New Revision: 270343 URL: http://svnweb.freebsd.org/changeset/base/270343 Log: vt(4): Remove "FIXME" about multiple locking of vt_buf in vt_flush() After some testing, it appears that acquiring the lock once and keeping it longer is slower than taking it multiple times. While here, fix a typo in another comment. MFC after: 1 week Modified: head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Fri Aug 22 17:09:31 2014 (r270342) +++ head/sys/dev/vt/vt_core.c Fri Aug 22 17:49:24 2014 (r270343) @@ -428,7 +428,7 @@ vt_scroll(struct vt_window *vw, int offs diff = vthistory_seek(&vw->vw_buf, offset, whence); /* - * Offset changed, please update Nth lines on sceen. + * Offset changed, please update Nth lines on screen. * +N - Nth lines at top; * -N - Nth lines at bottom. */ @@ -903,12 +903,7 @@ vt_flush(struct vt_device *vd) !(vw->vw_flags & VWF_MOUSE_HIDE)) { /* Cursor displayed. */ if (vd->vd_moldx != vd->vd_mx || vd->vd_moldy != vd->vd_my) { - /* - * Mark last mouse position as dirty to erase. - * - * FIXME: The vt_buf lock is acquired twice in a - * row. - */ + /* Mark last mouse position as dirty to erase. */ vt_mark_mouse_position_as_dirty(vd, vd->vd_moldx, vd->vd_moldy); From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 18:07:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1C63692A; Fri, 22 Aug 2014 18:07:57 +0000 (UTC) Received: from mail-qg0-x22a.google.com (mail-qg0-x22a.google.com [IPv6:2607:f8b0:400d:c04::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9C6B33233; Fri, 22 Aug 2014 18:07:56 +0000 (UTC) Received: by mail-qg0-f42.google.com with SMTP id j5so10854150qga.1 for ; Fri, 22 Aug 2014 11:07:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=8htiSGRWrKRC4xEtwR2p7gjEg1IePvqVrm4S+NYnOLQ=; b=iJM/Sb+mODo6EsqEkkTHU8T7+efKfq4cySz4zpdALC/zgGbCz3LZTZ36QwU9URgaVA /JeXrOMCf9py5JYppaax2OAVc15BcoOdYlUyUeHfrBd13RJVZ6arUoajm3yG/tmbIs94 P1HEhGfv21yhKMNrs1NufrsHaKNCxgv+4Q5F+mAXCzakVJq+nPAOnE4K7dTC50wWcs4z YpRG3uf2q3hG4/cz6m1FJ+MdEgKMAf5RRRj8tZyAY80anjFlnEkwa7jkemDzgidkh+iO tSipHxawnyEGcHpdKja8Qb5rIKYWys4wgz/P/zZrlzlU+SmtFgQ/BfgVhhnLXVf8wjiT st1w== MIME-Version: 1.0 X-Received: by 10.229.97.67 with SMTP id k3mr10444860qcn.1.1408730875393; Fri, 22 Aug 2014 11:07:55 -0700 (PDT) Received: by 10.140.84.80 with HTTP; Fri, 22 Aug 2014 11:07:55 -0700 (PDT) In-Reply-To: <118A680A-E4E4-4FEF-9C9C-44771F89A2D7@bsdimp.com> References: <201408202258.s7KMwDh3073409@svn.freebsd.org> <0DAF2357-4BBA-4D5B-8F17-D61845BACDA5@bsdimp.com> <118A680A-E4E4-4FEF-9C9C-44771F89A2D7@bsdimp.com> Date: Fri, 22 Aug 2014 11:07:55 -0700 Message-ID: Subject: Re: svn commit: r270249 - head/sys/cam/ata From: Neel Natu To: Warner Losh Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 18:07:57 -0000 Hi Warner, On Fri, Aug 22, 2014 at 6:13 AM, Warner Losh wrote: > > On Aug 21, 2014, at 11:58 PM, Neel Natu wrote: > >> Hi Warner, >> >> On Thu, Aug 21, 2014 at 10:34 PM, Warner Losh wrote: >>> >>> On Aug 21, 2014, at 10:31 PM, Neel Natu wrote: >>> >>>> Hi Warner, >>>> >>>> On Wed, Aug 20, 2014 at 3:58 PM, Warner Losh wrote: >>>>> Author: imp >>>>> Date: Wed Aug 20 22:58:12 2014 >>>>> New Revision: 270249 >>>>> URL: http://svnweb.freebsd.org/changeset/base/270249 >>>>> >>>>> Log: >>>>> 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). >>>>> >>>>> Modified: >>>>> head/sys/cam/ata/ata_xpt.c >>>>> >>>>> Modified: head/sys/cam/ata/ata_xpt.c >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>>>> --- head/sys/cam/ata/ata_xpt.c Wed Aug 20 22:39:26 2014 (r270= 248) >>>>> +++ head/sys/cam/ata/ata_xpt.c Wed Aug 20 22:58:12 2014 (r270= 249) >>>>> @@ -458,12 +458,18 @@ negotiate: >>>>> 0, 0x02); >>>>> break; >>>>> case PROBE_SETAN: >>>>> - /* Remember what transport thinks about AEN. */ >>>>> - if (softc->caps & CTS_SATA_CAPS_H_AN) >>>>> + /* >>>>> + * Only ATAPI defines this bit to mean AEN, but remem= ber >>>>> + * what transport thinks about AEN. >>>>> + */ >>>>> + if ((softc->caps & CTS_SATA_CAPS_H_AN) && >>>>> + periph->path->device->protocol =3D=3D PROTO_ATAPI= ) >>>>> path->device->inq_flags |=3D SID_AEN; >>>>> else >>>>> path->device->inq_flags &=3D ~SID_AEN; >>>>> xpt_async(AC_GETDEV_CHANGED, path, NULL); >>>>> + if (periph->path->device->protocol !=3D PROTO_ATAPI) >>>>> + break; >>>>> cam_fill_ataio(ataio, >>>>> 1, >>>>> probedone, >>>>> @@ -750,14 +756,6 @@ out: >>>>> goto noerror; >>>>> >>>>> /* >>>>> - * Some Samsung SSDs report supported Asynchronous No= tification, >>>>> - * but return ABORT on attempt to enable it. >>>>> - */ >>>>> - } else if (softc->action =3D=3D PROBE_SETAN && >>>>> - status =3D=3D 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 fa= il. >>>>> >>>> >>>> This change causes a panic for me on boot. Here is the boot log: >>>> >>>> ahci0: port >>>> 0xf050-0xf057,0xf040-0xf043,0xf030-0xf037,0xf020-0xf023,0xf000-0xf01f >>>> mem 0xfbb21000-0xfbb217ff irq 18 at device 31.2 on pci0 >>>> ahci0: AHCI v1.30 with 6 6Gbps ports, Port Multiplier not supported >>>> ahcich0: at channel 0 on ahci0 >>>> ahcich1: at channel 1 on ahci0 >>>> ahcich2: at channel 2 on ahci0 >>>> ahcich3: at channel 3 on ahci0 >>>> ahcich4: at channel 4 on ahci0 >>>> ahcich5: at channel 5 on ahci0 >>>> ahciem0: on ahci0 >>>> ... >>>> xpt_action_default: CCB type 0xdeadc0de not supported >>>> ... >>>> run_interrupt_driven_hooks: still waiting after 60 seconds for xpt_con= fig >>>> run_interrupt_driven_hooks: still waiting after 120 seconds for xpt_co= nfig >>>> run_interrupt_driven_hooks: still waiting after 180 seconds for xpt_co= nfig >>>> run_interrupt_driven_hooks: still waiting after 240 seconds for xpt_co= nfig >>>> run_interrupt_driven_hooks: still waiting after 300 seconds for xpt_co= nfig >>>> panic: run_interrupt_driven_config_hooks: waited too long >>>> cpuid =3D 0 >>>> KDB: stack backtrace: >>>> db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xffffffff= 81d92920 >>>> kdb_backtrace() at kdb_backtrace+0x39/frame 0xffffffff81d929d0 >>>> vpanic() at vpanic+0x189/frame 0xffffffff81d92a50 >>>> kassert_panic() at kassert_panic+0x139/frame 0xffffffff81d92ac0 >>>> boot_run_interrupt_driven_config_hooks() at >>>> boot_run_interrupt_driven_config_hooks+0x111/frame 0xffffffff81d92b50 >>>> mi_startup()fffff81d92b70 >>>> btext() at btext+0x2c >>>> KDB: enter: panic >>>> [ thread pid 0 tid 100000 ] >>>> Stopped at kdb_enter+0x3e: movq $0,kdb_why >>>> db> >>>> >>>> The peripheral in question is a SATA attached CDROM: >>>> >>>> % camcontrol devlist >>>> at scbus0 target 0 lun 0 (pass0,ada= 0) >>>> at scbus2 target 0 lun 0 (cd0,pass1= ) >>>> at scbus3 target 0 lun 0 (pass2,ada= 1) >>>> at scbus4 target 0 lun 0 (pass3,ada= 2) >>>> at scbus6 target 0 lun 0 (ses0,pass= 4) >>>> >>>> pass1 at ahcich2 bus 0 scbus2 target 0 lun 0 >>>> pass1: Removable CD-ROM SCSI-0 device >>>> pass1: Serial Number 3524472 2N8225501140 >>>> pass1: 150.000MB/s transfers (SATA 1.x, UDMA5, ATAPI 12bytes, PIO 8192= bytes) >>>> >>>> The following patch fixes the panic. >>>> >>>> Index: sys/cam/ata/ata_xpt.c >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>> --- sys/cam/ata/ata_xpt.c (revision 270249) >>>> +++ sys/cam/ata/ata_xpt.c (working copy) >>>> @@ -468,7 +468,8 @@ >>>> else >>>> path->device->inq_flags &=3D ~SID_AEN; >>>> xpt_async(AC_GETDEV_CHANGED, path, NULL); >>>> - if (periph->path->device->protocol !=3D PROTO_ATAPI) >>>> + if (periph->path->device->protocol !=3D PROTO_ATAPI && >>>> + periph->path->device->protocol !=3D PROTO_SCSI) >>>> break; >>>> cam_fill_ataio(ataio, >>>> 1, >>> >>> I think the more proper test is =3D=3D PROTO_ATA elsewhere, since that= =E2=80=99s what >>> distinguishes the ATA_IDENTIFY from the ATAPI_IDENTIFY. >>> >>>> However, there seem to be a couple of issues with the original patch: >>>> >>>> 1. The 'periph->path->device->protocol' is not initialized to >>>> PROTO_ATAPI anywhere in the tree so the not-equal-to test is a no-op. >>> >>> We test here to determine which identify command to send: >>> >>> if (periph->path->device->protocol =3D=3D PROTO_ATA) >>> ata_28bit_cmd(ataio, ATA_ATA_IDENTIFY, 0, 0, 0); >>> else >>> ata_28bit_cmd(ataio, ATA_ATAPI_IDENTIFY, 0, 0, 0= ); >>> >>> and that is working to send the right command. >>> >> >> Yes, but PROTO_ATA !=3D PROTO_ATAPI :-) >> >> Since we never initialize 'periph->path->device->protocol' to >> 'PROTO_ATAPI' in -current: > > But this code appears to: > > case PROBE_RESET: > { > int sign =3D (done_ccb->ataio.res.lba_high << 8) + > done_ccb->ataio.res.lba_mid; > CAM_DEBUG(path, CAM_DEBUG_PROBE, > ("SIGNATURE: %04x\n", sign)); > if (sign =3D=3D 0x0000 && > done_ccb->ccb_h.target_id !=3D 15) { > path->device->protocol =3D PROTO_ATA; > PROBE_SET_ACTION(softc, PROBE_IDENTIFY); > } else if (sign =3D=3D 0x9669 && > done_ccb->ccb_h.target_id =3D=3D 15) { > /* Report SIM that PM is present. */ > bzero(&cts, sizeof(cts)); > xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE= ); > cts.ccb_h.func_code =3D XPT_SET_TRAN_SETTINGS; > cts.type =3D CTS_TYPE_CURRENT_SETTINGS; > cts.xport_specific.sata.pm_present =3D 1; > cts.xport_specific.sata.valid =3D CTS_SATA_VALID_= PM; > xpt_action((union ccb *)&cts); > path->device->protocol =3D PROTO_SATAPM; > PROBE_SET_ACTION(softc, PROBE_PM_PID); > } else if (sign =3D=3D 0xc33c && > done_ccb->ccb_h.target_id !=3D 15) { > path->device->protocol =3D PROTO_SEMB; > PROBE_SET_ACTION(softc, PROBE_IDENTIFY_SES); > } else if (sign =3D=3D 0xeb14 && > done_ccb->ccb_h.target_id !=3D 15) { > path->device->protocol =3D PROTO_SCSI; > PROBE_SET_ACTION(softc, PROBE_IDENTIFY); > } else { > if (done_ccb->ccb_h.target_id !=3D 15) { > xpt_print(path, > "Unexpected signature 0x%04x\n", sign= ); > } > goto device_fail; > } > > what am I missing? > In the snippet above 'protocol' is set to one of PROTO_ATA, PROTO_SATAPM, PROTO_SEMB or PROTO_SCSI - none of which is PROTO_ATAPI :-) $ find sys -type f -exec grep -nH -w PROTO_ATAPI {} \; sys/cam/scsi/scsi_pass.c:355: if (cgd->protocol =3D=3D PROTO_SCSI || cgd->protocol =3D=3D PROTO_ATAPI) sys/cam/cam_ccb.h:249: PROTO_ATAPI, /* AT Attachment Packetized Interface *= / best Neel >> if (protocol !=3D PROTO_ATAPI) equates to if (1) >> if (protocol =3D=3D PROTO_ATAPI) equates to if (0) >> >> I was trying to say that any code that compares 'protocol' to >> PROTO_ATAPI probably deserves a second look (e.g., the original patch >> that triggered this panic). > > Yes, but I think you=E2=80=99re analysis was incorrect on this point :) > >>>> 2. It seems not right to break out of switch in 'probestart()' without >>>> providing a way for 'probedone()' to be called. I believe that this >>>> stops the state machine from making forward progress and results in >>>> 'xpt_config()' not completing. >>> >>> That=E2=80=99s a problem, you=E2=80=99re right. Let me rework. >>> >>>> If you need more information to debug this some more or test a proper >>>> fix then I am happy to help. >>> >>> Please try the one included here. I think it will address things. I=E2= =80=99ve tried it on one system, and am trying it on others in parallel to = sending this. >>> >> >> Yup, works fine. Thanks for the quick fix! > > Will push it in. Thanks. > > Warner From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 18:09:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 516A9ABF; Fri, 22 Aug 2014 18:09:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 31ACA3245; Fri, 22 Aug 2014 18:09:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MI97jt077096; Fri, 22 Aug 2014 18:09:07 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MI96Cc077094; Fri, 22 Aug 2014 18:09:06 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201408221809.s7MI96Cc077094@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 22 Aug 2014 18:09:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270344 - in stable/10/sys/amd64: amd64 include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 18:09:07 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 18:42:15 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F6483C7; Fri, 22 Aug 2014 18:42:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6BB8935DD; Fri, 22 Aug 2014 18:42:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MIgFDC094338; Fri, 22 Aug 2014 18:42:15 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MIgFNO094337; Fri, 22 Aug 2014 18:42:15 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201408221842.s7MIgFNO094337@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 22 Aug 2014 18:42:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270345 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 18:42:15 -0000 Author: kib Date: Fri Aug 22 18:42:14 2014 New Revision: 270345 URL: http://svnweb.freebsd.org/changeset/base/270345 Log: In do_lock_pi(), do not override error from umtxq_sleep_pi() when doing suspend check. This restores the pre-r251684 behaviour, to retry once after the signal is detected. PR: kern/192918 Submitted by: Elliott Rabe, Dell Inc., Eric van Gyzen Obtained from: Dell Inc. MFC after: 1 week Modified: head/sys/kern/kern_umtx.c Modified: head/sys/kern/kern_umtx.c ============================================================================== --- head/sys/kern/kern_umtx.c Fri Aug 22 18:09:06 2014 (r270344) +++ head/sys/kern/kern_umtx.c Fri Aug 22 18:42:14 2014 (r270345) @@ -1700,10 +1700,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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 18:56:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D503917 for ; Fri, 22 Aug 2014 18:56:41 +0000 (UTC) Received: from mail-pa0-f44.google.com (mail-pa0-f44.google.com [209.85.220.44]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D42D13711 for ; Fri, 22 Aug 2014 18:56:40 +0000 (UTC) Received: by mail-pa0-f44.google.com with SMTP id eu11so17035895pac.31 for ; Fri, 22 Aug 2014 11:56:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; bh=LSSK/ZXkSbSjPOHxqtBkm22yporMqE3r6B1t+IwlW6w=; b=PryN3btIdpEQ0MOAWfFAienkL9nJSJWF+mlc0ZTfg4L5Hv4sN0THxGVcD/McGAED5K zLzrzxIh0KqqUtsd2wADPpyQNz14x8goxlbcQcUE9I0AJGdmSmu7rVhtZXH/ZGkIjrfM J2LYJSQe6H4kqLg8G4zX2Q93DTTP08VM8ktniCtLchhM80UV9DR6ilPW73x2CcmLTqVn 4nv0JRCOw5wBP/TbDNf7sCHv5WUnVc0moVcSXhrafHQDFIBPrY/2gMwfrtnCrQyH2qgY JE1mwFbSlpD3p8R3nx0+S7sFo+nqZenPIn4NjxO7eDLjQvQp67f85xGqB9VeHwBVLk35 Cxaw== X-Gm-Message-State: ALoCoQmNAX27pa1hQvo4T5FygjlYiRgrdg4/M4E3L0i8WGsUyQupJ8AiH5gkq/H2X06m0n2JZJxf X-Received: by 10.68.95.196 with SMTP id dm4mr8551021pbb.95.1408733799723; Fri, 22 Aug 2014 11:56:39 -0700 (PDT) Received: from [10.64.25.67] (dc1-prod.netflix.com. [69.53.236.251]) by mx.google.com with ESMTPSA id h4sm44784820pdi.30.2014.08.22.11.56.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 22 Aug 2014 11:56:38 -0700 (PDT) Sender: Warner Losh Content-Type: multipart/signed; boundary="Apple-Mail=_484F65C8-572B-4C8D-8AC3-164FA0965F65"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r270249 - head/sys/cam/ata From: Warner Losh In-Reply-To: Date: Fri, 22 Aug 2014 12:56:36 -0600 Message-Id: References: <201408202258.s7KMwDh3073409@svn.freebsd.org> <0DAF2357-4BBA-4D5B-8F17-D61845BACDA5@bsdimp.com> <118A680A-E4E4-4FEF-9C9C-44771F89A2D7@bsdimp.com> To: Neel Natu X-Mailer: Apple Mail (2.1878.6) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 18:56:41 -0000 --Apple-Mail=_484F65C8-572B-4C8D-8AC3-164FA0965F65 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Aug 22, 2014, at 12:07 PM, Neel Natu wrote: > Hi Warner, >=20 > On Fri, Aug 22, 2014 at 6:13 AM, Warner Losh wrote: >>=20 >> On Aug 21, 2014, at 11:58 PM, Neel Natu wrote: >>=20 >>> Hi Warner, >>>=20 >>> On Thu, Aug 21, 2014 at 10:34 PM, Warner Losh = wrote: >>>>=20 >>>> On Aug 21, 2014, at 10:31 PM, Neel Natu wrote: >>>>=20 >>>>> Hi Warner, >>>>>=20 >>>>> On Wed, Aug 20, 2014 at 3:58 PM, Warner Losh = wrote: >>>>>> Author: imp >>>>>> Date: Wed Aug 20 22:58:12 2014 >>>>>> New Revision: 270249 >>>>>> URL: http://svnweb.freebsd.org/changeset/base/270249 >>>>>>=20 >>>>>> Log: >>>>>> 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). >>>>>>=20 >>>>>> Modified: >>>>>> head/sys/cam/ata/ata_xpt.c >>>>>>=20 >>>>>> Modified: head/sys/cam/ata/ata_xpt.c >>>>>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >>>>>> --- head/sys/cam/ata/ata_xpt.c Wed Aug 20 22:39:26 2014 = (r270248) >>>>>> +++ head/sys/cam/ata/ata_xpt.c Wed Aug 20 22:58:12 2014 = (r270249) >>>>>> @@ -458,12 +458,18 @@ negotiate: >>>>>> 0, 0x02); >>>>>> break; >>>>>> case PROBE_SETAN: >>>>>> - /* Remember what transport thinks about AEN. */ >>>>>> - if (softc->caps & CTS_SATA_CAPS_H_AN) >>>>>> + /* >>>>>> + * Only ATAPI defines this bit to mean AEN, but = remember >>>>>> + * what transport thinks about AEN. >>>>>> + */ >>>>>> + if ((softc->caps & CTS_SATA_CAPS_H_AN) && >>>>>> + periph->path->device->protocol =3D=3D = PROTO_ATAPI) >>>>>> path->device->inq_flags |=3D SID_AEN; >>>>>> else >>>>>> path->device->inq_flags &=3D ~SID_AEN; >>>>>> xpt_async(AC_GETDEV_CHANGED, path, NULL); >>>>>> + if (periph->path->device->protocol !=3D = PROTO_ATAPI) >>>>>> + break; >>>>>> cam_fill_ataio(ataio, >>>>>> 1, >>>>>> probedone, >>>>>> @@ -750,14 +756,6 @@ out: >>>>>> goto noerror; >>>>>>=20 >>>>>> /* >>>>>> - * Some Samsung SSDs report supported = Asynchronous Notification, >>>>>> - * but return ABORT on attempt to enable it. >>>>>> - */ >>>>>> - } else if (softc->action =3D=3D PROBE_SETAN && >>>>>> - status =3D=3D 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. >>>>>>=20 >>>>>=20 >>>>> This change causes a panic for me on boot. Here is the boot log: >>>>>=20 >>>>> ahci0: port >>>>> = 0xf050-0xf057,0xf040-0xf043,0xf030-0xf037,0xf020-0xf023,0xf000-0xf01f >>>>> mem 0xfbb21000-0xfbb217ff irq 18 at device 31.2 on pci0 >>>>> ahci0: AHCI v1.30 with 6 6Gbps ports, Port Multiplier not = supported >>>>> ahcich0: at channel 0 on ahci0 >>>>> ahcich1: at channel 1 on ahci0 >>>>> ahcich2: at channel 2 on ahci0 >>>>> ahcich3: at channel 3 on ahci0 >>>>> ahcich4: at channel 4 on ahci0 >>>>> ahcich5: at channel 5 on ahci0 >>>>> ahciem0: on ahci0 >>>>> ... >>>>> xpt_action_default: CCB type 0xdeadc0de not supported >>>>> ... >>>>> run_interrupt_driven_hooks: still waiting after 60 seconds for = xpt_config >>>>> run_interrupt_driven_hooks: still waiting after 120 seconds for = xpt_config >>>>> run_interrupt_driven_hooks: still waiting after 180 seconds for = xpt_config >>>>> run_interrupt_driven_hooks: still waiting after 240 seconds for = xpt_config >>>>> run_interrupt_driven_hooks: still waiting after 300 seconds for = xpt_config >>>>> panic: run_interrupt_driven_config_hooks: waited too long >>>>> cpuid =3D 0 >>>>> KDB: stack backtrace: >>>>> db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame = 0xffffffff81d92920 >>>>> kdb_backtrace() at kdb_backtrace+0x39/frame 0xffffffff81d929d0 >>>>> vpanic() at vpanic+0x189/frame 0xffffffff81d92a50 >>>>> kassert_panic() at kassert_panic+0x139/frame 0xffffffff81d92ac0 >>>>> boot_run_interrupt_driven_config_hooks() at >>>>> boot_run_interrupt_driven_config_hooks+0x111/frame = 0xffffffff81d92b50 >>>>> mi_startup()fffff81d92b70 >>>>> btext() at btext+0x2c >>>>> KDB: enter: panic >>>>> [ thread pid 0 tid 100000 ] >>>>> Stopped at kdb_enter+0x3e: movq $0,kdb_why >>>>> db> >>>>>=20 >>>>> The peripheral in question is a SATA attached CDROM: >>>>>=20 >>>>> % camcontrol devlist >>>>> at scbus0 target 0 lun 0 = (pass0,ada0) >>>>> at scbus2 target 0 lun 0 = (cd0,pass1) >>>>> at scbus3 target 0 lun 0 = (pass2,ada1) >>>>> at scbus4 target 0 lun 0 = (pass3,ada2) >>>>> at scbus6 target 0 lun 0 = (ses0,pass4) >>>>>=20 >>>>> pass1 at ahcich2 bus 0 scbus2 target 0 lun 0 >>>>> pass1: Removable CD-ROM SCSI-0 device >>>>> pass1: Serial Number 3524472 2N8225501140 >>>>> pass1: 150.000MB/s transfers (SATA 1.x, UDMA5, ATAPI 12bytes, PIO = 8192bytes) >>>>>=20 >>>>> The following patch fixes the panic. >>>>>=20 >>>>> Index: sys/cam/ata/ata_xpt.c >>>>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>>> --- sys/cam/ata/ata_xpt.c (revision 270249) >>>>> +++ sys/cam/ata/ata_xpt.c (working copy) >>>>> @@ -468,7 +468,8 @@ >>>>> else >>>>> path->device->inq_flags &=3D ~SID_AEN; >>>>> xpt_async(AC_GETDEV_CHANGED, path, NULL); >>>>> - if (periph->path->device->protocol !=3D = PROTO_ATAPI) >>>>> + if (periph->path->device->protocol !=3D = PROTO_ATAPI && >>>>> + periph->path->device->protocol !=3D = PROTO_SCSI) >>>>> break; >>>>> cam_fill_ataio(ataio, >>>>> 1, >>>>=20 >>>> I think the more proper test is =3D=3D PROTO_ATA elsewhere, since = that=92s what >>>> distinguishes the ATA_IDENTIFY from the ATAPI_IDENTIFY. >>>>=20 >>>>> However, there seem to be a couple of issues with the original = patch: >>>>>=20 >>>>> 1. The 'periph->path->device->protocol' is not initialized to >>>>> PROTO_ATAPI anywhere in the tree so the not-equal-to test is a = no-op. >>>>=20 >>>> We test here to determine which identify command to send: >>>>=20 >>>> if (periph->path->device->protocol =3D=3D PROTO_ATA) >>>> ata_28bit_cmd(ataio, ATA_ATA_IDENTIFY, 0, 0, = 0); >>>> else >>>> ata_28bit_cmd(ataio, ATA_ATAPI_IDENTIFY, 0, = 0, 0); >>>>=20 >>>> and that is working to send the right command. >>>>=20 >>>=20 >>> Yes, but PROTO_ATA !=3D PROTO_ATAPI :-) >>>=20 >>> Since we never initialize 'periph->path->device->protocol' to >>> 'PROTO_ATAPI' in -current: >>=20 >> But this code appears to: >>=20 >> case PROBE_RESET: >> { >> int sign =3D (done_ccb->ataio.res.lba_high << 8) + >> done_ccb->ataio.res.lba_mid; >> CAM_DEBUG(path, CAM_DEBUG_PROBE, >> ("SIGNATURE: %04x\n", sign)); >> if (sign =3D=3D 0x0000 && >> done_ccb->ccb_h.target_id !=3D 15) { >> path->device->protocol =3D PROTO_ATA; >> PROBE_SET_ACTION(softc, PROBE_IDENTIFY); >> } else if (sign =3D=3D 0x9669 && >> done_ccb->ccb_h.target_id =3D=3D 15) { >> /* Report SIM that PM is present. */ >> bzero(&cts, sizeof(cts)); >> xpt_setup_ccb(&cts.ccb_h, path, = CAM_PRIORITY_NONE); >> cts.ccb_h.func_code =3D XPT_SET_TRAN_SETTINGS; >> cts.type =3D CTS_TYPE_CURRENT_SETTINGS; >> cts.xport_specific.sata.pm_present =3D 1; >> cts.xport_specific.sata.valid =3D = CTS_SATA_VALID_PM; >> xpt_action((union ccb *)&cts); >> path->device->protocol =3D PROTO_SATAPM; >> PROBE_SET_ACTION(softc, PROBE_PM_PID); >> } else if (sign =3D=3D 0xc33c && >> done_ccb->ccb_h.target_id !=3D 15) { >> path->device->protocol =3D PROTO_SEMB; >> PROBE_SET_ACTION(softc, PROBE_IDENTIFY_SES); >> } else if (sign =3D=3D 0xeb14 && >> done_ccb->ccb_h.target_id !=3D 15) { >> path->device->protocol =3D PROTO_SCSI; >> PROBE_SET_ACTION(softc, PROBE_IDENTIFY); >> } else { >> if (done_ccb->ccb_h.target_id !=3D 15) { >> xpt_print(path, >> "Unexpected signature 0x%04x\n", = sign); >> } >> goto device_fail; >> } >>=20 >> what am I missing? >>=20 >=20 > In the snippet above 'protocol' is set to one of PROTO_ATA, > PROTO_SATAPM, PROTO_SEMB or PROTO_SCSI - none of which is PROTO_ATAPI > :-) >=20 > $ find sys -type f -exec grep -nH -w PROTO_ATAPI {} \; > sys/cam/scsi/scsi_pass.c:355: if (cgd->protocol =3D=3D PROTO_SCSI || > cgd->protocol =3D=3D PROTO_ATAPI) > sys/cam/cam_ccb.h:249: PROTO_ATAPI, /* AT Attachment Packetized = Interface */ Uggg. OK. I=92ll look... > best > Neel >=20 >>> if (protocol !=3D PROTO_ATAPI) equates to if (1) >>> if (protocol =3D=3D PROTO_ATAPI) equates to if (0) >>>=20 >>> I was trying to say that any code that compares 'protocol' to >>> PROTO_ATAPI probably deserves a second look (e.g., the original = patch >>> that triggered this panic). >>=20 >> Yes, but I think you=92re analysis was incorrect on this point :) >>=20 >>>>> 2. It seems not right to break out of switch in 'probestart()' = without >>>>> providing a way for 'probedone()' to be called. I believe that = this >>>>> stops the state machine from making forward progress and results = in >>>>> 'xpt_config()' not completing. >>>>=20 >>>> That=92s a problem, you=92re right. Let me rework. >>>>=20 >>>>> If you need more information to debug this some more or test a = proper >>>>> fix then I am happy to help. >>>>=20 >>>> Please try the one included here. I think it will address things. = I=92ve tried it on one system, and am trying it on others in parallel to = sending this. >>>>=20 >>>=20 >>> Yup, works fine. Thanks for the quick fix! >>=20 >> Will push it in. Thanks. >>=20 >> Warner --Apple-Mail=_484F65C8-572B-4C8D-8AC3-164FA0965F65 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJT95JlAAoJEGwc0Sh9sBEAgn4P/Rhg/LsA2xDxdA5O/Ej3j0oJ F5bQHo4cB+Hw3uUbT/tbu3BuUqnqiwRoMW2/MIxsY0EB/pVeHqFmwrNidVuWmUAd Drsam7ndFNhpchcMXjgTtjXnvk4LdI88dTD+2A4pGY0OPWMxNTFONUGrh8S/cPIN DFD4ise8jnv+/qj0P/Hi8yHOJshgu0UOXVIg6LLYXiVgOBOUzH2Dip1FVDT4j/Dj ruJjQ1OnRhgRo5W7u1bfpR3RpI4BH3FoYxdt0GBgepwpUjU5lKpXPO4J2oFWbIGO EVdy8lxBNbZGCNCQdrH/5E4TfgUXC7E+L9SROS+eno+SX+Jkoy7LeUoRt7DYiW4L 59gbXC0BM74mIU13KDegorIPxZLN4tryp933EihrtUGYq0tkeb+ZnHFdHCl1gyJ5 lBnwLwKz1362yJ2h/EEk+e+kcJe/g5OoaW5trSxtNcmV2v/2dmeTysiK+2FVf03m mElhrqJO/YZ71+pEH66DA5jMaVh4O9ef60EuYpXCoMgg4Od1jD2tYsdpGhUE0nzf gWnFiDR/3pTMKkmv9SQtSl0ra5L0HI5/YZM9gMn1oEVGxHZ9Kw0zIpMg4qTPLlrt n7e+Udyb2iYNyezC8tfJaIIjnYoCQLB6bwxISQ4NKVP48J1pfLOYfZMRtsSkczGt NfMnL9ifmwAGan1fCG2A =Licb -----END PGP SIGNATURE----- --Apple-Mail=_484F65C8-572B-4C8D-8AC3-164FA0965F65-- From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 18:59:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6F9639A6; Fri, 22 Aug 2014 18:59:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 590143721; Fri, 22 Aug 2014 18:59:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MIxKIo000200; Fri, 22 Aug 2014 18:59:20 GMT (envelope-from jfv@FreeBSD.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MIxJNK000194; Fri, 22 Aug 2014 18:59:19 GMT (envelope-from jfv@FreeBSD.org) Message-Id: <201408221859.s7MIxJNK000194@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jfv set sender to jfv@FreeBSD.org using -f From: Jack F Vogel Date: Fri, 22 Aug 2014 18:59:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270346 - in head/sys: conf dev/i40e dev/ixl modules/i40e modules/ixl modules/ixlv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 18:59:20 -0000 Author: jfv Date: Fri Aug 22 18:59:19 2014 New Revision: 270346 URL: http://svnweb.freebsd.org/changeset/base/270346 Log: Update to 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. - Thanks to my new coworker Eric Joyner for his superb work in both the core and vf driver code. Enjoy everyone! Submitted by: jack.vogel@intel.com and eric.joyner@intel.com MFC after: 3 days (hoping to make 10.1) Added: head/sys/dev/ixl/ - copied from r270343, head/sys/dev/i40e/ head/sys/dev/ixl/if_ixl.c - copied, changed from r270343, head/sys/dev/i40e/if_i40e.c head/sys/dev/ixl/if_ixlv.c (contents, props changed) head/sys/dev/ixl/ixl.h (contents, props changed) head/sys/dev/ixl/ixl_pf.h (contents, props changed) head/sys/dev/ixl/ixl_txrx.c - copied, changed from r270343, head/sys/dev/i40e/i40e_txrx.c head/sys/dev/ixl/ixlv.h (contents, props changed) head/sys/dev/ixl/ixlvc.c (contents, props changed) head/sys/modules/ixl/ - copied from r270343, head/sys/modules/i40e/ head/sys/modules/ixlv/ head/sys/modules/ixlv/Makefile (contents, props changed) Deleted: head/sys/dev/i40e/ head/sys/dev/ixl/i40e.h head/sys/dev/ixl/i40e_pf.h head/sys/dev/ixl/i40e_txrx.c head/sys/dev/ixl/if_i40e.c head/sys/modules/i40e/ Modified: head/sys/conf/files head/sys/dev/ixl/README (contents, props changed) head/sys/dev/ixl/i40e_adminq.c head/sys/dev/ixl/i40e_adminq.h head/sys/dev/ixl/i40e_adminq_cmd.h head/sys/dev/ixl/i40e_common.c head/sys/dev/ixl/i40e_osdep.c head/sys/dev/ixl/i40e_osdep.h head/sys/dev/ixl/i40e_prototype.h head/sys/dev/ixl/i40e_type.h head/sys/dev/ixl/i40e_virtchnl.h head/sys/modules/ixl/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Fri Aug 22 18:42:14 2014 (r270345) +++ head/sys/conf/files Fri Aug 22 18:59:19 2014 (r270346) @@ -1424,22 +1424,26 @@ dev/hptiop/hptiop.c optional hptiop scb dev/hwpmc/hwpmc_logging.c optional hwpmc dev/hwpmc/hwpmc_mod.c optional hwpmc dev/hwpmc/hwpmc_soft.c optional hwpmc -dev/i40e/if_i40e.c optional i40e inet \ - compile-with "${NORMAL_C} -I$S/dev/i40e -DSMP" -dev/i40e/i40e_txrx.c optional i40e inet \ - compile-with "${NORMAL_C} -I$S/dev/i40e -DSMP" -dev/i40e/i40e_osdep.c optional i40e inet \ - compile-with "${NORMAL_C} -I$S/dev/i40e -DSMP" -dev/i40e/i40e_nvm.c optional i40e inet \ - compile-with "${NORMAL_C} -I$S/dev/i40e -DSMP" -dev/i40e/i40e_lan_hmc.c optional i40e inet \ - compile-with "${NORMAL_C} -I$S/dev/i40e -DSMP" -dev/i40e/i40e_hmc.c optional i40e inet \ - compile-with "${NORMAL_C} -I$S/dev/i40e -DSMP" -dev/i40e/i40e_common.c optional i40e inet \ - compile-with "${NORMAL_C} -I$S/dev/i40e -DSMP" -dev/i40e/i40e_adminq.c optional i40e inet \ - compile-with "${NORMAL_C} -I$S/dev/i40e -DSMP" +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/ichsmb/ichsmb.c optional ichsmb dev/ichsmb/ichsmb_pci.c optional ichsmb pci dev/ida/ida.c optional ida Modified: head/sys/dev/ixl/README ============================================================================== --- head/sys/dev/i40e/README Fri Aug 22 17:49:24 2014 (r270343) +++ head/sys/dev/ixl/README Fri Aug 22 18:59:19 2014 (r270346) @@ -1,7 +1,7 @@ -FreeBSD Base Driver for the Intel® XL710 Ethernet Controller Family -================================================================ +ixl FreeBSD* Base Driver for the Intel® XL710 Ethernet Controller Family /*$FreeBSD$*/ +================================================================ July 21, 2014 @@ -19,7 +19,7 @@ Contents Overview ======== -This file describes the i40e 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. +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. @@ -60,17 +60,17 @@ NOTE: You must have kernel sources insta 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/i40e or /usr/local/src/i40e. +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 i40e-x.x.x.tar.gz + tar xfz ixl-x.x.x.tar.gz 3. To install man page: - cd i40e-x.x.x - gzip -c i40e.4 > /usr/share/man/man4/i40e.4.gz + 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 i40e-x.x.x/src + cd ixl-x.x.x/src make load 5. To assign an IP address to the interface, enter the following: @@ -82,12 +82,12 @@ as indicated in thename of the driver ta 7. If you want the driver to load automatically when the system is booted: - cd i40e-x.x.x/src + cd ixl-x.x.x/src make make install Edit /boot/loader.conf, and add the following line: - if_i40e_load="YES" + if_ixl_load="YES" Edit /etc/rc.conf, and create the appropriate ifconfig_ixl entry: @@ -304,7 +304,7 @@ Also, increasing the follwing in /etc/sy UDP Stress Test Dropped Packet Issue ------------------------------------ - Under small packet UDP stress test with the i40e 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. + 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 Modified: head/sys/dev/ixl/i40e_adminq.c ============================================================================== --- head/sys/dev/i40e/i40e_adminq.c Fri Aug 22 17:49:24 2014 (r270343) +++ head/sys/dev/ixl/i40e_adminq.c Fri Aug 22 18:59:19 2014 (r270346) @@ -57,7 +57,7 @@ static INLINE bool i40e_is_nvm_update_op static void i40e_adminq_init_regs(struct i40e_hw *hw) { /* set head and tail registers in our local struct */ - if (hw->mac.type == I40E_MAC_VF) { + 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; @@ -68,19 +68,6 @@ static void i40e_adminq_init_regs(struct hw->aq.arq.len = I40E_VF_ARQLEN1; hw->aq.arq.bal = I40E_VF_ARQBAL1; hw->aq.arq.bah = I40E_VF_ARQBAH1; -#ifdef I40E_QV - } else if (hw->aq_dbg_ena) { - hw->aq.asq.tail = I40E_GL_ATQT; - hw->aq.asq.head = I40E_GL_ATQH; - hw->aq.asq.len = I40E_GL_ATQLEN; - hw->aq.asq.bal = I40E_GL_ATQBAL; - hw->aq.asq.bah = I40E_GL_ATQBAH; - hw->aq.arq.tail = I40E_GL_ARQT; - hw->aq.arq.head = I40E_GL_ARQH; - hw->aq.arq.len = I40E_GL_ARQLEN; - hw->aq.arq.bal = I40E_GL_ARQBAL; - hw->aq.arq.bah = I40E_GL_ARQBAH; -#endif } else { hw->aq.asq.tail = I40E_PF_ATQT; hw->aq.asq.head = I40E_PF_ATQH; @@ -169,10 +156,6 @@ void i40e_free_adminq_arq(struct i40e_hw **/ static enum i40e_status_code i40e_alloc_arq_bufs(struct i40e_hw *hw) { -#ifdef I40E_QV - struct i40e_aq_desc qv_desc; - struct i40e_aq_desc *qv_desc_on_ring; -#endif enum i40e_status_code ret_code; struct i40e_aq_desc *desc; struct i40e_dma_mem *bi; @@ -201,13 +184,6 @@ static enum i40e_status_code i40e_alloc_ /* now configure the descriptors for use */ desc = I40E_ADMINQ_DESC(hw->aq.arq, i); -#ifdef I40E_QV - /* swap the descriptor with userspace version */ - i40e_memcpy(&qv_desc, desc, sizeof(struct i40e_aq_desc), - I40E_DMA_TO_NONDMA); - qv_desc_on_ring = desc; - desc = &qv_desc; -#endif desc->flags = CPU_TO_LE16(I40E_AQ_FLAG_BUF); if (hw->aq.arq_buf_size > I40E_AQ_LARGE_BUF) @@ -226,11 +202,6 @@ static enum i40e_status_code i40e_alloc_ CPU_TO_LE32(I40E_LO_DWORD(bi->pa)); desc->params.external.param0 = 0; desc->params.external.param1 = 0; -#ifdef I40E_QV - /* put the initialized descriptor back to the ring */ - i40e_memcpy(qv_desc_on_ring, desc, sizeof(struct i40e_aq_desc), - I40E_NONDMA_TO_DMA); -#endif } alloc_arq_bufs: @@ -521,22 +492,11 @@ enum i40e_status_code i40e_shutdown_asq( return I40E_ERR_NOT_READY; /* Stop firmware AdminQ processing */ -#ifdef I40E_QV - /* Do not reset registers, as Tools AQ is shared resource for QV */ - if (!hw->aq_dbg_ena) { - 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); - } -#else 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); -#endif /* make sure spinlock is available */ i40e_acquire_spinlock(&hw->aq.asq_spinlock); @@ -565,22 +525,11 @@ enum i40e_status_code i40e_shutdown_arq( return I40E_ERR_NOT_READY; /* Stop firmware AdminQ processing */ -#ifdef I40E_QV - /* Do not reset registers, as Tools AQ is shared resource for QV */ - if (!hw->aq_dbg_ena) { - 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); - } -#else 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); -#endif /* make sure spinlock is available */ i40e_acquire_spinlock(&hw->aq.arq_spinlock); @@ -611,7 +560,6 @@ enum i40e_status_code i40e_init_adminq(s 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) || @@ -641,7 +589,10 @@ enum i40e_status_code i40e_init_adminq(s if (ret_code != I40E_SUCCESS) goto init_adminq_free_asq; - /* There are some cases where the firmware may not be quite ready + 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. */ @@ -667,19 +618,10 @@ enum i40e_status_code i40e_init_adminq(s i40e_read_nvm_word(hw, I40E_SR_NVM_EETRACK_HI, &eetrack_hi); hw->nvm.eetrack = (eetrack_hi << 16) | eetrack_lo; -#ifdef I40E_QV - if (!hw->qv_force_init) { - if (hw->aq.api_maj_ver > I40E_FW_API_VERSION_MAJOR) { - ret_code = I40E_ERR_FIRMWARE_API_VERSION; - goto init_adminq_free_arq; - } - } -#else if (hw->aq.api_maj_ver > I40E_FW_API_VERSION_MAJOR) { ret_code = I40E_ERR_FIRMWARE_API_VERSION; goto init_adminq_free_arq; } -#endif /* pre-emptive resource lock release */ i40e_aq_release_resource(hw, I40E_NVM_RESOURCE_ID, 0, NULL); @@ -714,16 +656,8 @@ enum i40e_status_code i40e_shutdown_admi { enum i40e_status_code ret_code = I40E_SUCCESS; -#ifdef I40E_QV - /* This command is not supported for Tools AQ */ - if (!hw->aq_dbg_ena) { - if (i40e_check_asq_alive(hw)) - i40e_aq_queue_shutdown(hw, TRUE); - } -#else if (i40e_check_asq_alive(hw)) i40e_aq_queue_shutdown(hw, TRUE); -#endif i40e_shutdown_asq(hw); i40e_shutdown_arq(hw); @@ -743,10 +677,6 @@ enum i40e_status_code i40e_shutdown_admi **/ u16 i40e_clean_asq(struct i40e_hw *hw) { -#ifdef I40E_QV - struct i40e_aq_desc qv_desc = {0}; - struct i40e_aq_desc *qv_desc_on_ring; -#endif /* I40E_QV */ struct i40e_adminq_ring *asq = &(hw->aq.asq); struct i40e_asq_cmd_details *details; u16 ntc = asq->next_to_clean; @@ -755,13 +685,6 @@ u16 i40e_clean_asq(struct i40e_hw *hw) desc = I40E_ADMINQ_DESC(*asq, ntc); details = I40E_ADMINQ_DETAILS(*asq, ntc); -#ifdef I40E_QV - /* copy the descriptor from ring to userspace buffer */ - i40e_memcpy(&qv_desc, desc, sizeof(struct i40e_aq_desc), - I40E_DMA_TO_NONDMA); - qv_desc_on_ring = desc; - desc = &qv_desc; -#endif /* I40E_QV */ while (rd32(hw, hw->aq.asq.head) != ntc) { i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE, "%s: ntc %d head %d.\n", __FUNCTION__, ntc, @@ -776,23 +699,11 @@ u16 i40e_clean_asq(struct i40e_hw *hw) } i40e_memset(desc, 0, sizeof(*desc), I40E_DMA_MEM); i40e_memset(details, 0, sizeof(*details), I40E_NONDMA_MEM); -#ifdef I40E_QV - /* copy the descriptor from userspace buffer to ring */ - i40e_memcpy(qv_desc_on_ring, desc, - sizeof(struct i40e_aq_desc), I40E_NONDMA_TO_DMA); -#endif /* I40E_QV */ ntc++; if (ntc == asq->count) ntc = 0; desc = I40E_ADMINQ_DESC(*asq, ntc); details = I40E_ADMINQ_DETAILS(*asq, ntc); -#ifdef I40E_QV - /* copy the descriptor from ring to userspace buffer */ - i40e_memcpy(&qv_desc, desc, sizeof(struct i40e_aq_desc), - I40E_DMA_TO_NONDMA); - qv_desc_on_ring = desc; - desc = &qv_desc; -#endif /* I40E_QV */ } asq->next_to_clean = ntc; @@ -833,10 +744,6 @@ enum i40e_status_code i40e_asq_send_comm u16 buff_size, struct i40e_asq_cmd_details *cmd_details) { -#ifdef I40E_QV - struct i40e_aq_desc qv_desc = {0}; - struct i40e_aq_desc *qv_desc_on_ring; -#endif /* I40E_QV */ enum i40e_status_code status = I40E_SUCCESS; struct i40e_dma_mem *dma_buff = NULL; struct i40e_asq_cmd_details *details; @@ -933,13 +840,6 @@ enum i40e_status_code i40e_asq_send_comm /* if the desc is available copy the temp desc to the right place */ i40e_memcpy(desc_on_ring, desc, sizeof(struct i40e_aq_desc), I40E_NONDMA_TO_DMA); -#ifdef I40E_QV - /* copy the descriptor from ring to userspace buffer */ - i40e_memcpy(&qv_desc, desc_on_ring, sizeof(struct i40e_aq_desc), - I40E_DMA_TO_NONDMA); - qv_desc_on_ring = desc_on_ring; - desc_on_ring = &qv_desc; -#endif /* I40E_QV */ /* if buff is not NULL assume indirect command */ if (buff != NULL) { @@ -956,11 +856,6 @@ enum i40e_status_code i40e_asq_send_comm CPU_TO_LE32(I40E_HI_DWORD(dma_buff->pa)); desc_on_ring->params.external.addr_low = CPU_TO_LE32(I40E_LO_DWORD(dma_buff->pa)); -#ifdef I40E_QV - /* copy the descriptor from userspace buffer to ring */ - i40e_memcpy(qv_desc_on_ring, desc_on_ring, - sizeof(struct i40e_aq_desc), I40E_NONDMA_TO_DMA); -#endif /* I40E_QV */ } /* bump the tail */ @@ -978,31 +873,21 @@ enum i40e_status_code i40e_asq_send_comm */ if (!details->async && !details->postpone) { u32 total_delay = 0; - u32 delay_len = 10; do { -#ifdef I40E_QV - /* copy the descriptor from ring to user buffer */ - i40e_memcpy(desc_on_ring, qv_desc_on_ring, - sizeof(struct i40e_aq_desc), I40E_DMA_TO_NONDMA); -#endif /* I40E_QV */ /* AQ designers suggest use of head for better * timing reliability than DD bit */ if (i40e_asq_done(hw)) break; /* ugh! delay while spin_lock */ - i40e_usec_delay(delay_len); - total_delay += delay_len; + i40e_msec_delay(1); + total_delay++; } while (total_delay < hw->aq.asq_cmd_timeout); } /* if ready, copy the desc back to temp */ if (i40e_asq_done(hw)) { -#ifdef I40E_QV - /* Swap pointer back */ - desc_on_ring = qv_desc_on_ring; -#endif /* I40E_QV */ i40e_memcpy(desc, desc_on_ring, sizeof(struct i40e_aq_desc), I40E_DMA_TO_NONDMA); if (buff != NULL) @@ -1079,10 +964,6 @@ enum i40e_status_code i40e_clean_arq_ele struct i40e_arq_event_info *e, u16 *pending) { -#ifdef I40E_QV - struct i40e_aq_desc qv_desc = {0}; - struct i40e_aq_desc *qv_desc_on_ring; -#endif /* I40E_QV */ enum i40e_status_code ret_code = I40E_SUCCESS; u16 ntc = hw->aq.arq.next_to_clean; struct i40e_aq_desc *desc; @@ -1099,22 +980,12 @@ enum i40e_status_code i40e_clean_arq_ele ntu = (rd32(hw, hw->aq.arq.head) & I40E_PF_ARQH_ARQH_MASK); if (ntu == ntc) { /* nothing to do - shouldn't need to update ring's values */ - i40e_debug(hw, - I40E_DEBUG_AQ_MESSAGE, - "AQRX: Queue is empty.\n"); ret_code = I40E_ERR_ADMIN_QUEUE_NO_WORK; goto clean_arq_element_out; } /* now clean the next descriptor */ desc = I40E_ADMINQ_DESC(hw->aq.arq, ntc); -#ifdef I40E_QV - /* copy the descriptor from ring to userspace buffer */ - i40e_memcpy(&qv_desc, desc, sizeof(struct i40e_aq_desc), - I40E_DMA_TO_NONDMA); - qv_desc_on_ring = desc; - desc = &qv_desc; -#endif /* I40E_QV */ desc_idx = ntc; flags = LE16_TO_CPU(desc->flags); @@ -1131,11 +1002,11 @@ enum i40e_status_code i40e_clean_arq_ele i40e_memcpy(&e->desc, desc, sizeof(struct i40e_aq_desc), I40E_DMA_TO_NONDMA); datalen = LE16_TO_CPU(desc->datalen); - e->msg_size = min(datalen, e->msg_size); - if (e->msg_buf != NULL && (e->msg_size != 0)) + e->msg_len = min(datalen, e->buf_len); + if (e->msg_buf != NULL && (e->msg_len != 0)) i40e_memcpy(e->msg_buf, hw->aq.arq.r.arq_bi[desc_idx].va, - e->msg_size, I40E_DMA_TO_NONDMA); + e->msg_len, I40E_DMA_TO_NONDMA); i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE, "AQRX: desc and buffer:\n"); i40e_debug_aq(hw, I40E_DEBUG_AQ_COMMAND, (void *)desc, e->msg_buf, @@ -1154,11 +1025,6 @@ enum i40e_status_code i40e_clean_arq_ele desc->datalen = CPU_TO_LE16((u16)bi->size); 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)); -#ifdef I40E_QV - /* copy the descriptor from userspace buffer to ring */ - i40e_memcpy(qv_desc_on_ring, desc, - sizeof(struct i40e_aq_desc), I40E_NONDMA_TO_DMA); -#endif /* I40E_QV */ /* set tail = the last cleaned desc index. */ wr32(hw, hw->aq.arq.tail, ntc); Modified: head/sys/dev/ixl/i40e_adminq.h ============================================================================== --- head/sys/dev/i40e/i40e_adminq.h Fri Aug 22 17:49:24 2014 (r270343) +++ head/sys/dev/ixl/i40e_adminq.h Fri Aug 22 18:59:19 2014 (r270346) @@ -84,7 +84,8 @@ struct i40e_asq_cmd_details { /* ARQ event information */ struct i40e_arq_event_info { struct i40e_aq_desc desc; - u16 msg_size; + u16 msg_len; + u16 buf_len; u8 *msg_buf; }; @@ -114,7 +115,7 @@ struct i40e_adminq_info { /* general information */ #define I40E_AQ_LARGE_BUF 512 -#define I40E_ASQ_CMD_TIMEOUT 100000 /* usecs */ +#define I40E_ASQ_CMD_TIMEOUT 100 /* msecs */ void i40e_fill_default_direct_cmd_desc(struct i40e_aq_desc *desc, u16 opcode); Modified: head/sys/dev/ixl/i40e_adminq_cmd.h ============================================================================== --- head/sys/dev/i40e/i40e_adminq_cmd.h Fri Aug 22 17:49:24 2014 (r270343) +++ head/sys/dev/ixl/i40e_adminq_cmd.h Fri Aug 22 18:59:19 2014 (r270346) @@ -41,8 +41,8 @@ * This file needs to comply with the Linux Kernel coding style. */ -#define I40E_FW_API_VERSION_MAJOR 0x0001 -#define I40E_FW_API_VERSION_MINOR 0x0002 +#define I40E_FW_API_VERSION_MAJOR 0x0001 +#define I40E_FW_API_VERSION_MINOR 0x0002 struct i40e_aq_desc { __le16 flags; @@ -74,216 +74,216 @@ struct i40e_aq_desc { */ /* command flags and offsets*/ -#define I40E_AQ_FLAG_DD_SHIFT 0 -#define I40E_AQ_FLAG_CMP_SHIFT 1 -#define I40E_AQ_FLAG_ERR_SHIFT 2 -#define I40E_AQ_FLAG_VFE_SHIFT 3 -#define I40E_AQ_FLAG_LB_SHIFT 9 -#define I40E_AQ_FLAG_RD_SHIFT 10 -#define I40E_AQ_FLAG_VFC_SHIFT 11 -#define I40E_AQ_FLAG_BUF_SHIFT 12 -#define I40E_AQ_FLAG_SI_SHIFT 13 -#define I40E_AQ_FLAG_EI_SHIFT 14 -#define I40E_AQ_FLAG_FE_SHIFT 15 - -#define I40E_AQ_FLAG_DD (1 << I40E_AQ_FLAG_DD_SHIFT) /* 0x1 */ -#define I40E_AQ_FLAG_CMP (1 << I40E_AQ_FLAG_CMP_SHIFT) /* 0x2 */ -#define I40E_AQ_FLAG_ERR (1 << I40E_AQ_FLAG_ERR_SHIFT) /* 0x4 */ -#define I40E_AQ_FLAG_VFE (1 << I40E_AQ_FLAG_VFE_SHIFT) /* 0x8 */ -#define I40E_AQ_FLAG_LB (1 << I40E_AQ_FLAG_LB_SHIFT) /* 0x200 */ -#define I40E_AQ_FLAG_RD (1 << I40E_AQ_FLAG_RD_SHIFT) /* 0x400 */ -#define I40E_AQ_FLAG_VFC (1 << I40E_AQ_FLAG_VFC_SHIFT) /* 0x800 */ -#define I40E_AQ_FLAG_BUF (1 << I40E_AQ_FLAG_BUF_SHIFT) /* 0x1000 */ -#define I40E_AQ_FLAG_SI (1 << I40E_AQ_FLAG_SI_SHIFT) /* 0x2000 */ -#define I40E_AQ_FLAG_EI (1 << I40E_AQ_FLAG_EI_SHIFT) /* 0x4000 */ -#define I40E_AQ_FLAG_FE (1 << I40E_AQ_FLAG_FE_SHIFT) /* 0x8000 */ +#define I40E_AQ_FLAG_DD_SHIFT 0 +#define I40E_AQ_FLAG_CMP_SHIFT 1 +#define I40E_AQ_FLAG_ERR_SHIFT 2 +#define I40E_AQ_FLAG_VFE_SHIFT 3 +#define I40E_AQ_FLAG_LB_SHIFT 9 +#define I40E_AQ_FLAG_RD_SHIFT 10 +#define I40E_AQ_FLAG_VFC_SHIFT 11 +#define I40E_AQ_FLAG_BUF_SHIFT 12 +#define I40E_AQ_FLAG_SI_SHIFT 13 +#define I40E_AQ_FLAG_EI_SHIFT 14 +#define I40E_AQ_FLAG_FE_SHIFT 15 + +#define I40E_AQ_FLAG_DD (1 << I40E_AQ_FLAG_DD_SHIFT) /* 0x1 */ +#define I40E_AQ_FLAG_CMP (1 << I40E_AQ_FLAG_CMP_SHIFT) /* 0x2 */ +#define I40E_AQ_FLAG_ERR (1 << I40E_AQ_FLAG_ERR_SHIFT) /* 0x4 */ +#define I40E_AQ_FLAG_VFE (1 << I40E_AQ_FLAG_VFE_SHIFT) /* 0x8 */ +#define I40E_AQ_FLAG_LB (1 << I40E_AQ_FLAG_LB_SHIFT) /* 0x200 */ +#define I40E_AQ_FLAG_RD (1 << I40E_AQ_FLAG_RD_SHIFT) /* 0x400 */ +#define I40E_AQ_FLAG_VFC (1 << I40E_AQ_FLAG_VFC_SHIFT) /* 0x800 */ +#define I40E_AQ_FLAG_BUF (1 << I40E_AQ_FLAG_BUF_SHIFT) /* 0x1000 */ +#define I40E_AQ_FLAG_SI (1 << I40E_AQ_FLAG_SI_SHIFT) /* 0x2000 */ +#define I40E_AQ_FLAG_EI (1 << I40E_AQ_FLAG_EI_SHIFT) /* 0x4000 */ +#define I40E_AQ_FLAG_FE (1 << I40E_AQ_FLAG_FE_SHIFT) /* 0x8000 */ /* error codes */ enum i40e_admin_queue_err { - I40E_AQ_RC_OK = 0, /* success */ - I40E_AQ_RC_EPERM = 1, /* Operation not permitted */ - I40E_AQ_RC_ENOENT = 2, /* No such element */ - I40E_AQ_RC_ESRCH = 3, /* Bad opcode */ - I40E_AQ_RC_EINTR = 4, /* operation interrupted */ - I40E_AQ_RC_EIO = 5, /* I/O error */ - I40E_AQ_RC_ENXIO = 6, /* No such resource */ - I40E_AQ_RC_E2BIG = 7, /* Arg too long */ - I40E_AQ_RC_EAGAIN = 8, /* Try again */ - I40E_AQ_RC_ENOMEM = 9, /* Out of memory */ - I40E_AQ_RC_EACCES = 10, /* Permission denied */ - I40E_AQ_RC_EFAULT = 11, /* Bad address */ - I40E_AQ_RC_EBUSY = 12, /* Device or resource busy */ - I40E_AQ_RC_EEXIST = 13, /* object already exists */ - I40E_AQ_RC_EINVAL = 14, /* Invalid argument */ - I40E_AQ_RC_ENOTTY = 15, /* Not a typewriter */ - I40E_AQ_RC_ENOSPC = 16, /* No space left or alloc failure */ - I40E_AQ_RC_ENOSYS = 17, /* Function not implemented */ - I40E_AQ_RC_ERANGE = 18, /* Parameter out of range */ - I40E_AQ_RC_EFLUSHED = 19, /* Cmd flushed because of prev cmd error */ - I40E_AQ_RC_BAD_ADDR = 20, /* Descriptor contains a bad pointer */ - I40E_AQ_RC_EMODE = 21, /* Op not allowed in current dev mode */ - I40E_AQ_RC_EFBIG = 22, /* File too large */ + I40E_AQ_RC_OK = 0, /* success */ + I40E_AQ_RC_EPERM = 1, /* Operation not permitted */ + I40E_AQ_RC_ENOENT = 2, /* No such element */ + I40E_AQ_RC_ESRCH = 3, /* Bad opcode */ + I40E_AQ_RC_EINTR = 4, /* operation interrupted */ + I40E_AQ_RC_EIO = 5, /* I/O error */ + I40E_AQ_RC_ENXIO = 6, /* No such resource */ + I40E_AQ_RC_E2BIG = 7, /* Arg too long */ + I40E_AQ_RC_EAGAIN = 8, /* Try again */ + I40E_AQ_RC_ENOMEM = 9, /* Out of memory */ + I40E_AQ_RC_EACCES = 10, /* Permission denied */ + I40E_AQ_RC_EFAULT = 11, /* Bad address */ + I40E_AQ_RC_EBUSY = 12, /* Device or resource busy */ + I40E_AQ_RC_EEXIST = 13, /* object already exists */ + I40E_AQ_RC_EINVAL = 14, /* Invalid argument */ + I40E_AQ_RC_ENOTTY = 15, /* Not a typewriter */ + I40E_AQ_RC_ENOSPC = 16, /* No space left or alloc failure */ + I40E_AQ_RC_ENOSYS = 17, /* Function not implemented */ + I40E_AQ_RC_ERANGE = 18, /* Parameter out of range */ + I40E_AQ_RC_EFLUSHED = 19, /* Cmd flushed due to prev cmd error */ + I40E_AQ_RC_BAD_ADDR = 20, /* Descriptor contains a bad pointer */ + I40E_AQ_RC_EMODE = 21, /* Op not allowed in current dev mode */ + I40E_AQ_RC_EFBIG = 22, /* File too large */ }; /* Admin Queue command opcodes */ enum i40e_admin_queue_opc { /* aq commands */ - i40e_aqc_opc_get_version = 0x0001, - i40e_aqc_opc_driver_version = 0x0002, - i40e_aqc_opc_queue_shutdown = 0x0003, - i40e_aqc_opc_set_pf_context = 0x0004, + i40e_aqc_opc_get_version = 0x0001, + i40e_aqc_opc_driver_version = 0x0002, + i40e_aqc_opc_queue_shutdown = 0x0003, + i40e_aqc_opc_set_pf_context = 0x0004, /* resource ownership */ - i40e_aqc_opc_request_resource = 0x0008, - i40e_aqc_opc_release_resource = 0x0009, + i40e_aqc_opc_request_resource = 0x0008, + i40e_aqc_opc_release_resource = 0x0009, - i40e_aqc_opc_list_func_capabilities = 0x000A, - i40e_aqc_opc_list_dev_capabilities = 0x000B, + i40e_aqc_opc_list_func_capabilities = 0x000A, + i40e_aqc_opc_list_dev_capabilities = 0x000B, - i40e_aqc_opc_set_cppm_configuration = 0x0103, - i40e_aqc_opc_set_arp_proxy_entry = 0x0104, - i40e_aqc_opc_set_ns_proxy_entry = 0x0105, + i40e_aqc_opc_set_cppm_configuration = 0x0103, + i40e_aqc_opc_set_arp_proxy_entry = 0x0104, + i40e_aqc_opc_set_ns_proxy_entry = 0x0105, /* LAA */ - i40e_aqc_opc_mng_laa = 0x0106, /* AQ obsolete */ - i40e_aqc_opc_mac_address_read = 0x0107, - i40e_aqc_opc_mac_address_write = 0x0108, + i40e_aqc_opc_mng_laa = 0x0106, /* AQ obsolete */ + i40e_aqc_opc_mac_address_read = 0x0107, + i40e_aqc_opc_mac_address_write = 0x0108, /* PXE */ - i40e_aqc_opc_clear_pxe_mode = 0x0110, + i40e_aqc_opc_clear_pxe_mode = 0x0110, /* internal switch commands */ - i40e_aqc_opc_get_switch_config = 0x0200, - i40e_aqc_opc_add_statistics = 0x0201, - i40e_aqc_opc_remove_statistics = 0x0202, - i40e_aqc_opc_set_port_parameters = 0x0203, - i40e_aqc_opc_get_switch_resource_alloc = 0x0204, - - i40e_aqc_opc_add_vsi = 0x0210, - i40e_aqc_opc_update_vsi_parameters = 0x0211, - i40e_aqc_opc_get_vsi_parameters = 0x0212, - - i40e_aqc_opc_add_pv = 0x0220, - i40e_aqc_opc_update_pv_parameters = 0x0221, - i40e_aqc_opc_get_pv_parameters = 0x0222, - - i40e_aqc_opc_add_veb = 0x0230, - i40e_aqc_opc_update_veb_parameters = 0x0231, - i40e_aqc_opc_get_veb_parameters = 0x0232, - - i40e_aqc_opc_delete_element = 0x0243, - - i40e_aqc_opc_add_macvlan = 0x0250, - i40e_aqc_opc_remove_macvlan = 0x0251, - i40e_aqc_opc_add_vlan = 0x0252, - i40e_aqc_opc_remove_vlan = 0x0253, - i40e_aqc_opc_set_vsi_promiscuous_modes = 0x0254, - i40e_aqc_opc_add_tag = 0x0255, - i40e_aqc_opc_remove_tag = 0x0256, - i40e_aqc_opc_add_multicast_etag = 0x0257, - i40e_aqc_opc_remove_multicast_etag = 0x0258, - i40e_aqc_opc_update_tag = 0x0259, - i40e_aqc_opc_add_control_packet_filter = 0x025A, - i40e_aqc_opc_remove_control_packet_filter = 0x025B, - i40e_aqc_opc_add_cloud_filters = 0x025C, - i40e_aqc_opc_remove_cloud_filters = 0x025D, + i40e_aqc_opc_get_switch_config = 0x0200, + i40e_aqc_opc_add_statistics = 0x0201, + i40e_aqc_opc_remove_statistics = 0x0202, + i40e_aqc_opc_set_port_parameters = 0x0203, + i40e_aqc_opc_get_switch_resource_alloc = 0x0204, + + i40e_aqc_opc_add_vsi = 0x0210, + i40e_aqc_opc_update_vsi_parameters = 0x0211, + i40e_aqc_opc_get_vsi_parameters = 0x0212, + + i40e_aqc_opc_add_pv = 0x0220, + i40e_aqc_opc_update_pv_parameters = 0x0221, + i40e_aqc_opc_get_pv_parameters = 0x0222, + + i40e_aqc_opc_add_veb = 0x0230, + i40e_aqc_opc_update_veb_parameters = 0x0231, + i40e_aqc_opc_get_veb_parameters = 0x0232, + + i40e_aqc_opc_delete_element = 0x0243, + + i40e_aqc_opc_add_macvlan = 0x0250, + i40e_aqc_opc_remove_macvlan = 0x0251, + i40e_aqc_opc_add_vlan = 0x0252, + i40e_aqc_opc_remove_vlan = 0x0253, + i40e_aqc_opc_set_vsi_promiscuous_modes = 0x0254, + i40e_aqc_opc_add_tag = 0x0255, + i40e_aqc_opc_remove_tag = 0x0256, + i40e_aqc_opc_add_multicast_etag = 0x0257, + i40e_aqc_opc_remove_multicast_etag = 0x0258, + i40e_aqc_opc_update_tag = 0x0259, + i40e_aqc_opc_add_control_packet_filter = 0x025A, + i40e_aqc_opc_remove_control_packet_filter = 0x025B, + i40e_aqc_opc_add_cloud_filters = 0x025C, + i40e_aqc_opc_remove_cloud_filters = 0x025D, - i40e_aqc_opc_add_mirror_rule = 0x0260, - i40e_aqc_opc_delete_mirror_rule = 0x0261, + i40e_aqc_opc_add_mirror_rule = 0x0260, + i40e_aqc_opc_delete_mirror_rule = 0x0261, /* DCB commands */ - i40e_aqc_opc_dcb_ignore_pfc = 0x0301, - i40e_aqc_opc_dcb_updated = 0x0302, + i40e_aqc_opc_dcb_ignore_pfc = 0x0301, + i40e_aqc_opc_dcb_updated = 0x0302, /* TX scheduler */ - i40e_aqc_opc_configure_vsi_bw_limit = 0x0400, - i40e_aqc_opc_configure_vsi_ets_sla_bw_limit = 0x0406, - i40e_aqc_opc_configure_vsi_tc_bw = 0x0407, - i40e_aqc_opc_query_vsi_bw_config = 0x0408, - i40e_aqc_opc_query_vsi_ets_sla_config = 0x040A, - i40e_aqc_opc_configure_switching_comp_bw_limit = 0x0410, - - i40e_aqc_opc_enable_switching_comp_ets = 0x0413, - i40e_aqc_opc_modify_switching_comp_ets = 0x0414, - i40e_aqc_opc_disable_switching_comp_ets = 0x0415, - i40e_aqc_opc_configure_switching_comp_ets_bw_limit = 0x0416, - i40e_aqc_opc_configure_switching_comp_bw_config = 0x0417, - i40e_aqc_opc_query_switching_comp_ets_config = 0x0418, - i40e_aqc_opc_query_port_ets_config = 0x0419, - i40e_aqc_opc_query_switching_comp_bw_config = 0x041A, - i40e_aqc_opc_suspend_port_tx = 0x041B, - i40e_aqc_opc_resume_port_tx = 0x041C, - i40e_aqc_opc_configure_partition_bw = 0x041D, + i40e_aqc_opc_configure_vsi_bw_limit = 0x0400, + i40e_aqc_opc_configure_vsi_ets_sla_bw_limit = 0x0406, + i40e_aqc_opc_configure_vsi_tc_bw = 0x0407, + i40e_aqc_opc_query_vsi_bw_config = 0x0408, + i40e_aqc_opc_query_vsi_ets_sla_config = 0x040A, + i40e_aqc_opc_configure_switching_comp_bw_limit = 0x0410, + + i40e_aqc_opc_enable_switching_comp_ets = 0x0413, + i40e_aqc_opc_modify_switching_comp_ets = 0x0414, + i40e_aqc_opc_disable_switching_comp_ets = 0x0415, + i40e_aqc_opc_configure_switching_comp_ets_bw_limit = 0x0416, + i40e_aqc_opc_configure_switching_comp_bw_config = 0x0417, + i40e_aqc_opc_query_switching_comp_ets_config = 0x0418, + i40e_aqc_opc_query_port_ets_config = 0x0419, + i40e_aqc_opc_query_switching_comp_bw_config = 0x041A, + i40e_aqc_opc_suspend_port_tx = 0x041B, + i40e_aqc_opc_resume_port_tx = 0x041C, + i40e_aqc_opc_configure_partition_bw = 0x041D, /* hmc */ - i40e_aqc_opc_query_hmc_resource_profile = 0x0500, - i40e_aqc_opc_set_hmc_resource_profile = 0x0501, + i40e_aqc_opc_query_hmc_resource_profile = 0x0500, + i40e_aqc_opc_set_hmc_resource_profile = 0x0501, /* phy commands*/ - i40e_aqc_opc_get_phy_abilities = 0x0600, - i40e_aqc_opc_set_phy_config = 0x0601, - i40e_aqc_opc_set_mac_config = 0x0603, - i40e_aqc_opc_set_link_restart_an = 0x0605, - i40e_aqc_opc_get_link_status = 0x0607, - i40e_aqc_opc_set_phy_int_mask = 0x0613, - i40e_aqc_opc_get_local_advt_reg = 0x0614, - i40e_aqc_opc_set_local_advt_reg = 0x0615, - i40e_aqc_opc_get_partner_advt = 0x0616, - i40e_aqc_opc_set_lb_modes = 0x0618, - i40e_aqc_opc_get_phy_wol_caps = 0x0621, - i40e_aqc_opc_set_phy_debug = 0x0622, - i40e_aqc_opc_upload_ext_phy_fm = 0x0625, + i40e_aqc_opc_get_phy_abilities = 0x0600, + i40e_aqc_opc_set_phy_config = 0x0601, + i40e_aqc_opc_set_mac_config = 0x0603, + i40e_aqc_opc_set_link_restart_an = 0x0605, + i40e_aqc_opc_get_link_status = 0x0607, + i40e_aqc_opc_set_phy_int_mask = 0x0613, + i40e_aqc_opc_get_local_advt_reg = 0x0614, + i40e_aqc_opc_set_local_advt_reg = 0x0615, + i40e_aqc_opc_get_partner_advt = 0x0616, + i40e_aqc_opc_set_lb_modes = 0x0618, + i40e_aqc_opc_get_phy_wol_caps = 0x0621, + i40e_aqc_opc_set_phy_debug = 0x0622, + i40e_aqc_opc_upload_ext_phy_fm = 0x0625, /* NVM commands */ - i40e_aqc_opc_nvm_read = 0x0701, - i40e_aqc_opc_nvm_erase = 0x0702, - i40e_aqc_opc_nvm_update = 0x0703, - i40e_aqc_opc_nvm_config_read = 0x0704, - i40e_aqc_opc_nvm_config_write = 0x0705, + i40e_aqc_opc_nvm_read = 0x0701, + i40e_aqc_opc_nvm_erase = 0x0702, + i40e_aqc_opc_nvm_update = 0x0703, + i40e_aqc_opc_nvm_config_read = 0x0704, + i40e_aqc_opc_nvm_config_write = 0x0705, /* virtualization commands */ - i40e_aqc_opc_send_msg_to_pf = 0x0801, - i40e_aqc_opc_send_msg_to_vf = 0x0802, - i40e_aqc_opc_send_msg_to_peer = 0x0803, + i40e_aqc_opc_send_msg_to_pf = 0x0801, + i40e_aqc_opc_send_msg_to_vf = 0x0802, + i40e_aqc_opc_send_msg_to_peer = 0x0803, /* alternate structure */ - i40e_aqc_opc_alternate_write = 0x0900, - i40e_aqc_opc_alternate_write_indirect = 0x0901, - i40e_aqc_opc_alternate_read = 0x0902, - i40e_aqc_opc_alternate_read_indirect = 0x0903, - i40e_aqc_opc_alternate_write_done = 0x0904, - i40e_aqc_opc_alternate_set_mode = 0x0905, - i40e_aqc_opc_alternate_clear_port = 0x0906, + i40e_aqc_opc_alternate_write = 0x0900, + i40e_aqc_opc_alternate_write_indirect = 0x0901, + i40e_aqc_opc_alternate_read = 0x0902, + i40e_aqc_opc_alternate_read_indirect = 0x0903, + i40e_aqc_opc_alternate_write_done = 0x0904, + i40e_aqc_opc_alternate_set_mode = 0x0905, + i40e_aqc_opc_alternate_clear_port = 0x0906, /* LLDP commands */ - i40e_aqc_opc_lldp_get_mib = 0x0A00, - i40e_aqc_opc_lldp_update_mib = 0x0A01, - i40e_aqc_opc_lldp_add_tlv = 0x0A02, - i40e_aqc_opc_lldp_update_tlv = 0x0A03, - i40e_aqc_opc_lldp_delete_tlv = 0x0A04, - i40e_aqc_opc_lldp_stop = 0x0A05, - i40e_aqc_opc_lldp_start = 0x0A06, + i40e_aqc_opc_lldp_get_mib = 0x0A00, + i40e_aqc_opc_lldp_update_mib = 0x0A01, + i40e_aqc_opc_lldp_add_tlv = 0x0A02, + i40e_aqc_opc_lldp_update_tlv = 0x0A03, + i40e_aqc_opc_lldp_delete_tlv = 0x0A04, + i40e_aqc_opc_lldp_stop = 0x0A05, + i40e_aqc_opc_lldp_start = 0x0A06, /* Tunnel commands */ - i40e_aqc_opc_add_udp_tunnel = 0x0B00, - i40e_aqc_opc_del_udp_tunnel = 0x0B01, - i40e_aqc_opc_tunnel_key_structure = 0x0B10, + i40e_aqc_opc_add_udp_tunnel = 0x0B00, + i40e_aqc_opc_del_udp_tunnel = 0x0B01, + i40e_aqc_opc_tunnel_key_structure = 0x0B10, /* Async Events */ - i40e_aqc_opc_event_lan_overflow = 0x1001, + i40e_aqc_opc_event_lan_overflow = 0x1001, /* OEM commands */ - i40e_aqc_opc_oem_parameter_change = 0xFE00, - i40e_aqc_opc_oem_device_status_change = 0xFE01, + i40e_aqc_opc_oem_parameter_change = 0xFE00, + i40e_aqc_opc_oem_device_status_change = 0xFE01, /* debug commands */ - i40e_aqc_opc_debug_get_deviceid = 0xFF00, - i40e_aqc_opc_debug_set_mode = 0xFF01, - i40e_aqc_opc_debug_read_reg = 0xFF03, - i40e_aqc_opc_debug_write_reg = 0xFF04, - i40e_aqc_opc_debug_modify_reg = 0xFF07, - i40e_aqc_opc_debug_dump_internals = 0xFF08, - i40e_aqc_opc_debug_modify_internals = 0xFF09, + i40e_aqc_opc_debug_get_deviceid = 0xFF00, + i40e_aqc_opc_debug_set_mode = 0xFF01, + i40e_aqc_opc_debug_read_reg = 0xFF03, + i40e_aqc_opc_debug_write_reg = 0xFF04, + i40e_aqc_opc_debug_modify_reg = 0xFF07, + i40e_aqc_opc_debug_dump_internals = 0xFF08, + i40e_aqc_opc_debug_modify_internals = 0xFF09, }; /* command structures and indirect data structures */ @@ -310,7 +310,7 @@ enum i40e_admin_queue_opc { /* This macro is used extensively to ensure that command structures are 16 * bytes in length as they have to map to the raw array of that size. */ -#define I40E_CHECK_CMD_LENGTH(X) I40E_CHECK_STRUCT_LEN(16, X) +#define I40E_CHECK_CMD_LENGTH(X) I40E_CHECK_STRUCT_LEN(16, X) /* internal (0x00XX) commands */ @@ -328,22 +328,22 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_get_versi /* Send driver version (indirect 0x0002) */ struct i40e_aqc_driver_version { - u8 driver_major_ver; - u8 driver_minor_ver; - u8 driver_build_ver; - u8 driver_subbuild_ver; - u8 reserved[4]; - __le32 address_high; - __le32 address_low; + u8 driver_major_ver; + u8 driver_minor_ver; + u8 driver_build_ver; + u8 driver_subbuild_ver; + u8 reserved[4]; + __le32 address_high; + __le32 address_low; }; I40E_CHECK_CMD_LENGTH(i40e_aqc_driver_version); /* Queue Shutdown (direct 0x0003) */ struct i40e_aqc_queue_shutdown { - __le32 driver_unloading; -#define I40E_AQ_DRIVER_UNLOADING 0x1 - u8 reserved[12]; + __le32 driver_unloading; +#define I40E_AQ_DRIVER_UNLOADING 0x1 + u8 reserved[12]; }; I40E_CHECK_CMD_LENGTH(i40e_aqc_queue_shutdown); @@ -359,19 +359,19 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_set_pf_co /* Request resource ownership (direct 0x0008) * Release resource ownership (direct 0x0009) */ -#define I40E_AQ_RESOURCE_NVM 1 -#define I40E_AQ_RESOURCE_SDP 2 -#define I40E_AQ_RESOURCE_ACCESS_READ 1 -#define I40E_AQ_RESOURCE_ACCESS_WRITE 2 -#define I40E_AQ_RESOURCE_NVM_READ_TIMEOUT 3000 -#define I40E_AQ_RESOURCE_NVM_WRITE_TIMEOUT 180000 +#define I40E_AQ_RESOURCE_NVM 1 +#define I40E_AQ_RESOURCE_SDP 2 +#define I40E_AQ_RESOURCE_ACCESS_READ 1 +#define I40E_AQ_RESOURCE_ACCESS_WRITE 2 +#define I40E_AQ_RESOURCE_NVM_READ_TIMEOUT 3000 +#define I40E_AQ_RESOURCE_NVM_WRITE_TIMEOUT 180000 struct i40e_aqc_request_resource { - __le16 resource_id; - __le16 access_type; - __le32 timeout; - __le32 resource_number; - u8 reserved[4]; + __le16 resource_id; + __le16 access_type; + __le32 timeout; + __le32 resource_number; + u8 reserved[4]; }; I40E_CHECK_CMD_LENGTH(i40e_aqc_request_resource); @@ -381,7 +381,7 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_request_r */ struct i40e_aqc_list_capabilites { u8 command_flags; -#define I40E_AQ_LIST_CAP_PF_INDEX_EN 1 +#define I40E_AQ_LIST_CAP_PF_INDEX_EN 1 u8 pf_index; u8 reserved[2]; __le32 count; @@ -392,123 +392,123 @@ struct i40e_aqc_list_capabilites { I40E_CHECK_CMD_LENGTH(i40e_aqc_list_capabilites); struct i40e_aqc_list_capabilities_element_resp { - __le16 id; - u8 major_rev; - u8 minor_rev; - __le32 number; - __le32 logical_id; - __le32 phys_id; - u8 reserved[16]; + __le16 id; + u8 major_rev; + u8 minor_rev; + __le32 number; + __le32 logical_id; + __le32 phys_id; + u8 reserved[16]; }; /* list of caps */ -#define I40E_AQ_CAP_ID_SWITCH_MODE 0x0001 -#define I40E_AQ_CAP_ID_MNG_MODE 0x0002 -#define I40E_AQ_CAP_ID_NPAR_ACTIVE 0x0003 -#define I40E_AQ_CAP_ID_OS2BMC_CAP 0x0004 -#define I40E_AQ_CAP_ID_FUNCTIONS_VALID 0x0005 -#define I40E_AQ_CAP_ID_ALTERNATE_RAM 0x0006 -#define I40E_AQ_CAP_ID_SRIOV 0x0012 -#define I40E_AQ_CAP_ID_VF 0x0013 -#define I40E_AQ_CAP_ID_VMDQ 0x0014 -#define I40E_AQ_CAP_ID_8021QBG 0x0015 -#define I40E_AQ_CAP_ID_8021QBR 0x0016 -#define I40E_AQ_CAP_ID_VSI 0x0017 -#define I40E_AQ_CAP_ID_DCB 0x0018 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 19:08:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B557BE3D; Fri, 22 Aug 2014 19:08:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A13D83820; Fri, 22 Aug 2014 19:08:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MJ8C4d005548; Fri, 22 Aug 2014 19:08:12 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MJ8Csa005547; Fri, 22 Aug 2014 19:08:12 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201408221908.s7MJ8Csa005547@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 22 Aug 2014 19:08:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270347 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 19:08:12 -0000 Author: delphij Date: Fri Aug 22 19:08:12 2014 New Revision: 270347 URL: http://svnweb.freebsd.org/changeset/base/270347 Log: Restore historical behavior of in_control, which, when no matching address is found, the first usable address is returned for legacy ioctls like SIOCGIFBRDADDR, SIOCGIFDSTADDR, SIOCGIFNETMASK and SIOCGIFADDR. While there also fix a subtle issue that a caller from a jail asking for INADDR_ANY may get the first IP of the host that do not belong to the jail. Submitted by: glebius Differential Revision: https://reviews.freebsd.org/D667 Modified: head/sys/netinet/in.c Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Fri Aug 22 18:59:19 2014 (r270346) +++ head/sys/netinet/in.c Fri Aug 22 19:08:12 2014 (r270347) @@ -242,19 +242,26 @@ in_control(struct socket *so, u_long cmd return (EADDRNOTAVAIL); /* - * For SIOCGIFADDR, pick the first address. For the rest of - * ioctls, try to find specified address. + * Find address for this interface, if it exists. If an + * address was specified, find that one instead of the + * first one on the interface, if possible. */ IF_ADDR_RLOCK(ifp); TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { if (ifa->ifa_addr->sa_family != AF_INET) continue; ia = (struct in_ifaddr *)ifa; - if (cmd == SIOCGIFADDR || addr->sin_addr.s_addr == INADDR_ANY) - break; if (ia->ia_addr.sin_addr.s_addr == addr->sin_addr.s_addr) break; } + if (ifa == NULL) + TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) + if (ifa->ifa_addr->sa_family == AF_INET) { + ia = (struct in_ifaddr *)ifa; + if (prison_check_ip4(td->td_ucred, + &ia->ia_addr.sin_addr) == 0) + break; + } if (ifa == NULL) { IF_ADDR_RUNLOCK(ifp); From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 19:23:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 615ED7F9; Fri, 22 Aug 2014 19:23:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D4633A08; Fri, 22 Aug 2014 19:23:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MJNdlB015656; Fri, 22 Aug 2014 19:23:39 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MJNd5x015655; Fri, 22 Aug 2014 19:23:39 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201408221923.s7MJNd5x015655@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 22 Aug 2014 19:23:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270349 - head/usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 19:23:39 -0000 Author: markj Date: Fri Aug 22 19:23:38 2014 New Revision: 270349 URL: http://svnweb.freebsd.org/changeset/base/270349 Log: Suppress warnings when retrieving protocol stats from interfaces that don't support IPv6 (e.g. pflog(4)). Reviewed by: hrs MFC after: 2 weeks Modified: head/usr.bin/netstat/inet6.c Modified: head/usr.bin/netstat/inet6.c ============================================================================== --- head/usr.bin/netstat/inet6.c Fri Aug 22 19:21:08 2014 (r270348) +++ head/usr.bin/netstat/inet6.c Fri Aug 22 19:23:38 2014 (r270349) @@ -540,13 +540,13 @@ ip6_ifstats(char *ifname) } strcpy(ifr.ifr_name, ifname); - printf("ip6 on %s:\n", ifr.ifr_name); - if (ioctl(s, SIOCGIFSTAT_IN6, (char *)&ifr) < 0) { - perror("Warning: ioctl(SIOCGIFSTAT_IN6)"); + if (errno != EPFNOSUPPORT) + perror("Warning: ioctl(SIOCGIFSTAT_IN6)"); goto end; } + printf("ip6 on %s:\n", ifr.ifr_name); p(ifs6_in_receive, "\t%ju total input datagram%s\n"); p(ifs6_in_hdrerr, "\t%ju datagram%s with invalid header received\n"); p(ifs6_in_toobig, "\t%ju datagram%s exceeded MTU received\n"); @@ -945,13 +945,13 @@ icmp6_ifstats(char *ifname) } strcpy(ifr.ifr_name, ifname); - printf("icmp6 on %s:\n", ifr.ifr_name); - if (ioctl(s, SIOCGIFSTAT_ICMP6, (char *)&ifr) < 0) { - perror("Warning: ioctl(SIOCGIFSTAT_ICMP6)"); + if (errno != EPFNOSUPPORT) + perror("Warning: ioctl(SIOCGIFSTAT_ICMP6)"); goto end; } + printf("icmp6 on %s:\n", ifr.ifr_name); p(ifs6_in_msg, "\t%ju total input message%s\n"); p(ifs6_in_error, "\t%ju total input error message%s\n"); p(ifs6_in_dstunreach, "\t%ju input destination unreachable error%s\n"); From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 19:21:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 738EB6B2; Fri, 22 Aug 2014 19:21:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 55BB539E0; Fri, 22 Aug 2014 19:21:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MJL9ip012688; Fri, 22 Aug 2014 19:21:09 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MJL89P012685; Fri, 22 Aug 2014 19:21:08 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201408221921.s7MJL89P012685@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 22 Aug 2014 19:21:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270348 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 19:21:09 -0000 Author: markj Date: Fri Aug 22 19:21:08 2014 New Revision: 270348 URL: http://svnweb.freebsd.org/changeset/base/270348 Log: Add some missing checks for unsupported interfaces (e.g. pflog(4)) when handling ioctls. While here, remove duplicated checks for a NULL ifp in in6_control(): this check is already done near the beginning of the function. PR: 189117 Reviewed by: hrs MFC after: 2 weeks Modified: head/sys/netinet6/in6.c head/sys/netinet6/scope6.c head/sys/netinet6/scope6_var.h Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Fri Aug 22 19:08:12 2014 (r270347) +++ head/sys/netinet6/in6.c Fri Aug 22 19:21:08 2014 (r270348) @@ -252,7 +252,7 @@ in6_control(struct socket *so, u_long cm return (mrt6_ioctl ? mrt6_ioctl(cmd, data) : EOPNOTSUPP); } - switch(cmd) { + switch (cmd) { case SIOCAADDRCTL_POLICY: case SIOCDADDRCTL_POLICY: if (td != NULL) { @@ -324,14 +324,10 @@ in6_control(struct socket *so, u_long cm if (error) return (error); } - return (scope6_set(ifp, - (struct scope6_id *)ifr->ifr_ifru.ifru_scope_id)); + /* FALLTHROUGH */ case SIOCGSCOPE6: - return (scope6_get(ifp, - (struct scope6_id *)ifr->ifr_ifru.ifru_scope_id)); case SIOCGSCOPE6DEF: - return (scope6_get_default((struct scope6_id *) - ifr->ifr_ifru.ifru_scope_id)); + return (scope6_ioctl(cmd, data, ifp)); } /* @@ -442,6 +438,13 @@ in6_control(struct socket *so, u_long cm if (error) goto out; } + /* FALLTHROUGH */ + case SIOCGIFSTAT_IN6: + case SIOCGIFSTAT_ICMP6: + if (ifp->if_afdata[AF_INET6] == NULL) { + error = EPFNOSUPPORT; + goto out; + } break; case SIOCGIFADDR_IN6: @@ -517,10 +520,6 @@ in6_control(struct socket *so, u_long cm break; case SIOCGIFSTAT_IN6: - if (ifp == NULL) { - error = EINVAL; - goto out; - } COUNTER_ARRAY_COPY(((struct in6_ifextra *) ifp->if_afdata[AF_INET6])->in6_ifstat, &ifr->ifr_ifru.ifru_stat, @@ -528,10 +527,6 @@ in6_control(struct socket *so, u_long cm break; case SIOCGIFSTAT_ICMP6: - if (ifp == NULL) { - error = EINVAL; - goto out; - } COUNTER_ARRAY_COPY(((struct in6_ifextra *) ifp->if_afdata[AF_INET6])->icmp6_ifstat, &ifr->ifr_ifru.ifru_icmp6stat, @@ -762,7 +757,7 @@ in6_control(struct socket *so, u_long cm } default: - if (ifp == NULL || ifp->if_ioctl == 0) { + if (ifp->if_ioctl == NULL) { error = EOPNOTSUPP; goto out; } Modified: head/sys/netinet6/scope6.c ============================================================================== --- head/sys/netinet6/scope6.c Fri Aug 22 19:08:12 2014 (r270347) +++ head/sys/netinet6/scope6.c Fri Aug 22 19:21:08 2014 (r270348) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -79,6 +80,9 @@ static VNET_DEFINE(struct scope6_id, sid #define SID(ifp) \ (((struct in6_ifextra *)(ifp)->if_afdata[AF_INET6])->scope6_id) +static int scope6_get(struct ifnet *, struct scope6_id *); +static int scope6_set(struct ifnet *, struct scope6_id *); + void scope6_init(void) { @@ -122,6 +126,30 @@ scope6_ifdetach(struct scope6_id *sid) } int +scope6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp) +{ + struct in6_ifreq *ifr; + + if (ifp->if_afdata[AF_INET6] == NULL) + return (EPFNOSUPPORT); + + ifr = (struct in6_ifreq *)data; + switch (cmd) { + case SIOCSSCOPE6: + return (scope6_set(ifp, + (struct scope6_id *)ifr->ifr_ifru.ifru_scope_id)); + case SIOCGSCOPE6: + return (scope6_get(ifp, + (struct scope6_id *)ifr->ifr_ifru.ifru_scope_id)); + case SIOCGSCOPE6DEF: + return (scope6_get_default( + (struct scope6_id *)ifr->ifr_ifru.ifru_scope_id)); + default: + return (EOPNOTSUPP); + } +} + +static int scope6_set(struct ifnet *ifp, struct scope6_id *idlist) { int i; @@ -184,7 +212,7 @@ scope6_set(struct ifnet *ifp, struct sco return (error); } -int +static int scope6_get(struct ifnet *ifp, struct scope6_id *idlist) { struct scope6_id *sid; @@ -203,7 +231,6 @@ scope6_get(struct ifnet *ifp, struct sco return (0); } - /* * Get a scope of the address. Node-local, link-local, site-local or global. */ Modified: head/sys/netinet6/scope6_var.h ============================================================================== --- head/sys/netinet6/scope6_var.h Fri Aug 22 19:08:12 2014 (r270347) +++ head/sys/netinet6/scope6_var.h Fri Aug 22 19:21:08 2014 (r270348) @@ -50,8 +50,7 @@ VNET_DECLARE(int, deembed_scopeid); void scope6_init(void); struct scope6_id *scope6_ifattach(struct ifnet *); void scope6_ifdetach(struct scope6_id *); -int scope6_set(struct ifnet *, struct scope6_id *); -int scope6_get(struct ifnet *, struct scope6_id *); +int scope6_ioctl(u_long cmd, caddr_t data, struct ifnet *); void scope6_setdefault(struct ifnet *); int scope6_get_default(struct scope6_id *); u_int32_t scope6_addr2default(struct in6_addr *); From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 19:37:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29F64AB; Fri, 22 Aug 2014 19:37:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 149C43B57; Fri, 22 Aug 2014 19:37:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MJbpNc020833; Fri, 22 Aug 2014 19:37:51 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MJboa3020827; Fri, 22 Aug 2014 19:37:50 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201408221937.s7MJboa3020827@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 22 Aug 2014 19:37:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270350 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 19:37:52 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 19:40:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B7C32E3; Fri, 22 Aug 2014 19:40:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 36BDD3B73; Fri, 22 Aug 2014 19:40:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MJeUsS021435; Fri, 22 Aug 2014 19:40:30 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MJeU7f021434; Fri, 22 Aug 2014 19:40:30 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201408221940.s7MJeU7f021434@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 22 Aug 2014 19:40:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270351 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 19:40:30 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 19:43:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 491985C3; Fri, 22 Aug 2014 19:43:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33DB03C0B; Fri, 22 Aug 2014 19:43:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MJhS4J024985; Fri, 22 Aug 2014 19:43:28 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MJhR4Q024979; Fri, 22 Aug 2014 19:43:27 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201408221943.s7MJhR4Q024979@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 22 Aug 2014 19:43:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270352 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 19:43:28 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 19:46:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79E32760; Fri, 22 Aug 2014 19:46:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 654E13C48; Fri, 22 Aug 2014 19:46:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MJkNr8025464; Fri, 22 Aug 2014 19:46:23 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MJkNVY025463; Fri, 22 Aug 2014 19:46:23 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201408221946.s7MJkNVY025463@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 22 Aug 2014 19:46:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270353 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 19:46:23 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 19:49:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB2D4933 for ; Fri, 22 Aug 2014 19:49:32 +0000 (UTC) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com [209.85.215.45]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6FFE93C6F for ; Fri, 22 Aug 2014 19:49:31 +0000 (UTC) Received: by mail-la0-f45.google.com with SMTP id ty20so10493535lab.4 for ; Fri, 22 Aug 2014 12:49:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=33rEkACSQw+tm/dx0hNdui5TV9FXjRfVjIYBj0HaTi4=; b=LnYOYv3j3gPDKXIV8iboW1l5voBNew76ch0QXZv23DXq5PwyR39C8oqNmOH7k093KZ OyBI+pjd62I/jv4aGVAMaN+xx51TvwXK4NNEpfY8/5GOaxLCNaJ0uRby4pxi18hNlHLU z7TvmGUpj9/D8ESnGfWaIgM+Et7bPQSGUo3XPUhBJWFcqWVqpk4t/5RzLPdUPMhvmxOg SuMo0ISFvm78rpV9J7wjtLPqnQ232a7+wCsaMNhpSe0KvT/rptcI5KU0bugXYfmZV8QP fIpAeLeeDhlMGqsVsx01Fp6JD289Y2Nhe86bavpuLSGSc1UEzLhEd+sQmworBahb8I+m CiiA== X-Gm-Message-State: ALoCoQldeDVGnMALcr/oer0ebz5vCsnHZkRbpaetwmpXF5fdAYEAjZYgTDNC4OKFcb+Gk2J3ZQYg X-Received: by 10.152.28.230 with SMTP id e6mr6598486lah.62.1408736963853; Fri, 22 Aug 2014 12:49:23 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by mx.google.com with ESMTPSA id t8sm17183984lat.10.2014.08.22.12.49.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Aug 2014 12:49:23 -0700 (PDT) Message-ID: <53F79EC2.2040905@freebsd.org> Date: Fri, 22 Aug 2014 23:49:22 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Michael Tuexen , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r270350 - stable/10/sys/netinet References: <201408221937.s7MJboa3020827@svn.freebsd.org> In-Reply-To: <201408221937.s7MJboa3020827@svn.freebsd.org> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 19:49:33 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 19:49:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 28E859AF; Fri, 22 Aug 2014 19:49:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 136203C75; Fri, 22 Aug 2014 19:49:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MJnjrv025931; Fri, 22 Aug 2014 19:49:45 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MJnhhd025925; Fri, 22 Aug 2014 19:49:43 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201408221949.s7MJnhhd025925@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 22 Aug 2014 19:49:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270354 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 19:49:45 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 19:53:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4FB98B35; Fri, 22 Aug 2014 19:53:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2FDAA3D1C; Fri, 22 Aug 2014 19:53:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MJrBEp029680; Fri, 22 Aug 2014 19:53:11 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MJrAtR029676; Fri, 22 Aug 2014 19:53:10 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201408221953.s7MJrAtR029676@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 22 Aug 2014 19:53:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270355 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 19:53:11 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 19:57:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E096EAE; Fri, 22 Aug 2014 19:57:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E8CC3D57; Fri, 22 Aug 2014 19:57:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MJvgsm030476; Fri, 22 Aug 2014 19:57:42 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MJve71030463; Fri, 22 Aug 2014 19:57:40 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201408221957.s7MJve71030463@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 22 Aug 2014 19:57:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270356 - in stable/10: lib/libc/net sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 19:57:42 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 20:01:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48E5E1AF; Fri, 22 Aug 2014 20:01:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 333923E3F; Fri, 22 Aug 2014 20:01:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MK1ds1034428; Fri, 22 Aug 2014 20:01:39 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MK1aiV034412; Fri, 22 Aug 2014 20:01:36 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201408222001.s7MK1aiV034412@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 22 Aug 2014 20:01:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270357 - in stable/10: lib/libc/net sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 20:01:39 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 20:04:53 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2E9793F8; Fri, 22 Aug 2014 20:04:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 171073E67; Fri, 22 Aug 2014 20:04:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MK4qSg035033; Fri, 22 Aug 2014 20:04:52 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MK4pEa035023; Fri, 22 Aug 2014 20:04:51 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201408222004.s7MK4pEa035023@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 22 Aug 2014 20:04:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270358 - in head/cddl: . contrib/opensolaris/lib/libdtrace/common contrib/opensolaris/lib/libgen/common lib/libdtrace usr.sbin/lockstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 20:04:53 -0000 Author: delphij Date: Fri Aug 22 20:04:51 2014 New Revision: 270358 URL: http://svnweb.freebsd.org/changeset/base/270358 Log: Make DTrace stuff compile with C99 standard. Modified: head/cddl/Makefile.inc head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pragma.c head/cddl/contrib/opensolaris/lib/libgen/common/gmatch.c head/cddl/lib/libdtrace/libproc_compat.h head/cddl/usr.sbin/lockstat/Makefile Modified: head/cddl/Makefile.inc ============================================================================== --- head/cddl/Makefile.inc Fri Aug 22 20:01:35 2014 (r270357) +++ head/cddl/Makefile.inc Fri Aug 22 20:04:51 2014 (r270358) @@ -8,7 +8,6 @@ IGNORE_PRAGMA= YES CFLAGS+= -DNEED_SOLARIS_BOOLEAN WARNS?= 6 -CSTD?= gnu89 # Do not lint the CDDL stuff. It is all externally maintained and # lint output is wasteful noise here. Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h Fri Aug 22 20:01:35 2014 (r270357) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h Fri Aug 22 20:04:51 2014 (r270358) @@ -723,6 +723,11 @@ extern int _dtrace_argmax; /* default m extern const char *_dtrace_libdir; /* default library directory */ extern const char *_dtrace_moddir; /* default kernel module directory */ +#ifdef __FreeBSD__ +extern int gmatch(const char *, const char *); +extern int yylex(void); +#endif + #ifdef __cplusplus } #endif Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Fri Aug 22 20:01:35 2014 (r270357) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Fri Aug 22 20:04:51 2014 (r270358) @@ -29,6 +29,11 @@ #if defined(sun) #include #include +#else +/* FreeBSD */ +#include +#include +#include #endif #include Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pragma.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pragma.c Fri Aug 22 20:01:35 2014 (r270357) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pragma.c Fri Aug 22 20:04:51 2014 (r270358) @@ -36,6 +36,7 @@ #include #include +#include #include #include Modified: head/cddl/contrib/opensolaris/lib/libgen/common/gmatch.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libgen/common/gmatch.c Fri Aug 22 20:01:35 2014 (r270357) +++ head/cddl/contrib/opensolaris/lib/libgen/common/gmatch.c Fri Aug 22 20:04:51 2014 (r270358) @@ -42,6 +42,7 @@ #include #include "_range.h" #else +#include /* DOODAD */ static int multibyte = 0; #define WCHAR_CSMASK 0x30000000 #define valid_range(c1, c2) \ Modified: head/cddl/lib/libdtrace/libproc_compat.h ============================================================================== --- head/cddl/lib/libdtrace/libproc_compat.h Fri Aug 22 20:01:35 2014 (r270357) +++ head/cddl/lib/libdtrace/libproc_compat.h Fri Aug 22 20:04:51 2014 (r270358) @@ -43,6 +43,7 @@ #define Pcreate_error strerror #define Pdelbkpt proc_bkptdel #define Pgrab_error strerror +#define Plmid(p, a, l) (-1) #define Plmid_to_map(p, l, o) proc_obj2map((p), (o)) #define Plookup_by_addr proc_addr2sym #define Pname_to_ctf(p, obj) NULL Modified: head/cddl/usr.sbin/lockstat/Makefile ============================================================================== --- head/cddl/usr.sbin/lockstat/Makefile Fri Aug 22 20:01:35 2014 (r270357) +++ head/cddl/usr.sbin/lockstat/Makefile Fri Aug 22 20:04:51 2014 (r270358) @@ -18,7 +18,6 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ -I${.CURDIR}/../../../sys CFLAGS+= -DNEED_ERRLOC -g -CSTD?= gnu99 #YFLAGS+= -d From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 20:05:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3F24B538; Fri, 22 Aug 2014 20:05:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2970E3E6E; Fri, 22 Aug 2014 20:05:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MK5CwY035188; Fri, 22 Aug 2014 20:05:12 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MK59xA035172; Fri, 22 Aug 2014 20:05:09 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201408222005.s7MK59xA035172@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 22 Aug 2014 20:05:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270359 - in stable/10: lib/libc/net sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 20:05:12 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 20:08:53 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6714868B; Fri, 22 Aug 2014 20:08:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 378BE3E92; Fri, 22 Aug 2014 20:08:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MK8rbe035715; Fri, 22 Aug 2014 20:08:53 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MK8opJ035700; Fri, 22 Aug 2014 20:08:50 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201408222008.s7MK8opJ035700@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 22 Aug 2014 20:08:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270360 - in stable/10: lib/libc/net sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 20:08:53 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 20:16:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 43B8DA87; Fri, 22 Aug 2014 20:16:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2DE193F69; Fri, 22 Aug 2014 20:16:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MKGTiT040236; Fri, 22 Aug 2014 20:16:29 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MKGQhW040217; Fri, 22 Aug 2014 20:16:26 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201408222016.s7MKGQhW040217@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 22 Aug 2014 20:16:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270361 - in stable/10: lib/libc/net sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 20:16:29 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 20:22:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 21BDCCC2; Fri, 22 Aug 2014 20:22:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0BEDA3024; Fri, 22 Aug 2014 20:22:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MKMGIB044270; Fri, 22 Aug 2014 20:22:16 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MKMDik044252; Fri, 22 Aug 2014 20:22:13 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201408222022.s7MKMDik044252@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 22 Aug 2014 20:22:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270362 - in stable/10: lib/libc/net sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 20:22:16 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 20:26:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 636EFE39; Fri, 22 Aug 2014 20:26:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33EC73049; Fri, 22 Aug 2014 20:26:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MKQNJO044851; Fri, 22 Aug 2014 20:26:23 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MKQLWb044832; Fri, 22 Aug 2014 20:26:21 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201408222026.s7MKQLWb044832@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 22 Aug 2014 20:26:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270363 - in stable/10: lib/libc/net sys/conf sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 20:26:23 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 20:32:04 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5CABA16B; Fri, 22 Aug 2014 20:32:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4812530EF; Fri, 22 Aug 2014 20:32:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MKW4XM048998; Fri, 22 Aug 2014 20:32:04 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MKW4Oc048997; Fri, 22 Aug 2014 20:32:04 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201408222032.s7MKW4Oc048997@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 22 Aug 2014 20:32:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270364 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 20:32:04 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 20:32:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 50C32512; Fri, 22 Aug 2014 20:32:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 30F2D30F6; Fri, 22 Aug 2014 20:32:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MKWC0L049183; Fri, 22 Aug 2014 20:32:12 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MKWCi5049182; Fri, 22 Aug 2014 20:32:12 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201408222032.s7MKWCi5049182@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 22 Aug 2014 20:32:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270368 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 20:32:12 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 20:32:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 59BD8241; Fri, 22 Aug 2014 20:32:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4581930F0; Fri, 22 Aug 2014 20:32:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MKW69o049045; Fri, 22 Aug 2014 20:32:06 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MKW6Lu049044; Fri, 22 Aug 2014 20:32:06 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201408222032.s7MKW6Lu049044@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 22 Aug 2014 20:32:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270365 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 20:32:06 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 20:32:08 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42094327; Fri, 22 Aug 2014 20:32:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2DE3330F1; Fri, 22 Aug 2014 20:32:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MKW8XN049091; Fri, 22 Aug 2014 20:32:08 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MKW8vd049090; Fri, 22 Aug 2014 20:32:08 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201408222032.s7MKW8vd049090@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 22 Aug 2014 20:32:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270366 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 20:32:08 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 20:32:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6693B451; Fri, 22 Aug 2014 20:32:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5298D30F3; Fri, 22 Aug 2014 20:32:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MKWAqD049139; Fri, 22 Aug 2014 20:32:10 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MKWAbS049138; Fri, 22 Aug 2014 20:32:10 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201408222032.s7MKWAbS049138@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 22 Aug 2014 20:32:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270367 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 20:32:10 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 20:32:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 780F968C; Fri, 22 Aug 2014 20:32:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61F9A30F8; Fri, 22 Aug 2014 20:32:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MKWEqj049238; Fri, 22 Aug 2014 20:32:14 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MKWE08049237; Fri, 22 Aug 2014 20:32:14 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201408222032.s7MKWE08049237@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 22 Aug 2014 20:32:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270369 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 20:32:14 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 20:32:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 54453798; Fri, 22 Aug 2014 20:32:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 330A730FB; Fri, 22 Aug 2014 20:32:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MKWG1p049278; Fri, 22 Aug 2014 20:32:16 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MKWGnB049277; Fri, 22 Aug 2014 20:32:16 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201408222032.s7MKWGnB049277@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 22 Aug 2014 20:32:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270370 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 20:32:16 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 20:32:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 902A3E43; Fri, 22 Aug 2014 20:32:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C7743112; Fri, 22 Aug 2014 20:32:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MKWTxK049618; Fri, 22 Aug 2014 20:32:29 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MKWTuN049617; Fri, 22 Aug 2014 20:32:29 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201408222032.s7MKWTuN049617@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 22 Aug 2014 20:32:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270377 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 20:32:29 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 20:32:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C7E4DCD0; Fri, 22 Aug 2014 20:32:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A6264310D; Fri, 22 Aug 2014 20:32:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MKWPUq049529; Fri, 22 Aug 2014 20:32:25 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MKWP2e049528; Fri, 22 Aug 2014 20:32:25 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201408222032.s7MKWP2e049528@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 22 Aug 2014 20:32:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270375 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 20:32:26 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 20:32:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A6BD87A; Fri, 22 Aug 2014 20:32:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1618830FE; Fri, 22 Aug 2014 20:32:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MKWH7w049325; Fri, 22 Aug 2014 20:32:17 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MKWHEo049323; Fri, 22 Aug 2014 20:32:17 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201408222032.s7MKWHEo049323@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 22 Aug 2014 20:32:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270371 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 20:32:18 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 20:32:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2958F986; Fri, 22 Aug 2014 20:32:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 044B23100; Fri, 22 Aug 2014 20:32:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MKWJNT049369; Fri, 22 Aug 2014 20:32:19 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MKWJrQ049368; Fri, 22 Aug 2014 20:32:19 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201408222032.s7MKWJrQ049368@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 22 Aug 2014 20:32:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270372 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 20:32:20 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 20:32:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A9EF4D88; Fri, 22 Aug 2014 20:32:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 838B73111; Fri, 22 Aug 2014 20:32:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MKWR32049570; Fri, 22 Aug 2014 20:32:27 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MKWRZ2049569; Fri, 22 Aug 2014 20:32:27 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201408222032.s7MKWRZ2049569@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 22 Aug 2014 20:32:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270376 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 20:32:27 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 20:32:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 007419FA; Fri, 22 Aug 2014 20:32:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DFE5D3104; Fri, 22 Aug 2014 20:32:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MKWLrV049411; Fri, 22 Aug 2014 20:32:21 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MKWLFl049410; Fri, 22 Aug 2014 20:32:21 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201408222032.s7MKWLFl049410@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 22 Aug 2014 20:32:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270373 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 20:32:22 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 20:32:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 921A9FD8; Fri, 22 Aug 2014 20:32:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 679FF3118; Fri, 22 Aug 2014 20:32:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MKWVBC049663; Fri, 22 Aug 2014 20:32:31 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MKWVbB049662; Fri, 22 Aug 2014 20:32:31 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201408222032.s7MKWVbB049662@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 22 Aug 2014 20:32:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270378 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 20:32:31 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 20:32:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53889256; Fri, 22 Aug 2014 20:32:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33AF6311F; Fri, 22 Aug 2014 20:32:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MKWZqS049755; Fri, 22 Aug 2014 20:32:35 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MKWZ9r049754; Fri, 22 Aug 2014 20:32:35 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201408222032.s7MKWZ9r049754@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 22 Aug 2014 20:32:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270380 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 20:32:35 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 20:32:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D8D30B1B; Fri, 22 Aug 2014 20:32:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4E1F3107; Fri, 22 Aug 2014 20:32:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MKWNt9049464; Fri, 22 Aug 2014 20:32:23 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MKWNOW049463; Fri, 22 Aug 2014 20:32:23 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201408222032.s7MKWNOW049463@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 22 Aug 2014 20:32:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270374 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 20:32:24 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 20:32:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7036A193; Fri, 22 Aug 2014 20:32:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52367311B; Fri, 22 Aug 2014 20:32:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MKWX7L049710; Fri, 22 Aug 2014 20:32:33 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MKWX6N049709; Fri, 22 Aug 2014 20:32:33 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201408222032.s7MKWX6N049709@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 22 Aug 2014 20:32:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270379 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 20:32:33 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 20:36:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A7AAB65E; Fri, 22 Aug 2014 20:36:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9337A316C; Fri, 22 Aug 2014 20:36:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MKaj59050484; Fri, 22 Aug 2014 20:36:45 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MKajXv050483; Fri, 22 Aug 2014 20:36:45 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201408222036.s7MKajXv050483@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 22 Aug 2014 20:36:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270381 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 20:36:45 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Aug 22 20:38:04 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 968717B8; Fri, 22 Aug 2014 20:38:04 +0000 (UTC) Received: from mail-n.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mail-n.franken.de", Issuer "Thawte DV SSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 57775318C; Fri, 22 Aug 2014 20:38:04 +0000 (UTC) Received: from [192.168.1.200] (p508F2D1C.dip0.t-ipconnect.de [80.143.45.28]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTP id 27EED1C0B2B8C; Fri, 22 Aug 2014 22:37:59 +0200 (CEST) Content-Type: text/plain; charset=koi8-r Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r270350 - stable/10/sys/netinet From: Michael Tuexen In-Reply-To: <53F79EC2.2040905@freebsd.org> Date: Fri, 22 Aug 2014 22:37:59 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201408221937.s7MJboa3020827@svn.freebsd.org> <53F79EC2.2040905@freebsd.org> To: Andrey Chernov X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 20:38:04 -0000 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 >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- 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) =3D SCTPCTL_MAXDGRAM_DEFAULT; >> SCTP_BASE_SYSCTL(sctp_recvspace) =3D SCTPCTL_RECVSPACE_DEFAULT; >=20 > 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 >=20 > --=20 > http://ache.vniz.net/ >=20 >=20 From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 21:46:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 40449992; Fri, 22 Aug 2014 21:46:29 +0000 (UTC) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 25EA137A3; Fri, 22 Aug 2014 21:46:28 +0000 (UTC) Received: from zeta.ixsystems.com (unknown [12.229.62.2]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id C192DA9D3; Fri, 22 Aug 2014 14:46:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1408743981; x=1408758381; bh=3QEypGBUiVFtjvWO7zFpQQMraEmG7QvL2TX5joqC+G0=; h=Date:From:Reply-To:To:Subject:References:In-Reply-To; b=spgUCbwUSMZ2e9Y/d9/GBHyHWYrKq0GaKYbWpfcsM9vxqvVw+MeV1CYide5fGaLoV U8QiAYoBJcc4GThYfbCt70rP3RhBP76LdvgnLGWnnqW9J/M9f4awxSFJDVcmXg0RxI T/lnP2woo8tU32fd8Jw8Gav2lLN8Nl5yEdWjTTr4= Message-ID: <53F7BA2D.7070603@delphij.net> Date: Fri, 22 Aug 2014 14:46:21 -0700 From: Xin Li Reply-To: d@delphij.net Organization: The FreeBSD Project MIME-Version: 1.0 To: Jean-Sebastien Pedron , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r270342 - head/sys/dev/vt References: <201408221709.s7MH9W3Y049318@svn.freebsd.org> In-Reply-To: <201408221709.s7MH9W3Y049318@svn.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 21:46:29 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 08/22/14 10:09, Jean-Sebastien Pedron wrote: > Author: dumbbell Date: Fri Aug 22 17:09:31 2014 New Revision: > 270342 URL: http://svnweb.freebsd.org/changeset/base/270342 > > Log: vt(4): Use the actual size of the mouse when marking its > position as dirty > > This fixes a bug where part of the cursor was not erased. This breaks pc98 LINT build in my 'make tinderbox' build because 'vd_mcursor' is not available when SC_NO_CUTPASTE is defined. Could you please fix it? Thanks in advance! > MFC after: 1 week > > Modified: head/sys/dev/vt/vt.h head/sys/dev/vt/vt_buf.c > head/sys/dev/vt/vt_core.c > > Modified: head/sys/dev/vt/vt.h > ============================================================================== > > - --- head/sys/dev/vt/vt.h Fri Aug 22 17:05:41 2014 (r270341) > +++ head/sys/dev/vt/vt.h Fri Aug 22 17:09:31 2014 (r270342) @@ > -203,12 +203,12 @@ void vtbuf_grow(struct vt_buf *, const t void > vtbuf_putchar(struct vt_buf *, const term_pos_t *, term_char_t); > void vtbuf_cursor_position(struct vt_buf *, const term_pos_t *); > void vtbuf_scroll_mode(struct vt_buf *vb, int yes); +void > vtbuf_dirty(struct vt_buf *vb, const term_rect_t *area); void > vtbuf_undirty(struct vt_buf *, term_rect_t *, struct vt_bufmask > *); void vtbuf_sethistory_size(struct vt_buf *, int); int > vtbuf_iscursor(const struct vt_buf *vb, int row, int col); void > vtbuf_cursor_visibility(struct vt_buf *, int); #ifndef > SC_NO_CUTPASTE -void vtbuf_mouse_cursor_position(struct vt_buf *vb, > int col, int row); int vtbuf_set_mark(struct vt_buf *vb, int type, > int col, int row); int vtbuf_get_marked_len(struct vt_buf *vb); > void vtbuf_extract_marked(struct vt_buf *vb, term_char_t *buf, int > sz); > > Modified: head/sys/dev/vt/vt_buf.c > ============================================================================== > > - --- head/sys/dev/vt/vt_buf.c Fri Aug 22 17:05:41 2014 (r270341) > +++ head/sys/dev/vt/vt_buf.c Fri Aug 22 17:09:31 2014 (r270342) @@ > -246,7 +246,7 @@ vtbuf_dirty_locked(struct vt_buf *vb, co > vtbuf_dirty_axis(area->tr_begin.tp_col, area->tr_end.tp_col); } > > -static inline void +void vtbuf_dirty(struct vt_buf *vb, const > term_rect_t *area) { > > @@ -558,18 +558,6 @@ vtbuf_cursor_position(struct vt_buf *vb, } > > #ifndef SC_NO_CUTPASTE -void -vtbuf_mouse_cursor_position(struct > vt_buf *vb, int col, int row) -{ - term_rect_t area; - - > area.tr_begin.tp_row = MAX(row - 1, 0); - area.tr_begin.tp_col = > MAX(col - 1, 0); - area.tr_end.tp_row = MIN(row + 2, > vb->vb_scr_size.tp_row); - area.tr_end.tp_col = MIN(col + 2, > vb->vb_scr_size.tp_col); - vtbuf_dirty(vb, &area); -} - static > void vtbuf_flush_mark(struct vt_buf *vb) { > > Modified: head/sys/dev/vt/vt_core.c > ============================================================================== > > - --- head/sys/dev/vt/vt_core.c Fri Aug 22 17:05:41 2014 (r270341) > +++ head/sys/dev/vt/vt_core.c Fri Aug 22 17:09:31 2014 (r270342) @@ > -819,6 +819,28 @@ vt_determine_colors(term_char_t c, int c } > > static void +vt_mark_mouse_position_as_dirty(struct vt_device *vd, > int x, int y) +{ + term_rect_t area; + struct vt_window *vw; + > struct vt_font *vf; + + vw = vd->vd_curwindow; + vf = vw->vw_font; > + + area.tr_begin.tp_col = (x - vw->vw_offset.tp_col) / > vf->vf_width; + area.tr_begin.tp_row = (y - vw->vw_offset.tp_row) / > vf->vf_height; + area.tr_end.tp_col = + ((x + > vd->vd_mcursor->width - vw->vw_offset.tp_col) / + > vf->vf_width) + 1; + area.tr_end.tp_row = + ((y + > vd->vd_mcursor->height - vw->vw_offset.tp_row) / + > vf->vf_height) + 1; + + vtbuf_dirty(&vw->vw_buf, &area); +} + > +static void vt_bitblt_char(struct vt_device *vd, struct vt_font > *vf, term_char_t c, int iscursor, unsigned int row, unsigned int > col) { @@ -884,23 +906,11 @@ vt_flush(struct vt_device *vd) /* * > Mark last mouse position as dirty to erase. * - * FIXME: The > font size could be different among - * all windows, so the > column/row calculation - * below isn't correct for all windows. > - * - * FIXME: The cursor can span more than one - * > character cell. vtbuf_mouse_cursor_position - * marks > surrounding cells as dirty. But due - * to font size possibly > inconsistent across - * windows, this may not be sufficient. > This - * causes part of the cursor to not be erased. - * * > FIXME: The vt_buf lock is acquired twice in a * row. */ - > vtbuf_mouse_cursor_position(&vw->vw_buf, - vd->vd_moldx / > vf->vf_width, - vd->vd_moldy / vf->vf_height); + > vt_mark_mouse_position_as_dirty(vd, + vd->vd_moldx, > vd->vd_moldy); > > /* * Save point of last mouse cursor to erase it @@ -915,9 +925,8 > @@ vt_flush(struct vt_device *vd) cursor_displayed = 1; > > /* Mark new mouse position as dirty. */ - > vtbuf_mouse_cursor_position(&vw->vw_buf, - vd->vd_mx / > vf->vf_width, - vd->vd_my / vf->vf_height); + > vt_mark_mouse_position_as_dirty(vd, + vd->vd_mx, vd->vd_my); > } } #endif @@ -1618,14 +1627,8 @@ vt_mouse_state(int show) break; > } > > - /* - * Mark mouse position as dirty. - * - * FIXME: See > comments in vt_flush(). - */ - > vtbuf_mouse_cursor_position(&vw->vw_buf, - vd->vd_mx / > vw->vw_font->vf_width, - vd->vd_my / vw->vw_font->vf_height); + > /* Mark mouse position as dirty. */ + > vt_mark_mouse_position_as_dirty(vd, vd->vd_mx, vd->vd_my); } > #endif > > - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0 iQIcBAEBCgAGBQJT97otAAoJEJW2GBstM+ns29oQAIcd6IkBghJMIf8KEuSgxHFT sUjnXAPbsMLoecxtmKRZZrvpWXrB+VVH+BNIQy7g8qvXVddSRI8dmgq2IeAxaQNz 7KBAcqmwahjhAJm6dWO/giT5+a71SuyBNPtuDcWWc97RbYc4SXicnCXHEx4yHag9 xHmfCizjnaPiV4PrDOUSkYSrxomCag5lYRVTA4yM+lELF3/hd6EXCGZPXYzVtqWO K5osuXaAEeRv6RBHCx751zR6LkMtp0VP64eCyLm7ydxvJVc+G3yrZvnAjTuNwG6K +Y8Z5oaj70YnVnn7cq9vegA/zwm+/OVZJdAKT3XvbeYbf+67f2hr+vD5RNbxfbIh wjlG+sRO0M7Ozas0/b5YW17bBIq67dCgJU4pul2F8X6Fs3sLd5L7+degGQnUN2lO C5vwHd4Whhh0/u/4ezdldRrXWVnL4fRZ5wQiyn1dWAUitEGZeJixhY7hgCI6DaSd 4vA7zpD40ozCCXbQL3Eobl56+WgLN0JDtxuDPWWOrbrnT0msBqtHELD49uLY2rjr IWqhEkwH9cky+OhMgqNf2WyyNGqqrFTJFYrcO64Imh4HGQG3+RzeansmE72/PvI2 eWwVpFU2OELCj53/70H7CT8wseaPHBosfh3EGIgoS1NGnAlNbvr/RzPe30zLNIfV NtUTkyfa63Npg2qJO/Zb =MXbx -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 22:02:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DEFCBDEC; Fri, 22 Aug 2014 22:02:52 +0000 (UTC) Received: from felyko.com (felyko.com [IPv6:2001:470:1:2d5:26:3:1337:ca7]) by mx1.freebsd.org (Postfix) with ESMTP id C6EC4392C; Fri, 22 Aug 2014 22:02:52 +0000 (UTC) Received: from fukuyama.hsd1.ca.comcast.net (unknown [73.162.13.215]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by felyko.com (Postfix) with ESMTPSA id B075F34A9F4; Fri, 22 Aug 2014 15:02:51 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1973.6\)) Subject: Re: svn commit: r270346 - in head/sys: conf dev/i40e dev/ixl modules/i40e modules/ixl modules/ixlv From: Rui Paulo In-Reply-To: <201408221859.s7MIxJNK000194@svn.freebsd.org> Date: Fri, 22 Aug 2014 15:02:51 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201408221859.s7MIxJNK000194@svn.freebsd.org> To: Jack F Vogel X-Mailer: Apple Mail (2.1973.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 22:02:53 -0000 On Aug 22, 2014, at 11:59, Jack F Vogel wrote: >=20 > Author: jfv > Date: Fri Aug 22 18:59:19 2014 > New Revision: 270346 > URL: http://svnweb.freebsd.org/changeset/base/270346 >=20 > Log: > Update to 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. > - Thanks to my new coworker Eric Joyner for his superb work in > both the core and vf driver code. Thanks!=20 -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 22:13:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94D6823F; Fri, 22 Aug 2014 22:13:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F5E33A0E; Fri, 22 Aug 2014 22:13:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MMDcgh097216; Fri, 22 Aug 2014 22:13:38 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MMDaYv097207; Fri, 22 Aug 2014 22:13:36 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201408222213.s7MMDaYv097207@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 22 Aug 2014 22:13:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270382 - in head: cddl/contrib/opensolaris/head sys/cddl/contrib/opensolaris/uts/common/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 22:13:38 -0000 Author: delphij Date: Fri Aug 22 22:13:36 2014 New Revision: 270382 URL: http://svnweb.freebsd.org/changeset/base/270382 Log: MFV r270197: Illumos issue: 5066 remove support for non-ANSI compilation 5068 Remove SCCSID() macro from MFC after: 2 weeks Modified: head/cddl/contrib/opensolaris/head/libintl.h head/cddl/contrib/opensolaris/head/nlist.h head/cddl/contrib/opensolaris/head/synch.h head/cddl/contrib/opensolaris/head/thread.h head/sys/cddl/contrib/opensolaris/uts/common/sys/acl.h head/sys/cddl/contrib/opensolaris/uts/common/sys/debug.h head/sys/cddl/contrib/opensolaris/uts/common/sys/feature_tests.h head/sys/cddl/contrib/opensolaris/uts/common/sys/processor.h Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/head/libintl.h ============================================================================== --- head/cddl/contrib/opensolaris/head/libintl.h Fri Aug 22 20:36:45 2014 (r270381) +++ head/cddl/contrib/opensolaris/head/libintl.h Fri Aug 22 22:13:36 2014 (r270382) @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore + * * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -27,8 +29,6 @@ #ifndef _LIBINTL_H #define _LIBINTL_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include #ifdef __cplusplus @@ -64,7 +64,6 @@ typedef long wchar_t; #define __GNU_GETTEXT_SUPPORTED_REVISION(m) \ ((((m) == 0) || ((m) == 1)) ? 1 : -1) -#ifdef __STDC__ extern char *dcgettext(const char *, const char *, const int); extern char *dgettext(const char *, const char *); extern char *gettext(const char *); @@ -91,33 +90,6 @@ extern wchar_t *wddelim(wchar_t, wchar_t extern wchar_t mcfiller(void); extern int mcwrap(void); -#else -extern char *dcgettext(); -extern char *dgettext(); -extern char *gettext(); -extern char *textdomain(); -extern char *bindtextdomain(); - -/* - * LI18NUX 2000 Globalization Specification Version 1.0 - * with Amendment 2 - */ -extern char *dcngettext(); -extern char *dngettext(); -extern char *ngettext(); -extern char *bind_textdomain_codeset(); - -/* Word handling functions --- requires dynamic linking */ -/* Warning: these are experimental and subject to change. */ -extern int wdinit(); -extern int wdchkind(); -extern int wdbindf(); -extern wchar_t *wddelim(); -extern wchar_t mcfiller(); -extern int mcwrap(); - -#endif - #ifdef __cplusplus } #endif Modified: head/cddl/contrib/opensolaris/head/nlist.h ============================================================================== --- head/cddl/contrib/opensolaris/head/nlist.h Fri Aug 22 20:36:45 2014 (r270381) +++ head/cddl/contrib/opensolaris/head/nlist.h Fri Aug 22 22:13:36 2014 (r270382) @@ -19,6 +19,9 @@ * * CDDL HEADER END */ +/* + * Copyright 2014 Garrett D'Amore + */ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ @@ -26,8 +29,6 @@ #ifndef _NLIST_H #define _NLIST_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.8.2.4 */ - #ifdef __cplusplus extern "C" { #endif @@ -41,11 +42,7 @@ struct nlist { char n_numaux; /* number of aux. entries */ }; -#if defined(__STDC__) extern int nlist(const char *, struct nlist *); -#else /* __STDC__ */ -extern int nlist(); -#endif /* __STDC__ */ #ifdef __cplusplus } Modified: head/cddl/contrib/opensolaris/head/synch.h ============================================================================== --- head/cddl/contrib/opensolaris/head/synch.h Fri Aug 22 20:36:45 2014 (r270381) +++ head/cddl/contrib/opensolaris/head/synch.h Fri Aug 22 22:13:36 2014 (r270382) @@ -20,6 +20,7 @@ */ /* + * Copyright 2014 Garrett D'Amore * Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved. */ @@ -86,7 +87,6 @@ typedef struct _rwlock { cond_t writercv; /* used only to indicate ownership */ } rwlock_t; -#ifdef __STDC__ int _lwp_mutex_lock(lwp_mutex_t *); int _lwp_mutex_unlock(lwp_mutex_t *); int _lwp_mutex_trylock(lwp_mutex_t *); @@ -127,50 +127,6 @@ int sema_reltimedwait(sema_t *, const ti int sema_post(sema_t *); int sema_trywait(sema_t *); -#else /* __STDC__ */ - -int _lwp_mutex_lock(); -int _lwp_mutex_unlock(); -int _lwp_mutex_trylock(); -int _lwp_cond_wait(); -int _lwp_cond_timedwait(); -int _lwp_cond_reltimedwait(); -int _lwp_cond_signal(); -int _lwp_cond_broadcast(); -int _lwp_sema_init(); -int _lwp_sema_wait(); -int _lwp_sema_trywait(); -int _lwp_sema_post(); -int cond_init(); -int cond_destroy(); -int cond_wait(); -int cond_timedwait(); -int cond_reltimedwait(); -int cond_signal(); -int cond_broadcast(); -int mutex_init(); -int mutex_destroy(); -int mutex_consistent(); -int mutex_lock(); -int mutex_trylock(); -int mutex_unlock(); -int rwlock_init(); -int rwlock_destroy(); -int rw_rdlock(); -int rw_wrlock(); -int rw_unlock(); -int rw_tryrdlock(); -int rw_trywrlock(); -int sema_init(); -int sema_destroy(); -int sema_wait(); -int sema_timedwait(); -int sema_reltimedwait(); -int sema_post(); -int sema_trywait(); - -#endif /* __STDC__ */ - #endif /* _ASM */ /* "Magic numbers" tagging synchronization object types */ @@ -238,8 +194,6 @@ int sema_trywait(); #ifndef _ASM -#ifdef __STDC__ - /* * The *_held() functions apply equally well to Solaris threads * and to Posix threads synchronization objects, but the formal @@ -252,21 +206,8 @@ int _rw_read_held(void *); /* rwlock_t int _rw_write_held(void *); /* rwlock_t or pthread_rwlock_t */ int _mutex_held(void *); /* mutex_t or pthread_mutex_t */ -#else /* __STDC__ */ - -int _sema_held(); -int _rw_read_held(); -int _rw_write_held(); -int _mutex_held(); - -#endif /* __STDC__ */ - /* Pause API */ -#ifdef __STDC__ void smt_pause(void); -#else /* __STDC__ */ -void smt_pause(); -#endif /* __STDC__ */ #endif /* _ASM */ Modified: head/cddl/contrib/opensolaris/head/thread.h ============================================================================== --- head/cddl/contrib/opensolaris/head/thread.h Fri Aug 22 20:36:45 2014 (r270381) +++ head/cddl/contrib/opensolaris/head/thread.h Fri Aug 22 22:13:36 2014 (r270382) @@ -20,6 +20,8 @@ */ /* + * Copyright 2014 Garrett D'Amore + * * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -27,8 +29,6 @@ #ifndef _THREAD_H #define _THREAD_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/acl.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/sys/acl.h Fri Aug 22 20:36:45 2014 (r270381) +++ head/sys/cddl/contrib/opensolaris/uts/common/sys/acl.h Fri Aug 22 22:13:36 2014 (r270382) @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore + * * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -299,13 +301,8 @@ extern int cmp2acls(void *, void *); #endif /* !defined(_KERNEL) */ -#if defined(__STDC__) extern int acl(const char *path, int cmd, int cnt, void *buf); extern int facl(int fd, int cmd, int cnt, void *buf); -#else /* !__STDC__ */ -extern int acl(); -extern int facl(); -#endif /* defined(__STDC__) */ #ifdef __cplusplus } Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/debug.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/sys/debug.h Fri Aug 22 20:36:45 2014 (r270381) +++ head/sys/cddl/contrib/opensolaris/uts/common/sys/debug.h Fri Aug 22 22:13:36 2014 (r270382) @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore + * * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -47,7 +49,6 @@ extern "C" { * ASSERT and is evaluated on both debug and non-debug kernels. */ -#if defined(__STDC__) extern int assfail(const char *, const char *, int); #define VERIFY(EX) ((void)((EX) || assfail(#EX, __FILE__, __LINE__))) #ifdef DEBUG @@ -55,15 +56,6 @@ extern int assfail(const char *, const c #else #define ASSERT(x) ((void)0) #endif -#else /* defined(__STDC__) */ -extern int assfail(); -#define VERIFY(EX) ((void)((EX) || assfail("EX", __FILE__, __LINE__))) -#ifdef DEBUG -#define ASSERT(EX) ((void)((EX) || assfail("EX", __FILE__, __LINE__))) -#else -#define ASSERT(x) ((void)0) -#endif -#endif /* defined(__STDC__) */ /* * Assertion variants sensitive to the compilation data model Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/feature_tests.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/sys/feature_tests.h Fri Aug 22 20:36:45 2014 (r270381) +++ head/sys/cddl/contrib/opensolaris/uts/common/sys/feature_tests.h Fri Aug 22 22:13:36 2014 (r270382) @@ -20,6 +20,8 @@ */ /* + * Copyright 2013 Garrett D'Amore + * * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -42,15 +44,16 @@ extern "C" { * 199309L POSIX.1b-1993 compilation (Real Time) * 199506L POSIX.1c-1995 compilation (POSIX Threads) * 200112L POSIX.1-2001 compilation (Austin Group Revision) + * 200809L POSIX.1-2008 compilation */ #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 1 #endif /* - * The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, and _STDC_C99 - * are Sun implementation specific macros created in order to compress - * common standards specified feature test macros for easier reading. + * The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS, + * and _STDC_C99 are Sun implementation specific macros created in order to + * compress common standards specified feature test macros for easier reading. * These macros should not be used by the application developer as * unexpected results may occur. Instead, the user should reference * standards(5) for correct usage of the standards feature test macros. @@ -76,6 +79,10 @@ extern "C" { * the C standard. A value of 199901L indicates a * compiler that complies with ISO/IEC 9899:1999, other- * wise known as the C99 standard. + * + * _STRICT_SYMBOLS Used in cases where symbol visibility is restricted + * by the standards, and the user has not explicitly + * relaxed the strictness via __EXTENSIONS__. */ #if defined(_XOPEN_SOURCE) || defined(_POSIX_C_SOURCE) @@ -145,6 +152,14 @@ extern "C" { #endif /* + * Use strict symbol visibility. + */ +#if (defined(_STRICT_STDC) || defined(__XOPEN_OR_POSIX)) && \ + !defined(__EXTENSIONS__) +#define _STRICT_SYMBOLS +#endif + +/* * Large file interfaces: * * _LARGEFILE_SOURCE @@ -223,6 +238,8 @@ extern "C" { * X/Open CAE Specification, Issue 5 (XPG5) * Open Group Technical Standard, Issue 6 (XPG6), also referred to as * IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002. + * Open Group Technical Standard, Issue 7 (XPG7), also referred to as + * IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009. * * XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1). * XPG5 is also referred to as UNIX 98 or the Single Unix Specification, @@ -230,6 +247,7 @@ extern "C" { * XPG6 is the result of a merge of the X/Open and POSIX specifications * and as such is also referred to as IEEE Std. 1003.1-2001 in * addition to UNIX 03 and SUSv3. + * XPG7 is also referred to as UNIX 08 and SUSv4. * * When writing a conforming X/Open application, as per the specification * requirements, the appropriate feature test macros must be defined at @@ -242,6 +260,7 @@ extern "C" { * _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 * _XOPEN_SOURCE = 500 XPG5 * _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6 + * _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7 * * In order to simplify the guards within the headers, the following * implementation private test macros have been created. Applications @@ -261,6 +280,7 @@ extern "C" { * _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS) * _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2) * _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3) + * _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4) */ /* X/Open Portability Guide, Issue 3 */ @@ -295,6 +315,19 @@ extern "C" { #define _POSIX_C_SOURCE 200112L #undef _XOPEN_SOURCE #define _XOPEN_SOURCE 600 + +/* Open Group Technical Standard, Issue 7 */ +#elif (_XOPEN_SOURCE - 0 == 700) || (_POSIX_C_SOURCE - 0 == 200809L) +#define _XPG7 +#define _XPG6 +#define _XPG5 +#define _XPG4_2 +#define _XPG4 +#define _XPG3 +#undef _POSIX_C_SOURCE +#define _POSIX_C_SOURCE 200809L +#undef _XOPEN_SOURCE +#define _XOPEN_SOURCE 700 #endif /* @@ -305,12 +338,15 @@ extern "C" { * with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application. * _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98) * application and with a value of 600 indicates an XPG6 (UNIX 03) - * application. The appropriate version is determined by the use of the + * application and with a value of 700 indicates an XPG7 (UNIX 08). + * The appropriate version is determined by the use of the * feature test macros described earlier. The value of _XOPEN_VERSION * defaults to 3 otherwise indicating support for XPG3 applications. */ #ifndef _XOPEN_VERSION -#ifdef _XPG6 +#if defined(_XPG7) +#define _XOPEN_VERSION 700 +#elif defined(_XPG6) #define _XOPEN_VERSION 600 #elif defined(_XPG5) #define _XOPEN_VERSION 500 Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/processor.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/sys/processor.h Fri Aug 22 20:36:45 2014 (r270381) +++ head/sys/cddl/contrib/opensolaris/uts/common/sys/processor.h Fri Aug 22 22:13:36 2014 (r270382) @@ -25,6 +25,8 @@ */ /* + * Copyright 2014 Garrett D'Amore + * * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -112,7 +114,6 @@ typedef struct { * User-level system call interface prototypes */ #ifndef _KERNEL -#ifdef __STDC__ extern int p_online(processorid_t processorid, int flag); extern int processor_info(processorid_t processorid, @@ -122,16 +123,6 @@ extern int processor_bind(idtype_t idtyp extern processorid_t getcpuid(void); extern lgrpid_t gethomelgroup(void); -#else - -extern int p_online(); -extern int processor_info(); -extern int processor_bind(); -extern processorid_t getcpuid(); -extern lgrpid_t gethomelgroup(); - -#endif /* __STDC__ */ - #else /* _KERNEL */ /* From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 23:13:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D4CBB36; Fri, 22 Aug 2014 23:13:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F293C3F04; Fri, 22 Aug 2014 23:13:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MNDsV2024288; Fri, 22 Aug 2014 23:13:54 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MNDspp024281; Fri, 22 Aug 2014 23:13:54 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201408222313.s7MNDspp024281@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 22 Aug 2014 23:13:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270383 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 23:13:55 -0000 Author: delphij Date: Fri Aug 22 23:13:53 2014 New Revision: 270383 URL: http://svnweb.freebsd.org/changeset/base/270383 Log: 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 MFC after: 3 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Fri Aug 22 22:13:36 2014 (r270382) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Fri Aug 22 23:13:53 2014 (r270383) @@ -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: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Fri Aug 22 22:13:36 2014 (r270382) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Fri Aug 22 23:13:53 2014 (r270383) @@ -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: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h Fri Aug 22 22:13:36 2014 (r270382) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h Fri Aug 22 23:13:53 2014 (r270383) @@ -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: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Fri Aug 22 22:13:36 2014 (r270382) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Fri Aug 22 23:13:53 2014 (r270383) @@ -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 owner-svn-src-all@FreeBSD.ORG Sat Aug 23 01:52:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55CD67F7; Sat, 23 Aug 2014 01:52:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3FB8A3C00; Sat, 23 Aug 2014 01:52:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7N1qiXp096709; Sat, 23 Aug 2014 01:52:44 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7N1qh7n096706; Sat, 23 Aug 2014 01:52:43 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201408230152.s7N1qh7n096706@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 23 Aug 2014 01:52:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270384 - head/sys/dev/hptnr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 01:52:44 -0000 Author: delphij Date: Sat Aug 23 01:52:43 2014 New Revision: 270384 URL: http://svnweb.freebsd.org/changeset/base/270384 Log: 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! MFC after: 3 days Modified: head/sys/dev/hptnr/README head/sys/dev/hptnr/amd64-elf.hptnr_lib.o.uu head/sys/dev/hptnr/hptnr_config.c head/sys/dev/hptnr/hptnr_os_bsd.c head/sys/dev/hptnr/hptnr_osm_bsd.c head/sys/dev/hptnr/i386-elf.hptnr_lib.o.uu Modified: head/sys/dev/hptnr/README ============================================================================== --- head/sys/dev/hptnr/README Fri Aug 22 23:13:53 2014 (r270383) +++ head/sys/dev/hptnr/README Sat Aug 23 01:52:43 2014 (r270384) @@ -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: head/sys/dev/hptnr/amd64-elf.hptnr_lib.o.uu ============================================================================== --- head/sys/dev/hptnr/amd64-elf.hptnr_lib.o.uu Fri Aug 22 23:13:53 2014 (r270383) +++ head/sys/dev/hptnr/amd64-elf.hptnr_lib.o.uu Sat Aug 23 01:52:43 2014 (r270384) @@ -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@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@_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@_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@_T#=B]$B>M(BT0D($@!V,<``````+\0)P``Z`````!(`UPD&(L#B04` -M````@\@!B0/K08T<[0````")VTB+1"0@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@_X#=B"-!/7@____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^.#_@-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@0/MD<^B$8%#[9'/XA&!O:'E@````1T(P^V1T"( -M1@@/MD=!B$8)#[9'0HA&"@^V1T.(1@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-@+@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@2(/$*,-F9F:09F9FD$%455-(B?5(B=-F@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@____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@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@_X#=CB-'/7@____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@-(`[>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+@2``!(.?IT#X/!`4`X\77@ZP6Y``````^VP4B-%$!(C1202(T$U0`` +M``!)B[0`R!(``$B%]G1]]D8*`G1W28V$`+@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@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@7TXX0%U$0^V13J#Z`$\`0^6P`^VP&:0P>`'#[83@^)_"<*($P^VA98```"# MX`'!X`:#XK\)PH@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@.#X/`)T(@#6UU!7,-F9F:0 M9F9FD$B#[#A(B5PD"$B);"003(ED)!A,B6PD($R)="0H3(E\)#!)B?Q(B?-) MB=$````/ -MMU,@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,@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@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@7TXX0%U50^V -M13J#Z!$\`7=*2(U,)#!(BT0D2`^V4`A(B>Y(BWPD".@`````2(V#(`0``$DK -MA3@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@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@XN4````"+@`````Z4D%``!$BT,X08'@____`$&!^.$!$``/A>8````/ +MMTL@9H'YA0`/A_($```/M\%!#[:\!&`(``")^$"`__]T;F:#^7]W(T`/MM=) +MBXPD.`D``$B-!%)(C02"2,'@!4B+1`A0#[9`".M%9H'Y@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@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@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@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@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@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,@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@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@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-@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@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@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@.!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@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@P!ZP5!@&8,_DF+A;`)``!(BQ0D2(DLT$2)^F;!Z@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@B$0D0P^V47*#XG_!X@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,@ZPYF9F:09F:0@_@#=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@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@_`!B<*#X@%T%$6$_W0/0<9% -M)`"X`````.F@`@``08!])(%U(4B-3"001(GRB=Y,B>_H`````$'&120"N``` -M``#I>`(``$&+13@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@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@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@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@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@_@!_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@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@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@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@_`!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@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@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@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@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@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@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@A(C44028E&"$R)=1!(B5`(2(D"Z80#``")R&;!Z`4/M\") -M1"0@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@A)B48(3(DP2(E0"$B)`D@YZ;@!````1`]$ -M^$&`[0%UT$6$_P^%]````$F+5@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@A) -MB48(3(DP2(E0"$B)`D@YZ;@!````1`]$^$&`[0%UT$6$_W59@'TD@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-@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@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@.!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@2`5T`0`` -M2(E$)%!(BU0D8(N"=`$``(D%`````(M,)$R#X0.[!P```-/C08G<00G$1(FB -M=`$``+_H`P``Z`````#WTT0AXTB+3"1@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@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@BT0D'(D#2(M4)&#'@G`!``"H`0``2(M, -M)%"+`8D%`````(GI@^$#NP<```#3XT&)W$$)Q$B+1"101(D@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@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@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@7&04L$#[:1@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@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@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@8```!, -MB>_H`````.F_`0``2(GJO@8```!,B>_H`````$B+34!(A9F:03(GGZ`````"_`0```.@` -M````@+V#`````'7E2(-]6`!T&4B+51!(BT482(E""$B)$$B+15B`:%@!ZQE( -MBU5@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@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+@_@` -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@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@+$````"=!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@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,@2(V[>`\``+D!```` -MZ``````/ME0D7T@!TDB+(+2(MS($B-NZ@1``!!N`$```"Y"````.@`````2(MS($B-N]@1``!! -MN`$```"Y"````+H```@`Z``````/MU0D5DAITHP!``!(BW,@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@H -M28V'D````$B)15#&127,00^V1EMFB44@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@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@+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@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@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@1``#H`````$B)@S@1``!(C;-P$0``2(V[2!$``.@` -M````2(F#:!$``$B-LZ`1``!(C;MX$0``Z`````!(B8.8$0``2(VST!$``$B- -MNZ@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@_T(=;A(C;,P$@``2(V["!(``.@`````2(F#*!(``$R+HS`2``!F@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@_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@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@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 Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 339C6F73; Sat, 23 Aug 2014 02:20:25 +0000 (UTC) Received: from mail-pa0-x233.google.com (mail-pa0-x233.google.com [IPv6:2607:f8b0:400e:c03::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E79703EC2; Sat, 23 Aug 2014 02:20:24 +0000 (UTC) Received: by mail-pa0-f51.google.com with SMTP id ey11so17822168pad.10 for ; Fri, 22 Aug 2014 19:20:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=bDicGHTQBQeO3NwiEuwwXUcWIHL2iSFscneiUVC29kc=; b=WA8GngG3eC/kk6ZnEKBjs5Ws8+qxqcwWLzTiCadlXtYVRHfeT8ZuowjSvfmvllh0wX 7OyJsJuK6vTXOcDyuUeFZOhaZecfHgCTqLxkaJLj3N4XYoW97L/SQe1ifMdGijg4JFsT EylCQXfoyCEwMT5Gl55kJH0C7RkbXnwMDLi58ijyw+H5EGlM2PaQUbVqYEDfk5snPO6z 2MwP8ZdXk2R1LoBR+rtH5PwAPH/57G/a+dU2uLPG8T05wqCHu7z6Eorv4ag1fRgoqJyq 6sWu8uwNcspxC9ScVJbzk+OCTYlHJ7GP8t+8ilkAmLqIqJS6YQtWnWMwTGuoc1M35qt8 uxyA== X-Received: by 10.68.219.102 with SMTP id pn6mr10648839pbc.135.1408760424452; Fri, 22 Aug 2014 19:20:24 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:695c:3402:760:ce18? ([2601:8:ab80:7d6:695c:3402:760:ce18]) by mx.google.com with ESMTPSA id ob14sm45897130pdb.40.2014.08.22.19.20.22 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 22 Aug 2014 19:20:23 -0700 (PDT) Content-Type: multipart/signed; boundary="Apple-Mail=_A102CB0B-08B2-4530-8C50-C08F4F592EFB"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r270118 - head/sbin/dhclient/tests From: yaneurabeya@gmail.com In-Reply-To: <201408180121.s7I1LfSX050566@svn.freebsd.org> Date: Fri, 22 Aug 2014 19:20:20 -0700 Message-Id: <19D962EC-9FAD-40B7-91F5-02B81B9AD69C@gmail.com> References: <201408180121.s7I1LfSX050566@svn.freebsd.org> To: Garrett Cooper X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 02:20:25 -0000 --Apple-Mail=_A102CB0B-08B2-4530-8C50-C08F4F592EFB Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Aug 17, 2014, at 6:21 PM, Garrett Cooper wrote: > Author: ngie > Date: Mon Aug 18 01:21:41 2014 > New Revision: 270118 > URL: http://svnweb.freebsd.org/changeset/base/270118 >=20 > Log: > Add LIBUTIL to DPADD >=20 > This will fix "make checkdpadd" >=20 > MFC after: 5 days > PR: 192759 > Approved by: rpaulo (mentor) >=20 > Modified: > head/sbin/dhclient/tests/Makefile >=20 > Modified: head/sbin/dhclient/tests/Makefile > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sbin/dhclient/tests/Makefile Mon Aug 18 00:50:09 2014 = (r270117) > +++ head/sbin/dhclient/tests/Makefile Mon Aug 18 01:21:41 2014 = (r270118) > @@ -8,6 +8,7 @@ PLAIN_TESTS_C=3D = option-domain-search_t > SRCS.option-domain-search_test=3D alloc.c convert.c hash.c = options.c \ > tables.c fake.c = option-domain-search.c > CFLAGS.option-domain-search_test+=3D -I${.CURDIR}/.. > +DPADD.option-domain-search_test=3D ${LIBUTIL} > LDADD.option-domain-search_test=3D -lutil >=20 > WARNS?=3D 2 I forgot to mention (and I=92ll put it in my MFC commit message)... Phabric: D623 --Apple-Mail=_A102CB0B-08B2-4530-8C50-C08F4F592EFB Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJT9/plAAoJEMZr5QU6S73eVlcH/3BpxmC3vCECbZG9Ec/peb10 4LZSqshg02EaDHfF4MvucUqDCp6sfLAx+t1Re7XyrTxD09LtsSAxMuEuWN9HU1wi y+l7KOdzWIZfBY5vxTeKZrZ0ue6+BQHNO3XN6ZdBe7XzT0SzUQXaR5bNjCHYgeOu i8JgRtAwyOULg+7l5ajVMqNJ1TkzRc85AxBSaESnfRMwzI7qr9nFjVSQz3yKUOKe adDhMkQdWxgmnxuLKu39/D+5jnQvz73XLg3sU7UKFEcemi1ZrFvfdSyobOzsZwP0 e0RSGPJMqbpt8R4ausldfwoKVqi2XV7joXrQQxxCCH8o00e3CwN+4/dKhEO6UL8= =nwlu -----END PGP SIGNATURE----- --Apple-Mail=_A102CB0B-08B2-4530-8C50-C08F4F592EFB-- From owner-svn-src-all@FreeBSD.ORG Sat Aug 23 02:20:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 391D214B; Sat, 23 Aug 2014 02:20:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23D2F3EC9; Sat, 23 Aug 2014 02:20:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7N2KoCM008913; Sat, 23 Aug 2014 02:20:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7N2KnfJ008912; Sat, 23 Aug 2014 02:20:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201408230220.s7N2KnfJ008912@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 23 Aug 2014 02:20:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270385 - stable/10/sbin/dhclient/tests X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 02:20:50 -0000 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 owner-svn-src-all@FreeBSD.ORG Sat Aug 23 02:24:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 509CA308; Sat, 23 Aug 2014 02:24:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BCA83F0F; Sat, 23 Aug 2014 02:24:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7N2OmQa010894; Sat, 23 Aug 2014 02:24:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7N2Omwd010893; Sat, 23 Aug 2014 02:24:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201408230224.s7N2Omwd010893@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 23 Aug 2014 02:24:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270386 - stable/10/lib/libcrypt/tests X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 02:24:48 -0000 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 owner-svn-src-all@FreeBSD.ORG Sat Aug 23 05:24:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CB9A33D1; Sat, 23 Aug 2014 05:24:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B72ED3FFF; Sat, 23 Aug 2014 05:24:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7N5OVud092533; Sat, 23 Aug 2014 05:24:31 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7N5OV9U092532; Sat, 23 Aug 2014 05:24:31 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201408230524.s7N5OV9U092532@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sat, 23 Aug 2014 05:24:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270387 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 05:24:31 -0000 Author: alc Date: Sat Aug 23 05:24:31 2014 New Revision: 270387 URL: http://svnweb.freebsd.org/changeset/base/270387 Log: Relax one of the conditions for mapping a page on the fast path. Reviewed by: kib X-MFC with: r270011 Sponsored by: EMC / Isilon Storage Division Modified: head/sys/vm/vm_fault.c Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Sat Aug 23 02:24:47 2014 (r270386) +++ head/sys/vm/vm_fault.c Sat Aug 23 05:24:31 2014 (r270387) @@ -306,8 +306,9 @@ RetryFault:; (fs.first_object->flags & OBJ_MIGHTBEDIRTY) == 0) goto fast_failed; m = vm_page_lookup(fs.first_object, fs.first_pindex); - if (m == NULL || vm_page_busied(m) || - m->valid != VM_PAGE_BITS_ALL) + /* 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 : From owner-svn-src-all@FreeBSD.ORG Sat Aug 23 07:02:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5CFB615; Sat, 23 Aug 2014 07:02:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A13403757; Sat, 23 Aug 2014 07:02:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7N72v40037592; Sat, 23 Aug 2014 07:02:57 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7N72vb4037591; Sat, 23 Aug 2014 07:02:57 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201408230702.s7N72vb4037591@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Sat, 23 Aug 2014 07:02:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270388 - head/sys/dev/vt/hw/vga X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 07:02:57 -0000 Author: dumbbell Date: Sat Aug 23 07:02:57 2014 New Revision: 270388 URL: http://svnweb.freebsd.org/changeset/base/270388 Log: vt_vga: Give only the character part of term_char_t to vga_get_cp437() This fixes a bug where vga_get_cp437() was called with an invalid argument. The screen was then filled with '?' instead of the actual character. MFC after: 1 week Modified: head/sys/dev/vt/hw/vga/vt_vga.c Modified: head/sys/dev/vt/hw/vga/vt_vga.c ============================================================================== --- head/sys/dev/vt/hw/vga/vt_vga.c Sat Aug 23 05:24:31 2014 (r270387) +++ head/sys/dev/vt/hw/vga/vt_vga.c Sat Aug 23 07:02:57 2014 (r270388) @@ -799,7 +799,7 @@ vga_bitblt_text_txtmode(struct vt_device * character set used by the VGA hardware by * default. */ - ch = vga_get_cp437(c); + ch = vga_get_cp437(TCHAR_CHARACTER(c)); /* Convert colors to VGA attributes. */ attr = bg << 4 | fg; From owner-svn-src-all@FreeBSD.ORG Sat Aug 23 07:03:05 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4873C75F; Sat, 23 Aug 2014 07:03:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33A2C375E; Sat, 23 Aug 2014 07:03:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7N735bZ037671; Sat, 23 Aug 2014 07:03:05 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7N7355K037670; Sat, 23 Aug 2014 07:03:05 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201408230703.s7N7355K037670@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 23 Aug 2014 07:03:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270389 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 07:03:05 -0000 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 owner-svn-src-all@FreeBSD.ORG Sat Aug 23 07:15:04 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F3C6C28; Sat, 23 Aug 2014 07:15:04 +0000 (UTC) Received: from mail.made4.biz (mail.made4.biz [IPv6:2001:41d0:2:c018::1:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25542381B; Sat, 23 Aug 2014 07:15:04 +0000 (UTC) Received: from 141.7.19.93.rev.sfr.net ([93.19.7.141] helo=i915.dumbbell.fr) by mail.made4.biz with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.82_1-5b7a7c0-XX (FreeBSD)) (envelope-from ) id 1XL5XS-000PET-DY; Sat, 23 Aug 2014 09:15:02 +0200 Message-ID: <53F83F76.2060700@FreeBSD.org> Date: Sat, 23 Aug 2014 09:15:02 +0200 From: =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r270388 - head/sys/dev/vt/hw/vga References: <201408230702.s7N72vb4037591@svn.freebsd.org> In-Reply-To: <201408230702.s7N72vb4037591@svn.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 07:15:04 -0000 On 23.08.2014 09:02, Jean-Sebastien Pedron wrote: > Author: dumbbell > Date: Sat Aug 23 07:02:57 2014 > New Revision: 270388 > URL: http://svnweb.freebsd.org/changeset/base/270388 > > Log: > vt_vga: Give only the character part of term_char_t to vga_get_cp437() > > This fixes a bug where vga_get_cp437() was called with an invalid > argument. The screen was then filled with '?' instead of the actual > character. > > MFC after: 1 week Reported by: O. Hartmann , delphij@ -- Jean-Sébastien Pédron From owner-svn-src-all@FreeBSD.ORG Sat Aug 23 07:41:08 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7EBC214; Sat, 23 Aug 2014 07:41:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A756739B0; Sat, 23 Aug 2014 07:41:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7N7f8C5055359; Sat, 23 Aug 2014 07:41:08 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7N7f83o055358; Sat, 23 Aug 2014 07:41:08 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201408230741.s7N7f83o055358@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Sat, 23 Aug 2014 07:41:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270390 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 07:41:09 -0000 Author: dumbbell Date: Sat Aug 23 07:41:08 2014 New Revision: 270390 URL: http://svnweb.freebsd.org/changeset/base/270390 Log: vt(4): Fix a crash in vt_mark_mouse_position_as_dirty() when in textmode In textmode, no font is loaded, thus the page fault in vt_mark_mouse_position_as_dirty() when it wants the font width/height. For now, create a fake area for the textmode. This needs to be modified if vt_vga gains mouse support in textmode. While here, fix a build failure when SC_NO_CUTPASTE is defined: vt_mark_mouse_position_as_dirty() must not be included in this case. MFC after: 1 week Modified: head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Sat Aug 23 07:03:04 2014 (r270389) +++ head/sys/dev/vt/vt_core.c Sat Aug 23 07:41:08 2014 (r270390) @@ -818,6 +818,7 @@ vt_determine_colors(term_char_t c, int c } } +#ifndef SC_NO_CUTPASTE static void vt_mark_mouse_position_as_dirty(struct vt_device *vd, int x, int y) { @@ -828,17 +829,33 @@ vt_mark_mouse_position_as_dirty(struct v vw = vd->vd_curwindow; vf = vw->vw_font; - area.tr_begin.tp_col = (x - vw->vw_offset.tp_col) / vf->vf_width; - area.tr_begin.tp_row = (y - vw->vw_offset.tp_row) / vf->vf_height; - area.tr_end.tp_col = - ((x + vd->vd_mcursor->width - vw->vw_offset.tp_col) / - vf->vf_width) + 1; - area.tr_end.tp_row = - ((y + vd->vd_mcursor->height - vw->vw_offset.tp_row) / - vf->vf_height) + 1; + if (vf != NULL) { + area.tr_begin.tp_col = (x - vw->vw_offset.tp_col) / + vf->vf_width; + area.tr_begin.tp_row = (y - vw->vw_offset.tp_row) / + vf->vf_height; + area.tr_end.tp_col = + ((x + vd->vd_mcursor->width - vw->vw_offset.tp_col) / + vf->vf_width) + 1; + area.tr_end.tp_row = + ((y + vd->vd_mcursor->height - vw->vw_offset.tp_row) / + vf->vf_height) + 1; + } else { + /* + * No font loaded (ie. vt_vga operating in textmode). + * + * FIXME: This fake area needs to be revisited once the + * mouse cursor is supported in vt_vga's textmode. + */ + area.tr_begin.tp_col = x; + area.tr_begin.tp_row = y; + area.tr_end.tp_col = x + 2; + area.tr_end.tp_row = y + 2; + } vtbuf_dirty(&vw->vw_buf, &area); } +#endif static void vt_bitblt_char(struct vt_device *vd, struct vt_font *vf, term_char_t c, From owner-svn-src-all@FreeBSD.ORG Sat Aug 23 07:43:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1A6B45E; Sat, 23 Aug 2014 07:43:16 +0000 (UTC) Received: from mail.made4.biz (mail.made4.biz [IPv6:2001:41d0:2:c018::1:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 883A93A3A; Sat, 23 Aug 2014 07:43:16 +0000 (UTC) Received: from 141.7.19.93.rev.sfr.net ([93.19.7.141] helo=i915.dumbbell.fr) by mail.made4.biz with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.82_1-5b7a7c0-XX (FreeBSD)) (envelope-from ) id 1XL5yk-000PWq-QY; Sat, 23 Aug 2014 09:43:14 +0200 Message-ID: <53F84612.3010307@FreeBSD.org> Date: Sat, 23 Aug 2014 09:43:14 +0200 From: =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r270390 - head/sys/dev/vt References: <201408230741.s7N7f83o055358@svn.freebsd.org> In-Reply-To: <201408230741.s7N7f83o055358@svn.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 07:43:16 -0000 On 23.08.2014 09:41, Jean-Sebastien Pedron wrote: > Author: dumbbell > Date: Sat Aug 23 07:41:08 2014 > New Revision: 270390 > URL: http://svnweb.freebsd.org/changeset/base/270390 > > Log: > vt(4): Fix a crash in vt_mark_mouse_position_as_dirty() when in textmode > > In textmode, no font is loaded, thus the page fault in > vt_mark_mouse_position_as_dirty() when it wants the font width/height. > > For now, create a fake area for the textmode. This needs to be modified > if vt_vga gains mouse support in textmode. > > While here, fix a build failure when SC_NO_CUTPASTE is defined: > vt_mark_mouse_position_as_dirty() must not be included in this case. > > MFC after: 1 week Reported by: delphij@ (both crash + build failure) -- Jean-Sébastien Pédron From owner-svn-src-all@FreeBSD.ORG Sat Aug 23 07:44:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE36759F; Sat, 23 Aug 2014 07:44:24 +0000 (UTC) Received: from mail.made4.biz (mail.made4.biz [IPv6:2001:41d0:2:c018::1:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F4C93A41; Sat, 23 Aug 2014 07:44:24 +0000 (UTC) Received: from 141.7.19.93.rev.sfr.net ([93.19.7.141] helo=i915.dumbbell.fr) by mail.made4.biz with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.82_1-5b7a7c0-XX (FreeBSD)) (envelope-from ) id 1XL5zq-000PYT-Rs; Sat, 23 Aug 2014 09:44:22 +0200 Message-ID: <53F84656.1070402@FreeBSD.org> Date: Sat, 23 Aug 2014 09:44:22 +0200 From: =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: d@delphij.net, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r270342 - head/sys/dev/vt References: <201408221709.s7MH9W3Y049318@svn.freebsd.org> <53F7BA2D.7070603@delphij.net> In-Reply-To: <53F7BA2D.7070603@delphij.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 07:44:24 -0000 On 22.08.2014 23:46, Xin Li wrote: > This breaks pc98 LINT build in my 'make tinderbox' build because > 'vd_mcursor' is not available when SC_NO_CUTPASTE is defined. Could > you please fix it? This is fixed in r270388. Sorry for the breakage... -- Jean-Sébastien Pédron From owner-svn-src-all@FreeBSD.ORG Sat Aug 23 10:49:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A39F667; Sat, 23 Aug 2014 10:49:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 166F43763; Sat, 23 Aug 2014 10:49:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NAn2Mn037157; Sat, 23 Aug 2014 10:49:02 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NAn2U7037156; Sat, 23 Aug 2014 10:49:02 GMT (envelope-from des@FreeBSD.org) Message-Id: <201408231049.s7NAn2U7037156@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Sat, 23 Aug 2014 10:49:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270391 - head/etc/defaults X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 10:49:03 -0000 Author: des Date: Sat Aug 23 10:49:02 2014 New Revision: 270391 URL: http://svnweb.freebsd.org/changeset/base/270391 Log: Setting rc_debug explicitly in /etc/defaults/rc.conf defeats its purpose. MFC after: 3 days Modified: head/etc/defaults/rc.conf Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Sat Aug 23 07:41:08 2014 (r270390) +++ head/etc/defaults/rc.conf Sat Aug 23 10:49:02 2014 (r270391) @@ -21,7 +21,7 @@ ### Important initial Boot-time options #################### ############################################################## -rc_debug="NO" # Set to YES to enable debugging output from rc.d +#rc_debug="NO" # Set to YES to enable debugging output from rc.d rc_info="NO" # Enables display of informational messages at boot. rc_startmsgs="YES" # Show "Starting foo:" messages at boot rcshutdown_timeout="90" # Seconds to wait before terminating rc.shutdown From owner-svn-src-all@FreeBSD.ORG Sat Aug 23 10:51:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B11F17F3; Sat, 23 Aug 2014 10:51:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D66B37EF; Sat, 23 Aug 2014 10:51:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NApc27040485; Sat, 23 Aug 2014 10:51:38 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NApcM9040333; Sat, 23 Aug 2014 10:51:38 GMT (envelope-from des@FreeBSD.org) Message-Id: <201408231051.s7NApcM9040333@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Sat, 23 Aug 2014 10:51:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270392 - in head/etc: . mtree X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 10:51:38 -0000 Author: des Date: Sat Aug 23 10:51:37 2014 New Revision: 270392 URL: http://svnweb.freebsd.org/changeset/base/270392 Log: Add support for /etc/rc.conf.d/ subdirectories. This is particularly useful for services such as "network" (netif) where each interface can now have its own separate configuration file. Add /etc/rc.conf.d to the mtree file so it is always present. MFC after: 3 days Modified: head/etc/mtree/BSD.root.dist head/etc/rc.subr Modified: head/etc/mtree/BSD.root.dist ============================================================================== --- head/etc/mtree/BSD.root.dist Sat Aug 23 10:49:02 2014 (r270391) +++ head/etc/mtree/BSD.root.dist Sat Aug 23 10:51:37 2014 (r270392) @@ -62,6 +62,8 @@ .. ppp .. + rc.conf.d + .. rc.d .. security Modified: head/etc/rc.subr ============================================================================== --- head/etc/rc.subr Sat Aug 23 10:49:02 2014 (r270391) +++ head/etc/rc.subr Sat Aug 23 10:51:37 2014 (r270392) @@ -1290,8 +1290,16 @@ load_rc_config() _rc_conf_loaded=true fi if [ -f /etc/rc.conf.d/"$_name" ]; then - debug "Sourcing /etc/rc.conf.d/${_name}" + debug "Sourcing /etc/rc.conf.d/$_name" . /etc/rc.conf.d/"$_name" + elif [ -d /etc/rc.conf.d/"$_name" ] ; then + local _rc + for _rc in /etc/rc.conf.d/"$_name"/* ; do + if [ -f "$_rc" ] ; then + debug "Sourcing $_rc" + . "$_rc" + fi + done fi # Set defaults if defined. From owner-svn-src-all@FreeBSD.ORG Sat Aug 23 10:58:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 12C5D966; Sat, 23 Aug 2014 10:58:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE9D33818; Sat, 23 Aug 2014 10:58:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NAwHkL041571; Sat, 23 Aug 2014 10:58:17 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NAwHYC041565; Sat, 23 Aug 2014 10:58:17 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201408231058.s7NAwHYC041565@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 23 Aug 2014 10:58:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org 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... X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 10:58:18 -0000 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 owner-svn-src-all@FreeBSD.ORG Sat Aug 23 11:32:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D9607EDB; Sat, 23 Aug 2014 11:32:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4F9F3AD6; Sat, 23 Aug 2014 11:32:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NBWhCg059060; Sat, 23 Aug 2014 11:32:43 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NBWhPF059059; Sat, 23 Aug 2014 11:32:43 GMT (envelope-from des@FreeBSD.org) Message-Id: <201408231132.s7NBWhPF059059@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Sat, 23 Aug 2014 11:32:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270395 - stable/10/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 11:32:44 -0000 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 owner-svn-src-all@FreeBSD.ORG Sat Aug 23 11:32:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D170C7E; Sat, 23 Aug 2014 11:32:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD16B3AD7; Sat, 23 Aug 2014 11:32:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NBWm64059121; Sat, 23 Aug 2014 11:32:48 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NBWmdc059120; Sat, 23 Aug 2014 11:32:48 GMT (envelope-from des@FreeBSD.org) Message-Id: <201408231132.s7NBWmdc059120@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Sat, 23 Aug 2014 11:32:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r270396 - stable/9/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 11:32:48 -0000 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 owner-svn-src-all@FreeBSD.ORG Sat Aug 23 11:34:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E426A27E; Sat, 23 Aug 2014 11:34:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFE6B3AF1; Sat, 23 Aug 2014 11:34:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NBYtfC059900; Sat, 23 Aug 2014 11:34:55 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NBYtMV059898; Sat, 23 Aug 2014 11:34:55 GMT (envelope-from des@FreeBSD.org) Message-Id: <201408231134.s7NBYtMV059898@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Sat, 23 Aug 2014 11:34:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r270397 - stable/9/lib/libpam/modules/pam_lastlog X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 11:34:56 -0000 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 owner-svn-src-all@FreeBSD.ORG Sat Aug 23 11:34:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D4C11280; Sat, 23 Aug 2014 11:34:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C07923AF2; Sat, 23 Aug 2014 11:34:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NBYuNc059940; Sat, 23 Aug 2014 11:34:56 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NBYufC059939; Sat, 23 Aug 2014 11:34:56 GMT (envelope-from des@FreeBSD.org) Message-Id: <201408231134.s7NBYufC059939@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Sat, 23 Aug 2014 11:34:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270398 - stable/10/lib/libpam/modules/pam_lastlog X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 11:34:57 -0000 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 owner-svn-src-all@FreeBSD.ORG Sat Aug 23 11:38:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 43C7D57C; Sat, 23 Aug 2014 11:38:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 300423B1E; Sat, 23 Aug 2014 11:38:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NBcWIX060936; Sat, 23 Aug 2014 11:38:32 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NBcWwa060935; Sat, 23 Aug 2014 11:38:32 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408231138.s7NBcWwa060935@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 23 Aug 2014 11:38:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270399 - head/sys/fs/autofs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 11:38:32 -0000 Author: trasz Date: Sat Aug 23 11:38:31 2014 New Revision: 270399 URL: http://svnweb.freebsd.org/changeset/base/270399 Log: Add comment explaining one of the quirks in autofs. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/sys/fs/autofs/autofs.c Modified: head/sys/fs/autofs/autofs.c ============================================================================== --- head/sys/fs/autofs/autofs.c Sat Aug 23 11:34:56 2014 (r270398) +++ head/sys/fs/autofs/autofs.c Sat Aug 23 11:38:31 2014 (r270399) @@ -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 owner-svn-src-all@FreeBSD.ORG Sat Aug 23 11:40:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 22ACE787; Sat, 23 Aug 2014 11:40:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 041E63BA1; Sat, 23 Aug 2014 11:40:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NBeIsU061648; Sat, 23 Aug 2014 11:40:18 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NBeI4h061646; Sat, 23 Aug 2014 11:40:18 GMT (envelope-from des@FreeBSD.org) Message-Id: <201408231140.s7NBeI4h061646@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Sat, 23 Aug 2014 11:40:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r270400 - stable/9/lib/libpam/modules/pam_group X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 11:40:19 -0000 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 owner-svn-src-all@FreeBSD.ORG Sat Aug 23 11:40:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AEE918F5; Sat, 23 Aug 2014 11:40:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 901F23BAD; Sat, 23 Aug 2014 11:40:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NBefSJ061805; Sat, 23 Aug 2014 11:40:41 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NBef8H061800; Sat, 23 Aug 2014 11:40:41 GMT (envelope-from des@FreeBSD.org) Message-Id: <201408231140.s7NBef8H061800@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Sat, 23 Aug 2014 11:40:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270401 - stable/10/lib/libpam/modules/pam_group X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 11:40:41 -0000 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 owner-svn-src-all@FreeBSD.ORG Sat Aug 23 11:45:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 24039C9F; Sat, 23 Aug 2014 11:45:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EAAE03BE7; Sat, 23 Aug 2014 11:45:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NBjFHQ066248; Sat, 23 Aug 2014 11:45:15 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NBjFIF066242; Sat, 23 Aug 2014 11:45:15 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408231145.s7NBjFIF066242@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 23 Aug 2014 11:45:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270402 - head/sys/fs/autofs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 11:45:16 -0000 Author: trasz Date: Sat Aug 23 11:45:14 2014 New Revision: 270402 URL: http://svnweb.freebsd.org/changeset/base/270402 Log: 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. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/sys/fs/autofs/autofs.c head/sys/fs/autofs/autofs.h head/sys/fs/autofs/autofs_vfsops.c head/sys/fs/autofs/autofs_vnops.c Modified: head/sys/fs/autofs/autofs.c ============================================================================== --- head/sys/fs/autofs/autofs.c Sat Aug 23 11:40:40 2014 (r270401) +++ head/sys/fs/autofs/autofs.c Sat Aug 23 11:45:14 2014 (r270402) @@ -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: head/sys/fs/autofs/autofs.h ============================================================================== --- head/sys/fs/autofs/autofs.h Sat Aug 23 11:40:40 2014 (r270401) +++ head/sys/fs/autofs/autofs.h Sat Aug 23 11:45:14 2014 (r270402) @@ -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: head/sys/fs/autofs/autofs_vfsops.c ============================================================================== --- head/sys/fs/autofs/autofs_vfsops.c Sat Aug 23 11:40:40 2014 (r270401) +++ head/sys/fs/autofs/autofs_vfsops.c Sat Aug 23 11:45:14 2014 (r270402) @@ -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: head/sys/fs/autofs/autofs_vnops.c ============================================================================== --- head/sys/fs/autofs/autofs_vnops.c Sat Aug 23 11:40:40 2014 (r270401) +++ head/sys/fs/autofs/autofs_vnops.c Sat Aug 23 11:45:14 2014 (r270402) @@ -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 owner-svn-src-all@FreeBSD.ORG Sat Aug 23 11:46:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D973DF5; Sat, 23 Aug 2014 11:46:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 797D93BF3; Sat, 23 Aug 2014 11:46:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NBkRDR066600; Sat, 23 Aug 2014 11:46:27 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NBkRXY066599; Sat, 23 Aug 2014 11:46:27 GMT (envelope-from des@FreeBSD.org) Message-Id: <201408231146.s7NBkRXY066599@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Sat, 23 Aug 2014 11:46:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270403 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 11:46:27 -0000 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 owner-svn-src-all@FreeBSD.ORG Sat Aug 23 11:46:53 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 95B29F21; Sat, 23 Aug 2014 11:46:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 769653BF7; Sat, 23 Aug 2014 11:46:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NBkrp5066751; Sat, 23 Aug 2014 11:46:53 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NBkq2f066747; Sat, 23 Aug 2014 11:46:52 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201408231146.s7NBkq2f066747@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Sat, 23 Aug 2014 11:46:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270404 - in head/sys/dev/vt: . hw/vga X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 11:46:53 -0000 Author: dumbbell Date: Sat Aug 23 11:46:52 2014 New Revision: 270404 URL: http://svnweb.freebsd.org/changeset/base/270404 Log: vt(4): Fix cursor handling in vt_flush() There were situations where the cursor was not erased/redrawn or its position was marked as dirty even though it's not displayed. The code is now more straightforward. At the same, add a function to determine if the cursor covers a given area. This is used by backends to know if they need to draw the cursor. This new function should be paired with a new state in struct vt_device, called vd_mshown, which indicates if the cursor should be displayed. This again simplifies vd_bitblt_text_t callback's API. MFC after: 1 week Modified: head/sys/dev/vt/hw/vga/vt_vga.c head/sys/dev/vt/vt.h head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/hw/vga/vt_vga.c ============================================================================== --- head/sys/dev/vt/hw/vga/vt_vga.c Sat Aug 23 11:46:26 2014 (r270403) +++ head/sys/dev/vt/hw/vga/vt_vga.c Sat Aug 23 11:46:52 2014 (r270404) @@ -521,8 +521,7 @@ vga_bitblt_pixels_block_ncolors(struct v static void vga_bitblt_one_text_pixels_block(struct vt_device *vd, - const struct vt_window *vw, unsigned int x, unsigned int y, - int cursor_displayed) + const struct vt_window *vw, unsigned int x, unsigned int y) { const struct vt_buf *vb; const struct vt_font *vf; @@ -533,10 +532,6 @@ vga_bitblt_one_text_pixels_block(struct term_char_t c; term_color_t fg, bg; const uint8_t *src; -#ifndef SC_NO_CUTPASTE - struct vt_mouse_cursor *cursor; - unsigned int mx, my; -#endif vb = &vw->vw_buf; vf = vw->vw_font; @@ -631,16 +626,21 @@ vga_bitblt_one_text_pixels_block(struct * the current position could be different than the one used * to mark the area dirty. */ - cursor = vd->vd_mcursor; - mx = vd->vd_moldx + vw->vw_offset.tp_col; - my = vd->vd_moldy + vw->vw_offset.tp_row; - if (cursor_displayed && - ((mx >= x && x + VT_VGA_PIXELS_BLOCK - 1 >= mx) || - (mx < x && mx + cursor->width >= x)) && - ((my >= y && y + vf->vf_height - 1 >= my) || - (my < y && my + cursor->height >= y))) { + term_rect_t drawn_area; + + drawn_area.tr_begin.tp_col = x; + drawn_area.tr_begin.tp_row = y; + drawn_area.tr_end.tp_col = x + VT_VGA_PIXELS_BLOCK; + drawn_area.tr_end.tp_row = y + vf->vf_height; + if (vd->vd_mshown && vt_is_cursor_in_area(vd, &drawn_area)) { + struct vt_mouse_cursor *cursor; + unsigned int mx, my; unsigned int dst_x, src_y, dst_y, y_count; + cursor = vd->vd_mcursor; + mx = vd->vd_mx_drawn + vw->vw_offset.tp_col; + my = vd->vd_my_drawn + vw->vw_offset.tp_row; + /* Compute the portion of the cursor we want to copy. */ src_x = x > mx ? x - mx : 0; dst_x = mx > x ? mx - x : 0; @@ -686,7 +686,7 @@ vga_bitblt_one_text_pixels_block(struct static void vga_bitblt_text_gfxmode(struct vt_device *vd, const struct vt_window *vw, - const term_rect_t *area, int cursor_displayed) + const term_rect_t *area) { const struct vt_font *vf; unsigned int col, row; @@ -741,7 +741,11 @@ vga_bitblt_text_gfxmode(struct vt_device * VT_VGA_PIXELS_BLOCK; y2 = row * vf->vf_height + vw->vw_offset.tp_row; - /* Clip the area to the screen size. */ + /* + * Clip the area to the screen size. + * + * FIXME: Take vw_offset into account. + */ x2 = min(x2, vd->vd_width - 1); y2 = min(y2, vd->vd_height - 1); @@ -762,15 +766,14 @@ vga_bitblt_text_gfxmode(struct vt_device for (y = y1; y < y2; y += vf->vf_height) { for (x = x1; x < x2; x += VT_VGA_PIXELS_BLOCK) { - vga_bitblt_one_text_pixels_block(vd, vw, x, y, - cursor_displayed); + vga_bitblt_one_text_pixels_block(vd, vw, x, y); } } } static void vga_bitblt_text_txtmode(struct vt_device *vd, const struct vt_window *vw, - const term_rect_t *area, int cursor_displayed) + const term_rect_t *area) { struct vga_softc *sc; const struct vt_buf *vb; @@ -814,13 +817,13 @@ vga_bitblt_text_txtmode(struct vt_device static void vga_bitblt_text(struct vt_device *vd, const struct vt_window *vw, - const term_rect_t *area, int cursor_displayed) + const term_rect_t *area) { if (!(vd->vd_flags & VDF_TEXTMODE)) { - vga_bitblt_text_gfxmode(vd, vw, area, cursor_displayed); + vga_bitblt_text_gfxmode(vd, vw, area); } else { - vga_bitblt_text_txtmode(vd, vw, area, cursor_displayed); + vga_bitblt_text_txtmode(vd, vw, area); } } Modified: head/sys/dev/vt/vt.h ============================================================================== --- head/sys/dev/vt/vt.h Sat Aug 23 11:46:26 2014 (r270403) +++ head/sys/dev/vt/vt.h Sat Aug 23 11:46:52 2014 (r270404) @@ -130,11 +130,12 @@ struct vt_device { struct vt_mouse_cursor *vd_mcursor; /* (?) Cursor bitmap. */ term_color_t vd_mcursor_fg; /* (?) Cursor fg color. */ term_color_t vd_mcursor_bg; /* (?) Cursor bg color. */ -#endif + vt_axis_t vd_mx_drawn; /* (?) Mouse X and Y */ + vt_axis_t vd_my_drawn; /* as of last redraw. */ + int vd_mshown; /* (?) Mouse shown during */ +#endif /* last redrawn. */ uint16_t vd_mx; /* (?) Current mouse X. */ uint16_t vd_my; /* (?) current mouse Y. */ - vt_axis_t vd_moldx; /* (?) Mouse X as of last redraw. */ - vt_axis_t vd_moldy; /* (?) Mouse Y as of last redraw. */ uint32_t vd_mstate; /* (?) Mouse state. */ vt_axis_t vd_width; /* (?) Screen width. */ vt_axis_t vd_height; /* (?) Screen height. */ @@ -303,7 +304,7 @@ typedef void vd_bitbltchr_t(struct vt_de typedef void vd_putchar_t(struct vt_device *vd, term_char_t, vt_axis_t top, vt_axis_t left, term_color_t fg, term_color_t bg); typedef void vd_bitblt_text_t(struct vt_device *vd, const struct vt_window *vw, - const term_rect_t *area, int cursor_displayed); + const term_rect_t *area); typedef int vd_fb_ioctl_t(struct vt_device *, u_long, caddr_t, struct thread *); typedef int vd_fb_mmap_t(struct vt_device *, vm_ooffset_t, vm_paddr_t *, int, vm_memattr_t *); @@ -415,6 +416,8 @@ void vt_mouse_state(int show); /* Utilities. */ void vt_determine_colors(term_char_t c, int cursor, term_color_t *fg, term_color_t *bg); +int vt_is_cursor_in_area(const struct vt_device *vd, + const term_rect_t *area); #endif /* !_DEV_VT_VT_H_ */ Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Sat Aug 23 11:46:26 2014 (r270403) +++ head/sys/dev/vt/vt_core.c Sat Aug 23 11:46:52 2014 (r270404) @@ -819,16 +819,46 @@ vt_determine_colors(term_char_t c, int c } #ifndef SC_NO_CUTPASTE +int +vt_is_cursor_in_area(const struct vt_device *vd, const term_rect_t *area) +{ + unsigned int mx, my, x1, y1, x2, y2; + + /* + * We use the cursor position saved during the current refresh, + * in case the cursor moved since. + */ + mx = vd->vd_mx_drawn; + my = vd->vd_my_drawn; + + x1 = area->tr_begin.tp_col; + y1 = area->tr_begin.tp_row; + x2 = area->tr_end.tp_col; + y2 = area->tr_end.tp_row; + + if (((mx >= x1 && x2 - 1 >= mx) || + (mx < x1 && mx + vd->vd_mcursor->width >= x1)) && + ((my >= y1 && y2 - 1 >= my) || + (my < y1 && my + vd->vd_mcursor->height >= y1))) + return (1); + + return (0); +} + static void -vt_mark_mouse_position_as_dirty(struct vt_device *vd, int x, int y) +vt_mark_mouse_position_as_dirty(struct vt_device *vd) { term_rect_t area; struct vt_window *vw; struct vt_font *vf; + int x, y; vw = vd->vd_curwindow; vf = vw->vw_font; + x = vd->vd_mx_drawn; + y = vd->vd_my_drawn; + if (vf != NULL) { area.tr_begin.tp_col = (x - vw->vw_offset.tp_col) / vf->vf_width; @@ -897,9 +927,8 @@ vt_flush(struct vt_device *vd) term_rect_t tarea; term_pos_t size; term_char_t *r; - int cursor_displayed; #ifndef SC_NO_CUTPASTE - int bpl, h, w; + int cursor_was_shown, cursor_moved, bpl, h, w; #endif vw = vd->vd_curwindow; @@ -913,34 +942,42 @@ vt_flush(struct vt_device *vd) if (((vd->vd_flags & VDF_TEXTMODE) == 0) && (vf == NULL)) return; - cursor_displayed = 0; - #ifndef SC_NO_CUTPASTE + cursor_was_shown = vd->vd_mshown; + cursor_moved = (vd->vd_mx != vd->vd_mx_drawn || + vd->vd_my != vd->vd_my_drawn); + + /* Check if the cursor should be displayed or not. */ if ((vd->vd_flags & VDF_MOUSECURSOR) && /* Mouse support enabled. */ - !(vw->vw_flags & VWF_MOUSE_HIDE)) { /* Cursor displayed. */ - if (vd->vd_moldx != vd->vd_mx || - vd->vd_moldy != vd->vd_my) { - /* Mark last mouse position as dirty to erase. */ - vt_mark_mouse_position_as_dirty(vd, - vd->vd_moldx, vd->vd_moldy); + !(vw->vw_flags & VWF_MOUSE_HIDE) && /* Cursor displayed. */ + !kdb_active && panicstr == NULL) { /* DDB inactive. */ + vd->vd_mshown = 1; + } else { + vd->vd_mshown = 0; + } - /* - * Save point of last mouse cursor to erase it - * later. - */ - vd->vd_moldx = vd->vd_mx; - vd->vd_moldy = vd->vd_my; - } + /* + * If the cursor changed display state or moved, we must mark + * the old position as dirty, so that it's erased. + */ + if (cursor_was_shown != vd->vd_mshown || + (vd->vd_mshown && cursor_moved)) + vt_mark_mouse_position_as_dirty(vd); - if (!kdb_active && panicstr == NULL) { - /* Mouse enabled, and DDB isn't active. */ - cursor_displayed = 1; + /* + * Save position of the mouse cursor. It's used by backends to + * know where to draw the cursor and during the next refresh to + * erase the previous position. + */ + vd->vd_mx_drawn = vd->vd_mx; + vd->vd_my_drawn = vd->vd_my; - /* Mark new mouse position as dirty. */ - vt_mark_mouse_position_as_dirty(vd, - vd->vd_mx, vd->vd_my); - } - } + /* + * If the cursor is displayed and has moved since last refresh, + * mark the new position as dirty. + */ + if (vd->vd_mshown && cursor_moved) + vt_mark_mouse_position_as_dirty(vd); #endif vtbuf_undirty(&vw->vw_buf, &tarea, &tmask); @@ -957,8 +994,7 @@ vt_flush(struct vt_device *vd) if (vd->vd_driver->vd_bitblt_text != NULL) { if (tarea.tr_begin.tp_col < tarea.tr_end.tp_col) { - vd->vd_driver->vd_bitblt_text(vd, vw, &tarea, - cursor_displayed); + vd->vd_driver->vd_bitblt_text(vd, vw, &tarea); } } else { /* @@ -980,7 +1016,7 @@ vt_flush(struct vt_device *vd) } #ifndef SC_NO_CUTPASTE - if (cursor_displayed) { + if (vd->vd_mshown) { /* Bytes per source line. */ bpl = (vd->vd_mcursor->width + 7) >> 3; w = vd->vd_mcursor->width; @@ -1640,7 +1676,7 @@ vt_mouse_state(int show) } /* Mark mouse position as dirty. */ - vt_mark_mouse_position_as_dirty(vd, vd->vd_mx, vd->vd_my); + vt_mark_mouse_position_as_dirty(vd); } #endif From owner-svn-src-all@FreeBSD.ORG Sat Aug 23 11:51:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5729621E; Sat, 23 Aug 2014 11:51:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 435F03C99; Sat, 23 Aug 2014 11:51:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NBpl08070877; Sat, 23 Aug 2014 11:51:47 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NBploo070876; Sat, 23 Aug 2014 11:51:47 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408231151.s7NBploo070876@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 23 Aug 2014 11:51:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270405 - head/usr.sbin/autofs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 11:51:47 -0000 Author: trasz Date: Sat Aug 23 11:51:46 2014 New Revision: 270405 URL: http://svnweb.freebsd.org/changeset/base/270405 Log: Don't fail on executable maps that return no entries. This turns useless error message into useful one. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/autofs/common.c Modified: head/usr.sbin/autofs/common.c ============================================================================== --- head/usr.sbin/autofs/common.c Sat Aug 23 11:46:52 2014 (r270404) +++ head/usr.sbin/autofs/common.c Sat Aug 23 11:51:46 2014 (r270405) @@ -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 owner-svn-src-all@FreeBSD.ORG Sat Aug 23 12:00:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B7240607; Sat, 23 Aug 2014 12:00:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97FEE3D6C; Sat, 23 Aug 2014 12:00:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NC0kJN073898; Sat, 23 Aug 2014 12:00:46 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NC0jRd073894; Sat, 23 Aug 2014 12:00:45 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408231200.s7NC0jRd073894@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 23 Aug 2014 12:00:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270406 - in head: etc usr.sbin/autofs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 12:00:46 -0000 Author: trasz Date: Sat Aug 23 12:00:45 2014 New Revision: 270406 URL: http://svnweb.freebsd.org/changeset/base/270406 Log: Add "nobrowse" option. Previously automountd(8) always behaved as if it was set, now it's conditional. PR: 192862 MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/etc/auto_master head/usr.sbin/autofs/auto_master.5 head/usr.sbin/autofs/automountd.c head/usr.sbin/autofs/common.c Modified: head/etc/auto_master ============================================================================== --- head/etc/auto_master Sat Aug 23 11:51:46 2014 (r270405) +++ head/etc/auto_master Sat Aug 23 12:00:45 2014 (r270406) @@ -2,4 +2,4 @@ # # Automounter master map, see auto_master(5) for details. # -/net -hosts -nosuid +/net -hosts -nobrowse,nosuid Modified: head/usr.sbin/autofs/auto_master.5 ============================================================================== --- head/usr.sbin/autofs/auto_master.5 Sat Aug 23 11:51:46 2014 (r270405) +++ head/usr.sbin/autofs/auto_master.5 Sat Aug 23 12:00:45 2014 (r270406) @@ -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: head/usr.sbin/autofs/automountd.c ============================================================================== --- head/usr.sbin/autofs/automountd.c Sat Aug 23 11:51:46 2014 (r270405) +++ head/usr.sbin/autofs/automountd.c Sat Aug 23 12:00:45 2014 (r270406) @@ -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: head/usr.sbin/autofs/common.c ============================================================================== --- head/usr.sbin/autofs/common.c Sat Aug 23 11:51:46 2014 (r270405) +++ head/usr.sbin/autofs/common.c Sat Aug 23 12:00:45 2014 (r270406) @@ -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 owner-svn-src-all@FreeBSD.ORG Sat Aug 23 13:09:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AEE597E2; Sat, 23 Aug 2014 13:09:55 +0000 (UTC) Received: from darkthrone.kvedulv.de (darkthrone.kvedulv.de [IPv6:2001:1578:400:101::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "darkthrone.kvedulv.de", Issuer "Gandi Standard SSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6F2C832C2; Sat, 23 Aug 2014 13:09:55 +0000 (UTC) Received: by darkthrone.kvedulv.de (Postfix, from userid 666) id C47751691; Sat, 23 Aug 2014 15:09:50 +0200 (CEST) Date: Sat, 23 Aug 2014 15:09:50 +0200 From: Michael Moll To: Konstantin Belousov Subject: Re: svn commit: r270201 - in head/sys: powerpc/include sys Message-ID: <20140823130950.GA47512@darkthrone.kvedulv.de> References: <201408200802.s7K82cJ6059609@svn.freebsd.org> <20140820082700.GY2737@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140820082700.GY2737@kib.kiev.ua> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, sparc64@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 13:09:55 -0000 Hi, On Wed, Aug 20, 2014 at 11:27:00AM +0300, Konstantin Belousov wrote: > Could someone with the machine identified as SPARC64V test the following > patch ? Just booting multiuser should be enough. > > diff --git a/sys/sparc64/include/vmparam.h b/sys/sparc64/include/vmparam.h > index 8e7d76c..c2f30c3 100644 > --- a/sys/sparc64/include/vmparam.h > +++ b/sys/sparc64/include/vmparam.h > @@ -241,5 +241,8 @@ extern vm_offset_t vm_max_kernel_address; > > #define SFBUF > #define SFBUF_MAP > +#define SFBUF_OPTIONAL_DIRECT_MAP dcache_color_ignore > +#include > +#define SFBUF_PHYS_DMAP(x) TLB_PHYS_TO_DIRECT(x) > > #endif /* !_MACHINE_VMPARAM_H_ */ Works for me. :) Regards -- Michael Moll From owner-svn-src-all@FreeBSD.ORG Sat Aug 23 14:42:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5481C326; Sat, 23 Aug 2014 14:42:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E1043A6C; Sat, 23 Aug 2014 14:42:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NEgohH054714; Sat, 23 Aug 2014 14:42:50 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NEgou7054711; Sat, 23 Aug 2014 14:42:50 GMT (envelope-from des@FreeBSD.org) Message-Id: <201408231442.s7NEgou7054711@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Sat, 23 Aug 2014 14:42:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270408 - stable/10/share/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 14:42:50 -0000 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 owner-svn-src-all@FreeBSD.ORG Sat Aug 23 14:42:53 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD1B9446; Sat, 23 Aug 2014 14:42:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9826B3A6D; Sat, 23 Aug 2014 14:42:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NEgrl8054765; Sat, 23 Aug 2014 14:42:53 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NEgrm0054764; Sat, 23 Aug 2014 14:42:53 GMT (envelope-from des@FreeBSD.org) Message-Id: <201408231442.s7NEgrm0054764@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Sat, 23 Aug 2014 14:42:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r270409 - stable/9/share/mk X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 14:42:53 -0000 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 owner-svn-src-all@FreeBSD.ORG Sat Aug 23 15:00:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C19C8D06; Sat, 23 Aug 2014 15:00:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC1263C4C; Sat, 23 Aug 2014 15:00:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NF0mBx061287; Sat, 23 Aug 2014 15:00:48 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NF0lpW061281; Sat, 23 Aug 2014 15:00:47 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201408231500.s7NF0lpW061281@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Sat, 23 Aug 2014 15:00:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270411 - in head/sys: dev/vt/hw/efifb dev/vt/hw/fb powerpc/ps3 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 15:00:48 -0000 Author: dumbbell Date: Sat Aug 23 15:00:47 2014 New Revision: 270411 URL: http://svnweb.freebsd.org/changeset/base/270411 Log: vt_fb: Implement vd_bitblt_text_t for vt_fb and derivatives MFC after: 1 week Modified: head/sys/dev/vt/hw/efifb/efifb.c head/sys/dev/vt/hw/fb/vt_early_fb.c head/sys/dev/vt/hw/fb/vt_fb.c head/sys/dev/vt/hw/fb/vt_fb.h head/sys/powerpc/ps3/ps3_syscons.c Modified: head/sys/dev/vt/hw/efifb/efifb.c ============================================================================== --- head/sys/dev/vt/hw/efifb/efifb.c Sat Aug 23 14:58:31 2014 (r270410) +++ head/sys/dev/vt/hw/efifb/efifb.c Sat Aug 23 15:00:47 2014 (r270411) @@ -60,7 +60,7 @@ static struct vt_driver vt_efifb_driver .vd_probe = vt_efifb_probe, .vd_init = vt_efifb_init, .vd_blank = vt_fb_blank, - .vd_bitbltchr = vt_fb_bitbltchr, + .vd_bitblt_text = vt_fb_bitblt_text, .vd_fb_ioctl = vt_fb_ioctl, .vd_fb_mmap = vt_fb_mmap, /* Better than VGA, but still generic driver. */ Modified: head/sys/dev/vt/hw/fb/vt_early_fb.c ============================================================================== --- head/sys/dev/vt/hw/fb/vt_early_fb.c Sat Aug 23 14:58:31 2014 (r270410) +++ head/sys/dev/vt/hw/fb/vt_early_fb.c Sat Aug 23 15:00:47 2014 (r270411) @@ -59,7 +59,7 @@ static struct vt_driver vt_fb_early_driv .vd_probe = vt_efb_probe, .vd_init = vt_efb_init, .vd_blank = vt_fb_blank, - .vd_bitbltchr = vt_fb_bitbltchr, + .vd_bitblt_text = vt_fb_bitblt_text, .vd_priority = VD_PRIORITY_GENERIC, }; Modified: head/sys/dev/vt/hw/fb/vt_fb.c ============================================================================== --- head/sys/dev/vt/hw/fb/vt_fb.c Sat Aug 23 14:58:31 2014 (r270410) +++ head/sys/dev/vt/hw/fb/vt_fb.c Sat Aug 23 15:00:47 2014 (r270411) @@ -41,15 +41,14 @@ __FBSDID("$FreeBSD$"); #include #include -void vt_fb_drawrect(struct vt_device *vd, int x1, int y1, int x2, int y2, - int fill, term_color_t color); -void vt_fb_setpixel(struct vt_device *vd, int x, int y, term_color_t color); +static vd_drawrect_t vt_fb_drawrect; +static vd_setpixel_t vt_fb_setpixel; static struct vt_driver vt_fb_driver = { .vd_name = "fb", .vd_init = vt_fb_init, .vd_blank = vt_fb_blank, - .vd_bitbltchr = vt_fb_bitbltchr, + .vd_bitblt_text = vt_fb_bitblt_text, .vd_drawrect = vt_fb_drawrect, .vd_setpixel = vt_fb_setpixel, .vd_postswitch = vt_fb_postswitch, @@ -146,7 +145,7 @@ vt_fb_mmap(struct vt_device *vd, vm_ooff return (EINVAL); } -void +static void vt_fb_setpixel(struct vt_device *vd, int x, int y, term_color_t color) { struct fb_info *info; @@ -181,7 +180,7 @@ vt_fb_setpixel(struct vt_device *vd, int } -void +static void vt_fb_drawrect(struct vt_device *vd, int x1, int y1, int x2, int y2, int fill, term_color_t color) { @@ -243,14 +242,15 @@ vt_fb_blank(struct vt_device *vd, term_c } } -void -vt_fb_bitbltchr(struct vt_device *vd, const uint8_t *src, const uint8_t *mask, - int bpl, vt_axis_t top, vt_axis_t left, unsigned int width, - unsigned int height, term_color_t fg, term_color_t bg) +static void +vt_fb_bitblt_bitmap(struct vt_device *vd, const struct vt_window *vw, + const uint8_t *pattern, const uint8_t *mask, + unsigned int width, unsigned int height, + unsigned int x, unsigned int y, term_color_t fg, term_color_t bg) { struct fb_info *info; uint32_t fgc, bgc, cc, o; - int c, l, bpp; + int c, l, bpp, bpl; u_long line; uint8_t b, m; const uint8_t *ch; @@ -260,19 +260,18 @@ vt_fb_bitbltchr(struct vt_device *vd, co fgc = info->fb_cmap[fg]; bgc = info->fb_cmap[bg]; b = m = 0; - if (bpl == 0) - bpl = (width + 7) >> 3; /* Bytes per sorce line. */ + bpl = (width + 7) >> 3; /* Bytes per source line. */ /* Don't try to put off screen pixels */ - if (((left + width) > info->fb_width) || ((top + height) > + if (((x + width) > info->fb_width) || ((y + height) > info->fb_height)) return; KASSERT((info->fb_vbase != 0), ("Unmapped framebuffer")); - line = (info->fb_stride * top) + (left * bpp); + line = (info->fb_stride * y) + (x * bpp); for (l = 0; l < height; l++) { - ch = src; + ch = pattern; for (c = 0; c < width; c++) { if (c % 8 == 0) b = *ch++; @@ -312,8 +311,62 @@ vt_fb_bitbltchr(struct vt_device *vd, co } } line += info->fb_stride; - src += bpl; + pattern += bpl; + } +} + +void +vt_fb_bitblt_text(struct vt_device *vd, const struct vt_window *vw, + const term_rect_t *area) +{ + unsigned int col, row, x, y; + struct vt_font *vf; + term_char_t c; + term_color_t fg, bg; + const uint8_t *pattern; + + vf = vw->vw_font; + + for (row = area->tr_begin.tp_row; row < area->tr_end.tp_row; ++row) { + for (col = area->tr_begin.tp_col; col < area->tr_end.tp_col; + ++col) { + x = col * vf->vf_width + vw->vw_offset.tp_col; + y = row * vf->vf_height + vw->vw_offset.tp_row; + + c = VTBUF_GET_FIELD(&vw->vw_buf, row, col); + pattern = vtfont_lookup(vf, c); + vt_determine_colors(c, + VTBUF_ISCURSOR(&vw->vw_buf, row, col), &fg, &bg); + + vt_fb_bitblt_bitmap(vd, vw, + pattern, NULL, vf->vf_width, vf->vf_height, + x, y, fg, bg); + } + } + +#ifndef SC_NO_CUTPASTE + if (!vd->vd_mshown) + return; + + term_rect_t drawn_area; + + drawn_area.tr_begin.tp_col = area->tr_begin.tp_col * vf->vf_width + + vw->vw_offset.tp_col; + drawn_area.tr_begin.tp_row = area->tr_begin.tp_row * vf->vf_height + + vw->vw_offset.tp_row; + drawn_area.tr_end.tp_col = area->tr_end.tp_col * vf->vf_width + + vw->vw_offset.tp_col; + drawn_area.tr_end.tp_row = area->tr_end.tp_row * vf->vf_height + + vw->vw_offset.tp_row; + + if (vt_is_cursor_in_area(vd, &drawn_area)) { + vt_fb_bitblt_bitmap(vd, vw, + vd->vd_mcursor->map, vd->vd_mcursor->mask, + vd->vd_mcursor->width, vd->vd_mcursor->height, + vd->vd_mx_drawn, vd->vd_my_drawn, + vd->vd_mcursor_fg, vd->vd_mcursor_bg); } +#endif } void Modified: head/sys/dev/vt/hw/fb/vt_fb.h ============================================================================== --- head/sys/dev/vt/hw/fb/vt_fb.h Sat Aug 23 14:58:31 2014 (r270410) +++ head/sys/dev/vt/hw/fb/vt_fb.h Sat Aug 23 15:00:47 2014 (r270411) @@ -36,11 +36,11 @@ int vt_fb_attach(struct fb_info *info); void vt_fb_resume(void); void vt_fb_suspend(void); -vd_init_t vt_fb_init; -vd_blank_t vt_fb_blank; -vd_bitbltchr_t vt_fb_bitbltchr; -vd_postswitch_t vt_fb_postswitch; -vd_fb_ioctl_t vt_fb_ioctl; -vd_fb_mmap_t vt_fb_mmap; +vd_init_t vt_fb_init; +vd_blank_t vt_fb_blank; +vd_bitblt_text_t vt_fb_bitblt_text; +vd_postswitch_t vt_fb_postswitch; +vd_fb_ioctl_t vt_fb_ioctl; +vd_fb_mmap_t vt_fb_mmap; #endif /* _DEV_VT_HW_FB_VT_FB_H_ */ Modified: head/sys/powerpc/ps3/ps3_syscons.c ============================================================================== --- head/sys/powerpc/ps3/ps3_syscons.c Sat Aug 23 14:58:31 2014 (r270410) +++ head/sys/powerpc/ps3/ps3_syscons.c Sat Aug 23 15:00:47 2014 (r270411) @@ -76,7 +76,7 @@ static struct vt_driver vt_ps3fb_driver .vd_probe = ps3fb_probe, .vd_init = ps3fb_init, .vd_blank = vt_fb_blank, - .vd_bitbltchr = vt_fb_bitbltchr, + .vd_bitblt_text = vt_fb_bitblt_text, .vd_fb_ioctl = vt_fb_ioctl, .vd_fb_mmap = vt_fb_mmap, /* Better than VGA, but still generic driver. */ From owner-svn-src-all@FreeBSD.ORG Sat Aug 23 15:04:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1B6BBA9; Sat, 23 Aug 2014 15:04:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 06B153C6B; Sat, 23 Aug 2014 15:04:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NF4Kmr065162; Sat, 23 Aug 2014 15:04:20 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NF4KpC065161; Sat, 23 Aug 2014 15:04:20 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201408231504.s7NF4KpC065161@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Sat, 23 Aug 2014 15:04:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270412 - head/sys/dev/fb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 15:04:21 -0000 Author: dumbbell Date: Sat Aug 23 15:04:20 2014 New Revision: 270412 URL: http://svnweb.freebsd.org/changeset/base/270412 Log: creator_fb: Implement vd_bitblt_text_t MFC after: 1 week Modified: head/sys/dev/fb/creator_vt.c Modified: head/sys/dev/fb/creator_vt.c ============================================================================== --- head/sys/dev/fb/creator_vt.c Sat Aug 23 15:00:47 2014 (r270411) +++ head/sys/dev/fb/creator_vt.c Sat Aug 23 15:04:20 2014 (r270412) @@ -45,14 +45,14 @@ __FBSDID("$FreeBSD$"); static vd_probe_t creatorfb_probe; static vd_init_t creatorfb_init; static vd_blank_t creatorfb_blank; -static vd_bitbltchr_t creatorfb_bitbltchr; +static vd_bitblt_text_t creatorfb_bitblt_text; static const struct vt_driver vt_creatorfb_driver = { .vd_name = "creatorfb", .vd_probe = creatorfb_probe, .vd_init = creatorfb_init, .vd_blank = creatorfb_blank, - .vd_bitbltchr = creatorfb_bitbltchr, + .vd_bitblt_text = creatorfb_bitblt_text, .vd_fb_ioctl = vt_fb_ioctl, .vd_fb_mmap = vt_fb_mmap, .vd_priority = VD_PRIORITY_SPECIFIC @@ -176,9 +176,10 @@ creatorfb_blank(struct vt_device *vd, te } static void -creatorfb_bitbltchr(struct vt_device *vd, const uint8_t *src, - const uint8_t *mask, int bpl, vt_axis_t top, vt_axis_t left, - unsigned int width, unsigned int height, term_color_t fg, term_color_t bg) +creatorfb_bitblt_bitmap(struct vt_device *vd, const struct vt_window *vw, + const uint8_t *pattern, const uint8_t *mask, + unsigned int width, unsigned int height, + unsigned int x, unsigned int y, term_color_t fg, term_color_t bg) { struct creatorfb_softc *sc = vd->vd_softc; u_long line; @@ -191,15 +192,15 @@ creatorfb_bitbltchr(struct vt_device *vd b = m = 0; /* Don't try to put off screen pixels */ - if (((left + width) > vd->vd_width) || ((top + height) > + if (((x + width) > vd->vd_width) || ((y + height) > vd->vd_height)) return; - line = (sc->fb.fb_stride * top) + 4*left; + line = (sc->fb.fb_stride * y) + 4*x; for (; height > 0; height--) { for (c = 0; c < width; c++) { if (c % 8 == 0) - b = *src++; + b = *pattern++; else b <<= 1; if (mask != NULL) { @@ -218,3 +219,56 @@ creatorfb_bitbltchr(struct vt_device *vd } } +void +creatorfb_bitblt_text(struct vt_device *vd, const struct vt_window *vw, + const term_rect_t *area) +{ + unsigned int col, row, x, y; + struct vt_font *vf; + term_char_t c; + term_color_t fg, bg; + const uint8_t *pattern; + + vf = vw->vw_font; + + for (row = area->tr_begin.tp_row; row < area->tr_end.tp_row; ++row) { + for (col = area->tr_begin.tp_col; col < area->tr_end.tp_col; + ++col) { + x = col * vf->vf_width + vw->vw_offset.tp_col; + y = row * vf->vf_height + vw->vw_offset.tp_row; + + c = VTBUF_GET_FIELD(&vw->vw_buf, row, col); + pattern = vtfont_lookup(vf, c); + vt_determine_colors(c, + VTBUF_ISCURSOR(&vw->vw_buf, row, col), &fg, &bg); + + creatorfb_bitblt_bitmap(vd, vw, + pattern, NULL, vf->vf_width, vf->vf_height, + x, y, fg, bg); + } + } + +#ifndef SC_NO_CUTPASTE + if (!vd->vd_mshown) + return; + + term_rect_t drawn_area; + + drawn_area.tr_begin.tp_col = area->tr_begin.tp_col * vf->vf_width + + vw->vw_offset.tp_col; + drawn_area.tr_begin.tp_row = area->tr_begin.tp_row * vf->vf_height + + vw->vw_offset.tp_row; + drawn_area.tr_end.tp_col = area->tr_end.tp_col * vf->vf_width + + vw->vw_offset.tp_col; + drawn_area.tr_end.tp_row = area->tr_end.tp_row * vf->vf_height + + vw->vw_offset.tp_row; + + if (vt_is_cursor_in_area(vd, &drawn_area)) { + creatorfb_bitblt_bitmap(vd, vw, + vd->vd_mcursor->map, vd->vd_mcursor->mask, + vd->vd_mcursor->width, vd->vd_mcursor->height, + vd->vd_mx_drawn, vd->vd_my_drawn, + vd->vd_mcursor_fg, vd->vd_mcursor_bg); + } +#endif +} From owner-svn-src-all@FreeBSD.ORG Sat Aug 23 15:05:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E26EC1EE; Sat, 23 Aug 2014 15:05:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CDE623C75; Sat, 23 Aug 2014 15:05:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NF5B7Y065337; Sat, 23 Aug 2014 15:05:11 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NF5B9j065336; Sat, 23 Aug 2014 15:05:11 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201408231505.s7NF5B9j065336@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Sat, 23 Aug 2014 15:05:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270413 - head/sys/dev/vt/hw/ofwfb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 15:05:12 -0000 Author: dumbbell Date: Sat Aug 23 15:05:11 2014 New Revision: 270413 URL: http://svnweb.freebsd.org/changeset/base/270413 Log: ofwfb: Implement vd_bitblt_text_t MFC after: 1 week Modified: head/sys/dev/vt/hw/ofwfb/ofwfb.c Modified: head/sys/dev/vt/hw/ofwfb/ofwfb.c ============================================================================== --- head/sys/dev/vt/hw/ofwfb/ofwfb.c Sat Aug 23 15:04:20 2014 (r270412) +++ head/sys/dev/vt/hw/ofwfb/ofwfb.c Sat Aug 23 15:05:11 2014 (r270413) @@ -58,14 +58,14 @@ struct ofwfb_softc { static vd_probe_t ofwfb_probe; static vd_init_t ofwfb_init; -static vd_bitbltchr_t ofwfb_bitbltchr; +static vd_bitblt_text_t ofwfb_bitblt_text; static const struct vt_driver vt_ofwfb_driver = { .vd_name = "ofwfb", .vd_probe = ofwfb_probe, .vd_init = ofwfb_init, .vd_blank = vt_fb_blank, - .vd_bitbltchr = ofwfb_bitbltchr, + .vd_bitblt_text = ofwfb_bitblt_text, .vd_fb_ioctl = vt_fb_ioctl, .vd_fb_mmap = vt_fb_mmap, .vd_priority = VD_PRIORITY_GENERIC+1, @@ -100,9 +100,10 @@ ofwfb_probe(struct vt_device *vd) } static void -ofwfb_bitbltchr(struct vt_device *vd, const uint8_t *src, const uint8_t *mask, - int bpl, vt_axis_t top, vt_axis_t left, unsigned int width, - unsigned int height, term_color_t fg, term_color_t bg) +ofwfb_bitblt_bitmap(struct vt_device *vd, const struct vt_window *vw, + const uint8_t *pattern, const uint8_t *mask, + unsigned int width, unsigned int height, + unsigned int x, unsigned int y, term_color_t fg, term_color_t bg) { struct fb_info *sc = vd->vd_softc; u_long line; @@ -119,15 +120,15 @@ ofwfb_bitbltchr(struct vt_device *vd, co b = m = 0; /* Don't try to put off screen pixels */ - if (((left + width) > vd->vd_width) || ((top + height) > + if (((x + width) > vd->vd_width) || ((y + height) > vd->vd_height)) return; - line = (sc->fb_stride * top) + left * sc->fb_bpp/8; + line = (sc->fb_stride * y) + x * sc->fb_bpp/8; if (mask == NULL && sc->fb_bpp == 8 && (width % 8 == 0)) { for (; height > 0; height--) { for (c = 0; c < width; c += 8) { - b = *src++; + b = *pattern++; /* * Assume that there is more background than @@ -160,7 +161,7 @@ ofwfb_bitbltchr(struct vt_device *vd, co for (; height > 0; height--) { for (c = 0; c < width; c++) { if (c % 8 == 0) - b = *src++; + b = *pattern++; else b <<= 1; if (mask != NULL) { @@ -191,6 +192,60 @@ ofwfb_bitbltchr(struct vt_device *vd, co } } +void +ofwfb_bitblt_text(struct vt_device *vd, const struct vt_window *vw, + const term_rect_t *area) +{ + unsigned int col, row, x, y; + struct vt_font *vf; + term_char_t c; + term_color_t fg, bg; + const uint8_t *pattern; + + vf = vw->vw_font; + + for (row = area->tr_begin.tp_row; row < area->tr_end.tp_row; ++row) { + for (col = area->tr_begin.tp_col; col < area->tr_end.tp_col; + ++col) { + x = col * vf->vf_width + vw->vw_offset.tp_col; + y = row * vf->vf_height + vw->vw_offset.tp_row; + + c = VTBUF_GET_FIELD(&vw->vw_buf, row, col); + pattern = vtfont_lookup(vf, c); + vt_determine_colors(c, + VTBUF_ISCURSOR(&vw->vw_buf, row, col), &fg, &bg); + + ofwfb_bitblt_bitmap(vd, vw, + pattern, NULL, vf->vf_width, vf->vf_height, + x, y, fg, bg); + } + } + +#ifndef SC_NO_CUTPASTE + if (!vd->vd_mshown) + return; + + term_rect_t drawn_area; + + drawn_area.tr_begin.tp_col = area->tr_begin.tp_col * vf->vf_width + + vw->vw_offset.tp_col; + drawn_area.tr_begin.tp_row = area->tr_begin.tp_row * vf->vf_height + + vw->vw_offset.tp_row; + drawn_area.tr_end.tp_col = area->tr_end.tp_col * vf->vf_width + + vw->vw_offset.tp_col; + drawn_area.tr_end.tp_row = area->tr_end.tp_row * vf->vf_height + + vw->vw_offset.tp_row; + + if (vt_is_cursor_in_area(vd, &drawn_area)) { + ofwfb_bitblt_bitmap(vd, vw, + vd->vd_mcursor->map, vd->vd_mcursor->mask, + vd->vd_mcursor->width, vd->vd_mcursor->height, + vd->vd_mx_drawn, vd->vd_my_drawn, + vd->vd_mcursor_fg, vd->vd_mcursor_bg); + } +#endif +} + static void ofwfb_initialize(struct vt_device *vd) { From owner-svn-src-all@FreeBSD.ORG Sat Aug 23 15:07:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E99C434D; Sat, 23 Aug 2014 15:07:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D48793C88; Sat, 23 Aug 2014 15:07:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NF7230065607; Sat, 23 Aug 2014 15:07:02 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NF72fB065606; Sat, 23 Aug 2014 15:07:02 GMT (envelope-from des@FreeBSD.org) Message-Id: <201408231507.s7NF72fB065606@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Sat, 23 Aug 2014 15:07:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r270414 - in stable/9: . contrib/lukemftpd libexec/lukemftpd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 15:07:03 -0000 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 owner-svn-src-all@FreeBSD.ORG Sat Aug 23 15:07:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CD5CA47C; Sat, 23 Aug 2014 15:07:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B8C0B3C8E; Sat, 23 Aug 2014 15:07:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NF79E5065679; Sat, 23 Aug 2014 15:07:09 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NF792i065678; Sat, 23 Aug 2014 15:07:09 GMT (envelope-from des@FreeBSD.org) Message-Id: <201408231507.s7NF792i065678@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Sat, 23 Aug 2014 15:07:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270415 - in stable/10: . contrib/lukemftpd libexec/lukemftpd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 15:07:09 -0000 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 owner-svn-src-all@FreeBSD.ORG Sat Aug 23 15:54:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 28A157AE; Sat, 23 Aug 2014 15:54:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 146A3308D; Sat, 23 Aug 2014 15:54:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NFsM5d088284; Sat, 23 Aug 2014 15:54:22 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NFsMkW088283; Sat, 23 Aug 2014 15:54:22 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201408231554.s7NFsMkW088283@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 23 Aug 2014 15:54:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270416 - head/contrib/libc++/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 15:54:23 -0000 Author: dim Date: Sat Aug 23 15:54:22 2014 New Revision: 270416 URL: http://svnweb.freebsd.org/changeset/base/270416 Log: 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@pinyon.org PR: base/192139 MFC after: 3 days Modified: head/contrib/libc++/include/type_traits Modified: head/contrib/libc++/include/type_traits ============================================================================== --- head/contrib/libc++/include/type_traits Sat Aug 23 15:07:09 2014 (r270415) +++ head/contrib/libc++/include/type_traits Sat Aug 23 15:54:22 2014 (r270416) @@ -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 owner-svn-src-all@FreeBSD.ORG Sat Aug 23 15:59:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A36CA1F; Sat, 23 Aug 2014 15:59:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3631330C2; Sat, 23 Aug 2014 15:59:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NFxW2C089264; Sat, 23 Aug 2014 15:59:32 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NFxWIi089263; Sat, 23 Aug 2014 15:59:32 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201408231559.s7NFxWIi089263@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 23 Aug 2014 15:59:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270417 - head/release/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 15:59:32 -0000 Author: gjb Date: Sat Aug 23 15:59:31 2014 New Revision: 270417 URL: http://svnweb.freebsd.org/changeset/base/270417 Log: Fix arm build breakage when building stable/10 on head/. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/arm/release.sh Modified: head/release/arm/release.sh ============================================================================== --- head/release/arm/release.sh Sat Aug 23 15:54:22 2014 (r270416) +++ head/release/arm/release.sh Sat Aug 23 15:59:31 2014 (r270417) @@ -92,6 +92,10 @@ install_uboot() { } main() { + # Fix broken ports that use kern.osreldate. + OSVERSION=$(chroot ${CHROOTDIR} /usr/bin/uname -U) + export OSVERSION + # Build the 'xdev' target for crochet. eval chroot ${CHROOTDIR} make -C /usr/src \ ${XDEV_FLAGS} XDEV=${XDEV} XDEV_ARCH=${XDEV_ARCH} \ From owner-svn-src-all@FreeBSD.ORG Sat Aug 23 16:11:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 533762A2; Sat, 23 Aug 2014 16:11:31 +0000 (UTC) Received: from mail-pa0-x22c.google.com (mail-pa0-x22c.google.com [IPv6:2607:f8b0:400e:c03::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 16A6D3259; Sat, 23 Aug 2014 16:11:31 +0000 (UTC) Received: by mail-pa0-f44.google.com with SMTP id eu11so18261687pac.31 for ; Sat, 23 Aug 2014 09:11:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=BWH0VyfmFd56hREm3x3S5fLMiw2jve//8YjwuWr4wgo=; b=wHnOLMrjrJ7Bb/nJCg5IALPx5Id4vTbVi8+140h36ZC+GTdg1d/S/kJ8q6roQn/DRh DEA9/NgKzeyIB8m5VFL2sN6f52WVEmsaImEoWjmoKpBl7Nnzkj84zmecu6dKI1w/0/wM hSYzdXukkrxueV0ATqkloY7M/5rGT006es+/ALWCrLlVpKNUKjGZSrfnpGSpX1wB1pPQ w3RKd6SkTFNb2MhiPSHIvfO7EtWSvYIygkWSpyOuKYjuKY2gVV4HsgEPoPtB+47QssjJ nIB51/V/Mjrty8yQ2WAPkf27sqlMNoyVyqyJzQyLY/GFjCtrAzvjxfJB/DYQEyRd4dx9 1HtQ== X-Received: by 10.68.241.138 with SMTP id wi10mr14615913pbc.126.1408810290692; Sat, 23 Aug 2014 09:11:30 -0700 (PDT) Received: from [192.168.1.7] (ppp59-167-128-11.static.internode.on.net. [59.167.128.11]) by mx.google.com with ESMTPSA id q5sm48956059pdf.70.2014.08.23.09.11.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 23 Aug 2014 09:11:30 -0700 (PDT) Sender: Kubilay Kocak Message-ID: <53F8BD29.7070901@FreeBSD.org> Date: Sun, 24 Aug 2014 02:11:21 +1000 From: Kubilay Kocak Reply-To: koobs@FreeBSD.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:32.0) Gecko/20100101 Thunderbird/32.0 MIME-Version: 1.0 To: Glen Barber , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r270417 - head/release/arm References: <201408231559.s7NFxWIi089263@svn.freebsd.org> In-Reply-To: <201408231559.s7NFxWIi089263@svn.freebsd.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 16:11:31 -0000 On 24/08/2014 1:59 AM, Glen Barber wrote: > Author: gjb > Date: Sat Aug 23 15:59:31 2014 > New Revision: 270417 > URL: http://svnweb.freebsd.org/changeset/base/270417 > > Log: > Fix arm build breakage when building stable/10 on > head/. > > MFC after: 3 days > Sponsored by: The FreeBSD Foundation > > Modified: > head/release/arm/release.sh > > Modified: head/release/arm/release.sh > ============================================================================== > --- head/release/arm/release.sh Sat Aug 23 15:54:22 2014 (r270416) > +++ head/release/arm/release.sh Sat Aug 23 15:59:31 2014 (r270417) > @@ -92,6 +92,10 @@ install_uboot() { > } > > main() { > + # Fix broken ports that use kern.osreldate. > + OSVERSION=$(chroot ${CHROOTDIR} /usr/bin/uname -U) > + export OSVERSION > + > # Build the 'xdev' target for crochet. > eval chroot ${CHROOTDIR} make -C /usr/src \ > ${XDEV_FLAGS} XDEV=${XDEV} XDEV_ARCH=${XDEV_ARCH} \ > _______________________________________________ > svn-src-head@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > Is this an individual port issue, or a ports framework issue? What should broken ports use? From owner-svn-src-all@FreeBSD.ORG Sat Aug 23 16:13:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from hub.FreeBSD.org (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B41E84FE; Sat, 23 Aug 2014 16:13:38 +0000 (UTC) Date: Sat, 23 Aug 2014 12:13:35 -0400 From: Glen Barber To: Kubilay Kocak Subject: Re: svn commit: r270417 - head/release/arm Message-ID: <20140823161335.GF43778@hub.FreeBSD.org> References: <201408231559.s7NFxWIi089263@svn.freebsd.org> <53F8BD29.7070901@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="UBYeLQbK9sqbzZRV" Content-Disposition: inline In-Reply-To: <53F8BD29.7070901@FreeBSD.org> X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 16:13:39 -0000 --UBYeLQbK9sqbzZRV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Aug 24, 2014 at 02:11:21AM +1000, Kubilay Kocak wrote: > On 24/08/2014 1:59 AM, Glen Barber wrote: > > Author: gjb > > Date: Sat Aug 23 15:59:31 2014 > > New Revision: 270417 > > URL: http://svnweb.freebsd.org/changeset/base/270417 > >=20 > > Log: > > Fix arm build breakage when building stable/10 on > > head/. > > =20 > > MFC after: 3 days > > Sponsored by: The FreeBSD Foundation > >=20 > > Modified: > > head/release/arm/release.sh > >=20 > > Modified: head/release/arm/release.sh > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/release/arm/release.sh Sat Aug 23 15:54:22 2014 (r270416) > > +++ head/release/arm/release.sh Sat Aug 23 15:59:31 2014 (r270417) > > @@ -92,6 +92,10 @@ install_uboot() { > > } > > =20 > > main() { > > + # Fix broken ports that use kern.osreldate. > > + OSVERSION=3D$(chroot ${CHROOTDIR} /usr/bin/uname -U) > > + export OSVERSION > > + > > # Build the 'xdev' target for crochet. > > eval chroot ${CHROOTDIR} make -C /usr/src \ > > ${XDEV_FLAGS} XDEV=3D${XDEV} XDEV_ARCH=3D${XDEV_ARCH} \ >=20 > Is this an individual port issue, or a ports framework issue? >=20 > What should broken ports use? Ports should not be using the kern.osreldate sysctl *at* *all*. We have userland tools for this. Glen --UBYeLQbK9sqbzZRV Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJT+L2uAAoJELls3eqvi17Q9e0QAIb+d9WmTOTPrRGARkgNBP1+ dE4CggbL4J9bA66J1TV12J2JQPGRb8q+ilBOgLLwTPWrJq/LsOoQ95eXuGaiCo9O V02BtWOuVCuHx8aybrNodYBlaQ9ZY0zNkXmDpBthjuMn78zztqsDFHp04cq+uK8Z ZN5qa0tBWqF2VHDcnnmXNGBWj0u0zDZEG4hE2RZoJHKzXZ3sSUj6M5gsRTQVovIW WVG51EvdGQ1px7dFQ6HAUOyMvjtIYs2C1HaTJYPE/7B+R5Ub/XddEUjKOGJ21g2g uS7x+Q0/b2NkSWczcvItiTT/ULlRE336U09V7G86LgUAYFao6mAs6ywRv3UVLCYc o3RmHa7XG7N5CdlzPs4pq5UXeBj4sJT4Ylq++grr3W6hHbtg8SzDO1epGWGWJjpz Ryuvkq2HLdB2ZcvtTrBdDyz116TIIZHRcCGWcloLVfqw3nmb2T/Mg09C9vgeRIRy 9/nf4G49AShn+uEgj47XuymbQARQuz1M2xbr5JlbMVDMjY8+hbu3f21LaN+6bOIl edk9k4x/8e+is4WYS6geG+pWDZHowTjEo8+8S/N7U/dtTJdHJpH5zb6rYI1pnbNh CjQMrgkLpJh1kjopyvqeUwxMiLfBHQOXFw46c7hjjxEE9zPk+y2e6bIUt+ZnYHXN mQdmWUBTDoH3GzKCKKET =c0Mp -----END PGP SIGNATURE----- --UBYeLQbK9sqbzZRV-- From owner-svn-src-all@FreeBSD.ORG Sat Aug 23 16:15:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F0F00761; Sat, 23 Aug 2014 16:15:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DCE1A3286; Sat, 23 Aug 2014 16:15:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NGFGkr098422; Sat, 23 Aug 2014 16:15:16 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NGFGD1098421; Sat, 23 Aug 2014 16:15:16 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201408231615.s7NGFGD1098421@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 23 Aug 2014 16:15:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270418 - head/release/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 16:15:17 -0000 Author: gjb Date: Sat Aug 23 16:15:16 2014 New Revision: 270418 URL: http://svnweb.freebsd.org/changeset/base/270418 Log: Also export UNAME_r to fix arm builds. MFC after: 3 days X-MFC-with: r270417 Sponsored by: The FreeBSD Foundation Modified: head/release/arm/release.sh Modified: head/release/arm/release.sh ============================================================================== --- head/release/arm/release.sh Sat Aug 23 15:59:31 2014 (r270417) +++ head/release/arm/release.sh Sat Aug 23 16:15:16 2014 (r270418) @@ -95,6 +95,10 @@ 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 \ From owner-svn-src-all@FreeBSD.ORG Sat Aug 23 17:31:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EDCEC27C; Sat, 23 Aug 2014 17:31:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D959E3A0F; Sat, 23 Aug 2014 17:31:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NHVuxv042437; Sat, 23 Aug 2014 17:31:56 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NHVuoX042435; Sat, 23 Aug 2014 17:31:56 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201408231731.s7NHVuoX042435@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 23 Aug 2014 17:31:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270423 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 17:31:57 -0000 Author: mav Date: Sat Aug 23 17:31:56 2014 New Revision: 270423 URL: http://svnweb.freebsd.org/changeset/base/270423 Log: Restore pre-r239157 handling of sched_yield(), when thread time slice was aborted, allowing other threads to run. Without this change thread is just rescheduled again, that was illustrated by provided test tool. PR: 192926 Submitted by: eric@vangyzen.net MFC after: 2 weeks Modified: head/sys/kern/sched_4bsd.c head/sys/kern/sched_ule.c Modified: head/sys/kern/sched_4bsd.c ============================================================================== --- head/sys/kern/sched_4bsd.c Sat Aug 23 17:19:21 2014 (r270422) +++ head/sys/kern/sched_4bsd.c Sat Aug 23 17:31:56 2014 (r270423) @@ -982,7 +982,8 @@ sched_switch(struct thread *td, struct t sched_load_rem(); td->td_lastcpu = td->td_oncpu; - preempted = !(td->td_flags & TDF_SLICEEND); + preempted = !((td->td_flags & TDF_SLICEEND) || + (flags & SWT_RELINQUISH)); td->td_flags &= ~(TDF_NEEDRESCHED | TDF_SLICEEND); td->td_owepreempt = 0; td->td_oncpu = NOCPU; Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Sat Aug 23 17:19:21 2014 (r270422) +++ head/sys/kern/sched_ule.c Sat Aug 23 17:31:56 2014 (r270423) @@ -1857,7 +1857,8 @@ sched_switch(struct thread *td, struct t ts->ts_rltick = ticks; td->td_lastcpu = td->td_oncpu; td->td_oncpu = NOCPU; - preempted = !(td->td_flags & TDF_SLICEEND); + preempted = !((td->td_flags & TDF_SLICEEND) || + (flags & SWT_RELINQUISH)); td->td_flags &= ~(TDF_NEEDRESCHED | TDF_SLICEEND); td->td_owepreempt = 0; if (!TD_IS_IDLETHREAD(td)) From owner-svn-src-all@FreeBSD.ORG Sat Aug 23 17:37:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C2FD521; Sat, 23 Aug 2014 17:37:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15EC13A52; Sat, 23 Aug 2014 17:37:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NHbJga043189; Sat, 23 Aug 2014 17:37:19 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NHbIXN043185; Sat, 23 Aug 2014 17:37:18 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201408231737.s7NHbIXN043185@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sat, 23 Aug 2014 17:37:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270424 - head/sbin/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 17:37:19 -0000 Author: melifaro Date: Sat Aug 23 17:37:18 2014 New Revision: 270424 URL: http://svnweb.freebsd.org/changeset/base/270424 Log: Merge buffer-printing changes from from projects/ipfw as preparation for branch merge. Requested by: luigi Modified: head/sbin/ipfw/altq.c head/sbin/ipfw/dummynet.c head/sbin/ipfw/ipfw2.c head/sbin/ipfw/ipfw2.h head/sbin/ipfw/ipv6.c Modified: head/sbin/ipfw/altq.c ============================================================================== --- head/sbin/ipfw/altq.c Sat Aug 23 17:31:56 2014 (r270423) +++ head/sbin/ipfw/altq.c Sat Aug 23 17:37:18 2014 (r270424) @@ -137,15 +137,15 @@ altq_qid_to_name(u_int32_t qid) } void -print_altq_cmd(ipfw_insn_altq *altqptr) +print_altq_cmd(struct buf_pr *bp, ipfw_insn_altq *altqptr) { if (altqptr) { const char *qname; qname = altq_qid_to_name(altqptr->qid); if (qname == NULL) - printf(" altq ?<%u>", altqptr->qid); + bprintf(bp, " altq ?<%u>", altqptr->qid); else - printf(" altq %s", qname); + bprintf(bp, " altq %s", qname); } } Modified: head/sbin/ipfw/dummynet.c ============================================================================== --- head/sbin/ipfw/dummynet.c Sat Aug 23 17:31:56 2014 (r270423) +++ head/sbin/ipfw/dummynet.c Sat Aug 23 17:37:18 2014 (r270424) @@ -174,48 +174,44 @@ print_header(struct ipfw_flow_id *id) } static void -list_flow(struct dn_flow *ni, int *print) +list_flow(struct buf_pr *bp, struct dn_flow *ni) { char buff[255]; struct protoent *pe = NULL; struct in_addr ina; struct ipfw_flow_id *id = &ni->fid; - if (*print) { - print_header(&ni->fid); - *print = 0; - } pe = getprotobynumber(id->proto); /* XXX: Should check for IPv4 flows */ - printf("%3u%c", (ni->oid.id) & 0xff, + bprintf(bp, "%3u%c", (ni->oid.id) & 0xff, id->extra ? '*' : ' '); if (!IS_IP6_FLOW_ID(id)) { if (pe) - printf("%-4s ", pe->p_name); + bprintf(bp, "%-4s ", pe->p_name); else - printf("%4u ", id->proto); + bprintf(bp, "%4u ", id->proto); ina.s_addr = htonl(id->src_ip); - printf("%15s/%-5d ", + bprintf(bp, "%15s/%-5d ", inet_ntoa(ina), id->src_port); ina.s_addr = htonl(id->dst_ip); - printf("%15s/%-5d ", + bprintf(bp, "%15s/%-5d ", inet_ntoa(ina), id->dst_port); } else { /* Print IPv6 flows */ if (pe != NULL) - printf("%9s ", pe->p_name); + bprintf(bp, "%9s ", pe->p_name); else - printf("%9u ", id->proto); - printf("%7d %39s/%-5d ", id->flow_id6, + bprintf(bp, "%9u ", id->proto); + bprintf(bp, "%7d %39s/%-5d ", id->flow_id6, inet_ntop(AF_INET6, &(id->src_ip6), buff, sizeof(buff)), id->src_port); - printf(" %39s/%-5d ", + bprintf(bp, " %39s/%-5d ", inet_ntop(AF_INET6, &(id->dst_ip6), buff, sizeof(buff)), id->dst_port); } - pr_u64(&ni->tot_pkts, 4); - pr_u64(&ni->tot_bytes, 8); - printf("%2u %4u %3u\n", + pr_u64(bp, &ni->tot_pkts, 4); + pr_u64(bp, &ni->tot_bytes, 8); + bprintf(bp, "%2u %4u %3u", ni->length, ni->len_bytes, ni->drops); } @@ -303,8 +299,10 @@ list_pipes(struct dn_id *oid, struct dn_ { char buf[160]; /* pending buffer */ int toPrint = 1; /* print header */ + struct buf_pr bp; buf[0] = '\0'; + bp_alloc(&bp, 4096); for (; oid != end; oid = O_NEXT(oid, oid->len)) { if (oid->len < sizeof(*oid)) errx(1, "invalid oid len %d\n", oid->len); @@ -346,7 +344,12 @@ list_pipes(struct dn_id *oid, struct dn_ break; case DN_FLOW: - list_flow((struct dn_flow *)oid, &toPrint); + if (toPrint != 0) { + print_header(&((struct dn_flow *)oid)->fid); + toPrint = 0; + } + list_flow(&bp, (struct dn_flow *)oid); + printf("%s\n", bp.buf); break; case DN_LINK: { @@ -384,6 +387,8 @@ list_pipes(struct dn_id *oid, struct dn_ } flush_buf(buf); // XXX does it really go here ? } + + bp_free(&bp); } /* Modified: head/sbin/ipfw/ipfw2.c ============================================================================== --- head/sbin/ipfw/ipfw2.c Sat Aug 23 17:31:56 2014 (r270423) +++ head/sbin/ipfw/ipfw2.c Sat Aug 23 17:37:18 2014 (r270424) @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -56,6 +57,21 @@ struct cmdline_opts co; /* global options */ +struct format_opts { + int bcwidth; + int pcwidth; + int show_counters; + uint32_t set_mask; /* enabled sets mask */ + uint32_t flags; /* request flags */ + uint32_t first; /* first rule to request */ + uint32_t last; /* last rule to request */ + uint32_t dcnt; /* number of dynamic states */ +}; +#define IP_FW_TARG IP_FW_TABLEARG +#define ip_fw_bcounter ip_fw +#define ip_fw_rule ip_fw +struct tidx; + int resvd_set_number = RESVD_SET; int ipfw_socket = -1; @@ -86,7 +102,7 @@ uint32_t ipfw_tables_max = 0; /* Number if (!av[0]) \ errx(EX_USAGE, "%s: missing argument", match_value(s_x, tok)); \ if (_substrcmp(*av, "tablearg") == 0) { \ - arg = IP_FW_TABLEARG; \ + arg = IP_FW_TARG; \ break; \ } \ \ @@ -104,24 +120,13 @@ uint32_t ipfw_tables_max = 0; /* Number errx(EX_DATAERR, "%s: argument is out of range (%u..%u): %s", \ match_value(s_x, tok), min, max, *av); \ \ - if (_xval == IP_FW_TABLEARG) \ + if (_xval == IP_FW_TARG) \ errx(EX_DATAERR, "%s: illegal argument value: %s", \ match_value(s_x, tok), *av); \ arg = _xval; \ } \ } while (0) -static void -PRINT_UINT_ARG(const char *str, uint32_t arg) -{ - if (str != NULL) - printf("%s",str); - if (arg == IP_FW_TABLEARG) - printf("tablearg"); - else - printf("%u", arg); -} - static struct _s_x f_tcpflags[] = { { "syn", TH_SYN }, { "fin", TH_FIN }, @@ -169,7 +174,7 @@ static struct _s_x f_iptos[] = { { NULL, 0 } }; -static struct _s_x f_ipdscp[] = { +struct _s_x f_ipdscp[] = { { "af11", IPTOS_DSCP_AF11 >> 2 }, /* 001010 */ { "af12", IPTOS_DSCP_AF12 >> 2 }, /* 001100 */ { "af13", IPTOS_DSCP_AF13 >> 2 }, /* 001110 */ @@ -370,6 +375,98 @@ static struct _s_x rule_options[] = { { NULL, 0 } /* terminator */ }; +void bprint_uint_arg(struct buf_pr *bp, const char *str, uint32_t arg); + +/* + * Simple string buffer API. + * Used to simplify buffer passing between function and for + * transparent overrun handling. + */ + +/* + * Allocates new buffer of given size @sz. + * + * Returns 0 on success. + */ +int +bp_alloc(struct buf_pr *b, size_t size) +{ + memset(b, 0, sizeof(struct buf_pr)); + + if ((b->buf = calloc(1, size)) == NULL) + return (ENOMEM); + + b->ptr = b->buf; + b->size = size; + b->avail = b->size; + + return (0); +} + +void +bp_free(struct buf_pr *b) +{ + + free(b->buf); +} + +/* + * Flushes buffer so new writer start from beginning. + */ +void +bp_flush(struct buf_pr *b) +{ + + b->ptr = b->buf; + b->avail = b->size; +} + +/* + * Print message specified by @format and args. + * Automatically manage buffer space and transparently handle + * buffer overruns. + * + * Returns number of bytes that should have been printed. + */ +int +bprintf(struct buf_pr *b, char *format, ...) +{ + va_list args; + int i; + + va_start(args, format); + + i = vsnprintf(b->ptr, b->avail, format, args); + va_end(args); + + if (i > b->avail || i < 0) { + /* Overflow or print error */ + b->avail = 0; + } else { + b->ptr += i; + b->avail -= i; + } + + b->needed += i; + + return (i); +} + +/* + * Special values printer for tablearg-aware opcodes. + */ +void +bprint_uint_arg(struct buf_pr *bp, const char *str, uint32_t arg) +{ + + if (str != NULL) + bprintf(bp, "%s", str); + if (arg == IP_FW_TARG) + bprintf(bp, "tablearg"); + else + bprintf(bp, "%u", arg); +} + /* * Helper routine to print a possibly unaligned uint64_t on * various platform. If width > 0, print the value with @@ -377,7 +474,7 @@ static struct _s_x rule_options[] = { * otherwise, return the required width. */ int -pr_u64(uint64_t *pd, int width) +pr_u64(struct buf_pr *b, uint64_t *pd, int width) { #ifdef TCC #define U64_FMT "I64" @@ -390,11 +487,12 @@ pr_u64(uint64_t *pd, int width) bcopy (pd, &u, sizeof(u)); d = u; return (width > 0) ? - printf("%*" U64_FMT " ", width, d) : + bprintf(b, "%*" U64_FMT " ", width, d) : snprintf(NULL, 0, "%" U64_FMT, d) ; #undef U64_FMT } + void * safe_calloc(size_t number, size_t size) { @@ -511,6 +609,34 @@ match_value(struct _s_x *p, int value) } /* + * helper function to process a set of flags and set bits in the + * appropriate masks. + */ +void +fill_flags(struct _s_x *flags, char *p, uint8_t *set, uint8_t *clear) +{ + char *q; /* points to the separator */ + int val; + uint8_t *which; /* mask we are working on */ + + while (p && *p) { + if (*p == '!') { + p++; + which = clear; + } else + which = set; + q = strchr(p, ','); + if (q) + *q++ = '\0'; + val = match_token(flags, p); + if (val <= 0) + errx(EX_DATAERR, "invalid flag %s", p); + *which |= (uint8_t)val; + p = q; + } +} + +/* * _substrcmp takes two strings and returns 1 if they do not match, * and 0 if they match exactly or the first string is a sub-string * of the second. A warning is printed to stderr in the case that the @@ -564,16 +690,16 @@ _substrcmp2(const char *str1, const char * prints one port, symbolic or numeric */ static void -print_port(int proto, uint16_t port) +print_port(struct buf_pr *bp, int proto, uint16_t port) { if (proto == IPPROTO_ETHERTYPE) { char const *s; if (co.do_resolv && (s = match_value(ether_types, port)) ) - printf("%s", s); + bprintf(bp, "%s", s); else - printf("0x%04x", port); + bprintf(bp, "0x%04x", port); } else { struct servent *se = NULL; if (co.do_resolv) { @@ -582,9 +708,9 @@ print_port(int proto, uint16_t port) se = getservbyport(htons(port), pe ? pe->p_name : NULL); } if (se) - printf("%s", se->s_name); + bprintf(bp, "%s", se->s_name); else - printf("%d", port); + bprintf(bp, "%d", port); } } @@ -606,7 +732,7 @@ static struct _s_x _port_name[] = { * XXX todo: add support for mask. */ static void -print_newports(ipfw_insn_u16 *cmd, int proto, int opcode) +print_newports(struct buf_pr *bp, ipfw_insn_u16 *cmd, int proto, int opcode) { uint16_t *p = cmd->ports; int i; @@ -616,15 +742,15 @@ print_newports(ipfw_insn_u16 *cmd, int p sep = match_value(_port_name, opcode); if (sep == NULL) sep = "???"; - printf (" %s", sep); + bprintf(bp, " %s", sep); } sep = " "; for (i = F_LEN((ipfw_insn *)cmd) - 1; i > 0; i--, p += 2) { - printf("%s", sep); - print_port(proto, p[0]); + bprintf(bp, "%s", sep); + print_port(bp, proto, p[0]); if (p[0] != p[1]) { - printf("-"); - print_port(proto, p[1]); + bprintf(bp, "-"); + print_port(bp, proto, p[1]); } sep = ","; } @@ -824,14 +950,14 @@ fill_reject_code(u_short *codep, char *s } static void -print_reject_code(uint16_t code) +print_reject_code(struct buf_pr *bp, uint16_t code) { - char const *s = match_value(icmpcodes, code); + char const *s; - if (s != NULL) - printf("unreach %s", s); + if ((s = match_value(icmpcodes, code)) != NULL) + bprintf(bp, "unreach %s", s); else - printf("unreach %u", code); + bprintf(bp, "unreach %u", code); } /* @@ -864,7 +990,8 @@ contigmask(uint8_t *p, int len) * There is a specialized check for f_tcpflags. */ static void -print_flags(char const *name, ipfw_insn *cmd, struct _s_x *list) +print_flags(struct buf_pr *bp, char const *name, ipfw_insn *cmd, + struct _s_x *list) { char const *comma = ""; int i; @@ -872,20 +999,20 @@ print_flags(char const *name, ipfw_insn uint8_t clear = (cmd->arg1 >> 8) & 0xff; if (list == f_tcpflags && set == TH_SYN && clear == TH_ACK) { - printf(" setup"); + bprintf(bp, " setup"); return; } - printf(" %s ", name); + bprintf(bp, " %s ", name); for (i=0; list[i].x != 0; i++) { if (set & list[i].x) { set &= ~list[i].x; - printf("%s%s", comma, list[i].s); + bprintf(bp, "%s%s", comma, list[i].s); comma = ","; } if (clear & list[i].x) { clear &= ~list[i].x; - printf("%s!%s", comma, list[i].s); + bprintf(bp, "%s!%s", comma, list[i].s); comma = ","; } } @@ -895,9 +1022,11 @@ print_flags(char const *name, ipfw_insn * Print the ip address contained in a command. */ static void -print_ip(ipfw_insn_ip *cmd, char const *s) +print_ip(struct buf_pr *bp, struct format_opts *fo, ipfw_insn_ip *cmd, + char const *s) { struct hostent *he = NULL; + struct in_addr *ia; uint32_t len = F_LEN((ipfw_insn *)cmd); uint32_t *a = ((ipfw_insn_u32 *)cmd)->d; @@ -907,22 +1036,22 @@ print_ip(ipfw_insn_ip *cmd, char const * if (d < sizeof(lookup_key)/sizeof(lookup_key[0])) arg = match_value(rule_options, lookup_key[d]); - printf("%s lookup %s %d", cmd->o.len & F_NOT ? " not": "", - arg, cmd->o.arg1); + bprintf(bp, "%s lookup %s %d", cmd->o.len & F_NOT ? " not": "", + arg, cmd->o.arg1); return; } - printf("%s%s ", cmd->o.len & F_NOT ? " not": "", s); + bprintf(bp, "%s%s ", cmd->o.len & F_NOT ? " not": "", s); if (cmd->o.opcode == O_IP_SRC_ME || cmd->o.opcode == O_IP_DST_ME) { - printf("me"); + bprintf(bp, "me"); return; } if (cmd->o.opcode == O_IP_SRC_LOOKUP || cmd->o.opcode == O_IP_DST_LOOKUP) { - printf("table(%u", ((ipfw_insn *)cmd)->arg1); + bprintf(bp, "table(%u", ((ipfw_insn *)cmd)->arg1); if (len == F_INSN_SIZE(ipfw_insn_u32)) - printf(",%u", *a); - printf(")"); + bprintf(bp, ",%u", *a); + bprintf(bp, ")"); return; } if (cmd->o.opcode == O_IP_SRC_SET || cmd->o.opcode == O_IP_DST_SET) { @@ -933,7 +1062,7 @@ print_ip(ipfw_insn_ip *cmd, char const * x = cmd->o.arg1 - 1; x = htonl( ~x ); cmd->addr.s_addr = htonl(cmd->addr.s_addr); - printf("%s/%d", inet_ntoa(cmd->addr), + bprintf(bp, "%s/%d", inet_ntoa(cmd->addr), contigmask((uint8_t *)&x, 32)); x = cmd->addr.s_addr = htonl(cmd->addr.s_addr); x &= 0xff; /* base */ @@ -948,14 +1077,14 @@ print_ip(ipfw_insn_ip *cmd, char const * for (j=i+1; j < cmd->o.arg1; j++) if (!(map[ j/32] & (1<<(j & 31)))) break; - printf("%c%d", comma, i+x); + bprintf(bp, "%c%d", comma, i+x); if (j>i+2) { /* range has at least 3 elements */ - printf("-%d", j-1+x); + bprintf(bp, "-%d", j-1+x); i = j-1; } comma = ','; } - printf("}"); + bprintf(bp, "}"); return; } /* @@ -970,18 +1099,19 @@ print_ip(ipfw_insn_ip *cmd, char const * if (mb == 32 && co.do_resolv) he = gethostbyaddr((char *)&(a[0]), sizeof(u_long), AF_INET); if (he != NULL) /* resolved to name */ - printf("%s", he->h_name); + bprintf(bp, "%s", he->h_name); else if (mb == 0) /* any */ - printf("any"); + bprintf(bp, "any"); else { /* numeric IP followed by some kind of mask */ - printf("%s", inet_ntoa( *((struct in_addr *)&a[0]) ) ); + ia = (struct in_addr *)&a[0]; + bprintf(bp, "%s", inet_ntoa(*ia)); if (mb < 0) - printf(":%s", inet_ntoa( *((struct in_addr *)&a[1]) ) ); + bprintf(bp, ":%s", inet_ntoa(*ia ) ); else if (mb < 32) - printf("/%d", mb); + bprintf(bp, "/%d", mb); } if (len > 1) - printf(","); + bprintf(bp, ","); } } @@ -989,21 +1119,21 @@ print_ip(ipfw_insn_ip *cmd, char const * * prints a MAC address/mask pair */ static void -print_mac(uint8_t *addr, uint8_t *mask) +print_mac(struct buf_pr *bp, uint8_t *addr, uint8_t *mask) { int l = contigmask(mask, 48); if (l == 0) - printf(" any"); + bprintf(bp, " any"); else { - printf(" %02x:%02x:%02x:%02x:%02x:%02x", + bprintf(bp, " %02x:%02x:%02x:%02x:%02x:%02x", addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]); if (l == -1) - printf("&%02x:%02x:%02x:%02x:%02x:%02x", + bprintf(bp, "&%02x:%02x:%02x:%02x:%02x:%02x", mask[0], mask[1], mask[2], mask[3], mask[4], mask[5]); else if (l < 48) - printf("/%d", l); + bprintf(bp, "/%d", l); } } @@ -1032,38 +1162,38 @@ fill_icmptypes(ipfw_insn_u32 *cmd, char } static void -print_icmptypes(ipfw_insn_u32 *cmd) +print_icmptypes(struct buf_pr *bp, ipfw_insn_u32 *cmd) { int i; char sep= ' '; - printf(" icmptypes"); + bprintf(bp, " icmptypes"); for (i = 0; i < 32; i++) { if ( (cmd->d[0] & (1 << (i))) == 0) continue; - printf("%c%d", sep, i); + bprintf(bp, "%c%d", sep, i); sep = ','; } } static void -print_dscp(ipfw_insn_u32 *cmd) +print_dscp(struct buf_pr *bp, ipfw_insn_u32 *cmd) { int i, c; uint32_t *v; char sep= ' '; const char *code; - printf(" dscp"); + bprintf(bp, " dscp"); i = 0; c = 0; v = cmd->d; while (i < 64) { if (*v & (1 << i)) { if ((code = match_value(f_ipdscp, i)) != NULL) - printf("%c%s", sep, code); + bprintf(bp, "%c%s", sep, code); else - printf("%c%d", sep, i); + bprintf(bp, "%c%d", sep, i); sep = ','; } @@ -1094,7 +1224,7 @@ print_dscp(ipfw_insn_u32 *cmd) #define HAVE_OPTIONS 0x8000 static void -show_prerequisites(int *flags, int want, int cmd) +show_prerequisites(struct buf_pr *bp, int *flags, int want, int cmd) { (void)cmd; /* UNUSED */ if (co.comment_only) @@ -1105,22 +1235,23 @@ show_prerequisites(int *flags, int want, if ( !(*flags & HAVE_OPTIONS)) { if ( !(*flags & HAVE_PROTO) && (want & HAVE_PROTO)) { if ( (*flags & HAVE_PROTO4)) - printf(" ip4"); + bprintf(bp, " ip4"); else if ( (*flags & HAVE_PROTO6)) - printf(" ip6"); + bprintf(bp, " ip6"); else - printf(" ip"); + bprintf(bp, " ip"); } if ( !(*flags & HAVE_SRCIP) && (want & HAVE_SRCIP)) - printf(" from any"); + bprintf(bp, " from any"); if ( !(*flags & HAVE_DSTIP) && (want & HAVE_DSTIP)) - printf(" to any"); + bprintf(bp, " to any"); } *flags |= want; } static void -show_ipfw(struct ip_fw *rule, int pcwidth, int bcwidth) +show_static_rule(struct cmdline_opts *co, struct format_opts *fo, + struct buf_pr *bp, struct ip_fw_rule *rule, struct ip_fw_bcounter *cntr) { static int twidth = 0; int l; @@ -1132,25 +1263,28 @@ show_ipfw(struct ip_fw *rule, int pcwidt ipfw_insn_altq *altqptr = NULL; /* set if we find an O_ALTQ */ int or_block = 0; /* we are in an or block */ uint32_t set_disable; + uint32_t uval; bcopy(&rule->next_rule, &set_disable, sizeof(set_disable)); - if (set_disable & (1 << rule->set)) { /* disabled */ - if (!co.show_sets) + if (set_disable & (1 << rule->set)) { + /* disabled mask */ + if (!co->show_sets) return; else - printf("# DISABLED "); + bprintf(bp, "# DISABLED "); } - printf("%05u ", rule->rulenum); + bprintf(bp, "%05u ", rule->rulenum); - if (pcwidth > 0 || bcwidth > 0) { - pr_u64(&rule->pcnt, pcwidth); - pr_u64(&rule->bcnt, bcwidth); + /* Print counters if enabled */ + if (fo->pcwidth > 0 || fo->bcwidth > 0) { + pr_u64(bp, &cntr->pcnt, fo->pcwidth); + pr_u64(bp, &cntr->bcnt, fo->bcwidth); } - if (co.do_time == 2) - printf("%10u ", rule->timestamp); - else if (co.do_time == 1) { + if (co->do_time == 2) + bprintf(bp, "%10u ", cntr->timestamp); + else if (co->do_time == 1) { char timestr[30]; time_t t = (time_t)0; @@ -1159,19 +1293,19 @@ show_ipfw(struct ip_fw *rule, int pcwidt *strchr(timestr, '\n') = '\0'; twidth = strlen(timestr); } - if (rule->timestamp) { - t = _long_to_time(rule->timestamp); + if (cntr->timestamp > 0) { + t = _long_to_time(cntr->timestamp); strcpy(timestr, ctime(&t)); *strchr(timestr, '\n') = '\0'; - printf("%s ", timestr); + bprintf(bp, "%s ", timestr); } else { - printf("%*s", twidth, " "); + bprintf(bp, "%*s", twidth, " "); } } - if (co.show_sets) - printf("set %d ", rule->set); + if (co->show_sets) + bprintf(bp, "set %d ", rule->set); /* * print the optional "match probability" @@ -1183,7 +1317,7 @@ show_ipfw(struct ip_fw *rule, int pcwidt double d = 1.0 * p->d[0]; d = (d / 0x7fffffff); - printf("prob %f ", d); + bprintf(bp, "prob %f ", d); } } @@ -1194,66 +1328,66 @@ show_ipfw(struct ip_fw *rule, int pcwidt l > 0 ; l -= F_LEN(cmd), cmd += F_LEN(cmd)) { switch(cmd->opcode) { case O_CHECK_STATE: - printf("check-state"); + bprintf(bp, "check-state"); /* avoid printing anything else */ flags = HAVE_PROTO | HAVE_SRCIP | HAVE_DSTIP | HAVE_IP; break; case O_ACCEPT: - printf("allow"); + bprintf(bp, "allow"); break; case O_COUNT: - printf("count"); + bprintf(bp, "count"); break; case O_DENY: - printf("deny"); + bprintf(bp, "deny"); break; case O_REJECT: if (cmd->arg1 == ICMP_REJECT_RST) - printf("reset"); + bprintf(bp, "reset"); else if (cmd->arg1 == ICMP_UNREACH_HOST) - printf("reject"); + bprintf(bp, "reject"); else - print_reject_code(cmd->arg1); + print_reject_code(bp, cmd->arg1); break; case O_UNREACH6: if (cmd->arg1 == ICMP6_UNREACH_RST) - printf("reset6"); + bprintf(bp, "reset6"); else print_unreach6_code(cmd->arg1); break; case O_SKIPTO: - PRINT_UINT_ARG("skipto ", cmd->arg1); + bprint_uint_arg(bp, "skipto ", cmd->arg1); break; case O_PIPE: - PRINT_UINT_ARG("pipe ", cmd->arg1); + bprint_uint_arg(bp, "pipe ", cmd->arg1); break; case O_QUEUE: - PRINT_UINT_ARG("queue ", cmd->arg1); + bprint_uint_arg(bp, "queue ", cmd->arg1); break; case O_DIVERT: - PRINT_UINT_ARG("divert ", cmd->arg1); + bprint_uint_arg(bp, "divert ", cmd->arg1); break; case O_TEE: - PRINT_UINT_ARG("tee ", cmd->arg1); + bprint_uint_arg(bp, "tee ", cmd->arg1); break; case O_NETGRAPH: - PRINT_UINT_ARG("netgraph ", cmd->arg1); + bprint_uint_arg(bp, "netgraph ", cmd->arg1); break; case O_NGTEE: - PRINT_UINT_ARG("ngtee ", cmd->arg1); + bprint_uint_arg(bp, "ngtee ", cmd->arg1); break; case O_FORWARD_IP: @@ -1261,12 +1395,12 @@ show_ipfw(struct ip_fw *rule, int pcwidt ipfw_insn_sa *s = (ipfw_insn_sa *)cmd; if (s->sa.sin_addr.s_addr == INADDR_ANY) { - printf("fwd tablearg"); + bprintf(bp, "fwd tablearg"); } else { - printf("fwd %s", inet_ntoa(s->sa.sin_addr)); + bprintf(bp, "fwd %s",inet_ntoa(s->sa.sin_addr)); } if (s->sa.sin_port) - printf(",%d", s->sa.sin_port); + bprintf(bp, ",%d", s->sa.sin_port); } break; @@ -1275,10 +1409,10 @@ show_ipfw(struct ip_fw *rule, int pcwidt char buf[4 + INET6_ADDRSTRLEN + 1]; ipfw_insn_sa6 *s = (ipfw_insn_sa6 *)cmd; - printf("fwd %s", inet_ntop(AF_INET6, &s->sa.sin6_addr, - buf, sizeof(buf))); + bprintf(bp, "fwd %s", inet_ntop(AF_INET6, + &s->sa.sin6_addr, buf, sizeof(buf))); if (s->sa.sin6_port) - printf(",%d", s->sa.sin6_port); + bprintf(bp, ",%d", s->sa.sin6_port); } break; @@ -1296,64 +1430,69 @@ show_ipfw(struct ip_fw *rule, int pcwidt case O_NAT: if (cmd->arg1 != 0) - PRINT_UINT_ARG("nat ", cmd->arg1); + bprint_uint_arg(bp, "nat ", cmd->arg1); else - printf("nat global"); + bprintf(bp, "nat global"); break; case O_SETFIB: - PRINT_UINT_ARG("setfib ", cmd->arg1); + bprint_uint_arg(bp, "setfib ", cmd->arg1 & 0x7FFF); break; case O_SETDSCP: { const char *code; - if ((code = match_value(f_ipdscp, cmd->arg1)) != NULL) - printf("setdscp %s", code); + if (cmd->arg1 == IP_FW_TARG) { + bprint_uint_arg(bp, "setdscp ", cmd->arg1); + break; + } + uval = cmd->arg1 & 0x3F; + if ((code = match_value(f_ipdscp, uval)) != NULL) + bprintf(bp, "setdscp %s", code); else - PRINT_UINT_ARG("setdscp ", cmd->arg1); + bprint_uint_arg(bp, "setdscp ", uval); } break; case O_REASS: - printf("reass"); + bprintf(bp, "reass"); break; case O_CALLRETURN: if (cmd->len & F_NOT) - printf("return"); + bprintf(bp, "return"); else - PRINT_UINT_ARG("call ", cmd->arg1); + bprint_uint_arg(bp, "call ", cmd->arg1); break; default: - printf("** unrecognized action %d len %d ", + bprintf(bp, "** unrecognized action %d len %d ", cmd->opcode, cmd->len); } } if (logptr) { if (logptr->max_log > 0) - printf(" log logamount %d", logptr->max_log); + bprintf(bp, " log logamount %d", logptr->max_log); else - printf(" log"); + bprintf(bp, " log"); } #ifndef NO_ALTQ if (altqptr) { - print_altq_cmd(altqptr); + print_altq_cmd(bp, altqptr); } #endif if (tagptr) { if (tagptr->len & F_NOT) - PRINT_UINT_ARG(" untag ", tagptr->arg1); + bprint_uint_arg(bp, " untag ", tagptr->arg1); else - PRINT_UINT_ARG(" tag ", tagptr->arg1); + bprint_uint_arg(bp, " tag ", tagptr->arg1); } /* * then print the body. */ - for (l = rule->act_ofs, cmd = rule->cmd ; + for (l = rule->act_ofs, cmd = rule->cmd; l > 0 ; l -= F_LEN(cmd) , cmd += F_LEN(cmd)) { if ((cmd->len & F_OR) || (cmd->len & F_NOT)) continue; @@ -1366,30 +1505,30 @@ show_ipfw(struct ip_fw *rule, int pcwidt } } if (rule->_pad & 1) { /* empty rules before options */ - if (!co.do_compact) { - show_prerequisites(&flags, HAVE_PROTO, 0); - printf(" from any to any"); + if (!co->do_compact) { + show_prerequisites(bp, &flags, HAVE_PROTO, 0); + bprintf(bp, " from any to any"); } flags |= HAVE_IP | HAVE_OPTIONS | HAVE_PROTO | HAVE_SRCIP | HAVE_DSTIP; } - if (co.comment_only) + if (co->comment_only) comment = "..."; - for (l = rule->act_ofs, cmd = rule->cmd ; + for (l = rule->act_ofs, cmd = rule->cmd; l > 0 ; l -= F_LEN(cmd) , cmd += F_LEN(cmd)) { /* useful alias */ ipfw_insn_u32 *cmd32 = (ipfw_insn_u32 *)cmd; - if (co.comment_only) { + if (co->comment_only) { if (cmd->opcode != O_NOP) continue; - printf(" // %s\n", (char *)(cmd + 1)); + bprintf(bp, " // %s\n", (char *)(cmd + 1)); return; } - show_prerequisites(&flags, 0, cmd->opcode); + show_prerequisites(bp, &flags, 0, cmd->opcode); switch(cmd->opcode) { case O_PROB: @@ -1403,12 +1542,12 @@ show_ipfw(struct ip_fw *rule, int pcwidt case O_IP_SRC_MASK: case O_IP_SRC_ME: case O_IP_SRC_SET: - show_prerequisites(&flags, HAVE_PROTO, 0); + show_prerequisites(bp, &flags, HAVE_PROTO, 0); if (!(flags & HAVE_SRCIP)) - printf(" from"); + bprintf(bp, " from"); if ((cmd->len & F_OR) && !or_block) - printf(" {"); - print_ip((ipfw_insn_ip *)cmd, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Aug 23 17:52:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F4075950; Sat, 23 Aug 2014 17:52:47 +0000 (UTC) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mailhost.stack.nl", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 832D43B8B; Sat, 23 Aug 2014 17:52:47 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 5FAF3B80F1; Sat, 23 Aug 2014 19:52:44 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id 454C128494; Sat, 23 Aug 2014 19:52:44 +0200 (CEST) Date: Sat, 23 Aug 2014 19:52:44 +0200 From: Jilles Tjoelker To: Konstantin Belousov Subject: Re: svn commit: r265003 - head/secure/usr.sbin/sshd Message-ID: <20140823175244.GA29648@stack.nl> References: <53F4B381.5010205@FreeBSD.org> <20140820151310.GB2737@kib.kiev.ua> <53F4BC9B.3090405@FreeBSD.org> <53F4BEB1.6070000@FreeBSD.org> <53F4C022.5050804@FreeBSD.org> <20140821080541.GE2737@kib.kiev.ua> <53F5D42E.9080908@FreeBSD.org> <20140821123246.GH2737@kib.kiev.ua> <20140822134353.GA21891@stack.nl> <20140822153139.GN2737@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140822153139.GN2737@kib.kiev.ua> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Roger Pau Monn? , src-committers@freebsd.org, Bryan Drewery X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 17:52:48 -0000 On Fri, Aug 22, 2014 at 06:31:39PM +0300, Konstantin Belousov wrote: > On Fri, Aug 22, 2014 at 03:43:53PM +0200, Jilles Tjoelker wrote: > > This is good and necessary for SA_SIGINFO (because of the type of the > > SIG_DFL and SIG_IGN constants, and because POSIX says so in the > > description of SA_RESETHAND in the sigaction() page). However, there > > seems no reason to clear the other flags, which have no effect when the > > disposition is SIG_DFL or SIG_IGN but have historically always been > > preserved. (Slight exception: if kernel code erroneously loops on > > ERESTART, it will eat CPU time iff SA_RESTART is set, independent of the > > signal's disposition.) > Well, I already committed the patch with several bugs fixed comparing > with what was mailed, before your feedback arrived. > Do you consider it is important enough to revert the resetting of other > flags ? In particular, your note about the traditional historic > behaviour makes me wonder. I consider it important enough. Clearing the other flags is not POSIX-compliant and might break applications. For example, I can imagine an application modifying a struct sigaction with sa_handler == SIG_DFL from a sigaction() call. > I do not see why SA_SIGINFO is so special that it must be reset, > while other flags are not. The absence of the cases where the > default/ignored disposition is affected by the flags seems rather > arbitrary. The difference is that SA_SIGINFO changes the disposition field from sa_handler to sa_sigaction, and it is not unambiguously clear how SIG_DFL and SIG_IGN are represented in sa_sigaction. Note that sa_handler and sa_sigaction may or may not share storage, and implementations may or may not support (void (*)(int, siginfo_t *, void *))SIG_DFL. For example, when I wrote system() using posix_spawn() in https://lists.freebsd.org/pipermail/freebsd-hackers/2012-July/040065.html I needed to know whether SIGINT and SIGQUIT were ignored or not. I wrote ] if ((intact.sa_flags & SA_SIGINFO) != 0 || ] intact.sa_handler != SIG_IGN) ] (void)sigaddset(&defmask, SIGINT); ] if ((quitact.sa_flags & SA_SIGINFO) != 0 || ] quitact.sa_handler != SIG_IGN) ] (void)sigaddset(&defmask, SIGQUIT); in the assumption that there is always an actual handler if SA_SIGINFO is set. I did not really like this code and eventually system() was changed to use vfork() directly instead of posix_spawn(), but I think it is correct. Note that this means that it is sometimes necessary to install a handler function that will never be called. Per POSIX, SA_SIGINFO must be set for sigwaitinfo() to be guaranteed to return siginfo_t data, and the only way to do this is to specify a handler function, even though it will never be called because the signal is masked. (A never-called handler function also needs to be specified when using sigwait-like functions with signals that default to ignore.) The other flags do not affect the representation of the disposition, and can therefore remain set without problem. -- Jilles Tjoelker From owner-svn-src-all@FreeBSD.ORG Sat Aug 23 17:57:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C9526B24; Sat, 23 Aug 2014 17:57:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A917A3BB1; Sat, 23 Aug 2014 17:57:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NHv78E052169; Sat, 23 Aug 2014 17:57:07 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NHv7fl052162; Sat, 23 Aug 2014 17:57:07 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201408231757.s7NHv7fl052162@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sat, 23 Aug 2014 17:57:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270425 - in head: sbin/ipfw sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 17:57:08 -0000 Author: melifaro Date: Sat Aug 23 17:57:06 2014 New Revision: 270425 URL: http://svnweb.freebsd.org/changeset/base/270425 Log: Whitespace/style changes merged from projects/ipfw. Modified: head/sbin/ipfw/ipfw2.c head/sys/netpfil/ipfw/ip_fw2.c head/sys/netpfil/ipfw/ip_fw_sockopt.c Modified: head/sbin/ipfw/ipfw2.c ============================================================================== --- head/sbin/ipfw/ipfw2.c Sat Aug 23 17:37:18 2014 (r270424) +++ head/sbin/ipfw/ipfw2.c Sat Aug 23 17:57:06 2014 (r270425) @@ -592,7 +592,7 @@ match_token(struct _s_x *table, char *st for (pt = table ; i && pt->s != NULL ; pt++) if (strlen(pt->s) == i && !bcmp(string, pt->s, i)) return pt->x; - return -1; + return (-1); } /** Modified: head/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw2.c Sat Aug 23 17:37:18 2014 (r270424) +++ head/sys/netpfil/ipfw/ip_fw2.c Sat Aug 23 17:57:06 2014 (r270425) @@ -351,10 +351,13 @@ tcpopts_match(struct tcphdr *tcp, ipfw_i } static int -iface_match(struct ifnet *ifp, ipfw_insn_if *cmd, struct ip_fw_chain *chain, uint32_t *tablearg) +iface_match(struct ifnet *ifp, ipfw_insn_if *cmd, struct ip_fw_chain *chain, + uint32_t *tablearg) { + if (ifp == NULL) /* no iface with this packet, match fails */ - return 0; + return (0); + /* Check by name or by IP address */ if (cmd->name[0] != '\0') { /* match by name */ if (cmd->name[0] == '\1') /* use tablearg to match */ @@ -2547,6 +2550,7 @@ sysctl_ipfw_table_num(SYSCTL_HANDLER_ARG return (ipfw_resize_tables(&V_layer3_chain, ntables)); } #endif + /* * Module and VNET glue */ @@ -2734,7 +2738,7 @@ vnet_ipfw_uninit(const void *unused) ipfw_reap_rules(reap); IPFW_LOCK_DESTROY(chain); ipfw_dyn_uninit(1); /* free the remaining parts */ - return 0; + return (0); } /* Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_sockopt.c Sat Aug 23 17:37:18 2014 (r270424) +++ head/sys/netpfil/ipfw/ip_fw_sockopt.c Sat Aug 23 17:57:06 2014 (r270425) @@ -759,14 +759,14 @@ check_action: printf("ipfw: opcode %d, multiple actions" " not allowed\n", cmd->opcode); - return EINVAL; + return (EINVAL); } have_action = 1; if (l != cmdlen) { printf("ipfw: opcode %d, action must be" " last opcode\n", cmd->opcode); - return EINVAL; + return (EINVAL); } break; #ifdef INET6 @@ -809,25 +809,25 @@ check_action: case O_IP6_DST_MASK: case O_ICMP6TYPE: printf("ipfw: no IPv6 support in kernel\n"); - return EPROTONOSUPPORT; + return (EPROTONOSUPPORT); #endif default: printf("ipfw: opcode %d, unknown opcode\n", cmd->opcode); - return EINVAL; + return (EINVAL); } } } if (have_action == 0) { printf("ipfw: missing action\n"); - return EINVAL; + return (EINVAL); } return 0; bad_size: printf("ipfw: opcode %d size %d wrong\n", cmd->opcode, cmdlen); - return EINVAL; + return (EINVAL); } From owner-svn-src-all@FreeBSD.ORG Sat Aug 23 18:11:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0FB398EE; Sat, 23 Aug 2014 18:11:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF3BE3D6C; Sat, 23 Aug 2014 18:11:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NIBsno062415; Sat, 23 Aug 2014 18:11:54 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NIBsmB062414; Sat, 23 Aug 2014 18:11:54 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201408231811.s7NIBsmB062414@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 23 Aug 2014 18:11:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270429 - head/sys/sparc64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 18:11:55 -0000 Author: kib Date: Sat Aug 23 18:11:54 2014 New Revision: 270429 URL: http://svnweb.freebsd.org/changeset/base/270429 Log: For CPUs which do hardware cache line unaliasing, use direct map to access sfbufs. Suggested and reviewed by: alc Tested by: Michael Moll Sponsored by: The FreeBSD Foundation Modified: head/sys/sparc64/include/vmparam.h Modified: head/sys/sparc64/include/vmparam.h ============================================================================== --- head/sys/sparc64/include/vmparam.h Sat Aug 23 18:07:43 2014 (r270428) +++ head/sys/sparc64/include/vmparam.h Sat Aug 23 18:11:54 2014 (r270429) @@ -241,5 +241,8 @@ extern vm_offset_t vm_max_kernel_address #define SFBUF #define SFBUF_MAP +#define SFBUF_OPTIONAL_DIRECT_MAP dcache_color_ignore +#include +#define SFBUF_PHYS_DMAP(x) TLB_PHYS_TO_DIRECT(x) #endif /* !_MACHINE_VMPARAM_H_ */ From owner-svn-src-all@FreeBSD.ORG Sat Aug 23 18:42:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE625711; Sat, 23 Aug 2014 18:42:32 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BFF530D3; Sat, 23 Aug 2014 18:42:32 +0000 (UTC) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s7NIgLla070102 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 23 Aug 2014 21:42:21 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua s7NIgLla070102 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id s7NIgLd8070101; Sat, 23 Aug 2014 21:42:21 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 23 Aug 2014 21:42:21 +0300 From: Konstantin Belousov To: Jilles Tjoelker Subject: Re: svn commit: r265003 - head/secure/usr.sbin/sshd Message-ID: <20140823184221.GV2737@kib.kiev.ua> References: <20140820151310.GB2737@kib.kiev.ua> <53F4BC9B.3090405@FreeBSD.org> <53F4BEB1.6070000@FreeBSD.org> <53F4C022.5050804@FreeBSD.org> <20140821080541.GE2737@kib.kiev.ua> <53F5D42E.9080908@FreeBSD.org> <20140821123246.GH2737@kib.kiev.ua> <20140822134353.GA21891@stack.nl> <20140822153139.GN2737@kib.kiev.ua> <20140823175244.GA29648@stack.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="oe8NOCi/1gP69+wf" Content-Disposition: inline In-Reply-To: <20140823175244.GA29648@stack.nl> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Roger Pau Monn? , src-committers@freebsd.org, Bryan Drewery X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 18:42:32 -0000 --oe8NOCi/1gP69+wf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Aug 23, 2014 at 07:52:44PM +0200, Jilles Tjoelker wrote: > On Fri, Aug 22, 2014 at 06:31:39PM +0300, Konstantin Belousov wrote: > > On Fri, Aug 22, 2014 at 03:43:53PM +0200, Jilles Tjoelker wrote: > > > This is good and necessary for SA_SIGINFO (because of the type of the > > > SIG_DFL and SIG_IGN constants, and because POSIX says so in the > > > description of SA_RESETHAND in the sigaction() page). However, there > > > seems no reason to clear the other flags, which have no effect when t= he > > > disposition is SIG_DFL or SIG_IGN but have historically always been > > > preserved. (Slight exception: if kernel code erroneously loops on > > > ERESTART, it will eat CPU time iff SA_RESTART is set, independent of = the > > > signal's disposition.) > > Well, I already committed the patch with several bugs fixed comparing > > with what was mailed, before your feedback arrived. >=20 > > Do you consider it is important enough to revert the resetting of other > > flags ? In particular, your note about the traditional historic > > behaviour makes me wonder. >=20 > I consider it important enough. Clearing the other flags is not > POSIX-compliant and might break applications. For example, I can imagine > an application modifying a struct sigaction with sa_handler =3D=3D SIG_DFL > from a sigaction() call. This feels somewhat strange to me. E.g., I can easily imagine an implementation which relies on some code executing in the process user context for default action on some signal. Having the flags, like SA_ONSTACK or SA_NODEFER to influence the handler is weird. Such implementation is not unix, but I think it is quite possible that cygwin or interix do core dumping in userspace. >=20 > > I do not see why SA_SIGINFO is so special that it must be reset, > > while other flags are not. The absence of the cases where the > > default/ignored disposition is affected by the flags seems rather > > arbitrary. >=20 > The difference is that SA_SIGINFO changes the disposition field from > sa_handler to sa_sigaction, and it is not unambiguously clear how > SIG_DFL and SIG_IGN are represented in sa_sigaction. Note that > sa_handler and sa_sigaction may or may not share storage, and > implementations may or may not support (void (*)(int, siginfo_t *, void > *))SIG_DFL. >=20 > For example, when I wrote system() using posix_spawn() in > https://lists.freebsd.org/pipermail/freebsd-hackers/2012-July/040065.html > I needed to know whether SIGINT and SIGQUIT were ignored or not. I wrote >=20 > ] if ((intact.sa_flags & SA_SIGINFO) !=3D 0 || > ] intact.sa_handler !=3D SIG_IGN) > ] (void)sigaddset(&defmask, SIGINT); > ] if ((quitact.sa_flags & SA_SIGINFO) !=3D 0 || > ] quitact.sa_handler !=3D SIG_IGN) > ] (void)sigaddset(&defmask, SIGQUIT); >=20 > in the assumption that there is always an actual handler if SA_SIGINFO > is set. I did not really like this code and eventually system() was > changed to use vfork() directly instead of posix_spawn(), but I think it > is correct. If the implementation provides separate storage for sa_handler and sa_sigaction, then isn't it more correct to assume that sa_handler is NULL when sa_sigaction is valid ? In other words, simple sa.sa_handler !=3D SIG_IGN test would be more reasonable. I see that the SUSv4 is worded in a way that SA_SIGINFO always accompanies sa_sigaction. Are there any implementations which separate the storage for sa_handler and sa_sigaction ? >=20 > Note that this means that it is sometimes necessary to install a handler > function that will never be called. Per POSIX, SA_SIGINFO must be set > for sigwaitinfo() to be guaranteed to return siginfo_t data, and the > only way to do this is to specify a handler function, even though it > will never be called because the signal is masked. (A never-called > handler function also needs to be specified when using sigwait-like > functions with signals that default to ignore.) >=20 > The other flags do not affect the representation of the disposition, and > can therefore remain set without problem. Anyway, below is the patch with reverts the behaviour WRT flags other than SA_SIGINFO. I like the compactness of sigact_flag_test() calls, so I kept the function, despite it is only used in non-trivial ways for SA_SIGINFO flag test in kern_sigaction(). diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 8810bf3..f73c801 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -625,9 +625,14 @@ static bool sigact_flag_test(struct sigaction *act, int flag) { =20 - return ((act->sa_flags & flag) !=3D 0 && - (__sighandler_t *)act->sa_sigaction !=3D SIG_IGN && - (__sighandler_t *)act->sa_sigaction !=3D SIG_DFL); + /* + * 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) !=3D 0 && (flag !=3D SA_SIGINFO || + ((__sighandler_t *)act->sa_sigaction !=3D SIG_IGN && + (__sighandler_t *)act->sa_sigaction !=3D SIG_DFL))); } =20 /* @@ -916,7 +921,6 @@ siginit(p) for (i =3D 1; i <=3D NSIG; i++) { if (sigprop(i) & SA_IGNORE && i !=3D SIGCONT) { SIGADDSET(ps->ps_sigignore, i); - SIGADDSET(ps->ps_sigintr, i); } } mtx_unlock(&ps->ps_mtx); @@ -936,10 +940,6 @@ sigdflt(struct sigacts *ps, int sig) SIGADDSET(ps->ps_sigignore, sig); ps->ps_sigact[_SIG_IDX(sig)] =3D SIG_DFL; SIGDELSET(ps->ps_siginfo, sig); - SIGADDSET(ps->ps_sigintr, sig); - SIGDELSET(ps->ps_sigonstack, sig); - SIGDELSET(ps->ps_sigreset, sig); - SIGDELSET(ps->ps_signodefer, sig); } =20 /* --oe8NOCi/1gP69+wf Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJT+OCNAAoJEJDCuSvBvK1BKcYQAKpxOk+LyLS0MQwyx6auNUT4 XXf66wfIEVvvc8dTdpUmmZBruOcBBytohHbIszT1Zt+vMAmdmzGrqfWdnxong03r 8LYGVftz7FHQfW4ruiJapQSV5X9IToTGhDa9o8PbDj2YEfERKQ6s8EqoItg56fXX sJQIJtwyFwrIAiDUHrEC0SonFoueWjmIgM1hS2diw2Wucd6X8TWPTlCyLHTEfmsb OPsJtqWijMAI6FQfQowaoVLmm8vXL0kM43ubRavByDkodJ2Cf2L1lN8hVuVE6YBH Rkxq6xP4bTB+3TuqcYHoEPHxccX/rCnmU27bChlPp5cxU/qn9fJ+qJnB/u/JwSon 3DhccswpP013tfqGnq5KT+Ni2mBjMWAZKfGYx/bTl2QzjB0Vyb3jhRG8G+q0UZvL 72GuHeRJyrU5ncDOfqmjVkVejf2a0e8urGAzXhD3BiN0HJPQN1oHvXCDwPfVkazr akWgCvYZK3ZPuw6gQzHjZpZ6RQ0bWiVPzpFidOLQITjzih3nPIbbfiiqamq67UVv ngKNXeMyzMgUdDKmG+dP3PQ+FJvHZfIh2yKK7c/6bDAliG4SDwz8C/R4E9ArA7un lh7b5Z7rJNGf7yrFXtU7RfgVmuwrFGHsi0pykQWkFVtblbheMnP5r55L1TFMA4XN ZhUulceDIKFDCkqSnjHA =d2xr -----END PGP SIGNATURE----- --oe8NOCi/1gP69+wf-- From owner-svn-src-all@FreeBSD.ORG Sat Aug 23 18:55:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C6C91EA9; Sat, 23 Aug 2014 18:55:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B1D1A3200; Sat, 23 Aug 2014 18:55:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NItqRn082674; Sat, 23 Aug 2014 18:55:52 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NItqOM082671; Sat, 23 Aug 2014 18:55:52 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201408231855.s7NItqOM082671@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 23 Aug 2014 18:55:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270430 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 18:55:53 -0000 Author: adrian Date: Sat Aug 23 18:55:51 2014 New Revision: 270430 URL: http://svnweb.freebsd.org/changeset/base/270430 Log: Shut down RX before TX - in theory, this should make the chip less likely to get upset. The Qualcomm Atheros reference design code goes through significant hacks to shut down RX before TX. It doesn't even try do do it in the driver - it actually makes the DMA stop routines in the HAL shut down RX before shutting down TX. So, to make this work for chips that aren't the AR9380 and later, do it in the driver. Shuffle the TX stop/drain HAL calls to be called *after* the RX stop HAL call. Tested: * AR5413 (STA) * AR5212 (STA) * AR5416 (STA) * AR9380 (STA) * AR9331 (AP) * AR9341 (AP) TODO: * test ar92xx series NIC and the AR5210/AR5211, in case there's something even odder about those. Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_ath_beacon.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Sat Aug 23 18:11:54 2014 (r270429) +++ head/sys/dev/ath/if_ath.c Sat Aug 23 18:55:51 2014 (r270430) @@ -1599,9 +1599,9 @@ ath_vap_delete(struct ieee80211vap *vap) * the vap state by any frames pending on the tx queues. */ ath_hal_intrset(ah, 0); /* disable interrupts */ - ath_draintxq(sc, ATH_RESET_DEFAULT); /* stop hw xmit side */ /* XXX Do all frames from all vaps/nodes need draining here? */ ath_stoprecv(sc, 1); /* stop recv side */ + ath_draintxq(sc, ATH_RESET_DEFAULT); /* stop hw xmit side */ } /* .. leave the hardware awake for now. */ @@ -2503,12 +2503,13 @@ ath_stop_locked(struct ifnet *ifp) } ath_hal_intrset(ah, 0); } - ath_draintxq(sc, ATH_RESET_DEFAULT); + /* XXX we should stop RX regardless of whether it's valid */ if (!sc->sc_invalid) { ath_stoprecv(sc, 1); ath_hal_phydisable(ah); } else sc->sc_rxlink = NULL; + ath_draintxq(sc, ATH_RESET_DEFAULT); ath_beacon_free(sc); /* XXX not needed */ } @@ -2710,13 +2711,6 @@ ath_reset(struct ifnet *ifp, ATH_RESET_T ATH_PCU_UNLOCK(sc); /* - * Should now wait for pending TX/RX to complete - * and block future ones from occuring. This needs to be - * done before the TX queue is drained. - */ - ath_draintxq(sc, reset_type); /* stop xmit side */ - - /* * Regardless of whether we're doing a no-loss flush or * not, stop the PCU and handle what's in the RX queue. * That way frames aren't dropped which shouldn't be. @@ -2724,6 +2718,13 @@ ath_reset(struct ifnet *ifp, ATH_RESET_T ath_stoprecv(sc, (reset_type != ATH_RESET_NOLOSS)); ath_rx_flush(sc); + /* + * Should now wait for pending TX/RX to complete + * and block future ones from occuring. This needs to be + * done before the TX queue is drained. + */ + ath_draintxq(sc, reset_type); /* stop xmit side */ + ath_settkipmic(sc); /* configure TKIP MIC handling */ /* NB: indicate channel change so we do a full reset */ ath_update_chainmasks(sc, ic->ic_curchan); Modified: head/sys/dev/ath/if_ath_beacon.c ============================================================================== --- head/sys/dev/ath/if_ath_beacon.c Sat Aug 23 18:11:54 2014 (r270429) +++ head/sys/dev/ath/if_ath_beacon.c Sat Aug 23 18:55:51 2014 (r270430) @@ -749,6 +749,11 @@ ath_beacon_generate(struct ath_softc *sc * * More thought is required here. */ + /* + * XXX can we even stop TX DMA here? Check what the + * reference driver does for cabq for beacons, given + * that stopping TX requires RX is paused. + */ ath_tx_draintxq(sc, cabq); } } From owner-svn-src-all@FreeBSD.ORG Sat Aug 23 20:35:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4DBCA7A2; Sat, 23 Aug 2014 20:35:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 36A6B3B38; Sat, 23 Aug 2014 20:35:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NKZa7e033149; Sat, 23 Aug 2014 20:35:36 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NKZYLY033139; Sat, 23 Aug 2014 20:35:34 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201408232035.s7NKZYLY033139@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Sat, 23 Aug 2014 20:35:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270431 - in head/sys: dev/fb dev/vt dev/vt/hw/efifb dev/vt/hw/fb dev/vt/hw/ofwfb dev/vt/hw/vga powerpc/ps3 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 20:35:36 -0000 Author: dumbbell Date: Sat Aug 23 20:35:33 2014 New Revision: 270431 URL: http://svnweb.freebsd.org/changeset/base/270431 Log: vt(4): Add vd_bitblt_bmp_t callback The code was already there in all backends, we just expose it. This is used to display the splash screen. MFC after: 1 week Modified: head/sys/dev/fb/creator_vt.c head/sys/dev/vt/hw/efifb/efifb.c head/sys/dev/vt/hw/fb/vt_early_fb.c head/sys/dev/vt/hw/fb/vt_fb.c head/sys/dev/vt/hw/fb/vt_fb.h head/sys/dev/vt/hw/ofwfb/ofwfb.c head/sys/dev/vt/hw/vga/vt_vga.c head/sys/dev/vt/vt.h head/sys/dev/vt/vt_core.c head/sys/powerpc/ps3/ps3_syscons.c Modified: head/sys/dev/fb/creator_vt.c ============================================================================== --- head/sys/dev/fb/creator_vt.c Sat Aug 23 18:55:51 2014 (r270430) +++ head/sys/dev/fb/creator_vt.c Sat Aug 23 20:35:33 2014 (r270431) @@ -46,6 +46,7 @@ static vd_probe_t creatorfb_probe; static vd_init_t creatorfb_init; static vd_blank_t creatorfb_blank; static vd_bitblt_text_t creatorfb_bitblt_text; +static vd_bitblt_bmp_t creatorfb_bitblt_bitmap; static const struct vt_driver vt_creatorfb_driver = { .vd_name = "creatorfb", @@ -53,6 +54,7 @@ static const struct vt_driver vt_creator .vd_init = creatorfb_init, .vd_blank = creatorfb_blank, .vd_bitblt_text = creatorfb_bitblt_text, + .vd_bitblt_bmp = creatorfb_bitblt_bitmap, .vd_fb_ioctl = vt_fb_ioctl, .vd_fb_mmap = vt_fb_mmap, .vd_priority = VD_PRIORITY_SPECIFIC Modified: head/sys/dev/vt/hw/efifb/efifb.c ============================================================================== --- head/sys/dev/vt/hw/efifb/efifb.c Sat Aug 23 18:55:51 2014 (r270430) +++ head/sys/dev/vt/hw/efifb/efifb.c Sat Aug 23 20:35:33 2014 (r270431) @@ -61,6 +61,7 @@ static struct vt_driver vt_efifb_driver .vd_init = vt_efifb_init, .vd_blank = vt_fb_blank, .vd_bitblt_text = vt_fb_bitblt_text, + .vd_bitblt_bmp = vt_fb_bitblt_bitmap, .vd_fb_ioctl = vt_fb_ioctl, .vd_fb_mmap = vt_fb_mmap, /* Better than VGA, but still generic driver. */ Modified: head/sys/dev/vt/hw/fb/vt_early_fb.c ============================================================================== --- head/sys/dev/vt/hw/fb/vt_early_fb.c Sat Aug 23 18:55:51 2014 (r270430) +++ head/sys/dev/vt/hw/fb/vt_early_fb.c Sat Aug 23 20:35:33 2014 (r270431) @@ -60,6 +60,7 @@ static struct vt_driver vt_fb_early_driv .vd_init = vt_efb_init, .vd_blank = vt_fb_blank, .vd_bitblt_text = vt_fb_bitblt_text, + .vd_bitblt_bmp = vt_fb_bitblt_bitmap, .vd_priority = VD_PRIORITY_GENERIC, }; Modified: head/sys/dev/vt/hw/fb/vt_fb.c ============================================================================== --- head/sys/dev/vt/hw/fb/vt_fb.c Sat Aug 23 18:55:51 2014 (r270430) +++ head/sys/dev/vt/hw/fb/vt_fb.c Sat Aug 23 20:35:33 2014 (r270431) @@ -49,6 +49,7 @@ static struct vt_driver vt_fb_driver = { .vd_init = vt_fb_init, .vd_blank = vt_fb_blank, .vd_bitblt_text = vt_fb_bitblt_text, + .vd_bitblt_bmp = vt_fb_bitblt_bitmap, .vd_drawrect = vt_fb_drawrect, .vd_setpixel = vt_fb_setpixel, .vd_postswitch = vt_fb_postswitch, @@ -242,7 +243,7 @@ vt_fb_blank(struct vt_device *vd, term_c } } -static void +void vt_fb_bitblt_bitmap(struct vt_device *vd, const struct vt_window *vw, const uint8_t *pattern, const uint8_t *mask, unsigned int width, unsigned int height, Modified: head/sys/dev/vt/hw/fb/vt_fb.h ============================================================================== --- head/sys/dev/vt/hw/fb/vt_fb.h Sat Aug 23 18:55:51 2014 (r270430) +++ head/sys/dev/vt/hw/fb/vt_fb.h Sat Aug 23 20:35:33 2014 (r270431) @@ -39,6 +39,7 @@ void vt_fb_suspend(void); vd_init_t vt_fb_init; vd_blank_t vt_fb_blank; vd_bitblt_text_t vt_fb_bitblt_text; +vd_bitblt_bmp_t vt_fb_bitblt_bitmap; vd_postswitch_t vt_fb_postswitch; vd_fb_ioctl_t vt_fb_ioctl; vd_fb_mmap_t vt_fb_mmap; Modified: head/sys/dev/vt/hw/ofwfb/ofwfb.c ============================================================================== --- head/sys/dev/vt/hw/ofwfb/ofwfb.c Sat Aug 23 18:55:51 2014 (r270430) +++ head/sys/dev/vt/hw/ofwfb/ofwfb.c Sat Aug 23 20:35:33 2014 (r270431) @@ -59,6 +59,7 @@ struct ofwfb_softc { static vd_probe_t ofwfb_probe; static vd_init_t ofwfb_init; static vd_bitblt_text_t ofwfb_bitblt_text; +static vd_bitblt_bmp_t ofwfb_bitblt_bitmap; static const struct vt_driver vt_ofwfb_driver = { .vd_name = "ofwfb", @@ -66,6 +67,7 @@ static const struct vt_driver vt_ofwfb_d .vd_init = ofwfb_init, .vd_blank = vt_fb_blank, .vd_bitblt_text = ofwfb_bitblt_text, + .vd_bitblt_bmp = ofwfb_bitblt_bitmap, .vd_fb_ioctl = vt_fb_ioctl, .vd_fb_mmap = vt_fb_mmap, .vd_priority = VD_PRIORITY_GENERIC+1, Modified: head/sys/dev/vt/hw/vga/vt_vga.c ============================================================================== --- head/sys/dev/vt/hw/vga/vt_vga.c Sat Aug 23 18:55:51 2014 (r270430) +++ head/sys/dev/vt/hw/vga/vt_vga.c Sat Aug 23 20:35:33 2014 (r270431) @@ -89,6 +89,7 @@ static vd_probe_t vga_probe; static vd_init_t vga_init; static vd_blank_t vga_blank; static vd_bitblt_text_t vga_bitblt_text; +static vd_bitblt_bmp_t vga_bitblt_bitmap; static vd_drawrect_t vga_drawrect; static vd_setpixel_t vga_setpixel; static vd_postswitch_t vga_postswitch; @@ -99,6 +100,7 @@ static const struct vt_driver vt_vga_dri .vd_init = vga_init, .vd_blank = vga_blank, .vd_bitblt_text = vga_bitblt_text, + .vd_bitblt_bmp = vga_bitblt_bitmap, .vd_drawrect = vga_drawrect, .vd_setpixel = vga_setpixel, .vd_postswitch = vga_postswitch, @@ -828,6 +830,52 @@ vga_bitblt_text(struct vt_device *vd, co } static void +vga_bitblt_bitmap(struct vt_device *vd, const struct vt_window *vw, + const uint8_t *pattern, const uint8_t *mask, + unsigned int width, unsigned int height, + unsigned int x, unsigned int y, term_color_t fg, term_color_t bg) +{ + unsigned int x1, y1, x2, y2, i, j, src_x, dst_x, x_count; + uint8_t pattern_2colors, pattern_ncolors; + + /* Align coordinates with the 8-pxels grid. */ + x1 = x / VT_VGA_PIXELS_BLOCK * VT_VGA_PIXELS_BLOCK; + y1 = y; + + x2 = (x + width + VT_VGA_PIXELS_BLOCK - 1) / + VT_VGA_PIXELS_BLOCK * VT_VGA_PIXELS_BLOCK; + y2 = y + height; + x2 = min(x2, vd->vd_width - 1); + y2 = min(y2, vd->vd_height - 1); + + pattern_ncolors = 0; + + for (j = y1; j < y2; ++j) { + src_x = 0; + dst_x = x - x1; + x_count = VT_VGA_PIXELS_BLOCK - dst_x; + + for (i = x1; i < x2; i += VT_VGA_MEMSIZE) { + pattern_2colors = 0; + + vga_copy_bitmap_portion( + &pattern_2colors, &pattern_ncolors, + pattern, mask, width, + src_x, dst_x, x_count, + j - y1, 0, 1, fg, bg, 0); + + vga_bitblt_pixels_block_2colors(vd, + &pattern_2colors, fg, bg, + i, j, 1); + + src_x += x_count; + dst_x = (dst_x + x_count) % VT_VGA_PIXELS_BLOCK; + x_count = min(x + width - i, VT_VGA_PIXELS_BLOCK); + } + } +} + +static void vga_initialize_graphics(struct vt_device *vd) { struct vga_softc *sc = vd->vd_softc; Modified: head/sys/dev/vt/vt.h ============================================================================== --- head/sys/dev/vt/vt.h Sat Aug 23 18:55:51 2014 (r270430) +++ head/sys/dev/vt/vt.h Sat Aug 23 20:35:33 2014 (r270431) @@ -305,6 +305,10 @@ typedef void vd_putchar_t(struct vt_devi vt_axis_t top, vt_axis_t left, term_color_t fg, term_color_t bg); typedef void vd_bitblt_text_t(struct vt_device *vd, const struct vt_window *vw, const term_rect_t *area); +typedef void vd_bitblt_bmp_t(struct vt_device *vd, const struct vt_window *vw, + const uint8_t *pattern, const uint8_t *mask, + unsigned int width, unsigned int height, + unsigned int x, unsigned int y, term_color_t fg, term_color_t bg); typedef int vd_fb_ioctl_t(struct vt_device *, u_long, caddr_t, struct thread *); typedef int vd_fb_mmap_t(struct vt_device *, vm_ooffset_t, vm_paddr_t *, int, vm_memattr_t *); @@ -324,6 +328,7 @@ struct vt_driver { vd_drawrect_t *vd_drawrect; vd_setpixel_t *vd_setpixel; vd_bitblt_text_t *vd_bitblt_text; + vd_bitblt_bmp_t *vd_bitblt_bmp; /* Framebuffer ioctls, if present. */ vd_fb_ioctl_t *vd_fb_ioctl; Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Sat Aug 23 18:55:51 2014 (r270430) +++ head/sys/dev/vt/vt_core.c Sat Aug 23 20:35:33 2014 (r270431) @@ -1087,8 +1087,9 @@ vtterm_splash(struct vt_device *vd) switch (vt_logo_depth) { case 1: /* XXX: Unhardcode colors! */ - vd->vd_driver->vd_bitbltchr(vd, vt_logo_image, NULL, 0, - top, left, vt_logo_width, vt_logo_height, 0xf, 0x0); + vd->vd_driver->vd_bitblt_bmp(vd, vd->vd_curwindow, + vt_logo_image, NULL, vt_logo_width, vt_logo_height, + top, left, TC_WHITE, TC_BLACK); } vd->vd_flags |= VDF_SPLASH; } Modified: head/sys/powerpc/ps3/ps3_syscons.c ============================================================================== --- head/sys/powerpc/ps3/ps3_syscons.c Sat Aug 23 18:55:51 2014 (r270430) +++ head/sys/powerpc/ps3/ps3_syscons.c Sat Aug 23 20:35:33 2014 (r270431) @@ -77,6 +77,7 @@ static struct vt_driver vt_ps3fb_driver .vd_init = ps3fb_init, .vd_blank = vt_fb_blank, .vd_bitblt_text = vt_fb_bitblt_text, + .vd_bitblt_bmp = vt_fb_bitblt_bitmap, .vd_fb_ioctl = vt_fb_ioctl, .vd_fb_mmap = vt_fb_mmap, /* Better than VGA, but still generic driver. */ From owner-svn-src-all@FreeBSD.ORG Sat Aug 23 20:42:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB438CBA; Sat, 23 Aug 2014 20:42:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A68733C04; Sat, 23 Aug 2014 20:42:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NKgcfv037750; Sat, 23 Aug 2014 20:42:38 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NKgcVf037748; Sat, 23 Aug 2014 20:42:38 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201408232042.s7NKgcVf037748@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 23 Aug 2014 20:42:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270432 - head/usr.bin/iscsictl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 20:42:38 -0000 Author: ngie Date: Sat Aug 23 20:42:37 2014 New Revision: 270432 URL: http://svnweb.freebsd.org/changeset/base/270432 Log: Fix "make checkdpadd" in usr.bin/iscsictl by removing -lfl dependency Approved by: rpaulo (mentor) MFC after: 1 week Modified: head/usr.bin/iscsictl/Makefile head/usr.bin/iscsictl/token.l Modified: head/usr.bin/iscsictl/Makefile ============================================================================== --- head/usr.bin/iscsictl/Makefile Sat Aug 23 20:35:33 2014 (r270431) +++ head/usr.bin/iscsictl/Makefile Sat Aug 23 20:42:37 2014 (r270432) @@ -7,7 +7,7 @@ CFLAGS+= -I${.CURDIR}/../../sys/dev/iscs MAN= iscsictl.8 DPADD= ${LIBCAM} ${LIBUTIL} -LDADD= -lcam -lfl -lutil +LDADD= -lcam -lutil YFLAGS+= -v LFLAGS+= -i Modified: head/usr.bin/iscsictl/token.l ============================================================================== --- head/usr.bin/iscsictl/token.l Sat Aug 23 20:35:33 2014 (r270431) +++ head/usr.bin/iscsictl/token.l Sat Aug 23 20:42:37 2014 (r270432) @@ -46,6 +46,7 @@ extern int yylex(void); %option noinput %option nounput +%option noyywrap %% HeaderDigest { return HEADER_DIGEST; } From owner-svn-src-all@FreeBSD.ORG Sat Aug 23 20:43:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B145ED2; Sat, 23 Aug 2014 20:43:11 +0000 (UTC) Received: from mail-pa0-x232.google.com (mail-pa0-x232.google.com [IPv6:2607:f8b0:400e:c03::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BE4A3C0E; Sat, 23 Aug 2014 20:43:11 +0000 (UTC) Received: by mail-pa0-f50.google.com with SMTP id et14so18225031pad.37 for ; Sat, 23 Aug 2014 13:43:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=6fnwEezHelMkeg6PQd/Y7W7GUBjZ9h9zXdBVyWCWd80=; b=laV3v+IfTfEMONchmxFMfec+DPS1CdvGQrb1Axj8AbGLJTQ3GUwhGl1QFIbMPE8/24 bjCFRnxDPDXvGTxv7MCklk1MovtIrTawbA1EwDqJkT7+uA4KPuaMexdkQOeA7cFP1Ikl A20OWe7JhNY/QXpClNoBVyIHrliHkr5SmujYUEvFnmZQKE4bzbYym/j9M1LkOEboYCB6 FOn/YZf+mc6SYRBcMbxvWk5LepwNGsisoBlJP43oPc0ZoTjmz1m56NF7TURxKDIjIJI8 HCZC+jRQJkLUmRYHd5vUilFHJayKIBtudIJhlvWC2Ok0GJcm521mGit//stNskT19zxG yZ+w== X-Received: by 10.68.189.137 with SMTP id gi9mr15685491pbc.87.1408826590729; Sat, 23 Aug 2014 13:43:10 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:2d0f:2939:2db9:836a? ([2601:8:ab80:7d6:2d0f:2939:2db9:836a]) by mx.google.com with ESMTPSA id fk8sm103149334pab.22.2014.08.23.13.43.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 23 Aug 2014 13:43:10 -0700 (PDT) Content-Type: multipart/signed; boundary="Apple-Mail=_C1C4EADC-6C76-4B1C-947E-3BE8CB2BF7FB"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r270432 - head/usr.bin/iscsictl From: yaneurabeya@gmail.com In-Reply-To: <201408232042.s7NKgcVf037748@svn.freebsd.org> Date: Sat, 23 Aug 2014 13:43:08 -0700 Message-Id: References: <201408232042.s7NKgcVf037748@svn.freebsd.org> To: Garrett Cooper X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 20:43:11 -0000 --Apple-Mail=_C1C4EADC-6C76-4B1C-947E-3BE8CB2BF7FB Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On Aug 23, 2014, at 1:42 PM, Garrett Cooper wrote: > Author: ngie > Date: Sat Aug 23 20:42:37 2014 > New Revision: 270432 > URL: http://svnweb.freebsd.org/changeset/base/270432 > > Log: > Fix "make checkdpadd" in usr.bin/iscsictl by removing -lfl dependency > > Approved by: rpaulo (mentor) > MFC after: 1 week Forgot to include: Phabric: D674 --Apple-Mail=_C1C4EADC-6C76-4B1C-947E-3BE8CB2BF7FB Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJT+PzdAAoJEMZr5QU6S73e3rwIAKNIX41sIOGZ1fQK+DwlfBgK qfo3GDyqVYMz2dZfA7XTUu2cYGut6Xb9LPprNkMjOnIm3lJnUOfZ/Rn0CSsHUPtT sx96B+07tI9u0ctt6PbCrZGNMDhrFiObBBoRtpwv+qnhFtvOuf4z3DKy3alcLt9A ybBNurwx4Kcs7ajGJxpRWvQmllmINxBU5YFQLL4x35nxzvsCNy5Q2iBFFF4yxiuq i+6X9LCMNtM0bqKLL8BIFuj1qnlTz3vpAn5uXbzElwbPCxX7JkGHGE/V7WMnqQwi zxzSCWZqwHSMjOxcqT9jXE1bYEGRbzfar+EVTP7pYS3F+gEfSgKvuGgvNvRs6Jg= =BJZq -----END PGP SIGNATURE----- --Apple-Mail=_C1C4EADC-6C76-4B1C-947E-3BE8CB2BF7FB-- From owner-svn-src-all@FreeBSD.ORG Sat Aug 23 20:45:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4FB4F1D1; Sat, 23 Aug 2014 20:45:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38CC33C23; Sat, 23 Aug 2014 20:45:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NKj1x6038386; Sat, 23 Aug 2014 20:45:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NKj1rc038385; Sat, 23 Aug 2014 20:45:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201408232045.s7NKj1rc038385@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 23 Aug 2014 20:45:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270433 - head/sbin/hastd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 20:45:01 -0000 Author: ngie Date: Sat Aug 23 20:45:00 2014 New Revision: 270433 URL: http://svnweb.freebsd.org/changeset/base/270433 Log: Garbage collect libl dependency The application links and runs without libl Approved by: rpaulo (mentor) Phabric: D673 X-MFC with: r270117 Submitted by: trociny Modified: head/sbin/hastd/Makefile Modified: head/sbin/hastd/Makefile ============================================================================== --- head/sbin/hastd/Makefile Sat Aug 23 20:42:37 2014 (r270432) +++ head/sbin/hastd/Makefile Sat Aug 23 20:45:00 2014 (r270433) @@ -30,8 +30,8 @@ CFLAGS+=-DINET CFLAGS+=-DINET6 .endif -DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} ${LIBL} ${LIBPTHREAD} ${LIBUTIL} -LDADD= -lgeom -lbsdxml -lsbuf -ll -lpthread -lutil +DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} ${LIBPTHREAD} ${LIBUTIL} +LDADD= -lgeom -lbsdxml -lsbuf -lpthread -lutil .if ${MK_OPENSSL} != "no" DPADD+= ${LIBCRYPTO} LDADD+= -lcrypto From owner-svn-src-all@FreeBSD.ORG Sat Aug 23 21:16:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53BEF7E0; Sat, 23 Aug 2014 21:16:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F29E3EAB; Sat, 23 Aug 2014 21:16:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NLGROH052216; Sat, 23 Aug 2014 21:16:27 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NLGRug052215; Sat, 23 Aug 2014 21:16:27 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201408232116.s7NLGRug052215@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Sat, 23 Aug 2014 21:16:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270434 - head/sys/amd64/vmm/io X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 21:16:27 -0000 Author: neel Date: Sat Aug 23 21:16:26 2014 New Revision: 270434 URL: http://svnweb.freebsd.org/changeset/base/270434 Log: Return the spurious interrupt vector (IRQ7 or IRQ15) if the atpic cannot find any unmasked pin with an interrupt asserted. Reviewed by: tychon CR: https://reviews.freebsd.org/D669 MFC after: 1 week Modified: head/sys/amd64/vmm/io/vatpic.c Modified: head/sys/amd64/vmm/io/vatpic.c ============================================================================== --- head/sys/amd64/vmm/io/vatpic.c Sat Aug 23 20:45:00 2014 (r270433) +++ head/sys/amd64/vmm/io/vatpic.c Sat Aug 23 21:16:26 2014 (r270434) @@ -500,13 +500,19 @@ vatpic_pending_intr(struct vm *vm, int * VATPIC_LOCK(vatpic); pin = vatpic_get_highest_irrpin(atpic); - if (pin == -1) - pin = 7; if (pin == 2) { atpic = &vatpic->atpic[1]; pin = vatpic_get_highest_irrpin(atpic); } + /* + * If there are no pins active at this moment then return the spurious + * interrupt vector instead. + */ + if (pin == -1) + pin = 7; + + KASSERT(pin >= 0 && pin <= 7, ("%s: invalid pin %d", __func__, pin)); *vecptr = atpic->irq_base + pin; VATPIC_UNLOCK(vatpic); From owner-svn-src-all@FreeBSD.ORG Sat Aug 23 22:03:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67C0EA26; Sat, 23 Aug 2014 22:03:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 530263296; Sat, 23 Aug 2014 22:03:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NM3G2s076050; Sat, 23 Aug 2014 22:03:16 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NM3G3E076049; Sat, 23 Aug 2014 22:03:16 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201408232203.s7NM3G3E076049@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sat, 23 Aug 2014 22:03:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r270435 - stable/9/sys/fs/nfsserver X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 22:03:16 -0000 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 owner-svn-src-all@FreeBSD.ORG Sat Aug 23 22:44:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F106EEF5; Sat, 23 Aug 2014 22:44:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD4D73619; Sat, 23 Aug 2014 22:44:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NMiV00096253; Sat, 23 Aug 2014 22:44:31 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NMiVjL096252; Sat, 23 Aug 2014 22:44:31 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201408232244.s7NMiVjL096252@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Sat, 23 Aug 2014 22:44:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270436 - head/sys/amd64/vmm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 22:44:32 -0000 Author: neel Date: Sat Aug 23 22:44:31 2014 New Revision: 270436 URL: http://svnweb.freebsd.org/changeset/base/270436 Log: Fix a bug in the emulation of CPUID leaf 0x4 where bhyve was claiming that the vcpu had no caches at all. This causes problems when executing applications in the guest compiled with the Intel compiler. Submitted by: Mark Hill (mark.hill@tidalscale.com) Modified: head/sys/amd64/vmm/x86.c Modified: head/sys/amd64/vmm/x86.c ============================================================================== --- head/sys/amd64/vmm/x86.c Sat Aug 23 22:03:15 2014 (r270435) +++ head/sys/amd64/vmm/x86.c Sat Aug 23 22:44:31 2014 (r270436) @@ -215,7 +215,7 @@ x86_emulate_cpuid(struct vm *vm, int vcp break; case CPUID_0000_0004: - do_cpuid(4, regs); + cpuid_count(*eax, *ecx, regs); /* * Do not expose topology. @@ -230,7 +230,7 @@ x86_emulate_cpuid(struct vm *vm, int vcp * Therefore 0 for both indicates 1 core per * package and no cache sharing. */ - regs[0] &= 0xffff8000; + regs[0] &= 0x3ff; break; case CPUID_0000_0007: